You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Exerc...

1042 lines
1.2 MiB

!(function(){var Cl=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[3433],{65030:function(fn,je,b){"use strict";b.d(je,{Z:function(){return $e}});var x=b(27247),ne=b(11913),pe=b(43079),te=b(43403),M=b(92310),f=b.n(M),oe=b(29301),Q=b(76846),o=b(96452),y=b(6089),C=b(80402),h=b(34280),m=b(49658),E=b(59301),S=b(32855),I=b(77900),B=b(8654);function G(ye){var de=ye.prefixCls,K=ye.align,xe=ye.arrow,Se=ye.arrowPos,$=xe||{},P=$.className,fe=$.content,he=Se.x,q=he===void 0?0:he,re=Se.y,le=re===void 0?0:re,Pe=E.useRef();if(!K||!K.points)return null;var Ae={position:"absolute"};if(K.autoArrow!==!1){var Ne=K.points[0],Te=K.points[1],He=Ne[0],Ke=Ne[1],Ze=Te[0],_e=Te[1];He===Ze||!["t","b"].includes(He)?Ae.top=le:He==="t"?Ae.top=0:Ae.bottom=0,Ke===_e||!["l","r"].includes(Ke)?Ae.left=q:Ke==="l"?Ae.left=0:Ae.right=0}return E.createElement("div",{ref:Pe,className:f()("".concat(de,"-arrow"),P),style:Ae},fe)}function R(ye){var de=ye.prefixCls,K=ye.open,xe=ye.zIndex,Se=ye.mask,$=ye.motion;return Se?E.createElement(I.default,(0,S.Z)({},$,{motionAppear:!0,visible:K,removeOnLeave:!0}),function(P){var fe=P.className;return E.createElement("div",{style:{zIndex:xe},className:f()("".concat(de,"-mask"),fe)})}):null}var O=E.memo(function(ye){var de=ye.children;return de},function(ye,de){return de.cache}),D=O,A=E.forwardRef(function(ye,de){var K=ye.popup,xe=ye.className,Se=ye.prefixCls,$=ye.style,P=ye.target,fe=ye.onVisibleChanged,he=ye.open,q=ye.keepDom,re=ye.fresh,le=ye.onClick,Pe=ye.mask,Ae=ye.arrow,Ne=ye.arrowPos,Te=ye.align,He=ye.motion,Ke=ye.maskMotion,Ze=ye.forceRender,_e=ye.getPopupContainer,ft=ye.autoDestroy,Xe=ye.portal,Ve=ye.zIndex,Pt=ye.onMouseEnter,Mt=ye.onMouseLeave,st=ye.onPointerEnter,Qt=ye.onPointerDownCapture,pn=ye.ready,Lt=ye.offsetX,tn=ye.offsetY,ze=ye.offsetR,ke=ye.offsetB,Re=ye.onAlign,Z=ye.onPrepare,ee=ye.stretch,me=ye.targetWidth,ve=ye.targetHeight,Ee=typeof K=="function"?K():K,Me=he||q,Ye=(_e==null?void 0:_e.length)>0,nt=E.useState(!_e||!Ye),_t=(0,ne.Z)(nt,2),nn=_t[0],ln=_t[1];if((0,h.Z)(function(){!nn&&Ye&&P&&ln(!0)},[nn,Ye,P]),!nn)return null;var zt="auto",Jt={left:"-1000vw",top:"-1000vh",right:zt,bottom:zt};if(pn||!he){var yn,Bn=Te.points,mn=Te.dynamicInset||((yn=Te._experimental)===null||yn===void 0?void 0:yn.dynamicInset),gn=mn&&Bn[0][1]==="r",Nt=mn&&Bn[0][0]==="b";gn?(Jt.right=ze,Jt.left=zt):(Jt.left=Lt,Jt.right=zt),Nt?(Jt.bottom=ke,Jt.top=zt):(Jt.top=tn,Jt.bottom=zt)}var wt={};return ee&&(ee.includes("height")&&ve?wt.height=ve:ee.includes("minHeight")&&ve&&(wt.minHeight=ve),ee.includes("width")&&me?wt.width=me:ee.includes("minWidth")&&me&&(wt.minWidth=me)),he||(wt.pointerEvents="none"),E.createElement(Xe,{open:Ze||Me,getContainer:_e&&function(){return _e(P)},autoDestroy:ft},E.createElement(R,{prefixCls:Se,open:he,zIndex:Ve,mask:Pe,motion:Ke}),E.createElement(oe.Z,{onResize:Re,disabled:!he},function(qt){return E.createElement(I.default,(0,S.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Ze,leavedClassName:"".concat(Se,"-hidden")},He,{onAppearPrepare:Z,onEnterPrepare:Z,visible:he,onVisibleChanged:function(Nn){var Fe;He==null||(Fe=He.onVisibleChanged)===null||Fe===void 0||Fe.call(He,Nn),fe(Nn)}}),function(At,Nn){var Fe=At.className,Ie=At.style,Kt=f()(Se,Fe,xe);return E.createElement("div",{ref:(0,B.sQ)(qt,de,Nn),className:Kt,style:(0,x.Z)((0,x.Z)((0,x.Z)((0,x.Z)({"--arrow-x":"".concat(Ne.x||0,"px"),"--arrow-y":"".concat(Ne.y||0,"px")},Jt),wt),Ie),{},{boxSizing:"border-box",zIndex:Ve},$),onMouseEnter:Pt,onMouseLeave:Mt,onPointerEnter:st,onClick:le,onPointerDownCapture:Qt},Ae&&E.createElement(G,{prefixCls:Se,arrow:Ae,arrowPos:Ne,align:Te}),E.createElement(D,{cache:!he&&!re},Ee))})}))}),W=A,X=E.forwardRef(function(ye,de){var K=ye.children,xe=ye.getTriggerDOMNode,Se=(0,B.Yr)(K),$=E.useCallback(function(fe){(0,B.mH)(de,xe?xe(fe):fe)},[xe]),P=(0,B.x1)($,(0,B.C4)(K));return Se?E.cloneElement(K,{ref:P}):K}),Y=X,L=E.createContext(null),se=L;function ae(ye){return ye?Array.isArray(ye)?ye:[ye]:[]}function Be(ye,de,K,xe){return E.useMemo(function(){var Se=ae(K!=null?K:de),$=ae(xe!=null?xe:de),P=new Set(Se),fe=new Set($);return ye&&(P.has("hover")&&(P.delete("hover"),P.add("click")),fe.has("hover")&&(fe.delete("hover"),fe.add("click"))),[P,fe]},[ye,de,K,xe])}var U=b(29194);function k(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],K=arguments.length>2?arguments[2]:void 0;return K?ye[0]===de[0]:ye[0]===de[0]&&ye[1]===de[1]}function N(ye,de,K,xe){for(var Se=K.points,$=Object.keys(ye),P=0;P<$.length;P+=1){var fe,he=$[P];if(k((fe=ye[he])===null||fe===void 0?void 0:fe.points,Se,xe))return"".concat(de,"-placement-").concat(he)}return""}function V(ye,de,K,xe){return de||(K?{motionName:"".concat(ye,"-").concat(K)}:xe?{motionName:xe}:null)}function J(ye){return ye.ownerDocument.defaultView}function H(ye){for(var de=[],K=ye==null?void 0:ye.parentElement,xe=["hidden","scroll","clip","auto"];K;){var Se=J(K).getComputedStyle(K),$=Se.overflowX,P=Se.overflowY,fe=Se.overflow;[$,P,fe].some(function(he){return xe.includes(he)})&&de.push(K),K=K.parentElement}return de}function v(ye){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(ye)?de:ye}function g(ye){return v(parseFloat(ye),0)}function F(ye,de){var K=(0,x.Z)({},ye);return(de||[]).forEach(function(xe){if(!(xe instanceof HTMLBodyElement||xe instanceof HTMLHtmlElement)){var Se=J(xe).getComputedStyle(xe),$=Se.overflow,P=Se.overflowClipMargin,fe=Se.borderTopWidth,he=Se.borderBottomWidth,q=Se.borderLeftWidth,re=Se.borderRightWidth,le=xe.getBoundingClientRect(),Pe=xe.offsetHeight,Ae=xe.clientHeight,Ne=xe.offsetWidth,Te=xe.clientWidth,He=g(fe),Ke=g(he),Ze=g(q),_e=g(re),ft=v(Math.round(le.width/Ne*1e3)/1e3),Xe=v(Math.round(le.height/Pe*1e3)/1e3),Ve=(Ne-Te-Ze-_e)*ft,Pt=(Pe-Ae-He-Ke)*Xe,Mt=He*Xe,st=Ke*Xe,Qt=Ze*ft,pn=_e*ft,Lt=0,tn=0;if($==="clip"){var ze=g(P);Lt=ze*ft,tn=ze*Xe}var ke=le.x+Qt-Lt,Re=le.y+Mt-tn,Z=ke+le.width+2*Lt-Qt-pn-Ve,ee=Re+le.height+2*tn-Mt-st-Pt;K.left=Math.max(K.left,ke),K.top=Math.max(K.top,Re),K.right=Math.min(K.right,Z),K.bottom=Math.min(K.bottom,ee)}}),K}function ie(ye){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,K="".concat(de),xe=K.match(/^(.*)\%$/);return xe?ye*(parseFloat(xe[1])/100):parseFloat(K)}function ue(ye,de){var K=de||[],xe=(0,ne.Z)(K,2),Se=xe[0],$=xe[1];return[ie(ye.width,Se),ie(ye.height,$)]}function Le(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[ye[0],ye[1]]}function Je(ye,de){var K=de[0],xe=de[1],Se,$;return K==="t"?$=ye.y:K==="b"?$=ye.y+ye.height:$=ye.y+ye.height/2,xe==="l"?Se=ye.x:xe==="r"?Se=ye.x+ye.width:Se=ye.x+ye.width/2,{x:Se,y:$}}function rt(ye,de){var K={t:"b",b:"t",l:"r",r:"l"};return ye.map(function(xe,Se){return Se===de?K[xe]||"c":xe}).join("")}function dt(ye,de,K,xe,Se,$,P){var fe=E.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Se[xe]||{}}),he=(0,ne.Z)(fe,2),q=he[0],re=he[1],le=E.useRef(0),Pe=E.useMemo(function(){return de?H(de):[]},[de]),Ae=E.useRef({}),Ne=function(){Ae.current={}};ye||Ne();var Te=(0,y.Z)(function(){if(de&&K&&ye){let Er=function(br,Cn){var rr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt,ir=Me.x+br,sr=Me.y+Cn,er=ir+Nt,vr=sr+gn,Wr=Math.max(ir,rr.left),Sn=Math.max(sr,rr.top),zn=Math.min(er,rr.right),Gn=Math.min(vr,rr.bottom);return Math.max(0,(zn-Wr)*(Gn-Sn))},yr=function(){lt=Me.y+Rn,Bt=lt+gn,Ct=Me.x+Tn,gt=Ct+Nt};var Ze,_e,ft,Xe,Ve=de,Pt=Ve.ownerDocument,Mt=J(Ve),st=Mt.getComputedStyle(Ve),Qt=st.position,pn=Ve.style.left,Lt=Ve.style.top,tn=Ve.style.right,ze=Ve.style.bottom,ke=Ve.style.overflow,Re=(0,x.Z)((0,x.Z)({},Se[xe]),$),Z=Pt.createElement("div");(Ze=Ve.parentElement)===null||Ze===void 0||Ze.appendChild(Z),Z.style.left="".concat(Ve.offsetLeft,"px"),Z.style.top="".concat(Ve.offsetTop,"px"),Z.style.position=Qt,Z.style.height="".concat(Ve.offsetHeight,"px"),Z.style.width="".concat(Ve.offsetWidth,"px"),Ve.style.left="0",Ve.style.top="0",Ve.style.right="auto",Ve.style.bottom="auto",Ve.style.overflow="hidden";var ee;if(Array.isArray(K))ee={x:K[0],y:K[1],width:0,height:0};else{var me,ve,Ee=K.getBoundingClientRect();Ee.x=(me=Ee.x)!==null&&me!==void 0?me:Ee.left,Ee.y=(ve=Ee.y)!==null&&ve!==void 0?ve:Ee.top,ee={x:Ee.x,y:Ee.y,width:Ee.width,height:Ee.height}}var Me=Ve.getBoundingClientRect(),Ye=Mt.getComputedStyle(Ve),nt=Ye.height,_t=Ye.width;Me.x=(_e=Me.x)!==null&&_e!==void 0?_e:Me.left,Me.y=(ft=Me.y)!==null&&ft!==void 0?ft:Me.top;var nn=Pt.documentElement,ln=nn.clientWidth,zt=nn.clientHeight,Jt=nn.scrollWidth,yn=nn.scrollHeight,Bn=nn.scrollTop,mn=nn.scrollLeft,gn=Me.height,Nt=Me.width,wt=ee.height,qt=ee.width,At={left:0,top:0,right:ln,bottom:zt},Nn={left:-mn,top:-Bn,right:Jt-mn,bottom:yn-Bn},Fe=Re.htmlRegion,Ie="visible",Kt="visibleFirst";Fe!=="scroll"&&Fe!==Kt&&(Fe=Ie);var xt=Fe===Kt,Zt=F(Nn,Pe),Ht=F(At,Pe),yt=Fe===Ie?Ht:Zt,Rt=xt?Ht:yt;Ve.style.left="auto",Ve.style.top="auto",Ve.style.right="0",Ve.style.bottom="0";var sn=Ve.getBoundingClientRect();Ve.style.left=pn,Ve.style.top=Lt,Ve.style.right=tn,Ve.style.bottom=ze,Ve.style.overflow=ke,(Xe=Ve.parentElement)===null||Xe===void 0||Xe.removeChild(Z);var Ut=v(Math.round(Nt/parseFloat(_t)*1e3)/1e3),Gt=v(Math.round(gn/parseFloat(nt)*1e3)/1e3);if(Ut===0||Gt===0||(0,Q.Sh)(K)&&!(0,U.Z)(K))return;var Vt=Re.offset,rn=Re.targetOffset,Ft=ue(Me,Vt),De=(0,ne.Z)(Ft,2),Ce=De[0],ct=De[1],at=ue(ee,rn),Ot=(0,ne.Z)(at,2),Wt=Ot[0],jt=Ot[1];ee.x-=Wt,ee.y-=jt;var on=Re.points||[],_n=(0,ne.Z)(on,2),un=_n[0],Wn=_n[1],An=Le(Wn),wn=Le(un),Mn=Je(ee,An),Ln=Je(Me,wn),jn=(0,x.Z)({},Re),Tn=Mn.x-Ln.x+Ce,Rn=Mn.y-Ln.y+ct,an=Er(Tn,Rn),hn=Er(Tn,Rn,Ht),En=Je(ee,["t","l"]),Yn=Je(Me,["t","l"]),kn=Je(ee,["b","r"]),$n=Je(Me,["b","r"]),Ar=Re.overflow||{},ge=Ar.adjustX,We=Ar.adjustY,Ue=Ar.shiftX,et=Ar.shiftY,ot=function(Cn){return typeof Cn=="boolean"?Cn:Cn>=0},lt,Bt,Ct,gt;yr();var Ge=ot(We),qe=wn[0]===An[0];if(Ge&&wn[0]==="t"&&(Bt>Rt.bottom||Ae.current.bt)){var ut=Rn;qe?ut-=gn-wt:ut=En.y-$n.y-ct;var mt=Er(Tn,ut),St=Er(Tn,ut,Ht);mt>an||mt===an&&(!xt||St>=hn)?(Ae.current.bt=!0,Rn=ut,ct=-ct,jn.points=[rt(wn,0),rt(An,0)]):Ae.current.bt=!1}if(Ge&&wn[0]==="b"&&(lt<Rt.top||Ae.current.tb)){var Yt=Rn;qe?Yt+=gn-wt:Yt=kn.y-Yn.y-ct;var vn=Er(Tn,Yt),cn=Er(Tn,Yt,Ht);vn>an||vn===an&&(!xt||cn>=hn)?(Ae.current.tb=!0,Rn=Yt,ct=-ct,jn.points=[rt(wn,0),rt(An,0)]):Ae.current.tb=!1}var Dn=ot(ge),Vn=wn[1]===An[1];if(Dn&&wn[1]==="l"&&(gt>Rt.right||Ae.current.rl)){var Pn=Tn;Vn?Pn-=Nt-qt:Pn=En.x-$n.x-Ce;var qn=Er(Pn,Rn),xn=Er(Pn,Rn,Ht);qn>an||qn===an&&(!xt||xn>=hn)?(Ae.current.rl=!0,Tn=Pn,Ce=-Ce,jn.points=[rt(wn,1),rt(An,1)]):Ae.current.rl=!1}if(Dn&&wn[1]==="r"&&(Ct<Rt.left||Ae.current.lr)){var mr=Tn;Vn?mr+=Nt-qt:mr=kn.x-Yn.x-Ce;var Jn=Er(mr,Rn),dr=Er(mr,Rn,Ht);Jn>an||Jn===an&&(!xt||dr>=hn)?(Ae.current.lr=!0,Tn=mr,Ce=-Ce,jn.points=[rt(wn,1),rt(An,1)]):Ae.current.lr=!1}yr();var Qn=Ue===!0?0:Ue;typeof Qn=="number"&&(Ct<Ht.left&&(Tn-=Ct-Ht.left-Ce,ee.x+qt<Ht.left+Qn&&(Tn+=ee.x-Ht.left+qt-Qn)),gt>Ht.right&&(Tn-=gt-Ht.right-Ce,ee.x>Ht.right-Qn&&(Tn+=ee.x-Ht.right+Qn)));var tr=et===!0?0:et;typeof tr=="number"&&(lt<Ht.top&&(Rn-=lt-Ht.top-ct,ee.y+wt<Ht.top+tr&&(Rn+=ee.y-Ht.top+wt-tr)),Bt>Ht.bottom&&(Rn-=Bt-Ht.bottom-ct,ee.y>Ht.bottom-tr&&(Rn+=ee.y-Ht.bottom+tr)));var gr=Me.x+Tn,dn=gr+Nt,fr=Me.y+Rn,Hn=fr+gn,bn=ee.x,On=bn+qt,nr=ee.y,hr=nr+wt,lr=Math.max(gr,bn),In=Math.min(dn,On),Pr=(lr+In)/2,zr=Pr-gr,Kr=Math.max(fr,nr),ei=Math.min(Hn,hr),Jr=(Kr+ei)/2,Vr=Jr-fr;P==null||P(de,jn);var _r=sn.right-Me.x-(Tn+Me.width),wr=sn.bottom-Me.y-(Rn+Me.height);Ut===1&&(Tn=Math.round(Tn),_r=Math.round(_r)),Gt===1&&(Rn=Math.round(Rn),wr=Math.round(wr));var Nr={ready:!0,offsetX:Tn/Ut,offsetY:Rn/Gt,offsetR:_r/Ut,offsetB:wr/Gt,arrowX:zr/Ut,arrowY:Vr/Gt,scaleX:Ut,scaleY:Gt,align:jn};re(Nr)}}),He=function(){le.current+=1;var _e=le.current;Promise.resolve().then(function(){le.current===_e&&Te()})},Ke=function(){re(function(_e){return(0,x.Z)((0,x.Z)({},_e),{},{ready:!1})})};return(0,h.Z)(Ke,[xe]),(0,h.Z)(function(){ye||Ke()},[ye]),[q.ready,q.offsetX,q.offsetY,q.offsetR,q.offsetB,q.arrowX,q.arrowY,q.scaleX,q.scaleY,q.align,He]}var vt=b(3300);function be(ye,de,K,xe,Se){(0,h.Z)(function(){if(ye&&de&&K){let le=function(){xe(),Se()};var $=de,P=K,fe=H($),he=H(P),q=J(P),re=new Set([q].concat((0,vt.Z)(fe),(0,vt.Z)(he)));return re.forEach(function(Pe){Pe.addEventListener("scroll",le,{passive:!0})}),q.addEventListener("resize",le,{passive:!0}),xe(),function(){re.forEach(function(Pe){Pe.removeEventListener("scroll",le),q.removeEventListener("resize",le)})}}},[ye,de,K])}var Tt=b(48736);function tt(ye,de,K,xe,Se,$,P,fe){var he=E.useRef(ye);he.current=ye;var q=E.useRef(!1);E.useEffect(function(){if(de&&xe&&(!Se||$)){var le=function(){q.current=!1},Pe=function(ft){var Xe;he.current&&!P(((Xe=ft.composedPath)===null||Xe===void 0||(Xe=Xe.call(ft))===null||Xe===void 0?void 0:Xe[0])||ft.target)&&!q.current&&fe(!1)},Ae=J(xe);Ae.addEventListener("pointerdown",le,!0),Ae.addEventListener("mousedown",Pe,!0),Ae.addEventListener("contextmenu",Pe,!0);var Ne=(0,o.A)(K);if(Ne&&(Ne.addEventListener("mousedown",Pe,!0),Ne.addEventListener("contextmenu",Pe,!0)),0)var Te,He,Ke,Ze;return function(){Ae.removeEventListener("pointerdown",le,!0),Ae.removeEventListener("mousedown",Pe,!0),Ae.removeEventListener("contextmenu",Pe,!0),Ne&&(Ne.removeEventListener("mousedown",Pe,!0),Ne.removeEventListener("contextmenu",Pe,!0))}}},[de,K,xe,Se,$]);function re(){q.current=!0}return re}var It=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Qe(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:te.Z,de=E.forwardRef(function(K,xe){var Se=K.prefixCls,$=Se===void 0?"rc-trigger-popup":Se,P=K.children,fe=K.action,he=fe===void 0?"hover":fe,q=K.showAction,re=K.hideAction,le=K.popupVisible,Pe=K.defaultPopupVisible,Ae=K.onPopupVisibleChange,Ne=K.afterPopupVisibleChange,Te=K.mouseEnterDelay,He=K.mouseLeaveDelay,Ke=He===void 0?.1:He,Ze=K.focusDelay,_e=K.blurDelay,ft=K.mask,Xe=K.maskClosable,Ve=Xe===void 0?!0:Xe,Pt=K.getPopupContainer,Mt=K.forceRender,st=K.autoDestroy,Qt=K.destroyPopupOnHide,pn=K.popup,Lt=K.popupClassName,tn=K.popupStyle,ze=K.popupPlacement,ke=K.builtinPlacements,Re=ke===void 0?{}:ke,Z=K.popupAlign,ee=K.zIndex,me=K.stretch,ve=K.getPopupClassNameFromAlign,Ee=K.fresh,Me=K.alignPoint,Ye=K.onPopupClick,nt=K.onPopupAlign,_t=K.arrow,nn=K.popupMotion,ln=K.maskMotion,zt=K.popupTransitionName,Jt=K.popupAnimation,yn=K.maskTransitionName,Bn=K.maskAnimation,mn=K.className,gn=K.getTriggerDOMNode,Nt=(0,pe.Z)(K,It),wt=st||Qt||!1,qt=E.useState(!1),At=(0,ne.Z)(qt,2),Nn=At[0],Fe=At[1];(0,h.Z)(function(){Fe((0,m.Z)())},[]);var Ie=E.useRef({}),Kt=E.useContext(se),xt=E.useMemo(function(){return{registerSubPopup:function(zn,Gn){Ie.current[zn]=Gn,Kt==null||Kt.registerSubPopup(zn,Gn)}}},[Kt]),Zt=(0,C.Z)(),Ht=E.useState(null),yt=(0,ne.Z)(Ht,2),Rt=yt[0],sn=yt[1],Ut=E.useRef(null),Gt=(0,y.Z)(function(Sn){Ut.current=Sn,(0,Q.Sh)(Sn)&&Rt!==Sn&&sn(Sn),Kt==null||Kt.registerSubPopup(Zt,Sn)}),Vt=E.useState(null),rn=(0,ne.Z)(Vt,2),Ft=rn[0],De=rn[1],Ce=E.useRef(null),ct=(0,y.Z)(function(Sn){(0,Q.Sh)(Sn)&&Ft!==Sn&&(De(Sn),Ce.current=Sn)}),at=E.Children.only(P),Ot=(at==null?void 0:at.props)||{},Wt={},jt=(0,y.Z)(function(Sn){var zn,Gn,Dr=Ft;return(Dr==null?void 0:Dr.contains(Sn))||((zn=(0,o.A)(Dr))===null||zn===void 0?void 0:zn.host)===Sn||Sn===Dr||(Rt==null?void 0:Rt.contains(Sn))||((Gn=(0,o.A)(Rt))===null||Gn===void 0?void 0:Gn.host)===Sn||Sn===Rt||Object.values(Ie.current).some(function(Rr){return(Rr==null?void 0:Rr.contains(Sn))||Sn===Rr})}),on=V($,nn,Jt,zt),_n=V($,ln,Bn,yn),un=E.useState(Pe||!1),Wn=(0,ne.Z)(un,2),An=Wn[0],wn=Wn[1],Mn=le!=null?le:An,Ln=(0,y.Z)(function(Sn){le===void 0&&wn(Sn)});(0,h.Z)(function(){wn(le||!1)},[le]);var jn=E.useRef(Mn);jn.current=Mn;var Tn=E.useRef([]);Tn.current=[];var Rn=(0,y.Z)(function(Sn){var zn;Ln(Sn),((zn=Tn.current[Tn.current.length-1])!==null&&zn!==void 0?zn:Mn)!==Sn&&(Tn.current.push(Sn),Ae==null||Ae(Sn))}),an=E.useRef(),hn=function(){clearTimeout(an.current)},En=function(zn){var Gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;hn(),Gn===0?Rn(zn):an.current=setTimeout(function(){Rn(zn)},Gn*1e3)};E.useEffect(function(){return hn},[]);var Yn=E.useState(!1),kn=(0,ne.Z)(Yn,2),$n=kn[0],Ar=kn[1];(0,h.Z)(function(Sn){(!Sn||Mn)&&Ar(!0)},[Mn]);var ge=E.useState(null),We=(0,ne.Z)(ge,2),Ue=We[0],et=We[1],ot=E.useState(null),lt=(0,ne.Z)(ot,2),Bt=lt[0],Ct=lt[1],gt=function(zn){Ct([zn.clientX,zn.clientY])},Ge=dt(Mn,Rt,Me&&Bt!==null?Bt:Ft,ze,Re,Z,nt),qe=(0,ne.Z)(Ge,11),ut=qe[0],mt=qe[1],St=qe[2],Yt=qe[3],vn=qe[4],cn=qe[5],Dn=qe[6],Vn=qe[7],Pn=qe[8],qn=qe[9],xn=qe[10],mr=Be(Nn,he,q,re),Jn=(0,ne.Z)(mr,2),dr=Jn[0],Qn=Jn[1],tr=dr.has("click"),gr=Qn.has("click")||Qn.has("contextMenu"),dn=(0,y.Z)(function(){$n||xn()}),fr=function(){jn.current&&Me&&gr&&En(!1)};be(Mn,Ft,Rt,dn,fr),(0,h.Z)(function(){dn()},[Bt,ze]),(0,h.Z)(function(){Mn&&!(Re!=null&&Re[ze])&&dn()},[JSON.stringify(Z)]);var Hn=E.useMemo(function(){var Sn=N(Re,$,qn,Me);return f()(Sn,ve==null?void 0:ve(qn))},[qn,ve,Re,$,Me]);E.useImperativeHandle(xe,function(){return{nativeElement:Ce.current,popupElement:Ut.current,forceAlign:dn}});var bn=E.useState(0),On=(0,ne.Z)(bn,2),nr=On[0],hr=On[1],lr=E.useState(0),In=(0,ne.Z)(lr,2),Pr=In[0],zr=In[1],Kr=function(){if(me&&Ft){var zn=Ft.getBoundingClientRect();hr(zn.width),zr(zn.height)}},ei=function(){Kr(),dn()},Jr=function(zn){Ar(!1),xn(),Ne==null||Ne(zn)},Vr=function(){return new Promise(function(zn){Kr(),et(function(){return zn})})};(0,h.Z)(function(){Ue&&(xn(),Ue(),et(null))},[Ue]);function _r(Sn,zn,Gn,Dr){Wt[Sn]=function(Rr){var Br;Dr==null||Dr(Rr),En(zn,Gn);for(var oi=arguments.length,ni=new Array(oi>1?oi-1:0),Xr=1;Xr<oi;Xr++)ni[Xr-1]=arguments[Xr];(Br=Ot[Sn])===null||Br===void 0||Br.call.apply(Br,[Ot,Rr].concat(ni))}}(tr||gr)&&(Wt.onClick=function(Sn){var zn;jn.current&&gr?En(!1):!jn.current&&tr&&(gt(Sn),En(!0));for(var Gn=arguments.length,Dr=new Array(Gn>1?Gn-1:0),Rr=1;Rr<Gn;Rr++)Dr[Rr-1]=arguments[Rr];(zn=Ot.onClick)===null||zn===void 0||zn.call.apply(zn,[Ot,Sn].concat(Dr))});var wr=tt(Mn,gr,Ft,Rt,ft,Ve,jt,En),Nr=dr.has("hover"),Er=Qn.has("hover"),yr,br;Nr&&(_r("onMouseEnter",!0,Te,function(Sn){gt(Sn)}),_r("onPointerEnter",!0,Te,function(Sn){gt(Sn)}),yr=function(zn){(Mn||$n)&&Rt!==null&&Rt!==void 0&&Rt.contains(zn.target)&&En(!0,Te)},Me&&(Wt.onMouseMove=function(Sn){var zn;(zn=Ot.onMouseMove)===null||zn===void 0||zn.call(Ot,Sn)})),Er&&(_r("onMouseLeave",!1,Ke),_r("onPointerLeave",!1,Ke),br=function(){En(!1,Ke)}),dr.has("focus")&&_r("onFocus",!0,Ze),Qn.has("focus")&&_r("onBlur",!1,_e),dr.has("contextMenu")&&(Wt.onContextMenu=function(Sn){var zn;jn.current&&Qn.has("contextMenu")?En(!1):(gt(Sn),En(!0)),Sn.preventDefault();for(var Gn=arguments.length,Dr=new Array(Gn>1?Gn-1:0),Rr=1;Rr<Gn;Rr++)Dr[Rr-1]=arguments[Rr];(zn=Ot.onContextMenu)===null||zn===void 0||zn.call.apply(zn,[Ot,Sn].concat(Dr))}),mn&&(Wt.className=f()(Ot.className,mn));var Cn=E.useRef(!1);Cn.current||(Cn.current=Mt||Mn||$n);var rr=(0,x.Z)((0,x.Z)({},Ot),Wt),ir={},sr=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];sr.forEach(function(Sn){Nt[Sn]&&(ir[Sn]=function(){for(var zn,Gn=arguments.length,Dr=new Array(Gn),Rr=0;Rr<Gn;Rr++)Dr[Rr]=arguments[Rr];(zn=rr[Sn])===null||zn===void 0||zn.call.apply(zn,[rr].concat(Dr)),Nt[Sn].apply(Nt,Dr)})});var er=E.cloneElement(at,(0,x.Z)((0,x.Z)({},rr),ir)),vr={x:cn,y:Dn},Wr=_t?(0,x.Z)({},_t!==!0?_t:{}):null;return E.createElement(E.Fragment,null,E.createElement(oe.Z,{disabled:!Mn,ref:ct,onResize:ei},E.createElement(Y,{getTriggerDOMNode:gn},er)),Cn.current&&E.createElement(se.Provider,{value:xt},E.createElement(W,{portal:ye,ref:Gt,prefixCls:$,popup:pn,className:f()(Lt,Hn),style:tn,target:Ft,onMouseEnter:yr,onMouseLeave:br,onPointerEnter:yr,zIndex:ee,open:Mn,keepDom:$n,fresh:Ee,onClick:Ye,onPointerDownCapture:wr,mask:ft,motion:on,maskMotion:_n,onVisibleChanged:Jr,onPrepare:Vr,forceRender:Mt,autoDestroy:wt,getPopupContainer:Pt,align:qn,arrow:Wr,arrowPos:vr,ready:ut,offsetX:mt,offsetY:St,offsetR:Yt,offsetB:vn,onAlign:dn,stretch:me,targetWidth:nr/Vn,targetHeight:Pr/Pn})))});return de}var $e=Qe(te.Z)},84236:function(fn,je,b){"use strict";b.d(je,{t:function(){return h}});var x=b(59301),ne=b(99571),pe={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},te=b(92310),M=b.n(te),f=Object.defineProperty,oe=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,y=(m,E,S)=>E in m?f(m,E,{enumerable:!0,configurable:!0,writable:!0,value:S}):m[E]=S,C=(m,E)=>{for(var S in E||(E={}))Q.call(E,S)&&y(m,S,E[S]);if(oe)for(var S of oe(E))o.call(E,S)&&y(m,S,E[S]);return m};const h=({cancelText:m="\u53D6\u6D88",okText:E="\u786E\u5B9A",loading:S=!1,hasOkBtn:I=!0,hasCancelBtn:B=!0,okButtonProps:G={},onCancel:R=()=>{},onOk:O=()=>{},className:D=""})=>x.createElement("div",{className:M()(pe.buttonFixed,D)},x.createElement("div",{className:pe.buttonWrap},B&&x.createElement(ne.ZP,{size:"middle",className:`${pe.button} mr20`,onClick:R},m),I&&x.createElement(ne.ZP,C({size:"middle",type:"primary",className:`${pe.button} mr20`,loading:S,onClick:O},G),E)))},57884:function(fn,je,b){"use strict";var x=b(59301),ne=b(93314),pe=b(99571),te=Object.defineProperty,M=Object.defineProperties,f=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,y=(E,S,I)=>S in E?te(E,S,{enumerable:!0,configurable:!0,writable:!0,value:I}):E[S]=I,C=(E,S)=>{for(var I in S||(S={}))Q.call(S,I)&&y(E,I,S[I]);if(oe)for(var I of oe(S))o.call(S,I)&&y(E,I,S[I]);return E},h=(E,S)=>M(E,f(S));const m=({img:E,buttonProps:S={},styles:I={},customText:B,ButtonText:G,ButtonClick:R,Buttonclass:O,ButtonTwo:D,imgStyles:A,loading:W=!1,className:X=""})=>x.createElement("section",{className:`tc animated fadeIn ${X}`,style:C({color:"#999",margin:"100px auto",visibility:W?"hidden":"visible"},I)},x.createElement("img",{src:E||ne,style:h(C({},A),{pointerEvents:"none",userSelect:"none"})}),x.createElement("p",{className:"mt20 font14"},B||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),G&&x.createElement(pe.ZP,C({className:O,onClick:R},S),G),D&&D);je.Z=m},41550:function(fn,je,b){"use strict";b.d(je,{Z:function(){return O}});var x=b(59301),ne={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},pe=b(99571),te=b(70557),M=b(51124),f=b(25399),oe=b(49661),Q=b(72664),o=b(57884),y=b(90524),C=b(14794),h=b(59301),m=Object.defineProperty,E=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,B=(D,A,W)=>A in D?m(D,A,{enumerable:!0,configurable:!0,writable:!0,value:W}):D[A]=W,G=(D,A)=>{for(var W in A||(A={}))S.call(A,W)&&B(D,W,A[W]);if(E)for(var W of E(A))I.call(A,W)&&B(D,W,A[W]);return D},R=(D,A,W)=>new Promise((X,Y)=>{var L=Be=>{try{ae(W.next(Be))}catch(U){Y(U)}},se=Be=>{try{ae(W.throw(Be))}catch(U){Y(U)}},ae=Be=>Be.done?X(Be.value):Promise.resolve(Be.value).then(L,se);ae((W=W.apply(D,A)).next())}),O=({editOffice:D="view",data:A,issaver:W,onSaver:X,theme:Y,type:L,filename:se,monacoEditor:ae,className:Be,style:U,close:k,onClose:N,hasMask:V,disabledDownload:J,onImgDimensions:H,showNodata:v,recordInfo:g})=>{const[F,ie]=(0,x.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[ue,Le]=(0,x.useState)(""),[Je,rt]=(0,x.useState)(),dt=window.ENV==="build"?"/react/build":"",vt=location.host.startsWith("localhost")?y.Z.PROXY_SERVER:y.Z.API_SERVER,Tt=10*(1024*1024),tt=(0,x.useRef)();A!=null&&A.startsWith("/api")&&L!=="txt"&&(A=y.Z.API_SERVER+A);const It=K=>K.substring(K.lastIndexOf("/")+1).split(".").pop();se&&ae&&(ae.filename=se),(0,x.useEffect)(()=>{var K,xe;const Se=(xe=(K=document.cookie)==null?void 0:K.replace(/\s/g,""))==null?void 0:xe.split(";");Se==null||Se.map($=>{let P=$.split("=");P[0]==="_educoder_session"&&Le(P[1])})},[]),(0,x.useEffect)(()=>{L==="office"&&(A.indexOf("bigfilescdn.")>-1||A.indexOf("bigfiles1")>-1?rt({url:A,fileType:It(A),model:A.indexOf("model=edit")?"edit":"view"}):$e())},[L,A]);function Qe(K){return R(this,null,function*(){K.data.type==="pdfdata"&&(X(K.data.data),window.removeEventListener("message",Qe,!1)),console.log("mess---:",K.data)})}const $e=()=>R(void 0,null,function*(){console.log("data:",A);let K=A;A.startsWith("http")||(K=location.origin+K);let xe=new URL(K).pathname.split("/").pop();const Se=yield(0,Q.gJ)({attachment_id:xe});Se.url=vt+Se.url,rt(Se)}),ye=()=>{if(A.startsWith("http")||A.startsWith("blob:")){de();return}(0,oe.Sv)(se||"educoder",A,se)},de=()=>{g&&(0,C.fc)({id:g==null?void 0:g.id,watch_type:1,course_id:g==null?void 0:g.course_id}),(0,oe.Nd)(se||"educoder",decodeURIComponent(A))};return h.createElement("div",{style:G({},U||{}),className:`${V&&ne.bgBlack} ${L?ne.wrp:"hide"}`},k&&h.createElement("div",{className:ne.close,ref:tt},!!H&&h.createElement(f.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>tt.current},h.createElement("span",{onClick:()=>{N(),H()}},h.createElement("i",{className:"icon-yulanpizhu"}))),!J&&h.createElement(f.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>tt.current},h.createElement("span",{onClick:de},h.createElement("i",{className:"icon-quxiaozhiding"}))),W&&h.createElement(f.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>tt.current},h.createElement("span",{className:"",onClick:()=>{const K=document.getElementById("pdfiframe");window.addEventListener("message",Qe,!1),setTimeout(()=>{K.contentWindow.postMessage("getData","*")},300)}},h.createElement("i",{className:"icon-baocun"}))),h.createElement(f.Z,{title:"\u5173\u95ED",getPopupContainer:()=>tt.current},h.createElement("span",{className:"",onClick:()=>{N()}},h.createElement("i",{className:"icon-guanbi1"})))),h.createElement("div",{className:`${ne[Be]} ${Be} ${ne.monaco} ${L==="txt"?"show":"hide"}`},L==="txt"&&h.createElement(h.Fragment,null,h.createElement(M.ZP,G({},ae)))),L==="audio"&&h.createElement("audio",{src:`${(A==null?void 0:A.indexOf("http://"))>-1||(A==null?void 0:A.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${A}`,autoPlay:!0}),L==="video"&&h.createElement(h.Fragment,null,(A==null?void 0:A.indexOf("http"))>-1?h.createElement("video",{controls:!0,src:`${A}`,autoPlay:!0}):h.createElement("video",{controls:!0,src:`data:video/mp4;base64,${A}`,autoPlay:!0})),L==="office"&&Je&&h.createElement("iframe",{src:`${dt}/office.html?key=${Je.key}&url=${btoa(Je.url)}&callbackUrl=${vt+(Je.callbackUrl||"")}&fileType=${Je.fileType}&title=${Je.title||""}&model=${D}&officeServer=${y.Z.ONLYOFFICE}&disabledDownload=${!!J}`}),L==="html"&&h.createElement("iframe",{src:A+"&disposition=inline"}),L==="pdf"&&h.createElement("iframe",{id:"pdfiframe",src:`${dt}/js/pdfview/index.html?filename=${se||"educoder.pdf"}&url=${encodeURIComponent(A)}&disabledDownload=${!!J}&model=${D}`}),L==="image"&&h.createElement("img",{src:`${(A==null?void 0:A.indexOf("http://"))>-1||(A==null?void 0:A.indexOf("https://"))>-1?"":"data:image/png;base64,"}${A}`}),(L==="other"||L==="download")&&h.createElement(h.Fragment,null,v?h.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:h.createElement(pe.ZP,{icon:h.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ye,disabled:J},"\u4E0B\u8F7D")}):h.createElement(pe.ZP,{type:"primary",size:"middle",onClick:ye,disabled:J},h.createElement(te.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),L==="flowChart"&&h.createElement("div",{className:"embed"},h.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${A||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(fn,je,b){"use strict";b.d(je,{z:function(){return ae},Z:function(){return Be}});var x=b(59301),ne=b(88831),pe=b(90290),te=b(64018),M=b(68535),f=b(90524),oe=b(49661),Q=b(15342),o=b(77736),y=b(99571),C=b(1012),h=b(41550),m=b(59301),S=({html:U})=>{const k=(0,x.useRef)(null),N=(0,x.useRef)(null),V=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,x.useEffect)(()=>{const J=k.current.attachShadow({mode:"open"});N.current=document.createElement("div"),N.current.className="markdown-body",N.current.innerHTML=U,J.appendChild(N.current);const H=document.createElement("style");return H.textContent=V,J.appendChild(H),()=>{J.innerHTML=""}},[]),(0,x.useEffect)(()=>{N.current&&(N.current.innerHTML=U)},[U]),m.createElement("div",{ref:k})};function I(U){const k=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],N=new RegExp(`\\b(${k.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return U.replace(N,"").trim()}var B={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},G=Object.defineProperty,R=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,A=(U,k,N)=>k in U?G(U,k,{enumerable:!0,configurable:!0,writable:!0,value:N}):U[k]=N,W=(U,k)=>{for(var N in k||(k={}))O.call(k,N)&&A(U,N,k[N]);if(R)for(var N of R(k))D.call(k,N)&&A(U,N,k[N]);return U};const X="@\u2581\u2581@",Y="@\u2581@",L=/<pre[^>]*>/g;function se(U){let k=document.createElement("div");return k.innerHTML=U,k.childNodes.length===0?"":k.childNodes[0].nodeValue}const ae=(U,k)=>{U=U||"";const N=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,V=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,J=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,H=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return k?U.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(N,(v,g,F,ie,ue,Le,Je)=>{const rt=g||ie||Le,dt=F||ue||Je||"?";return f.Z.API_SERVER+"/api/attachments/"+rt+dt+"&t="+(0,oe.Jn)(rt,Date.now())+(v.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(U=U.replace(H,(v,g,F,ie,ue,Le,Je)=>{const rt=g||ie||Le,dt=F||ue||Je||"?";return f.Z.API_SERVER+"/attachments/download/"+rt+dt+"&t="+(0,oe.Jn)(rt,Date.now())+(v.indexOf(")")>-1?")":"&")}).replace(N,(v,g,F,ie,ue,Le,Je)=>{const rt=g||ie||Le,dt=F||ue||Je||"?";return f.Z.API_SERVER+"/api/attachments/"+rt+dt+"&t="+(0,oe.Jn)(rt,Date.now())+(v.indexOf(")")>-1?")":"&")}).replace(V,(v,g,F,ie,ue)=>{const Le=g||ie,Je=F||ue||"";return'"'+f.Z.API_SERVER+"/api/attachments/"+Le+Je+Le+Je+"&t="+(0,oe.Jn)(Le,Date.now())}).replace(J,(v,g,F,ie,ue)=>{const Le=g||ie,Je=F||ue||"";return"("+f.Z.API_SERVER+"/files/uploads/"+Le+Je+Le+Je+"&t="+(0,oe.Jn)(Le,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),U)};var Be=({value:U="",edit:k=!1,className:N,showTextOnly:V,showLines:J,style:H={},stylesPrev:v={},highlightKeywords:g,showProgramFill:F,isProgramFill:ie,disabledFill:ue=!1,programFillValue:Le,openEditor:Je=()=>{},onFillChange:rt=be=>{},onFillBlur:dt=()=>{},onFillFocus:vt=()=>{}})=>{let be=I(String(U||""));const Tt=(0,x.useRef)(),tt=(0,x.useRef)(),[It,Qe]=(0,x.useState)(""),[$e,ye]=(0,x.useState)("office"),[de,K]=(0,x.useState)([]),xe=(0,x.useRef)("a"+(0,C.Z)()),Se={},$=_e=>/<style[\s\S]*?>/i.test(_e||""),P=(_e,ft,Xe)=>{const Ve=document.createElement(_e===Y?"input":"textarea");Ve.style.width="100%",Ve.style.height=_e===Y?"40px":"151px",Ve.rows=5,Ve.spellcheck=!1,Ve.name="edu-program-fill",Ve.placeholder="\u8BF7\u8F93\u5165",Ve.dataset.id=ft;const Pt=Object.keys(Se).length;return Se[Pt]=Ve,`<span class="edu-program-fill-wrap ${_e===Y?"":"show"}" style="width:${_e===Y?"600px":"100%"}" title=${Xe||""}><span>${Ve.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function fe(_e){return _e=_e.replace(/!\[.*?\]\(.*?\)/g,""),_e=_e.replace(/\[.*?\]\(.*?\)/g,""),_e=_e.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),_e=_e.replace(/<embed.*?>/g,""),_e=_e.replace(/<img.*?>/g,""),_e=_e.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),_e=_e.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),_e=_e.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),_e=_e.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),_e}const he=_e=>!V&&$(be)?_e:_e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(ft,Xe){let Ve=Xe.replace(/(\n|\r)/g,"").split("}"),Pt=[];return Ve.map(Mt=>{Mt!=""&&Pt.push(`.${xe.current} ${Mt}`)}),`<style>${Pt.join("}")}</style>`}),q=(0,x.useMemo)(()=>{try{const Ve=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Pt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Mt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,st=/\(\/attachments\/download\//g;be=be.replace(st,"("+f.Z.API_SERVER+"/attachments/download/").replace(Ve,"("+f.Z.API_SERVER+"/api/attachments/").replace(Pt,'"'+f.Z.API_SERVER+"/api/attachments/").replace(Mt,'"'+f.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Tt.current.style.display="none"}catch(Ve){}if(F){let Ve=-1;return be=be.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Pt,Mt,st){var Qt;return++Ve,P(Pt,Ve,(Qt=Le==null?void 0:Le[Ve])==null?void 0:Qt.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${he(be||"")}</pre>`}let _e=he(be);_e=(0,pe.ZP)(_e);const ft=(0,pe.ez)();be.match(/\[TOC\]/)&&(_e=_e.replace("<p>[TOC]</p>",(0,pe.Qv)()),(0,pe.Iy)()),_e=_e.replace(/(__special_katext_id_\d+__)/g,(Ve,Pt)=>{const{type:Mt,expression:st}=ft[Pt];return(0,Q.renderToString)(se(st)||"",{displayMode:Mt==="block",throwOnError:!1,output:"html"})}),_e=_e.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,pe.AL)();const Xe=document.createElement("div");if(Xe.innerHTML=_e,V)return Xe.innerText;if(g){const Ve=g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ae(Xe,Ve),Xe.innerHTML}return setTimeout(()=>He(),500),Xe.innerHTML},[be,g]);(0,x.useEffect)(()=>{Ne.current&&Ne.current.querySelectorAll(["input","textarea"]).forEach(ft=>{ft.oninput=re,ft.onblur=le,ft.onfocus=Pe})},[de]),(0,x.useEffect)(()=>{var _e,ft,Xe,Ve,Pt;if(Le!=null&&Le.length)try{const Mt=Ne.current.querySelectorAll(".edu-program-fill-score"),st=Ne.current.querySelectorAll('[name="edu-program-fill"]');for(const[Qt,pn]of st.entries())pn.value=((_e=Le==null?void 0:Le[Qt])==null?void 0:_e.value)||"",((ft=Le==null?void 0:Le[Qt])==null?void 0:ft.type)==="warning"?pn.className="program-fill-warning":((Xe=Le==null?void 0:Le[Qt])==null?void 0:Xe.type)==="success"?pn.className="program-fill-success":pn.className="";for(const[Qt,pn]of Mt.entries())pn.innerHTML=(Ve=Le==null?void 0:Le[Qt])!=null&&Ve.score?`${(Pt=Le==null?void 0:Le[Qt])==null?void 0:Pt.score}\u5206`:"";K(Le)}catch(Mt){console.log(Mt,"error")}},[Le]);const re=_e=>{de[_e.target.dataset.id]=de[_e.target.dataset.id]||{},de[_e.target.dataset.id].value=_e.target.value,K([...de]),rt(de,_e.target.dataset.id)},le=_e=>{de[_e.target.dataset.id]=de[_e.target.dataset.id]||{},de[_e.target.dataset.id].value=_e.target.value,K([...de]),dt(de,_e.target.dataset.id)},Pe=_e=>{de[_e.target.dataset.id]=de[_e.target.dataset.id]||{},de[_e.target.dataset.id].value=_e.target.value,K([...de]),vt(de,_e.target.dataset.id)};function Ae(_e,ft){return _e.childNodes.forEach(Xe=>{var Ve;if(Xe.childNodes.length>0)Ae(Xe,ft);else if(Xe.nodeName!=="IMG")if(Xe.innerHTML)Xe.innerHTML=(Ve=Xe.innerHTML)==null?void 0:Ve.replace(new RegExp(ft,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Pt=document.createElement("span");Pt.innerHTML=Xe.textContent.replace(new RegExp(ft,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Xe.replaceWith(Pt)}})}const Ne=(0,x.useRef)();pe.jb.WebkitLineClamp=J,J&&(H=W(W({},H),pe.jb));function Te(_e){let ft=_e.target;if(ft.tagName.toUpperCase()==="A"){let Xe=ft.getAttribute("href");if(Xe.indexOf("office")>-1)_e.preventDefault(),Qe(Xe),ye("office");else if(Xe.indexOf("application/pdf")>-1)_e.preventDefault(),Qe(Xe),ye("pdf");else if(Xe.indexOf("text/html")>-1)_e.preventDefault(),Qe(Xe),ye("html");else if(Xe.startsWith("#")){_e.preventDefault();let Ve=document.getElementById(Xe.replace("#",""));Ve&&Ve.scrollIntoView(!0)}}}const He=()=>{var _e;const ft=(_e=Ne.current)==null?void 0:_e.querySelectorAll("video");ft==null||ft.forEach(Xe=>{if(Xe.oncontextmenu=()=>!1,Xe.src.indexOf(".m3u8")>-1&&!Xe.canPlayType("application/vnd.apple.mpegurl")){if(M.ZP.isSupported()){var Ve=new M.ZP;Ve.loadSource(Xe.src),Ve.attachMedia(Xe)}}})};(0,x.useEffect)(()=>{if(Ne.current&&q&&q.match(L)&&window.PR.prettyPrint(),Ne.current)return Ne.current.addEventListener("click",Te),()=>{var _e;(_e=Ne.current)==null||_e.removeEventListener("click",Te),(0,pe.AL)(),(0,pe.Iy)()}},[q,Ne.current,Te]);const Ke=_e=>{_e.target.nodeName==="IMG"&&_e.target.className.indexOf("draw-flowchart")>-1?(Tt.current.style.zIndex=1,Tt.current.style.display="flex",Tt.current.style.width=_e.target.clientWidth+"px",Tt.current.style.height=_e.target.clientHeight+"px",Tt.current.style.top=_e.target.offsetTop+"px",Tt.current.style.left=_e.target.offsetLeft+"px",_e.target.id&&(tt.current=_e.target.id)):Tt.current.style.display="none"},Ze=()=>{Tt.current.style.display="none"};return(0,x.useEffect)(()=>{var _e;const ft=Xe=>{Xe.preventDefault(),Xe.clipboardData.setData("text",window.getSelection().toString())};return(_e=Ne.current)==null||_e.addEventListener("copy",ft),()=>{var Xe;(Xe=Ne.current)==null||Xe.removeEventListener("copy",ft)}},[Ne.current]),x.createElement("div",{style:{position:"relative"},onMouseLeave:Ze},V&&x.createElement("div",{ref:Ne,className:`${B.mdBody} `},q),!V&&!$(q)&&x.createElement("div",{ref:Ne,style:W({},H),onMouseOver:Ke,className:`${N||""} ${ue?"disabled-fill":""} markdown-body ${B.mdBody} ${xe.current}`,dangerouslySetInnerHTML:{__html:q}}),!V&&$(q)&&x.createElement(S,{html:q}),x.createElement("div",{ref:Tt,className:`${B.button} ${k?"":B.previewFlowChart}`},x.createElement(o.Z,null,x.createElement(y.ZP,{onClick:()=>{k?Je(tt.current):(Qe(tt.current),ye("flowChart"))}},k?"\u7F16\u8F91":"\u9884\u89C8"))),x.createElement(h.Z,{close:!0,data:It,type:It!=null&&It.length?$e:"",style:W({},v),onClose:()=>Qe("")}))}},51124:function(fn,je,b){"use strict";b.d(je,{SV:function(){return Tt},ZP:function(){return be}});var x=b(59301),ne=b(76374);const pe={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},te={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},M={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},f={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},oe={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
`)}]};var Q=b(53184),o=b.n(Q),y=(tt,It,Qe)=>new Promise(($e,ye)=>{var de=Se=>{try{xe(Qe.next(Se))}catch($){ye($)}},K=Se=>{try{xe(Qe.throw(Se))}catch($){ye($)}},xe=Se=>Se.done?$e(Se.value):Promise.resolve(Se.value).then(de,K);xe((Qe=Qe.apply(tt,It)).next())});const C={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},h=(tt,It,Qe,$e)=>{const ye=It.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Qe.lineNumber,endColumn:Qe.column});return Array.from(new Set(ye.match(/\b\w{2,}\b/g)||[])).map(K=>({label:K,kind:tt.languages.CompletionItemKind.Text,insertText:K,range:$e}))},m=(tt,It,Qe,$e)=>{tt.languages.registerCompletionItemProvider(It,{provideCompletionItems(ye,de){const K=ye.getWordUntilPosition(de),xe={startLineNumber:de.lineNumber,endLineNumber:de.lineNumber,startColumn:K.startColumn,endColumn:K.endColumn},Se=ye.getLineContent(de.lineNumber).substring(K.startColumn-2,K.endColumn);return{suggestions:[...h(tt,ye,de,xe),...Qe.map(P=>({label:P,kind:tt.languages.CompletionItemKind.Keyword,documentation:P,insertText:P,insertTextRules:tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xe})),...$e.map(P=>({label:P.label,kind:tt.languages.CompletionItemKind.Snippet,documentation:P.content,insertText:Se.startsWith("#")?P.content.replace(/#/,""):P.content,insertTextRules:tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xe}))]}}})};var E=tt=>{C.languages.forEach(It=>{tt.languages.registerDocumentFormattingEditProvider(It,{provideDocumentFormattingEdits(Qe){return y(this,null,function*(){const $e=o()(Qe.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Qe.getFullModelRange(),text:$e}]})}})}),m(tt,"java",te.keywords,te.quickKey),m(tt,"cpp",M.keywords,M.quickKey),m(tt,"c",pe.keywords,[]),m(tt,"python",f.keywords,f.quickKey),m(tt,"scala",oe.keywords,oe.quickKey)};const S="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var I=Object.defineProperty,B=(tt,It,Qe)=>It in tt?I(tt,It,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):tt[It]=Qe,G=(tt,It,Qe)=>B(tt,typeof It!="symbol"?It+"":It,Qe);const R=class Rl{constructor(It,Qe,$e){this.placeholder=It,this.editor=Qe,this.monaco=$e,Qe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Rl.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};G(R,"ID","editor.widget.placeholderHint");var D=R,A=b(96236),W=b(6767),X=b(25399),Y=b(89392),L=b(33796),se=b(56102),ae=Object.defineProperty,Be=Object.defineProperties,U=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,J=(tt,It,Qe)=>It in tt?ae(tt,It,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):tt[It]=Qe,H=(tt,It)=>{for(var Qe in It||(It={}))N.call(It,Qe)&&J(tt,Qe,It[Qe]);if(k)for(var Qe of k(It))V.call(It,Qe)&&J(tt,Qe,It[Qe]);return tt},v=(tt,It)=>Be(tt,U(It)),g=(tt,It)=>{var Qe={};for(var $e in tt)N.call(tt,$e)&&It.indexOf($e)<0&&(Qe[$e]=tt[$e]);if(tt!=null&&k)for(var $e of k(tt))It.indexOf($e)<0&&V.call(tt,$e)&&(Qe[$e]=tt[$e]);return Qe},F=(tt,It,Qe)=>new Promise(($e,ye)=>{var de=Se=>{try{xe(Qe.next(Se))}catch($){ye($)}},K=Se=>{try{xe(Qe.throw(Se))}catch($){ye($)}},xe=Se=>Se.done?$e(Se.value):Promise.resolve(Se.value).then(de,K);xe((Qe=Qe.apply(tt,It)).next())});function ie(tt){return/^\d+$/.test(tt)?`${tt}px`:tt}function ue(){}let Le=!1;const Je={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function rt(tt=[]){let It=tt;if(Array.isArray(tt)){for(let Qe=0;Qe<tt.length;Qe++){let $e=Je[tt[Qe]];if($e)return $e}return It[0]}return Je[It]||It}let dt=null;const vt=()=>F(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(tt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",tt)}});var be=tt=>{var It=tt,{width:Qe="100%",height:$e="100%",value:ye,language:de="javascript",style:K={},options:xe={},overrideServices:Se={},theme:$="vs-dark",onEditBlur:P,isCopy:fe=!1,onSave:he,autoHeight:q=!1,forbidCopy:re=!1,onChange:le=ue,editorDidMount:Pe=ue,onFocus:Ae=ue,onBreakPoint:Ne=ue,breakPointValue:Te=[],filename:He="educoder.txt",errorLine:Ke,errorContent:Ze="",highlightLine:_e,openBreakPoint:ft=!1,placeholder:Xe="",showMiniMap:Ve=!0}=It,Pt=g(It,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Mt=(0,x.useRef)(),st=(0,x.useRef)({}),Qt=(0,x.useRef)(),pn=(0,x.useRef)(),Lt=(0,x.useRef)([]),tn=(0,x.useRef)(!1),ze=(0,x.useRef)(),ke=(0,x.useRef)(),Re=(0,x.useRef)(!1),[Z,ee]=(0,x.useState)(!1);function me(){let Nt;return Mt.current&&(Nt=new ne.Z(wt=>{for(let qt of wt)(qt.target.offsetHeight>0||qt.target.offsetWidth>0)&&st.current.instance.layout()}),Nt.observe(Mt.current)),Nt}function ve(){W.ZP.warning({content:decodeURIComponent(S),key:"monaco-editor-tip"})}const Ee=()=>{let Nt=st.current.instance;if(ye!=null&&Nt&&Z){const wt=Nt.getModel();wt&&ye!==wt.getValue()&&(Le=!0,wt.setValue(ye),Nt.layout(),Le=!1)}};(0,x.useEffect)(()=>{const Nt=L.Z.subscribe("formatDocument",wt=>{var qt;let At=st.current.instance;(qt=At==null?void 0:At.getAction)==null||qt.call(At,"editor.action.formatDocument").run()});return window.updateMonacoValue=wt=>{le(wt)},Nt},[]),(0,x.useEffect)(()=>{var Nt;let wt=st.current.instance;pn.current&&clearTimeout(pn.current),pn.current=setTimeout(()=>{Ee()},500),ye&&(ye!=null&&ye.length)&&((Nt=wt==null?void 0:wt.updateOptions)==null||Nt.call(wt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ye.split(/\r\n|\r|\n/g).length))+3,5)}))},[ye,Z,st.current]),(0,x.useEffect)(()=>{if(Ke&&st.current&&st.current.instance){let wt=st.current.instance;wt.changeViewZones(function(qt){var At=document.createElement("div");At.style.padding="10px 20px",At.style.width="calc(100% - 20px)",At.className="my-error-line-wrp",At.innerHTML=Ze,qt.addZone({afterLineNumber:Ke||11,heightInLines:3,domNode:At})});var Nt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};wt.addOverlayWidget(Nt),wt.revealPositionInCenter({lineNumber:20,column:1})}},[Ke,st.current,Z]);const Me=(Nt="",wt)=>{if(!Nt||Nt.trim()==="")return!0;const At=st.current.instance.getModel().getLineTokens(wt);let Nn=!1;for(let Fe=0;Fe<2;Fe++)At.getStandardTokenType(Fe)===1&&(Nn=!0);return Nn};(0,x.useEffect)(()=>{var Nt;const wt=(Nt=st.current)==null?void 0:Nt.instance;if(wt&&Z&&re){const qt=wt.onDidBlurEditorWidget(()=>{Re.current=!1}),At=wt.onDidFocusEditorText(()=>{Re.current=!0});return()=>{qt.dispose(),At.dispose()}}},[st.current,Z,re]),(0,x.useEffect)(()=>{var Nt;if((Nt=st.current)!=null&&Nt.instance&&Z&&ft){let wt=st.current.instance,qt=wt.getModel();if(!qt)return;(()=>{var Ut;let Gt=[],Vt=[];const rn=qt.getAllDecorations();for(let De of rn)De.options.className==="highlighted-line"&&(Gt.push((Ut=De==null?void 0:De.range)==null?void 0:Ut.startLineNumber),Vt.push(De==null?void 0:De.id));if(_e===Gt[0])return;qt.deltaDecorations(Vt,[]);const Ft=qt.getLineCount();_e&&_e<=Ft&&(wt.deltaDecorations([],[{range:new dt.Range(_e,1,_e,qt.getLineMaxColumn(_e)),options:{isWholeLine:!0,className:"highlighted-line"}}]),wt.revealLineInCenter(_e))})();const Nn=(Ut=!1)=>{var Gt;let Vt=[],rn=[];const Ft=qt.getAllDecorations();for(let De of Ft)De.options.linesDecorationsClassName==="breakpoints-select"&&(Vt.push((Gt=De==null?void 0:De.range)==null?void 0:Gt.startLineNumber),rn.push(De==null?void 0:De.id));if(Ut)return{lines:Vt,ids:rn};Ne(Vt)},Fe=Ut=>F(void 0,null,function*(){let Gt={range:new dt.Range(Ut,1,Ut,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield qt.deltaDecorations([],[Gt]),Nn()}),Ie=Ut=>F(void 0,null,function*(){let Gt=[];const Vt=wt.getLineDecorations(Ut);for(let rn of Vt)rn.options.linesDecorationsClassName==="breakpoints-select"&&Gt.push(rn.id);yield qt.deltaDecorations(Gt,[]),Nn()}),Kt=Ut=>{let Gt=wt.getLineDecorations(Ut);for(let Vt of Gt)if(Vt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Y.isEqual)(Te,Nn(!0).lines)){qt.deltaDecorations(Nn(!0).ids,[]);const Ut=Te.map(Gt=>({range:new dt.Range(Gt,1,Gt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));qt.deltaDecorations([],Ut)}const xt=wt.onDidChangeModelContent(Ut=>{let Gt=wt.getPosition();if(Gt){let Vt=Gt.lineNumber;clearTimeout(ke.current),ke.current=setTimeout(()=>{Me(qt.getLineContent(Vt),Vt)?Ie(Vt):Kt(Vt)?(Ie(Vt),Fe(Vt)):Nn()},100)}}),Zt=wt.onMouseDown(Ut=>{var Gt,Vt,rn;if(Ut.target.detail&&((rn=(Vt=(Gt=Ut.target)==null?void 0:Gt.element)==null?void 0:Vt.className)!=null&&rn.includes("line-numbers"))){let Ft=Ut.target.position.lineNumber;if(Me(qt.getLineContent(Ft),Ft))return;Kt(Ft)?Ie(Ft):Fe(Ft)}}),Ht=Ut=>{let Gt={range:new dt.Range(Ut,1,Ut,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Lt.current=wt.deltaDecorations(Lt.current,[Gt])},yt=()=>{Lt.current=wt.deltaDecorations(Lt.current,[])},Rt=wt.onMouseMove(Ut=>{var Gt,Vt,rn;if(yt(),Ut.target.detail&&((rn=(Vt=(Gt=Ut.target)==null?void 0:Gt.element)==null?void 0:Vt.className)!=null&&rn.includes("line-numbers"))){let Ft=Ut.target.position.lineNumber;if(Me(qt.getLineContent(Ft),Ft))return;Ht(Ft)}}),sn=wt.onMouseLeave(()=>{yt()});return()=>{xt.dispose(),Zt.dispose(),Rt.dispose(),sn.dispose()}}},[st.current,Z,Te,_e,ft,de]),(0,x.useEffect)(()=>{var Nt;(Nt=st.current)!=null&&Nt.instance&&ft&&st.current.instance.setPosition({lineNumber:0,column:0})},[_e]);function Ye(){let Nt=st.current.instance;if(Nt){const wt=Nt.getSelection(),qt=st.current.pastePos||{},At=new dt.Range(qt.startLineNumber||wt.endLineNumber,qt.startColumn||wt.endColumn,qt.endLineNumber||wt.endLineNumber,qt.endColumn||wt.endColumn);setTimeout(()=>{Nt.executeEdits("",[{range:At,text:""}])},300)}}function nt(Nt){(window.navigator.platform.match("Mac")?Nt.metaKey:Nt.ctrlKey)&&Nt.keyCode==83&&(Nt.preventDefault(),he())}const _t=()=>{if(q&&st.current.instance){const Nt=st.current.instance.getContentHeight();mn(Nt<$e?$e:Nt)}else mn($e)};function nn(Nt){var wt=document.createEvent("MouseEvents");wt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Nt.dispatchEvent(wt)}const ln=Nt=>{if(!Re.current)return;const{keyCode:wt,ctrlKey:qt,metaKey:At,target:Nn,type:Fe}=Nt;return(Fe==="paste"||(wt===67||wt===86)&&(At||qt))&&Nn.nodeName==="TEXTAREA"&&(ve(),Nt.preventDefault()),!1};function zt(Nt,wt){var qt=window.URL||window.webkitURL||window,At=new Blob([wt]),Nn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Nn.href=qt.createObjectURL(At),Nn.download=Nt,nn(Nn)}(0,x.useEffect)(()=>{_t()},[_t]),(0,x.useEffect)(()=>{Mt.current&&!Z&&Promise.all([b.e(8909),b.e(5028)]).then(b.bind(b,71448)).then(Nt=>{try{dt=Nt,st.current.instance=dt.editor.create(Mt.current,{value:ye,language:rt(de),theme:$,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ve||!1}},Se);const wt=st.current.instance;let Nn=[...A.BH._menuItems].find(xt=>xt[0]._debugName=="EditorContext")[1],Fe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ie=(xt,Zt)=>{var Ht,yt;let Rt=xt._first;do Zt.includes((yt=(Ht=Rt.element)==null?void 0:Ht.command)==null?void 0:yt.id)&&xt._remove(Rt);while(Rt=Rt.next)};if(Pe(wt,dt),setTimeout(()=>{_t(),st.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{zt(He||"educoder.txt",wt.getValue())}})},500),st.current.subscription=wt.onDidChangeModelContent(xt=>{tn.current?clearTimeout(ze.current):(_t(),le(wt.getValue(),xt)),ze.current=setTimeout(()=>{tn.current=!1},500)}),window.Monaco||E(dt,rt(de)),re&&(Ie(Nn,Fe),Mt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",ln),window.removeEventListener("paste",ln),window.addEventListener("keydown",ln),window.addEventListener("paste",ln)),window.Monaco=dt,P&&wt.onDidBlurEditorWidget(()=>{P(wt.getValue())}),Ae&&wt.onDidFocusEditorText(()=>{re&&vt(),Ae(wt.getValue())}),re){vt();try{wt.onDidPaste(xt=>{const Zt=wt.getSelection(),Ht=st.current.pastePos||{},yt=new dt.Range(Ht.startLineNumber||Zt.endLineNumber,Ht.startColumn||Zt.endColumn,Ht.endLineNumber||Zt.endLineNumber,Ht.endColumn||Zt.endColumn);wt.executeEdits("",[{range:xt.range,text:""}])})}catch(xt){}}let Kt=me();return Xe&&typeof Xe=="string"&&new D(Xe,wt,dt),ee(!0),()=>{const xt=st.current.instance;xt.dispose();const Zt=xt.getModel();Zt&&Zt.dispose(),st.current.subscription&&st.current.subscription.dispose(),Kt.unobserve(Mt.current)}}catch(wt){}})},[]),(0,x.useEffect)(()=>{if(st.current.instance&&Z)return document.addEventListener("keydown",nt,!1),()=>{document.removeEventListener("keydown",nt)}},[he,Z]),(0,x.useEffect)(()=>{let Nt=st.current.instance;if(Nt&&Z){let wt=rt(de);dt.editor.setModelLanguage(Nt.getModel(),wt)}},[de,Z]),(0,x.useEffect)(()=>{st.current.instance&&Z&&dt.editor.setTheme($)},[$,Z]),(0,x.useEffect)(()=>{let Nt=st.current.instance;Qt.current=xe,Nt&&Z&&(Nt.updateOptions(H({},xe)),setTimeout(()=>{Nt.getModel().updateOptions(H({},xe))},200))},[JSON.stringify(xe),Z]),(0,x.useEffect)(()=>{let Nt=st.current.instance;Nt&&Z&&Nt.layout()},[Qe,$e,Z]);const[Jt,yn]=(0,x.useState)(ie(Qe)),[Bn,mn]=(0,x.useState)(ie($e)),gn=v(H({},K),{width:Jt,height:Bn,position:"relative"});return x.createElement("div",{className:"my-monaco-editor",ref:Mt,style:gn},fe&&x.createElement(se.CopyToClipboard,{text:ye,onCopy:()=>W.ZP.success("\u590D\u5236\u6210\u529F")},x.createElement(X.Z,{title:"\u590D\u5236\u4EE3\u7801"},x.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},x.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Tt({width:tt="100%",height:It="100%",original:Qe,modified:$e,language:ye,options:de={}}){const K=(0,x.useRef)(),[xe,Se]=(0,x.useState)(null);function $(q){let re;return K.current&&(re=new ne.Z(le=>{for(let Pe of le)(Pe.target.offsetHeight>0||Pe.target.offsetWidth>0)&&q.layout()}),re.observe(K.current)),re}(0,x.useEffect)(()=>(K.current&&Promise.all([b.e(8909),b.e(9404)]).then(b.bind(b,2550)).then(q=>{dt=q;const re=dt.editor.createDiffEditor(K.current,v(H({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},de),{wordWrap:!0}));Se(re);let le=$(re);return()=>{re.dispose();const Pe=re.getModel();Pe&&Pe.dispose(),le.unobserve(K.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,x.useEffect)(()=>{xe&&xe.setModel({original:dt.editor.createModel(Qe,ye),modified:dt.editor.createModel($e,ye)})},[Qe,$e,ye,xe]);const P=ie(tt),fe=ie(It),he={width:P,height:fe};return x.createElement("div",{className:"my-diff-editor",ref:K,style:he})}},929:function(fn,je,b){"use strict";b.d(je,{Z:function(){return h}});var x={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf",wrapisCurrent:"wrapisCurrent___qIfQT"},ne=b(29787),pe=b(25399),te=b(60242),M=b(92310),f=b.n(M),oe=b(49661),Q=b(57884),o=b(34055),y=b(59301),h=({className:m,dataSource:E=[],col:S=4,right:I,bottom:B=23,precision:G=0,wrapWidth:R=1200,trackEventItems:O,loading:D,onRemove:A=()=>{},isCurrent:W=!0,showProgress:X=!1,showAlias:Y=!1})=>{const L=Math.floor((R-(S-1)*I)/S),se=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return y.createElement(ne.Z,{spinning:D},y.createElement("div",{className:f()(x.list,m)},!!(E!=null&&E.length)&&(E==null?void 0:E.map((ae,Be)=>{var U,k,N,V,J,H;const{name:v,id:g,identifier:F,featured:ie,school_name:ue,image_url:Le,excellent:Je,is_plan:rt}=ae;return y.createElement("div",{key:g,className:W&&X?x.wrapisCurrent:x.wrap,style:{width:L,marginRight:(1+Be)%S===0?0:I+G,marginBottom:B}},y.createElement("a",{className:x.li,onClick:dt=>{dt.preventDefault(),dt.stopPropagation(),O&&(0,oe.L9)([O]),(0,oe.xg)(`/paths/${F}`)}},y.createElement("div",{className:x.img},y.createElement("img",{className:x.cover,src:`${Le}`}),W&&(0,o.bg)()&&(ae==null?void 0:ae.studying)&&y.createElement("div",{className:`${x.movebq} user-path-items`,onClick:dt=>{dt.stopPropagation(),A(ae)}},y.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),y.createElement("span",{className:"c-red"},"\u79FB\u9664")),(U=ae==null?void 0:ae.subject_tags)==null?void 0:U.map((dt,vt)=>{var be,Tt;if(vt===0){const It=(be=se.find(Qe=>Qe.name==dt))==null?void 0:be.swimg;return y.createElement("img",{className:x.sign,src:It,style:{left:"-4px"}})}const tt=(Tt=se.find(It=>It.name==dt))==null?void 0:Tt.ptimg;return y.createElement("img",{className:x.sign,src:tt,style:{left:`${48+52*(vt-1)+2*vt}px`}})}),y.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(ae==null?void 0:ae.excellent)&&y.createElement("div",{className:x.bq},"\u5F00\u653E\u8BFE\u7A0B"))),y.createElement("div",{className:x.name},y.createElement(pe.Z,{title:Y&&(ae!=null&&ae.excellent_alias_name)?y.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${v}`,y.createElement("br",null),y.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${ae==null?void 0:ae.excellent_alias_name}`)):v},y.createElement("span",{className:x.e},Y&&(ae==null?void 0:ae.excellent_alias_name)||v))),W&&X&&((k=ae==null?void 0:ae.progress)==null?void 0:k.all_score)!=0&&y.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},y.createElement(te.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((N=ae==null?void 0:ae.progress)==null?void 0:N.my_score)/((V=ae==null?void 0:ae.progress)==null?void 0:V.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(J=ae==null?void 0:ae.progress)==null?void 0:J.my_score,"/",(H=ae==null?void 0:ae.progress)==null?void 0:H.all_score),(!W||!X)&&y.createElement(pe.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ue}`},y.createElement("div",{className:x.unit},y.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ue)),(!W||!X)&&y.createElement("div",{className:x.tags},y.createElement("div",null,y.createElement(pe.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},y.createElement("span",null,y.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),y.createElement("span",null,ae.stages_count))),y.createElement(pe.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},y.createElement("span",null,y.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),y.createElement("span",null,ae.members_count)))))))})),!E.length&&y.createElement(Q.Z,null)))}},71360:function(fn,je,b){"use strict";b.d(je,{jL:function(){return M},w9:function(){return ie},QD:function(){return Ke},cQ:function(){return J.Z},op:function(){return le},O5:function(){return Ee},_b:function(){return Pt},t7:function(){return G},Gi:function(){return vt},YG:function(){return rt},qp:function(){return C},vr:function(){return ft},qE:function(){return Ne},Je:function(){return D},wb:function(){return V},cq:function(){return $e},tp:function(){return E}});var x=b(59301),ne={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},pe="data:image/png;base64,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",M=({dataSource:Me=[],img:Ye,imgWidth:nt=346,title:_t,sunTitle:nn,bannerExtraContent:ln})=>x.createElement("div",{className:ne.banner},x.createElement("div",{className:ne.content},x.createElement("aside",null,x.createElement("p",null,x.createElement("b",null,_t),x.createElement("span",null,nn)),Me.length>0&&x.createElement("div",{className:ne.btns},Me.map((zt,Jt)=>x.createElement("div",{key:Jt,onClick:zt.click},zt.name,zt.sign?x.createElement("img",{src:pe,width:39}):null))),ln),Ye&&x.createElement("img",{style:{marginTop:33,marginRight:38},src:Ye,width:nt}))),f={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},oe=b(92310),Q=b.n(oe),o=b(89392),C=({dataSource:Me=[],value:Ye,onChange:nt,onTitleChange:_t,className:nn,title:ln,titleWidth:zt=41,style:Jt={},fontColor:yn="#6A7283",showCount:Bn})=>{const[mn,gn]=(0,x.useState)(0),[Nt,wt]=(0,x.useState)(!1),qt=(0,x.useRef)(null),At=(0,x.useRef)(null);return(0,x.useEffect)(()=>{var Nn;Me.length!==0&&(((Nn=qt==null?void 0:qt.current)==null?void 0:Nn.clientHeight)>97?gn(1):gn(0)),Me.length===0&&gn(0),wt(!1)},[Me]),x.createElement("div",{className:Q()(f.row,nn),style:Jt},x.createElement("div",{onClick:(0,o.throttle)(()=>_t==null?void 0:_t(),2e3),style:{width:zt,marginTop:Nt?12:4},className:`${f.title} ${_t?"current":""}`},ln),x.createElement("div",{className:Nt?`${f.tagsWrap} ${f.tagsBorderWrap}`:f.tagsWrap},x.createElement("div",{className:f.bar,ref:At,style:mn>0?{height:mn===1?97:"auto",overflow:mn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},x.createElement("div",{className:f.tag,ref:qt},Me==null?void 0:Me.map(Nn=>x.createElement("span",{onClick:()=>nt(Nn.id),key:Nn.id,style:{color:yn},className:Ye===Nn.id?f.active:""},x.createElement("span",{title:Nn.name,className:f.name},Nn.name),!!Bn&&x.createElement("span",{className:f.num},Nn.count))))),!!mn&&x.createElement(x.Fragment,null,mn===1?x.createElement("div",{onClick:()=>{var Nn;gn(2),((Nn=qt==null?void 0:qt.current)==null?void 0:Nn.clientHeight)>245?wt(!0):wt(!1)},className:f.action},"\u5C55\u5F00",x.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):x.createElement("div",{onClick:()=>{At.current.scrollTop=0,gn(1),wt(!1)},className:f.action},"\u6536\u8D77",x.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},h={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},E=({dataSource:Me=[],value:Ye,onChange:nt,className:_t,style:nn={}})=>x.createElement("div",{style:nn,className:Q()(h.tabs,_t)},Me.map(ln=>x.createElement("span",{onClick:()=>nt(ln.id),className:Ye===ln.id?h.active:"",key:ln.id},ln.name))),S={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},I=b(37568),G=({dataSource:Me=[],value:Ye="",onChange:nt,onInputChange:_t=()=>{},className:nn,style:ln={},placeholder:zt,allowClear:Jt=!1})=>{var yn;const[Bn,mn]=(0,x.useState)(""),[gn,Nt]=(0,x.useState)("");(0,x.useEffect)(()=>{var At;let Nn=Ye;(At=JSON.stringify(Ye))!=null&&At.includes("{")&&(mn(Ye.id),Nn=Ye.value||"");try{Nt(decodeURIComponent(Nn||""))}catch(Fe){Nt(decodeURIComponent(Nn||""))}},[Ye]);const wt=()=>{nt(encodeURIComponent(gn),Bn||null)},qt=At=>{At!==Bn&&(mn(At),nt(encodeURIComponent(gn),At))};return x.createElement("div",{className:Q()(S.input,nn),style:ln},!!Me.length&&x.createElement("div",{className:S.dropdown},x.createElement("div",{className:S.text},(yn=Me.find(At=>At.id===Bn))==null?void 0:yn.name,x.createElement("i",{className:"iconfont icon-zhankai4"}),x.createElement("b",{className:S.b1}),x.createElement("b",{className:S.b2})),x.createElement("div",{className:S.menu},Me.map((At,Nn)=>x.createElement("div",{key:Nn,onClick:()=>qt(At.id)},At.name)))),x.createElement(I.default,{onPressEnter:wt,value:gn,onChange:At=>{Nt(At.target.value),_t(encodeURIComponent(At.target.value),Bn||null)},placeholder:zt,variant:"borderless",allowClear:Jt,onClear:()=>nt("",Bn||null)}),x.createElement("i",{onClick:wt,className:"iconfont icon-sousuo9 font14 current"}))},R={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},D=({value:Me,onChange:Ye,className:nt,total:_t,pageSize:nn,style:ln={}})=>{const zt=Me<2,Jt=Me>=Math.ceil(_t/nn);return _t<=nn?x.createElement(x.Fragment,null):x.createElement("div",{className:Q()(R.quickPager,nt),style:ln},x.createElement("div",{onClick:()=>{zt||Ye(Me-1,"prev")},className:zt?R.disabled:""},"\u4E0A\u4E00\u9875"),x.createElement("div",{onClick:()=>{Jt||Ye(Me+1,"next")},className:Jt?R.disabled:""},"\u4E0B\u4E00\u9875"))},A={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},W=b(29787),X=b(25399),Y=b(58018),L=b(90524),se=b(49661),ae=b(96908),Be=b(57177),U=b(81378),k=b(57884),V=({className:Me,dataSource:Ye=[],col:nt=4,right:_t,bottom:nn=23,precision:ln=0,wrapWidth:zt=1200,trackEventItems:Jt,loading:yn})=>{const Bn=Math.floor((zt-(nt-1)*_t)/nt);return x.createElement(W.Z,{spinning:yn},x.createElement("div",{className:Q()(A.list,Me)},!!Ye.length&&Ye.map((mn,gn)=>{const{name:Nt,id:wt,identifier:qt,power:At,cover_image_id:Nn,pic:Fe}=mn;return x.createElement("div",{className:A.wrap,key:wt,style:{width:Bn,marginRight:(1+gn)%nt===0?0:_t+ln,marginBottom:nn}},x.createElement("a",{target:"_blank",href:`/shixuns/${qt}/challenges`,className:A.li,onClick:Ie=>{Ie.preventDefault(),Jt&&(0,se.L9)([Jt]),At&&(0,se.xg)(`/shixuns/${qt}/challenges`)}},x.createElement("div",{className:A.img},x.createElement("img",{className:A.cover,src:`${Fe}`}),mn.is_jupyter&&x.createElement("img",{className:A.sign,src:ae}),mn.is_jupyter_lab&&x.createElement("img",{className:A.sign,src:Be}),mn.is_unity_3d&&x.createElement("img",{className:A.sign,src:U})),x.createElement("div",{className:A.name},x.createElement(X.Z,{title:Nt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},x.createElement("span",{className:A.e},Nt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),x.createElement("div",{className:A.tags},x.createElement(X.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},x.createElement("span",null,x.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),x.createElement("span",null,mn.challenges_count))),!!mn.myshixuns_count&&x.createElement(X.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},x.createElement("span",null,x.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),x.createElement("span",null,mn.myshixuns_count))),x.createElement(X.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},x.createElement("span",null,x.createElement("span",null,mn.level))),x.createElement("div",{className:A.rate},x.createElement(Y.Z,{allowHalf:!0,disabled:!0,defaultValue:mn.score_info}),x.createElement("span",null,"\xA0",mn.score_info?`${mn.score_info}\u5206`:"5\u5206")))),!At&&x.createElement("div",{className:A.lockWrap},x.createElement("img",{src:`${L.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),x.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Ye.length&&x.createElement(k.Z,null)))},J=b(929),H={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},v="data:image/png;base64,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",g=b(59301),ie=({className:Me,dataSource:Ye=[],col:nt=4,right:_t,bottom:nn=23,precision:ln=0,wrapWidth:zt=1200,trackEventItems:Jt,loading:yn,handleVery:Bn=()=>!0})=>{const mn=Math.floor((zt-(nt-1)*_t)/nt);return g.createElement(W.Z,{spinning:yn},g.createElement("div",{className:Q()(H.list,Me)},!!Ye.length&&Ye.map((gn,Nt)=>{const{subject_identifier:wt,id:qt,identifier:At,power:Nn}=gn,Fe=gn.is_public!=0&&gn.is_public;return g.createElement("div",{className:H.wrap,key:qt,style:{width:mn,marginRight:(1+Nt)%nt===0?0:_t+ln,marginBottom:nn}},g.createElement("a",{className:H.li,onClick:Ie=>{Ie.preventDefault(),Bn(gn==null?void 0:gn.first_category_url)&&(Jt&&(0,se.L9)([Jt]),(0,se.xg)(gn.first_category_url))}},g.createElement("div",{className:H.top},g.createElement(X.Z,{title:gn.name},g.createElement("div",{className:H.name},gn.name)),g.createElement("img",{className:H.img,src:L.Z.IMG_SERVER+"/images/"+gn.avatar_url}),g.createElement("div",{className:H.text,title:gn.creator},gn.creator),wt&&g.createElement("div",{className:H.btns},g.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),g.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Fe&&g.createElement("div",{className:H.sign},"\u516C\u5F00")),g.createElement("div",{className:H.bottom},gn.visits>0&&g.createElement(X.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},g.createElement("span",null,g.createElement("i",{className:"iconfont icon-liulanyan"}),g.createElement("span",null,gn.visits))),gn.course_members_count>0&&g.createElement(X.Z,{title:"\u6210\u5458",placement:"bottom"},g.createElement("span",null,g.createElement("i",{className:"iconfont icon-chengyuan"}),gn.course_members_count)),gn.tasks_count>0&&g.createElement(X.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},g.createElement("span",null,g.createElement("i",{className:"iconfont icon-zuoye"}),gn.tasks_count)),gn.is_end?g.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):g.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!gn.is_accessible&&g.createElement("div",{className:H.lockWrap},g.createElement("img",{src:`${L.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),g.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Ye.length&&g.createElement(k.Z,null)))},ue={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Le=b(76560),rt=({dataSource:Me=[],value:Ye,onChange:nt,className:_t,style:nn={},tabBarExtraContent:ln})=>x.createElement("div",{className:Q()(ue.tabs,_t),style:nn},x.createElement("div",{className:ue.tabsWrap},Me.map((zt,Jt)=>!(zt!=null&&zt.hide)&&x.createElement("aside",{className:ue.tab,onClick:()=>{nt(zt.id),zt.link&&Le.history.push(zt.link)},key:Jt},x.createElement("div",{className:Ye===zt.id?ue.active:""},zt.name),(zt==null?void 0:zt.resetCount)==null&&(zt==null?void 0:zt.total)!==void 0&&x.createElement("span",null,"\uFF08",zt==null?void 0:zt.total,"\uFF09"),(zt==null?void 0:zt.resetCount)!==void 0&&(zt==null?void 0:zt.total)!==void 0&&x.createElement(X.Z,{title:(zt==null?void 0:zt.tip)!=null?zt==null?void 0:zt.tip:""},x.createElement("span",{style:{color:"#9096A3"}},"\uFF08",x.createElement("span",{style:{color:"#000"}},zt==null?void 0:zt.resetCount),"/",x.createElement("span",null,zt==null?void 0:zt.total),"\uFF09"))))),x.createElement("div",{className:ue.tabBar},ln)),vt=({className:Me,style:Ye={},children:nt})=>x.createElement("div",{className:Q()(Me),style:Ye},nt),be={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},Tt=b(75727),tt=b(93041);const It=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var $e=({sortValue:Me,dropValue:Ye,className:nt,onSort:_t,onDrop:nn,dataSource:ln=It})=>{var zt;return x.createElement("div",{className:Q()(be.orderWrap,nt)},x.createElement(Tt.Z,{dropdownRender:()=>x.createElement(tt.default,null,ln.map((Jt,yn)=>x.createElement(tt.default.Item,{key:yn,onClick:()=>nn(Jt.id)},Jt.name)))},x.createElement("span",{className:be.orderTextWrap},(zt=ln.find(Jt=>Ye===Jt.id))==null?void 0:zt.name)),x.createElement("span",{className:be.orderIconWrap},x.createElement("span",{className:be.orderAsc},x.createElement("i",{className:Me==="asc"?`iconfont icon-sanjiaoxing-up font12 ${be.cursorPointer} ${be.active}`:`iconfont icon-sanjiaoxing-up font12 ${be.cursorPointer}`,onClick:()=>_t(Me==="asc"?"desc":"asc")})),x.createElement("span",{className:be.orderDesc},x.createElement("i",{className:Me==="desc"?`iconfont icon-sanjiaoxing-down font12 ${be.cursorPointer} ${be.active}`:`iconfont icon-sanjiaoxing-down font12 ${be.cursorPointer}`,onClick:()=>_t(Me==="asc"?"desc":"asc")}))))},ye={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},de=b(99571),K=Object.defineProperty,xe=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,P=(Me,Ye,nt)=>Ye in Me?K(Me,Ye,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Me[Ye]=nt,fe=(Me,Ye)=>{for(var nt in Ye||(Ye={}))Se.call(Ye,nt)&&P(Me,nt,Ye[nt]);if(xe)for(var nt of xe(Ye))$.call(Ye,nt)&&P(Me,nt,Ye[nt]);return Me},he=(Me,Ye)=>{var nt={};for(var _t in Me)Se.call(Me,_t)&&Ye.indexOf(_t)<0&&(nt[_t]=Me[_t]);if(Me!=null&&xe)for(var _t of xe(Me))Ye.indexOf(_t)<0&&$.call(Me,_t)&&(nt[_t]=Me[_t]);return nt},q=(Me,Ye,nt)=>new Promise((_t,nn)=>{var ln=yn=>{try{Jt(nt.next(yn))}catch(Bn){nn(Bn)}},zt=yn=>{try{Jt(nt.throw(yn))}catch(Bn){nn(Bn)}},Jt=yn=>yn.done?_t(yn.value):Promise.resolve(yn.value).then(ln,zt);Jt((nt=nt.apply(Me,Ye)).next())}),le=Me=>{var Ye=Me,{className:nt,style:_t,children:nn,loading:ln=!1,openLoading:zt,onClick:Jt=()=>{},size:yn="middle",shape:Bn="round"}=Ye,mn=he(Ye,["className","style","children","loading","openLoading","onClick","size","shape"]);const[gn,Nt]=(0,x.useState)(!1);return x.createElement(de.ZP,fe({onClick:(0,o.throttle)(wt=>q(void 0,null,function*(){zt&&Nt(!0);try{yield Jt(wt)}catch(qt){console.log("error",qt)}zt&&Nt(!1)}),2e3,{leading:!0,trailing:!1}),className:Q()(ye.btn,ye[`${yn}-${Bn}`],nt),style:_t,size:yn,shape:Bn,loading:gn||ln},mn),nn)},Pe={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Ne=({className:Me,style:Ye,children:nt=null,onClick:_t,title:nn})=>x.createElement("div",{className:Q()(Pe.head,Me),style:Ye},x.createElement("span",{className:"primary-hover",onClick:_t},x.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),x.createElement("b",{title:nn},nn),x.createElement("div",{className:Pe.node},nt)),Te={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Ke=({confirmShow:Me=!0,confirmTitle:Ye,confirmClick:nt,cancelShow:_t=!0,cancelTitle:nn,cancelClick:ln,className:zt,style:Jt,confirmLoading:yn=!1})=>x.createElement("div",{className:Q()(Te.btns,zt),style:Jt},Me&&x.createElement(de.ZP,{loading:yn,onClick:nt,type:"primary",className:Te.confirm},Ye),_t&&x.createElement(de.ZP,{onClick:ln,className:Te.cancel},nn)),Ze={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},ft=({className:Me,style:Ye={},LeftContent:nt,children:_t,RightContent:nn})=>x.createElement("div",{className:Q()(Ze.fixedBottom,Me),style:Ye},x.createElement("div",{className:Ze.wrap},x.createElement("div",{className:Ze.left},nt),x.createElement("div",{className:Ze.center},_t),x.createElement("div",{className:Ze.right},nn))),Xe={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Pt=({className:Me,style:Ye={},dataSource:nt=[]})=>x.createElement("div",{className:Q()(Xe.crumbs,Me),style:Ye},nt.map((_t,nn)=>nn<nt.length-1?x.createElement(x.Fragment,{key:nn},_t.path||_t.onClick?x.createElement("span",{className:Xe.hover,onClick:_t!=null&&_t.onClick?_t.onClick:()=>Le.history.push(_t.path)},_t.name):x.createElement("span",null,_t.name),x.createElement("span",null,"\xA0",">","\xA0")):x.createElement("span",{key:nn,style:{color:"#5F6368"}},_t.name))),Mt=b(11938),st=Object.defineProperty,Qt=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,Lt=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,ke=(Me,Ye,nt)=>Ye in Me?st(Me,Ye,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Me[Ye]=nt,Re=(Me,Ye)=>{for(var nt in Ye||(Ye={}))tn.call(Ye,nt)&&ke(Me,nt,Ye[nt]);if(Lt)for(var nt of Lt(Ye))ze.call(Ye,nt)&&ke(Me,nt,Ye[nt]);return Me},Z=(Me,Ye)=>Qt(Me,pn(Ye)),ee=(Me,Ye)=>{var nt={};for(var _t in Me)tn.call(Me,_t)&&Ye.indexOf(_t)<0&&(nt[_t]=Me[_t]);if(Me!=null&&Lt)for(var _t of Lt(Me))Ye.indexOf(_t)<0&&ze.call(Me,_t)&&(nt[_t]=Me[_t]);return nt};const{Countdown:me}=Mt.default;var Ee=Me=>{var Ye=Me,{onChange:nt}=Ye,_t=ee(Ye,["onChange"]);const[nn,ln]=(0,x.useState)(null);(0,x.useEffect)(()=>{typeof nn=="number"&&nn>=0&&nt(nn)},[nn]);const zt=Jt=>{const yn=Math.floor(Jt/1e3);ln(yn)};return x.createElement(me,Z(Re({},_t),{onChange:zt}))}},36755:function(fn,je,b){"use strict";b.r(je),b.d(je,{default:function(){return fe}});var x=b(76560),ne=b(59301),pe=b(91882),te=b(27812),M=b(49661),f=b(28284),oe=b(62957),Q=b(6767),o=b(60840),y=b(37568),C=b(77019),h=b(5269),m=b(47889),E=b(54172),S=b(71360),I=b(42441),B=b(30373),G=b(56656),R=b.n(G),O=b(48228),D=b.n(O),A=b(22688),W=b(84236),X=b(98072),Y=b(72664),L=b(59301),se=Object.defineProperty,ae=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,V=(he,q,re)=>q in he?se(he,q,{enumerable:!0,configurable:!0,writable:!0,value:re}):he[q]=re,J=(he,q)=>{for(var re in q||(q={}))k.call(q,re)&&V(he,re,q[re]);if(U)for(var re of U(q))N.call(q,re)&&V(he,re,q[re]);return he},H=(he,q)=>ae(he,Be(q)),v=(he,q,re)=>new Promise((le,Pe)=>{var Ae=He=>{try{Te(re.next(He))}catch(Ke){Pe(Ke)}},Ne=He=>{try{Te(re.throw(He))}catch(Ke){Pe(Ke)}},Te=He=>He.done?le(He.value):Promise.resolve(He.value).then(Ae,Ne);Te((re=re.apply(he,q)).next())});R().extend(D());const g=({exercise:he,dispatch:q})=>{var re,le,Pe,Ae,Ne,Te,He,Ke,Ze,_e,ft,Xe,Ve,Pt,Mt,st,Qt,pn,Lt,tn,ze,ke,Re,Z,ee,me,ve,Ee,Me,Ye,nt,_t,nn,ln,zt,Jt,yn,Bn;const mn=(0,x.useParams)(),[gn]=(0,x.useSearchParams)(),Nt=Number(gn.get("template")),wt=gn.get("exam_summary_id")&&Number(gn.get("exam_summary_id")),[qt]=f.default.useForm(),{SumupDetail:At={}}=he,[Nn,Fe]=oe.default.useModal(),[,,Ie]=(0,X.U)(Y.p7,{}),[,Kt,xt]=(0,X.U)(Y.zP,{}),Zt=(...yt)=>v(void 0,[...yt],function*(Rt={},sn){const Ut=Nn.confirm({title:"\u63D0\u793A",centered:!0,icon:null,content:"\u5927\u6A21\u578B\u751F\u6210\u7684\u5206\u6790\u5185\u5BB9\u4E0D\u4E00\u5B9A\u5B8C\u5168\u7B26\u5408\u60A8\u7684\u5206\u6790\u9884\u671F\uFF0C\u60A8\u53EF\u4EE5\u5728\u5927\u6A21\u578B\u751F\u6210\u7684\u5185\u5BB9\u57FA\u7840\u4E0A\u8FDB\u884C\u8C03\u6574\u3002\u786E\u5B9A\u4F7F\u7528\u5927\u6A21\u578B\u751F\u6210\u5206\u6790\u5417\uFF1F",onOk:()=>v(void 0,null,function*(){var Gt;const Vt=yield Ie(Rt);(Vt==null?void 0:Vt.status)===0&&(Q.ZP.success("\u5206\u6790\u6210\u529F"),qt.setFieldValue(sn,(Gt=Vt==null?void 0:Vt.data)==null?void 0:Gt.text),Ut.destroy())})})}),Ht=()=>{x.history.push(`/classrooms/${mn==null?void 0:mn.coursesId}/exercise/${mn==null?void 0:mn.exerciseId}/sumup?${gn.toString()}`)};return(0,ne.useEffect)(()=>{At&&qt.setFieldsValue(J({},At))},[]),L.createElement("section",{className:"bg-white pt40 pb-64px pr30 pl30 flex flex-col item-center"},Fe,L.createElement("div",{className:"font30 mb40 ",style:{fontWeight:600}},At==null?void 0:At.big_title),L.createElement(o.ZP,{theme:{components:{Form:{labelColor:"#666666"},Table:{headerBg:" rgba(48,97,208,0.1)",borderColor:"transparent"}}}},L.createElement(f.default,{className:"w-full",form:qt,colon:!1,onFinish:yt=>v(void 0,null,function*(){(yield xt(H(J({},yt),{id:(mn==null?void 0:mn.categoryId)||(mn==null?void 0:mn.exerciseId),exam_summary_template_id:Nt,exam_summary_id:wt}))).status===0&&(Q.ZP.success("\u4FDD\u5B58\u6210\u529F"),Ht())})},L.createElement(f.default.Item,{label:"\u8BFE\u7A0B\u540D\u79F0",name:"course_list_name"},L.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"})),L.createElement(f.default.Item,{label:"\u8BFE\u7A0B\u7F16\u53F7",name:"course_number"},L.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u7F16\u53F7",maxLength:60,showCount:!0})),L.createElement(f.default.Item,{label:"\u5F00\u8BFE\u5355\u4F4D",name:"school_name"},L.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u5F00\u8BFE\u5355\u4F4D"})),L.createElement(f.default.Item,{label:"\u8003\u6838\u5BF9\u8C61",name:"course_group_names"}," ",At==null?void 0:At.course_group_names),L.createElement(f.default.Item,{label:"\u8003\u8BD5\u65E5\u671F",name:"exercise_start_time"}," ",R()(At==null?void 0:At.exercise_start_time).format("YYYY\u5E74MM\u6708DD\u65E5")),L.createElement(f.default.Item,{label:"\u8003\u8BD5\u5F00\u59CB-\u7ED3\u675F\u65F6\u95F4"}," ",At==null?void 0:At.exercise_time_slot),L.createElement(C.Z,{align:"middle",gutter:40},L.createElement(h.Z,null,L.createElement(f.default.Item,{label:"\u5E94\u8003\u8BD5\u4EBA\u6570",name:"candidate_num"}," ",At==null?void 0:At.candidate_num)),L.createElement(h.Z,null,L.createElement(f.default.Item,{label:"\u5B9E\u8003\u4EBA\u6570",name:"exam_num"}," ",At==null?void 0:At.exam_num))),L.createElement(f.default.Item,{label:"\u662F\u5426\u8003\u6559\u5206\u79BB",name:"is_split_exam_teaching"},L.createElement(m.ZP.Group,{options:[{value:!0,label:"\u662F"},{value:!1,label:"\u5426"}]})),L.createElement(f.default.Item,{label:"\u547D\u9898\u5F62\u5F0F",name:"set_problem_mode"},L.createElement(m.ZP.Group,{options:[{value:A.gW.PROBLEM,label:"\u8BD5\u9898\u5E93"},{value:A.gW.PAPER,label:"\u8BD5\u5377\u5E93"},{value:A.gW.OTHER,label:"\u5176\u4ED6"}]})),L.createElement(f.default.Item,{label:"\u9605\u5377\u5F62\u5F0F",name:"review_paper_mode"},L.createElement(m.ZP.Group,{options:[{value:A.a2.SINGLE,label:"\u5355\u4EBA\u9605\u5377"},{value:A.a2.MULTIPLEFLOW,label:"\u591A\u4EBA\u6D41\u6C34\u4F5C\u4E1A\u9605\u5377"},{value:A.a2.MULTIPLEFIXED,label:"\u591A\u4EBA\u72EC\u7ACB\u9605\u5377"},{value:A.a2.OTHER,label:"\u5176\u4ED6"}]})),L.createElement("div",{className:"w-full pt20",style:{borderTop:"1px solid #EBEBEB"}},L.createElement("div",{className:"text-500 c-black mb10"},"\u8BD5\u9898\u7C7B\u578B\u53CA\u5176\u5206\u6570\u6BD4\u5217\uFF1A"),L.createElement("div",{className:"flex flex-col gap-10px font14 mt10 p20",style:{background:"#f9f9f9"}},L.createElement(f.default.Item,{className:"mb0",name:["exercise_questions_info","content"]},L.createElement(y.default,null)),L.createElement(f.default.Item,{hidden:!0,name:["exercise_questions_info","exercise_questions"]}),(le=(re=At==null?void 0:At.exercise_questions_info)==null?void 0:re.exercise_questions)==null?void 0:le.map((yt,Rt)=>L.createElement("div",{key:Rt},Rt+1,"\u3001",yt==null?void 0:yt.name,yt==null?void 0:yt.count,"\u9053\uFF0C\u5171",yt==null?void 0:yt.score,"\u5206\uFF0C\u5360",Math.round((yt==null?void 0:yt.rate)*1e4)/100,"%")))),L.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},L.createElement("div",{className:"text-500 c-black"},"\u8BD5\u5377\u5185\u5BB9\u5206\u6790\uFF1A"),L.createElement("div",{className:"mt10 p20",style:{paddingBottom:1,background:"#f6f7f9"}},L.createElement(f.default.Item,{name:["content_analysis","coverage"],label:L.createElement("div",{className:"w-56px",style:{textAlignLast:"justify"}},"\u8986\u76D6\u9762")},L.createElement(m.ZP.Group,{options:[{value:"wide",label:"\u5BBD"},{value:"medium",label:"\u4E2D"},{value:"narrow",label:"\u7A84"}]})),L.createElement(f.default.Item,{name:["content_analysis","difficulty"],label:L.createElement("div",{className:"w-56px",style:{textAlignLast:"justify"}},"\u96BE\u5EA6")},L.createElement(m.ZP.Group,{options:[{value:1,label:"\u96BE"},{value:2,label:"\u8F83\u96BE"},{value:3,label:"\u4E2D"},{value:4,label:"\u8F83\u6613"},{value:5,label:"\u8F83\u6613"}]})),L.createElement(f.default.Item,{name:["content_analysis","question_quantity"],label:L.createElement("div",{className:"w-56px",style:{textAlignLast:"justify"}},"\u9898\u91CF")},L.createElement(m.ZP.Group,{options:[{value:1,label:">100"},{value:2,label:"70-100"},{value:3,label:"50-70"},{value:4,label:"<50"}]})),L.createElement(f.default.Item,{name:["content_analysis","is_wrong"],label:L.createElement("div",{className:"w-56px",style:{textAlignLast:"justify"}},L.createElement("span",null,"\u6709\u65E0\u9519\u8BEF"))},L.createElement(m.ZP.Group,{options:[{value:!0,label:"\u6709"},{value:!1,label:"\u65E0"}]})))),L.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},L.createElement("div",{className:"text-500 c-black"},"\u8003\u8BD5\u7EC4\u7EC7\u60C5\u51B5\uFF1A"),L.createElement("div",{className:"mt10 p20",style:{paddingBottom:1,background:"#f6f7f9"}},L.createElement(f.default.Item,{label:"\u7EC4\u7EC7\u5F62\u5F0F",name:["organization_condition","organization_mode"]},L.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u5F62\u5F0F"})),L.createElement(f.default.Item,{label:"\u8003\u8BD5\u6279\u6B21",name:["organization_condition","exam_count"]},L.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8003\u8BD5\u6279\u6B21"})),L.createElement(f.default.Item,{label:"\u8003\u8BD5\u5F62\u5F0F",name:["organization_condition","exam_mode"]},L.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8003\u8BD5\u5F62\u5F0F"})),L.createElement(f.default.Item,{label:"\u8003\u8BD5\u7CFB\u7EDF",name:["organization_condition","exam_system"]},L.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8003\u8BD5\u7CFB\u7EDF"})),L.createElement(f.default.Item,{label:"\u662F\u5426\u5F00\u5377",name:["organization_condition","is_open_exercise"]},L.createElement(m.ZP.Group,{options:[{value:!1,label:"\u95ED\u5377\uFF0C\u4E0D\u5141\u8BB8\u643A\u5E26\u7EB8\u8D28\u6750\u6599\u548C\u4EFB\u4F55\u7535\u5B50\u8BBE\u5907"},{value:!0,label:"\u5F00\u5377\uFF0C\u5141\u8BB8\u643A\u5E26\u7EB8\u8D28\u8D44\u6599\uFF0C\u4F46\u4E0D\u5141\u8BB8\u643A\u5E26\u4EFB\u4F55\u7535\u5B50\u8BBE\u5907"}]})),L.createElement(f.default.Item,{label:"\u662F\u5426\u4E3A\u5355\u4E00\u8BD5\u5377",name:["organization_condition","is_single_exercise"]},L.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u662F\u5426\u4E3A\u5355\u4E00\u8BD5\u5377"})),L.createElement(f.default.Item,{name:["organization_condition","end_examine"]},L.createElement(y.default.TextArea,{rows:4})))),L.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},L.createElement("div",{className:"text-500 c-black"},"\u8003\u6838\u6210\u7EE9\u5206\u5E03\uFF1A"),L.createElement("div",{className:"mt10",style:{background:"#F6F7F9"}},L.createElement("div",{className:"p20",style:{background:"rgba(48,97,208,0.1)"}},L.createElement("table",{className:"w-full"},L.createElement("tr",null,[{label:"\u6700\u9AD8",children:`${((Pe=At==null?void 0:At.score_distribution)==null?void 0:Pe.max_score)||0}\u5206`},{label:"\u6700\u4F4E",children:`${((Ae=At==null?void 0:At.score_distribution)==null?void 0:Ae.min_score)||0}\u5206`},{label:"\u5E73\u5747",children:`${((Ne=At==null?void 0:At.score_distribution)==null?void 0:Ne.average_score)||0}\u5206`},{label:"\u53CA\u683C\u7387",children:`${Math.round((((Te=At==null?void 0:At.score_distribution)==null?void 0:Te.rate)||0)*1e4)/100}%`}].map((yt,Rt)=>L.createElement("td",{key:Rt,width:Rt!==3&&250},L.createElement("span",{className:"c-grey-666"},yt.label),L.createElement("span",{className:"ml10"},yt==null?void 0:yt.children)))))),L.createElement("div",{className:"flex flex-col p20"},L.createElement("table",null,[{lv:"\u7B49\u7EA7",num:"\u4EBA\u6570",scale:"\u6BD4\u4F8B"},{lv:`\u4F18\u79C0\uFF08${(Ke=(He=At==null?void 0:At.score_distribution)==null?void 0:He.best)==null?void 0:Ke.score_area}\u5206\uFF09`,num:(_e=(Ze=At==null?void 0:At.score_distribution)==null?void 0:Ze.best)==null?void 0:_e.people_count,scale:`${Math.round(((Xe=(ft=At==null?void 0:At.score_distribution)==null?void 0:ft.best)==null?void 0:Xe.rate)*1e4)/100}%`},{lv:`\u826F\u597D\uFF08${(Pt=(Ve=At==null?void 0:At.score_distribution)==null?void 0:Ve.good)==null?void 0:Pt.score_area}\u5206\uFF09`,num:(st=(Mt=At==null?void 0:At.score_distribution)==null?void 0:Mt.good)==null?void 0:st.people_count,scale:`${Math.round(((pn=(Qt=At==null?void 0:At.score_distribution)==null?void 0:Qt.good)==null?void 0:pn.rate)*1e4)/100}%`},{lv:`\u4E2D\u7B49\uFF08${(tn=(Lt=At==null?void 0:At.score_distribution)==null?void 0:Lt.middle)==null?void 0:tn.score_area}\u5206\uFF09`,num:(ke=(ze=At==null?void 0:At.score_distribution)==null?void 0:ze.middle)==null?void 0:ke.people_count,scale:`${Math.round(((Z=(Re=At==null?void 0:At.score_distribution)==null?void 0:Re.middle)==null?void 0:Z.rate)*1e4)/100}%`},{lv:`\u53CA\u683C\uFF08${(me=(ee=At==null?void 0:At.score_distribution)==null?void 0:ee.pass)==null?void 0:me.score_area}\u5206\uFF09`,num:(Ee=(ve=At==null?void 0:At.score_distribution)==null?void 0:ve.pass)==null?void 0:Ee.people_count,scale:`${Math.round(((Ye=(Me=At==null?void 0:At.score_distribution)==null?void 0:Me.pass)==null?void 0:Ye.rate)*1e4)/100}%`},{lv:`\u4E0D\u53CA\u683C\uFF08${(_t=(nt=At==null?void 0:At.score_distribution)==null?void 0:nt.fails)==null?void 0:_t.score_area}\u5206\uFF09`,num:(ln=(nn=At==null?void 0:At.score_distribution)==null?void 0:nn.fails)==null?void 0:ln.people_count,scale:`${Math.round(((Jt=(zt=At==null?void 0:At.score_distribution)==null?void 0:zt.fails)==null?void 0:Jt.rate)*1e4)/100}%`}].map((yt,Rt)=>L.createElement("tr",{key:Rt,className:`${Rt===0?"c-grey-666":""}`},L.createElement("td",{width:250},yt.lv),L.createElement("td",{width:250},yt.num),L.createElement("td",null,yt.scale))))))),L.createElement("div",{className:"w-full pt20",style:{borderTop:"1px solid #EBEBEB"}},L.createElement("div",{className:"text-500 c-black"},"\u5404\u7C7B\u9898\u578B\u5B66\u751F\u7B54\u9898\u60C5\u51B5\u5206\u6790\uFF1A"),L.createElement("div",{className:"mt10 p20",style:{background:"#f6f7f9"}},L.createElement(f.default.List,{name:["answer_analysis","exercise_questions"]},(yt,{add:Rt,remove:sn})=>L.createElement("div",{className:"flex flex-col gap-20px"},yt.map((Ut,Gt)=>L.createElement("div",{key:Ut.key},L.createElement(B.Z,{form:qt,index:Gt+1,field:Ut,ParentName:["answer_analysis","exercise_questions"]}))))),L.createElement("div",{className:"flex item-center justify-between mt10 mb10"},L.createElement("div",null,"\u7B54\u9898\u60C5\u51B5\u603B\u7ED3"),L.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var yt;Zt({exam_summary_type:1,content:(yt=At==null?void 0:At.answer_analysis)==null?void 0:yt.content_params},["answer_analysis","question_analysis"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),L.createElement(f.default.Item,{name:["answer_analysis","question_analysis"]},L.createElement(y.default.TextArea,{rows:6})))),L.createElement("div",{className:"w-full pt20",style:{borderTop:"1px solid #EBEBEB"}},L.createElement("div",{className:"text-500 c-black"},"\u5B66\u751F\u8003\u8BD5\u6210\u7EE9\u53CA\u5B66\u4E60\u60C5\u51B5\u5206\u6790\uFF1A"),L.createElement("div",{className:"mt10 p10",style:{background:"#f6f7f9"}},L.createElement("div",{className:"p10 ",style:{background:"rgba(48,97,208,0.1)"}},(yn=At==null?void 0:At.condition_analysis)==null?void 0:yn.content),L.createElement("div",{className:"mt20 pl10 pr10"},L.createElement("div",{className:"mb10"},"\u7EC8\u7ED3\u6027\u8003\u6838\u6210\u7EE9\u5206\u5E03\u56FE"),L.createElement(I.Z,{className:"bg-white",option:(()=>{var yt,Rt;const sn=[],Ut=[];return(Rt=(yt=At==null?void 0:At.condition_analysis)==null?void 0:yt.chart_1)==null||Rt.forEach(Gt=>{sn.push(Gt==null?void 0:Gt.x_axis),Ut.push(Math.round((Gt==null?void 0:Gt.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%"},xAxis:{type:"category",data:[...sn||[],"\u5F97\u5206"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},yAxis:{name:"\u6BD4\u4F8B",nameTextStyle:{color:"#666"},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:Ut,barWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}})()})),L.createElement("div",{className:"mt20 pl10 pr10"},L.createElement("div",null,"\u5404\u4E2A\u4E13\u4E1A\u73ED\u7EA7\u7684\u60C5\u51B5\u5BF9\u6BD4\u8868"),L.createElement("div",{className:"bg-white mt10 p20",style:{border:"1px solid #EBEBEB"}},L.createElement(E.default,{dataSource:((Bn=At==null?void 0:At.condition_analysis)==null?void 0:Bn.chart_2)||[],columns:[{title:"\u4E13\u4E1A",dataIndex:"exercise_group_name",align:"center"},{title:"\u4EBA\u6570",dataIndex:"exercise_group_students",align:"center"},{title:"\u5E73\u5747\u5206",dataIndex:"average_score",align:"center"},{title:"\u6700\u9AD8\u5206",dataIndex:"max_score",align:"center"},{title:"\u6700\u4F4E\u5206",dataIndex:"min_score",align:"center"}],pagination:!1,bordered:!0}))),L.createElement("div",{className:"mt20 flex item-center justify-between pl10 pr10 pb10"},L.createElement("div",null,"\u5B66\u4E60\u60C5\u51B5\u603B\u7ED3"),L.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var yt;Zt({exam_summary_type:2,content:(yt=At==null?void 0:At.condition_analysis)==null?void 0:yt.content_params},["condition_analysis","student_condition_analysis"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),L.createElement(f.default.Item,{className:"pl10 pr10",name:["condition_analysis","student_condition_analysis"]},L.createElement(y.default.TextArea,{rows:6})))),L.createElement("div",{className:"w-full pt20",style:{borderTop:"1px solid #EBEBEB"}},L.createElement("div",{className:"flex item-center justify-between mb10"},L.createElement("div",{className:"c-black text-500"},"\u5B58\u5728\u7684\u95EE\u9898\u53CA\u6539\u8FDB\u610F\u89C1\uFF1A"),L.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var yt;Zt({exam_summary_type:3,content:(yt=At==null?void 0:At.suggestion)==null?void 0:yt.content_params},["suggestion","suggestion_content"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),L.createElement("div",{className:"mt10 p20",style:{background:"#f6f7f9"}},L.createElement(f.default.Item,{name:["suggestion","suggestion_content"]},L.createElement(y.default.TextArea,{rows:6})))))),L.createElement(W.t,{okText:"\u4FDD\u5B58",okButtonProps:{loading:Kt},onCancel:()=>{Ht()},onOk:()=>{qt.submit()}}))};var F=(0,x.connect)(({exercise:he})=>({exercise:he}))(g),ie=b(38394),ue=b(59301),Le=Object.defineProperty,Je=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,Tt=(he,q,re)=>q in he?Le(he,q,{enumerable:!0,configurable:!0,writable:!0,value:re}):he[q]=re,tt=(he,q)=>{for(var re in q||(q={}))vt.call(q,re)&&Tt(he,re,q[re]);if(dt)for(var re of dt(q))be.call(q,re)&&Tt(he,re,q[re]);return he},It=(he,q)=>Je(he,rt(q)),Qe=(he,q,re)=>new Promise((le,Pe)=>{var Ae=He=>{try{Te(re.next(He))}catch(Ke){Pe(Ke)}},Ne=He=>{try{Te(re.throw(He))}catch(Ke){Pe(Ke)}},Te=He=>He.done?le(He.value):Promise.resolve(He.value).then(Ae,Ne);Te((re=re.apply(he,q)).next())});const $e=({items:he,labelClassName:q,labelStyle:re})=>ue.createElement("div",{className:"flex flex-col text-start gap-8px"},he==null?void 0:he.map((le,Pe)=>ue.createElement("div",{key:Pe,className:"flex gap-20px"},le.label&&ue.createElement("div",{className:`w-56px c-grey-666 ${q||""} ${(le==null?void 0:le.labelClassName)||""}`,style:tt(tt({textAlignLast:"justify",lineHeight:"28px"},re||{}),(le==null?void 0:le.labelStyle)||{})},le.label),(le==null?void 0:le.children)&&ue.createElement("div",null,le==null?void 0:le.children)))),ye=({data:he=[],ylabel:q="",xlabel:re="",className:le="",itemStyle:Pe={},formatter:Ae="{c}%"})=>{const Ne=(0,ne.useMemo)(()=>{const Te=[],He=[];return he==null||he.forEach(Ke=>{Te.push(Ke==null?void 0:Ke.x_axis),He.push(Ke==null?void 0:Ke.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[...Te||[],re],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:q,nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:He,barMaxWidth:"40px",itemStyle:tt({color:"#A2BEFF",borderColor:"#165DFF"},Pe),type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:Ae}}]}},[he]);return ue.createElement(I.Z,{className:le,option:Ne})},de=({form:he,index:q=1,field:re,ParentName:le=[],handleModules:Pe})=>{var Ae,Ne,Te;(typeof le=="string"||typeof le=="number")&&(le=[le]);const He=f.default.useWatch([...le,re.name],{form:he,preserve:!0});return ue.createElement(ue.Fragment,null,ue.createElement("div",{className:"text-500 c-black mb10 "},q,"\u3001",He==null?void 0:He.name),ue.createElement($e,{items:(Ae=He==null?void 0:He.items)==null?void 0:Ae.map((Ke,Ze)=>{var _e,ft;return{label:`\u7B2C${Ze+1}\u9898`,labelClassName:"w-auto",children:ue.createElement(ue.Fragment,null,ue.createElement(ie.Z,{className:"font14 c-grey-333 text-start",value:(Ke==null?void 0:Ke.question_title)||""}),((_e=Ke==null?void 0:Ke.tag_discipline_names)==null?void 0:_e.length)>0&&ue.createElement("div",null,"\u8003\u70B9\uFF1A",(ft=Ke==null?void 0:Ke.tag_discipline_names)==null?void 0:ft.join("\u3001")))}})}),ue.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u7EC8\u7ED3\u6027\u8003\u6838\u6210\u7EE9\u5206\u5E03\u56FE"),ue.createElement(ye,{className:"bg-white",data:(Ne=He==null?void 0:He.chart_1)==null?void 0:Ne.map((Ke={},Ze)=>It(tt({},Ke),{x_axis:Ze+1,y_axis:Math.round(Ke.y_axis*1e4)/100})),ylabel:"\u6B63\u786E\u7387",xlabel:"\u9898\u76EE"}),ue.createElement(ye,{className:"mt10 bg-white",data:(Te=He==null?void 0:He.chart_2)==null?void 0:Te.map((Ke={},Ze)=>It(tt({},Ke),{x_axis:Ze+1,y_axis:Math.round(Ke.y_axis*1e4)/100})),ylabel:"\u5F97\u5206\u7387",xlabel:"\u9898\u76EE",itemStyle:{color:"#2EC25B",borderColor:"#2EC25B"}}),ue.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u5177\u4F53\u5F97\u5206\u660E\u7EC6\u5982\u4E0B\u8868\u6240\u793A"),ue.createElement("div",{className:"bg-white p20 mb20"},ue.createElement(E.default,{pagination:!1,dataSource:(He==null?void 0:He.chart_3)||[],bordered:!0,columns:[{title:"\u5E8F\u53F7",dataIndex:"question_number",align:"center"},{title:"\u7B54\u9898\u4EBA\u6570",dataIndex:"answer_users_count",align:"center"},{title:"0\u5206",dataIndex:"zero_score_number",align:"center"},{title:"\u90E8\u5206\u6B63\u786E\u4EBA\u6570",dataIndex:"part_score_number",align:"center"},{title:"\u6EE1\u5206\u4EBA\u6570",children:[{title:"\u4EBA\u6570",dataIndex:"full_score_number",align:"center"},{title:"\u5360\u6BD4",dataIndex:"full_score_rate",align:"center",render:Ke=>`${Math.round(Ke*1e4)/100}%`}]},{title:"\u5E73\u5747\u5206",dataIndex:"average_score",align:"center"}]})),ue.createElement("div",{className:"flex item-center justify-between mt10 mb10"},ue.createElement("div",null,"\u5C0F\u9898\u603B\u7ED3\u5206\u6790"),ue.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{Pe({exam_summary_type:1,content:He==null?void 0:He.content_params},[...le,re.name,"question_type_conent"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),ue.createElement(f.default.Item,{className:"mb0",name:[re.name,"question_type_conent"]},ue.createElement(y.default.TextArea,{rows:6})))},K=({exercise:he,dispatch:q})=>{var re,le,Pe,Ae,Ne,Te,He,Ke,Ze,_e,ft,Xe,Ve,Pt,Mt,st,Qt,pn,Lt,tn,ze,ke,Re,Z,ee,me,ve,Ee,Me,Ye,nt,_t,nn,ln,zt,Jt,yn,Bn,mn,gn,Nt,wt,qt,At,Nn,Fe,Ie,Kt,xt,Zt,Ht,yt,Rt,sn,Ut;const Gt=(0,x.useParams)(),[Vt]=(0,x.useSearchParams)(),rn=Number(Vt.get("template")),Ft=Vt.get("exam_summary_id")&&Number(Vt.get("exam_summary_id")),[De]=f.default.useForm(),{SumupDetail:Ce={}}=he,[ct,at]=oe.default.useModal(),[,,Ot]=(0,X.U)(Y.p7,{}),[,Wt,jt]=(0,X.U)(Y.zP,{}),on=(...un)=>Qe(void 0,[...un],function*(Wn={},An){const wn=ct.confirm({title:"\u63D0\u793A",centered:!0,icon:null,content:"\u5927\u6A21\u578B\u751F\u6210\u7684\u5206\u6790\u5185\u5BB9\u4E0D\u4E00\u5B9A\u5B8C\u5168\u7B26\u5408\u60A8\u7684\u5206\u6790\u9884\u671F\uFF0C\u60A8\u53EF\u4EE5\u5728\u5927\u6A21\u578B\u751F\u6210\u7684\u5185\u5BB9\u57FA\u7840\u4E0A\u8FDB\u884C\u8C03\u6574\u3002\u786E\u5B9A\u4F7F\u7528\u5927\u6A21\u578B\u751F\u6210\u5206\u6790\u5417\uFF1F",onOk:()=>Qe(void 0,null,function*(){var Mn;const Ln=yield Ot(Wn);(Ln==null?void 0:Ln.status)===0&&(Q.ZP.success("\u5206\u6790\u6210\u529F"),De.setFieldValue(An,(Mn=Ln==null?void 0:Ln.data)==null?void 0:Mn.text),wn.destroy())})})}),_n=()=>{x.history.push(`/classrooms/${Gt==null?void 0:Gt.coursesId}/exercise/${Gt==null?void 0:Gt.exerciseId}/sumup?${Vt.toString()}`)};return(0,ne.useEffect)(()=>{Ce&&De.setFieldsValue(tt({},Ce))},[]),ue.createElement("section",{className:"bg-white pt40 pb40 pr30 pl30 flex flex-col item-center"},at,ue.createElement("div",{className:"font30 mb40 ",style:{fontWeight:600}},Ce==null?void 0:Ce.big_title),ue.createElement(o.ZP,{theme:{components:{Form:{labelColor:"#666666"},Table:{borderColor:"transparent"}}}},ue.createElement(f.default,{className:"w-full",size:"large",form:De,colon:!1,onFinish:un=>Qe(void 0,null,function*(){(yield jt(It(tt({},un),{id:(Gt==null?void 0:Gt.categoryId)||(Gt==null?void 0:Gt.exerciseId),exam_summary_template_id:rn,exam_summary_id:Ft}))).status===0&&(Q.ZP.success("\u4FDD\u5B58\u6210\u529F"),_n())})},ue.createElement(f.default.Item,{label:"\u6559\u5B66\u5B66\u671F",name:"teaching_semester"},ue.createElement(y.default,{placeholder:"\u8BF7\u8F93\u6559\u5B66\u5B66\u671F"})),ue.createElement(f.default.Item,{label:"\u8BFE\u7A0B\u540D\u79F0",name:"course_list_name"},ue.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"})),ue.createElement(f.default.Item,{label:"\u6559\u5B66\u73ED\u7EA7",name:"course_group_names"}," ",Ce==null?void 0:Ce.course_group_names),ue.createElement(f.default.Item,{label:"\u4EFB\u8BFE\u6559\u5E08",name:"exercise_creator"},ue.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u4EFB\u8BFE\u6559\u5E08"})),ue.createElement(f.default.Item,{label:"\u8003\u8BD5\u65B9\u5F0F",name:"exercise_type_number"},ue.createElement(m.ZP.Group,{options:[{value:A.k.BISHI,label:"\u7B14\u8BD5"},{value:A.k.JISHI,label:"\u673A\u8BD5"},{value:A.k.KOUSHI,label:"\u53E3\u8BD5"},{value:A.k.OTHER,label:"\u5176\u4ED6"}]})),ue.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},ue.createElement("div",{className:"text-500 c-black"},"\u8003\u6838\u6210\u7EE9\u5206\u5E03\uFF1A"),ue.createElement("div",{className:"mt10",style:{background:"#F6F7F9"}},ue.createElement("div",{className:"p20",style:{background:"rgba(48,97,208,0.1)"}},ue.createElement("table",{className:"w-full"},ue.createElement("tr",null,[{label:"\u6700\u9AD8",children:`${((re=Ce==null?void 0:Ce.score_distribution)==null?void 0:re.max_score)||0}\u5206`},{label:"\u6700\u4F4E",children:`${((le=Ce==null?void 0:Ce.score_distribution)==null?void 0:le.min_score)||0}\u5206`},{label:"\u5E73\u5747",children:`${((Pe=Ce==null?void 0:Ce.score_distribution)==null?void 0:Pe.average_score)||0}\u5206`},{label:"\u53CA\u683C\u7387",children:`${Math.round((((Ae=Ce==null?void 0:Ce.score_distribution)==null?void 0:Ae.rate)||0)*1e4)/100}%`}].map((un,Wn)=>ue.createElement("td",{key:Wn,width:Wn!==3&&250},ue.createElement("span",{className:"c-grey-666"},un.label),ue.createElement("span",{className:"ml10"},un==null?void 0:un.children)))))),ue.createElement("div",{className:"flex flex-col p20"},ue.createElement("table",null,[{lv:"\u7B49\u7EA7",num:"\u4EBA\u6570",scale:"\u6BD4\u4F8B"},{lv:`\u4F18\u79C0\uFF08${(Te=(Ne=Ce==null?void 0:Ce.score_distribution)==null?void 0:Ne.best)==null?void 0:Te.score_area}\u5206\uFF09`,num:(Ke=(He=Ce==null?void 0:Ce.score_distribution)==null?void 0:He.best)==null?void 0:Ke.people_count,scale:`${Math.round(((_e=(Ze=Ce==null?void 0:Ce.score_distribution)==null?void 0:Ze.best)==null?void 0:_e.rate)*1e4)/100}%`},{lv:`\u826F\u597D\uFF08${(Xe=(ft=Ce==null?void 0:Ce.score_distribution)==null?void 0:ft.good)==null?void 0:Xe.score_area}\u5206\uFF09`,num:(Pt=(Ve=Ce==null?void 0:Ce.score_distribution)==null?void 0:Ve.good)==null?void 0:Pt.people_count,scale:`${Math.round(((st=(Mt=Ce==null?void 0:Ce.score_distribution)==null?void 0:Mt.good)==null?void 0:st.rate)*1e4)/100}%`},{lv:`\u4E2D\u7B49\uFF08${(pn=(Qt=Ce==null?void 0:Ce.score_distribution)==null?void 0:Qt.middle)==null?void 0:pn.score_area}\u5206\uFF09`,num:(tn=(Lt=Ce==null?void 0:Ce.score_distribution)==null?void 0:Lt.middle)==null?void 0:tn.people_count,scale:`${Math.round(((ke=(ze=Ce==null?void 0:Ce.score_distribution)==null?void 0:ze.middle)==null?void 0:ke.rate)*1e4)/100}%`},{lv:`\u53CA\u683C\uFF08${(Z=(Re=Ce==null?void 0:Ce.score_distribution)==null?void 0:Re.pass)==null?void 0:Z.score_area}\u5206\uFF09`,num:(me=(ee=Ce==null?void 0:Ce.score_distribution)==null?void 0:ee.pass)==null?void 0:me.people_count,scale:`${Math.round(((Ee=(ve=Ce==null?void 0:Ce.score_distribution)==null?void 0:ve.pass)==null?void 0:Ee.rate)*1e4)/100}%`},{lv:`\u4E0D\u53CA\u683C\uFF08${(Ye=(Me=Ce==null?void 0:Ce.score_distribution)==null?void 0:Me.fails)==null?void 0:Ye.score_area}\u5206\uFF09`,num:(_t=(nt=Ce==null?void 0:Ce.score_distribution)==null?void 0:nt.fails)==null?void 0:_t.people_count,scale:`${Math.round(((ln=(nn=Ce==null?void 0:Ce.score_distribution)==null?void 0:nn.fails)==null?void 0:ln.rate)*1e4)/100}%`}].map((un,Wn)=>ue.createElement("tr",{key:Wn,className:`${Wn===0?"c-grey-666":""}`},ue.createElement("td",{width:250},un.lv),ue.createElement("td",{width:250},un.num),ue.createElement("td",null,un.scale))))),ue.createElement("div",{className:"p20",style:{paddingTop:0}},ue.createElement(ye,{className:"bg-white",data:[{x_axis:`<=${(Jt=(zt=Ce==null?void 0:Ce.score_distribution)==null?void 0:zt.fails)==null?void 0:Jt.score_area}`,y_axis:((Bn=(yn=Ce==null?void 0:Ce.score_distribution)==null?void 0:yn.fails)==null?void 0:Bn.people_count)||0},{x_axis:`${(gn=(mn=Ce==null?void 0:Ce.score_distribution)==null?void 0:mn.pass)==null?void 0:gn.score_area}`,y_axis:((wt=(Nt=Ce==null?void 0:Ce.score_distribution)==null?void 0:Nt.pass)==null?void 0:wt.people_count)||0},{x_axis:`${(At=(qt=Ce==null?void 0:Ce.score_distribution)==null?void 0:qt.middle)==null?void 0:At.score_area}`,y_axis:((Fe=(Nn=Ce==null?void 0:Ce.score_distribution)==null?void 0:Nn.middle)==null?void 0:Fe.people_count)||0},{x_axis:`${(Kt=(Ie=Ce==null?void 0:Ce.score_distribution)==null?void 0:Ie.good)==null?void 0:Kt.score_area}`,y_axis:((Zt=(xt=Ce==null?void 0:Ce.score_distribution)==null?void 0:xt.good)==null?void 0:Zt.people_count)||0},{x_axis:`${(yt=(Ht=Ce==null?void 0:Ce.score_distribution)==null?void 0:Ht.best)==null?void 0:yt.score_area}`,y_axis:((sn=(Rt=Ce==null?void 0:Ce.score_distribution)==null?void 0:Rt.best)==null?void 0:sn.people_count)||0}],ylabel:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",xlabel:"\u5206\u6570\u533A\u95F4",formatter:"{c}"})))),ue.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},ue.createElement("div",{className:"text-500 c-black"},"\u8BD5\u5377\uFF08\u6216\u8003\u6838\uFF09\u60C5\u51B5\u5206\u6790\uFF1A"),ue.createElement("div",{className:"mt10 p20",style:{background:"#f6f7f9"}},ue.createElement("div",{className:"mb10"},((Ut=Ce==null?void 0:Ce.exercise_questions_info)==null?void 0:Ut.exercise_questions_str)||""),ue.createElement(f.default.Item,{name:["exercise_questions_info","exercise_content"]},ue.createElement(y.default.TextArea,{rows:4})),ue.createElement(f.default.List,{name:["exercise_questions_info","exercise_questions"]},(un,{add:Wn,remove:An})=>ue.createElement("div",{className:"flex flex-col gap-20px"},un.map((wn,Mn)=>ue.createElement("div",{key:wn.key},ue.createElement(de,{form:De,index:Mn+1,field:wn,ParentName:["exercise_questions_info","exercise_questions"],handleModules:on}))))),ue.createElement("div",{className:"flex item-center mt10 mb10 justify-between"},ue.createElement("div",null,"\u8003\u6838\u60C5\u51B5\u603B\u7ED3"),ue.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var un;on({exam_summary_type:1,content:(un=Ce==null?void 0:Ce.condition_analysis)==null?void 0:un.content_params},["condition_analysis","student_condition_analysis"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),ue.createElement(f.default.Item,{name:["condition_analysis","student_condition_analysis"]},ue.createElement(y.default.TextArea,{rows:6})))),ue.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},ue.createElement("div",{className:"flex item-center justify-between mb10"},ue.createElement("div",{className:"c-black text-500"},"\u5B58\u5728\u7684\u95EE\u9898\u53CA\u6539\u8FDB\u610F\u89C1\uFF1A"),ue.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var un;on({exam_summary_type:3,content:(un=Ce==null?void 0:Ce.suggestion)==null?void 0:un.content_params},["suggestion","suggestion_content"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),ue.createElement("div",{className:"mt10 p20",style:{background:"#f6f7f9"}},ue.createElement(f.default.Item,{name:["suggestion","suggestion_content"]},ue.createElement(y.default.TextArea,{rows:6})))))),ue.createElement(W.t,{okText:"\u4FDD\u5B58",onCancel:()=>{_n()},okButtonProps:{loading:Wt},onOk:()=>{De.submit()}}))};var xe=(0,x.connect)(({exercise:he})=>({exercise:he}))(K),Se=b(59301),$=(he,q,re)=>new Promise((le,Pe)=>{var Ae=He=>{try{Te(re.next(He))}catch(Ke){Pe(Ke)}},Ne=He=>{try{Te(re.throw(He))}catch(Ke){Pe(Ke)}},Te=He=>He.done?le(He.value):Promise.resolve(He.value).then(Ae,Ne);Te((re=re.apply(he,q)).next())});const P=({user:he,loading:q,globalSetting:re,classroomList:le,exercise:Pe,dispatch:Ae})=>{var Ne;const Te=(0,x.useParams)(),[He]=(0,x.useSearchParams)(),Ke=Number(He.get("template")),{userInfo:Ze}=he,{commonHeader:_e}=Pe,[ft,Xe]=(0,ne.useState)(1),Ve=()=>$(void 0,null,function*(){Ae({type:"exercise/getCommonHeader",payload:{categoryId:Te==null?void 0:Te.exerciseId}})});return(0,ne.useEffect)(()=>{Ke&&Xe(Ke||1),Ve()},[He]),(0,ne.useEffect)(()=>(Ae({type:"globalSetting/footerToggle",payload:!1}),()=>{Ae({type:"globalSetting/footerToggle",payload:!0})}),[]),Se.createElement("section",{className:"edu-container"},Se.createElement(pe.Z,{className:"mt10",separator:">",items:[{title:(Ne=Ze==null?void 0:Ze.course)==null?void 0:Ne.course_name,href:`/classrooms/${Te.coursesId}/exercise`},{title:"\u5728\u7EBF\u8003\u8BD5",href:`/classrooms/${Te.coursesId}/exercise`},{title:"\u8BD5\u5377\u8BE6\u60C5",href:`/classrooms/${Te.coursesId}/exercise/${Te==null?void 0:Te.exerciseId}/detail`},{title:_e==null?void 0:_e.exercise_name}]}),Se.createElement("div",{className:"flex mt20 justify-between"},Se.createElement("div",{className:"flex item-center"},Se.createElement("a",{href:`/classrooms/${Te.coursesId}/exercise/${Te==null?void 0:Te.exerciseId}/detail`},Se.createElement(te.Z,{className:"font16 c-black",rev:void 0})),(0,M.vB)(_e==null?void 0:_e.exercise_status,_e==null?void 0:_e.appraise_label),Se.createElement("strong",{className:"font20 ml5"},_e==null?void 0:_e.exercise_name))),Se.createElement("div",{className:"mt20"},ft===1&&Se.createElement(F,null),ft===2&&Se.createElement(xe,null)))};var fe=(0,x.connect)(({loading:he,user:q,globalSetting:re,classroomList:le,exercise:Pe})=>({classroomList:le,globalSetting:re,user:q,loading:he.effects,exercise:Pe}))(P)},30373:function(fn,je,b){"use strict";b.d(je,{H:function(){return oe}});var x=b(59301),ne=b(28284),pe=b(37568),te=b(42441),M=b(38394);const f=({form:Q,index:o=1,field:y,ParentName:C=[]})=>{(typeof C=="string"||typeof C=="number")&&(C=[C]);const h=ne.default.useWatch([...C,y.name,"chart_1"],{form:Q}),m=ne.default.useWatch([...C,y.name,"chart_2"],{form:Q}),E=ne.default.useWatch([...C,y.name,"name"],{form:Q}),S=ne.default.useWatch([...C,y.name,"question_type"],{form:Q}),I=(0,x.useMemo)(()=>{const G=[],R=[];return h==null||h.forEach(O=>{G.push(O==null?void 0:O.x_axis),R.push(O==null?void 0:O.y_axis)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%",containLabel:!0},xAxis:{type:"category",data:[...G||[],[4,5,6,7,8].includes(S)?"\u5206\u6570\u533A\u95F4":"\u7B54\u5BF9\u9898\u6570\uFF08\u5355\u4F4D\uFF1A\u9898\uFF09"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:R,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[h]),B=(0,x.useMemo)(()=>{const G=[],R=[];return m==null||m.forEach(O=>{G.push(O==null?void 0:O.x_axis),R.push(Math.round((O==null?void 0:O.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...G||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(O,D)=>O!=="\u9898\u76EE"?`${D+1}
{subtext|${(O.length>6?O==null?void 0:O.slice(0,6):O).split("").join(`
`)}}`:O,rich:{subtext:{align:"center",color:"#666",lineHeight:15}}}},yAxis:{name:"\u5E73\u5747\u5F97\u5206",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:R,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[m]);return x.createElement(x.Fragment,null,x.createElement("div",{className:"text-500 font14 mb10"},o,".",E),x.createElement(ne.default.Item,{name:[y.name,"content"]},x.createElement(pe.default.TextArea,{rows:3})),x.createElement("div",{className:"mt20"},x.createElement("div",{className:"font14 mb10"},"\u5B66\u5458\u7B54\u9898\u60C5\u51B5"),x.createElement(te.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB"},option:I})),x.createElement("div",{className:"mt20"},x.createElement("div",{className:"font14 mb10"},"\u5404\u5C0F\u9898\u7B54\u9898\u60C5\u51B5"),x.createElement(te.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB",height:331},option:B})))};je.Z=x.memo(f);const oe=x.memo(({form:Q,index:o=1,data:y})=>{const C=(0,x.useMemo)(()=>{var m;const E=[],S=[];return(m=y==null?void 0:y.chart_1)==null||m.forEach(I=>{E.push(I==null?void 0:I.x_axis),S.push(I==null?void 0:I.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"15%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[...E||[],[4,5,6,7,8].includes(y==null?void 0:y.question_type)?"\u5206\u6570\u533A\u95F4":"\u7B54\u5BF9\u9898\u6570\uFF08\u5355\u4F4D\uFF1A\u9898\uFF09"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:S,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[y==null?void 0:y.chart_1]),h=(0,x.useMemo)(()=>{var m;const E=[],S=[];return(m=y==null?void 0:y.chart_2)==null||m.forEach(I=>{E.push(I==null?void 0:I.x_axis),S.push(Math.round((I==null?void 0:I.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...E||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(I,B)=>I!=="\u9898\u76EE"?`${B+1}
{subtext|${(I.length>6?I==null?void 0:I.slice(0,6):I).split("").join(`
`)}}`:I,rich:{subtext:{align:"center",color:"#666",lineHeight:15}}}},yAxis:{name:"\u5E73\u5747\u5F97\u5206",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:S,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[y==null?void 0:y.chart_2]);return x.createElement("div",{className:"text-start pl10 pr10"},x.createElement("div",{className:"text-500 font14 mb10 c-black"},o,".",y==null?void 0:y.name),x.createElement("div",null,x.createElement(M.Z,{className:"font14 c-grey-333",value:y==null?void 0:y.content})),x.createElement("div",{className:"mt20"},x.createElement(te.Z,{className:"bg-white",style:{background:"#F6F7F9"},option:C}),x.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",o*2-1,"\xA0\xA0",y==null?void 0:y.name,"\u7B54\u9898\u5F97\u5206\u60C5\u51B5\u5206\u5E03")),x.createElement("div",{className:"mt20"},x.createElement(te.Z,{className:"bg-white",style:{background:"#F6F7F9",height:331},option:h}),x.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",o*2,"\xA0\xA0",y==null?void 0:y.name,"\u5404\u5C0F\u9898\u5F97\u5206\u7387")))})},98072:function(fn,je,b){"use strict";b.d(je,{U:function(){return o}});var x=b(59301),ne=Object.defineProperty,pe=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,f=(y,C,h)=>C in y?ne(y,C,{enumerable:!0,configurable:!0,writable:!0,value:h}):y[C]=h,oe=(y,C)=>{for(var h in C||(C={}))te.call(C,h)&&f(y,h,C[h]);if(pe)for(var h of pe(C))M.call(C,h)&&f(y,h,C[h]);return y},Q=(y,C,h)=>new Promise((m,E)=>{var S=G=>{try{B(h.next(G))}catch(R){E(R)}},I=G=>{try{B(h.throw(G))}catch(R){E(R)}},B=G=>G.done?m(G.value):Promise.resolve(G.value).then(S,I);B((h=h.apply(y,C)).next())});function o(y,C){const[h,m]=(0,x.useState)(C),[E,S]=(0,x.useState)(!1),[I,B]=(0,x.useState)();return[h,E,(R,O=!1)=>Q(this,null,function*(){const D=O?C:oe(oe({},h),R);S(!0),m(D);const A=yield y(D);return S(!1),B(A),A}),I,B]}},90290:function(fn,je,b){"use strict";b.d(je,{AL:function(){return D},Iy:function(){return C},Qv:function(){return E},ez:function(){return O},jb:function(){return h}});var x=b(32834),ne=b.n(x),pe=b(11690),te=b.n(pe);let M=1;function f(L,se){const ae=L.match(/^(\s+)(?:```)/);if(ae===null)return se;const Be=ae[1];return se.split(`
`).map(U=>{const k=U.match(/^\s+/);if(k===null)return U;const[N]=k;return N.length>=Be.length?U.slice(Be.length):U}).join(`
`)}let oe=[],Q=["<ul>"];const o=new(ne()).Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function C(){oe.length=0,Q=["<ul>"]}const h={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(L,se,ae,Be){if(se>=L.length||L[se].level<=ae)return se;var U=L[se];Be.push("<li><a href='#"+M+U.anchor+"'>"+U.text+"</a>"),se++;var k=[];return se=m(L,se,U.level,k),k.length>0&&(Be.push("<ul>"),k.forEach(function(N){Be.push(N)}),Be.push("</ul>")),Be.push("</li>"),se=m(L,se,ae,Be),se}function E(){return m(oe,0,0,Q),Q.push("</ul>"),Q.join("")}const S={heading(L){const se=y.exec(L);if(M+=1,se)return{type:"heading",raw:se[0],depth:se[1].length,text:se[2]}},fences(L){const se=this.rules.block.fences.exec(L);if(se){const ae=se[0];let Be=f(ae,se[3]||"");const U=se[2]?se[2].trim():se[2];if(["latex","katex","math"].indexOf(U)>=0){const k=G(),N=Be;Be=k,R[k]={type:"block",expression:N}}return{type:"code",raw:ae,lang:U,text:Be}}}},I=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let B=0;const G=()=>`__special_katext_id_${B++}__`;let R={};function O(){return R}function D(){B=0,R={}}function A(L){return L=L.replace(I,(se,ae)=>{const Be=G();return R[Be]={type:"inline",expression:ae},Be}),L}const W=o.listitem;o.listitem=function(L){return W(A(L))};const X=o.paragraph;o.paragraph=function(L){return X(A(L))};const Y=o.tablecell;o.tablecell=function(L,se){return Y(A(L),se)},o.code=function(L,se,ae){const Be=(se||"").match(/\S*/)[0];return Be?["latex","katex","math"].indexOf(Be)>=0?`<p class='editormd-tex'>${L}</p>`:`<pre class="prettyprint linenums"><code class="language-${se}">${ae?L:(0,pe.escape)(L,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ae?L:(0,pe.escape)(L,!0))+"</code></pre>"},o.heading=function(L,se,ae){let Be=this.options.headerPrefix+ae.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return oe.push({anchor:Be,level:se,text:L}),"<h"+se+' id="'+M+Be+'">'+L+"</h"+se+">"},ne().setOptions({silent:!0,gfm:!0,pedantic:!1}),ne().use({tokenizer:S,renderer:o}),je.ZP=ne()},64018:function(){var fn,je,b,x=!1,ne,pe;window.PR_SHOULD_USE_CONTINUATION=!0;var te,M;(function(){var f=window,oe=["break,continue,do,else,for,if,return,while"],Q=[oe,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[Q,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],y=[o,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],C=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[o,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],m="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",E=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],S="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",I=[oe,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],B=[oe,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],G=[oe,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[y,h,C,E,S,I,B,G],O=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,D="str",A="kwd",W="com",X="typ",Y="lit",L="pun",se="pln",ae="tag",Be="dec",U="src",k="atn",N="atv",V="nocode",J="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function H(de){for(var K=0,xe=!1,Se=!1,$=0,P=de.length;$<P;++$){var fe=de[$];if(fe.ignoreCase)Se=!0;else if(/[a-z]/i.test(fe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){xe=!0,Se=!1;break}}var he={b:8,t:9,n:10,v:11,f:12,r:13};function q(Ne){var Te=Ne.charCodeAt(0);if(Te!==92)return Te;var He=Ne.charAt(1);return Te=he[He],Te||("0"<=He&&He<="7"?parseInt(Ne.substring(1),8):He==="u"||He==="x"?parseInt(Ne.substring(2),16):Ne.charCodeAt(1))}function re(Ne){if(Ne<32)return(Ne<16?"\\x0":"\\x")+Ne.toString(16);var Te=String.fromCharCode(Ne);return Te==="\\"||Te==="-"||Te==="]"||Te==="^"?"\\"+Te:Te}function le(Ne){var Te=Ne.substring(1,Ne.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),He=[],Ke=Te[0]==="^",Ze=["["];Ke&&Ze.push("^");for(var _e=Ke?1:0,ft=Te.length;_e<ft;++_e){var Xe=Te[_e];if(/\\[bdsw]/i.test(Xe))Ze.push(Xe);else{var Ve=q(Xe),Pt;_e+2<ft&&Te[_e+1]==="-"?(Pt=q(Te[_e+2]),_e+=2):Pt=Ve,He.push([Ve,Pt]),Pt<65||Ve>122||(Pt<65||Ve>90||He.push([Math.max(65,Ve)|32,Math.min(Pt,90)|32]),Pt<97||Ve>122||He.push([Math.max(97,Ve)&-33,Math.min(Pt,122)&-33]))}}He.sort(function(pn,Lt){return pn[0]-Lt[0]||Lt[1]-pn[1]});for(var Mt=[],st=[],_e=0;_e<He.length;++_e){var Qt=He[_e];Qt[0]<=st[1]+1?st[1]=Math.max(st[1],Qt[1]):Mt.push(st=Qt)}for(var _e=0;_e<Mt.length;++_e){var Qt=Mt[_e];Ze.push(re(Qt[0])),Qt[1]>Qt[0]&&(Qt[1]+1>Qt[0]&&Ze.push("-"),Ze.push(re(Qt[1])))}return Ze.push("]"),Ze.join("")}function Pe(Ne){for(var Te=Ne.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),He=Te.length,Ke=[],Ze=0,_e=0;Ze<He;++Ze){var ft=Te[Ze];if(ft==="(")++_e;else if(ft.charAt(0)==="\\"){var Xe=+ft.substring(1);Xe&&(Xe<=_e?Ke[Xe]=-1:Te[Ze]=re(Xe))}}for(var Ze=1;Ze<Ke.length;++Ze)Ke[Ze]===-1&&(Ke[Ze]=++K);for(var Ze=0,_e=0;Ze<He;++Ze){var ft=Te[Ze];if(ft==="(")++_e,Ke[_e]||(Te[Ze]="(?:");else if(ft.charAt(0)==="\\"){var Xe=+ft.substring(1);Xe&&Xe<=_e&&(Te[Ze]="\\"+Ke[Xe])}}for(var Ze=0;Ze<He;++Ze)Te[Ze]==="^"&&Te[Ze+1]!=="^"&&(Te[Ze]="");if(Ne.ignoreCase&&xe)for(var Ze=0;Ze<He;++Ze){var ft=Te[Ze],Ve=ft.charAt(0);ft.length>=2&&Ve==="["?Te[Ze]=le(ft):Ve!=="\\"&&(Te[Ze]=ft.replace(/[a-zA-Z]/g,function(st){var Qt=st.charCodeAt(0);return"["+String.fromCharCode(Qt&-33,Qt|32)+"]"}))}return Te.join("")}for(var Ae=[],$=0,P=de.length;$<P;++$){var fe=de[$];if(fe.global||fe.multiline)throw new Error(""+fe);Ae.push("(?:"+Pe(fe)+")")}return new RegExp(Ae.join("|"),Se?"gi":"g")}function v(de,K){var xe=/(?:^|\s)nocode(?:\s|$)/,Se=[],$=0,P=[],fe=0;function he(q){var re=q.nodeType;if(re==1){if(xe.test(q.className))return;for(var le=q.firstChild;le;le=le.nextSibling)he(le);var Pe=q.nodeName.toLowerCase();(Pe==="br"||Pe==="li")&&(Se[fe]=`
`,P[fe<<1]=$++,P[fe++<<1|1]=q)}else if(re==3||re==4){var Ae=q.nodeValue;Ae.length&&(K?Ae=Ae.replace(/\r\n?/g,`
`):Ae=Ae.replace(/[ \t\r\n]+/g," "),Se[fe]=Ae,P[fe<<1]=$,$+=Ae.length,P[fe++<<1|1]=q)}}return he(de),{sourceCode:Se.join("").replace(/\n$/,""),spans:P}}function g(de,K,xe,Se,$){if(xe){var P={sourceNode:de,pre:1,langExtension:null,numberLines:null,sourceCode:xe,spans:null,basePos:K,decorations:null};Se(P),$.push.apply($,P.decorations)}}var F=/\S/;function ie(de){for(var K=void 0,xe=de.firstChild;xe;xe=xe.nextSibling){var Se=xe.nodeType;K=Se===1?K?de:xe:Se===3&&F.test(xe.nodeValue)?de:K}return K===de?void 0:K}function ue(de,K){var xe={},Se;(function(){for(var fe=de.concat(K),he=[],q={},re=0,le=fe.length;re<le;++re){var Pe=fe[re],Ae=Pe[3];if(Ae)for(var Ne=Ae.length;--Ne>=0;)xe[Ae.charAt(Ne)]=Pe;var Te=Pe[1],He=""+Te;q.hasOwnProperty(He)||(he.push(Te),q[He]=null)}he.push(/[\0-\uffff]/),Se=H(he)})();var $=K.length,P=function(fe){for(var he=fe.sourceCode,q=fe.basePos,re=fe.sourceNode,le=[q,se],Pe=0,Ae=he.match(Se)||[],Ne={},Te=0,He=Ae.length;Te<He;++Te){var Ke=Ae[Te],Ze=Ne[Ke],_e=void 0,ft;if(typeof Ze=="string")ft=!1;else{var Xe=xe[Ke.charAt(0)];if(Xe)_e=Ke.match(Xe[1]),Ze=Xe[0];else{for(var Ve=0;Ve<$;++Ve)if(Xe=K[Ve],_e=Ke.match(Xe[1]),_e){Ze=Xe[0];break}_e||(Ze=se)}ft=Ze.length>=5&&Ze.substring(0,5)==="lang-",ft&&!(_e&&typeof _e[1]=="string")&&(ft=!1,Ze=U),ft||(Ne[Ke]=Ze)}var Pt=Pe;if(Pe+=Ke.length,!ft)le.push(q+Pt,Ze);else{var Mt=_e[1],st=Ke.indexOf(Mt),Qt=st+Mt.length;_e[2]&&(Qt=Ke.length-_e[2].length,st=Qt-Mt.length);var pn=Ze.substring(5);g(re,q+Pt,Ke.substring(0,st),P,le),g(re,q+Pt+st,Mt,Tt(pn,Mt),le),g(re,q+Pt+Qt,Ke.substring(Qt),P,le)}}fe.decorations=le};return P}function Le(de){var K=[],xe=[];de.tripleQuotedStrings?K.push([D,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):de.multiLineStrings?K.push([D,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):K.push([D,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),de.verbatimStrings&&xe.push([D,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Se=de.hashComments;Se&&(de.cStyleComments?(Se>1?K.push([W,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):K.push([W,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),xe.push([D,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):K.push([W,/^#[^\r\n]*/,null,"#"])),de.cStyleComments&&(xe.push([W,/^\/\/[^\r\n]*/,null]),xe.push([W,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var $=de.regexLiterals;if($){var P=$>1?"":`
\r`,fe=P?".":"[\\S\\s]",he="/(?=[^/*"+P+"])(?:[^/\\x5B\\x5C"+P+"]|\\x5C"+fe+"|\\x5B(?:[^\\x5C\\x5D"+P+"]|\\x5C"+fe+")*(?:\\x5D|$))+/";xe.push(["lang-regex",RegExp("^"+J+"("+he+")")])}var q=de.types;q&&xe.push([X,q]);var re=(""+de.keywords).replace(/^ | $/g,"");re.length&&xe.push([A,new RegExp("^(?:"+re.replace(/[\s,]+/g,"|")+")\\b"),null]),K.push([se,/^\s+/,null,` \r
\xA0`]);var le="^.[^\\s\\w.$@'\"`/\\\\]*";return de.regexLiterals&&(le+="(?!s*/)"),xe.push([Y,/^@[a-z_$][a-z_$@0-9]*/i,null],[X,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[se,/^[a-z_$][a-z_$@0-9]*/i,null],[Y,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[se,/^\\[\s\S]?/,null],[L,new RegExp(le),null]),ue(K,xe)}var Je=Le({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function rt(de,K,xe){for(var Se=/(?:^|\s)nocode(?:\s|$)/,$=/\r\n?|\n/,P=de.ownerDocument,fe=P.createElement("li");de.firstChild;)fe.appendChild(de.firstChild);var he=[fe];function q(Te){var He=Te.nodeType;if(He==1&&!Se.test(Te.className))if(Te.nodeName==="br")re(Te),Te.parentNode&&Te.parentNode.removeChild(Te);else for(var Ke=Te.firstChild;Ke;Ke=Ke.nextSibling)q(Ke);else if((He==3||He==4)&&xe){var Ze=Te.nodeValue,_e=Ze.match($);if(_e){var ft=Ze.substring(0,_e.index);Te.nodeValue=ft;var Xe=Ze.substring(_e.index+_e[0].length);if(Xe){var Ve=Te.parentNode;Ve.insertBefore(P.createTextNode(Xe),Te.nextSibling)}re(Te),ft||Te.parentNode.removeChild(Te)}}}function re(Te){for(;!Te.nextSibling;)if(Te=Te.parentNode,!Te)return;function He(_e,ft){var Xe=ft?_e.cloneNode(!1):_e,Ve=_e.parentNode;if(Ve){var Pt=He(Ve,1),Mt=_e.nextSibling;Pt.appendChild(Xe);for(var st=Mt;st;st=Mt)Mt=st.nextSibling,Pt.appendChild(st)}return Xe}for(var Ke=He(Te.nextSibling,0),Ze;(Ze=Ke.parentNode)&&Ze.nodeType===1;)Ke=Ze;he.push(Ke)}for(var le=0;le<he.length;++le)q(he[le]);K===(K|0)&&he[0].setAttribute("value",K);var Pe=P.createElement("ol");Pe.className="linenums";for(var Ae=Math.max(0,K-1|0)||0,le=0,Ne=he.length;le<Ne;++le)fe=he[le],fe.className="L"+(le+Ae)%10,fe.firstChild||fe.appendChild(P.createTextNode("\xA0")),Pe.appendChild(fe);de.appendChild(Pe)}function dt(de){var K=/\bMSIE\s(\d+)/.exec(navigator.userAgent);K=K&&+K[1]<=8;var xe=/\n/g,Se=de.sourceCode,$=Se.length,P=0,fe=de.spans,he=fe.length,q=0,re=de.decorations,le=re.length,Pe=0;re[le]=$;var Ae,Ne;for(Ne=Ae=0;Ne<le;)re[Ne]!==re[Ne+2]?(re[Ae++]=re[Ne++],re[Ae++]=re[Ne++]):Ne+=2;for(le=Ae,Ne=Ae=0;Ne<le;){for(var Te=re[Ne],He=re[Ne+1],Ke=Ne+2;Ke+2<=le&&re[Ke+1]===He;)Ke+=2;re[Ae++]=Te,re[Ae++]=He,Ne=Ke}le=re.length=Ae;var Ze=de.sourceNode,_e="";Ze&&(_e=Ze.style.display,Ze.style.display="none");try{for(var ft=null;q<he;){var Xe=fe[q],Ve=fe[q+2]||$,Pt=re[Pe+2]||$,Ke=Math.min(Ve,Pt),Mt=fe[q+1],st;if(Mt.nodeType!==1&&(st=Se.substring(P,Ke))){K&&(st=st.replace(xe,"\r")),Mt.nodeValue=st;var Qt=Mt.ownerDocument,pn=Qt.createElement("span");pn.className=re[Pe+1];var Lt=Mt.parentNode;Lt.replaceChild(pn,Mt),pn.appendChild(Mt),P<Ve&&(fe[q+1]=Mt=Qt.createTextNode(Se.substring(Ke,Ve)),Lt.insertBefore(Mt,pn.nextSibling))}P=Ke,P>=Ve&&(q+=2),P>=Pt&&(Pe+=2)}}finally{Ze&&(Ze.style.display=_e)}}var vt={};function be(de,K){for(var xe=K.length;--xe>=0;){var Se=K[xe];vt.hasOwnProperty(Se)?f.console&&console.warn("cannot override language handler %s",Se):vt[Se]=de}}function Tt(de,K){return de&&vt.hasOwnProperty(de)||(de=/^\s*</.test(K)?"default-markup":"default-code"),vt[de]}be(Je,["default-code"]),be(ue([],[[se,/^[^<?]+/],[Be,/^<!\w[^>]*(?:>|$)/],[W,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),be(ue([[se,/^[\s]+/,null,` \r
`],[N,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ae,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[k,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),be(ue([],[[N,/^[\s\S]+/]]),["uq.val"]),be(Le({keywords:y,hashComments:!0,cStyleComments:!0,types:O}),["c","cc","cpp","cxx","cyc","m"]),be(Le({keywords:"null,true,false"}),["json"]),be(Le({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:O}),["cs"]),be(Le({keywords:C,cStyleComments:!0}),["java"]),be(Le({keywords:G,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),be(Le({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),be(Le({keywords:S,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),be(Le({keywords:B,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),be(Le({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),be(Le({keywords:m,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),be(ue([],[[D,/^[\s\S]+/]]),["regex"]);function tt(de){var K=de.langExtension;try{var xe=v(de.sourceNode,de.pre),Se=xe.sourceCode;de.sourceCode=Se,de.spans=xe.spans,de.basePos=0,Tt(K,Se)(de),dt(de)}catch($){f.console&&console.log($&&$.stack||$)}}function It(de,K,xe){var Se=xe||!1,$=K||null,P=document.createElement("div");P.innerHTML="<pre>"+de+"</pre>",P=P.firstChild,Se&&rt(P,Se,!0);var fe={langExtension:$,numberLines:Se,sourceNode:P,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return tt(fe),P.innerHTML}function Qe(de,K){var xe=K||document.body,Se=xe.ownerDocument||document;function $(Xe){return xe.getElementsByTagName(Xe)}for(var P=[$("pre"),$("code"),$("xmp")],fe=[],he=0;he<P.length;++he)for(var q=0,re=P[he].length;q<re;++q)fe.push(P[he][q]);P=null;var le=Date;le.now||(le={now:function(){return+new Date}});var Pe=0,Ae=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ne=/\bprettyprint\b/,Te=/\bprettyprinted\b/,He=/pre|xmp/i,Ke=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,_e={};function ft(){for(var Xe=f.PR_SHOULD_USE_CONTINUATION?le.now()+250:1/0;Pe<fe.length&&le.now()<Xe;Pe++){for(var Ve=fe[Pe],Pt=_e,Mt=Ve;Mt=Mt.previousSibling;){var st=Mt.nodeType,Qt=(st===7||st===8)&&Mt.nodeValue;if(Qt?!/^\??prettify\b/.test(Qt):st!==3||/\S/.test(Mt.nodeValue))break;if(Qt){Pt={},Qt.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ye,nt,_t){Pt[nt]=_t});break}}var pn=Ve.className;if((Pt!==_e||Ne.test(pn))&&!Te.test(pn)){for(var Lt=!1,tn=Ve.parentNode;tn;tn=tn.parentNode){var ze=tn.tagName;if(Ze.test(ze)&&tn.className&&Ne.test(tn.className)){Lt=!0;break}}if(!Lt){Ve.className+=" prettyprinted";var ke=Pt.lang;if(!ke){ke=pn.match(Ae);var Re;!ke&&(Re=ie(Ve))&&Ke.test(Re.tagName)&&(ke=Re.className.match(Ae)),ke&&(ke=ke[1])}var Z;if(He.test(Ve.tagName))Z=1;else{var ee=Ve.currentStyle,me=Se.defaultView,ve=ee?ee.whiteSpace:me&&me.getComputedStyle?me.getComputedStyle(Ve,null).getPropertyValue("white-space"):0;Z=ve&&ve.substring(0,3)==="pre"}var Ee=Pt.linenums;(Ee=Ee==="true"||+Ee)||(Ee=pn.match(/\blinenums\b(?::(\d+))?/),Ee=Ee?Ee[1]&&Ee[1].length?+Ee[1]:!0:!1),Ee&&rt(Ve,Ee,Z);var Me={langExtension:ke,sourceNode:Ve,numberLines:Ee,pre:Z,sourceCode:null,basePos:null,spans:null,decorations:null};tt(Me)}}}Pe<fe.length?f.setTimeout(ft,250):typeof de=="function"&&de()}ft()}var $e=f.PR={createSimpleLexer:ue,registerLangHandler:be,sourceDecorator:Le,PR_ATTRIB_NAME:k,PR_ATTRIB_VALUE:N,PR_COMMENT:W,PR_DECLARATION:Be,PR_KEYWORD:A,PR_LITERAL:Y,PR_NOCODE:V,PR_PLAIN:se,PR_PUNCTUATION:L,PR_SOURCE:U,PR_STRING:D,PR_TAG:ae,PR_TYPE:X,prettyPrintOne:x?f.prettyPrintOne=It:te=It,prettyPrint:M=x?f.prettyPrint=Qe:M=Qe},ye=f.define;typeof ye=="function"&&ye.amd&&ye("google-code-prettify",[],function(){return $e})})()},25769:function(fn,je,b){"use strict";var x=b(98040),ne={"text/plain":"Text","text/html":"Url",default:"Text"},pe="Copy to clipboard: #{key}, Enter";function te(f){var oe=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return f.replace(/#{\s*key\s*}/g,oe)}function M(f,oe){var Q,o,y,C,h,m,E=!1;oe||(oe={}),Q=oe.debug||!1;try{y=x(),C=document.createRange(),h=document.getSelection(),m=document.createElement("span"),m.textContent=f,m.ariaHidden="true",m.style.all="unset",m.style.position="fixed",m.style.top=0,m.style.clip="rect(0, 0, 0, 0)",m.style.whiteSpace="pre",m.style.webkitUserSelect="text",m.style.MozUserSelect="text",m.style.msUserSelect="text",m.style.userSelect="text",m.addEventListener("copy",function(I){if(I.stopPropagation(),oe.format)if(I.preventDefault(),typeof I.clipboardData=="undefined"){Q&&console.warn("unable to use e.clipboardData"),Q&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var B=ne[oe.format]||ne.default;window.clipboardData.setData(B,f)}else I.clipboardData.clearData(),I.clipboardData.setData(oe.format,f);oe.onCopy&&(I.preventDefault(),oe.onCopy(I.clipboardData))}),document.body.appendChild(m),C.selectNodeContents(m),h.addRange(C);var S=document.execCommand("copy");if(!S)throw new Error("copy command was unsuccessful");E=!0}catch(I){Q&&console.error("unable to copy using execCommand: ",I),Q&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(oe.format||"text",f),oe.onCopy&&oe.onCopy(window.clipboardData),E=!0}catch(B){Q&&console.error("unable to copy using clipboardData: ",B),Q&&console.error("falling back to prompt"),o=te("message"in oe?oe.message:pe),window.prompt(o,f)}}finally{h&&(typeof h.removeRange=="function"?h.removeRange(C):h.removeAllRanges()),m&&document.body.removeChild(m),y()}return E}fn.exports=M},97774:function(fn,je,b){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var x=Object.assign||function(I){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var R in G)Object.prototype.hasOwnProperty.call(G,R)&&(I[R]=G[R])}return I},ne=function(){function I(B,G){for(var R=0;R<G.length;R++){var O=G[R];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(B,O.key,O)}}return function(B,G,R){return G&&I(B.prototype,G),R&&I(B,R),B}}(),pe=b(59301),te=C(pe),M=b(12708),f=C(M),oe=b(53291),Q=C(oe),o=b(47242),y=b(65429);function C(I){return I&&I.__esModule?I:{default:I}}function h(I,B){if(!(I instanceof B))throw new TypeError("Cannot call a class as a function")}function m(I,B){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:I}function E(I,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);I.prototype=Object.create(B&&B.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(I,B):I.__proto__=B)}var S=function(I){E(B,I);function B(G){h(this,B);var R=m(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,G));return R.getEchartsInstance=function(){return R.echartsLib.getInstanceByDom(R.echartsElement)||R.echartsLib.init(R.echartsElement,R.props.theme,R.props.opts)},R.dispose=function(){if(R.echartsElement){try{(0,o.clear)(R.echartsElement)}catch(O){console.warn(O)}R.echartsLib.dispose(R.echartsElement)}},R.rerender=function(){var O=R.props,D=O.onEvents,A=O.onChartReady,W=R.renderEchartDom();R.bindEvents(W,D||{}),typeof A=="function"&&R.props.onChartReady(W),R.echartsElement&&(0,o.bind)(R.echartsElement,function(){try{W.resize()}catch(X){console.warn(X)}})},R.bindEvents=function(O,D){var A=function(Y,L){typeof Y=="string"&&typeof L=="function"&&O.on(Y,function(se){L(se,O)})};for(var W in D)Object.prototype.hasOwnProperty.call(D,W)&&A(W,D[W])},R.renderEchartDom=function(){var O=R.getEchartsInstance();return O.setOption(R.props.option,R.props.notMerge||!1,R.props.lazyUpdate||!1),R.props.showLoading?O.showLoading(R.props.loadingOption||null):O.hideLoading(),O},R.echartsLib=G.echarts,R.echartsElement=null,R}return ne(B,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(R){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(R,this.props))){if(!(0,Q.default)(R.theme,this.props.theme)||!(0,Q.default)(R.opts,this.props.opts)||!(0,Q.default)(R.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var O=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,Q.default)((0,y.pick)(this.props,O),(0,y.pick)(R,O))){var D=this.renderEchartDom();if(!(0,Q.default)(R.style,this.props.style)||!(0,Q.default)(R.className,this.props.className))try{D.resize()}catch(A){console.warn(A)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var R=this,O=this.props,D=O.style,A=O.className,W=x({height:300},D);return te.default.createElement("div",{ref:function(Y){R.echartsElement=Y},style:W,className:"echarts-for-react "+A})}}]),B}(pe.Component);je.default=S,S.propTypes={option:f.default.object.isRequired,echarts:f.default.object,notMerge:f.default.bool,lazyUpdate:f.default.bool,style:f.default.object,className:f.default.string,theme:f.default.oneOfType([f.default.string,f.default.object]),onChartReady:f.default.func,showLoading:f.default.bool,loadingOption:f.default.object,onEvents:f.default.object,opts:f.default.shape({devicePixelRatio:f.default.number,renderer:f.default.oneOf(["canvas","svg"]),width:f.default.oneOfType([f.default.number,f.default.oneOf([null,void 0,"auto"])]),height:f.default.oneOfType([f.default.number,f.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:f.default.func},S.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},42441:function(fn,je,b){"use strict";var x;x={value:!0},je.Z=void 0;var ne=b(76411),pe=f(ne),te=b(97774),M=f(te);function f(C){return C&&C.__esModule?C:{default:C}}function oe(C,h){if(!(C instanceof h))throw new TypeError("Cannot call a class as a function")}function Q(C,h){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:C}function o(C,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);C.prototype=Object.create(h&&h.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(C,h):C.__proto__=h)}var y=function(C){o(h,C);function h(m){oe(this,h);var E=Q(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,m));return E.echartsLib=pe.default,E}return h}(M.default);je.Z=y},65429:function(fn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0});var b=je.pick=function(ne,pe){var te={};return pe.forEach(function(M){te[M]=ne[M]}),te}},53291:function(fn){"use strict";var je=Array.isArray,b=Object.keys,x=Object.prototype.hasOwnProperty;fn.exports=function ne(pe,te){if(pe===te)return!0;if(pe&&te&&typeof pe=="object"&&typeof te=="object"){var M=je(pe),f=je(te),oe,Q,o;if(M&&f){if(Q=pe.length,Q!=te.length)return!1;for(oe=Q;oe--!==0;)if(!ne(pe[oe],te[oe]))return!1;return!0}if(M!=f)return!1;var y=pe instanceof Date,C=te instanceof Date;if(y!=C)return!1;if(y&&C)return pe.getTime()==te.getTime();var h=pe instanceof RegExp,m=te instanceof RegExp;if(h!=m)return!1;if(h&&m)return pe.toString()==te.toString();var E=b(pe);if(Q=E.length,Q!==b(te).length)return!1;for(oe=Q;oe--!==0;)if(!x.call(te,E[oe]))return!1;for(oe=Q;oe--!==0;)if(o=E[oe],!ne(pe[o],te[o]))return!1;return!0}return pe!==pe&&te!==te}},53184:function(fn,je,b){"use strict";var x,ne;function pe(te,M,f){var oe=function(Q,o){return te.js_beautify(Q,o)};return oe.js=te.js_beautify,oe.css=M.css_beautify,oe.html=f.html_beautify,oe.js_beautify=te.js_beautify,oe.css_beautify=M.css_beautify,oe.html_beautify=f.html_beautify,oe}x=[b(58553),b(87804),b(40998)],ne=function(te,M,f){return pe(te,M,f)}.apply(je,x),ne!==void 0&&(fn.exports=ne)},87804:function(fn,je){var b,x;(function(){var ne;(function(){"use strict";var te=[,,function(Q){function o(h){this.__parent=h,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var h=new o(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},o.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},o.prototype.has_match=function(h){for(var m=this.__items.length-1;m>=0;m--)if(this.__items[m].match(h))return!0;return!1},o.prototype.set_indent=function(h,m){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=m||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(h){this.__items.push(h);var m=h.lastIndexOf(`
`);m!==-1?this.__character_count=h.length-m:this.__character_count+=h.length},o.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function y(h,m){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),m=m||"",h.indent_level>0&&(m=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=m,this.__base_string_length=m.length}y.prototype.get_indent_size=function(h,m){var E=this.__base_string_length;return m=m||0,h<0&&(E=0),E+=h*this.__indent_size,E+=m,E},y.prototype.get_indent_string=function(h,m){var E=this.__base_string;return m=m||0,h<0&&(h=0,E=""),m+=h*this.__indent_size,this.__ensure_cache(m),E+=this.__cache[m],E},y.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var h=this.__cache.length,m=0,E="";this.__indent_size&&h>=this.__indent_size&&(m=Math.floor(h/this.__indent_size),h-=m*this.__indent_size,E=new Array(m+1).join(this.__indent_string)),h&&(E+=new Array(h+1).join(" ")),this.__cache.push(E)};function C(h,m){this.__indent_cache=new y(h,m),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}C.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},C.prototype.get_line_number=function(){return this.__lines.length},C.prototype.get_indent_string=function(h,m){return this.__indent_cache.get_indent_string(h,m)},C.prototype.get_indent_size=function(h,m){return this.__indent_cache.get_indent_size(h,m)},C.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},C.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},C.prototype.get_code=function(h){this.trim(!0);var m=this.current_line.pop();m&&(m[m.length-1]===`
`&&(m=m.replace(/\n+$/g,"")),this.current_line.push(m)),this._end_with_newline&&this.__add_outputline();var E=this.__lines.join(`
`);return h!==`
`&&(E=E.replace(/[\n]/g,h)),E},C.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},C.prototype.set_indent=function(h,m){return h=h||0,m=m||0,this.next_line.set_indent(h,m),this.__lines.length>1?(this.current_line.set_indent(h,m),!0):(this.current_line.set_indent(),!1)},C.prototype.add_raw_token=function(h){for(var m=0;m<h.newlines;m++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},C.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},C.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},C.prototype.remove_indent=function(h){for(var m=this.__lines.length;h<m;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},C.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},C.prototype.just_added_newline=function(){return this.current_line.is_empty()},C.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},C.prototype.ensure_empty_line_above=function(h,m){for(var E=this.__lines.length-2;E>=0;){var S=this.__lines[E];if(S.is_empty())break;if(S.item(0).indexOf(h)!==0&&S.item(-1)!==m){this.__lines.splice(E+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}E--}},Q.exports.Output=C},,,,function(Q){function o(h,m){this.raw_options=y(h,m),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(h,m){var E=this.raw_options[h],S=m||[];return typeof E=="object"?E!==null&&typeof E.concat=="function"&&(S=E.concat()):typeof E=="string"&&(S=E.split(/[^a-zA-Z0-9_\/\-]+/)),S},o.prototype._get_boolean=function(h,m){var E=this.raw_options[h],S=E===void 0?!!m:!!E;return S},o.prototype._get_characters=function(h,m){var E=this.raw_options[h],S=m||"";return typeof E=="string"&&(S=E.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),S},o.prototype._get_number=function(h,m){var E=this.raw_options[h];m=parseInt(m,10),isNaN(m)&&(m=0);var S=parseInt(E,10);return isNaN(S)&&(S=m),S},o.prototype._get_selection=function(h,m,E){var S=this._get_selection_list(h,m,E);if(S.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
`+m+`
You passed in: '`+this.raw_options[h]+"'");return S[0]},o.prototype._get_selection_list=function(h,m,E){if(!m||m.length===0)throw new Error("Selection list cannot be empty.");if(E=E||[m[0]],!this._is_valid_selection(E,m))throw new Error("Invalid Default Value!");var S=this._get_array(h,E);if(!this._is_valid_selection(S,m))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
`+m+`
You passed in: '`+this.raw_options[h]+"'");return S},o.prototype._is_valid_selection=function(h,m){return h.length&&m.length&&!h.some(function(E){return m.indexOf(E)===-1})};function y(h,m){var E={};h=C(h);var S;for(S in h)S!==m&&(E[S]=h[S]);if(m&&h[m])for(S in h[m])E[S]=h[m][S];return E}function C(h){var m={},E;for(E in h){var S=E.replace(/-/g,"_");m[S]=h[E]}return m}Q.exports.Options=o,Q.exports.normalizeOpts=C,Q.exports.mergeOpts=y},,function(Q){var o=RegExp.prototype.hasOwnProperty("sticky");function y(C){this.__input=C||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var C=null;return this.hasNext()&&(C=this.__input.charAt(this.__position),this.__position+=1),C},y.prototype.peek=function(C){var h=null;return C=C||0,C+=this.__position,C>=0&&C<this.__input_length&&(h=this.__input.charAt(C)),h},y.prototype.__match=function(C,h){C.lastIndex=h;var m=C.exec(this.__input);return m&&!(o&&C.sticky)&&m.index!==h&&(m=null),m},y.prototype.test=function(C,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(C,h):!1},y.prototype.testChar=function(C,h){var m=this.peek(h);return C.lastIndex=0,m!==null&&C.test(m)},y.prototype.match=function(C){var h=this.__match(C,this.__position);return h?this.__position+=h[0].length:h=null,h},y.prototype.read=function(C,h,m){var E="",S;return C&&(S=this.match(C),S&&(E+=S[0])),h&&(S||!C)&&(E+=this.readUntil(h,m)),E},y.prototype.readUntil=function(C,h){var m="",E=this.__position;C.lastIndex=this.__position;var S=C.exec(this.__input);return S?(E=S.index,h&&(E+=S[0].length)):E=this.__input_length,m=this.__input.substring(this.__position,E),this.__position=E,m},y.prototype.readUntilAfter=function(C){return this.readUntil(C,!0)},y.prototype.get_regexp=function(C,h){var m=null,E="g";return h&&o&&(E="y"),typeof C=="string"&&C!==""?m=new RegExp(C,E):C&&(m=new RegExp(C.source,E)),m},y.prototype.get_literal_regexp=function(C){return RegExp(C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(C){var h=this.__position,m=this.readUntilAfter(C);return this.__position=h,m},y.prototype.lookBack=function(C){var h=this.__position-1;return h>=C.length&&this.__input.substring(h-C.length,h).toLowerCase()===C},Q.exports.InputScanner=y},,,,,function(Q){function o(y,C){y=typeof y=="string"?y:y.source,C=typeof C=="string"?C:C.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+C,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+C,"g")}o.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var C={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(y);h;)C[h[1]]=h[2],h=this.__directive_pattern.exec(y);return C},o.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},Q.exports.Directives=o},,function(Q,o,y){var C=y(16).Beautifier,h=y(17).Options;function m(E,S){var I=new C(E,S);return I.beautify()}Q.exports=m,Q.exports.defaultOptions=function(){return new h}},function(Q,o,y){var C=y(17).Options,h=y(2).Output,m=y(8).InputScanner,E=y(13).Directives,S=new E(/\/\*/,/\*\//),I=/\r\n|[\r\n]/,B=/\r\n|[\r\n]/g,G=/\s/,R=/(?:\s|\n)+/g,O=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,D=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function A(W,X){this._source_text=W||"",this._options=new C(X),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}A.prototype.eatString=function(W){var X="";for(this._ch=this._input.next();this._ch;){if(X+=this._ch,this._ch==="\\")X+=this._input.next();else if(W.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return X},A.prototype.eatWhitespace=function(W){for(var X=G.test(this._input.peek()),Y=0;G.test(this._input.peek());)this._ch=this._input.next(),W&&this._ch===`
`&&(Y===0||Y<this._options.max_preserve_newlines)&&(Y++,this._output.add_new_line(!0));return X},A.prototype.foundNestedPseudoClass=function(){for(var W=0,X=1,Y=this._input.peek(X);Y;){if(Y==="{")return!0;if(Y==="(")W+=1;else if(Y===")"){if(W===0)return!1;W-=1}else if(Y===";"||Y==="}")return!1;X++,Y=this._input.peek(X)}return!1},A.prototype.print_string=function(W){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(W)},A.prototype.preserveSingleSpace=function(W){W&&(this._output.space_before_token=!0)},A.prototype.indent=function(){this._indentLevel++},A.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},A.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var W=this._source_text,X=this._options.eol;X==="auto"&&(X=`
`,W&&I.test(W||"")&&(X=W.match(I)[0])),W=W.replace(B,`
`);var Y=W.match(/^[\t ]*/)[0];this._output=new h(this._options,Y),this._input=new m(W),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var L=0,se=!1,ae=!1,Be=!1,U=!1,k=!1,N=this._ch,V=!1,J,H,v;J=this._input.read(R),H=J!=="",v=N,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),N=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var g=this._input.read(O),F=S.get_directives(g);F&&F.ignore==="start"&&(g+=S.readIgnored(this._input)),this.print_string(g),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(D)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(H),this.print_string(this._ch);var ie=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ie.match(/[ :]$/)&&(ie=this.eatString(": ").replace(/\s+$/,""),this.print_string(ie),this._output.space_before_token=!0),L===0&&ie.indexOf(":")!==-1&&(ae=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(H),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ue=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ue.match(/[ :]$/)&&(ue=this.eatString(": ").replace(/\s+$/,""),this.print_string(ue),this._output.space_before_token=!0),L===0&&ue.indexOf(":")!==-1?(ae=!0,this.indent()):ue in this.NESTED_AT_RULE?(this._nestedLevel+=1,ue in this.CONDITIONAL_GROUP_RULE&&(Be=!0)):L===0&&!ae&&(U=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(H),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")ae&&(ae=!1,this.outdent()),U=!1,Be?(Be=!1,se=this._indentLevel>=this._nestedLevel):se=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&se&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(v==="("?this._output.space_before_token=!1:v!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),v==="{"&&this._output.trim(!0),ae&&(this.outdent(),ae=!1),this.print_string(this._ch),se=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Le=0;Le<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Le++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Le])){V=!0;break}(se||Be)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!U&&L===0?(this.print_string(":"),ae||(ae=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Je=v==='"'||v==="'";this.preserveSingleSpace(Je||H),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")V=!1,L===0?(ae&&(this.outdent(),ae=!1),U=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),L++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),L&&(L--,this.outdent()));else{var rt=!1;this._input.lookBack("with")&&(rt=!0),this.preserveSingleSpace(H||rt),this.print_string(this._ch),ae&&v==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),k=!0):(this.eatWhitespace(),L++,this.indent())}else if(this._ch===")")L&&(L--,this.outdent()),k&&this._input.peek()===";"&&this._options.selector_separator_newline&&(k=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!ae||k)&&L===0&&!U?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!ae&&L===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&G.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(H),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),G.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var dt=v==='"'||v==="'";this.preserveSingleSpace(dt||H),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&V&&this._output.add_new_line()}var vt=this._output.get_code(X);return vt},Q.exports.Beautifier=A},function(Q,o,y){var C=y(6).Options;function h(m){C.call(this,m,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var E=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||E;var S=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var I=0;I<S.length;I++)S[I]!=="expand"?this.brace_style="collapse":this.brace_style=S[I]}h.prototype=new C,Q.exports.Options=h}],M={};function f(Q){var o=M[Q];if(o!==void 0)return o.exports;var y=M[Q]={exports:{}};return te[Q](y,y.exports,f),y.exports}var oe=f(15);ne=oe})();var pe=ne;b=[],x=function(){return{css_beautify:pe}}.apply(je,b),x!==void 0&&(fn.exports=x)})()},40998:function(fn,je,b){var x,ne;(function(){var pe;(function(){"use strict";var oe=[,,function(C){function h(S){this.__parent=S,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var S=new h(this.__parent);return S.set_indent(this.__indent_count,this.__alignment_count),S},h.prototype.item=function(S){return S<0?this.__items[this.__items.length+S]:this.__items[S]},h.prototype.has_match=function(S){for(var I=this.__items.length-1;I>=0;I--)if(this.__items[I].match(S))return!0;return!1},h.prototype.set_indent=function(S,I){this.is_empty()&&(this.__indent_count=S||0,this.__alignment_count=I||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},h.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var S=this.__parent.current_line;return S.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),S.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),S.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,S.__items[0]===" "&&(S.__items.splice(0,1),S.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(S){this.__items.push(S);var I=S.lastIndexOf(`
`);I!==-1?this.__character_count=S.length-I:this.__character_count+=S.length},h.prototype.pop=function(){var S=null;return this.is_empty()||(S=this.__items.pop(),this.__character_count-=S.length),S},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var S="";return this.is_empty()?this.__parent.indent_empty_lines&&(S=this.__parent.get_indent_string(this.__indent_count)):(S=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),S+=this.__items.join("")),S};function m(S,I){this.__cache=[""],this.__indent_size=S.indent_size,this.__indent_string=S.indent_char,S.indent_with_tabs||(this.__indent_string=new Array(S.indent_size+1).join(S.indent_char)),I=I||"",S.indent_level>0&&(I=new Array(S.indent_level+1).join(this.__indent_string)),this.__base_string=I,this.__base_string_length=I.length}m.prototype.get_indent_size=function(S,I){var B=this.__base_string_length;return I=I||0,S<0&&(B=0),B+=S*this.__indent_size,B+=I,B},m.prototype.get_indent_string=function(S,I){var B=this.__base_string;return I=I||0,S<0&&(S=0,B=""),I+=S*this.__indent_size,this.__ensure_cache(I),B+=this.__cache[I],B},m.prototype.__ensure_cache=function(S){for(;S>=this.__cache.length;)this.__add_column()},m.prototype.__add_column=function(){var S=this.__cache.length,I=0,B="";this.__indent_size&&S>=this.__indent_size&&(I=Math.floor(S/this.__indent_size),S-=I*this.__indent_size,B=new Array(I+1).join(this.__indent_string)),S&&(B+=new Array(S+1).join(" ")),this.__cache.push(B)};function E(S,I){this.__indent_cache=new m(S,I),this.raw=!1,this._end_with_newline=S.end_with_newline,this.indent_size=S.indent_size,this.wrap_line_length=S.wrap_line_length,this.indent_empty_lines=S.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}E.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},E.prototype.get_line_number=function(){return this.__lines.length},E.prototype.get_indent_string=function(S,I){return this.__indent_cache.get_indent_string(S,I)},E.prototype.get_indent_size=function(S,I){return this.__indent_cache.get_indent_size(S,I)},E.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},E.prototype.add_new_line=function(S){return this.is_empty()||!S&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},E.prototype.get_code=function(S){this.trim(!0);var I=this.current_line.pop();I&&(I[I.length-1]===`
`&&(I=I.replace(/\n+$/g,"")),this.current_line.push(I)),this._end_with_newline&&this.__add_outputline();var B=this.__lines.join(`
`);return S!==`
`&&(B=B.replace(/[\n]/g,S)),B},E.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},E.prototype.set_indent=function(S,I){return S=S||0,I=I||0,this.next_line.set_indent(S,I),this.__lines.length>1?(this.current_line.set_indent(S,I),!0):(this.current_line.set_indent(),!1)},E.prototype.add_raw_token=function(S){for(var I=0;I<S.newlines;I++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(S.whitespace_before),this.current_line.push(S.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},E.prototype.add_token=function(S){this.__add_space_before_token(),this.current_line.push(S),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},E.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},E.prototype.remove_indent=function(S){for(var I=this.__lines.length;S<I;)this.__lines[S]._remove_indent(),S++;this.current_line._remove_wrap_indent()},E.prototype.trim=function(S){for(S=S===void 0?!1:S,this.current_line.trim();S&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},E.prototype.just_added_newline=function(){return this.current_line.is_empty()},E.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},E.prototype.ensure_empty_line_above=function(S,I){for(var B=this.__lines.length-2;B>=0;){var G=this.__lines[B];if(G.is_empty())break;if(G.item(0).indexOf(S)!==0&&G.item(-1)!==I){this.__lines.splice(B+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}B--}},C.exports.Output=E},function(C){function h(m,E,S,I){this.type=m,this.text=E,this.comments_before=null,this.newlines=S||0,this.whitespace_before=I||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}C.exports.Token=h},,,function(C){function h(S,I){this.raw_options=m(S,I),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}h.prototype._get_array=function(S,I){var B=this.raw_options[S],G=I||[];return typeof B=="object"?B!==null&&typeof B.concat=="function"&&(G=B.concat()):typeof B=="string"&&(G=B.split(/[^a-zA-Z0-9_\/\-]+/)),G},h.prototype._get_boolean=function(S,I){var B=this.raw_options[S],G=B===void 0?!!I:!!B;return G},h.prototype._get_characters=function(S,I){var B=this.raw_options[S],G=I||"";return typeof B=="string"&&(G=B.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),G},h.prototype._get_number=function(S,I){var B=this.raw_options[S];I=parseInt(I,10),isNaN(I)&&(I=0);var G=parseInt(B,10);return isNaN(G)&&(G=I),G},h.prototype._get_selection=function(S,I,B){var G=this._get_selection_list(S,I,B);if(G.length!==1)throw new Error("Invalid Option Value: The option '"+S+`' can only be one of the following values:
`+I+`
You passed in: '`+this.raw_options[S]+"'");return G[0]},h.prototype._get_selection_list=function(S,I,B){if(!I||I.length===0)throw new Error("Selection list cannot be empty.");if(B=B||[I[0]],!this._is_valid_selection(B,I))throw new Error("Invalid Default Value!");var G=this._get_array(S,B);if(!this._is_valid_selection(G,I))throw new Error("Invalid Option Value: The option '"+S+`' can contain only the following values:
`+I+`
You passed in: '`+this.raw_options[S]+"'");return G},h.prototype._is_valid_selection=function(S,I){return S.length&&I.length&&!S.some(function(B){return I.indexOf(B)===-1})};function m(S,I){var B={};S=E(S);var G;for(G in S)G!==I&&(B[G]=S[G]);if(I&&S[I])for(G in S[I])B[G]=S[I][G];return B}function E(S){var I={},B;for(B in S){var G=B.replace(/-/g,"_");I[G]=S[B]}return I}C.exports.Options=h,C.exports.normalizeOpts=E,C.exports.mergeOpts=m},,function(C){var h=RegExp.prototype.hasOwnProperty("sticky");function m(E){this.__input=E||"",this.__input_length=this.__input.length,this.__position=0}m.prototype.restart=function(){this.__position=0},m.prototype.back=function(){this.__position>0&&(this.__position-=1)},m.prototype.hasNext=function(){return this.__position<this.__input_length},m.prototype.next=function(){var E=null;return this.hasNext()&&(E=this.__input.charAt(this.__position),this.__position+=1),E},m.prototype.peek=function(E){var S=null;return E=E||0,E+=this.__position,E>=0&&E<this.__input_length&&(S=this.__input.charAt(E)),S},m.prototype.__match=function(E,S){E.lastIndex=S;var I=E.exec(this.__input);return I&&!(h&&E.sticky)&&I.index!==S&&(I=null),I},m.prototype.test=function(E,S){return S=S||0,S+=this.__position,S>=0&&S<this.__input_length?!!this.__match(E,S):!1},m.prototype.testChar=function(E,S){var I=this.peek(S);return E.lastIndex=0,I!==null&&E.test(I)},m.prototype.match=function(E){var S=this.__match(E,this.__position);return S?this.__position+=S[0].length:S=null,S},m.prototype.read=function(E,S,I){var B="",G;return E&&(G=this.match(E),G&&(B+=G[0])),S&&(G||!E)&&(B+=this.readUntil(S,I)),B},m.prototype.readUntil=function(E,S){var I="",B=this.__position;E.lastIndex=this.__position;var G=E.exec(this.__input);return G?(B=G.index,S&&(B+=G[0].length)):B=this.__input_length,I=this.__input.substring(this.__position,B),this.__position=B,I},m.prototype.readUntilAfter=function(E){return this.readUntil(E,!0)},m.prototype.get_regexp=function(E,S){var I=null,B="g";return S&&h&&(B="y"),typeof E=="string"&&E!==""?I=new RegExp(E,B):E&&(I=new RegExp(E.source,B)),I},m.prototype.get_literal_regexp=function(E){return RegExp(E.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},m.prototype.peekUntilAfter=function(E){var S=this.__position,I=this.readUntilAfter(E);return this.__position=S,I},m.prototype.lookBack=function(E){var S=this.__position-1;return S>=E.length&&this.__input.substring(S-E.length,S).toLowerCase()===E},C.exports.InputScanner=m},function(C,h,m){var E=m(8).InputScanner,S=m(3).Token,I=m(10).TokenStream,B=m(11).WhitespacePattern,G={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},R=function(O,D){this._input=new E(O),this._options=D||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new B(this._input)};R.prototype.tokenize=function(){this._input.restart(),this.__tokens=new I,this._reset();for(var O,D=new S(G.START,""),A=null,W=[],X=new I;D.type!==G.EOF;){for(O=this._get_next_token(D,A);this._is_comment(O);)X.add(O),O=this._get_next_token(D,A);X.isEmpty()||(O.comments_before=X,X=new I),O.parent=A,this._is_opening(O)?(W.push(A),A=O):A&&this._is_closing(O,A)&&(O.opened=A,A.closed=O,A=W.pop(),O.parent=A),O.previous=D,D.next=O,this.__tokens.add(O),D=O}return this.__tokens},R.prototype._is_first_token=function(){return this.__tokens.isEmpty()},R.prototype._reset=function(){},R.prototype._get_next_token=function(O,D){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(G.RAW,A):this._create_token(G.EOF,"")},R.prototype._is_comment=function(O){return!1},R.prototype._is_opening=function(O){return!1},R.prototype._is_closing=function(O,D){return!1},R.prototype._create_token=function(O,D){var A=new S(O,D,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},R.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},C.exports.Tokenizer=R,C.exports.TOKEN=G},function(C){function h(m){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=m}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position<this.__tokens_length},h.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__tokens[this.__position],this.__position+=1),m},h.prototype.peek=function(m){var E=null;return m=m||0,m+=this.__position,m>=0&&m<this.__tokens_length&&(E=this.__tokens[m]),E},h.prototype.add=function(m){this.__parent_token&&(m.parent=this.__parent_token),this.__tokens.push(m),this.__tokens_length+=1},C.exports.TokenStream=h},function(C,h,m){var E=m(12).Pattern;function S(I,B){E.call(this,I,B),B?this._line_regexp=this._input.get_regexp(B._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}S.prototype=new E,S.prototype.__set_whitespace_patterns=function(I,B){I+="\\t ",B+="\\n\\r",this._match_pattern=this._input.get_regexp("["+I+B+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+B+"]")},S.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var I=this._input.read(this._match_pattern);if(I===" ")this.whitespace_before_token=" ";else if(I){var B=this.__split(this._newline_regexp,I);this.newline_count=B.length-1,this.whitespace_before_token=B[this.newline_count]}return I},S.prototype.matching=function(I,B){var G=this._create();return G.__set_whitespace_patterns(I,B),G._update(),G},S.prototype._create=function(){return new S(this._input,this)},S.prototype.__split=function(I,B){I.lastIndex=0;for(var G=0,R=[],O=I.exec(B);O;)R.push(B.substring(G,O.index)),G=O.index+O[0].length,O=I.exec(B);return G<B.length?R.push(B.substring(G,B.length)):R.push(""),R},C.exports.WhitespacePattern=S},function(C){function h(m,E){this._input=m,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,E&&(this._starting_pattern=this._input.get_regexp(E._starting_pattern,!0),this._match_pattern=this._input.get_regexp(E._match_pattern,!0),this._until_pattern=this._input.get_regexp(E._until_pattern),this._until_after=E._until_after)}h.prototype.read=function(){var m=this._input.read(this._starting_pattern);return(!this._starting_pattern||m)&&(m+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),m},h.prototype.read_match=function(){return this._input.match(this._match_pattern)},h.prototype.until_after=function(m){var E=this._create();return E._until_after=!0,E._until_pattern=this._input.get_regexp(m),E._update(),E},h.prototype.until=function(m){var E=this._create();return E._until_after=!1,E._until_pattern=this._input.get_regexp(m),E._update(),E},h.prototype.starting_with=function(m){var E=this._create();return E._starting_pattern=this._input.get_regexp(m,!0),E._update(),E},h.prototype.matching=function(m){var E=this._create();return E._match_pattern=this._input.get_regexp(m,!0),E._update(),E},h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){},C.exports.Pattern=h},function(C){function h(m,E){m=typeof m=="string"?m:m.source,E=typeof E=="string"?E:E.source,this.__directives_block_pattern=new RegExp(m+/ beautify( \w+[:]\w+)+ /.source+E,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(m+/\sbeautify\signore:end\s/.source+E,"g")}h.prototype.get_directives=function(m){if(!m.match(this.__directives_block_pattern))return null;var E={};this.__directive_pattern.lastIndex=0;for(var S=this.__directive_pattern.exec(m);S;)E[S[1]]=S[2],S=this.__directive_pattern.exec(m);return E},h.prototype.readIgnored=function(m){return m.readUntilAfter(this.__directives_end_ignore_pattern)},C.exports.Directives=h},function(C,h,m){var E=m(12).Pattern,S={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function I(B,G){E.call(this,B,G),this.__template_pattern=null,this._disabled=Object.assign({},S),this._excluded=Object.assign({},S),G&&(this.__template_pattern=this._input.get_regexp(G.__template_pattern),this._excluded=Object.assign(this._excluded,G._excluded),this._disabled=Object.assign(this._disabled,G._disabled));var R=new E(B);this.__patterns={handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:R.starting_with(/{{{/).until_after(/}}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),php:R.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:R.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:R.starting_with(/{%/).until_after(/%}/),django_value:R.starting_with(/{{/).until_after(/}}/),django_comment:R.starting_with(/{#/).until_after(/#}/),smarty:R.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:R.starting_with(/{\*/).until_after(/\*}/),smarty_literal:R.starting_with(/{literal}/).until_after(/{\/literal}/)}}I.prototype=new E,I.prototype._create=function(){return new I(this._input,this)},I.prototype._update=function(){this.__set_templated_pattern()},I.prototype.disable=function(B){var G=this._create();return G._disabled[B]=!0,G._update(),G},I.prototype.read_options=function(B){var G=this._create();for(var R in S)G._disabled[R]=B.templating.indexOf(R)===-1;return G._update(),G},I.prototype.exclude=function(B){var G=this._create();return G._excluded[B]=!0,G._update(),G},I.prototype.read=function(){var B="";this._match_pattern?B=this._input.read(this._starting_pattern):B=this._input.read(this._starting_pattern,this.__template_pattern);for(var G=this._read_template();G;)this._match_pattern?G+=this._input.read(this._match_pattern):G+=this._input.readUntil(this.__template_pattern),B+=G,G=this._read_template();return this._until_after&&(B+=this._input.readUntilAfter(this._until_pattern)),B},I.prototype.__set_templated_pattern=function(){var B=[];this._disabled.php||B.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||B.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||B.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||B.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(B.push(this.__patterns.django._starting_pattern.source),B.push(this.__patterns.django_value._starting_pattern.source),B.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||B.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&B.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+B.join("|")+")")},I.prototype._read_template=function(){var B="",G=this._input.peek();if(G==="<"){var R=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&R==="?"&&(B=B||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&R==="%"&&(B=B||this.__patterns.erb.read())}else G==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(B=B||this.__patterns.handlebars_comment.read(),B=B||this.__patterns.handlebars_unescaped.read(),B=B||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(B=B||this.__patterns.django_value.read()),this._excluded.django||(B=B||this.__patterns.django_comment.read(),B=B||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(B=B||this.__patterns.smarty_comment.read(),B=B||this.__patterns.smarty_literal.read(),B=B||this.__patterns.smarty.read()));return B},C.exports.TemplatablePattern=I},,,,function(C,h,m){var E=m(19).Beautifier,S=m(20).Options;function I(B,G,R,O){var D=new E(B,G,R,O);return D.beautify()}C.exports=I,C.exports.defaultOptions=function(){return new S}},function(C,h,m){var E=m(20).Options,S=m(2).Output,I=m(21).Tokenizer,B=m(21).TOKEN,G=/\r\n|[\r\n]/,R=/\r\n|[\r\n]/g,O=function(U,k){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=U.max_preserve_newlines,this.preserve_newlines=U.preserve_newlines,this._output=new S(U,k)};O.prototype.current_line_has_match=function(U){return this._output.current_line.has_match(U)},O.prototype.set_space_before_token=function(U,k){this._output.space_before_token=U,this._output.non_breaking_space=k},O.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},O.prototype.add_raw_token=function(U){this._output.add_raw_token(U)},O.prototype.print_preserved_newlines=function(U){var k=0;U.type!==B.TEXT&&U.previous.type!==B.TEXT&&(k=U.newlines?1:0),this.preserve_newlines&&(k=U.newlines<this.max_preserve_newlines+1?U.newlines:this.max_preserve_newlines+1);for(var N=0;N<k;N++)this.print_newline(N>0);return k!==0},O.prototype.traverse_whitespace=function(U){return U.whitespace_before||U.newlines?(this.print_preserved_newlines(U)||(this._output.space_before_token=!0),!0):!1},O.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},O.prototype.print_newline=function(U){this._output.add_new_line(U)},O.prototype.print_token=function(U){U.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(U.text))},O.prototype.indent=function(){this.indent_level++},O.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},O.prototype.get_full_indent=function(U){return U=this.indent_level+(U||0),U<1?"":this._output.get_indent_string(U)};var D=function(U){for(var k=null,N=U.next;N.type!==B.EOF&&U.closed!==N;){if(N.type===B.ATTRIBUTE&&N.text==="type"){N.next&&N.next.type===B.EQUALS&&N.next.next&&N.next.next.type===B.VALUE&&(k=N.next.next.text);break}N=N.next}return k},A=function(U,k){var N=null,V=null;return k.closed?(U==="script"?N="text/javascript":U==="style"&&(N="text/css"),N=D(k)||N,N.search("text/css")>-1?V="css":N.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?V="javascript":N.search(/(text|application|dojo)\/(x-)?(html)/)>-1?V="html":N.search(/test\/null/)>-1&&(V="null"),V):null};function W(U,k){return k.indexOf(U)!==-1}function X(U,k,N){this.parent=U||null,this.tag=k?k.tag_name:"",this.indent_level=N||0,this.parser_token=k||null}function Y(U){this._printer=U,this._current_frame=null}Y.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},Y.prototype.record_tag=function(U){var k=new X(this._current_frame,U,this._printer.indent_level);this._current_frame=k},Y.prototype._try_pop_frame=function(U){var k=null;return U&&(k=U.parser_token,this._printer.indent_level=U.indent_level,this._current_frame=U.parent),k},Y.prototype._get_frame=function(U,k){for(var N=this._current_frame;N&&U.indexOf(N.tag)===-1;){if(k&&k.indexOf(N.tag)!==-1){N=null;break}N=N.parent}return N},Y.prototype.try_pop=function(U,k){var N=this._get_frame([U],k);return this._try_pop_frame(N)},Y.prototype.indent_to_tag=function(U){var k=this._get_frame(U);k&&(this._printer.indent_level=k.indent_level)};function L(U,k,N,V){this._source_text=U||"",k=k||{},this._js_beautify=N,this._css_beautify=V,this._tag_stack=null;var J=new E(k,"html");this._options=J,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}L.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var U=this._source_text,k=this._options.eol;this._options.eol==="auto"&&(k=`
`,U&&G.test(U)&&(k=U.match(G)[0])),U=U.replace(R,`
`);var N=U.match(/^[\t ]*/)[0],V={text:"",type:""},J=new se(this._options),H=new O(this._options,N),v=new I(U,this._options).tokenize();this._tag_stack=new Y(H);for(var g=null,F=v.next();F.type!==B.EOF;)F.type===B.TAG_OPEN||F.type===B.COMMENT?(g=this._handle_tag_open(H,F,J,V,v),J=g):F.type===B.ATTRIBUTE||F.type===B.EQUALS||F.type===B.VALUE||F.type===B.TEXT&&!J.tag_complete?g=this._handle_inside_tag(H,F,J,V):F.type===B.TAG_CLOSE?g=this._handle_tag_close(H,F,J):F.type===B.TEXT?g=this._handle_text(H,F,J):F.type===B.CONTROL_FLOW_OPEN?g=this._handle_control_flow_open(H,F):F.type===B.CONTROL_FLOW_CLOSE?g=this._handle_control_flow_close(H,F):H.add_raw_token(F),V=g,F=v.next();var ie=H._output.get_code(k);return ie},L.prototype._handle_control_flow_open=function(U,k){var N={text:k.text,type:k.type};return U.set_space_before_token(k.newlines||k.whitespace_before!=="",!0),k.newlines?U.print_preserved_newlines(k):U.set_space_before_token(k.newlines||k.whitespace_before!=="",!0),U.print_token(k),U.indent(),N},L.prototype._handle_control_flow_close=function(U,k){var N={text:k.text,type:k.type};return U.deindent(),k.newlines?U.print_preserved_newlines(k):U.set_space_before_token(k.newlines||k.whitespace_before!=="",!0),U.print_token(k),N},L.prototype._handle_tag_close=function(U,k,N){var V={text:k.text,type:k.type};return U.alignment_size=0,N.tag_complete=!0,U.set_space_before_token(k.newlines||k.whitespace_before!=="",!0),N.is_unformatted?U.add_raw_token(k):(N.tag_start_char==="<"&&(U.set_space_before_token(k.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&N.has_wrapped_attrs&&U.print_newline(!1)),U.print_token(k)),N.indent_content&&!(N.is_unformatted||N.is_content_unformatted)&&(U.indent(),N.indent_content=!1),!N.is_inline_element&&!(N.is_unformatted||N.is_content_unformatted)&&U.set_wrap_point(),V},L.prototype._handle_inside_tag=function(U,k,N,V){var J=N.has_wrapped_attrs,H={text:k.text,type:k.type};return U.set_space_before_token(k.newlines||k.whitespace_before!=="",!0),N.is_unformatted?U.add_raw_token(k):N.tag_start_char==="{"&&k.type===B.TEXT?U.print_preserved_newlines(k)?(k.newlines=0,U.add_raw_token(k)):U.print_token(k):(k.type===B.ATTRIBUTE?U.set_space_before_token(!0):(k.type===B.EQUALS||k.type===B.VALUE&&k.previous.type===B.EQUALS)&&U.set_space_before_token(!1),k.type===B.ATTRIBUTE&&N.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(U.traverse_whitespace(k),J=J||k.newlines!==0),this._is_wrap_attributes_force&&N.attr_count>=this._options.wrap_attributes_min_attrs&&(V.type!==B.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(U.print_newline(!1),J=!0)),U.print_token(k),J=J||U.previous_token_wrapped(),N.has_wrapped_attrs=J),H},L.prototype._handle_text=function(U,k,N){var V={text:k.text,type:"TK_CONTENT"};return N.custom_beautifier_name?this._print_custom_beatifier_text(U,k,N):N.is_unformatted||N.is_content_unformatted?U.add_raw_token(k):(U.traverse_whitespace(k),U.print_token(k)),V},L.prototype._print_custom_beatifier_text=function(U,k,N){var V=this;if(k.text!==""){var J=k.text,H,v=1,g="",F="";N.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?H=this._js_beautify:N.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?H=this._css_beautify:N.custom_beautifier_name==="html"&&(H=function(dt,vt){var be=new L(dt,vt,V._js_beautify,V._css_beautify);return be.beautify()}),this._options.indent_scripts==="keep"?v=0:this._options.indent_scripts==="separate"&&(v=-U.indent_level);var ie=U.get_full_indent(v);if(J=J.replace(/\n[ \t]*$/,""),N.custom_beautifier_name!=="html"&&J[0]==="<"&&J.match(/^(<!--|<!\[CDATA\[)/)){var ue=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(J);if(!ue){U.add_raw_token(k);return}g=ie+ue[1]+`
`,J=ue[4],ue[5]&&(F=ie+ue[5]),J=J.replace(/\n[ \t]*$/,""),(ue[2]||ue[3].indexOf(`
`)!==-1)&&(ue=ue[3].match(/[ \t]+$/),ue&&(k.whitespace_before=ue[0]))}if(J)if(H){var Le=function(){this.eol=`
`};Le.prototype=this._options.raw_options;var Je=new Le;J=H(ie+J,Je)}else{var rt=k.whitespace_before;rt&&(J=J.replace(new RegExp(`
(`+rt+")?","g"),`
`)),J=ie+J.replace(/\n/g,`
`+ie)}g&&(J?J=g+J+`
`+F:J=g+F),U.print_newline(!1),J&&(k.text=J,k.whitespace_before="",k.newlines=0,U.add_raw_token(k),U.print_newline(!0))}},L.prototype._handle_tag_open=function(U,k,N,V,J){var H=this._get_tag_open_token(k);if((N.is_unformatted||N.is_content_unformatted)&&!N.is_empty_element&&k.type===B.TAG_OPEN&&!H.is_start_tag?(U.add_raw_token(k),H.start_tag_token=this._tag_stack.try_pop(H.tag_name)):(U.traverse_whitespace(k),this._set_tag_position(U,k,H,N,V),H.is_inline_element||U.set_wrap_point(),U.print_token(k)),H.is_start_tag&&this._is_wrap_attributes_force){var v=0,g;do g=J.peek(v),g.type===B.ATTRIBUTE&&(H.attr_count+=1),v+=1;while(g.type!==B.EOF&&g.type!==B.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(H.alignment_size=k.text.length+1),!H.tag_complete&&!H.is_unformatted&&(U.alignment_size=H.alignment_size),H};var se=function(U,k,N){if(this.parent=k||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!N)this.tag_complete=!0;else{var V;this.tag_start_char=N.text[0],this.text=N.text,this.tag_start_char==="<"?(V=N.text.match(/^<([^\s>]*)/),this.tag_check=V?V[1]:""):(V=N.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=V?V[1]:"",(N.text.startsWith("{{#>")||N.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&N.next!==null?this.tag_check=N.next.text.split(" ")[0]:this.tag_check=N.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),N.type===B.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||N.closed&&N.closed.text==="/>";var J=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(J=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!U.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(J)))}};L.prototype._get_tag_open_token=function(U){var k=new se(this._options,this._tag_stack.get_parser_token(),U);return k.alignment_size=this._options.wrap_attributes_indent_size,k.is_end_tag=k.is_end_tag||W(k.tag_check,this._options.void_elements),k.is_empty_element=k.tag_complete||k.is_start_tag&&k.is_end_tag,k.is_unformatted=!k.tag_complete&&W(k.tag_check,this._options.unformatted),k.is_content_unformatted=!k.is_empty_element&&W(k.tag_check,this._options.content_unformatted),k.is_inline_element=W(k.tag_name,this._options.inline)||this._options.inline_custom_elements&&k.tag_name.includes("-")||k.tag_start_char==="{",k},L.prototype._set_tag_position=function(U,k,N,V,J){if(N.is_empty_element||(N.is_end_tag?N.start_tag_token=this._tag_stack.try_pop(N.tag_name):(this._do_optional_end_element(N)&&(N.is_inline_element||U.print_newline(!1)),this._tag_stack.record_tag(N),(N.tag_name==="script"||N.tag_name==="style")&&!(N.is_unformatted||N.is_content_unformatted)&&(N.custom_beautifier_name=A(N.tag_check,k)))),W(N.tag_check,this._options.extra_liners)&&(U.print_newline(!1),U._output.just_added_blankline()||U.print_newline(!0)),N.is_empty_element){if(N.tag_start_char==="{"&&N.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),N.indent_content=!0;var H=U.current_line_has_match(/{{#if/);H||U.print_newline(!1)}N.tag_name==="!--"&&J.type===B.TAG_CLOSE&&V.is_end_tag&&N.text.indexOf(`
`)===-1||(N.is_inline_element||N.is_unformatted||U.print_newline(!1),this._calcluate_parent_multiline(U,N))}else if(N.is_end_tag){var v=!1;v=N.start_tag_token&&N.start_tag_token.multiline_content,v=v||!N.is_inline_element&&!(V.is_inline_element||V.is_unformatted)&&!(J.type===B.TAG_CLOSE&&N.start_tag_token===V)&&J.type!=="TK_CONTENT",(N.is_content_unformatted||N.is_unformatted)&&(v=!1),v&&U.print_newline(!1)}else N.indent_content=!N.custom_beautifier_name,N.tag_start_char==="<"&&(N.tag_name==="html"?N.indent_content=this._options.indent_inner_html:N.tag_name==="head"?N.indent_content=this._options.indent_head_inner_html:N.tag_name==="body"&&(N.indent_content=this._options.indent_body_inner_html)),!(N.is_inline_element||N.is_unformatted)&&(J.type!=="TK_CONTENT"||N.is_content_unformatted)&&U.print_newline(!1),this._calcluate_parent_multiline(U,N)},L.prototype._calcluate_parent_multiline=function(U,k){k.parent&&U._output.just_added_newline()&&!((k.is_inline_element||k.is_unformatted)&&k.parent.is_inline_element)&&(k.parent.multiline_content=!0)};var ae=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],Be=["a","audio","del","ins","map","noscript","video"];L.prototype._do_optional_end_element=function(U){var k=null;if(!(U.is_empty_element||!U.is_start_tag||!U.parent)){if(U.tag_name==="body")k=k||this._tag_stack.try_pop("head");else if(U.tag_name==="li")k=k||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(U.tag_name==="dd"||U.tag_name==="dt")k=k||this._tag_stack.try_pop("dt",["dl"]),k=k||this._tag_stack.try_pop("dd",["dl"]);else if(U.parent.tag_name==="p"&&ae.indexOf(U.tag_name)!==-1){var N=U.parent.parent;(!N||Be.indexOf(N.tag_name)===-1)&&(k=k||this._tag_stack.try_pop("p"))}else U.tag_name==="rp"||U.tag_name==="rt"?(k=k||this._tag_stack.try_pop("rt",["ruby","rtc"]),k=k||this._tag_stack.try_pop("rp",["ruby","rtc"])):U.tag_name==="optgroup"?k=k||this._tag_stack.try_pop("optgroup",["select"]):U.tag_name==="option"?k=k||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):U.tag_name==="colgroup"?k=k||this._tag_stack.try_pop("caption",["table"]):U.tag_name==="thead"?(k=k||this._tag_stack.try_pop("caption",["table"]),k=k||this._tag_stack.try_pop("colgroup",["table"])):U.tag_name==="tbody"||U.tag_name==="tfoot"?(k=k||this._tag_stack.try_pop("caption",["table"]),k=k||this._tag_stack.try_pop("colgroup",["table"]),k=k||this._tag_stack.try_pop("thead",["table"]),k=k||this._tag_stack.try_pop("tbody",["table"])):U.tag_name==="tr"?(k=k||this._tag_stack.try_pop("caption",["table"]),k=k||this._tag_stack.try_pop("colgroup",["table"]),k=k||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(U.tag_name==="th"||U.tag_name==="td")&&(k=k||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),k=k||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return U.parent=this._tag_stack.get_parser_token(),k}},C.exports.Beautifier=L},function(C,h,m){var E=m(6).Options;function S(I){E.call(this,I,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}S.prototype=new E,C.exports.Options=S},function(C,h,m){var E=m(9).Tokenizer,S=m(9).TOKEN,I=m(13).Directives,B=m(14).TemplatablePattern,G=m(12).Pattern,R={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:S.START,RAW:S.RAW,EOF:S.EOF},O=new I(/<\!--/,/-->/),D=function(A,W){E.call(this,A,W),this._current_tag_name="";var X=new B(this._input).read_options(this._options),Y=new G(this._input);if(this.__patterns={word:X.until(/[\n\r\t <]/),word_control_flow_close_excluded:X.until(/[\n\r\t <}]/),single_quote:X.until_after(/'/),double_quote:X.until_after(/"/),attribute:X.until(/[\n\r\t =>]|\/>/),element_name:X.until(/[\n\r\t >\/]/),angular_control_flow_start:Y.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:Y.starting_with(/{{!--/).until_after(/--}}/),handlebars:Y.starting_with(/{{/).until_after(/}}/),handlebars_open:Y.until(/[\n\r\t }]/),handlebars_raw_close:Y.until(/}}/),comment:Y.starting_with(/<!--/).until_after(/-->/),cdata:Y.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:Y.starting_with(/<!\[/).until_after(/]>/),processing:Y.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var L=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=Y.matching(L).until_after(L)}};D.prototype=new E,D.prototype._is_comment=function(A){return!1},D.prototype._is_opening=function(A){return A.type===R.TAG_OPEN||A.type===R.CONTROL_FLOW_OPEN},D.prototype._is_closing=function(A,W){return A.type===R.TAG_CLOSE&&W&&((A.text===">"||A.text==="/>")&&W.text[0]==="<"||A.text==="}}"&&W.text[0]==="{"&&W.text[1]==="{")||A.type===R.CONTROL_FLOW_CLOSE&&A.text==="}"&&W.text.endsWith("{")},D.prototype._reset=function(){this._current_tag_name=""},D.prototype._get_next_token=function(A,W){var X=null;this._readWhitespace();var Y=this._input.peek();return Y===null?this._create_token(R.EOF,""):(X=X||this._read_open_handlebars(Y,W),X=X||this._read_attribute(Y,A,W),X=X||this._read_close(Y,W),X=X||this._read_script_and_style(Y,A),X=X||this._read_control_flows(Y,W),X=X||this._read_raw_content(Y,A,W),X=X||this._read_content_word(Y,W),X=X||this._read_comment_or_cdata(Y),X=X||this._read_processing(Y),X=X||this._read_open(Y,W),X=X||this._create_token(R.UNKNOWN,this._input.next()),X)},D.prototype._read_comment_or_cdata=function(A){var W=null,X=null,Y=null;if(A==="<"){var L=this._input.peek(1);L==="!"&&(X=this.__patterns.comment.read(),X?(Y=O.get_directives(X),Y&&Y.ignore==="start"&&(X+=O.readIgnored(this._input))):X=this.__patterns.cdata.read()),X&&(W=this._create_token(R.COMMENT,X),W.directives=Y)}return W},D.prototype._read_processing=function(A){var W=null,X=null,Y=null;if(A==="<"){var L=this._input.peek(1);(L==="!"||L==="?")&&(X=this.__patterns.conditional_comment.read(),X=X||this.__patterns.processing.read()),X&&(W=this._create_token(R.COMMENT,X),W.directives=Y)}return W},D.prototype._read_open=function(A,W){var X=null,Y=null;return(!W||W.type===R.CONTROL_FLOW_OPEN)&&A==="<"&&(X=this._input.next(),this._input.peek()==="/"&&(X+=this._input.next()),X+=this.__patterns.element_name.read(),Y=this._create_token(R.TAG_OPEN,X)),Y},D.prototype._read_open_handlebars=function(A,W){var X=null,Y=null;return(!W||W.type===R.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&A==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(X=this.__patterns.handlebars_comment.read(),X=X||this.__patterns.handlebars.read(),Y=this._create_token(R.COMMENT,X)):(X=this.__patterns.handlebars_open.read(),Y=this._create_token(R.TAG_OPEN,X))),Y},D.prototype._read_control_flows=function(A,W){var X="",Y=null;if(!this._options.templating.includes("angular"))return Y;if(A==="@"){if(X=this.__patterns.angular_control_flow_start.read(),X==="")return Y;for(var L=X.endsWith("(")?1:0,se=0;!(X.endsWith("{")&&L===se);){var ae=this._input.next();if(ae===null)break;ae==="("?L++:ae===")"&&se++,X+=ae}Y=this._create_token(R.CONTROL_FLOW_OPEN,X)}else A==="}"&&W&&W.type===R.CONTROL_FLOW_OPEN&&(X=this._input.next(),Y=this._create_token(R.CONTROL_FLOW_CLOSE,X));return Y},D.prototype._read_close=function(A,W){var X=null,Y=null;return W&&W.type===R.TAG_OPEN&&(W.text[0]==="<"&&(A===">"||A==="/"&&this._input.peek(1)===">")?(X=this._input.next(),A==="/"&&(X+=this._input.next()),Y=this._create_token(R.TAG_CLOSE,X)):W.text[0]==="{"&&A==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),Y=this._create_token(R.TAG_CLOSE,"}}"))),Y},D.prototype._read_attribute=function(A,W,X){var Y=null,L="";if(X&&X.text[0]==="<")if(A==="=")Y=this._create_token(R.EQUALS,this._input.next());else if(A==='"'||A==="'"){var se=this._input.next();A==='"'?se+=this.__patterns.double_quote.read():se+=this.__patterns.single_quote.read(),Y=this._create_token(R.VALUE,se)}else L=this.__patterns.attribute.read(),L&&(W.type===R.EQUALS?Y=this._create_token(R.VALUE,L):Y=this._create_token(R.ATTRIBUTE,L));return Y},D.prototype._is_content_unformatted=function(A){return this._options.void_elements.indexOf(A)===-1&&(this._options.content_unformatted.indexOf(A)!==-1||this._options.unformatted.indexOf(A)!==-1)},D.prototype._read_raw_content=function(A,W,X){var Y="";if(X&&X.text[0]==="{")Y=this.__patterns.handlebars_raw_close.read();else if(W.type===R.TAG_CLOSE&&W.opened.text[0]==="<"&&W.text[0]!=="/"){var L=W.opened.text.substr(1).toLowerCase();this._is_content_unformatted(L)&&(Y=this._input.readUntil(new RegExp("</"+L+"[\\n\\r\\t ]*?>","ig")))}return Y?this._create_token(R.TEXT,Y):null},D.prototype._read_script_and_style=function(A,W){if(W.type===R.TAG_CLOSE&&W.opened.text[0]==="<"&&W.text[0]!=="/"){var X=W.opened.text.substr(1).toLowerCase();if(X==="script"||X==="style"){var Y=this._read_comment_or_cdata(A);if(Y)return Y.type=R.TEXT,Y;var L=this._input.readUntil(new RegExp("</"+X+"[\\n\\r\\t ]*?>","ig"));if(L)return this._create_token(R.TEXT,L)}}return null},D.prototype._read_content_word=function(A,W){var X="";return this._options.unformatted_content_delimiter&&A===this._options.unformatted_content_delimiter[0]&&(X=this.__patterns.unformatted_content_delimiter.read()),X||(X=W&&W.type===R.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),X?this._create_token(R.TEXT,X):null},C.exports.Tokenizer=D,C.exports.TOKEN=R}],Q={};function o(C){var h=Q[C];if(h!==void 0)return h.exports;var m=Q[C]={exports:{}};return oe[C](m,m.exports,o),m.exports}var y=o(18);pe=y})();var te=pe;if(1)x=[b,b(58553),b(87804)],ne=function(oe){var Q=b(58553),o=b(87804);return{html_beautify:function(y,C){return te(y,C,Q.js_beautify,o.css_beautify)}}}.apply(je,x),ne!==void 0&&(fn.exports=ne);else var M,f})()},58553:function(fn,je){var b,x;(function(){var ne;(function(){"use strict";var te=[function(Q,o,y){var C=y(1).Beautifier,h=y(5).Options;function m(E,S){var I=new C(E,S);return I.beautify()}Q.exports=m,Q.exports.defaultOptions=function(){return new h}},function(Q,o,y){var C=y(2).Output,h=y(3).Token,m=y(4),E=y(5).Options,S=y(7).Tokenizer,I=y(7).line_starters,B=y(7).positionable_operators,G=y(7).TOKEN;function R(g,F){return F.indexOf(g)!==-1}function O(g){return g.replace(/^\s+/g,"")}function D(g){for(var F={},ie=0;ie<g.length;ie++)F[g[ie].replace(/-/g,"_")]=g[ie];return F}function A(g,F){return g&&g.type===G.RESERVED&&g.text===F}function W(g,F){return g&&g.type===G.RESERVED&&R(g.text,F)}var X=["case","return","do","if","throw","else","await","break","continue","async"],Y=["before-newline","after-newline","preserve-newline"],L=D(Y),se=[L.before_newline,L.preserve_newline],ae={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Be(g,F){F.multiline_frame||F.mode===ae.ForInitializer||F.mode===ae.Conditional||g.remove_indent(F.start_line_index)}function U(g){g=g.replace(m.allLineBreaks,`
`);for(var F=[],ie=g.indexOf(`
`);ie!==-1;)F.push(g.substring(0,ie)),g=g.substring(ie+1),ie=g.indexOf(`
`);return g.length&&F.push(g),F}function k(g){return g===ae.ArrayLiteral}function N(g){return R(g,[ae.Expression,ae.ForInitializer,ae.Conditional])}function V(g,F){for(var ie=0;ie<g.length;ie++){var ue=g[ie].trim();if(ue.charAt(0)!==F)return!1}return!0}function J(g,F){for(var ie=0,ue=g.length,Le;ie<ue;ie++)if(Le=g[ie],Le&&Le.indexOf(F)!==0)return!1;return!0}function H(g,F){F=F||{},this._source_text=g||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new E(F)}H.prototype.create_flags=function(g,F){var ie=0;g&&(ie=g.indentation_level,!this._output.just_added_newline()&&g.line_indent_level>ie&&(ie=g.line_indent_level));var ue={mode:F,parent:g,last_token:g?g.last_token:new h(G.START_BLOCK,""),last_word:g?g.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:ie,alignment:0,line_indent_level:g?g.line_indent_level:ie,start_line_index:this._output.get_line_number(),ternary_depth:0};return ue},H.prototype._reset=function(g){var F=g.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new C(this._options,F),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(ae.BlockStatement);var ie=new S(g,this._options);return this._tokens=ie.tokenize(),g},H.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g,F=this._reset(this._source_text),ie=this._options.eol;this._options.eol==="auto"&&(ie=`
`,F&&m.lineBreak.test(F||"")&&(ie=F.match(m.lineBreak)[0]));for(var ue=this._tokens.next();ue;)this.handle_token(ue),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ue,ue=this._tokens.next();return g=this._output.get_code(ie),g},H.prototype.handle_token=function(g,F){g.type===G.START_EXPR?this.handle_start_expr(g):g.type===G.END_EXPR?this.handle_end_expr(g):g.type===G.START_BLOCK?this.handle_start_block(g):g.type===G.END_BLOCK?this.handle_end_block(g):g.type===G.WORD?this.handle_word(g):g.type===G.RESERVED?this.handle_word(g):g.type===G.SEMICOLON?this.handle_semicolon(g):g.type===G.STRING?this.handle_string(g):g.type===G.EQUALS?this.handle_equals(g):g.type===G.OPERATOR?this.handle_operator(g):g.type===G.COMMA?this.handle_comma(g):g.type===G.BLOCK_COMMENT?this.handle_block_comment(g,F):g.type===G.COMMENT?this.handle_comment(g,F):g.type===G.DOT?this.handle_dot(g):g.type===G.EOF?this.handle_eof(g):g.type===G.UNKNOWN?this.handle_unknown(g,F):this.handle_unknown(g,F)},H.prototype.handle_whitespace_and_comments=function(g,F){var ie=g.newlines,ue=this._options.keep_array_indentation&&k(this._flags.mode);if(g.comments_before)for(var Le=g.comments_before.next();Le;)this.handle_whitespace_and_comments(Le,F),this.handle_token(Le,F),Le=g.comments_before.next();if(ue)for(var Je=0;Je<ie;Je+=1)this.print_newline(Je>0,F);else if(this._options.max_preserve_newlines&&ie>this._options.max_preserve_newlines&&(ie=this._options.max_preserve_newlines),this._options.preserve_newlines&&ie>1){this.print_newline(!1,F);for(var rt=1;rt<ie;rt+=1)this.print_newline(!0,F)}};var v=["async","break","continue","return","throw","yield"];H.prototype.allow_wrap_or_preserved_newline=function(g,F){if(F=F===void 0?!1:F,!this._output.just_added_newline()){var ie=this._options.preserve_newlines&&g.newlines||F,ue=R(this._flags.last_token.text,B)||R(g.text,B);if(ue){var Le=R(this._flags.last_token.text,B)&&R(this._options.operator_position,se)||R(g.text,B);ie=ie&&Le}if(ie)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(W(this._flags.last_token,v))return;this._output.set_wrap_point()}}},H.prototype.print_newline=function(g,F){if(!F&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==G.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ie=this._tokens.peek();this._flags.mode===ae.Statement&&!(this._flags.if_block&&A(ie,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(g)&&(this._flags.multiline_frame=!0)},H.prototype.print_token_line_indentation=function(g){this._output.just_added_newline()&&(this._options.keep_array_indentation&&g.newlines&&(g.text==="["||k(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(g.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},H.prototype.print_token=function(g){if(this._output.raw){this._output.add_raw_token(g);return}if(this._options.comma_first&&g.previous&&g.previous.type===G.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var F=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(F),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(g),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(g),this._output.non_breaking_space=!0,this._output.add_token(g.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},H.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},H.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.set_mode=function(g){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,g),this._flags=this.create_flags(this._previous_flags,g),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},H.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===ae.Statement&&Be(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.start_of_object_property=function(){return this._flags.parent.mode===ae.ObjectLiteral&&this._flags.mode===ae.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||W(this._flags.last_token,["get","set"]))},H.prototype.start_of_statement=function(g){var F=!1;return F=F||W(this._flags.last_token,["var","let","const"])&&g.type===G.WORD,F=F||A(this._flags.last_token,"do"),F=F||!(this._flags.parent.mode===ae.ObjectLiteral&&this._flags.mode===ae.Statement)&&W(this._flags.last_token,v)&&!g.newlines,F=F||A(this._flags.last_token,"else")&&!(A(g,"if")&&!g.comments_before),F=F||this._flags.last_token.type===G.END_EXPR&&(this._previous_flags.mode===ae.ForInitializer||this._previous_flags.mode===ae.Conditional),F=F||this._flags.last_token.type===G.WORD&&this._flags.mode===ae.BlockStatement&&!this._flags.in_case&&!(g.text==="--"||g.text==="++")&&this._last_last_text!=="function"&&g.type!==G.WORD&&g.type!==G.RESERVED,F=F||this._flags.mode===ae.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||W(this._flags.last_token,["get","set"])),F?(this.set_mode(ae.Statement),this.indent(),this.handle_whitespace_and_comments(g,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g,W(g,["do","for","if","while"])),!0):!1},H.prototype.handle_start_expr=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g);var F=ae.Expression;if(g.text==="["){if(this._flags.last_token.type===G.WORD||this._flags.last_token.text===")"){W(this._flags.last_token,I)&&(this._output.space_before_token=!0),this.print_token(g),this.set_mode(F),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}F=ae.ArrayLiteral,k(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),R(this._flags.last_token.type,[G.START_EXPR,G.END_EXPR,G.WORD,G.OPERATOR,G.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===G.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,F=ae.ForInitializer):R(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,F=ae.Conditional):R(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&g.whitespace_before===""?this._output.space_before_token=!1:(R(this._flags.last_token.text,I)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===G.EQUALS||this._flags.last_token.type===G.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g);else if(this._flags.last_token.type===G.WORD){this._output.space_before_token=!1;var ie=this._tokens.peek(-3);if(this._options.space_after_named_function&&ie){var ue=this._tokens.peek(-4);W(ie,["async","function"])||ie.text==="*"&&W(ue,["async","function"])?this._output.space_before_token=!0:this._flags.mode===ae.ObjectLiteral?(ie.text==="{"||ie.text===","||ie.text==="*"&&(ue.text==="{"||ue.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(g);(this._flags.last_token.type===G.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===ae.ObjectLiteral&&R(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===G.START_BLOCK?this.print_newline():(this._flags.last_token.type===G.END_EXPR||this._flags.last_token.type===G.START_EXPR||this._flags.last_token.type===G.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===G.COMMA)&&this.allow_wrap_or_preserved_newline(g,g.newlines),this.print_token(g),this.set_mode(F),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},H.prototype.handle_end_expr=function(g){for(;this._flags.mode===ae.Statement;)this.restore_mode();this.handle_whitespace_and_comments(g),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(g,g.text==="]"&&k(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===G.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(g),this.restore_mode(),Be(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===ae.Conditional&&(this._previous_flags.mode=ae.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},H.prototype.handle_start_block=function(g){this.handle_whitespace_and_comments(g);var F=this._tokens.peek(),ie=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===G.END_EXPR?(this.set_mode(ae.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(ae.BlockStatement):ie&&(R(ie.text,[":",","])&&R(F.type,[G.STRING,G.WORD,G.RESERVED])||R(F.text,["get","set","..."])&&R(ie.type,[G.WORD,G.RESERVED]))?R(this._last_last_text,["class","interface"])&&!R(ie.text,[":",","])?this.set_mode(ae.BlockStatement):this.set_mode(ae.ObjectLiteral):this._flags.last_token.type===G.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(ae.BlockStatement):R(this._flags.last_token.type,[G.EQUALS,G.START_EXPR,G.COMMA,G.OPERATOR])||W(this._flags.last_token,["return","throw","import","default"])?this.set_mode(ae.ObjectLiteral):this.set_mode(ae.BlockStatement),this._flags.last_token&&W(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var ue=!F.comments_before&&F.text==="}",Le=ue&&this._flags.last_word==="function"&&this._flags.last_token.type===G.END_EXPR;if(this._options.brace_preserve_inline){var Je=0,rt=null;this._flags.inline_frame=!0;do if(Je+=1,rt=this._tokens.peek(Je-1),rt.newlines){this._flags.inline_frame=!1;break}while(rt.type!==G.EOF&&!(rt.type===G.END_BLOCK&&rt.opened===g))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&g.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==G.OPERATOR&&(Le||this._flags.last_token.type===G.EQUALS||W(this._flags.last_token,X)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(k(this._previous_flags.mode)&&(this._flags.last_token.type===G.START_EXPR||this._flags.last_token.type===G.COMMA)&&((this._flags.last_token.type===G.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===G.COMMA||this._flags.last_token.type===G.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(g),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==G.OPERATOR&&this._flags.last_token.type!==G.START_EXPR&&(R(this._flags.last_token.type,[G.START_BLOCK,G.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(g),this.indent(),!ue&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},H.prototype.handle_end_block=function(g){for(this.handle_whitespace_and_comments(g);this._flags.mode===ae.Statement;)this.restore_mode();var F=this._flags.last_token.type===G.START_BLOCK;this._flags.inline_frame&&!F?this._output.space_before_token=!0:this._options.brace_style==="expand"?F||this.print_newline():F||(k(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(g)},H.prototype.handle_word=function(g){if(g.type===G.RESERVED){if(R(g.text,["set","get"])&&this._flags.mode!==ae.ObjectLiteral)g.type=G.WORD;else if(g.text==="import"&&R(this._tokens.peek().text,["(","."]))g.type=G.WORD;else if(R(g.text,["as","from"])&&!this._flags.import_block)g.type=G.WORD;else if(this._flags.mode===ae.ObjectLiteral){var F=this._tokens.peek();F.text===":"&&(g.type=G.WORD)}}if(this.start_of_statement(g)?W(this._flags.last_token,["var","let","const"])&&g.type===G.WORD&&(this._flags.declaration_statement=!0):g.newlines&&!N(this._flags.mode)&&(this._flags.last_token.type!==G.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==G.EQUALS&&(this._options.preserve_newlines||!W(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(g),this.print_newline()):this.handle_whitespace_and_comments(g),this._flags.do_block&&!this._flags.do_while)if(A(g,"while")){this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&A(g,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===ae.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&W(g,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(g),this._flags.in_case=!0;return}if((this._flags.last_token.type===G.COMMA||this._flags.last_token.type===G.START_EXPR||this._flags.last_token.type===G.EQUALS||this._flags.last_token.type===G.OPERATOR)&&!this.start_of_object_property()&&!(R(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===ae.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(g),A(g,"function")){(R(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(R(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===G.OPERATOR))&&!this._output.just_added_blankline()&&!g.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===G.RESERVED||this._flags.last_token.type===G.WORD?W(this._flags.last_token,["get","set","new","export"])||W(this._flags.last_token,v)?this._output.space_before_token=!0:A(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===G.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(N(this._flags.mode)||k(this._flags.mode))||this.print_newline(),this.print_token(g),this._flags.last_word=g.text;return}var ie="NONE";if(this._flags.last_token.type===G.END_BLOCK?this._previous_flags.inline_frame?ie="SPACE":W(g,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&g.newlines?ie="NEWLINE":(ie="SPACE",this._output.space_before_token=!0):ie="NEWLINE":this._flags.last_token.type===G.SEMICOLON&&this._flags.mode===ae.BlockStatement?ie="NEWLINE":this._flags.last_token.type===G.SEMICOLON&&N(this._flags.mode)?ie="SPACE":this._flags.last_token.type===G.STRING?ie="NEWLINE":this._flags.last_token.type===G.RESERVED||this._flags.last_token.type===G.WORD||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===ae.ObjectLiteral&&R(this._last_last_text,["{",","]))?ie="SPACE":this._flags.last_token.type===G.START_BLOCK?this._flags.inline_frame?ie="SPACE":ie="NEWLINE":this._flags.last_token.type===G.END_EXPR&&(this._output.space_before_token=!0,ie="NEWLINE"),W(g,I)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ie="SPACE":ie="NEWLINE"),W(g,["else","catch","finally"]))if((!(this._flags.last_token.type===G.END_BLOCK&&this._previous_flags.mode===ae.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&g.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ue=this._output.current_line;ue.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ie==="NEWLINE"?W(this._flags.last_token,X)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&W(g,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==G.END_EXPR?(this._flags.last_token.type!==G.START_EXPR||!W(g,["var","let","const"]))&&this._flags.last_token.text!==":"&&(A(g,"if")&&A(g.previous,"else")?this._output.space_before_token=!0:this.print_newline()):W(g,I)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&k(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ie==="SPACE"&&(this._output.space_before_token=!0);g.previous&&(g.previous.type===G.WORD||g.previous.type===G.RESERVED)&&(this._output.space_before_token=!0),this.print_token(g),this._flags.last_word=g.text,g.type===G.RESERVED&&(g.text==="do"?this._flags.do_block=!0:g.text==="if"?this._flags.if_block=!0:g.text==="import"?this._flags.import_block=!0:this._flags.import_block&&A(g,"from")&&(this._flags.import_block=!1))},H.prototype.handle_semicolon=function(g){this.start_of_statement(g)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(g);for(var F=this._tokens.peek();this._flags.mode===ae.Statement&&!(this._flags.if_block&&A(F,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(g)},H.prototype.handle_string=function(g){g.text.startsWith("`")&&g.newlines===0&&g.whitespace_before===""&&(g.previous.text===")"||this._flags.last_token.type===G.WORD)||(this.start_of_statement(g)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(g),this._flags.last_token.type===G.RESERVED||this._flags.last_token.type===G.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===G.COMMA||this._flags.last_token.type===G.START_EXPR||this._flags.last_token.type===G.EQUALS||this._flags.last_token.type===G.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(g):g.text.startsWith("`")&&this._flags.last_token.type===G.END_EXPR&&(g.previous.text==="]"||g.previous.text===")")&&g.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(g)},H.prototype.handle_equals=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0},H.prototype.handle_comma=function(g){this.handle_whitespace_and_comments(g,!0),this.print_token(g),this._output.space_before_token=!0,this._flags.declaration_statement?(N(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(g)):this._flags.mode===ae.ObjectLiteral||this._flags.mode===ae.Statement&&this._flags.parent.mode===ae.ObjectLiteral?(this._flags.mode===ae.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(g)},H.prototype.handle_operator=function(g){var F=g.text==="*"&&(W(this._flags.last_token,["function","yield"])||R(this._flags.last_token.type,[G.START_BLOCK,G.COMMA,G.END_BLOCK,G.SEMICOLON])),ie=R(g.text,["-","+"])&&(R(this._flags.last_token.type,[G.START_BLOCK,G.START_EXPR,G.EQUALS,G.OPERATOR])||R(this._flags.last_token.text,I)||this._flags.last_token.text===",");if(!this.start_of_statement(g)){var ue=!F;this.handle_whitespace_and_comments(g,ue)}if(g.text==="*"&&this._flags.last_token.type===G.DOT){this.print_token(g);return}if(g.text==="::"){this.print_token(g);return}if(R(g.text,["-","+"])&&this.start_of_object_property()){this.print_token(g);return}if(this._flags.last_token.type===G.OPERATOR&&R(this._options.operator_position,se)&&this.allow_wrap_or_preserved_newline(g),g.text===":"&&this._flags.in_case){this.print_token(g),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==G.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Le=!0,Je=!0,rt=!1;if(g.text===":"?this._flags.ternary_depth===0?Le=!1:(this._flags.ternary_depth-=1,rt=!0):g.text==="?"&&(this._flags.ternary_depth+=1),!ie&&!F&&this._options.preserve_newlines&&R(g.text,B)){var dt=g.text===":",vt=dt&&rt,be=dt&&!rt;switch(this._options.operator_position){case L.before_newline:this._output.space_before_token=!be,this.print_token(g),(!dt||vt)&&this.allow_wrap_or_preserved_newline(g),this._output.space_before_token=!0;return;case L.after_newline:this._output.space_before_token=!0,!dt||vt?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(g):this._output.space_before_token=!1,this.print_token(g),this._output.space_before_token=!0;return;case L.preserve_newline:be||this.allow_wrap_or_preserved_newline(g),Le=!(this._output.just_added_newline()||be),this._output.space_before_token=Le,this.print_token(g),this._output.space_before_token=!0;return}}if(F){this.allow_wrap_or_preserved_newline(g),Le=!1;var Tt=this._tokens.peek();Je=Tt&&R(Tt.type,[G.WORD,G.RESERVED])}else if(g.text==="...")this.allow_wrap_or_preserved_newline(g),Le=this._flags.last_token.type===G.START_BLOCK,Je=!1;else if(R(g.text,["--","++","!","~"])||ie){if((this._flags.last_token.type===G.COMMA||this._flags.last_token.type===G.START_EXPR)&&this.allow_wrap_or_preserved_newline(g),Le=!1,Je=!1,g.newlines&&(g.text==="--"||g.text==="++"||g.text==="~")){var tt=W(this._flags.last_token,X)&&g.newlines;tt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(tt,!0)}this._flags.last_token.text===";"&&N(this._flags.mode)&&(Le=!0),this._flags.last_token.type===G.RESERVED?Le=!0:this._flags.last_token.type===G.END_EXPR?Le=!(this._flags.last_token.text==="]"&&(g.text==="--"||g.text==="++")):this._flags.last_token.type===G.OPERATOR&&(Le=R(g.text,["--","-","++","+"])&&R(this._flags.last_token.text,["--","-","++","+"]),R(g.text,["+","-"])&&R(this._flags.last_token.text,["--","++"])&&(Je=!0)),(this._flags.mode===ae.BlockStatement&&!this._flags.inline_frame||this._flags.mode===ae.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Le,this.print_token(g),this._output.space_before_token=Je},H.prototype.handle_block_comment=function(g,F){if(this._output.raw){this._output.add_raw_token(g),g.directives&&g.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(g.directives){this.print_newline(!1,F),this.print_token(g),g.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!m.newline.test(g.text)&&!g.newlines){this._output.space_before_token=!0,this.print_token(g),this._output.space_before_token=!0;return}else this.print_block_commment(g,F)},H.prototype.print_block_commment=function(g,F){var ie=U(g.text),ue,Le=!1,Je=!1,rt=g.whitespace_before,dt=rt.length;if(this.print_newline(!1,F),this.print_token_line_indentation(g),this._output.add_token(ie[0]),this.print_newline(!1,F),ie.length>1){for(ie=ie.slice(1),Le=V(ie,"*"),Je=J(ie,rt),Le&&(this._flags.alignment=1),ue=0;ue<ie.length;ue++)Le?(this.print_token_line_indentation(g),this._output.add_token(O(ie[ue]))):Je&&ie[ue]?(this.print_token_line_indentation(g),this._output.add_token(ie[ue].substring(dt))):(this._output.current_line.set_indent(-1),this._output.add_token(ie[ue])),this.print_newline(!1,F);this._flags.alignment=0}},H.prototype.handle_comment=function(g,F){g.newlines?this.print_newline(!1,F):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(g),this.print_newline(!1,F)},H.prototype.handle_dot=function(g){this.start_of_statement(g)||this.handle_whitespace_and_comments(g,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),W(this._flags.last_token,X)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(g,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(g)},H.prototype.handle_unknown=function(g,F){this.print_token(g),g.text[g.text.length-1]===`
`&&this.print_newline(!1,F)},H.prototype.handle_eof=function(g){for(;this._flags.mode===ae.Statement;)this.restore_mode();this.handle_whitespace_and_comments(g)},Q.exports.Beautifier=H},function(Q){function o(h){this.__parent=h,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var h=new o(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},o.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},o.prototype.has_match=function(h){for(var m=this.__items.length-1;m>=0;m--)if(this.__items[m].match(h))return!0;return!1},o.prototype.set_indent=function(h,m){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=m||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(h){this.__items.push(h);var m=h.lastIndexOf(`
`);m!==-1?this.__character_count=h.length-m:this.__character_count+=h.length},o.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function y(h,m){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),m=m||"",h.indent_level>0&&(m=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=m,this.__base_string_length=m.length}y.prototype.get_indent_size=function(h,m){var E=this.__base_string_length;return m=m||0,h<0&&(E=0),E+=h*this.__indent_size,E+=m,E},y.prototype.get_indent_string=function(h,m){var E=this.__base_string;return m=m||0,h<0&&(h=0,E=""),m+=h*this.__indent_size,this.__ensure_cache(m),E+=this.__cache[m],E},y.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var h=this.__cache.length,m=0,E="";this.__indent_size&&h>=this.__indent_size&&(m=Math.floor(h/this.__indent_size),h-=m*this.__indent_size,E=new Array(m+1).join(this.__indent_string)),h&&(E+=new Array(h+1).join(" ")),this.__cache.push(E)};function C(h,m){this.__indent_cache=new y(h,m),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}C.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},C.prototype.get_line_number=function(){return this.__lines.length},C.prototype.get_indent_string=function(h,m){return this.__indent_cache.get_indent_string(h,m)},C.prototype.get_indent_size=function(h,m){return this.__indent_cache.get_indent_size(h,m)},C.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},C.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},C.prototype.get_code=function(h){this.trim(!0);var m=this.current_line.pop();m&&(m[m.length-1]===`
`&&(m=m.replace(/\n+$/g,"")),this.current_line.push(m)),this._end_with_newline&&this.__add_outputline();var E=this.__lines.join(`
`);return h!==`
`&&(E=E.replace(/[\n]/g,h)),E},C.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},C.prototype.set_indent=function(h,m){return h=h||0,m=m||0,this.next_line.set_indent(h,m),this.__lines.length>1?(this.current_line.set_indent(h,m),!0):(this.current_line.set_indent(),!1)},C.prototype.add_raw_token=function(h){for(var m=0;m<h.newlines;m++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},C.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},C.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},C.prototype.remove_indent=function(h){for(var m=this.__lines.length;h<m;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},C.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},C.prototype.just_added_newline=function(){return this.current_line.is_empty()},C.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},C.prototype.ensure_empty_line_above=function(h,m){for(var E=this.__lines.length-2;E>=0;){var S=this.__lines[E];if(S.is_empty())break;if(S.item(0).indexOf(h)!==0&&S.item(-1)!==m){this.__lines.splice(E+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}E--}},Q.exports.Output=C},function(Q){function o(y,C,h,m){this.type=y,this.text=C,this.comments_before=null,this.newlines=h||0,this.whitespace_before=m||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}Q.exports.Token=o},function(Q,o){var y="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",C="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",m="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",E="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",S="(?:"+E+"|["+y+h+"])",I="(?:"+E+"|["+C+h+m+"])*";o.identifier=new RegExp(S+I,"g"),o.identifierStart=new RegExp(S),o.identifierMatch=new RegExp("(?:"+E+"|["+C+h+m+"])+");var B=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(Q,o,y){var C=y(6).Options,h=["before-newline","after-newline","preserve-newline"];function m(E){C.call(this,E,"js");var S=this.raw_options.brace_style||null;S==="expand-strict"?this.raw_options.brace_style="expand":S==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var I=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var B=0;B<I.length;B++)I[B]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=I[B];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",h),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}m.prototype=new C,Q.exports.Options=m},function(Q){function o(h,m){this.raw_options=y(h,m),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(h,m){var E=this.raw_options[h],S=m||[];return typeof E=="object"?E!==null&&typeof E.concat=="function"&&(S=E.concat()):typeof E=="string"&&(S=E.split(/[^a-zA-Z0-9_\/\-]+/)),S},o.prototype._get_boolean=function(h,m){var E=this.raw_options[h],S=E===void 0?!!m:!!E;return S},o.prototype._get_characters=function(h,m){var E=this.raw_options[h],S=m||"";return typeof E=="string"&&(S=E.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),S},o.prototype._get_number=function(h,m){var E=this.raw_options[h];m=parseInt(m,10),isNaN(m)&&(m=0);var S=parseInt(E,10);return isNaN(S)&&(S=m),S},o.prototype._get_selection=function(h,m,E){var S=this._get_selection_list(h,m,E);if(S.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
`+m+`
You passed in: '`+this.raw_options[h]+"'");return S[0]},o.prototype._get_selection_list=function(h,m,E){if(!m||m.length===0)throw new Error("Selection list cannot be empty.");if(E=E||[m[0]],!this._is_valid_selection(E,m))throw new Error("Invalid Default Value!");var S=this._get_array(h,E);if(!this._is_valid_selection(S,m))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
`+m+`
You passed in: '`+this.raw_options[h]+"'");return S},o.prototype._is_valid_selection=function(h,m){return h.length&&m.length&&!h.some(function(E){return m.indexOf(E)===-1})};function y(h,m){var E={};h=C(h);var S;for(S in h)S!==m&&(E[S]=h[S]);if(m&&h[m])for(S in h[m])E[S]=h[m][S];return E}function C(h){var m={},E;for(E in h){var S=E.replace(/-/g,"_");m[S]=h[E]}return m}Q.exports.Options=o,Q.exports.normalizeOpts=C,Q.exports.mergeOpts=y},function(Q,o,y){var C=y(8).InputScanner,h=y(9).Tokenizer,m=y(9).TOKEN,E=y(13).Directives,S=y(4),I=y(12).Pattern,B=y(14).TemplatablePattern;function G(V,J){return J.indexOf(V)!==-1}var R={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:m.START,RAW:m.RAW,EOF:m.EOF},O=new E(/\/\*/,/\*\//),D=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,A=/[0-9]/,W=/[^\d\.]/,X=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),Y=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";Y=Y.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),Y="\\?\\.(?!\\d) "+Y,Y=Y.replace(/ /g,"|");var L=new RegExp(Y),se="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),ae=se.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Be=new RegExp("^(?:"+ae.join("|")+")$"),U,k=function(V,J){h.call(this,V,J),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var H=new I(this._input),v=new B(this._input).read_options(this._options);this.__patterns={template:v,identifier:v.starting_with(S.identifier).matching(S.identifierMatch),number:H.matching(D),punct:H.matching(L),comment:H.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:H.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:H.matching(/<!--/),html_comment_end:H.matching(/-->/),include:H.starting_with(/#include/).until_after(S.lineBreak),shebang:H.starting_with(/#!/).until_after(S.lineBreak),xml:H.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:v.until(/['\\\n\r\u2028\u2029]/),double_quote:v.until(/["\\\n\r\u2028\u2029]/),template_text:v.until(/[`\\$]/),template_expression:v.until(/[`}\\]/)}};k.prototype=new h,k.prototype._is_comment=function(V){return V.type===R.COMMENT||V.type===R.BLOCK_COMMENT||V.type===R.UNKNOWN},k.prototype._is_opening=function(V){return V.type===R.START_BLOCK||V.type===R.START_EXPR},k.prototype._is_closing=function(V,J){return(V.type===R.END_BLOCK||V.type===R.END_EXPR)&&J&&(V.text==="]"&&J.text==="["||V.text===")"&&J.text==="("||V.text==="}"&&J.text==="{")},k.prototype._reset=function(){U=!1},k.prototype._get_next_token=function(V,J){var H=null;this._readWhitespace();var v=this._input.peek();return v===null?this._create_token(R.EOF,""):(H=H||this._read_non_javascript(v),H=H||this._read_string(v),H=H||this._read_pair(v,this._input.peek(1)),H=H||this._read_word(V),H=H||this._read_singles(v),H=H||this._read_comment(v),H=H||this._read_regexp(v,V),H=H||this._read_xml(v,V),H=H||this._read_punctuation(),H=H||this._create_token(R.UNKNOWN,this._input.next()),H)},k.prototype._read_word=function(V){var J;if(J=this.__patterns.identifier.read(),J!=="")return J=J.replace(S.allLineBreaks,`
`),!(V.type===R.DOT||V.type===R.RESERVED&&(V.text==="set"||V.text==="get"))&&Be.test(J)?(J==="in"||J==="of")&&(V.type===R.WORD||V.type===R.STRING)?this._create_token(R.OPERATOR,J):this._create_token(R.RESERVED,J):this._create_token(R.WORD,J);if(J=this.__patterns.number.read(),J!=="")return this._create_token(R.WORD,J)},k.prototype._read_singles=function(V){var J=null;return V==="("||V==="["?J=this._create_token(R.START_EXPR,V):V===")"||V==="]"?J=this._create_token(R.END_EXPR,V):V==="{"?J=this._create_token(R.START_BLOCK,V):V==="}"?J=this._create_token(R.END_BLOCK,V):V===";"?J=this._create_token(R.SEMICOLON,V):V==="."&&W.test(this._input.peek(1))?J=this._create_token(R.DOT,V):V===","&&(J=this._create_token(R.COMMA,V)),J&&this._input.next(),J},k.prototype._read_pair=function(V,J){var H=null;return V==="#"&&J==="{"&&(H=this._create_token(R.START_BLOCK,V+J)),H&&(this._input.next(),this._input.next()),H},k.prototype._read_punctuation=function(){var V=this.__patterns.punct.read();if(V!=="")return V==="="?this._create_token(R.EQUALS,V):V==="?."?this._create_token(R.DOT,V):this._create_token(R.OPERATOR,V)},k.prototype._read_non_javascript=function(V){var J="";if(V==="#"){if(this._is_first_token()&&(J=this.__patterns.shebang.read(),J))return this._create_token(R.UNKNOWN,J.trim()+`
`);if(J=this.__patterns.include.read(),J)return this._create_token(R.UNKNOWN,J.trim()+`
`);V=this._input.next();var H="#";if(this._input.hasNext()&&this._input.testChar(A)){do V=this._input.next(),H+=V;while(this._input.hasNext()&&V!=="#"&&V!=="=");return V==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(H+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(H+="{}",this._input.next(),this._input.next())),this._create_token(R.WORD,H)}this._input.back()}else if(V==="<"&&this._is_first_token()){if(J=this.__patterns.html_comment_start.read(),J){for(;this._input.hasNext()&&!this._input.testChar(S.newline);)J+=this._input.next();return U=!0,this._create_token(R.COMMENT,J)}}else if(U&&V==="-"&&(J=this.__patterns.html_comment_end.read(),J))return U=!1,this._create_token(R.COMMENT,J);return null},k.prototype._read_comment=function(V){var J=null;if(V==="/"){var H="";if(this._input.peek(1)==="*"){H=this.__patterns.block_comment.read();var v=O.get_directives(H);v&&v.ignore==="start"&&(H+=O.readIgnored(this._input)),H=H.replace(S.allLineBreaks,`
`),J=this._create_token(R.BLOCK_COMMENT,H),J.directives=v}else this._input.peek(1)==="/"&&(H=this.__patterns.comment.read(),J=this._create_token(R.COMMENT,H))}return J},k.prototype._read_string=function(V){if(V==="`"||V==="'"||V==='"'){var J=this._input.next();return this.has_char_escapes=!1,V==="`"?J+=this._read_string_recursive("`",!0,"${"):J+=this._read_string_recursive(V),this.has_char_escapes&&this._options.unescape_strings&&(J=N(J)),this._input.peek()===V&&(J+=this._input.next()),J=J.replace(S.allLineBreaks,`
`),this._create_token(R.STRING,J)}return null},k.prototype._allow_regexp_or_xml=function(V){return V.type===R.RESERVED&&G(V.text,["return","case","throw","else","do","typeof","yield"])||V.type===R.END_EXPR&&V.text===")"&&V.opened.previous.type===R.RESERVED&&G(V.opened.previous.text,["if","while","for"])||G(V.type,[R.COMMENT,R.START_EXPR,R.START_BLOCK,R.START,R.END_BLOCK,R.OPERATOR,R.EQUALS,R.EOF,R.SEMICOLON,R.COMMA])},k.prototype._read_regexp=function(V,J){if(V==="/"&&this._allow_regexp_or_xml(J)){for(var H=this._input.next(),v=!1,g=!1;this._input.hasNext()&&(v||g||this._input.peek()!==V)&&!this._input.testChar(S.newline);)H+=this._input.peek(),v?v=!1:(v=this._input.peek()==="\\",this._input.peek()==="["?g=!0:this._input.peek()==="]"&&(g=!1)),this._input.next();return this._input.peek()===V&&(H+=this._input.next(),H+=this._input.read(S.identifier)),this._create_token(R.STRING,H)}return null},k.prototype._read_xml=function(V,J){if(this._options.e4x&&V==="<"&&this._allow_regexp_or_xml(J)){var H="",v=this.__patterns.xml.read_match();if(v){for(var g=v[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),F=g.indexOf("{")===0,ie=0;v;){var ue=!!v[1],Le=v[2],Je=!!v[v.length-1]||Le.slice(0,8)==="![CDATA[";if(!Je&&(Le===g||F&&Le.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ue?--ie:++ie),H+=v[0],ie<=0)break;v=this.__patterns.xml.read_match()}return v||(H+=this._input.match(/[\s\S]*/g)[0]),H=H.replace(S.allLineBreaks,`
`),this._create_token(R.STRING,H)}}return null};function N(V){for(var J="",H=0,v=new C(V),g=null;v.hasNext();)if(g=v.match(/([\s]|[^\\]|\\\\)+/g),g&&(J+=g[0]),v.peek()==="\\"){if(v.next(),v.peek()==="x")g=v.match(/x([0-9A-Fa-f]{2})/g);else if(v.peek()==="u")g=v.match(/u([0-9A-Fa-f]{4})/g),g||(g=v.match(/u\{([0-9A-Fa-f]+)\}/g));else{J+="\\",v.hasNext()&&(J+=v.next());continue}if(!g||(H=parseInt(g[1],16),H>126&&H<=255&&g[0].indexOf("x")===0))return V;H>=0&&H<32||H>1114111?J+="\\"+g[0]:H===34||H===39||H===92?J+="\\"+String.fromCharCode(H):J+=String.fromCharCode(H)}return J}k.prototype._read_string_recursive=function(V,J,H){var v,g;V==="'"?g=this.__patterns.single_quote:V==='"'?g=this.__patterns.double_quote:V==="`"?g=this.__patterns.template_text:V==="}"&&(g=this.__patterns.template_expression);for(var F=g.read(),ie="";this._input.hasNext();){if(ie=this._input.next(),ie===V||!J&&S.newline.test(ie)){this._input.back();break}else ie==="\\"&&this._input.hasNext()?(v=this._input.peek(),v==="x"||v==="u"?this.has_char_escapes=!0:v==="\r"&&this._input.peek(1)===`
`&&this._input.next(),ie+=this._input.next()):H&&(H==="${"&&ie==="$"&&this._input.peek()==="{"&&(ie+=this._input.next()),H===ie&&(V==="`"?ie+=this._read_string_recursive("}",J,"`"):ie+=this._read_string_recursive("`",J,"${"),this._input.hasNext()&&(ie+=this._input.next())));ie+=g.read(),F+=ie}return F},Q.exports.Tokenizer=k,Q.exports.TOKEN=R,Q.exports.positionable_operators=X.slice(),Q.exports.line_starters=se.slice()},function(Q){var o=RegExp.prototype.hasOwnProperty("sticky");function y(C){this.__input=C||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var C=null;return this.hasNext()&&(C=this.__input.charAt(this.__position),this.__position+=1),C},y.prototype.peek=function(C){var h=null;return C=C||0,C+=this.__position,C>=0&&C<this.__input_length&&(h=this.__input.charAt(C)),h},y.prototype.__match=function(C,h){C.lastIndex=h;var m=C.exec(this.__input);return m&&!(o&&C.sticky)&&m.index!==h&&(m=null),m},y.prototype.test=function(C,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(C,h):!1},y.prototype.testChar=function(C,h){var m=this.peek(h);return C.lastIndex=0,m!==null&&C.test(m)},y.prototype.match=function(C){var h=this.__match(C,this.__position);return h?this.__position+=h[0].length:h=null,h},y.prototype.read=function(C,h,m){var E="",S;return C&&(S=this.match(C),S&&(E+=S[0])),h&&(S||!C)&&(E+=this.readUntil(h,m)),E},y.prototype.readUntil=function(C,h){var m="",E=this.__position;C.lastIndex=this.__position;var S=C.exec(this.__input);return S?(E=S.index,h&&(E+=S[0].length)):E=this.__input_length,m=this.__input.substring(this.__position,E),this.__position=E,m},y.prototype.readUntilAfter=function(C){return this.readUntil(C,!0)},y.prototype.get_regexp=function(C,h){var m=null,E="g";return h&&o&&(E="y"),typeof C=="string"&&C!==""?m=new RegExp(C,E):C&&(m=new RegExp(C.source,E)),m},y.prototype.get_literal_regexp=function(C){return RegExp(C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(C){var h=this.__position,m=this.readUntilAfter(C);return this.__position=h,m},y.prototype.lookBack=function(C){var h=this.__position-1;return h>=C.length&&this.__input.substring(h-C.length,h).toLowerCase()===C},Q.exports.InputScanner=y},function(Q,o,y){var C=y(8).InputScanner,h=y(3).Token,m=y(10).TokenStream,E=y(11).WhitespacePattern,S={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},I=function(B,G){this._input=new C(B),this._options=G||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new E(this._input)};I.prototype.tokenize=function(){this._input.restart(),this.__tokens=new m,this._reset();for(var B,G=new h(S.START,""),R=null,O=[],D=new m;G.type!==S.EOF;){for(B=this._get_next_token(G,R);this._is_comment(B);)D.add(B),B=this._get_next_token(G,R);D.isEmpty()||(B.comments_before=D,D=new m),B.parent=R,this._is_opening(B)?(O.push(R),R=B):R&&this._is_closing(B,R)&&(B.opened=R,R.closed=B,R=O.pop(),B.parent=R),B.previous=G,G.next=B,this.__tokens.add(B),G=B}return this.__tokens},I.prototype._is_first_token=function(){return this.__tokens.isEmpty()},I.prototype._reset=function(){},I.prototype._get_next_token=function(B,G){this._readWhitespace();var R=this._input.read(/.+/g);return R?this._create_token(S.RAW,R):this._create_token(S.EOF,"")},I.prototype._is_comment=function(B){return!1},I.prototype._is_opening=function(B){return!1},I.prototype._is_closing=function(B,G){return!1},I.prototype._create_token=function(B,G){var R=new h(B,G,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return R},I.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},Q.exports.Tokenizer=I,Q.exports.TOKEN=S},function(Q){function o(y){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=y}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position<this.__tokens_length},o.prototype.next=function(){var y=null;return this.hasNext()&&(y=this.__tokens[this.__position],this.__position+=1),y},o.prototype.peek=function(y){var C=null;return y=y||0,y+=this.__position,y>=0&&y<this.__tokens_length&&(C=this.__tokens[y]),C},o.prototype.add=function(y){this.__parent_token&&(y.parent=this.__parent_token),this.__tokens.push(y),this.__tokens_length+=1},Q.exports.TokenStream=o},function(Q,o,y){var C=y(12).Pattern;function h(m,E){C.call(this,m,E),E?this._line_regexp=this._input.get_regexp(E._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}h.prototype=new C,h.prototype.__set_whitespace_patterns=function(m,E){m+="\\t ",E+="\\n\\r",this._match_pattern=this._input.get_regexp("["+m+E+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+E+"]")},h.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var m=this._input.read(this._match_pattern);if(m===" ")this.whitespace_before_token=" ";else if(m){var E=this.__split(this._newline_regexp,m);this.newline_count=E.length-1,this.whitespace_before_token=E[this.newline_count]}return m},h.prototype.matching=function(m,E){var S=this._create();return S.__set_whitespace_patterns(m,E),S._update(),S},h.prototype._create=function(){return new h(this._input,this)},h.prototype.__split=function(m,E){m.lastIndex=0;for(var S=0,I=[],B=m.exec(E);B;)I.push(E.substring(S,B.index)),S=B.index+B[0].length,B=m.exec(E);return S<E.length?I.push(E.substring(S,E.length)):I.push(""),I},Q.exports.WhitespacePattern=h},function(Q){function o(y,C){this._input=y,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,C&&(this._starting_pattern=this._input.get_regexp(C._starting_pattern,!0),this._match_pattern=this._input.get_regexp(C._match_pattern,!0),this._until_pattern=this._input.get_regexp(C._until_pattern),this._until_after=C._until_after)}o.prototype.read=function(){var y=this._input.read(this._starting_pattern);return(!this._starting_pattern||y)&&(y+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),y},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(y){var C=this._create();return C._until_after=!0,C._until_pattern=this._input.get_regexp(y),C._update(),C},o.prototype.until=function(y){var C=this._create();return C._until_after=!1,C._until_pattern=this._input.get_regexp(y),C._update(),C},o.prototype.starting_with=function(y){var C=this._create();return C._starting_pattern=this._input.get_regexp(y,!0),C._update(),C},o.prototype.matching=function(y){var C=this._create();return C._match_pattern=this._input.get_regexp(y,!0),C._update(),C},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},Q.exports.Pattern=o},function(Q){function o(y,C){y=typeof y=="string"?y:y.source,C=typeof C=="string"?C:C.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+C,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+C,"g")}o.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var C={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(y);h;)C[h[1]]=h[2],h=this.__directive_pattern.exec(y);return C},o.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},Q.exports.Directives=o},function(Q,o,y){var C=y(12).Pattern,h={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function m(E,S){C.call(this,E,S),this.__template_pattern=null,this._disabled=Object.assign({},h),this._excluded=Object.assign({},h),S&&(this.__template_pattern=this._input.get_regexp(S.__template_pattern),this._excluded=Object.assign(this._excluded,S._excluded),this._disabled=Object.assign(this._disabled,S._disabled));var I=new C(E);this.__patterns={handlebars_comment:I.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:I.starting_with(/{{{/).until_after(/}}}/),handlebars:I.starting_with(/{{/).until_after(/}}/),php:I.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:I.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:I.starting_with(/{%/).until_after(/%}/),django_value:I.starting_with(/{{/).until_after(/}}/),django_comment:I.starting_with(/{#/).until_after(/#}/),smarty:I.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:I.starting_with(/{\*/).until_after(/\*}/),smarty_literal:I.starting_with(/{literal}/).until_after(/{\/literal}/)}}m.prototype=new C,m.prototype._create=function(){return new m(this._input,this)},m.prototype._update=function(){this.__set_templated_pattern()},m.prototype.disable=function(E){var S=this._create();return S._disabled[E]=!0,S._update(),S},m.prototype.read_options=function(E){var S=this._create();for(var I in h)S._disabled[I]=E.templating.indexOf(I)===-1;return S._update(),S},m.prototype.exclude=function(E){var S=this._create();return S._excluded[E]=!0,S._update(),S},m.prototype.read=function(){var E="";this._match_pattern?E=this._input.read(this._starting_pattern):E=this._input.read(this._starting_pattern,this.__template_pattern);for(var S=this._read_template();S;)this._match_pattern?S+=this._input.read(this._match_pattern):S+=this._input.readUntil(this.__template_pattern),E+=S,S=this._read_template();return this._until_after&&(E+=this._input.readUntilAfter(this._until_pattern)),E},m.prototype.__set_templated_pattern=function(){var E=[];this._disabled.php||E.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||E.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||E.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||E.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(E.push(this.__patterns.django._starting_pattern.source),E.push(this.__patterns.django_value._starting_pattern.source),E.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||E.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&E.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+E.join("|")+")")},m.prototype._read_template=function(){var E="",S=this._input.peek();if(S==="<"){var I=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&I==="?"&&(E=E||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&I==="%"&&(E=E||this.__patterns.erb.read())}else S==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(E=E||this.__patterns.handlebars_comment.read(),E=E||this.__patterns.handlebars_unescaped.read(),E=E||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(E=E||this.__patterns.django_value.read()),this._excluded.django||(E=E||this.__patterns.django_comment.read(),E=E||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(E=E||this.__patterns.smarty_comment.read(),E=E||this.__patterns.smarty_literal.read(),E=E||this.__patterns.smarty.read()));return E},Q.exports.TemplatablePattern=m}],M={};function f(Q){var o=M[Q];if(o!==void 0)return o.exports;var y=M[Q]={exports:{}};return te[Q](y,y.exports,f),y.exports}var oe=f(0);ne=oe})();var pe=ne;b=[],x=function(){return{js_beautify:pe}}.apply(je,b),x!==void 0&&(fn.exports=x)})()},32834:function(fn){(function(je,b){fn.exports=b()})(this,function(){"use strict";function je(ze,ke){for(var Re=0;Re<ke.length;Re++){var Z=ke[Re];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(ze,Z.key,Z)}}function b(ze,ke,Re){return ke&&je(ze.prototype,ke),Re&&je(ze,Re),ze}function x(ze,ke){if(ze){if(typeof ze=="string")return ne(ze,ke);var Re=Object.prototype.toString.call(ze).slice(8,-1);if(Re==="Object"&&ze.constructor&&(Re=ze.constructor.name),Re==="Map"||Re==="Set")return Array.from(ze);if(Re==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Re))return ne(ze,ke)}}function ne(ze,ke){(ke==null||ke>ze.length)&&(ke=ze.length);for(var Re=0,Z=new Array(ke);Re<ke;Re++)Z[Re]=ze[Re];return Z}function pe(ze,ke){var Re=typeof Symbol!="undefined"&&ze[Symbol.iterator]||ze["@@iterator"];if(Re)return(Re=Re.call(ze)).next.bind(Re);if(Array.isArray(ze)||(Re=x(ze))||ke&&ze&&typeof ze.length=="number"){Re&&(ze=Re);var Z=0;return function(){return Z>=ze.length?{done:!0}:{done:!1,value:ze[Z++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var te={exports:{}};function M(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function f(ze){te.exports.defaults=ze}te.exports={defaults:M(),getDefaults:M,changeDefaults:f};var oe=/[&<>"']/,Q=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,y=/[<>"']|&(?!#?\w+;)/g,C={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=function(ke){return C[ke]};function m(ze,ke){if(ke){if(oe.test(ze))return ze.replace(Q,h)}else if(o.test(ze))return ze.replace(y,h);return ze}var E=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function S(ze){return ze.replace(E,function(ke,Re){return Re=Re.toLowerCase(),Re==="colon"?":":Re.charAt(0)==="#"?Re.charAt(1)==="x"?String.fromCharCode(parseInt(Re.substring(2),16)):String.fromCharCode(+Re.substring(1)):""})}var I=/(^|[^\[])\^/g;function B(ze,ke){ze=ze.source||ze,ke=ke||"";var Re={replace:function(ee,me){return me=me.source||me,me=me.replace(I,"$1"),ze=ze.replace(ee,me),Re},getRegex:function(){return new RegExp(ze,ke)}};return Re}var G=/[^\w:]/g,R=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function O(ze,ke,Re){if(ze){var Z;try{Z=decodeURIComponent(S(Re)).replace(G,"").toLowerCase()}catch(ee){return null}if(Z.indexOf("javascript:")===0||Z.indexOf("vbscript:")===0||Z.indexOf("data:")===0)return null}ke&&!R.test(Re)&&(Re=Y(ke,Re));try{Re=encodeURI(Re).replace(/%25/g,"%")}catch(ee){return null}return Re}var D={},A=/^[^:]+:\/*[^/]*$/,W=/^([^:]+:)[\s\S]*$/,X=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Y(ze,ke){D[" "+ze]||(A.test(ze)?D[" "+ze]=ze+"/":D[" "+ze]=Be(ze,"/",!0)),ze=D[" "+ze];var Re=ze.indexOf(":")===-1;return ke.substring(0,2)==="//"?Re?ke:ze.replace(W,"$1")+ke:ke.charAt(0)==="/"?Re?ke:ze.replace(X,"$1")+ke:ze+ke}var L={exec:function(){}};function se(ze){for(var ke=1,Re,Z;ke<arguments.length;ke++){Re=arguments[ke];for(Z in Re)Object.prototype.hasOwnProperty.call(Re,Z)&&(ze[Z]=Re[Z])}return ze}function ae(ze,ke){var Re=ze.replace(/\|/g,function(me,ve,Ee){for(var Me=!1,Ye=ve;--Ye>=0&&Ee[Ye]==="\\";)Me=!Me;return Me?"|":" |"}),Z=Re.split(/ \|/),ee=0;if(Z.length>ke)Z.splice(ke);else for(;Z.length<ke;)Z.push("");for(;ee<Z.length;ee++)Z[ee]=Z[ee].trim().replace(/\\\|/g,"|");return Z}function Be(ze,ke,Re){var Z=ze.length;if(Z===0)return"";for(var ee=0;ee<Z;){var me=ze.charAt(Z-ee-1);if(me===ke&&!Re)ee++;else if(me!==ke&&Re)ee++;else break}return ze.substr(0,Z-ee)}function U(ze,ke){if(ze.indexOf(ke[1])===-1)return-1;for(var Re=ze.length,Z=0,ee=0;ee<Re;ee++)if(ze[ee]==="\\")ee++;else if(ze[ee]===ke[0])Z++;else if(ze[ee]===ke[1]&&(Z--,Z<0))return ee;return-1}function k(ze){ze&&ze.sanitize&&!ze.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function N(ze,ke){if(ke<1)return"";for(var Re="";ke>1;)ke&1&&(Re+=ze),ke>>=1,ze+=ze;return Re+ze}var V={escape:m,unescape:S,edit:B,cleanUrl:O,resolveUrl:Y,noopTest:L,merge:se,splitCells:ae,rtrim:Be,findClosingBracket:U,checkSanitizeDeprecation:k,repeatString:N},J=te.exports.defaults,H=V.rtrim,v=V.splitCells,g=V.escape,F=V.findClosingBracket;function ie(ze,ke,Re){var Z=ke.href,ee=ke.title?g(ke.title):null,me=ze[1].replace(/\\([\[\]])/g,"$1");return ze[0].charAt(0)!=="!"?{type:"link",raw:Re,href:Z,title:ee,text:me}:{type:"image",raw:Re,href:Z,title:ee,text:g(me)}}function ue(ze,ke){var Re=ze.match(/^(\s+)(?:```)/);if(Re===null)return ke;var Z=Re[1];return ke.split(`
`).map(function(ee){var me=ee.match(/^\s+/);if(me===null)return ee;var ve=me[0];return ve.length>=Z.length?ee.slice(Z.length):ee}).join(`
`)}var Le=function(){function ze(Re){this.options=Re||J}var ke=ze.prototype;return ke.space=function(Z){var ee=this.rules.block.newline.exec(Z);if(ee)return ee[0].length>1?{type:"space",raw:ee[0]}:{raw:`
`}},ke.code=function(Z){var ee=this.rules.block.code.exec(Z);if(ee){var me=ee[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ee[0],codeBlockStyle:"indented",text:this.options.pedantic?me:H(me,`
`)}}},ke.fences=function(Z){var ee=this.rules.block.fences.exec(Z);if(ee){var me=ee[0],ve=ue(me,ee[3]||"");return{type:"code",raw:me,lang:ee[2]?ee[2].trim():ee[2],text:ve}}},ke.heading=function(Z){var ee=this.rules.block.heading.exec(Z);if(ee){var me=ee[2].trim();if(/#$/.test(me)){var ve=H(me,"#");(this.options.pedantic||!ve||/ $/.test(ve))&&(me=ve.trim())}return{type:"heading",raw:ee[0],depth:ee[1].length,text:me}}},ke.nptable=function(Z){var ee=this.rules.block.nptable.exec(Z);if(ee){var me={type:"table",header:v(ee[1].replace(/^ *| *\| *$/g,"")),align:ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ee[3]?ee[3].replace(/\n$/,"").split(`
`):[],raw:ee[0]};if(me.header.length===me.align.length){var ve=me.align.length,Ee;for(Ee=0;Ee<ve;Ee++)/^ *-+: *$/.test(me.align[Ee])?me.align[Ee]="right":/^ *:-+: *$/.test(me.align[Ee])?me.align[Ee]="center":/^ *:-+ *$/.test(me.align[Ee])?me.align[Ee]="left":me.align[Ee]=null;for(ve=me.cells.length,Ee=0;Ee<ve;Ee++)me.cells[Ee]=v(me.cells[Ee],me.header.length);return me}}},ke.hr=function(Z){var ee=this.rules.block.hr.exec(Z);if(ee)return{type:"hr",raw:ee[0]}},ke.blockquote=function(Z){var ee=this.rules.block.blockquote.exec(Z);if(ee){var me=ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ee[0],text:me}}},ke.list=function(Z){var ee=this.rules.block.list.exec(Z);if(ee){var me=ee[0],ve=ee[2],Ee=ve.length>1,Me={type:"list",raw:me,ordered:Ee,start:Ee?+ve.slice(0,-1):"",loose:!1,items:[]},Ye=ee[0].match(this.rules.block.item),nt=!1,_t,nn,ln,zt,Jt,yn,Bn,mn,gn,Nt=Ye.length;ln=this.rules.block.listItemStart.exec(Ye[0]);for(var wt=0;wt<Nt;wt++){if(_t=Ye[wt],me=_t,this.options.pedantic||(gn=_t.match(new RegExp("\\n\\s*\\n {0,"+(ln[0].length-1)+"}\\S")),gn&&(Jt=_t.length-gn.index+Ye.slice(wt+1).join(`
`).length,Me.raw=Me.raw.substring(0,Me.raw.length-Jt),_t=_t.substring(0,gn.index),me=_t,Nt=wt+1)),wt!==Nt-1){if(zt=this.rules.block.listItemStart.exec(Ye[wt+1]),this.options.pedantic?zt[1].length>ln[1].length:zt[1].length>=ln[0].length||zt[1].length>3){Ye.splice(wt,2,Ye[wt]+(!this.options.pedantic&&zt[1].length<ln[0].length&&!Ye[wt].match(/\n$/)?"":`
`)+Ye[wt+1]),wt--,Nt--;continue}else(!this.options.pedantic||this.options.smartLists?zt[2][zt[2].length-1]!==ve[ve.length-1]:Ee===(zt[2].length===1))&&(Jt=Ye.slice(wt+1).join(`
`).length,Me.raw=Me.raw.substring(0,Me.raw.length-Jt),wt=Nt-1);ln=zt}nn=_t.length,_t=_t.replace(/^ *([*+-]|\d+[.)]) ?/,""),~_t.indexOf(`
`)&&(nn-=_t.length,_t=this.options.pedantic?_t.replace(/^ {1,4}/gm,""):_t.replace(new RegExp("^ {1,"+nn+"}","gm"),"")),_t=H(_t,`
`),wt!==Nt-1&&(me=me+`
`),yn=nt||/\n\n(?!\s*$)/.test(me),wt!==Nt-1&&(nt=me.slice(-2)===`
`,yn||(yn=nt)),yn&&(Me.loose=!0),this.options.gfm&&(Bn=/^\[[ xX]\] /.test(_t),mn=void 0,Bn&&(mn=_t[1]!==" ",_t=_t.replace(/^\[[ xX]\] +/,""))),Me.items.push({type:"list_item",raw:me,task:Bn,checked:mn,loose:yn,text:_t})}return Me}},ke.html=function(Z){var ee=this.rules.block.html.exec(Z);if(ee)return{type:this.options.sanitize?"paragraph":"html",raw:ee[0],pre:!this.options.sanitizer&&(ee[1]==="pre"||ee[1]==="script"||ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):g(ee[0]):ee[0]}},ke.def=function(Z){var ee=this.rules.block.def.exec(Z);if(ee){ee[3]&&(ee[3]=ee[3].substring(1,ee[3].length-1));var me=ee[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:me,raw:ee[0],href:ee[2],title:ee[3]}}},ke.table=function(Z){var ee=this.rules.block.table.exec(Z);if(ee){var me={type:"table",header:v(ee[1].replace(/^ *| *\| *$/g,"")),align:ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ee[3]?ee[3].replace(/\n$/,"").split(`
`):[]};if(me.header.length===me.align.length){me.raw=ee[0];var ve=me.align.length,Ee;for(Ee=0;Ee<ve;Ee++)/^ *-+: *$/.test(me.align[Ee])?me.align[Ee]="right":/^ *:-+: *$/.test(me.align[Ee])?me.align[Ee]="center":/^ *:-+ *$/.test(me.align[Ee])?me.align[Ee]="left":me.align[Ee]=null;for(ve=me.cells.length,Ee=0;Ee<ve;Ee++)me.cells[Ee]=v(me.cells[Ee].replace(/^ *\| *| *\| *$/g,""),me.header.length);return me}}},ke.lheading=function(Z){var ee=this.rules.block.lheading.exec(Z);if(ee)return{type:"heading",raw:ee[0],depth:ee[2].charAt(0)==="="?1:2,text:ee[1]}},ke.paragraph=function(Z){var ee=this.rules.block.paragraph.exec(Z);if(ee)return{type:"paragraph",raw:ee[0],text:ee[1].charAt(ee[1].length-1)===`
`?ee[1].slice(0,-1):ee[1]}},ke.text=function(Z){var ee=this.rules.block.text.exec(Z);if(ee)return{type:"text",raw:ee[0],text:ee[0]}},ke.escape=function(Z){var ee=this.rules.inline.escape.exec(Z);if(ee)return{type:"escape",raw:ee[0],text:g(ee[1])}},ke.tag=function(Z,ee,me){var ve=this.rules.inline.tag.exec(Z);if(ve)return!ee&&/^<a /i.test(ve[0])?ee=!0:ee&&/^<\/a>/i.test(ve[0])&&(ee=!1),!me&&/^<(pre|code|kbd|script)(\s|>)/i.test(ve[0])?me=!0:me&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ve[0])&&(me=!1),{type:this.options.sanitize?"text":"html",raw:ve[0],inLink:ee,inRawBlock:me,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):g(ve[0]):ve[0]}},ke.link=function(Z){var ee=this.rules.inline.link.exec(Z);if(ee){var me=ee[2].trim();if(!this.options.pedantic&&/^</.test(me)){if(!/>$/.test(me))return;var ve=H(me.slice(0,-1),"\\");if((me.length-ve.length)%2===0)return}else{var Ee=F(ee[2],"()");if(Ee>-1){var Me=ee[0].indexOf("!")===0?5:4,Ye=Me+ee[1].length+Ee;ee[2]=ee[2].substring(0,Ee),ee[0]=ee[0].substring(0,Ye).trim(),ee[3]=""}}var nt=ee[2],_t="";if(this.options.pedantic){var nn=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(nt);nn&&(nt=nn[1],_t=nn[3])}else _t=ee[3]?ee[3].slice(1,-1):"";return nt=nt.trim(),/^</.test(nt)&&(this.options.pedantic&&!/>$/.test(me)?nt=nt.slice(1):nt=nt.slice(1,-1)),ie(ee,{href:nt&&nt.replace(this.rules.inline._escapes,"$1"),title:_t&&_t.replace(this.rules.inline._escapes,"$1")},ee[0])}},ke.reflink=function(Z,ee){var me;if((me=this.rules.inline.reflink.exec(Z))||(me=this.rules.inline.nolink.exec(Z))){var ve=(me[2]||me[1]).replace(/\s+/g," ");if(ve=ee[ve.toLowerCase()],!ve||!ve.href){var Ee=me[0].charAt(0);return{type:"text",raw:Ee,text:Ee}}return ie(me,ve,me[0])}},ke.emStrong=function(Z,ee,me){me===void 0&&(me="");var ve=this.rules.inline.emStrong.lDelim.exec(Z);if(ve&&!(ve[3]&&me.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var Ee=ve[1]||ve[2]||"";if(!Ee||Ee&&(me===""||this.rules.inline.punctuation.exec(me))){var Me=ve[0].length-1,Ye,nt,_t=Me,nn=0,ln=ve[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(ln.lastIndex=0,ee=ee.slice(-1*Z.length+Me);(ve=ln.exec(ee))!=null;)if(Ye=ve[1]||ve[2]||ve[3]||ve[4]||ve[5]||ve[6],!!Ye){if(nt=Ye.length,ve[3]||ve[4]){_t+=nt;continue}else if((ve[5]||ve[6])&&Me%3&&!((Me+nt)%3)){nn+=nt;continue}if(_t-=nt,!(_t>0))return nt=Math.min(nt,nt+_t+nn),Math.min(Me,nt)%2?{type:"em",raw:Z.slice(0,Me+ve.index+nt+1),text:Z.slice(1,Me+ve.index+nt)}:{type:"strong",raw:Z.slice(0,Me+ve.index+nt+1),text:Z.slice(2,Me+ve.index+nt-1)}}}}},ke.codespan=function(Z){var ee=this.rules.inline.code.exec(Z);if(ee){var me=ee[2].replace(/\n/g," "),ve=/[^ ]/.test(me),Ee=/^ /.test(me)&&/ $/.test(me);return ve&&Ee&&(me=me.substring(1,me.length-1)),me=g(me,!0),{type:"codespan",raw:ee[0],text:me}}},ke.br=function(Z){var ee=this.rules.inline.br.exec(Z);if(ee)return{type:"br",raw:ee[0]}},ke.del=function(Z){var ee=this.rules.inline.del.exec(Z);if(ee)return{type:"del",raw:ee[0],text:ee[2]}},ke.autolink=function(Z,ee){var me=this.rules.inline.autolink.exec(Z);if(me){var ve,Ee;return me[2]==="@"?(ve=g(this.options.mangle?ee(me[1]):me[1]),Ee="mailto:"+ve):(ve=g(me[1]),Ee=ve),{type:"link",raw:me[0],text:ve,href:Ee,tokens:[{type:"text",raw:ve,text:ve}]}}},ke.url=function(Z,ee){var me;if(me=this.rules.inline.url.exec(Z)){var ve,Ee;if(me[2]==="@")ve=g(this.options.mangle?ee(me[0]):me[0]),Ee="mailto:"+ve;else{var Me;do Me=me[0],me[0]=this.rules.inline._backpedal.exec(me[0])[0];while(Me!==me[0]);ve=g(me[0]),me[1]==="www."?Ee="http://"+ve:Ee=ve}return{type:"link",raw:me[0],text:ve,href:Ee,tokens:[{type:"text",raw:ve,text:ve}]}}},ke.inlineText=function(Z,ee,me){var ve=this.rules.inline.text.exec(Z);if(ve){var Ee;return ee?Ee=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):g(ve[0]):ve[0]:Ee=g(this.options.smartypants?me(ve[0]):ve[0]),{type:"text",raw:ve[0],text:Ee}}},ze}(),Je=V.noopTest,rt=V.edit,dt=V.merge,vt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Je,table:Je,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};vt._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,vt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,vt.def=rt(vt.def).replace("label",vt._label).replace("title",vt._title).getRegex(),vt.bullet=/(?:[*+-]|\d{1,9}[.)])/,vt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,vt.item=rt(vt.item,"gm").replace(/bull/g,vt.bullet).getRegex(),vt.listItemStart=rt(/^( *)(bull) */).replace("bull",vt.bullet).getRegex(),vt.list=rt(vt.list).replace(/bull/g,vt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+vt.def.source+")").getRegex(),vt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",vt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,vt.html=rt(vt.html,"i").replace("comment",vt._comment).replace("tag",vt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vt.paragraph=rt(vt._paragraph).replace("hr",vt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",vt._tag).getRegex(),vt.blockquote=rt(vt.blockquote).replace("paragraph",vt.paragraph).getRegex(),vt.normal=dt({},vt),vt.gfm=dt({},vt.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),vt.gfm.nptable=rt(vt.gfm.nptable).replace("hr",vt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",vt._tag).getRegex(),vt.gfm.table=rt(vt.gfm.table).replace("hr",vt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",vt._tag).getRegex(),vt.pedantic=dt({},vt.normal,{html:rt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",vt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Je,paragraph:rt(vt.normal._paragraph).replace("hr",vt.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",vt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var be={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Je,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Je,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};be._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",be.punctuation=rt(be.punctuation).replace(/punctuation/g,be._punctuation).getRegex(),be.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,be.escapedEmSt=/\\\*|\\_/g,be._comment=rt(vt._comment).replace("(?:-->|$)","-->").getRegex(),be.emStrong.lDelim=rt(be.emStrong.lDelim).replace(/punct/g,be._punctuation).getRegex(),be.emStrong.rDelimAst=rt(be.emStrong.rDelimAst,"g").replace(/punct/g,be._punctuation).getRegex(),be.emStrong.rDelimUnd=rt(be.emStrong.rDelimUnd,"g").replace(/punct/g,be._punctuation).getRegex(),be._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,be._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,be._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,be.autolink=rt(be.autolink).replace("scheme",be._scheme).replace("email",be._email).getRegex(),be._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,be.tag=rt(be.tag).replace("comment",be._comment).replace("attribute",be._attribute).getRegex(),be._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,be._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,be._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,be.link=rt(be.link).replace("label",be._label).replace("href",be._href).replace("title",be._title).getRegex(),be.reflink=rt(be.reflink).replace("label",be._label).getRegex(),be.reflinkSearch=rt(be.reflinkSearch,"g").replace("reflink",be.reflink).replace("nolink",be.nolink).getRegex(),be.normal=dt({},be),be.pedantic=dt({},be.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:rt(/^!?\[(label)\]\((.*?)\)/).replace("label",be._label).getRegex(),reflink:rt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",be._label).getRegex()}),be.gfm=dt({},be.normal,{escape:rt(be.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),be.gfm.url=rt(be.gfm.url,"i").replace("email",be.gfm._extended_email).getRegex(),be.breaks=dt({},be.gfm,{br:rt(be.br).replace("{2,}","*").getRegex(),text:rt(be.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Tt={block:vt,inline:be},tt=Le,It=te.exports.defaults,Qe=Tt.block,$e=Tt.inline,ye=V.repeatString;function de(ze){return ze.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function K(ze){var ke="",Re,Z,ee=ze.length;for(Re=0;Re<ee;Re++)Z=ze.charCodeAt(Re),Math.random()>.5&&(Z="x"+Z.toString(16)),ke+="&#"+Z+";";return ke}var xe=function(){function ze(Re){this.tokens=[],this.tokens.links=Object.create(null),this.options=Re||It,this.options.tokenizer=this.options.tokenizer||new tt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Z={block:Qe.normal,inline:$e.normal};this.options.pedantic?(Z.block=Qe.pedantic,Z.inline=$e.pedantic):this.options.gfm&&(Z.block=Qe.gfm,this.options.breaks?Z.inline=$e.breaks:Z.inline=$e.gfm),this.tokenizer.rules=Z}ze.lex=function(Z,ee){var me=new ze(ee);return me.lex(Z)},ze.lexInline=function(Z,ee){var me=new ze(ee);return me.inlineTokens(Z)};var ke=ze.prototype;return ke.lex=function(Z){return Z=Z.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(Z,this.tokens,!0),this.inline(this.tokens),this.tokens},ke.blockTokens=function(Z,ee,me){ee===void 0&&(ee=[]),me===void 0&&(me=!0),this.options.pedantic&&(Z=Z.replace(/^ +$/gm,""));for(var ve,Ee,Me,Ye;Z;){if(ve=this.tokenizer.space(Z)){Z=Z.substring(ve.raw.length),ve.type&&ee.push(ve);continue}if(ve=this.tokenizer.code(Z)){Z=Z.substring(ve.raw.length),Ye=ee[ee.length-1],Ye&&Ye.type==="paragraph"?(Ye.raw+=`
`+ve.raw,Ye.text+=`
`+ve.text):ee.push(ve);continue}if(ve=this.tokenizer.fences(Z)){Z=Z.substring(ve.raw.length),ee.push(ve);continue}if(ve=this.tokenizer.heading(Z)){Z=Z.substring(ve.raw.length),ee.push(ve);continue}if(ve=this.tokenizer.nptable(Z)){Z=Z.substring(ve.raw.length),ee.push(ve);continue}if(ve=this.tokenizer.hr(Z)){Z=Z.substring(ve.raw.length),ee.push(ve);continue}if(ve=this.tokenizer.blockquote(Z)){Z=Z.substring(ve.raw.length),ve.tokens=this.blockTokens(ve.text,[],me),ee.push(ve);continue}if(ve=this.tokenizer.list(Z)){for(Z=Z.substring(ve.raw.length),Me=ve.items.length,Ee=0;Ee<Me;Ee++)ve.items[Ee].tokens=this.blockTokens(ve.items[Ee].text,[],!1);ee.push(ve);continue}if(ve=this.tokenizer.html(Z)){Z=Z.substring(ve.raw.length),ee.push(ve);continue}if(me&&(ve=this.tokenizer.def(Z))){Z=Z.substring(ve.raw.length),this.tokens.links[ve.tag]||(this.tokens.links[ve.tag]={href:ve.href,title:ve.title});continue}if(ve=this.tokenizer.table(Z)){Z=Z.substring(ve.raw.length),ee.push(ve);continue}if(ve=this.tokenizer.lheading(Z)){Z=Z.substring(ve.raw.length),ee.push(ve);continue}if(me&&(ve=this.tokenizer.paragraph(Z))){Z=Z.substring(ve.raw.length),ee.push(ve);continue}if(ve=this.tokenizer.text(Z)){Z=Z.substring(ve.raw.length),Ye=ee[ee.length-1],Ye&&Ye.type==="text"?(Ye.raw+=`
`+ve.raw,Ye.text+=`
`+ve.text):ee.push(ve);continue}if(Z){var nt="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(nt);break}else throw new Error(nt)}}return ee},ke.inline=function(Z){var ee,me,ve,Ee,Me,Ye,nt=Z.length;for(ee=0;ee<nt;ee++)switch(Ye=Z[ee],Ye.type){case"paragraph":case"text":case"heading":{Ye.tokens=[],this.inlineTokens(Ye.text,Ye.tokens);break}case"table":{for(Ye.tokens={header:[],cells:[]},Ee=Ye.header.length,me=0;me<Ee;me++)Ye.tokens.header[me]=[],this.inlineTokens(Ye.header[me],Ye.tokens.header[me]);for(Ee=Ye.cells.length,me=0;me<Ee;me++)for(Me=Ye.cells[me],Ye.tokens.cells[me]=[],ve=0;ve<Me.length;ve++)Ye.tokens.cells[me][ve]=[],this.inlineTokens(Me[ve],Ye.tokens.cells[me][ve]);break}case"blockquote":{this.inline(Ye.tokens);break}case"list":{for(Ee=Ye.items.length,me=0;me<Ee;me++)this.inline(Ye.items[me].tokens);break}}return Z},ke.inlineTokens=function(Z,ee,me,ve){ee===void 0&&(ee=[]),me===void 0&&(me=!1),ve===void 0&&(ve=!1);var Ee,Me,Ye=Z,nt,_t,nn;if(this.tokens.links){var ln=Object.keys(this.tokens.links);if(ln.length>0)for(;(nt=this.tokenizer.rules.inline.reflinkSearch.exec(Ye))!=null;)ln.includes(nt[0].slice(nt[0].lastIndexOf("[")+1,-1))&&(Ye=Ye.slice(0,nt.index)+"["+ye("a",nt[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(nt=this.tokenizer.rules.inline.blockSkip.exec(Ye))!=null;)Ye=Ye.slice(0,nt.index)+"["+ye("a",nt[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(nt=this.tokenizer.rules.inline.escapedEmSt.exec(Ye))!=null;)Ye=Ye.slice(0,nt.index)+"++"+Ye.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;Z;){if(_t||(nn=""),_t=!1,Ee=this.tokenizer.escape(Z)){Z=Z.substring(Ee.raw.length),ee.push(Ee);continue}if(Ee=this.tokenizer.tag(Z,me,ve)){Z=Z.substring(Ee.raw.length),me=Ee.inLink,ve=Ee.inRawBlock;var zt=ee[ee.length-1];zt&&Ee.type==="text"&&zt.type==="text"?(zt.raw+=Ee.raw,zt.text+=Ee.text):ee.push(Ee);continue}if(Ee=this.tokenizer.link(Z)){Z=Z.substring(Ee.raw.length),Ee.type==="link"&&(Ee.tokens=this.inlineTokens(Ee.text,[],!0,ve)),ee.push(Ee);continue}if(Ee=this.tokenizer.reflink(Z,this.tokens.links)){Z=Z.substring(Ee.raw.length);var Jt=ee[ee.length-1];Ee.type==="link"?(Ee.tokens=this.inlineTokens(Ee.text,[],!0,ve),ee.push(Ee)):Jt&&Ee.type==="text"&&Jt.type==="text"?(Jt.raw+=Ee.raw,Jt.text+=Ee.text):ee.push(Ee);continue}if(Ee=this.tokenizer.emStrong(Z,Ye,nn)){Z=Z.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],me,ve),ee.push(Ee);continue}if(Ee=this.tokenizer.codespan(Z)){Z=Z.substring(Ee.raw.length),ee.push(Ee);continue}if(Ee=this.tokenizer.br(Z)){Z=Z.substring(Ee.raw.length),ee.push(Ee);continue}if(Ee=this.tokenizer.del(Z)){Z=Z.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],me,ve),ee.push(Ee);continue}if(Ee=this.tokenizer.autolink(Z,K)){Z=Z.substring(Ee.raw.length),ee.push(Ee);continue}if(!me&&(Ee=this.tokenizer.url(Z,K))){Z=Z.substring(Ee.raw.length),ee.push(Ee);continue}if(Ee=this.tokenizer.inlineText(Z,ve,de)){Z=Z.substring(Ee.raw.length),Ee.raw.slice(-1)!=="_"&&(nn=Ee.raw.slice(-1)),_t=!0,Me=ee[ee.length-1],Me&&Me.type==="text"?(Me.raw+=Ee.raw,Me.text+=Ee.text):ee.push(Ee);continue}if(Z){var yn="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(yn);break}else throw new Error(yn)}}return ee},b(ze,null,[{key:"rules",get:function(){return{block:Qe,inline:$e}}}]),ze}(),Se=te.exports.defaults,$=V.cleanUrl,P=V.escape,fe=function(){function ze(Re){this.options=Re||Se}var ke=ze.prototype;return ke.code=function(Z,ee,me){var ve=(ee||"").match(/\S*/)[0];if(this.options.highlight){var Ee=this.options.highlight(Z,ve);Ee!=null&&Ee!==Z&&(me=!0,Z=Ee)}return Z=Z.replace(/\n$/,"")+`
`,ve?'<pre><code class="'+this.options.langPrefix+P(ve,!0)+'">'+(me?Z:P(Z,!0))+`</code></pre>
`:"<pre><code>"+(me?Z:P(Z,!0))+`</code></pre>
`},ke.blockquote=function(Z){return`<blockquote>
`+Z+`</blockquote>
`},ke.html=function(Z){return Z},ke.heading=function(Z,ee,me,ve){return this.options.headerIds?"<h"+ee+' id="'+this.options.headerPrefix+ve.slug(me)+'">'+Z+"</h"+ee+`>
`:"<h"+ee+">"+Z+"</h"+ee+`>
`},ke.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},ke.list=function(Z,ee,me){var ve=ee?"ol":"ul",Ee=ee&&me!==1?' start="'+me+'"':"";return"<"+ve+Ee+`>
`+Z+"</"+ve+`>
`},ke.listitem=function(Z){return"<li>"+Z+`</li>
`},ke.checkbox=function(Z){return"<input "+(Z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ke.paragraph=function(Z){return"<p>"+Z+`</p>
`},ke.table=function(Z,ee){return ee&&(ee="<tbody>"+ee+"</tbody>"),`<table>
<thead>
`+Z+`</thead>
`+ee+`</table>
`},ke.tablerow=function(Z){return`<tr>
`+Z+`</tr>
`},ke.tablecell=function(Z,ee){var me=ee.header?"th":"td",ve=ee.align?"<"+me+' align="'+ee.align+'">':"<"+me+">";return ve+Z+"</"+me+`>
`},ke.strong=function(Z){return"<strong>"+Z+"</strong>"},ke.em=function(Z){return"<em>"+Z+"</em>"},ke.codespan=function(Z){return"<code>"+Z+"</code>"},ke.br=function(){return this.options.xhtml?"<br/>":"<br>"},ke.del=function(Z){return"<del>"+Z+"</del>"},ke.link=function(Z,ee,me){if(Z=$(this.options.sanitize,this.options.baseUrl,Z),Z===null)return me;var ve='<a href="'+P(Z)+'"';return ee&&(ve+=' title="'+ee+'"'),ve+=">"+me+"</a>",ve},ke.image=function(Z,ee,me){if(Z=$(this.options.sanitize,this.options.baseUrl,Z),Z===null)return me;var ve='<img src="'+Z+'" alt="'+me+'"';return ee&&(ve+=' title="'+ee+'"'),ve+=this.options.xhtml?"/>":">",ve},ke.text=function(Z){return Z},ze}(),he=function(){function ze(){}var ke=ze.prototype;return ke.strong=function(Z){return Z},ke.em=function(Z){return Z},ke.codespan=function(Z){return Z},ke.del=function(Z){return Z},ke.html=function(Z){return Z},ke.text=function(Z){return Z},ke.link=function(Z,ee,me){return""+me},ke.image=function(Z,ee,me){return""+me},ke.br=function(){return""},ze}(),q=function(){function ze(){this.seen={}}var ke=ze.prototype;return ke.serialize=function(Z){return Z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},ke.getNextSafeSlug=function(Z,ee){var me=Z,ve=0;if(this.seen.hasOwnProperty(me)){ve=this.seen[Z];do ve++,me=Z+"-"+ve;while(this.seen.hasOwnProperty(me))}return ee||(this.seen[Z]=ve,this.seen[me]=0),me},ke.slug=function(Z,ee){ee===void 0&&(ee={});var me=this.serialize(Z);return this.getNextSafeSlug(me,ee.dryrun)},ze}(),re=fe,le=he,Pe=q,Ae=te.exports.defaults,Ne=V.unescape,Te=function(){function ze(Re){this.options=Re||Ae,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new le,this.slugger=new Pe}ze.parse=function(Z,ee){var me=new ze(ee);return me.parse(Z)},ze.parseInline=function(Z,ee){var me=new ze(ee);return me.parseInline(Z)};var ke=ze.prototype;return ke.parse=function(Z,ee){ee===void 0&&(ee=!0);var me="",ve,Ee,Me,Ye,nt,_t,nn,ln,zt,Jt,yn,Bn,mn,gn,Nt,wt,qt,At,Nn=Z.length;for(ve=0;ve<Nn;ve++)switch(Jt=Z[ve],Jt.type){case"space":continue;case"hr":{me+=this.renderer.hr();continue}case"heading":{me+=this.renderer.heading(this.parseInline(Jt.tokens),Jt.depth,Ne(this.parseInline(Jt.tokens,this.textRenderer)),this.slugger);continue}case"code":{me+=this.renderer.code(Jt.text,Jt.lang,Jt.escaped);continue}case"table":{for(ln="",nn="",Ye=Jt.header.length,Ee=0;Ee<Ye;Ee++)nn+=this.renderer.tablecell(this.parseInline(Jt.tokens.header[Ee]),{header:!0,align:Jt.align[Ee]});for(ln+=this.renderer.tablerow(nn),zt="",Ye=Jt.cells.length,Ee=0;Ee<Ye;Ee++){for(_t=Jt.tokens.cells[Ee],nn="",nt=_t.length,Me=0;Me<nt;Me++)nn+=this.renderer.tablecell(this.parseInline(_t[Me]),{header:!1,align:Jt.align[Me]});zt+=this.renderer.tablerow(nn)}me+=this.renderer.table(ln,zt);continue}case"blockquote":{zt=this.parse(Jt.tokens),me+=this.renderer.blockquote(zt);continue}case"list":{for(yn=Jt.ordered,Bn=Jt.start,mn=Jt.loose,Ye=Jt.items.length,zt="",Ee=0;Ee<Ye;Ee++)Nt=Jt.items[Ee],wt=Nt.checked,qt=Nt.task,gn="",Nt.task&&(At=this.renderer.checkbox(wt),mn?Nt.tokens.length>0&&Nt.tokens[0].type==="text"?(Nt.tokens[0].text=At+" "+Nt.tokens[0].text,Nt.tokens[0].tokens&&Nt.tokens[0].tokens.length>0&&Nt.tokens[0].tokens[0].type==="text"&&(Nt.tokens[0].tokens[0].text=At+" "+Nt.tokens[0].tokens[0].text)):Nt.tokens.unshift({type:"text",text:At}):gn+=At),gn+=this.parse(Nt.tokens,mn),zt+=this.renderer.listitem(gn,qt,wt);me+=this.renderer.list(zt,yn,Bn);continue}case"html":{me+=this.renderer.html(Jt.text);continue}case"paragraph":{me+=this.renderer.paragraph(this.parseInline(Jt.tokens));continue}case"text":{for(zt=Jt.tokens?this.parseInline(Jt.tokens):Jt.text;ve+1<Nn&&Z[ve+1].type==="text";)Jt=Z[++ve],zt+=`
`+(Jt.tokens?this.parseInline(Jt.tokens):Jt.text);me+=ee?this.renderer.paragraph(zt):zt;continue}default:{var Fe='Token with "'+Jt.type+'" type was not found.';if(this.options.silent){console.error(Fe);return}else throw new Error(Fe)}}return me},ke.parseInline=function(Z,ee){ee=ee||this.renderer;var me="",ve,Ee,Me=Z.length;for(ve=0;ve<Me;ve++)switch(Ee=Z[ve],Ee.type){case"escape":{me+=ee.text(Ee.text);break}case"html":{me+=ee.html(Ee.text);break}case"link":{me+=ee.link(Ee.href,Ee.title,this.parseInline(Ee.tokens,ee));break}case"image":{me+=ee.image(Ee.href,Ee.title,Ee.text);break}case"strong":{me+=ee.strong(this.parseInline(Ee.tokens,ee));break}case"em":{me+=ee.em(this.parseInline(Ee.tokens,ee));break}case"codespan":{me+=ee.codespan(Ee.text);break}case"br":{me+=ee.br();break}case"del":{me+=ee.del(this.parseInline(Ee.tokens,ee));break}case"text":{me+=ee.text(Ee.text);break}default:{var Ye='Token with "'+Ee.type+'" type was not found.';if(this.options.silent){console.error(Ye);return}else throw new Error(Ye)}}return me},ze}(),He=xe,Ke=Te,Ze=Le,_e=fe,ft=he,Xe=q,Ve=V.merge,Pt=V.checkSanitizeDeprecation,Mt=V.escape,st=te.exports.getDefaults,Qt=te.exports.changeDefaults,pn=te.exports.defaults;function Lt(ze,ke,Re){if(typeof ze=="undefined"||ze===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ze!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ze)+", string expected");if(typeof ke=="function"&&(Re=ke,ke=null),ke=Ve({},Lt.defaults,ke||{}),Pt(ke),Re){var Z=ke.highlight,ee;try{ee=He.lex(ze,ke)}catch(Me){return Re(Me)}var me=function(Ye){var nt;if(!Ye)try{ke.walkTokens&&Lt.walkTokens(ee,ke.walkTokens),nt=Ke.parse(ee,ke)}catch(_t){Ye=_t}return ke.highlight=Z,Ye?Re(Ye):Re(null,nt)};if(!Z||Z.length<3||(delete ke.highlight,!ee.length))return me();var ve=0;Lt.walkTokens(ee,function(Me){Me.type==="code"&&(ve++,setTimeout(function(){Z(Me.text,Me.lang,function(Ye,nt){if(Ye)return me(Ye);nt!=null&&nt!==Me.text&&(Me.text=nt,Me.escaped=!0),ve--,ve===0&&me()})},0))}),ve===0&&me();return}try{var Ee=He.lex(ze,ke);return ke.walkTokens&&Lt.walkTokens(Ee,ke.walkTokens),Ke.parse(Ee,ke)}catch(Me){if(Me.message+=`
Please report this to https://github.com/markedjs/marked.`,ke.silent)return"<p>An error occurred:</p><pre>"+Mt(Me.message+"",!0)+"</pre>";throw Me}}Lt.options=Lt.setOptions=function(ze){return Ve(Lt.defaults,ze),Qt(Lt.defaults),Lt},Lt.getDefaults=st,Lt.defaults=pn,Lt.use=function(ze){var ke=Ve({},ze);if(ze.renderer&&function(){var Z=Lt.defaults.renderer||new _e,ee=function(Ee){var Me=Z[Ee];Z[Ee]=function(){for(var Ye=arguments.length,nt=new Array(Ye),_t=0;_t<Ye;_t++)nt[_t]=arguments[_t];var nn=ze.renderer[Ee].apply(Z,nt);return nn===!1&&(nn=Me.apply(Z,nt)),nn}};for(var me in ze.renderer)ee(me);ke.renderer=Z}(),ze.tokenizer&&function(){var Z=Lt.defaults.tokenizer||new Ze,ee=function(Ee){var Me=Z[Ee];Z[Ee]=function(){for(var Ye=arguments.length,nt=new Array(Ye),_t=0;_t<Ye;_t++)nt[_t]=arguments[_t];var nn=ze.tokenizer[Ee].apply(Z,nt);return nn===!1&&(nn=Me.apply(Z,nt)),nn}};for(var me in ze.tokenizer)ee(me);ke.tokenizer=Z}(),ze.walkTokens){var Re=Lt.defaults.walkTokens;ke.walkTokens=function(Z){ze.walkTokens(Z),Re&&Re(Z)}}Lt.setOptions(ke)},Lt.walkTokens=function(ze,ke){for(var Re=pe(ze),Z;!(Z=Re()).done;){var ee=Z.value;switch(ke(ee),ee.type){case"table":{for(var me=pe(ee.tokens.header),ve;!(ve=me()).done;){var Ee=ve.value;Lt.walkTokens(Ee,ke)}for(var Me=pe(ee.tokens.cells),Ye;!(Ye=Me()).done;)for(var nt=Ye.value,_t=pe(nt),nn;!(nn=_t()).done;){var ln=nn.value;Lt.walkTokens(ln,ke)}break}case"list":{Lt.walkTokens(ee.items,ke);break}default:ee.tokens&&Lt.walkTokens(ee.tokens,ke)}}},Lt.parseInline=function(ze,ke){if(typeof ze=="undefined"||ze===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ze!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ze)+", string expected");ke=Ve({},Lt.defaults,ke||{}),Pt(ke);try{var Re=He.lexInline(ze,ke);return ke.walkTokens&&Lt.walkTokens(Re,ke.walkTokens),Ke.parseInline(Re,ke)}catch(Z){if(Z.message+=`
Please report this to https://github.com/markedjs/marked.`,ke.silent)return"<p>An error occurred:</p><pre>"+Mt(Z.message+"",!0)+"</pre>";throw Z}},Lt.Parser=Ke,Lt.parser=Ke.parse,Lt.Renderer=_e,Lt.TextRenderer=ft,Lt.Lexer=He,Lt.lexer=He.lex,Lt.Tokenizer=Ze,Lt.Slugger=Xe,Lt.parse=Lt;var tn=Lt;return tn})},11690:function(fn){const je=/[&<>"']/,b=/[&<>"']/g,x=/[<>"']|&(?!#?\w+;)/,ne=/[<>"']|&(?!#?\w+;)/g,pe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},te=Y=>pe[Y];function M(Y,L){if(L){if(je.test(Y))return Y.replace(b,te)}else if(x.test(Y))return Y.replace(ne,te);return Y}const f=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function oe(Y){return Y.replace(f,(L,se)=>(se=se.toLowerCase(),se==="colon"?":":se.charAt(0)==="#"?se.charAt(1)==="x"?String.fromCharCode(parseInt(se.substring(2),16)):String.fromCharCode(+se.substring(1)):""))}const Q=/(^|[^\[])\^/g;function o(Y,L){Y=Y.source||Y,L=L||"";const se={replace:(ae,Be)=>(Be=Be.source||Be,Be=Be.replace(Q,"$1"),Y=Y.replace(ae,Be),se),getRegex:()=>new RegExp(Y,L)};return se}const y=/[^\w:]/g,C=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(Y,L,se){if(Y){let ae;try{ae=decodeURIComponent(oe(se)).replace(y,"").toLowerCase()}catch(Be){return null}if(ae.indexOf("javascript:")===0||ae.indexOf("vbscript:")===0||ae.indexOf("data:")===0)return null}L&&!C.test(se)&&(se=B(L,se));try{se=encodeURI(se).replace(/%25/g,"%")}catch(ae){return null}return se}const m={},E=/^[^:]+:\/*[^/]*$/,S=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/;function B(Y,L){m[" "+Y]||(E.test(Y)?m[" "+Y]=Y+"/":m[" "+Y]=D(Y,"/",!0)),Y=m[" "+Y];const se=Y.indexOf(":")===-1;return L.substring(0,2)==="//"?se?L:Y.replace(S,"$1")+L:L.charAt(0)==="/"?se?L:Y.replace(I,"$1")+L:Y+L}const G={exec:function(){}};function R(Y){let L=1,se,ae;for(;L<arguments.length;L++){se=arguments[L];for(ae in se)Object.prototype.hasOwnProperty.call(se,ae)&&(Y[ae]=se[ae])}return Y}function O(Y,L){const se=Y.replace(/\|/g,(U,k,N)=>{let V=!1,J=k;for(;--J>=0&&N[J]==="\\";)V=!V;return V?"|":" |"}),ae=se.split(/ \|/);let Be=0;if(ae.length>L)ae.splice(L);else for(;ae.length<L;)ae.push("");for(;Be<ae.length;Be++)ae[Be]=ae[Be].trim().replace(/\\\|/g,"|");return ae}function D(Y,L,se){const ae=Y.length;if(ae===0)return"";let Be=0;for(;Be<ae;){const U=Y.charAt(ae-Be-1);if(U===L&&!se)Be++;else if(U!==L&&se)Be++;else break}return Y.substr(0,ae-Be)}function A(Y,L){if(Y.indexOf(L[1])===-1)return-1;const se=Y.length;let ae=0,Be=0;for(;Be<se;Be++)if(Y[Be]==="\\")Be++;else if(Y[Be]===L[0])ae++;else if(Y[Be]===L[1]&&(ae--,ae<0))return Be;return-1}function W(Y){Y&&Y.sanitize&&!Y.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function X(Y,L){if(L<1)return"";let se="";for(;L>1;)L&1&&(se+=Y),L>>=1,Y+=Y;return se+Y}fn.exports={escape:M,unescape:oe,edit:o,cleanUrl:h,resolveUrl:B,noopTest:G,merge:R,splitCells:O,rtrim:D,findClosingBracket:A,checkSanitizeDeprecation:W,repeatString:X}},75918:function(fn,je,b){"use strict";b.d(je,{Wi:function(){return f},Z0:function(){return oe},aU:function(){return M},eZ:function(){return o},wY:function(){return Q}});var x=b(4348),ne=b(69323),pe=b(13268),te=function(y,C,h,m){function E(S){return S instanceof h?S:new h(function(I){I(S)})}return new(h||(h=Promise))(function(S,I){function B(O){try{R(m.next(O))}catch(D){I(D)}}function G(O){try{R(m.throw(O))}catch(D){I(D)}}function R(O){O.done?S(O.value):E(O.value).then(B,G)}R((m=m.apply(y,C||[])).next())})};class M extends ne.JT{constructor(C,h="",m="",E=!0,S){super(),this._onDidChange=this._register(new x.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=C,this._label=h,this._cssClass=m,this._enabled=E,this._actionCallback=S}get id(){return this._id}get label(){return this._label}set label(C){this._setLabel(C)}_setLabel(C){this._label!==C&&(this._label=C,this._onDidChange.fire({label:C}))}get tooltip(){return this._tooltip||""}set tooltip(C){this._setTooltip(C)}_setTooltip(C){this._tooltip!==C&&(this._tooltip=C,this._onDidChange.fire({tooltip:C}))}get class(){return this._cssClass}set class(C){this._setClass(C)}_setClass(C){this._cssClass!==C&&(this._cssClass=C,this._onDidChange.fire({class:C}))}get enabled(){return this._enabled}set enabled(C){this._setEnabled(C)}_setEnabled(C){this._enabled!==C&&(this._enabled=C,this._onDidChange.fire({enabled:C}))}get checked(){return this._checked}set checked(C){this._setChecked(C)}_setChecked(C){this._checked!==C&&(this._checked=C,this._onDidChange.fire({checked:C}))}run(C,h){return te(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(C))})}}class f extends ne.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new x.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new x.Q5),this.onDidRun=this._onDidRun.event}run(C,h){return te(this,void 0,void 0,function*(){if(!C.enabled)return;this._onBeforeRun.fire({action:C});let m;try{yield this.runAction(C,h)}catch(E){m=E}this._onDidRun.fire({action:C,error:m})})}runAction(C,h){return te(this,void 0,void 0,function*(){yield C.run(h)})}}class oe extends M{constructor(C){super(oe.ID,C,C?"separator text":"separator"),this.checked=!1,this.enabled=!1}}oe.ID="vs.actions.separator";class Q{constructor(C,h,m,E){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=C,this.label=h,this.class=E,this._actions=m}get actions(){return this._actions}dispose(){}run(){return te(this,void 0,void 0,function*(){})}}class o extends M{constructor(){super(o.ID,pe.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(fn,je,b){"use strict";b.d(je,{ok:function(){return x}});function x(ne,pe){if(!ne)throw new Error(pe?`Assertion failed (${pe})`:"Assertion Failed")}},52615:function(fn,je,b){"use strict";b.d(je,{CM:function(){return M},JL:function(){return f},dT:function(){return Q},fK:function(){return te},lA:function(){return oe}});var x=b(4348);class ne{constructor(){this._icons=new Map,this._onDidRegister=new x.Q5}add(y){const C=this._icons.get(y.id);C?y.description?C.description=y.description:console.error(`Duplicate registration of codicon ${y.id}`):(this._icons.set(y.id,y),this._onDidRegister.fire(y))}get(y){return this._icons.get(y)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const pe=new ne,te=pe;function M(o,y){return new oe(o,y)}function f(o){return o?o.replace(/\$\((.*?)\)/g,(y,C)=>` ${C} `).trim():""}class oe{constructor(y,C,h){this.id=y,this.definition=C,this.description=h,pe.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var Q;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const y=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function C(E){if(E instanceof oe)return["codicon","codicon-"+E.id];const S=y.exec(E.id);if(!S)return C(oe.error);let[,I,B]=S;const G=["codicon","codicon-"+I];return B&&G.push("codicon-modifier-"+B.substr(1)),G}o.asClassNameArray=C;function h(E){return C(E).join(" ")}o.asClassName=h;function m(E){return"."+C(E).join(".")}o.asCSSSelector=m})(Q||(Q={})),function(o){o.add=new o("add",{fontCharacter:"\\ea60"}),o.plus=new o("plus",o.add.definition),o.gistNew=new o("gist-new",o.add.definition),o.repoCreate=new o("repo-create",o.add.definition),o.lightbulb=new o("lightbulb",{fontCharacter:"\\ea61"}),o.lightBulb=new o("light-bulb",{fontCharacter:"\\ea61"}),o.repo=new o("repo",{fontCharacter:"\\ea62"}),o.repoDelete=new o("repo-delete",{fontCharacter:"\\ea62"}),o.gistFork=new o("gist-fork",{fontCharacter:"\\ea63"}),o.repoForked=new o("repo-forked",{fontCharacter:"\\ea63"}),o.gitPullRequest=new o("git-pull-request",{fontCharacter:"\\ea64"}),o.gitPullRequestAbandoned=new o("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),o.recordKeys=new o("record-keys",{fontCharacter:"\\ea65"}),o.keyboard=new o("keyboard",{fontCharacter:"\\ea65"}),o.tag=new o("tag",{fontCharacter:"\\ea66"}),o.tagAdd=new o("tag-add",{fontCharacter:"\\ea66"}),o.tagRemove=new o("tag-remove",{fontCharacter:"\\ea66"}),o.person=new o("person",{fontCharacter:"\\ea67"}),o.personFollow=new o("person-follow",{fontCharacter:"\\ea67"}),o.personOutline=new o("person-outline",{fontCharacter:"\\ea67"}),o.personFilled=new o("person-filled",{fontCharacter:"\\ea67"}),o.gitBranch=new o("git-branch",{fontCharacter:"\\ea68"}),o.gitBranchCreate=new o("git-branch-create",{fontCharacter:"\\ea68"}),o.gitBranchDelete=new o("git-branch-delete",{fontCharacter:"\\ea68"}),o.sourceControl=new o("source-control",{fontCharacter:"\\ea68"}),o.mirror=new o("mirror",{fontCharacter:"\\ea69"}),o.mirrorPublic=new o("mirror-public",{fontCharacter:"\\ea69"}),o.star=new o("star",{fontCharacter:"\\ea6a"}),o.starAdd=new o("star-add",{fontCharacter:"\\ea6a"}),o.starDelete=new o("star-delete",{fontCharacter:"\\ea6a"}),o.starEmpty=new o("star-empty",{fontCharacter:"\\ea6a"}),o.comment=new o("comment",{fontCharacter:"\\ea6b"}),o.commentAdd=new o("comment-add",{fontCharacter:"\\ea6b"}),o.alert=new o("alert",{fontCharacter:"\\ea6c"}),o.warning=new o("warning",{fontCharacter:"\\ea6c"}),o.search=new o("search",{fontCharacter:"\\ea6d"}),o.searchSave=new o("search-save",{fontCharacter:"\\ea6d"}),o.logOut=new o("log-out",{fontCharacter:"\\ea6e"}),o.signOut=new o("sign-out",{fontCharacter:"\\ea6e"}),o.logIn=new o("log-in",{fontCharacter:"\\ea6f"}),o.signIn=new o("sign-in",{fontCharacter:"\\ea6f"}),o.eye=new o("eye",{fontCharacter:"\\ea70"}),o.eyeUnwatch=new o("eye-unwatch",{fontCharacter:"\\ea70"}),o.eyeWatch=new o("eye-watch",{fontCharacter:"\\ea70"}),o.circleFilled=new o("circle-filled",{fontCharacter:"\\ea71"}),o.primitiveDot=new o("primitive-dot",{fontCharacter:"\\ea71"}),o.closeDirty=new o("close-dirty",{fontCharacter:"\\ea71"}),o.debugBreakpoint=new o("debug-breakpoint",{fontCharacter:"\\ea71"}),o.debugBreakpointDisabled=new o("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),o.debugHint=new o("debug-hint",{fontCharacter:"\\ea71"}),o.primitiveSquare=new o("primitive-square",{fontCharacter:"\\ea72"}),o.edit=new o("edit",{fontCharacter:"\\ea73"}),o.pencil=new o("pencil",{fontCharacter:"\\ea73"}),o.info=new o("info",{fontCharacter:"\\ea74"}),o.issueOpened=new o("issue-opened",{fontCharacter:"\\ea74"}),o.gistPrivate=new o("gist-private",{fontCharacter:"\\ea75"}),o.gitForkPrivate=new o("git-fork-private",{fontCharacter:"\\ea75"}),o.lock=new o("lock",{fontCharacter:"\\ea75"}),o.mirrorPrivate=new o("mirror-private",{fontCharacter:"\\ea75"}),o.close=new o("close",{fontCharacter:"\\ea76"}),o.removeClose=new o("remove-close",{fontCharacter:"\\ea76"}),o.x=new o("x",{fontCharacter:"\\ea76"}),o.repoSync=new o("repo-sync",{fontCharacter:"\\ea77"}),o.sync=new o("sync",{fontCharacter:"\\ea77"}),o.clone=new o("clone",{fontCharacter:"\\ea78"}),o.desktopDownload=new o("desktop-download",{fontCharacter:"\\ea78"}),o.beaker=new o("beaker",{fontCharacter:"\\ea79"}),o.microscope=new o("microscope",{fontCharacter:"\\ea79"}),o.vm=new o("vm",{fontCharacter:"\\ea7a"}),o.deviceDesktop=new o("device-desktop",{fontCharacter:"\\ea7a"}),o.file=new o("file",{fontCharacter:"\\ea7b"}),o.fileText=new o("file-text",{fontCharacter:"\\ea7b"}),o.more=new o("more",{fontCharacter:"\\ea7c"}),o.ellipsis=new o("ellipsis",{fontCharacter:"\\ea7c"}),o.kebabHorizontal=new o("kebab-horizontal",{fontCharacter:"\\ea7c"}),o.mailReply=new o("mail-reply",{fontCharacter:"\\ea7d"}),o.reply=new o("reply",{fontCharacter:"\\ea7d"}),o.organization=new o("organization",{fontCharacter:"\\ea7e"}),o.organizationFilled=new o("organization-filled",{fontCharacter:"\\ea7e"}),o.organizationOutline=new o("organization-outline",{fontCharacter:"\\ea7e"}),o.newFile=new o("new-file",{fontCharacter:"\\ea7f"}),o.fileAdd=new o("file-add",{fontCharacter:"\\ea7f"}),o.newFolder=new o("new-folder",{fontCharacter:"\\ea80"}),o.fileDirectoryCreate=new o("file-directory-create",{fontCharacter:"\\ea80"}),o.trash=new o("trash",{fontCharacter:"\\ea81"}),o.trashcan=new o("trashcan",{fontCharacter:"\\ea81"}),o.history=new o("history",{fontCharacter:"\\ea82"}),o.clock=new o("clock",{fontCharacter:"\\ea82"}),o.folder=new o("folder",{fontCharacter:"\\ea83"}),o.fileDirectory=new o("file-directory",{fontCharacter:"\\ea83"}),o.symbolFolder=new o("symbol-folder",{fontCharacter:"\\ea83"}),o.logoGithub=new o("logo-github",{fontCharacter:"\\ea84"}),o.markGithub=new o("mark-github",{fontCharacter:"\\ea84"}),o.github=new o("github",{fontCharacter:"\\ea84"}),o.terminal=new o("terminal",{fontCharacter:"\\ea85"}),o.console=new o("console",{fontCharacter:"\\ea85"}),o.repl=new o("repl",{fontCharacter:"\\ea85"}),o.zap=new o("zap",{fontCharacter:"\\ea86"}),o.symbolEvent=new o("symbol-event",{fontCharacter:"\\ea86"}),o.error=new o("error",{fontCharacter:"\\ea87"}),o.stop=new o("stop",{fontCharacter:"\\ea87"}),o.variable=new o("variable",{fontCharacter:"\\ea88"}),o.symbolVariable=new o("symbol-variable",{fontCharacter:"\\ea88"}),o.array=new o("array",{fontCharacter:"\\ea8a"}),o.symbolArray=new o("symbol-array",{fontCharacter:"\\ea8a"}),o.symbolModule=new o("symbol-module",{fontCharacter:"\\ea8b"}),o.symbolPackage=new o("symbol-package",{fontCharacter:"\\ea8b"}),o.symbolNamespace=new o("symbol-namespace",{fontCharacter:"\\ea8b"}),o.symbolObject=new o("symbol-object",{fontCharacter:"\\ea8b"}),o.symbolMethod=new o("symbol-method",{fontCharacter:"\\ea8c"}),o.symbolFunction=new o("symbol-function",{fontCharacter:"\\ea8c"}),o.symbolConstructor=new o("symbol-constructor",{fontCharacter:"\\ea8c"}),o.symbolBoolean=new o("symbol-boolean",{fontCharacter:"\\ea8f"}),o.symbolNull=new o("symbol-null",{fontCharacter:"\\ea8f"}),o.symbolNumeric=new o("symbol-numeric",{fontCharacter:"\\ea90"}),o.symbolNumber=new o("symbol-number",{fontCharacter:"\\ea90"}),o.symbolStructure=new o("symbol-structure",{fontCharacter:"\\ea91"}),o.symbolStruct=new o("symbol-struct",{fontCharacter:"\\ea91"}),o.symbolParameter=new o("symbol-parameter",{fontCharacter:"\\ea92"}),o.symbolTypeParameter=new o("symbol-type-parameter",{fontCharacter:"\\ea92"}),o.symbolKey=new o("symbol-key",{fontCharacter:"\\ea93"}),o.symbolText=new o("symbol-text",{fontCharacter:"\\ea93"}),o.symbolReference=new o("symbol-reference",{fontCharacter:"\\ea94"}),o.goToFile=new o("go-to-file",{fontCharacter:"\\ea94"}),o.symbolEnum=new o("symbol-enum",{fontCharacter:"\\ea95"}),o.symbolValue=new o("symbol-value",{fontCharacter:"\\ea95"}),o.symbolRuler=new o("symbol-ruler",{fontCharacter:"\\ea96"}),o.symbolUnit=new o("symbol-unit",{fontCharacter:"\\ea96"}),o.activateBreakpoints=new o("activate-breakpoints",{fontCharacter:"\\ea97"}),o.archive=new o("archive",{fontCharacter:"\\ea98"}),o.arrowBoth=new o("arrow-both",{fontCharacter:"\\ea99"}),o.arrowDown=new o("arrow-down",{fontCharacter:"\\ea9a"}),o.arrowLeft=new o("arrow-left",{fontCharacter:"\\ea9b"}),o.arrowRight=new o("arrow-right",{fontCharacter:"\\ea9c"}),o.arrowSmallDown=new o("arrow-small-down",{fontCharacter:"\\ea9d"}),o.arrowSmallLeft=new o("arrow-small-left",{fontCharacter:"\\ea9e"}),o.arrowSmallRight=new o("arrow-small-right",{fontCharacter:"\\ea9f"}),o.arrowSmallUp=new o("arrow-small-up",{fontCharacter:"\\eaa0"}),o.arrowUp=new o("arrow-up",{fontCharacter:"\\eaa1"}),o.bell=new o("bell",{fontCharacter:"\\eaa2"}),o.bold=new o("bold",{fontCharacter:"\\eaa3"}),o.book=new o("book",{fontCharacter:"\\eaa4"}),o.bookmark=new o("bookmark",{fontCharacter:"\\eaa5"}),o.debugBreakpointConditionalUnverified=new o("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),o.debugBreakpointConditional=new o("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),o.debugBreakpointConditionalDisabled=new o("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),o.debugBreakpointDataUnverified=new o("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),o.debugBreakpointData=new o("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),o.debugBreakpointDataDisabled=new o("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),o.debugBreakpointLogUnverified=new o("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),o.debugBreakpointLog=new o("debug-breakpoint-log",{fontCharacter:"\\eaab"}),o.debugBreakpointLogDisabled=new o("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),o.briefcase=new o("briefcase",{fontCharacter:"\\eaac"}),o.broadcast=new o("broadcast",{fontCharacter:"\\eaad"}),o.browser=new o("browser",{fontCharacter:"\\eaae"}),o.bug=new o("bug",{fontCharacter:"\\eaaf"}),o.calendar=new o("calendar",{fontCharacter:"\\eab0"}),o.caseSensitive=new o("case-sensitive",{fontCharacter:"\\eab1"}),o.check=new o("check",{fontCharacter:"\\eab2"}),o.checklist=new o("checklist",{fontCharacter:"\\eab3"}),o.chevronDown=new o("chevron-down",{fontCharacter:"\\eab4"}),o.dropDownButton=new o("drop-down-button",o.chevronDown.definition),o.chevronLeft=new o("chevron-left",{fontCharacter:"\\eab5"}),o.chevronRight=new o("chevron-right",{fontCharacter:"\\eab6"}),o.chevronUp=new o("chevron-up",{fontCharacter:"\\eab7"}),o.chromeClose=new o("chrome-close",{fontCharacter:"\\eab8"}),o.chromeMaximize=new o("chrome-maximize",{fontCharacter:"\\eab9"}),o.chromeMinimize=new o("chrome-minimize",{fontCharacter:"\\eaba"}),o.chromeRestore=new o("chrome-restore",{fontCharacter:"\\eabb"}),o.circleOutline=new o("circle-outline",{fontCharacter:"\\eabc"}),o.debugBreakpointUnverified=new o("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),o.circleSlash=new o("circle-slash",{fontCharacter:"\\eabd"}),o.circuitBoard=new o("circuit-board",{fontCharacter:"\\eabe"}),o.clearAll=new o("clear-all",{fontCharacter:"\\eabf"}),o.clippy=new o("clippy",{fontCharacter:"\\eac0"}),o.closeAll=new o("close-all",{fontCharacter:"\\eac1"}),o.cloudDownload=new o("cloud-download",{fontCharacter:"\\eac2"}),o.cloudUpload=new o("cloud-upload",{fontCharacter:"\\eac3"}),o.code=new o("code",{fontCharacter:"\\eac4"}),o.collapseAll=new o("collapse-all",{fontCharacter:"\\eac5"}),o.colorMode=new o("color-mode",{fontCharacter:"\\eac6"}),o.commentDiscussion=new o("comment-discussion",{fontCharacter:"\\eac7"}),o.compareChanges=new o("compare-changes",{fontCharacter:"\\eafd"}),o.creditCard=new o("credit-card",{fontCharacter:"\\eac9"}),o.dash=new o("dash",{fontCharacter:"\\eacc"}),o.dashboard=new o("dashboard",{fontCharacter:"\\eacd"}),o.database=new o("database",{fontCharacter:"\\eace"}),o.debugContinue=new o("debug-continue",{fontCharacter:"\\eacf"}),o.debugDisconnect=new o("debug-disconnect",{fontCharacter:"\\ead0"}),o.debugPause=new o("debug-pause",{fontCharacter:"\\ead1"}),o.debugRestart=new o("debug-restart",{fontCharacter:"\\ead2"}),o.debugStart=new o("debug-start",{fontCharacter:"\\ead3"}),o.debugStepInto=new o("debug-step-into",{fontCharacter:"\\ead4"}),o.debugStepOut=new o("debug-step-out",{fontCharacter:"\\ead5"}),o.debugStepOver=new o("debug-step-over",{fontCharacter:"\\ead6"}),o.debugStop=new o("debug-stop",{fontCharacter:"\\ead7"}),o.debug=new o("debug",{fontCharacter:"\\ead8"}),o.deviceCameraVideo=new o("device-camera-video",{fontCharacter:"\\ead9"}),o.deviceCamera=new o("device-camera",{fontCharacter:"\\eada"}),o.deviceMobile=new o("device-mobile",{fontCharacter:"\\eadb"}),o.diffAdded=new o("diff-added",{fontCharacter:"\\eadc"}),o.diffIgnored=new o("diff-ignored",{fontCharacter:"\\eadd"}),o.diffModified=new o("diff-modified",{fontCharacter:"\\eade"}),o.diffRemoved=new o("diff-removed",{fontCharacter:"\\eadf"}),o.diffRenamed=new o("diff-renamed",{fontCharacter:"\\eae0"}),o.diff=new o("diff",{fontCharacter:"\\eae1"}),o.discard=new o("discard",{fontCharacter:"\\eae2"}),o.editorLayout=new o("editor-layout",{fontCharacter:"\\eae3"}),o.emptyWindow=new o("empty-window",{fontCharacter:"\\eae4"}),o.exclude=new o("exclude",{fontCharacter:"\\eae5"}),o.extensions=new o("extensions",{fontCharacter:"\\eae6"}),o.eyeClosed=new o("eye-closed",{fontCharacter:"\\eae7"}),o.fileBinary=new o("file-binary",{fontCharacter:"\\eae8"}),o.fileCode=new o("file-code",{fontCharacter:"\\eae9"}),o.fileMedia=new o("file-media",{fontCharacter:"\\eaea"}),o.filePdf=new o("file-pdf",{fontCharacter:"\\eaeb"}),o.fileSubmodule=new o("file-submodule",{fontCharacter:"\\eaec"}),o.fileSymlinkDirectory=new o("file-symlink-directory",{fontCharacter:"\\eaed"}),o.fileSymlinkFile=new o("file-symlink-file",{fontCharacter:"\\eaee"}),o.fileZip=new o("file-zip",{fontCharacter:"\\eaef"}),o.files=new o("files",{fontCharacter:"\\eaf0"}),o.filter=new o("filter",{fontCharacter:"\\eaf1"}),o.flame=new o("flame",{fontCharacter:"\\eaf2"}),o.foldDown=new o("fold-down",{fontCharacter:"\\eaf3"}),o.foldUp=new o("fold-up",{fontCharacter:"\\eaf4"}),o.fold=new o("fold",{fontCharacter:"\\eaf5"}),o.folderActive=new o("folder-active",{fontCharacter:"\\eaf6"}),o.folderOpened=new o("folder-opened",{fontCharacter:"\\eaf7"}),o.gear=new o("gear",{fontCharacter:"\\eaf8"}),o.gift=new o("gift",{fontCharacter:"\\eaf9"}),o.gistSecret=new o("gist-secret",{fontCharacter:"\\eafa"}),o.gist=new o("gist",{fontCharacter:"\\eafb"}),o.gitCommit=new o("git-commit",{fontCharacter:"\\eafc"}),o.gitCompare=new o("git-compare",{fontCharacter:"\\eafd"}),o.gitMerge=new o("git-merge",{fontCharacter:"\\eafe"}),o.githubAction=new o("github-action",{fontCharacter:"\\eaff"}),o.githubAlt=new o("github-alt",{fontCharacter:"\\eb00"}),o.globe=new o("globe",{fontCharacter:"\\eb01"}),o.grabber=new o("grabber",{fontCharacter:"\\eb02"}),o.graph=new o("graph",{fontCharacter:"\\eb03"}),o.gripper=new o("gripper",{fontCharacter:"\\eb04"}),o.heart=new o("heart",{fontCharacter:"\\eb05"}),o.home=new o("home",{fontCharacter:"\\eb06"}),o.horizontalRule=new o("horizontal-rule",{fontCharacter:"\\eb07"}),o.hubot=new o("hubot",{fontCharacter:"\\eb08"}),o.inbox=new o("inbox",{fontCharacter:"\\eb09"}),o.issueClosed=new o("issue-closed",{fontCharacter:"\\eba4"}),o.issueReopened=new o("issue-reopened",{fontCharacter:"\\eb0b"}),o.issues=new o("issues",{fontCharacter:"\\eb0c"}),o.italic=new o("italic",{fontCharacter:"\\eb0d"}),o.jersey=new o("jersey",{fontCharacter:"\\eb0e"}),o.json=new o("json",{fontCharacter:"\\eb0f"}),o.kebabVertical=new o("kebab-vertical",{fontCharacter:"\\eb10"}),o.key=new o("key",{fontCharacter:"\\eb11"}),o.law=new o("law",{fontCharacter:"\\eb12"}),o.lightbulbAutofix=new o("lightbulb-autofix",{fontCharacter:"\\eb13"}),o.linkExternal=new o("link-external",{fontCharacter:"\\eb14"}),o.link=new o("link",{fontCharacter:"\\eb15"}),o.listOrdered=new o("list-ordered",{fontCharacter:"\\eb16"}),o.listUnordered=new o("list-unordered",{fontCharacter:"\\eb17"}),o.liveShare=new o("live-share",{fontCharacter:"\\eb18"}),o.loading=new o("loading",{fontCharacter:"\\eb19"}),o.location=new o("location",{fontCharacter:"\\eb1a"}),o.mailRead=new o("mail-read",{fontCharacter:"\\eb1b"}),o.mail=new o("mail",{fontCharacter:"\\eb1c"}),o.markdown=new o("markdown",{fontCharacter:"\\eb1d"}),o.megaphone=new o("megaphone",{fontCharacter:"\\eb1e"}),o.mention=new o("mention",{fontCharacter:"\\eb1f"}),o.milestone=new o("milestone",{fontCharacter:"\\eb20"}),o.mortarBoard=new o("mortar-board",{fontCharacter:"\\eb21"}),o.move=new o("move",{fontCharacter:"\\eb22"}),o.multipleWindows=new o("multiple-windows",{fontCharacter:"\\eb23"}),o.mute=new o("mute",{fontCharacter:"\\eb24"}),o.noNewline=new o("no-newline",{fontCharacter:"\\eb25"}),o.note=new o("note",{fontCharacter:"\\eb26"}),o.octoface=new o("octoface",{fontCharacter:"\\eb27"}),o.openPreview=new o("open-preview",{fontCharacter:"\\eb28"}),o.package_=new o("package",{fontCharacter:"\\eb29"}),o.paintcan=new o("paintcan",{fontCharacter:"\\eb2a"}),o.pin=new o("pin",{fontCharacter:"\\eb2b"}),o.play=new o("play",{fontCharacter:"\\eb2c"}),o.run=new o("run",{fontCharacter:"\\eb2c"}),o.plug=new o("plug",{fontCharacter:"\\eb2d"}),o.preserveCase=new o("preserve-case",{fontCharacter:"\\eb2e"}),o.preview=new o("preview",{fontCharacter:"\\eb2f"}),o.project=new o("project",{fontCharacter:"\\eb30"}),o.pulse=new o("pulse",{fontCharacter:"\\eb31"}),o.question=new o("question",{fontCharacter:"\\eb32"}),o.quote=new o("quote",{fontCharacter:"\\eb33"}),o.radioTower=new o("radio-tower",{fontCharacter:"\\eb34"}),o.reactions=new o("reactions",{fontCharacter:"\\eb35"}),o.references=new o("references",{fontCharacter:"\\eb36"}),o.refresh=new o("refresh",{fontCharacter:"\\eb37"}),o.regex=new o("regex",{fontCharacter:"\\eb38"}),o.remoteExplorer=new o("remote-explorer",{fontCharacter:"\\eb39"}),o.remote=new o("remote",{fontCharacter:"\\eb3a"}),o.remove=new o("remove",{fontCharacter:"\\eb3b"}),o.replaceAll=new o("replace-all",{fontCharacter:"\\eb3c"}),o.replace=new o("replace",{fontCharacter:"\\eb3d"}),o.repoClone=new o("repo-clone",{fontCharacter:"\\eb3e"}),o.repoForcePush=new o("repo-force-push",{fontCharacter:"\\eb3f"}),o.repoPull=new o("repo-pull",{fontCharacter:"\\eb40"}),o.repoPush=new o("repo-push",{fontCharacter:"\\eb41"}),o.report=new o("report",{fontCharacter:"\\eb42"}),o.requestChanges=new o("request-changes",{fontCharacter:"\\eb43"}),o.rocket=new o("rocket",{fontCharacter:"\\eb44"}),o.rootFolderOpened=new o("root-folder-opened",{fontCharacter:"\\eb45"}),o.rootFolder=new o("root-folder",{fontCharacter:"\\eb46"}),o.rss=new o("rss",{fontCharacter:"\\eb47"}),o.ruby=new o("ruby",{fontCharacter:"\\eb48"}),o.saveAll=new o("save-all",{fontCharacter:"\\eb49"}),o.saveAs=new o("save-as",{fontCharacter:"\\eb4a"}),o.save=new o("save",{fontCharacter:"\\eb4b"}),o.screenFull=new o("screen-full",{fontCharacter:"\\eb4c"}),o.screenNormal=new o("screen-normal",{fontCharacter:"\\eb4d"}),o.searchStop=new o("search-stop",{fontCharacter:"\\eb4e"}),o.server=new o("server",{fontCharacter:"\\eb50"}),o.settingsGear=new o("settings-gear",{fontCharacter:"\\eb51"}),o.settings=new o("settings",{fontCharacter:"\\eb52"}),o.shield=new o("shield",{fontCharacter:"\\eb53"}),o.smiley=new o("smiley",{fontCharacter:"\\eb54"}),o.sortPrecedence=new o("sort-precedence",{fontCharacter:"\\eb55"}),o.splitHorizontal=new o("split-horizontal",{fontCharacter:"\\eb56"}),o.splitVertical=new o("split-vertical",{fontCharacter:"\\eb57"}),o.squirrel=new o("squirrel",{fontCharacter:"\\eb58"}),o.starFull=new o("star-full",{fontCharacter:"\\eb59"}),o.starHalf=new o("star-half",{fontCharacter:"\\eb5a"}),o.symbolClass=new o("symbol-class",{fontCharacter:"\\eb5b"}),o.symbolColor=new o("symbol-color",{fontCharacter:"\\eb5c"}),o.symbolConstant=new o("symbol-constant",{fontCharacter:"\\eb5d"}),o.symbolEnumMember=new o("symbol-enum-member",{fontCharacter:"\\eb5e"}),o.symbolField=new o("symbol-field",{fontCharacter:"\\eb5f"}),o.symbolFile=new o("symbol-file",{fontCharacter:"\\eb60"}),o.symbolInterface=new o("symbol-interface",{fontCharacter:"\\eb61"}),o.symbolKeyword=new o("symbol-keyword",{fontCharacter:"\\eb62"}),o.symbolMisc=new o("symbol-misc",{fontCharacter:"\\eb63"}),o.symbolOperator=new o("symbol-operator",{fontCharacter:"\\eb64"}),o.symbolProperty=new o("symbol-property",{fontCharacter:"\\eb65"}),o.wrench=new o("wrench",{fontCharacter:"\\eb65"}),o.wrenchSubaction=new o("wrench-subaction",{fontCharacter:"\\eb65"}),o.symbolSnippet=new o("symbol-snippet",{fontCharacter:"\\eb66"}),o.tasklist=new o("tasklist",{fontCharacter:"\\eb67"}),o.telescope=new o("telescope",{fontCharacter:"\\eb68"}),o.textSize=new o("text-size",{fontCharacter:"\\eb69"}),o.threeBars=new o("three-bars",{fontCharacter:"\\eb6a"}),o.thumbsdown=new o("thumbsdown",{fontCharacter:"\\eb6b"}),o.thumbsup=new o("thumbsup",{fontCharacter:"\\eb6c"}),o.tools=new o("tools",{fontCharacter:"\\eb6d"}),o.triangleDown=new o("triangle-down",{fontCharacter:"\\eb6e"}),o.triangleLeft=new o("triangle-left",{fontCharacter:"\\eb6f"}),o.triangleRight=new o("triangle-right",{fontCharacter:"\\eb70"}),o.triangleUp=new o("triangle-up",{fontCharacter:"\\eb71"}),o.twitter=new o("twitter",{fontCharacter:"\\eb72"}),o.unfold=new o("unfold",{fontCharacter:"\\eb73"}),o.unlock=new o("unlock",{fontCharacter:"\\eb74"}),o.unmute=new o("unmute",{fontCharacter:"\\eb75"}),o.unverified=new o("unverified",{fontCharacter:"\\eb76"}),o.verified=new o("verified",{fontCharacter:"\\eb77"}),o.versions=new o("versions",{fontCharacter:"\\eb78"}),o.vmActive=new o("vm-active",{fontCharacter:"\\eb79"}),o.vmOutline=new o("vm-outline",{fontCharacter:"\\eb7a"}),o.vmRunning=new o("vm-running",{fontCharacter:"\\eb7b"}),o.watch=new o("watch",{fontCharacter:"\\eb7c"}),o.whitespace=new o("whitespace",{fontCharacter:"\\eb7d"}),o.wholeWord=new o("whole-word",{fontCharacter:"\\eb7e"}),o.window=new o("window",{fontCharacter:"\\eb7f"}),o.wordWrap=new o("word-wrap",{fontCharacter:"\\eb80"}),o.zoomIn=new o("zoom-in",{fontCharacter:"\\eb81"}),o.zoomOut=new o("zoom-out",{fontCharacter:"\\eb82"}),o.listFilter=new o("list-filter",{fontCharacter:"\\eb83"}),o.listFlat=new o("list-flat",{fontCharacter:"\\eb84"}),o.listSelection=new o("list-selection",{fontCharacter:"\\eb85"}),o.selection=new o("selection",{fontCharacter:"\\eb85"}),o.listTree=new o("list-tree",{fontCharacter:"\\eb86"}),o.debugBreakpointFunctionUnverified=new o("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),o.debugBreakpointFunction=new o("debug-breakpoint-function",{fontCharacter:"\\eb88"}),o.debugBreakpointFunctionDisabled=new o("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),o.debugStackframeActive=new o("debug-stackframe-active",{fontCharacter:"\\eb89"}),o.debugStackframeDot=new o("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),o.debugStackframe=new o("debug-stackframe",{fontCharacter:"\\eb8b"}),o.debugStackframeFocused=new o("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),o.debugBreakpointUnsupported=new o("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),o.symbolString=new o("symbol-string",{fontCharacter:"\\eb8d"}),o.debugReverseContinue=new o("debug-reverse-continue",{fontCharacter:"\\eb8e"}),o.debugStepBack=new o("debug-step-back",{fontCharacter:"\\eb8f"}),o.debugRestartFrame=new o("debug-restart-frame",{fontCharacter:"\\eb90"}),o.callIncoming=new o("call-incoming",{fontCharacter:"\\eb92"}),o.callOutgoing=new o("call-outgoing",{fontCharacter:"\\eb93"}),o.menu=new o("menu",{fontCharacter:"\\eb94"}),o.expandAll=new o("expand-all",{fontCharacter:"\\eb95"}),o.feedback=new o("feedback",{fontCharacter:"\\eb96"}),o.groupByRefType=new o("group-by-ref-type",{fontCharacter:"\\eb97"}),o.ungroupByRefType=new o("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),o.account=new o("account",{fontCharacter:"\\eb99"}),o.bellDot=new o("bell-dot",{fontCharacter:"\\eb9a"}),o.debugConsole=new o("debug-console",{fontCharacter:"\\eb9b"}),o.library=new o("library",{fontCharacter:"\\eb9c"}),o.output=new o("output",{fontCharacter:"\\eb9d"}),o.runAll=new o("run-all",{fontCharacter:"\\eb9e"}),o.syncIgnored=new o("sync-ignored",{fontCharacter:"\\eb9f"}),o.pinned=new o("pinned",{fontCharacter:"\\eba0"}),o.githubInverted=new o("github-inverted",{fontCharacter:"\\eba1"}),o.debugAlt=new o("debug-alt",{fontCharacter:"\\eb91"}),o.serverProcess=new o("server-process",{fontCharacter:"\\eba2"}),o.serverEnvironment=new o("server-environment",{fontCharacter:"\\eba3"}),o.pass=new o("pass",{fontCharacter:"\\eba4"}),o.stopCircle=new o("stop-circle",{fontCharacter:"\\eba5"}),o.playCircle=new o("play-circle",{fontCharacter:"\\eba6"}),o.record=new o("record",{fontCharacter:"\\eba7"}),o.debugAltSmall=new o("debug-alt-small",{fontCharacter:"\\eba8"}),o.vmConnect=new o("vm-connect",{fontCharacter:"\\eba9"}),o.cloud=new o("cloud",{fontCharacter:"\\ebaa"}),o.merge=new o("merge",{fontCharacter:"\\ebab"}),o.exportIcon=new o("export",{fontCharacter:"\\ebac"}),o.graphLeft=new o("graph-left",{fontCharacter:"\\ebad"}),o.magnet=new o("magnet",{fontCharacter:"\\ebae"}),o.notebook=new o("notebook",{fontCharacter:"\\ebaf"}),o.redo=new o("redo",{fontCharacter:"\\ebb0"}),o.checkAll=new o("check-all",{fontCharacter:"\\ebb1"}),o.pinnedDirty=new o("pinned-dirty",{fontCharacter:"\\ebb2"}),o.passFilled=new o("pass-filled",{fontCharacter:"\\ebb3"}),o.circleLargeFilled=new o("circle-large-filled",{fontCharacter:"\\ebb4"}),o.circleLargeOutline=new o("circle-large-outline",{fontCharacter:"\\ebb5"}),o.combine=new o("combine",{fontCharacter:"\\ebb6"}),o.gather=new o("gather",{fontCharacter:"\\ebb6"}),o.table=new o("table",{fontCharacter:"\\ebb7"}),o.variableGroup=new o("variable-group",{fontCharacter:"\\ebb8"}),o.typeHierarchy=new o("type-hierarchy",{fontCharacter:"\\ebb9"}),o.typeHierarchySub=new o("type-hierarchy-sub",{fontCharacter:"\\ebba"}),o.typeHierarchySuper=new o("type-hierarchy-super",{fontCharacter:"\\ebbb"}),o.gitPullRequestCreate=new o("git-pull-request-create",{fontCharacter:"\\ebbc"}),o.runAbove=new o("run-above",{fontCharacter:"\\ebbd"}),o.runBelow=new o("run-below",{fontCharacter:"\\ebbe"}),o.notebookTemplate=new o("notebook-template",{fontCharacter:"\\ebbf"}),o.debugRerun=new o("debug-rerun",{fontCharacter:"\\ebc0"}),o.workspaceTrusted=new o("workspace-trusted",{fontCharacter:"\\ebc1"}),o.workspaceUntrusted=new o("workspace-untrusted",{fontCharacter:"\\ebc2"}),o.workspaceUnspecified=new o("workspace-unspecified",{fontCharacter:"\\ebc3"}),o.terminalCmd=new o("terminal-cmd",{fontCharacter:"\\ebc4"}),o.terminalDebian=new o("terminal-debian",{fontCharacter:"\\ebc5"}),o.terminalLinux=new o("terminal-linux",{fontCharacter:"\\ebc6"}),o.terminalPowershell=new o("terminal-powershell",{fontCharacter:"\\ebc7"}),o.terminalTmux=new o("terminal-tmux",{fontCharacter:"\\ebc8"}),o.terminalUbuntu=new o("terminal-ubuntu",{fontCharacter:"\\ebc9"}),o.terminalBash=new o("terminal-bash",{fontCharacter:"\\ebca"}),o.arrowSwap=new o("arrow-swap",{fontCharacter:"\\ebcb"}),o.copy=new o("copy",{fontCharacter:"\\ebcc"}),o.personAdd=new o("person-add",{fontCharacter:"\\ebcd"}),o.filterFilled=new o("filter-filled",{fontCharacter:"\\ebce"}),o.wand=new o("wand",{fontCharacter:"\\ebcf"}),o.debugLineByLine=new o("debug-line-by-line",{fontCharacter:"\\ebd0"}),o.inspect=new o("inspect",{fontCharacter:"\\ebd1"}),o.layers=new o("layers",{fontCharacter:"\\ebd2"}),o.layersDot=new o("layers-dot",{fontCharacter:"\\ebd3"}),o.layersActive=new o("layers-active",{fontCharacter:"\\ebd4"}),o.compass=new o("compass",{fontCharacter:"\\ebd5"}),o.compassDot=new o("compass-dot",{fontCharacter:"\\ebd6"}),o.compassActive=new o("compass-active",{fontCharacter:"\\ebd7"}),o.azure=new o("azure",{fontCharacter:"\\ebd8"}),o.issueDraft=new o("issue-draft",{fontCharacter:"\\ebd9"}),o.gitPullRequestClosed=new o("git-pull-request-closed",{fontCharacter:"\\ebda"}),o.gitPullRequestDraft=new o("git-pull-request-draft",{fontCharacter:"\\ebdb"}),o.debugAll=new o("debug-all",{fontCharacter:"\\ebdc"}),o.debugCoverage=new o("debug-coverage",{fontCharacter:"\\ebdd"}),o.runErrors=new o("run-errors",{fontCharacter:"\\ebde"}),o.folderLibrary=new o("folder-library",{fontCharacter:"\\ebdf"}),o.debugContinueSmall=new o("debug-continue-small",{fontCharacter:"\\ebe0"}),o.beakerStop=new o("beaker-stop",{fontCharacter:"\\ebe1"}),o.graphLine=new o("graph-line",{fontCharacter:"\\ebe2"}),o.graphScatter=new o("graph-scatter",{fontCharacter:"\\ebe3"}),o.pieChart=new o("pie-chart",{fontCharacter:"\\ebe4"}),o.bracket=new o("bracket",o.json.definition),o.bracketDot=new o("bracket-dot",{fontCharacter:"\\ebe5"}),o.bracketError=new o("bracket-error",{fontCharacter:"\\ebe6"}),o.lockSmall=new o("lock-small",{fontCharacter:"\\ebe7"}),o.azureDevops=new o("azure-devops",{fontCharacter:"\\ebe8"}),o.verifiedFilled=new o("verified-filled",{fontCharacter:"\\ebe9"})}(oe||(oe={}))},79881:function(fn,je,b){"use strict";b.d(je,{B8:function(){return C},Cp:function(){return te},F0:function(){return Q},L6:function(){return y},VV:function(){return oe},b1:function(){return o},dL:function(){return pe},ri:function(){return M}});class x{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
`+m.stack):m},0)}}emit(m){this.listeners.forEach(E=>{E(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const ne=new x;function pe(h){oe(h)||ne.onUnexpectedError(h)}function te(h){oe(h)||ne.onUnexpectedExternalError(h)}function M(h){if(h instanceof Error){let{name:m,message:E}=h;const S=h.stacktrace||h.stack;return{$isError:!0,name:m,message:E,stack:S}}return h}const f="Canceled";function oe(h){return h instanceof Error&&h.name===f&&h.message===f}function Q(){const h=new Error(f);return h.name=h.message,h}function o(h){return h?new Error(`Illegal argument: ${h}`):new Error("Illegal argument")}function y(h){return h?new Error(`Illegal state: ${h}`):new Error("Illegal state")}class C extends Error{constructor(m){super("NotSupported"),m&&(this.message=m)}}},4348:function(fn,je,b){"use strict";b.d(je,{D0:function(){return C},E7:function(){return h},K3:function(){return y},Q5:function(){return o},ZD:function(){return m},ju:function(){return M}});var x=b(79881),ne=b(69323),pe=b(34502),te=b(95830),M;(function(E){E.None=()=>ne.JT.None;function S(N){return(V,J=null,H)=>{let v=!1,g;return g=N(F=>{if(!v)return g?g.dispose():v=!0,V.call(J,F)},null,H),v&&g.dispose(),g}}E.once=S;function I(N,V){return A((J,H=null,v)=>N(g=>J.call(H,V(g)),null,v))}E.map=I;function B(N,V){return A((J,H=null,v)=>N(g=>{V(g),J.call(H,g)},null,v))}E.forEach=B;function G(N,V){return A((J,H=null,v)=>N(g=>V(g)&&J.call(H,g),null,v))}E.filter=G;function R(N){return N}E.signal=R;function O(...N){return(V,J=null,H)=>(0,ne.F8)(...N.map(v=>v(g=>V.call(J,g),null,H)))}E.any=O;function D(N,V,J){let H=J;return I(N,v=>(H=V(H,v),H))}E.reduce=D;function A(N){let V;const J=new o({onFirstListenerAdd(){V=N(J.fire,J)},onLastListenerRemove(){V.dispose()}});return J.event}function W(N,V,J=100,H=!1,v){let g,F,ie,ue=0;const Le=new o({leakWarningThreshold:v,onFirstListenerAdd(){g=N(Je=>{ue++,F=V(F,Je),H&&!ie&&(Le.fire(F),F=void 0),clearTimeout(ie),ie=setTimeout(()=>{const rt=F;F=void 0,ie=void 0,(!H||ue>1)&&Le.fire(rt),ue=0},J)})},onLastListenerRemove(){g.dispose()}});return Le.event}E.debounce=W;function X(N,V=(J,H)=>J===H){let J=!0,H;return G(N,v=>{const g=J||!V(v,H);return J=!1,H=v,g})}E.latch=X;function Y(N,V){return[E.filter(N,V),E.filter(N,J=>!V(J))]}E.split=Y;function L(N,V=!1,J=[]){let H=J.slice(),v=N(ie=>{H?H.push(ie):F.fire(ie)});const g=()=>{H&&H.forEach(ie=>F.fire(ie)),H=null},F=new o({onFirstListenerAdd(){v||(v=N(ie=>F.fire(ie)))},onFirstListenerDidAdd(){H&&(V?setTimeout(g):g())},onLastListenerRemove(){v&&v.dispose(),v=null}});return F.event}E.buffer=L;class se{constructor(V){this.event=V}map(V){return new se(I(this.event,V))}forEach(V){return new se(B(this.event,V))}filter(V){return new se(G(this.event,V))}reduce(V,J){return new se(D(this.event,V,J))}latch(){return new se(X(this.event))}debounce(V,J=100,H=!1,v){return new se(W(this.event,V,J,H,v))}on(V,J,H){return this.event(V,J,H)}once(V,J,H){return S(this.event)(V,J,H)}}function ae(N){return new se(N)}E.chain=ae;function Be(N,V,J=H=>H){const H=(...ie)=>F.fire(J(...ie)),v=()=>N.on(V,H),g=()=>N.removeListener(V,H),F=new o({onFirstListenerAdd:v,onLastListenerRemove:g});return F.event}E.fromNodeEventEmitter=Be;function U(N,V,J=H=>H){const H=(...ie)=>F.fire(J(...ie)),v=()=>N.addEventListener(V,H),g=()=>N.removeEventListener(V,H),F=new o({onFirstListenerAdd:v,onLastListenerRemove:g});return F.event}E.fromDOMEventEmitter=U;function k(N){return new Promise(V=>S(N)(V))}E.toPromise=k})(M||(M={}));class f{constructor(S){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${S}_${f._idPool++}`}start(S){this._stopWatch=new te.G(!0),this._listenerCount=S}stop(){if(this._stopWatch){const S=this._stopWatch.elapsed();this._elapsedOverall+=S,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${S.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}f._idPool=0;let oe=-1;class Q{constructor(S,I=Math.random().toString(18).slice(2,5)){this.customThreshold=S,this.name=I,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(S){let I=oe;if(typeof this.customThreshold=="number"&&(I=this.customThreshold),I<=0||S<I)return;this._stacks||(this._stacks=new Map);const B=new Error().stack.split(`
`).slice(3).join(`
`),G=this._stacks.get(B)||0;if(this._stacks.set(B,G+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=I*.5;let R,O=0;for(const[D,A]of this._stacks)(!R||O<A)&&(R=D,O=A);console.warn(`[${this.name}] potential listener LEAK detected, having ${S} listeners already. MOST frequent listener (${O}):`),console.warn(R)}return()=>{const R=this._stacks.get(B)||0;this._stacks.set(B,R-1)}}}class o{constructor(S){var I;this._disposed=!1,this._options=S,this._leakageMon=oe>0?new Q(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((I=this._options)===null||I===void 0)&&I._profName?new f(this._options._profName):void 0}get event(){return this._event||(this._event=(S,I,B)=>{var G;this._listeners||(this._listeners=new pe.S);const R=this._listeners.isEmpty();R&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const O=this._listeners.push(I?[S,I]:S);R&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,S,I);const D=(G=this._leakageMon)===null||G===void 0?void 0:G.check(this._listeners.size),A=(0,ne.OF)(()=>{D&&D(),this._disposed||(O(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return B instanceof ne.SL?B.add(A):Array.isArray(B)&&B.push(A),A}),this._event}fire(S){var I,B;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new pe.S);for(let G of this._listeners)this._deliveryQueue.push([G,S]);for((I=this._perfMon)===null||I===void 0||I.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[G,R]=this._deliveryQueue.shift();try{typeof G=="function"?G.call(void 0,R):G[0].call(G[1],R)}catch(O){(0,x.dL)(O)}}(B=this._perfMon)===null||B===void 0||B.stop()}}dispose(){var S,I,B,G,R;this._disposed||(this._disposed=!0,(S=this._listeners)===null||S===void 0||S.clear(),(I=this._deliveryQueue)===null||I===void 0||I.clear(),(G=(B=this._options)===null||B===void 0?void 0:B.onLastListenerRemove)===null||G===void 0||G.call(B),(R=this._leakageMon)===null||R===void 0||R.dispose())}}class y extends o{constructor(S){super(S),this._isPaused=0,this._eventQueue=new pe.S,this._mergeFn=S==null?void 0:S.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const S=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(S))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(S){this._listeners&&(this._isPaused!==0?this._eventQueue.push(S):super.fire(S))}}class C extends y{constructor(S){var I;super(S),this._delay=(I=S.delay)!==null&&I!==void 0?I:100}fire(S){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(S)}}class h{constructor(){this.buffers=[]}wrapEvent(S){return(I,B,G)=>S(R=>{const O=this.buffers[this.buffers.length-1];O?O.push(()=>I.call(B,R)):I.call(B,R)},void 0,G)}bufferEvents(S){const I=[];this.buffers.push(I);const B=S();return this.buffers.pop(),I.forEach(G=>G()),B}}class m{constructor(){this.listening=!1,this.inputEvent=M.None,this.inputEventListener=ne.JT.None,this.emitter=new o({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(S){this.inputEvent=S,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=S(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(fn,je,b){"use strict";b.d(je,{I:function(){return x}});function x(ne){const pe=this;let te=!1,M;return function(){return te||(te=!0,M=ne.apply(pe,arguments)),M}}},88226:function(fn,je,b){"use strict";b.d(je,{$:function(){return x}});var x;(function(ne){function pe(O){return O&&typeof O=="object"&&typeof O[Symbol.iterator]=="function"}ne.is=pe;const te=Object.freeze([]);function M(){return te}ne.empty=M;function*f(O){yield O}ne.single=f;function oe(O){return O||te}ne.from=oe;function Q(O){return!O||O[Symbol.iterator]().next().done===!0}ne.isEmpty=Q;function o(O){return O[Symbol.iterator]().next().value}ne.first=o;function y(O,D){for(const A of O)if(D(A))return!0;return!1}ne.some=y;function C(O,D){for(const A of O)if(D(A))return A}ne.find=C;function*h(O,D){for(const A of O)D(A)&&(yield A)}ne.filter=h;function*m(O,D){let A=0;for(const W of O)yield D(W,A++)}ne.map=m;function*E(...O){for(const D of O)for(const A of D)yield A}ne.concat=E;function*S(O){for(const D of O)for(const A of D)yield A}ne.concatNested=S;function I(O,D,A){let W=A;for(const X of O)W=D(W,X);return W}ne.reduce=I;function*B(O,D,A=O.length){for(D<0&&(D+=O.length),A<0?A+=O.length:A>O.length&&(A=O.length);D<A;D++)yield O[D]}ne.slice=B;function G(O,D=Number.POSITIVE_INFINITY){const A=[];if(D===0)return[A,O];const W=O[Symbol.iterator]();for(let X=0;X<D;X++){const Y=W.next();if(Y.done)return[A,ne.empty()];A.push(Y.value)}return[A,{[Symbol.iterator](){return W}}]}ne.consume=G;function R(O,D,A=(W,X)=>W===X){const W=O[Symbol.iterator](),X=D[Symbol.iterator]();for(;;){const Y=W.next(),L=X.next();if(Y.done!==L.done)return!1;if(Y.done)return!0;if(!A(Y.value,L.value))return!1}}ne.equals=R})(x||(x={}))},69323:function(fn,je,b){"use strict";b.d(je,{B9:function(){return m},F8:function(){return E},JT:function(){return B},Jz:function(){return R},OF:function(){return S},SL:function(){return I},Wf:function(){return h},XK:function(){return G},dk:function(){return y}});var x=b(17845),ne=b(88226);const pe=!1;let te=null;function M(O){te=O}if(pe){const O="__is_disposable_tracked__";M(new class{trackDisposable(D){const A=new Error("Potentially leaked disposable").stack;setTimeout(()=>{D[O]||console.log(A)},3e3)}setParent(D,A){if(D&&D!==B.None)try{D[O]=!0}catch(W){}}markAsDisposed(D){if(D&&D!==B.None)try{D[O]=!0}catch(A){}}markAsSingleton(D){}})}function f(O){return te==null||te.trackDisposable(O),O}function oe(O){te==null||te.markAsDisposed(O)}function Q(O,D){te==null||te.setParent(O,D)}function o(O,D){if(te)for(const A of O)te.setParent(A,D)}function y(O){return te==null||te.markAsSingleton(O),O}class C extends Error{constructor(D){super(`Encountered errors while disposing of store. Errors: [${D.join(", ")}]`),this.errors=D}}function h(O){return typeof O.dispose=="function"&&O.dispose.length===0}function m(O){if(ne.$.is(O)){let D=[];for(const A of O)if(A)try{A.dispose()}catch(W){D.push(W)}if(D.length===1)throw D[0];if(D.length>1)throw new C(D);return Array.isArray(O)?[]:O}else if(O)return O.dispose(),O}function E(...O){const D=S(()=>m(O));return o(O,D),D}function S(O){const D=f({dispose:(0,x.I)(()=>{oe(D),O()})});return D}class I{constructor(){this._toDispose=new Set,this._isDisposed=!1,f(this)}dispose(){this._isDisposed||(oe(this),this._isDisposed=!0,this.clear())}clear(){try{m(this._toDispose.values())}finally{this._toDispose.clear()}}add(D){if(!D)return D;if(D===this)throw new Error("Cannot register a disposable on itself!");return Q(D,this),this._isDisposed?I.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(D),D}}I.DISABLE_DISPOSED_WARNING=!1;class B{constructor(){this._store=new I,f(this),Q(this._store,this)}dispose(){oe(this),this._store.dispose()}_register(D){if(D===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(D)}}B.None=Object.freeze({dispose(){}});class G{constructor(){this._isDisposed=!1,f(this)}get value(){return this._isDisposed?void 0:this._value}set value(D){var A;this._isDisposed||D===this._value||((A=this._value)===null||A===void 0||A.dispose(),D&&Q(D,this),this._value=D)}clear(){this.value=void 0}dispose(){var D;this._isDisposed=!0,oe(this),(D=this._value)===null||D===void 0||D.dispose(),this._value=void 0}clearAndLeak(){const D=this._value;return this._value=void 0,D&&Q(D,null),D}}class R{constructor(D){this.object=D}dispose(){}}},34502:function(fn,je,b){"use strict";b.d(je,{S:function(){return ne}});class x{constructor(te){this.element=te,this.next=x.Undefined,this.prev=x.Undefined}}x.Undefined=new x(void 0);class ne{constructor(){this._first=x.Undefined,this._last=x.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===x.Undefined}clear(){let te=this._first;for(;te!==x.Undefined;){const M=te.next;te.prev=x.Undefined,te.next=x.Undefined,te=M}this._first=x.Undefined,this._last=x.Undefined,this._size=0}unshift(te){return this._insert(te,!1)}push(te){return this._insert(te,!0)}_insert(te,M){const f=new x(te);if(this._first===x.Undefined)this._first=f,this._last=f;else if(M){const Q=this._last;this._last=f,f.prev=Q,Q.next=f}else{const Q=this._first;this._first=f,f.next=Q,Q.prev=f}this._size+=1;let oe=!1;return()=>{oe||(oe=!0,this._remove(f))}}shift(){if(this._first!==x.Undefined){const te=this._first.element;return this._remove(this._first),te}}pop(){if(this._last!==x.Undefined){const te=this._last.element;return this._remove(this._last),te}}_remove(te){if(te.prev!==x.Undefined&&te.next!==x.Undefined){const M=te.prev;M.next=te.next,te.next.prev=M}else te.prev===x.Undefined&&te.next===x.Undefined?(this._first=x.Undefined,this._last=x.Undefined):te.next===x.Undefined?(this._last=this._last.prev,this._last.next=x.Undefined):te.prev===x.Undefined&&(this._first=this._first.next,this._first.prev=x.Undefined);this._size-=1}*[Symbol.iterator](){let te=this._first;for(;te!==x.Undefined;)yield te.element,te=te.next}}},23345:function(fn,je,b){"use strict";b.d(je,{$L:function(){return W},ED:function(){return R},IJ:function(){return D},OS:function(){return se},WE:function(){return Y},dz:function(){return O},gn:function(){return X},li:function(){return S},r:function(){return U},tY:function(){return A},xS:function(){return L}});var x=b(97671),ne;const pe="en";let te=!1,M=!1,f=!1,oe=!1,Q=!1,o=!1,y=!1,C,h=null,m=null,E;const S=typeof self=="object"?self:typeof b.g=="object"?b.g:{};let I;typeof S.vscode!="undefined"&&typeof S.vscode.process!="undefined"?I=S.vscode.process:typeof x!="undefined"&&(I=x);const B=typeof((ne=I==null?void 0:I.versions)===null||ne===void 0?void 0:ne.electron)=="string"&&I.type==="renderer";if(typeof navigator=="object"&&!B)E=navigator.userAgent,te=E.indexOf("Windows")>=0,M=E.indexOf("Macintosh")>=0,y=(E.indexOf("Macintosh")>=0||E.indexOf("iPad")>=0||E.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,f=E.indexOf("Linux")>=0,o=!0,C=navigator.language,h=C;else if(typeof I=="object"){te=I.platform==="win32",M=I.platform==="darwin",f=I.platform==="linux",oe=f&&!!I.env.SNAP&&!!I.env.SNAP_REVISION,C=pe,h=pe;const k=I.env.VSCODE_NLS_CONFIG;if(k)try{const N=JSON.parse(k),V=N.availableLanguages["*"];C=N.locale,h=V||pe,m=N._translationsConfigFile}catch(N){}Q=!0}else console.error("Unable to resolve platform.");let G=0;M?G=1:te?G=3:f&&(G=2);const R=te,O=M,D=f,A=Q,W=o,X=y,Y=E,L=function(){if(S.setImmediate)return S.setImmediate.bind(S);if(typeof S.postMessage=="function"&&!S.importScripts){let V=[];S.addEventListener("message",H=>{if(H.data&&H.data.vscodeSetImmediateId)for(let v=0,g=V.length;v<g;v++){const F=V[v];if(F.id===H.data.vscodeSetImmediateId){V.splice(v,1),F.callback();return}}});let J=0;return H=>{const v=++J;V.push({id:v,callback:H}),S.postMessage({vscodeSetImmediateId:v},"*")}}if(typeof(I==null?void 0:I.nextTick)=="function")return I.nextTick.bind(I);const N=Promise.resolve();return V=>N.then(V)}(),se=M||y?2:te?1:3;let ae=!0,Be=!1;function U(){if(!Be){Be=!0;const k=new Uint8Array(2);k[0]=1,k[1]=2,ae=new Uint16Array(k.buffer)[0]===513}return ae}},95830:function(fn,je,b){"use strict";b.d(je,{G:function(){return pe}});var x=b(23345);const ne=x.li.performance&&typeof x.li.performance.now=="function";class pe{constructor(M){this._highResolution=ne&&M,this._startTime=this._now(),this._stopTime=-1}static create(M=!0){return new pe(M)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?x.li.performance.now():Date.now()}}},82983:function(fn,je,b){"use strict";b.d(je,{$i:function(){return ue},C8:function(){return vt},GF:function(){return C},HO:function(){return J},IO:function(){return h},K7:function(){return dt},Kw:function(){return tt},LC:function(){return S},Mh:function(){return L},P1:function(){return se},PJ:function(){return It},Qe:function(){return Le},R1:function(){return y},RP:function(){return F},S6:function(){return Qe},TT:function(){return R},Ut:function(){return v},V8:function(){return I},WU:function(){return pe},YK:function(){return Be},YU:function(){return te},ZG:function(){return ae},ZH:function(){return k},ab:function(){return Je},c1:function(){return be},df:function(){return W},ec:function(){return M},fi:function(){return $e},fy:function(){return f},j3:function(){return oe},j_:function(){return D},m5:function(){return x},mK:function(){return A},mr:function(){return m},oH:function(){return K},oL:function(){return Q},ok:function(){return Y},ow:function(){return B},qq:function(){return X},qu:function(){return G},rL:function(){return U},uS:function(){return Tt},un:function(){return o},uq:function(){return E},vH:function(){return V},xe:function(){return rt},zY:function(){return O}});function x(P){return!P||typeof P!="string"?!0:P.trim().length===0}const ne=/{(\d+)}/g;function pe(P,...fe){return fe.length===0?P:P.replace(ne,function(he,q){const re=parseInt(q,10);return isNaN(re)||re<0||re>=fe.length?he:fe[re]})}function te(P){return P.replace(/[<>&]/g,function(fe){switch(fe){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return fe}})}function M(P){return P.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function f(P,fe=" "){const he=oe(P,fe);return Q(he,fe)}function oe(P,fe){if(!P||!fe)return P;const he=fe.length;if(he===0||P.length===0)return P;let q=0;for(;P.indexOf(fe,q)===q;)q=q+he;return P.substring(q)}function Q(P,fe){if(!P||!fe)return P;const he=fe.length,q=P.length;if(he===0||q===0)return P;let re=q,le=-1;for(;le=P.lastIndexOf(fe,re-1),!(le===-1||le+he!==re);){if(le===0)return"";re=le}return P.substring(0,re)}function o(P){return P.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function y(P){return P.replace(/\*/g,"")}function C(P,fe,he={}){if(!P)throw new Error("Cannot create regex from empty string");fe||(P=M(P)),he.wholeWord&&(/\B/.test(P.charAt(0))||(P="\\b"+P),/\B/.test(P.charAt(P.length-1))||(P=P+"\\b"));let q="";return he.global&&(q+="g"),he.matchCase||(q+="i"),he.multiline&&(q+="m"),he.unicode&&(q+="u"),new RegExp(P,q)}function h(P){return P.source==="^"||P.source==="^$"||P.source==="$"||P.source==="^\\s*$"?!1:!!(P.exec("")&&P.lastIndex===0)}function m(P){return(P.global?"g":"")+(P.ignoreCase?"i":"")+(P.multiline?"m":"")+(P.unicode?"u":"")}function E(P){return P.split(/\r\n|\r|\n/)}function S(P){for(let fe=0,he=P.length;fe<he;fe++){const q=P.charCodeAt(fe);if(q!==32&&q!==9)return fe}return-1}function I(P,fe=0,he=P.length){for(let q=fe;q<he;q++){const re=P.charCodeAt(q);if(re!==32&&re!==9)return P.substring(fe,q)}return P.substring(fe,he)}function B(P,fe=P.length-1){for(let he=fe;he>=0;he--){const q=P.charCodeAt(he);if(q!==32&&q!==9)return he}return-1}function G(P,fe){return P<fe?-1:P>fe?1:0}function R(P,fe,he=0,q=P.length,re=0,le=fe.length){for(;he<q&&re<le;he++,re++){let Ne=P.charCodeAt(he),Te=fe.charCodeAt(re);if(Ne<Te)return-1;if(Ne>Te)return 1}const Pe=q-he,Ae=le-re;return Pe<Ae?-1:Pe>Ae?1:0}function O(P,fe){return D(P,fe,0,P.length,0,fe.length)}function D(P,fe,he=0,q=P.length,re=0,le=fe.length){for(;he<q&&re<le;he++,re++){let Ne=P.charCodeAt(he),Te=fe.charCodeAt(re);if(Ne===Te)continue;if(Ne>=128||Te>=128)return R(P.toLowerCase(),fe.toLowerCase(),he,q,re,le);A(Ne)&&(Ne-=32),A(Te)&&(Te-=32);const He=Ne-Te;if(He!==0)return He}const Pe=q-he,Ae=le-re;return Pe<Ae?-1:Pe>Ae?1:0}function A(P){return P>=97&&P<=122}function W(P){return P>=65&&P<=90}function X(P,fe){return P.length===fe.length&&D(P,fe)===0}function Y(P,fe){const he=fe.length;return fe.length>P.length?!1:D(P,fe,0,he)===0}function L(P,fe){let he,q=Math.min(P.length,fe.length);for(he=0;he<q;he++)if(P.charCodeAt(he)!==fe.charCodeAt(he))return he;return q}function se(P,fe){let he,q=Math.min(P.length,fe.length);const re=P.length-1,le=fe.length-1;for(he=0;he<q;he++)if(P.charCodeAt(re-he)!==fe.charCodeAt(le-he))return he;return q}function ae(P){return 55296<=P&&P<=56319}function Be(P){return 56320<=P&&P<=57343}function U(P,fe){return(P-55296<<10)+(fe-56320)+65536}function k(P,fe,he){const q=P.charCodeAt(he);if(ae(q)&&he+1<fe){const re=P.charCodeAt(he+1);if(Be(re))return U(q,re)}return q}function N(P,fe){const he=P.charCodeAt(fe-1);if(Be(he)&&fe>1){const q=P.charCodeAt(fe-2);if(ae(q))return U(q,he)}return he}function V(P,fe){const he=ye.getInstance(),q=fe,re=P.length,le=k(P,re,fe);fe+=le>=65536?2:1;let Pe=he.getGraphemeBreakType(le);for(;fe<re;){const Ae=k(P,re,fe),Ne=he.getGraphemeBreakType(Ae);if($e(Pe,Ne))break;fe+=Ae>=65536?2:1,Pe=Ne}return fe-q}function J(P,fe){const he=ye.getInstance(),q=fe,re=N(P,fe);fe-=re>=65536?2:1;let le=he.getGraphemeBreakType(re);for(;fe>0;){const Pe=N(P,fe),Ae=he.getGraphemeBreakType(Pe);if($e(Ae,le))break;fe-=Pe>=65536?2:1,le=Ae}return q-fe}const H=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function v(P){return H.test(P)}const g=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function F(P){return g.test(P)}const ie=/^[\t\n\r\x20-\x7E]*$/;function ue(P){return ie.test(P)}const Le=/[\u2028\u2029]/;function Je(P){return Le.test(P)}function rt(P){for(let fe=0,he=P.length;fe<he;fe++)if(dt(P.charCodeAt(fe)))return!0;return!1}function dt(P){return P=+P,P>=11904&&P<=55215||P>=63744&&P<=64255||P>=65281&&P<=65374}function vt(P){return P>=127462&&P<=127487||P===8986||P===8987||P===9200||P===9203||P>=9728&&P<=10175||P===11088||P===11093||P>=127744&&P<=128591||P>=128640&&P<=128764||P>=128992&&P<=129003||P>=129280&&P<=129535||P>=129648&&P<=129750}const be="\uFEFF";function Tt(P){return!!(P&&P.length>0&&P.charCodeAt(0)===65279)}function tt(P,fe=!1){return P?(fe&&(P=P.replace(/\\./g,"")),P.toLowerCase()!==P):!1}function It(P){return P=P%(2*26),P<26?String.fromCharCode(97+P):String.fromCharCode(65+P-26)}function Qe(P){return ye.getInstance().getGraphemeBreakType(P)}function $e(P,fe){return P===0?fe!==5&&fe!==7:P===2&&fe===3?!1:P===4||P===2||P===3||fe===4||fe===2||fe===3?!0:!(P===8&&(fe===8||fe===9||fe===11||fe===12)||(P===11||P===9)&&(fe===9||fe===10)||(P===12||P===10)&&fe===10||fe===5||fe===13||fe===7||P===1||P===13&&fe===14||P===6&&fe===6)}class ye{constructor(){this._data=de()}static getInstance(){return ye._INSTANCE||(ye._INSTANCE=new ye),ye._INSTANCE}getGraphemeBreakType(fe){if(fe<32)return fe===10?3:fe===13?2:4;if(fe<127)return 0;const he=this._data,q=he.length/3;let re=1;for(;re<=q;)if(fe<he[3*re])re=2*re;else if(fe>he[3*re+1])re=2*re+1;else return he[3*re+2];return 0}}ye._INSTANCE=null;function de(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function K(P,fe){if(P===0)return 0;const he=xe(P,fe);if(he!==void 0)return he;const q=N(fe,P);return P-=Se(q),P}function xe(P,fe){let he=N(fe,P);for(P-=Se(he);$(he)||he===65039||he===8419;){if(P===0)return;he=N(fe,P),P-=Se(he)}if(vt(he)){if(P>=0){const q=N(fe,P);q===8205&&(P-=Se(q))}return P}}function Se(P){return P>=65536?2:1}function $(P){return 127995<=P&&P<=127999}},72999:function(fn,je,b){"use strict";b.d(je,{$E:function(){return S},$K:function(){return oe},D8:function(){return h},HD:function(){return ne},IU:function(){return I},Jp:function(){return Q},Kn:function(){return pe},cW:function(){return y},f6:function(){return B},hj:function(){return te},jn:function(){return M},kJ:function(){return x},mf:function(){return C},o8:function(){return f},p_:function(){return o},vE:function(){return G}});function x(R){return Array.isArray(R)}function ne(R){return typeof R=="string"}function pe(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&!(R instanceof RegExp)&&!(R instanceof Date)}function te(R){return typeof R=="number"&&!isNaN(R)}function M(R){return R===!0||R===!1}function f(R){return typeof R=="undefined"}function oe(R){return!Q(R)}function Q(R){return f(R)||R===null}function o(R,O){if(!R)throw new Error(O?`Unexpected type, expected '${O}'`:"Unexpected type")}function y(R){if(Q(R))throw new Error("Assertion Failed: argument is undefined or null");return R}function C(R){return typeof R=="function"}function h(R,O){const D=Math.min(R.length,O.length);for(let A=0;A<D;A++)m(R[A],O[A])}function m(R,O){if(ne(O)){if(typeof R!==O)throw new Error(`argument does not match constraint: typeof ${O}`)}else if(C(O)){try{if(R instanceof O)return}catch(D){}if(!Q(R)&&R.constructor===O||O.length===1&&O.call(void 0,R)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function E(R){let O=[],D=Object.getPrototypeOf(R);for(;Object.prototype!==D;)O=O.concat(Object.getOwnPropertyNames(D)),D=Object.getPrototypeOf(D);return O}function S(R){const O=[];for(const D of E(R))typeof R[D]=="function"&&O.push(D);return O}function I(R,O){const D=W=>function(){const X=Array.prototype.slice.call(arguments,0);return O(W,X)};let A={};for(const W of R)A[W]=D(W);return A}function B(R){return R===null?void 0:R}function G(R,O="Unreachable"){throw new Error(O)}},13268:function(fn,je,b){"use strict";b.d(je,{N:function(){return ne}});function x(pe,te){let M;return te.length===0?M=pe:M=pe.replace(/\{(\d+)\}/g,function(f,oe){const Q=oe[0];return typeof te[Q]!="undefined"?te[Q]:f}),M}function ne(pe,te,...M){return x(te,M)}},96236:function(fn,je,b){"use strict";b.d(je,{BH:function(){return I},NZ:function(){return B},U8:function(){return G},co:function(){return S},eH:function(){return E},vr:function(){return m}});var x=b(75918),ne=b(52615),pe=b(4348),te=b(88226),M=b(69323),f=b(34502),oe=b(35884),Q=b(90689),o=b(16925),y=b(49055),C=function(R,O,D,A){var W=arguments.length,X=W<3?O:A===null?A=Object.getOwnPropertyDescriptor(O,D):A,Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")X=Reflect.decorate(R,O,D,A);else for(var L=R.length-1;L>=0;L--)(Y=R[L])&&(X=(W<3?Y(X):W>3?Y(O,D,X):Y(O,D))||X);return W>3&&X&&Object.defineProperty(O,D,X),X},h=function(R,O){return function(D,A){O(D,A,R)}};function m(R){return R.command!==void 0}class E{constructor(O){this.id=E._idPool++,this._debugName=O}}E._idPool=0,E.CommandPalette=new E("CommandPalette"),E.EditorContext=new E("EditorContext"),E.SimpleEditorContext=new E("SimpleEditorContext"),E.EditorContextCopy=new E("EditorContextCopy"),E.EditorContextPeek=new E("EditorContextPeek"),E.MenubarEditMenu=new E("MenubarEditMenu"),E.MenubarCopy=new E("MenubarCopy"),E.MenubarGoMenu=new E("MenubarGoMenu"),E.MenubarSelectionMenu=new E("MenubarSelectionMenu"),E.InlineCompletionsActions=new E("InlineCompletionsActions");const S=(0,o.yh)("menuService"),I=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new pe.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:R=>R===E.CommandPalette}}addCommand(R){return this.addCommands(te.$.single(R))}addCommands(R){for(const O of R)this._commands.set(O.id,O);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,M.OF)(()=>{let O=!1;for(const D of R)O=this._commands.delete(D.id)||O;O&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(R){return this._commands.get(R)}getCommands(){const R=new Map;return this._commands.forEach((O,D)=>R.set(D,O)),R}appendMenuItem(R,O){return this.appendMenuItems(te.$.single({id:R,item:O}))}appendMenuItems(R){const O=new Set,D=new f.S;for(const{id:A,item:W}of R){let X=this._menuItems.get(A);X||(X=new f.S,this._menuItems.set(A,X)),D.push(X.push(W)),O.add(A)}return this._onDidChangeMenu.fire(O),(0,M.OF)(()=>{if(D.size>0){for(let A of D)A();this._onDidChangeMenu.fire(O),D.clear()}})}getMenuItems(R){let O;return this._menuItems.has(R)?O=[...this._menuItems.get(R)]:O=[],R===E.CommandPalette&&this._appendImplicitItems(O),O}_appendImplicitItems(R){const O=new Set;for(const D of R)m(D)&&(O.add(D.command.id),D.alt&&O.add(D.alt.id));this._commands.forEach((D,A)=>{O.has(A)||R.push({command:D})})}};class B extends x.wY{constructor(O,D,A,W){super(`submenuitem.${O.submenu.id}`,typeof O.title=="string"?O.title:O.title.value,[],"submenu"),this.item=O,this._menuService=D,this._contextKeyService=A,this._options=W}get actions(){const O=[],D=this._menuService.createMenu(this.item.submenu,this._contextKeyService),A=D.getActions(this._options);D.dispose();for(const[,W]of A)W.length>0&&(O.push(...W),O.push(new x.Z0));return O.length&&O.pop(),O}}let G=class Il{constructor(O,D,A,W,X){var Y,L;if(this._commandService=X,this.id=O.id,this.label=A!=null&&A.renderShortTitle&&O.shortTitle?typeof O.shortTitle=="string"?O.shortTitle:O.shortTitle.value:typeof O.title=="string"?O.title:O.title.value,this.tooltip=(L=typeof O.tooltip=="string"?O.tooltip:(Y=O.tooltip)===null||Y===void 0?void 0:Y.value)!==null&&L!==void 0?L:"",this.enabled=!O.precondition||W.contextMatchesRules(O.precondition),this.checked=void 0,O.toggled){const se=O.toggled.condition?O.toggled:{condition:O.toggled};this.checked=W.contextMatchesRules(se.condition),this.checked&&se.tooltip&&(this.tooltip=typeof se.tooltip=="string"?se.tooltip:se.tooltip.value),se.title&&(this.label=typeof se.title=="string"?se.title:se.title.value)}this.item=O,this.alt=D?new Il(D,void 0,A,W,X):void 0,this._options=A,y.kS.isThemeIcon(O.icon)&&(this.class=ne.dT.asClassName(O.icon))}dispose(){}run(...O){var D,A;let W=[];return!((D=this._options)===null||D===void 0)&&D.arg&&(W=[...W,this._options.arg]),!((A=this._options)===null||A===void 0)&&A.shouldForwardArgs&&(W=[...W,...O]),this._commandService.executeCommand(this.id,...W)}};G=C([h(3,Q.i6),h(4,oe.H)],G)},35884:function(fn,je,b){"use strict";b.d(je,{H:function(){return oe},P:function(){return Q}});var x=b(4348),ne=b(88226),pe=b(69323),te=b(34502),M=b(72999),f=b(16925);const oe=(0,f.yh)("commandService"),Q=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new x.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,y){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!y)throw new Error("invalid command");return this.registerCommand({id:o,handler:y})}if(o.description){const S=[];for(let B of o.description.args)S.push(B.constraint);const I=o.handler;o.handler=function(B,...G){return(0,M.D8)(G,S),I(B,...G)}}const{id:C}=o;let h=this._commands.get(C);h||(h=new te.S,this._commands.set(C,h));let m=h.unshift(o),E=(0,pe.OF)(()=>{m();const S=this._commands.get(C);S!=null&&S.isEmpty()&&this._commands.delete(C)});return this._onDidRegisterCommand.fire(C),E}registerCommandAlias(o,y){return Q.registerCommand(o,(C,...h)=>C.get(oe).executeCommand(y,...h))}getCommand(o){const y=this._commands.get(o);if(!(!y||y.isEmpty()))return ne.$.first(y)}getCommands(){const o=new Map;for(const y of this._commands.keys()){const C=this.getCommand(y);C&&o.set(y,C)}return o}};Q.registerCommand("noop",()=>{})},90689:function(fn,je,b){"use strict";b.d(je,{Ao:function(){return oe},Eq:function(){return U},Fb:function(){return Q},K8:function(){return V},i6:function(){return Be},uy:function(){return ae}});var x=b(23345),ne=b(82983),pe=b(16925);let te=x.WE||"";const M=new Map;M.set("false",!1),M.set("true",!0),M.set("isMac",x.dz),M.set("isLinux",x.IJ),M.set("isWindows",x.ED),M.set("isWeb",x.$L),M.set("isMacNative",x.dz&&!x.$L),M.set("isEdge",te.indexOf("Edg/")>=0),M.set("isFirefox",te.indexOf("Firefox")>=0),M.set("isChrome",te.indexOf("Chrome")>=0),M.set("isSafari",te.indexOf("Safari")>=0);const f=Object.prototype.hasOwnProperty;class oe{static has(v){return h.create(v)}static equals(v,g){return m.create(v,g)}static regex(v,g){return W.create(v,g)}static not(v){return B.create(v)}static and(...v){return L.create(v,null)}static or(...v){return se.create(v,null,!0)}static deserialize(v,g=!1){if(v)return this._deserializeOrExpression(v,g)}static _deserializeOrExpression(v,g){let F=v.split("||");return se.create(F.map(ie=>this._deserializeAndExpression(ie,g)),null,!0)}static _deserializeAndExpression(v,g){let F=v.split("&&");return L.create(F.map(ie=>this._deserializeOne(ie,g)),null)}static _deserializeOne(v,g){if(v=v.trim(),v.indexOf("!=")>=0){let F=v.split("!=");return I.create(F[0].trim(),this._deserializeValue(F[1],g))}if(v.indexOf("==")>=0){let F=v.split("==");return m.create(F[0].trim(),this._deserializeValue(F[1],g))}if(v.indexOf("=~")>=0){let F=v.split("=~");return W.create(F[0].trim(),this._deserializeRegexValue(F[1],g))}if(v.indexOf(" in ")>=0){let F=v.split(" in ");return E.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(v)){const F=v.split(">=");return O.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(v)){const F=v.split(">");return R.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(v)){const F=v.split("<=");return A.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(v)){const F=v.split("<");return D.create(F[0].trim(),F[1].trim())}return/^\!\s*/.test(v)?B.create(v.substr(1).trim()):h.create(v)}static _deserializeValue(v,g){if(v=v.trim(),v==="true")return!0;if(v==="false")return!1;let F=/^'([^']*)'$/.exec(v);return F?F[1].trim():v}static _deserializeRegexValue(v,g){if((0,ne.m5)(v)){if(g)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let F=v.indexOf("/"),ie=v.lastIndexOf("/");if(F===ie||F<0){if(g)throw new Error(`bad regexp-value '${v}', missing /-enclosure`);return console.warn(`bad regexp-value '${v}', missing /-enclosure`),null}let ue=v.slice(F+1,ie),Le=v[ie+1]==="i"?"i":"";try{return new RegExp(ue,Le)}catch(Je){if(g)throw new Error(`bad regexp-value '${v}', parse error: ${Je}`);return console.warn(`bad regexp-value '${v}', parse error: ${Je}`),null}}}function Q(H,v){const g=H?H.substituteConstants():void 0,F=v?v.substituteConstants():void 0;return!g&&!F?!0:!g||!F?!1:g.equals(F)}function o(H,v){return H.cmp(v)}class y{constructor(){this.type=0}cmp(v){return this.type-v.type}equals(v){return v.type===this.type}substituteConstants(){return this}evaluate(v){return!1}serialize(){return"false"}keys(){return[]}negate(){return C.INSTANCE}}y.INSTANCE=new y;class C{constructor(){this.type=1}cmp(v){return this.type-v.type}equals(v){return v.type===this.type}substituteConstants(){return this}evaluate(v){return!0}serialize(){return"true"}keys(){return[]}negate(){return y.INSTANCE}}C.INSTANCE=new C;class h{constructor(v,g){this.key=v,this.negated=g,this.type=2}static create(v,g=null){const F=M.get(v);return typeof F=="boolean"?F?C.INSTANCE:y.INSTANCE:new h(v,g)}cmp(v){return v.type!==this.type?this.type-v.type:k(this.key,v.key)}equals(v){return v.type===this.type?this.key===v.key:!1}substituteConstants(){const v=M.get(this.key);return typeof v=="boolean"?v?C.INSTANCE:y.INSTANCE:this}evaluate(v){return!!v.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this)),this.negated}}class m{constructor(v,g,F){this.key=v,this.value=g,this.negated=F,this.type=4}static create(v,g,F=null){if(typeof g=="boolean")return g?h.create(v,F):B.create(v,F);const ie=M.get(v);return typeof ie=="boolean"?g===(ie?"true":"false")?C.INSTANCE:y.INSTANCE:new m(v,g,F)}cmp(v){return v.type!==this.type?this.type-v.type:N(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){const v=M.get(this.key);if(typeof v=="boolean"){const g=v?"true":"false";return this.value===g?C.INSTANCE:y.INSTANCE}return this}evaluate(v){return v.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this.value,this)),this.negated}}class E{constructor(v,g){this.key=v,this.valueKey=g,this.type=10,this.negated=null}static create(v,g){return new E(v,g)}cmp(v){return v.type!==this.type?this.type-v.type:N(this.key,this.valueKey,v.key,v.valueKey)}equals(v){return v.type===this.type?this.key===v.key&&this.valueKey===v.valueKey:!1}substituteConstants(){return this}evaluate(v){const g=v.getValue(this.valueKey),F=v.getValue(this.key);return Array.isArray(g)?g.indexOf(F)>=0:typeof F=="string"&&typeof g=="object"&&g!==null?f.call(g,F):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=S.create(this)),this.negated}}class S{constructor(v){this._actual=v,this.type=11}static create(v){return new S(v)}cmp(v){return v.type!==this.type?this.type-v.type:this._actual.cmp(v._actual)}equals(v){return v.type===this.type?this._actual.equals(v._actual):!1}substituteConstants(){return this}evaluate(v){return!this._actual.evaluate(v)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class I{constructor(v,g,F){this.key=v,this.value=g,this.negated=F,this.type=5}static create(v,g,F=null){if(typeof g=="boolean")return g?B.create(v,F):h.create(v,F);const ie=M.get(v);return typeof ie=="boolean"?g===(ie?"true":"false")?y.INSTANCE:C.INSTANCE:new I(v,g,F)}cmp(v){return v.type!==this.type?this.type-v.type:N(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){const v=M.get(this.key);if(typeof v=="boolean"){const g=v?"true":"false";return this.value===g?y.INSTANCE:C.INSTANCE}return this}evaluate(v){return v.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this.value,this)),this.negated}}class B{constructor(v,g){this.key=v,this.negated=g,this.type=3}static create(v,g=null){const F=M.get(v);return typeof F=="boolean"?F?y.INSTANCE:C.INSTANCE:new B(v,g)}cmp(v){return v.type!==this.type?this.type-v.type:k(this.key,v.key)}equals(v){return v.type===this.type?this.key===v.key:!1}substituteConstants(){const v=M.get(this.key);return typeof v=="boolean"?v?y.INSTANCE:C.INSTANCE:this}evaluate(v){return!v.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this)),this.negated}}function G(H,v){if(typeof H=="string"){const g=parseFloat(H);isNaN(g)||(H=g)}return typeof H=="string"||typeof H=="number"?v(H):y.INSTANCE}class R{constructor(v,g,F){this.key=v,this.value=g,this.negated=F,this.type=12}static create(v,g,F=null){return G(g,ie=>new R(v,ie,F))}cmp(v){return v.type!==this.type?this.type-v.type:N(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class O{constructor(v,g,F){this.key=v,this.value=g,this.negated=F,this.type=13}static create(v,g,F=null){return G(g,ie=>new O(v,ie,F))}cmp(v){return v.type!==this.type?this.type-v.type:N(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class D{constructor(v,g,F){this.key=v,this.value=g,this.negated=F,this.type=14}static create(v,g,F=null){return G(g,ie=>new D(v,ie,F))}cmp(v){return v.type!==this.type?this.type-v.type:N(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class A{constructor(v,g,F){this.key=v,this.value=g,this.negated=F,this.type=15}static create(v,g,F=null){return G(g,ie=>new A(v,ie,F))}cmp(v){return v.type!==this.type?this.type-v.type:N(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class W{constructor(v,g){this.key=v,this.regexp=g,this.type=7,this.negated=null}static create(v,g){return new W(v,g)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.key<v.key)return-1;if(this.key>v.key)return 1;const g=this.regexp?this.regexp.source:"",F=v.regexp?v.regexp.source:"";return g<F?-1:g>F?1:0}equals(v){if(v.type===this.type){const g=this.regexp?this.regexp.source:"",F=v.regexp?v.regexp.source:"";return this.key===v.key&&g===F}return!1}substituteConstants(){return this}evaluate(v){let g=v.getValue(this.key);return this.regexp?this.regexp.test(g):!1}serialize(){const v=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${v}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=X.create(this)),this.negated}}class X{constructor(v){this._actual=v,this.type=8}static create(v){return new X(v)}cmp(v){return v.type!==this.type?this.type-v.type:this._actual.cmp(v._actual)}equals(v){return v.type===this.type?this._actual.equals(v._actual):!1}substituteConstants(){return this}evaluate(v){return!this._actual.evaluate(v)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function Y(H){let v=null;for(let g=0,F=H.length;g<F;g++){const ie=H[g].substituteConstants();if(H[g]!==ie&&v===null){v=[];for(let ue=0;ue<g;ue++)v[ue]=H[ue]}v!==null&&(v[g]=ie)}return v===null?H:v}class L{constructor(v,g){this.expr=v,this.negated=g,this.type=6}static create(v,g){return L._normalizeArr(v,g)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.expr.length<v.expr.length)return-1;if(this.expr.length>v.expr.length)return 1;for(let g=0,F=this.expr.length;g<F;g++){const ie=o(this.expr[g],v.expr[g]);if(ie!==0)return ie}return 0}equals(v){if(v.type===this.type){if(this.expr.length!==v.expr.length)return!1;for(let g=0,F=this.expr.length;g<F;g++)if(!this.expr[g].equals(v.expr[g]))return!1;return!0}return!1}substituteConstants(){const v=Y(this.expr);return v===this.expr?this:L.create(v,this.negated)}evaluate(v){for(let g=0,F=this.expr.length;g<F;g++)if(!this.expr[g].evaluate(v))return!1;return!0}static _normalizeArr(v,g){const F=[];let ie=!1;for(const ue of v)if(ue){if(ue.type===1){ie=!0;continue}if(ue.type===0)return y.INSTANCE;if(ue.type===6){F.push(...ue.expr);continue}F.push(ue)}if(F.length===0&&ie)return C.INSTANCE;if(F.length!==0){if(F.length===1)return F[0];F.sort(o);for(let ue=1;ue<F.length;ue++)F[ue-1].equals(F[ue])&&(F.splice(ue,1),ue--);if(F.length===1)return F[0];for(;F.length>1;){const ue=F[F.length-1];if(ue.type!==9)break;F.pop();const Le=F.pop(),Je=F.length===0,rt=se.create(ue.expr.map(dt=>L.create([dt,Le],null)),null,Je);rt&&(F.push(rt),F.sort(o))}return F.length===1?F[0]:new L(F,g)}}serialize(){return this.expr.map(v=>v.serialize()).join(" && ")}keys(){const v=[];for(let g of this.expr)v.push(...g.keys());return v}negate(){if(!this.negated){const v=[];for(let g of this.expr)v.push(g.negate());this.negated=se.create(v,this,!0)}return this.negated}}class se{constructor(v,g){this.expr=v,this.negated=g,this.type=9}static create(v,g,F){return se._normalizeArr(v,g,F)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.expr.length<v.expr.length)return-1;if(this.expr.length>v.expr.length)return 1;for(let g=0,F=this.expr.length;g<F;g++){const ie=o(this.expr[g],v.expr[g]);if(ie!==0)return ie}return 0}equals(v){if(v.type===this.type){if(this.expr.length!==v.expr.length)return!1;for(let g=0,F=this.expr.length;g<F;g++)if(!this.expr[g].equals(v.expr[g]))return!1;return!0}return!1}substituteConstants(){const v=Y(this.expr);return v===this.expr?this:se.create(v,this.negated,!1)}evaluate(v){for(let g=0,F=this.expr.length;g<F;g++)if(this.expr[g].evaluate(v))return!0;return!1}static _normalizeArr(v,g,F){let ie=[],ue=!1;if(v){for(let Le=0,Je=v.length;Le<Je;Le++){const rt=v[Le];if(rt){if(rt.type===0){ue=!0;continue}if(rt.type===1)return C.INSTANCE;if(rt.type===9){ie=ie.concat(rt.expr);continue}ie.push(rt)}}if(ie.length===0&&ue)return y.INSTANCE;ie.sort(o)}if(ie.length!==0){if(ie.length===1)return ie[0];for(let Le=1;Le<ie.length;Le++)ie[Le-1].equals(ie[Le])&&(ie.splice(Le,1),Le--);if(ie.length===1)return ie[0];if(F){for(let Le=0;Le<ie.length;Le++)for(let Je=Le+1;Je<ie.length;Je++)V(ie[Le],ie[Je])&&(ie.splice(Je,1),Je--);if(ie.length===1)return ie[0]}return new se(ie,g)}}serialize(){return this.expr.map(v=>v.serialize()).join(" || ")}keys(){const v=[];for(let g of this.expr)v.push(...g.keys());return v}negate(){if(!this.negated){let v=[];for(let g of this.expr)v.push(g.negate());for(;v.length>1;){const g=v.shift(),F=v.shift(),ie=[];for(const Le of J(g))for(const Je of J(F))ie.push(L.create([Le,Je],null));const ue=v.length===0;v.unshift(se.create(ie,null,ue))}this.negated=v[0]}return this.negated}}class ae extends h{constructor(v,g,F){super(v,null),this._defaultValue=g,typeof F=="object"?ae._info.push(Object.assign(Object.assign({},F),{key:v})):F!==!0&&ae._info.push({key:v,description:F,type:g!=null?typeof g:void 0})}static all(){return ae._info.values()}bindTo(v){return v.createKey(this.key,this._defaultValue)}getValue(v){return v.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(v){return m.create(this.key,v)}}ae._info=[];const Be=(0,pe.yh)("contextKeyService"),U="setContext";function k(H,v){return H<v?-1:H>v?1:0}function N(H,v,g,F){return H<g?-1:H>g?1:v<F?-1:v>F?1:0}function V(H,v){if(v.type===6&&H.type!==9&&H.type!==6){for(const ie of v.expr)if(H.equals(ie))return!0}const g=H.negate(),F=J(g).concat(J(v));F.sort(o);for(let ie=0;ie<F.length;ie++){const Le=F[ie].negate();for(let Je=ie+1;Je<F.length;Je++){const rt=F[Je];if(Le.equals(rt))return!0}}return!1}function J(H){return H.type===9?H.expr:[H]}},16925:function(fn,je,b){"use strict";b.d(je,{I8:function(){return x},TG:function(){return ne},jt:function(){return M},yh:function(){return te}});var x;(function(f){f.serviceIds=new Map,f.DI_TARGET="$di$target",f.DI_DEPENDENCIES="$di$dependencies";function oe(Q){return Q[f.DI_DEPENDENCIES]||[]}f.getServiceDependencies=oe})(x||(x={}));const ne=te("instantiationService");function pe(f,oe,Q,o){oe[x.DI_TARGET]===oe?oe[x.DI_DEPENDENCIES].push({id:f,index:Q,optional:o}):(oe[x.DI_DEPENDENCIES]=[{id:f,index:Q,optional:o}],oe[x.DI_TARGET]=oe)}function te(f){if(x.serviceIds.has(f))return x.serviceIds.get(f);const oe=function(Q,o,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");pe(oe,Q,y,!1)};return oe.toString=()=>f,x.serviceIds.set(f,oe),oe}function M(f){return function(oe,Q,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");pe(f,oe,o,!0)}}},44650:function(fn,je,b){"use strict";b.d(je,{B:function(){return te}});var x=b(76068),ne=b(72999);class pe{constructor(){this.data=new Map}add(f,oe){x.ok(ne.HD(f)),x.ok(ne.Kn(oe)),x.ok(!this.data.has(f),"There is already an extension with this id"),this.data.set(f,oe)}as(f){return this.data.get(f)||null}}const te=new pe},66213:function(fn,je,b){"use strict";b.d(je,{e:function(){return x}});var x;(function(ne){ne.DARK="dark",ne.LIGHT="light",ne.HIGH_CONTRAST="hc"})(x||(x={}))},49055:function(fn,je,b){"use strict";b.d(je,{EN:function(){return o},IP:function(){return h},Ic:function(){return S},XE:function(){return oe},bB:function(){return I},kS:function(){return y},m6:function(){return C}});var x=b(52615),ne=b(4348),pe=b(69323),te=b(16925),M=b(44650),f=b(66213);const oe=(0,te.yh)("themeService");var Q;(function(B){function G(R){return R&&typeof R=="object"&&typeof R.id=="string"}B.isThemeColor=G})(Q||(Q={}));function o(B){return{id:B}}var y;(function(B){function G(X){return X&&typeof X=="object"&&typeof X.id=="string"&&(typeof X.color=="undefined"||Q.isThemeColor(X.color))}B.isThemeIcon=G;const R=new RegExp(`^\\$\\((${x.dT.iconNameExpression}(?:${x.dT.iconModifierExpression})?)\\)$`);function O(X){const Y=R.exec(X);if(!Y)return;let[,L]=Y;return{id:L}}B.fromString=O;function D(X,Y){let L=X.id;const se=L.lastIndexOf("~");return se!==-1&&(L=L.substring(0,se)),Y&&(L=`${L}~${Y}`),{id:L}}B.modify=D;function A(X,Y){var L,se;return X.id===Y.id&&((L=X.color)===null||L===void 0?void 0:L.id)===((se=Y.color)===null||se===void 0?void 0:se.id)}B.isEqual=A;function W(X,Y){return{id:X.id,color:Y?o(Y):void 0}}B.asThemeIcon=W,B.asClassNameArray=x.dT.asClassNameArray,B.asClassName=x.dT.asClassName,B.asCSSSelector=x.dT.asCSSSelector})(y||(y={}));function C(B){switch(B){case f.e.DARK:return"vs-dark";case f.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const h={ThemingContribution:"base.contributions.theming"};class m{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ne.Q5}onColorThemeChange(G){return this.themingParticipants.push(G),this.onThemingParticipantAddedEmitter.fire(G),(0,pe.OF)(()=>{const R=this.themingParticipants.indexOf(G);this.themingParticipants.splice(R,1)})}getThemingParticipants(){return this.themingParticipants}}let E=new m;M.B.add(h.ThemingContribution,E);function S(B){return E.onColorThemeChange(B)}class I extends pe.JT{constructor(G){super(),this.themeService=G,this.theme=G.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(R=>this.onThemeChange(R)))}onThemeChange(G){this.theme=G,this.updateStyles()}updateStyles(){}}},16632:function(fn,je,b){"use strict";var x=b(32855),ne=b(27247),pe=b(74430),te=b(11913),M=b(43079),f=b(92310),oe=b.n(f),Q=b(18929),o=b(59301),y=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],C=(0,o.forwardRef)(function(h,m){var E=h.prefixCls,S=E===void 0?"rc-checkbox":E,I=h.className,B=h.style,G=h.checked,R=h.disabled,O=h.defaultChecked,D=O===void 0?!1:O,A=h.type,W=A===void 0?"checkbox":A,X=h.title,Y=h.onChange,L=(0,M.Z)(h,y),se=(0,o.useRef)(null),ae=(0,o.useRef)(null),Be=(0,Q.Z)(D,{value:G}),U=(0,te.Z)(Be,2),k=U[0],N=U[1];(0,o.useImperativeHandle)(m,function(){return{focus:function(v){var g;(g=se.current)===null||g===void 0||g.focus(v)},blur:function(){var v;(v=se.current)===null||v===void 0||v.blur()},input:se.current,nativeElement:ae.current}});var V=oe()(S,I,(0,pe.Z)((0,pe.Z)({},"".concat(S,"-checked"),k),"".concat(S,"-disabled"),R)),J=function(v){R||("checked"in h||N(v.target.checked),Y==null||Y({target:(0,ne.Z)((0,ne.Z)({},h),{},{type:W,checked:v.target.checked}),stopPropagation:function(){v.stopPropagation()},preventDefault:function(){v.preventDefault()},nativeEvent:v.nativeEvent}))};return o.createElement("span",{className:V,title:X,style:B,ref:ae},o.createElement("input",(0,x.Z)({},L,{className:"".concat(S,"-input"),ref:se,onChange:J,disabled:R,checked:!!k,type:W})),o.createElement("span",{className:"".concat(S,"-inner")}))});je.Z=C},96478:function(fn,je,b){"use strict";b.d(je,{Z:function(){return X}});var x=b(32855),ne=b(74430),pe=b(11913),te=b(43079),M=b(65030),f=b(92310),oe=b.n(f),Q=b(8654),o=b(59301),y=b(10228),C=b(16089),h=y.Z.ESC,m=y.Z.TAB;function E(Y){var L=Y.visible,se=Y.triggerRef,ae=Y.onVisibleChange,Be=Y.autoFocus,U=Y.overlayRef,k=o.useRef(!1),N=function(){if(L){var v,g;(v=se.current)===null||v===void 0||(g=v.focus)===null||g===void 0||g.call(v),ae==null||ae(!1)}},V=function(){var v;return(v=U.current)!==null&&v!==void 0&&v.focus?(U.current.focus(),k.current=!0,!0):!1},J=function(v){switch(v.keyCode){case h:N();break;case m:{var g=!1;k.current||(g=V()),g?v.preventDefault():N();break}}};o.useEffect(function(){return L?(window.addEventListener("keydown",J),Be&&(0,C.Z)(V,3),function(){window.removeEventListener("keydown",J),k.current=!1}):function(){k.current=!1}},[L])}var S=(0,o.forwardRef)(function(Y,L){var se=Y.overlay,ae=Y.arrow,Be=Y.prefixCls,U=(0,o.useMemo)(function(){var N;return typeof se=="function"?N=se():N=se,N},[se]),k=(0,Q.sQ)(L,(0,Q.C4)(U));return o.createElement(o.Fragment,null,ae&&o.createElement("div",{className:"".concat(Be,"-arrow")}),o.cloneElement(U,{ref:(0,Q.Yr)(U)?k:void 0}))}),I=S,B={adjustX:1,adjustY:1},G=[0,0],R={topLeft:{points:["bl","tl"],overflow:B,offset:[0,-4],targetOffset:G},top:{points:["bc","tc"],overflow:B,offset:[0,-4],targetOffset:G},topRight:{points:["br","tr"],overflow:B,offset:[0,-4],targetOffset:G},bottomLeft:{points:["tl","bl"],overflow:B,offset:[0,4],targetOffset:G},bottom:{points:["tc","bc"],overflow:B,offset:[0,4],targetOffset:G},bottomRight:{points:["tr","br"],overflow:B,offset:[0,4],targetOffset:G}},O=R,D=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function A(Y,L){var se,ae=Y.arrow,Be=ae===void 0?!1:ae,U=Y.prefixCls,k=U===void 0?"rc-dropdown":U,N=Y.transitionName,V=Y.animation,J=Y.align,H=Y.placement,v=H===void 0?"bottomLeft":H,g=Y.placements,F=g===void 0?O:g,ie=Y.getPopupContainer,ue=Y.showAction,Le=Y.hideAction,Je=Y.overlayClassName,rt=Y.overlayStyle,dt=Y.visible,vt=Y.trigger,be=vt===void 0?["hover"]:vt,Tt=Y.autoFocus,tt=Y.overlay,It=Y.children,Qe=Y.onVisibleChange,$e=(0,te.Z)(Y,D),ye=o.useState(),de=(0,pe.Z)(ye,2),K=de[0],xe=de[1],Se="visible"in Y?dt:K,$=o.useRef(null),P=o.useRef(null),fe=o.useRef(null);o.useImperativeHandle(L,function(){return $.current});var he=function(Ke){xe(Ke),Qe==null||Qe(Ke)};E({visible:Se,triggerRef:fe,onVisibleChange:he,autoFocus:Tt,overlayRef:P});var q=function(Ke){var Ze=Y.onOverlayClick;xe(!1),Ze&&Ze(Ke)},re=function(){return o.createElement(I,{ref:P,overlay:tt,prefixCls:k,arrow:Be})},le=function(){return typeof tt=="function"?re:re()},Pe=function(){var Ke=Y.minOverlayWidthMatchTrigger,Ze=Y.alignPoint;return"minOverlayWidthMatchTrigger"in Y?Ke:!Ze},Ae=function(){var Ke=Y.openClassName;return Ke!==void 0?Ke:"".concat(k,"-open")},Ne=o.cloneElement(It,{className:oe()((se=It.props)===null||se===void 0?void 0:se.className,Se&&Ae()),ref:(0,Q.Yr)(It)?(0,Q.sQ)(fe,(0,Q.C4)(It)):void 0}),Te=Le;return!Te&&be.indexOf("contextMenu")!==-1&&(Te=["click"]),o.createElement(M.Z,(0,x.Z)({builtinPlacements:F},$e,{prefixCls:k,ref:$,popupClassName:oe()(Je,(0,ne.Z)({},"".concat(k,"-show-arrow"),Be)),popupStyle:rt,action:be,showAction:ue,hideAction:Te,popupPlacement:v,popupAlign:J,popupTransitionName:N,popupAnimation:V,popupVisible:Se,stretch:Pe()?"minWidth":"",popup:le(),onPopupVisibleChange:he,onPopupClick:q,getPopupContainer:ie}),Ne)}var W=o.forwardRef(A),X=W},66003:function(fn,je,b){"use strict";b.d(je,{Z:function(){return oe}});var x=b(43079),ne=b(27247),pe=b(34666),te=b(59301),M=["show"];function f(Q,o){if(!o.max)return!0;var y=o.strategy(Q);return y<=o.max}function oe(Q,o){return te.useMemo(function(){var y={};o&&(y.show=(0,pe.Z)(o)==="object"&&o.formatter?o.formatter:!!o),y=(0,ne.Z)((0,ne.Z)({},y),Q);var C=y,h=C.show,m=(0,x.Z)(C,M);return(0,ne.Z)((0,ne.Z)({},m),{},{show:!!h,showFormatter:typeof h=="function"?h:void 0,strategy:m.strategy||function(E){return E.length}})},[Q,o])}},36901:function(fn,je,b){"use strict";b.r(je),b.d(je,{BaseInput:function(){return y},default:function(){return O}});var x=b(27247),ne=b(32855),pe=b(74430),te=b(34666),M=b(92310),f=b.n(M),oe=b(59301),Q=b(30292),o=oe.forwardRef(function(D,A){var W,X,Y,L=D.inputElement,se=D.children,ae=D.prefixCls,Be=D.prefix,U=D.suffix,k=D.addonBefore,N=D.addonAfter,V=D.className,J=D.style,H=D.disabled,v=D.readOnly,g=D.focused,F=D.triggerFocus,ie=D.allowClear,ue=D.value,Le=D.handleReset,Je=D.hidden,rt=D.classes,dt=D.classNames,vt=D.dataAttrs,be=D.styles,Tt=D.components,tt=D.onClear,It=se!=null?se:L,Qe=(Tt==null?void 0:Tt.affixWrapper)||"span",$e=(Tt==null?void 0:Tt.groupWrapper)||"span",ye=(Tt==null?void 0:Tt.wrapper)||"span",de=(Tt==null?void 0:Tt.groupAddon)||"span",K=(0,oe.useRef)(null),xe=function(ft){var Xe;(Xe=K.current)!==null&&Xe!==void 0&&Xe.contains(ft.target)&&(F==null||F())},Se=(0,Q.X3)(D),$=(0,oe.cloneElement)(It,{value:ue,className:f()((W=It.props)===null||W===void 0?void 0:W.className,!Se&&(dt==null?void 0:dt.variant))||null}),P=(0,oe.useRef)(null);if(oe.useImperativeHandle(A,function(){return{nativeElement:P.current||K.current}}),Se){var fe=null;if(ie){var he=!H&&!v&&ue,q="".concat(ae,"-clear-icon"),re=(0,te.Z)(ie)==="object"&&ie!==null&&ie!==void 0&&ie.clearIcon?ie.clearIcon:"\u2716";fe=oe.createElement("button",{type:"button",tabIndex:-1,onClick:function(ft){Le==null||Le(ft),tt==null||tt()},onMouseDown:function(ft){return ft.preventDefault()},className:f()(q,(0,pe.Z)((0,pe.Z)({},"".concat(q,"-hidden"),!he),"".concat(q,"-has-suffix"),!!U))},re)}var le="".concat(ae,"-affix-wrapper"),Pe=f()(le,(0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)({},"".concat(ae,"-disabled"),H),"".concat(le,"-disabled"),H),"".concat(le,"-focused"),g),"".concat(le,"-readonly"),v),"".concat(le,"-input-with-clear-btn"),U&&ie&&ue),rt==null?void 0:rt.affixWrapper,dt==null?void 0:dt.affixWrapper,dt==null?void 0:dt.variant),Ae=(U||ie)&&oe.createElement("span",{className:f()("".concat(ae,"-suffix"),dt==null?void 0:dt.suffix),style:be==null?void 0:be.suffix},fe,U);$=oe.createElement(Qe,(0,ne.Z)({className:Pe,style:be==null?void 0:be.affixWrapper,onClick:xe},vt==null?void 0:vt.affixWrapper,{ref:K}),Be&&oe.createElement("span",{className:f()("".concat(ae,"-prefix"),dt==null?void 0:dt.prefix),style:be==null?void 0:be.prefix},Be),$,Ae)}if((0,Q.He)(D)){var Ne="".concat(ae,"-group"),Te="".concat(Ne,"-addon"),He="".concat(Ne,"-wrapper"),Ke=f()("".concat(ae,"-wrapper"),Ne,rt==null?void 0:rt.wrapper,dt==null?void 0:dt.wrapper),Ze=f()(He,(0,pe.Z)({},"".concat(He,"-disabled"),H),rt==null?void 0:rt.group,dt==null?void 0:dt.groupWrapper);$=oe.createElement($e,{className:Ze,ref:P},oe.createElement(ye,{className:Ke},k&&oe.createElement(de,{className:Te},k),$,N&&oe.createElement(de,{className:Te},N)))}return oe.cloneElement($,{className:f()((X=$.props)===null||X===void 0?void 0:X.className,V)||null,style:(0,x.Z)((0,x.Z)({},(Y=$.props)===null||Y===void 0?void 0:Y.style),J),hidden:Je})}),y=o,C=b(3300),h=b(11913),m=b(43079),E=b(18929),S=b(2738),I=b(66003),B=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],G=(0,oe.forwardRef)(function(D,A){var W=D.autoComplete,X=D.onChange,Y=D.onFocus,L=D.onBlur,se=D.onPressEnter,ae=D.onKeyDown,Be=D.onKeyUp,U=D.prefixCls,k=U===void 0?"rc-input":U,N=D.disabled,V=D.htmlSize,J=D.className,H=D.maxLength,v=D.suffix,g=D.showCount,F=D.count,ie=D.type,ue=ie===void 0?"text":ie,Le=D.classes,Je=D.classNames,rt=D.styles,dt=D.onCompositionStart,vt=D.onCompositionEnd,be=(0,m.Z)(D,B),Tt=(0,oe.useState)(!1),tt=(0,h.Z)(Tt,2),It=tt[0],Qe=tt[1],$e=(0,oe.useRef)(!1),ye=(0,oe.useRef)(!1),de=(0,oe.useRef)(null),K=(0,oe.useRef)(null),xe=function(tn){de.current&&(0,Q.nH)(de.current,tn)},Se=(0,E.Z)(D.defaultValue,{value:D.value}),$=(0,h.Z)(Se,2),P=$[0],fe=$[1],he=P==null?"":String(P),q=(0,oe.useState)(null),re=(0,h.Z)(q,2),le=re[0],Pe=re[1],Ae=(0,I.Z)(F,g),Ne=Ae.max||H,Te=Ae.strategy(he),He=!!Ne&&Te>Ne;(0,oe.useImperativeHandle)(A,function(){var Lt;return{focus:xe,blur:function(){var ze;(ze=de.current)===null||ze===void 0||ze.blur()},setSelectionRange:function(ze,ke,Re){var Z;(Z=de.current)===null||Z===void 0||Z.setSelectionRange(ze,ke,Re)},select:function(){var ze;(ze=de.current)===null||ze===void 0||ze.select()},input:de.current,nativeElement:((Lt=K.current)===null||Lt===void 0?void 0:Lt.nativeElement)||de.current}}),(0,oe.useEffect)(function(){ye.current&&(ye.current=!1),Qe(function(Lt){return Lt&&N?!1:Lt})},[N]);var Ke=function(tn,ze,ke){var Re=ze;if(!$e.current&&Ae.exceedFormatter&&Ae.max&&Ae.strategy(ze)>Ae.max){if(Re=Ae.exceedFormatter(ze,{max:Ae.max}),ze!==Re){var Z,ee;Pe([((Z=de.current)===null||Z===void 0?void 0:Z.selectionStart)||0,((ee=de.current)===null||ee===void 0?void 0:ee.selectionEnd)||0])}}else if(ke.source==="compositionEnd")return;fe(Re),de.current&&(0,Q.rJ)(de.current,tn,X,Re)};(0,oe.useEffect)(function(){if(le){var Lt;(Lt=de.current)===null||Lt===void 0||Lt.setSelectionRange.apply(Lt,(0,C.Z)(le))}},[le]);var Ze=function(tn){Ke(tn,tn.target.value,{source:"change"})},_e=function(tn){$e.current=!1,Ke(tn,tn.currentTarget.value,{source:"compositionEnd"}),vt==null||vt(tn)},ft=function(tn){se&&tn.key==="Enter"&&!ye.current&&(ye.current=!0,se(tn)),ae==null||ae(tn)},Xe=function(tn){tn.key==="Enter"&&(ye.current=!1),Be==null||Be(tn)},Ve=function(tn){Qe(!0),Y==null||Y(tn)},Pt=function(tn){ye.current&&(ye.current=!1),Qe(!1),L==null||L(tn)},Mt=function(tn){fe(""),xe(),de.current&&(0,Q.rJ)(de.current,tn,X)},st=He&&"".concat(k,"-out-of-range"),Qt=function(){var tn=(0,S.Z)(D,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return oe.createElement("input",(0,ne.Z)({autoComplete:W},tn,{onChange:Ze,onFocus:Ve,onBlur:Pt,onKeyDown:ft,onKeyUp:Xe,className:f()(k,(0,pe.Z)({},"".concat(k,"-disabled"),N),Je==null?void 0:Je.input),style:rt==null?void 0:rt.input,ref:de,size:V,type:ue,onCompositionStart:function(ke){$e.current=!0,dt==null||dt(ke)},onCompositionEnd:_e}))},pn=function(){var tn=Number(Ne)>0;if(v||Ae.show){var ze=Ae.showFormatter?Ae.showFormatter({value:he,count:Te,maxLength:Ne}):"".concat(Te).concat(tn?" / ".concat(Ne):"");return oe.createElement(oe.Fragment,null,Ae.show&&oe.createElement("span",{className:f()("".concat(k,"-show-count-suffix"),(0,pe.Z)({},"".concat(k,"-show-count-has-suffix"),!!v),Je==null?void 0:Je.count),style:(0,x.Z)({},rt==null?void 0:rt.count)},ze),v)}return null};return oe.createElement(y,(0,ne.Z)({},be,{prefixCls:k,className:f()(J,st),handleReset:Mt,value:he,focused:It,triggerFocus:xe,suffix:pn(),disabled:N,classes:Le,classNames:Je,styles:rt}),Qt())}),R=G,O=R},30292:function(fn,je,b){"use strict";b.d(je,{He:function(){return x},X3:function(){return ne},nH:function(){return M},rJ:function(){return te}});function x(f){return!!(f.addonBefore||f.addonAfter)}function ne(f){return!!(f.prefix||f.suffix||f.allowClear)}function pe(f,oe,Q){var o=oe.cloneNode(!0),y=Object.create(f,{target:{value:o},currentTarget:{value:o}});return o.value=Q,typeof oe.selectionStart=="number"&&typeof oe.selectionEnd=="number"&&(o.selectionStart=oe.selectionStart,o.selectionEnd=oe.selectionEnd),o.setSelectionRange=function(){oe.setSelectionRange.apply(oe,arguments)},y}function te(f,oe,Q,o){if(Q){var y=oe;if(oe.type==="click"){y=pe(oe,f,""),Q(y);return}if(f.type!=="file"&&o!==void 0){y=pe(oe,f,o),Q(y);return}Q(y)}}function M(f,oe){if(f){f.focus(oe);var Q=oe||{},o=Q.cursor;if(o){var y=f.value.length;switch(o){case"start":f.setSelectionRange(0,0);break;case"end":f.setSelectionRange(y,y);break;default:f.setSelectionRange(0,y)}}}}},28321:function(fn,je,b){"use strict";b.d(je,{iz:function(){return Fe},ck:function(){return Re},BW:function(){return Zt},sN:function(){return Re},Wd:function(){return At},ZP:function(){return Ft},Xl:function(){return se}});var x=b(32855),ne=b(74430),pe=b(27247),te=b(3300),M=b(11913),f=b(43079),oe=b(92310),Q=b.n(oe),o=b(11780),y=b(18929),C=b(13697),h=b(48736),m=b(59301),E=b(4676),S=m.createContext(null);function I(De,Ce){return De===void 0?null:"".concat(De,"-").concat(Ce)}function B(De){var Ce=m.useContext(S);return I(Ce,De)}var G=b(80547),R=["children","locked"],O=m.createContext(null);function D(De,Ce){var ct=(0,pe.Z)({},De);return Object.keys(Ce).forEach(function(at){var Ot=Ce[at];Ot!==void 0&&(ct[at]=Ot)}),ct}function A(De){var Ce=De.children,ct=De.locked,at=(0,f.Z)(De,R),Ot=m.useContext(O),Wt=(0,G.Z)(function(){return D(Ot,at)},[Ot,at],function(jt,on){return!ct&&(jt[0]!==on[0]||!(0,C.Z)(jt[1],on[1],!0))});return m.createElement(O.Provider,{value:Wt},Ce)}var W=[],X=m.createContext(null);function Y(){return m.useContext(X)}var L=m.createContext(W);function se(De){var Ce=m.useContext(L);return m.useMemo(function(){return De!==void 0?[].concat((0,te.Z)(Ce),[De]):Ce},[Ce,De])}var ae=m.createContext(null),Be=m.createContext({}),U=Be,k=b(29194);function N(De){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,k.Z)(De)){var ct=De.nodeName.toLowerCase(),at=["input","select","textarea","button"].includes(ct)||De.isContentEditable||ct==="a"&&!!De.getAttribute("href"),Ot=De.getAttribute("tabindex"),Wt=Number(Ot),jt=null;return Ot&&!Number.isNaN(Wt)?jt=Wt:at&&jt===null&&(jt=0),at&&De.disabled&&(jt=null),jt!==null&&(jt>=0||Ce&&jt<0)}return!1}function V(De){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ct=(0,te.Z)(De.querySelectorAll("*")).filter(function(at){return N(at,Ce)});return N(De,Ce)&&ct.unshift(De),ct}var J=null;function H(){J=document.activeElement}function v(){J=null}function g(){if(J)try{J.focus()}catch(De){}}function F(De,Ce){if(Ce.keyCode===9){var ct=V(De),at=ct[Ce.shiftKey?0:ct.length-1],Ot=at===document.activeElement||De===document.activeElement;if(Ot){var Wt=ct[Ce.shiftKey?ct.length-1:0];Wt.focus(),Ce.preventDefault()}}}var ie=b(10228),ue=b(16089),Le=ie.Z.LEFT,Je=ie.Z.RIGHT,rt=ie.Z.UP,dt=ie.Z.DOWN,vt=ie.Z.ENTER,be=ie.Z.ESC,Tt=ie.Z.HOME,tt=ie.Z.END,It=[rt,dt,Le,Je];function Qe(De,Ce,ct,at){var Ot,Wt="prev",jt="next",on="children",_n="parent";if(De==="inline"&&at===vt)return{inlineTrigger:!0};var un=(0,ne.Z)((0,ne.Z)({},rt,Wt),dt,jt),Wn=(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({},Le,ct?jt:Wt),Je,ct?Wt:jt),dt,on),vt,on),An=(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({},rt,Wt),dt,jt),vt,on),be,_n),Le,ct?on:_n),Je,ct?_n:on),wn={inline:un,horizontal:Wn,vertical:An,inlineSub:un,horizontalSub:An,verticalSub:An},Mn=(Ot=wn["".concat(De).concat(Ce?"":"Sub")])===null||Ot===void 0?void 0:Ot[at];switch(Mn){case Wt:return{offset:-1,sibling:!0};case jt:return{offset:1,sibling:!0};case _n:return{offset:-1,sibling:!1};case on:return{offset:1,sibling:!1};default:return null}}function $e(De){for(var Ce=De;Ce;){if(Ce.getAttribute("data-menu-list"))return Ce;Ce=Ce.parentElement}return null}function ye(De,Ce){for(var ct=De||document.activeElement;ct;){if(Ce.has(ct))return ct;ct=ct.parentElement}return null}function de(De,Ce){var ct=V(De,!0);return ct.filter(function(at){return Ce.has(at)})}function K(De,Ce,ct){var at=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!De)return null;var Ot=de(De,Ce),Wt=Ot.length,jt=Ot.findIndex(function(on){return ct===on});return at<0?jt===-1?jt=Wt-1:jt-=1:at>0&&(jt+=1),jt=(jt+Wt)%Wt,Ot[jt]}var xe=function(Ce,ct){var at=new Set,Ot=new Map,Wt=new Map;return Ce.forEach(function(jt){var on=document.querySelector("[data-menu-id='".concat(I(ct,jt),"']"));on&&(at.add(on),Wt.set(on,jt),Ot.set(jt,on))}),{elements:at,key2element:Ot,element2key:Wt}};function Se(De,Ce,ct,at,Ot,Wt,jt,on,_n,un){var Wn=m.useRef(),An=m.useRef();An.current=Ce;var wn=function(){ue.Z.cancel(Wn.current)};return m.useEffect(function(){return function(){wn()}},[]),function(Mn){var Ln=Mn.which;if([].concat(It,[vt,be,Tt,tt]).includes(Ln)){var jn=Wt(),Tn=xe(jn,at),Rn=Tn,an=Rn.elements,hn=Rn.key2element,En=Rn.element2key,Yn=hn.get(Ce),kn=ye(Yn,an),$n=En.get(kn),Ar=Qe(De,jt($n,!0).length===1,ct,Ln);if(!Ar&&Ln!==Tt&&Ln!==tt)return;(It.includes(Ln)||[Tt,tt].includes(Ln))&&Mn.preventDefault();var ge=function(gt){if(gt){var Ge=gt,qe=gt.querySelector("a");qe!=null&&qe.getAttribute("href")&&(Ge=qe);var ut=En.get(gt);on(ut),wn(),Wn.current=(0,ue.Z)(function(){An.current===ut&&Ge.focus()})}};if([Tt,tt].includes(Ln)||Ar.sibling||!kn){var We;!kn||De==="inline"?We=Ot.current:We=$e(kn);var Ue,et=de(We,an);Ln===Tt?Ue=et[0]:Ln===tt?Ue=et[et.length-1]:Ue=K(We,an,kn,Ar.offset),ge(Ue)}else if(Ar.inlineTrigger)_n($n);else if(Ar.offset>0)_n($n,!0),wn(),Wn.current=(0,ue.Z)(function(){Tn=xe(jn,at);var Ct=kn.getAttribute("aria-controls"),gt=document.getElementById(Ct),Ge=K(gt,Tn.elements);ge(Ge)},5);else if(Ar.offset<0){var ot=jt($n,!0),lt=ot[ot.length-2],Bt=hn.get(lt);_n(lt,!1),ge(Bt)}}un==null||un(Mn)}}function $(De){Promise.resolve().then(De)}var P="__RC_UTIL_PATH_SPLIT__",fe=function(Ce){return Ce.join(P)},he=function(Ce){return Ce.split(P)},q="rc-menu-more";function re(){var De=m.useState({}),Ce=(0,M.Z)(De,2),ct=Ce[1],at=(0,m.useRef)(new Map),Ot=(0,m.useRef)(new Map),Wt=m.useState([]),jt=(0,M.Z)(Wt,2),on=jt[0],_n=jt[1],un=(0,m.useRef)(0),Wn=(0,m.useRef)(!1),An=function(){Wn.current||ct({})},wn=(0,m.useCallback)(function(hn,En){var Yn=fe(En);Ot.current.set(Yn,hn),at.current.set(hn,Yn),un.current+=1;var kn=un.current;$(function(){kn===un.current&&An()})},[]),Mn=(0,m.useCallback)(function(hn,En){var Yn=fe(En);Ot.current.delete(Yn),at.current.delete(hn)},[]),Ln=(0,m.useCallback)(function(hn){_n(hn)},[]),jn=(0,m.useCallback)(function(hn,En){var Yn=at.current.get(hn)||"",kn=he(Yn);return En&&on.includes(kn[0])&&kn.unshift(q),kn},[on]),Tn=(0,m.useCallback)(function(hn,En){return hn.filter(function(Yn){return Yn!==void 0}).some(function(Yn){var kn=jn(Yn,!0);return kn.includes(En)})},[jn]),Rn=function(){var En=(0,te.Z)(at.current.keys());return on.length&&En.push(q),En},an=(0,m.useCallback)(function(hn){var En="".concat(at.current.get(hn)).concat(P),Yn=new Set;return(0,te.Z)(Ot.current.keys()).forEach(function(kn){kn.startsWith(En)&&Yn.add(Ot.current.get(kn))}),Yn},[]);return m.useEffect(function(){return function(){Wn.current=!0}},[]),{registerPath:wn,unregisterPath:Mn,refreshOverflowKeys:Ln,isSubPathKey:Tn,getKeyPath:jn,getKeys:Rn,getSubPathKeys:an}}function le(De){var Ce=m.useRef(De);Ce.current=De;var ct=m.useCallback(function(){for(var at,Ot=arguments.length,Wt=new Array(Ot),jt=0;jt<Ot;jt++)Wt[jt]=arguments[jt];return(at=Ce.current)===null||at===void 0?void 0:at.call.apply(at,[Ce].concat(Wt))},[]);return De?ct:void 0}var Pe=Math.random().toFixed(5).toString().slice(2),Ae=0;function Ne(De){var Ce=(0,y.Z)(De,{value:De}),ct=(0,M.Z)(Ce,2),at=ct[0],Ot=ct[1];return m.useEffect(function(){Ae+=1;var Wt="".concat(Pe,"-").concat(Ae);Ot("rc-menu-uuid-".concat(Wt))},[]),at}var Te=b(33377),He=b(93912),Ke=b(18881),Ze=b(85461),_e=b(2738),ft=b(8654);function Xe(De,Ce,ct,at){var Ot=m.useContext(O),Wt=Ot.activeKey,jt=Ot.onActive,on=Ot.onInactive,_n={active:Wt===De};return Ce||(_n.onMouseEnter=function(un){ct==null||ct({key:De,domEvent:un}),jt(De)},_n.onMouseLeave=function(un){at==null||at({key:De,domEvent:un}),on(De)}),_n}function Ve(De){var Ce=m.useContext(O),ct=Ce.mode,at=Ce.rtl,Ot=Ce.inlineIndent;if(ct!=="inline")return null;var Wt=De;return at?{paddingRight:Wt*Ot}:{paddingLeft:Wt*Ot}}function Pt(De){var Ce=De.icon,ct=De.props,at=De.children,Ot;return Ce===null||Ce===!1?null:(typeof Ce=="function"?Ot=m.createElement(Ce,(0,pe.Z)({},ct)):typeof Ce!="boolean"&&(Ot=Ce),Ot||at||null)}var Mt=["item"];function st(De){var Ce=De.item,ct=(0,f.Z)(De,Mt);return Object.defineProperty(ct,"item",{get:function(){return(0,h.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ce}}),ct}var Qt=["title","attribute","elementRef"],pn=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Lt=["active"],tn=function(De){(0,Ke.Z)(ct,De);var Ce=(0,Ze.Z)(ct);function ct(){return(0,Te.Z)(this,ct),Ce.apply(this,arguments)}return(0,He.Z)(ct,[{key:"render",value:function(){var Ot=this.props,Wt=Ot.title,jt=Ot.attribute,on=Ot.elementRef,_n=(0,f.Z)(Ot,Qt),un=(0,_e.Z)(_n,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,h.ZP)(!jt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),m.createElement(o.Z.Item,(0,x.Z)({},jt,{title:typeof Wt=="string"?Wt:void 0},un,{ref:on}))}}]),ct}(m.Component),ze=m.forwardRef(function(De,Ce){var ct=De.style,at=De.className,Ot=De.eventKey,Wt=De.warnKey,jt=De.disabled,on=De.itemIcon,_n=De.children,un=De.role,Wn=De.onMouseEnter,An=De.onMouseLeave,wn=De.onClick,Mn=De.onKeyDown,Ln=De.onFocus,jn=(0,f.Z)(De,pn),Tn=B(Ot),Rn=m.useContext(O),an=Rn.prefixCls,hn=Rn.onItemClick,En=Rn.disabled,Yn=Rn.overflowDisabled,kn=Rn.itemIcon,$n=Rn.selectedKeys,Ar=Rn.onActive,ge=m.useContext(U),We=ge._internalRenderMenuItem,Ue="".concat(an,"-item"),et=m.useRef(),ot=m.useRef(),lt=En||jt,Bt=(0,ft.x1)(Ce,ot),Ct=se(Ot),gt=function(xn){return{key:Ot,keyPath:(0,te.Z)(Ct).reverse(),item:et.current,domEvent:xn}},Ge=on||kn,qe=Xe(Ot,lt,Wn,An),ut=qe.active,mt=(0,f.Z)(qe,Lt),St=$n.includes(Ot),Yt=Ve(Ct.length),vn=function(xn){if(!lt){var mr=gt(xn);wn==null||wn(st(mr)),hn(mr)}},cn=function(xn){if(Mn==null||Mn(xn),xn.which===ie.Z.ENTER){var mr=gt(xn);wn==null||wn(st(mr)),hn(mr)}},Dn=function(xn){Ar(Ot),Ln==null||Ln(xn)},Vn={};De.role==="option"&&(Vn["aria-selected"]=St);var Pn=m.createElement(tn,(0,x.Z)({ref:et,elementRef:Bt,role:un===null?"none":un||"menuitem",tabIndex:jt?null:-1,"data-menu-id":Yn&&Tn?null:Tn},(0,_e.Z)(jn,["extra"]),mt,Vn,{component:"li","aria-disabled":jt,style:(0,pe.Z)((0,pe.Z)({},Yt),ct),className:Q()(Ue,(0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(Ue,"-active"),ut),"".concat(Ue,"-selected"),St),"".concat(Ue,"-disabled"),lt),at),onClick:vn,onKeyDown:cn,onFocus:Dn}),_n,m.createElement(Pt,{props:(0,pe.Z)((0,pe.Z)({},De),{},{isSelected:St}),icon:Ge}));return We&&(Pn=We(Pn,De,{selected:St})),Pn});function ke(De,Ce){var ct=De.eventKey,at=Y(),Ot=se(ct);return m.useEffect(function(){if(at)return at.registerPath(ct,Ot),function(){at.unregisterPath(ct,Ot)}},[Ot]),at?null:m.createElement(ze,(0,x.Z)({},De,{ref:Ce}))}var Re=m.forwardRef(ke),Z=["className","children"],ee=function(Ce,ct){var at=Ce.className,Ot=Ce.children,Wt=(0,f.Z)(Ce,Z),jt=m.useContext(O),on=jt.prefixCls,_n=jt.mode,un=jt.rtl;return m.createElement("ul",(0,x.Z)({className:Q()(on,un&&"".concat(on,"-rtl"),"".concat(on,"-sub"),"".concat(on,"-").concat(_n==="inline"?"inline":"vertical"),at),role:"menu"},Wt,{"data-menu-list":!0,ref:ct}),Ot)},me=m.forwardRef(ee);me.displayName="SubMenuList";var ve=me,Ee=b(11592);function Me(De,Ce){return(0,Ee.Z)(De).map(function(ct,at){if(m.isValidElement(ct)){var Ot,Wt,jt=ct.key,on=(Ot=(Wt=ct.props)===null||Wt===void 0?void 0:Wt.eventKey)!==null&&Ot!==void 0?Ot:jt,_n=on==null;_n&&(on="tmp_key-".concat([].concat((0,te.Z)(Ce),[at]).join("-")));var un={key:on,eventKey:on};return m.cloneElement(ct,un)}return ct})}var Ye=b(65030),nt={adjustX:1,adjustY:1},_t={topLeft:{points:["bl","tl"],overflow:nt},topRight:{points:["br","tr"],overflow:nt},bottomLeft:{points:["tl","bl"],overflow:nt},bottomRight:{points:["tr","br"],overflow:nt},leftTop:{points:["tr","tl"],overflow:nt},leftBottom:{points:["br","bl"],overflow:nt},rightTop:{points:["tl","tr"],overflow:nt},rightBottom:{points:["bl","br"],overflow:nt}},nn={topLeft:{points:["bl","tl"],overflow:nt},topRight:{points:["br","tr"],overflow:nt},bottomLeft:{points:["tl","bl"],overflow:nt},bottomRight:{points:["tr","br"],overflow:nt},rightTop:{points:["tr","tl"],overflow:nt},rightBottom:{points:["br","bl"],overflow:nt},leftTop:{points:["tl","tr"],overflow:nt},leftBottom:{points:["bl","br"],overflow:nt}},ln=null;function zt(De,Ce,ct){if(Ce)return Ce;if(ct)return ct[De]||ct.other}var Jt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function yn(De){var Ce=De.prefixCls,ct=De.visible,at=De.children,Ot=De.popup,Wt=De.popupStyle,jt=De.popupClassName,on=De.popupOffset,_n=De.disabled,un=De.mode,Wn=De.onVisibleChange,An=m.useContext(O),wn=An.getPopupContainer,Mn=An.rtl,Ln=An.subMenuOpenDelay,jn=An.subMenuCloseDelay,Tn=An.builtinPlacements,Rn=An.triggerSubMenuAction,an=An.forceSubMenuRender,hn=An.rootClassName,En=An.motion,Yn=An.defaultMotions,kn=m.useState(!1),$n=(0,M.Z)(kn,2),Ar=$n[0],ge=$n[1],We=Mn?(0,pe.Z)((0,pe.Z)({},nn),Tn):(0,pe.Z)((0,pe.Z)({},_t),Tn),Ue=Jt[un],et=zt(un,En,Yn),ot=m.useRef(et);un!=="inline"&&(ot.current=et);var lt=(0,pe.Z)((0,pe.Z)({},ot.current),{},{leavedClassName:"".concat(Ce,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Bt=m.useRef();return m.useEffect(function(){return Bt.current=(0,ue.Z)(function(){ge(ct)}),function(){ue.Z.cancel(Bt.current)}},[ct]),m.createElement(Ye.Z,{prefixCls:Ce,popupClassName:Q()("".concat(Ce,"-popup"),(0,ne.Z)({},"".concat(Ce,"-rtl"),Mn),jt,hn),stretch:un==="horizontal"?"minWidth":null,getPopupContainer:wn,builtinPlacements:We,popupPlacement:Ue,popupVisible:Ar,popup:Ot,popupStyle:Wt,popupAlign:on&&{offset:on},action:_n?[]:[Rn],mouseEnterDelay:Ln,mouseLeaveDelay:jn,onPopupVisibleChange:Wn,forceRender:an,popupMotion:lt,fresh:!0},at)}var Bn=b(77900);function mn(De){var Ce=De.id,ct=De.open,at=De.keyPath,Ot=De.children,Wt="inline",jt=m.useContext(O),on=jt.prefixCls,_n=jt.forceSubMenuRender,un=jt.motion,Wn=jt.defaultMotions,An=jt.mode,wn=m.useRef(!1);wn.current=An===Wt;var Mn=m.useState(!wn.current),Ln=(0,M.Z)(Mn,2),jn=Ln[0],Tn=Ln[1],Rn=wn.current?ct:!1;m.useEffect(function(){wn.current&&Tn(!1)},[An]);var an=(0,pe.Z)({},zt(Wt,un,Wn));at.length>1&&(an.motionAppear=!1);var hn=an.onVisibleChanged;return an.onVisibleChanged=function(En){return!wn.current&&!En&&Tn(!0),hn==null?void 0:hn(En)},jn?null:m.createElement(A,{mode:Wt,locked:!wn.current},m.createElement(Bn.default,(0,x.Z)({visible:Rn},an,{forceRender:_n,removeOnLeave:!1,leavedClassName:"".concat(on,"-hidden")}),function(En){var Yn=En.className,kn=En.style;return m.createElement(ve,{id:Ce,className:Yn,style:kn},Ot)}))}var gn=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Nt=["active"],wt=m.forwardRef(function(De,Ce){var ct=De.style,at=De.className,Ot=De.title,Wt=De.eventKey,jt=De.warnKey,on=De.disabled,_n=De.internalPopupClose,un=De.children,Wn=De.itemIcon,An=De.expandIcon,wn=De.popupClassName,Mn=De.popupOffset,Ln=De.popupStyle,jn=De.onClick,Tn=De.onMouseEnter,Rn=De.onMouseLeave,an=De.onTitleClick,hn=De.onTitleMouseEnter,En=De.onTitleMouseLeave,Yn=(0,f.Z)(De,gn),kn=B(Wt),$n=m.useContext(O),Ar=$n.prefixCls,ge=$n.mode,We=$n.openKeys,Ue=$n.disabled,et=$n.overflowDisabled,ot=$n.activeKey,lt=$n.selectedKeys,Bt=$n.itemIcon,Ct=$n.expandIcon,gt=$n.onItemClick,Ge=$n.onOpenChange,qe=$n.onActive,ut=m.useContext(U),mt=ut._internalRenderSubMenuItem,St=m.useContext(ae),Yt=St.isSubPathKey,vn=se(),cn="".concat(Ar,"-submenu"),Dn=Ue||on,Vn=m.useRef(),Pn=m.useRef(),qn=Wn!=null?Wn:Bt,xn=An!=null?An:Ct,mr=We.includes(Wt),Jn=!et&&mr,dr=Yt(lt,Wt),Qn=Xe(Wt,Dn,hn,En),tr=Qn.active,gr=(0,f.Z)(Qn,Nt),dn=m.useState(!1),fr=(0,M.Z)(dn,2),Hn=fr[0],bn=fr[1],On=function(br){Dn||bn(br)},nr=function(br){On(!0),Tn==null||Tn({key:Wt,domEvent:br})},hr=function(br){On(!1),Rn==null||Rn({key:Wt,domEvent:br})},lr=m.useMemo(function(){return tr||(ge!=="inline"?Hn||Yt([ot],Wt):!1)},[ge,tr,ot,Hn,Wt,Yt]),In=Ve(vn.length),Pr=function(br){Dn||(an==null||an({key:Wt,domEvent:br}),ge==="inline"&&Ge(Wt,!mr))},zr=le(function(yr){jn==null||jn(st(yr)),gt(yr)}),Kr=function(br){ge!=="inline"&&Ge(Wt,br)},ei=function(){qe(Wt)},Jr=kn&&"".concat(kn,"-popup"),Vr=m.useMemo(function(){return m.createElement(Pt,{icon:ge!=="horizontal"?xn:void 0,props:(0,pe.Z)((0,pe.Z)({},De),{},{isOpen:Jn,isSubMenu:!0})},m.createElement("i",{className:"".concat(cn,"-arrow")}))},[ge,xn,De,Jn,cn]),_r=m.createElement("div",(0,x.Z)({role:"menuitem",style:In,className:"".concat(cn,"-title"),tabIndex:Dn?null:-1,ref:Vn,title:typeof Ot=="string"?Ot:null,"data-menu-id":et&&kn?null:kn,"aria-expanded":Jn,"aria-haspopup":!0,"aria-controls":Jr,"aria-disabled":Dn,onClick:Pr,onFocus:ei},gr),Ot,Vr),wr=m.useRef(ge);if(ge!=="inline"&&vn.length>1?wr.current="vertical":wr.current=ge,!et){var Nr=wr.current;_r=m.createElement(yn,{mode:Nr,prefixCls:cn,visible:!_n&&Jn&&ge!=="inline",popupClassName:wn,popupOffset:Mn,popupStyle:Ln,popup:m.createElement(A,{mode:Nr==="horizontal"?"vertical":Nr},m.createElement(ve,{id:Jr,ref:Pn},un)),disabled:Dn,onVisibleChange:Kr},_r)}var Er=m.createElement(o.Z.Item,(0,x.Z)({ref:Ce,role:"none"},Yn,{component:"li",style:ct,className:Q()(cn,"".concat(cn,"-").concat(ge),at,(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(cn,"-open"),Jn),"".concat(cn,"-active"),lr),"".concat(cn,"-selected"),dr),"".concat(cn,"-disabled"),Dn)),onMouseEnter:nr,onMouseLeave:hr}),_r,!et&&m.createElement(mn,{id:Jr,open:Jn,keyPath:vn},un));return mt&&(Er=mt(Er,De,{selected:dr,active:lr,open:Jn,disabled:Dn})),m.createElement(A,{onItemClick:zr,mode:ge==="horizontal"?"vertical":ge,itemIcon:qn,expandIcon:xn},Er)}),qt=m.forwardRef(function(De,Ce){var ct=De.eventKey,at=De.children,Ot=se(ct),Wt=Me(at,Ot),jt=Y();m.useEffect(function(){if(jt)return jt.registerPath(ct,Ot),function(){jt.unregisterPath(ct,Ot)}},[Ot]);var on;return jt?on=Wt:on=m.createElement(wt,(0,x.Z)({ref:Ce},De),Wt),m.createElement(L.Provider,{value:Ot},on)}),At=qt,Nn=b(34666);function Fe(De){var Ce=De.className,ct=De.style,at=m.useContext(O),Ot=at.prefixCls,Wt=Y();return Wt?null:m.createElement("li",{role:"separator",className:Q()("".concat(Ot,"-item-divider"),Ce),style:ct})}var Ie=["className","title","eventKey","children"],Kt=m.forwardRef(function(De,Ce){var ct=De.className,at=De.title,Ot=De.eventKey,Wt=De.children,jt=(0,f.Z)(De,Ie),on=m.useContext(O),_n=on.prefixCls,un="".concat(_n,"-item-group");return m.createElement("li",(0,x.Z)({ref:Ce,role:"presentation"},jt,{onClick:function(An){return An.stopPropagation()},className:Q()(un,ct)}),m.createElement("div",{role:"presentation",className:"".concat(un,"-title"),title:typeof at=="string"?at:void 0},at),m.createElement("ul",{role:"group",className:"".concat(un,"-list")},Wt))}),xt=m.forwardRef(function(De,Ce){var ct=De.eventKey,at=De.children,Ot=se(ct),Wt=Me(at,Ot),jt=Y();return jt?Wt:m.createElement(Kt,(0,x.Z)({ref:Ce},(0,_e.Z)(De,["warnKey"])),Wt)}),Zt=xt,Ht=["label","children","key","type","extra"];function yt(De,Ce,ct){var at=Ce.item,Ot=Ce.group,Wt=Ce.submenu,jt=Ce.divider;return(De||[]).map(function(on,_n){if(on&&(0,Nn.Z)(on)==="object"){var un=on,Wn=un.label,An=un.children,wn=un.key,Mn=un.type,Ln=un.extra,jn=(0,f.Z)(un,Ht),Tn=wn!=null?wn:"tmp-".concat(_n);return An||Mn==="group"?Mn==="group"?m.createElement(Ot,(0,x.Z)({key:Tn},jn,{title:Wn}),yt(An,Ce,ct)):m.createElement(Wt,(0,x.Z)({key:Tn},jn,{title:Wn}),yt(An,Ce,ct)):Mn==="divider"?m.createElement(jt,(0,x.Z)({key:Tn},jn)):m.createElement(at,(0,x.Z)({key:Tn},jn,{extra:Ln}),Wn,(!!Ln||Ln===0)&&m.createElement("span",{className:"".concat(ct,"-item-extra")},Ln))}return null}).filter(function(on){return on})}function Rt(De,Ce,ct,at,Ot){var Wt=De,jt=(0,pe.Z)({divider:Fe,item:Re,group:Zt,submenu:At},at);return Ce&&(Wt=yt(Ce,jt,Ot)),Me(Wt,ct)}var sn=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Ut=[],Gt=m.forwardRef(function(De,Ce){var ct,at=De,Ot=at.prefixCls,Wt=Ot===void 0?"rc-menu":Ot,jt=at.rootClassName,on=at.style,_n=at.className,un=at.tabIndex,Wn=un===void 0?0:un,An=at.items,wn=at.children,Mn=at.direction,Ln=at.id,jn=at.mode,Tn=jn===void 0?"vertical":jn,Rn=at.inlineCollapsed,an=at.disabled,hn=at.disabledOverflow,En=at.subMenuOpenDelay,Yn=En===void 0?.1:En,kn=at.subMenuCloseDelay,$n=kn===void 0?.1:kn,Ar=at.forceSubMenuRender,ge=at.defaultOpenKeys,We=at.openKeys,Ue=at.activeKey,et=at.defaultActiveFirst,ot=at.selectable,lt=ot===void 0?!0:ot,Bt=at.multiple,Ct=Bt===void 0?!1:Bt,gt=at.defaultSelectedKeys,Ge=at.selectedKeys,qe=at.onSelect,ut=at.onDeselect,mt=at.inlineIndent,St=mt===void 0?24:mt,Yt=at.motion,vn=at.defaultMotions,cn=at.triggerSubMenuAction,Dn=cn===void 0?"hover":cn,Vn=at.builtinPlacements,Pn=at.itemIcon,qn=at.expandIcon,xn=at.overflowedIndicator,mr=xn===void 0?"...":xn,Jn=at.overflowedIndicatorPopupClassName,dr=at.getPopupContainer,Qn=at.onClick,tr=at.onOpenChange,gr=at.onKeyDown,dn=at.openAnimation,fr=at.openTransitionName,Hn=at._internalRenderMenuItem,bn=at._internalRenderSubMenuItem,On=at._internalComponents,nr=(0,f.Z)(at,sn),hr=m.useMemo(function(){return[Rt(wn,An,Ut,On,Wt),Rt(wn,An,Ut,{},Wt)]},[wn,An,On]),lr=(0,M.Z)(hr,2),In=lr[0],Pr=lr[1],zr=m.useState(!1),Kr=(0,M.Z)(zr,2),ei=Kr[0],Jr=Kr[1],Vr=m.useRef(),_r=Ne(Ln),wr=Mn==="rtl",Nr=(0,y.Z)(ge,{value:We,postState:function(Fr){return Fr||Ut}}),Er=(0,M.Z)(Nr,2),yr=Er[0],br=Er[1],Cn=function(Fr){var Zr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function hi(){br(Fr),tr==null||tr(Fr)}Zr?(0,E.flushSync)(hi):hi()},rr=m.useState(yr),ir=(0,M.Z)(rr,2),sr=ir[0],er=ir[1],vr=m.useRef(!1),Wr=m.useMemo(function(){return(Tn==="inline"||Tn==="vertical")&&Rn?["vertical",Rn]:[Tn,!1]},[Tn,Rn]),Sn=(0,M.Z)(Wr,2),zn=Sn[0],Gn=Sn[1],Dr=zn==="inline",Rr=m.useState(zn),Br=(0,M.Z)(Rr,2),oi=Br[0],ni=Br[1],Xr=m.useState(Gn),$r=(0,M.Z)(Xr,2),Ji=$r[0],qi=$r[1];m.useEffect(function(){ni(zn),qi(Gn),vr.current&&(Dr?br(sr):Cn(Ut))},[zn,Gn]);var Ri=m.useState(0),Oi=(0,M.Z)(Ri,2),$i=Oi[0],ui=Oi[1],Hi=$i>=In.length-1||oi!=="horizontal"||hn;m.useEffect(function(){Dr&&er(yr)},[yr]),m.useEffect(function(){return vr.current=!0,function(){vr.current=!1}},[]);var Si=re(),Gi=Si.registerPath,Ii=Si.unregisterPath,es=Si.refreshOverflowKeys,Fi=Si.isSubPathKey,vs=Si.getKeyPath,Ni=Si.getKeys,fs=Si.getSubPathKeys,ts=m.useMemo(function(){return{registerPath:Gi,unregisterPath:Ii}},[Gi,Ii]),_i=m.useMemo(function(){return{isSubPathKey:Fi}},[Fi]);m.useEffect(function(){es(Hi?Ut:In.slice($i+1).map(function(Yr){return Yr.key}))},[$i,Hi]);var Mi=(0,y.Z)(Ue||et&&((ct=In[0])===null||ct===void 0?void 0:ct.key),{value:Ue}),ii=(0,M.Z)(Mi,2),ti=ii[0],Tr=ii[1],xr=le(function(Yr){Tr(Yr)}),Qr=le(function(){Tr(void 0)});(0,m.useImperativeHandle)(Ce,function(){return{list:Vr.current,focus:function(Fr){var Zr,hi=Ni(),si=xe(hi,_r),yi=si.elements,ai=si.key2element,ci=si.element2key,Ds=de(Vr.current,yi),Xt=ti!=null?ti:Ds[0]?ci.get(Ds[0]):(Zr=In.find(function(rs){return!rs.props.disabled}))===null||Zr===void 0?void 0:Zr.key,Bi=ai.get(Xt);if(Xt&&Bi){var ns;Bi==null||(ns=Bi.focus)===null||ns===void 0||ns.call(Bi,Fr)}}}});var Hr=(0,y.Z)(gt||[],{value:Ge,postState:function(Fr){return Array.isArray(Fr)?Fr:Fr==null?Ut:[Fr]}}),Gr=(0,M.Z)(Hr,2),jr=Gr[0],mi=Gr[1],gi=function(Fr){if(lt){var Zr=Fr.key,hi=jr.includes(Zr),si;Ct?hi?si=jr.filter(function(ai){return ai!==Zr}):si=[].concat((0,te.Z)(jr),[Zr]):si=[Zr],mi(si);var yi=(0,pe.Z)((0,pe.Z)({},Fr),{},{selectedKeys:si});hi?ut==null||ut(yi):qe==null||qe(yi)}!Ct&&yr.length&&oi!=="inline"&&Cn(Ut)},wi=le(function(Yr){Qn==null||Qn(st(Yr)),gi(Yr)}),qr=le(function(Yr,Fr){var Zr=yr.filter(function(si){return si!==Yr});if(Fr)Zr.push(Yr);else if(oi!=="inline"){var hi=fs(Yr);Zr=Zr.filter(function(si){return!hi.has(si)})}(0,C.Z)(yr,Zr,!0)||Cn(Zr,!0)}),di=function(Fr,Zr){var hi=Zr!=null?Zr:!yr.includes(Fr);qr(Fr,hi)},Ti=Se(oi,ti,wr,_r,Vr,Ni,vs,Tr,di,gr);m.useEffect(function(){Jr(!0)},[]);var Di=m.useMemo(function(){return{_internalRenderMenuItem:Hn,_internalRenderSubMenuItem:bn}},[Hn,bn]),ds=oi!=="horizontal"||hn?In:In.map(function(Yr,Fr){return m.createElement(A,{key:Yr.key,overflowDisabled:Fr>$i},Yr)}),Vi=m.createElement(o.Z,(0,x.Z)({id:Ln,ref:Vr,prefixCls:"".concat(Wt,"-overflow"),component:"ul",itemComponent:Re,className:Q()(Wt,"".concat(Wt,"-root"),"".concat(Wt,"-").concat(oi),_n,(0,ne.Z)((0,ne.Z)({},"".concat(Wt,"-inline-collapsed"),Ji),"".concat(Wt,"-rtl"),wr),jt),dir:Mn,style:on,role:"menu",tabIndex:Wn,data:ds,renderRawItem:function(Fr){return Fr},renderRawRest:function(Fr){var Zr=Fr.length,hi=Zr?In.slice(-Zr):null;return m.createElement(At,{eventKey:q,title:mr,disabled:Hi,internalPopupClose:Zr===0,popupClassName:Jn},hi)},maxCount:oi!=="horizontal"||hn?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Fr){ui(Fr)},onKeyDown:Ti},nr));return m.createElement(U.Provider,{value:Di},m.createElement(S.Provider,{value:_r},m.createElement(A,{prefixCls:Wt,rootClassName:jt,mode:oi,openKeys:yr,rtl:wr,disabled:an,motion:ei?Yt:null,defaultMotions:ei?vn:null,activeKey:ti,onActive:xr,onInactive:Qr,selectedKeys:jr,inlineIndent:St,subMenuOpenDelay:Yn,subMenuCloseDelay:$n,forceSubMenuRender:Ar,builtinPlacements:Vn,triggerSubMenuAction:Dn,getPopupContainer:dr,itemIcon:Pn,expandIcon:qn,onItemClick:wi,onOpenChange:qr},m.createElement(ae.Provider,{value:_i},Vi),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(X.Provider,{value:ts},Pr)))))}),Vt=Gt,rn=Vt;rn.Item=Re,rn.SubMenu=At,rn.ItemGroup=Zt,rn.Divider=Fe;var Ft=rn},11780:function(fn,je,b){"use strict";b.d(je,{Z:function(){return H}});var x=b(32855),ne=b(27247),pe=b(11913),te=b(43079),M=b(59301),f=b(92310),oe=b.n(f),Q=b(29301),o=b(34280),y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],C=void 0;function h(v,g){var F=v.prefixCls,ie=v.invalidate,ue=v.item,Le=v.renderItem,Je=v.responsive,rt=v.responsiveDisabled,dt=v.registerSize,vt=v.itemKey,be=v.className,Tt=v.style,tt=v.children,It=v.display,Qe=v.order,$e=v.component,ye=$e===void 0?"div":$e,de=(0,te.Z)(v,y),K=Je&&!It;function xe(he){dt(vt,he)}M.useEffect(function(){return function(){xe(null)}},[]);var Se=Le&&ue!==C?Le(ue,{index:Qe}):tt,$;ie||($={opacity:K?0:1,height:K?0:C,overflowY:K?"hidden":C,order:Je?Qe:C,pointerEvents:K?"none":C,position:K?"absolute":C});var P={};K&&(P["aria-hidden"]=!0);var fe=M.createElement(ye,(0,x.Z)({className:oe()(!ie&&F,be),style:(0,ne.Z)((0,ne.Z)({},$),Tt)},P,de,{ref:g}),Se);return Je&&(fe=M.createElement(Q.Z,{onResize:function(q){var re=q.offsetWidth;xe(re)},disabled:rt},fe)),fe}var m=M.forwardRef(h);m.displayName="Item";var E=m,S=b(6089),I=b(4676),B=b(16089);function G(v){if(typeof MessageChannel=="undefined")(0,B.Z)(v);else{var g=new MessageChannel;g.port1.onmessage=function(){return v()},g.port2.postMessage(void 0)}}function R(){var v=M.useRef(null),g=function(ie){v.current||(v.current=[],G(function(){(0,I.unstable_batchedUpdates)(function(){v.current.forEach(function(ue){ue()}),v.current=null})})),v.current.push(ie)};return g}function O(v,g){var F=M.useState(g),ie=(0,pe.Z)(F,2),ue=ie[0],Le=ie[1],Je=(0,S.Z)(function(rt){v(function(){Le(rt)})});return[ue,Je]}var D=M.createContext(null),A=["component"],W=["className"],X=["className"],Y=function(g,F){var ie=M.useContext(D);if(!ie){var ue=g.component,Le=ue===void 0?"div":ue,Je=(0,te.Z)(g,A);return M.createElement(Le,(0,x.Z)({},Je,{ref:F}))}var rt=ie.className,dt=(0,te.Z)(ie,W),vt=g.className,be=(0,te.Z)(g,X);return M.createElement(D.Provider,{value:null},M.createElement(E,(0,x.Z)({ref:F,className:oe()(rt,vt)},dt,be)))},L=M.forwardRef(Y);L.displayName="RawItem";var se=L,ae=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Be="responsive",U="invalidate";function k(v){return"+ ".concat(v.length," ...")}function N(v,g){var F=v.prefixCls,ie=F===void 0?"rc-overflow":F,ue=v.data,Le=ue===void 0?[]:ue,Je=v.renderItem,rt=v.renderRawItem,dt=v.itemKey,vt=v.itemWidth,be=vt===void 0?10:vt,Tt=v.ssr,tt=v.style,It=v.className,Qe=v.maxCount,$e=v.renderRest,ye=v.renderRawRest,de=v.suffix,K=v.component,xe=K===void 0?"div":K,Se=v.itemComponent,$=v.onVisibleChange,P=(0,te.Z)(v,ae),fe=Tt==="full",he=R(),q=O(he,null),re=(0,pe.Z)(q,2),le=re[0],Pe=re[1],Ae=le||0,Ne=O(he,new Map),Te=(0,pe.Z)(Ne,2),He=Te[0],Ke=Te[1],Ze=O(he,0),_e=(0,pe.Z)(Ze,2),ft=_e[0],Xe=_e[1],Ve=O(he,0),Pt=(0,pe.Z)(Ve,2),Mt=Pt[0],st=Pt[1],Qt=O(he,0),pn=(0,pe.Z)(Qt,2),Lt=pn[0],tn=pn[1],ze=(0,M.useState)(null),ke=(0,pe.Z)(ze,2),Re=ke[0],Z=ke[1],ee=(0,M.useState)(null),me=(0,pe.Z)(ee,2),ve=me[0],Ee=me[1],Me=M.useMemo(function(){return ve===null&&fe?Number.MAX_SAFE_INTEGER:ve||0},[ve,le]),Ye=(0,M.useState)(!1),nt=(0,pe.Z)(Ye,2),_t=nt[0],nn=nt[1],ln="".concat(ie,"-item"),zt=Math.max(ft,Mt),Jt=Qe===Be,yn=Le.length&&Jt,Bn=Qe===U,mn=yn||typeof Qe=="number"&&Le.length>Qe,gn=(0,M.useMemo)(function(){var rn=Le;return yn?le===null&&fe?rn=Le:rn=Le.slice(0,Math.min(Le.length,Ae/be)):typeof Qe=="number"&&(rn=Le.slice(0,Qe)),rn},[Le,be,le,Qe,yn]),Nt=(0,M.useMemo)(function(){return yn?Le.slice(Me+1):Le.slice(gn.length)},[Le,gn,yn,Me]),wt=(0,M.useCallback)(function(rn,Ft){var De;return typeof dt=="function"?dt(rn):(De=dt&&(rn==null?void 0:rn[dt]))!==null&&De!==void 0?De:Ft},[dt]),qt=(0,M.useCallback)(Je||function(rn){return rn},[Je]);function At(rn,Ft,De){ve===rn&&(Ft===void 0||Ft===Re)||(Ee(rn),De||(nn(rn<Le.length-1),$==null||$(rn)),Ft!==void 0&&Z(Ft))}function Nn(rn,Ft){Pe(Ft.clientWidth)}function Fe(rn,Ft){Ke(function(De){var Ce=new Map(De);return Ft===null?Ce.delete(rn):Ce.set(rn,Ft),Ce})}function Ie(rn,Ft){st(Ft),Xe(Mt)}function Kt(rn,Ft){tn(Ft)}function xt(rn){return He.get(wt(gn[rn],rn))}(0,o.Z)(function(){if(Ae&&typeof zt=="number"&&gn){var rn=Lt,Ft=gn.length,De=Ft-1;if(!Ft){At(0,null);return}for(var Ce=0;Ce<Ft;Ce+=1){var ct=xt(Ce);if(fe&&(ct=ct||0),ct===void 0){At(Ce-1,void 0,!0);break}if(rn+=ct,De===0&&rn<=Ae||Ce===De-1&&rn+xt(De)<=Ae){At(De,null);break}else if(rn+zt>Ae){At(Ce-1,rn-ct-Lt+Mt);break}}de&&xt(0)+Lt>Ae&&Z(null)}},[Ae,He,Mt,Lt,wt,gn]);var Zt=_t&&!!Nt.length,Ht={};Re!==null&&yn&&(Ht={position:"absolute",left:Re,top:0});var yt={prefixCls:ln,responsive:yn,component:Se,invalidate:Bn},Rt=rt?function(rn,Ft){var De=wt(rn,Ft);return M.createElement(D.Provider,{key:De,value:(0,ne.Z)((0,ne.Z)({},yt),{},{order:Ft,item:rn,itemKey:De,registerSize:Fe,display:Ft<=Me})},rt(rn,Ft))}:function(rn,Ft){var De=wt(rn,Ft);return M.createElement(E,(0,x.Z)({},yt,{order:Ft,key:De,item:rn,renderItem:qt,itemKey:De,registerSize:Fe,display:Ft<=Me}))},sn={order:Zt?Me:Number.MAX_SAFE_INTEGER,className:"".concat(ln,"-rest"),registerSize:Ie,display:Zt},Ut=$e||k,Gt=ye?M.createElement(D.Provider,{value:(0,ne.Z)((0,ne.Z)({},yt),sn)},ye(Nt)):M.createElement(E,(0,x.Z)({},yt,sn),typeof Ut=="function"?Ut(Nt):Ut),Vt=M.createElement(xe,(0,x.Z)({className:oe()(!Bn&&ie,It),style:tt,ref:g},P),gn.map(Rt),mn?Gt:null,de&&M.createElement(E,(0,x.Z)({},yt,{responsive:Jt,responsiveDisabled:!yn,order:Me,className:"".concat(ln,"-suffix"),registerSize:Kt,display:!0,style:Ht}),de));return Jt?M.createElement(Q.Z,{onResize:Nn,disabled:!yn},Vt):Vt}var V=M.forwardRef(N);V.displayName="Overflow",V.Item=se,V.RESPONSIVE=Be,V.INVALIDATE=U;var J=V,H=J},23425:function(fn,je,b){"use strict";b.d(je,{Z:function(){return X}});var x=b(74430),ne=b(32855),pe=b(34666),te=b(27247),M=b(11913),f=b(92310),oe=b.n(f),Q=b(18929),o=b(10228),y=b(26112),C=b(48736),h=b(59301),m=b(17119),E=[10,20,50,100],S=function(L){var se=L.pageSizeOptions,ae=se===void 0?E:se,Be=L.locale,U=L.changeSize,k=L.pageSize,N=L.goButton,V=L.quickGo,J=L.rootPrefixCls,H=L.disabled,v=L.buildOptionText,g=L.showSizeChanger,F=L.sizeChangerRender,ie=h.useState(""),ue=(0,M.Z)(ie,2),Le=ue[0],Je=ue[1],rt=function(){return!Le||Number.isNaN(Le)?void 0:Number(Le)},dt=typeof v=="function"?v:function(de){return"".concat(de," ").concat(Be.items_per_page)},vt=function(K){Je(K.target.value)},be=function(K){N||Le===""||(Je(""),!(K.relatedTarget&&(K.relatedTarget.className.indexOf("".concat(J,"-item-link"))>=0||K.relatedTarget.className.indexOf("".concat(J,"-item"))>=0))&&(V==null||V(rt())))},Tt=function(K){Le!==""&&(K.keyCode===o.Z.ENTER||K.type==="click")&&(Je(""),V==null||V(rt()))},tt=function(){return ae.some(function(K){return K.toString()===k.toString()})?ae:ae.concat([k]).sort(function(K,xe){var Se=Number.isNaN(Number(K))?0:Number(K),$=Number.isNaN(Number(xe))?0:Number(xe);return Se-$})},It="".concat(J,"-options");if(!g&&!V)return null;var Qe=null,$e=null,ye=null;return g&&F&&(Qe=F({disabled:H,size:k,onSizeChange:function(K){U==null||U(Number(K))},"aria-label":Be.page_size,className:"".concat(It,"-size-changer"),options:tt().map(function(de){return{label:dt(de),value:de}})})),V&&(N&&(ye=typeof N=="boolean"?h.createElement("button",{type:"button",onClick:Tt,onKeyUp:Tt,disabled:H,className:"".concat(It,"-quick-jumper-button")},Be.jump_to_confirm):h.createElement("span",{onClick:Tt,onKeyUp:Tt},N)),$e=h.createElement("div",{className:"".concat(It,"-quick-jumper")},Be.jump_to,h.createElement("input",{disabled:H,type:"text",value:Le,onChange:vt,onKeyUp:Tt,onBlur:be,"aria-label":Be.page}),Be.page,ye)),h.createElement("li",{className:It},Qe,$e)},I=S,B=function(L){var se=L.rootPrefixCls,ae=L.page,Be=L.active,U=L.className,k=L.showTitle,N=L.onClick,V=L.onKeyPress,J=L.itemRender,H="".concat(se,"-item"),v=oe()(H,"".concat(H,"-").concat(ae),(0,x.Z)((0,x.Z)({},"".concat(H,"-active"),Be),"".concat(H,"-disabled"),!ae),U),g=function(){N(ae)},F=function(Le){V(Le,N,ae)},ie=J(ae,"page",h.createElement("a",{rel:"nofollow"},ae));return ie?h.createElement("li",{title:k?String(ae):null,className:v,onClick:g,onKeyDown:F,tabIndex:0},ie):null},G=B,R=function(L,se,ae){return ae};function O(){}function D(Y){var L=Number(Y);return typeof L=="number"&&!Number.isNaN(L)&&isFinite(L)&&Math.floor(L)===L}function A(Y,L,se){var ae=typeof Y=="undefined"?L:Y;return Math.floor((se-1)/ae)+1}var W=function(L){var se=L.prefixCls,ae=se===void 0?"rc-pagination":se,Be=L.selectPrefixCls,U=Be===void 0?"rc-select":Be,k=L.className,N=L.current,V=L.defaultCurrent,J=V===void 0?1:V,H=L.total,v=H===void 0?0:H,g=L.pageSize,F=L.defaultPageSize,ie=F===void 0?10:F,ue=L.onChange,Le=ue===void 0?O:ue,Je=L.hideOnSinglePage,rt=L.align,dt=L.showPrevNextJumpers,vt=dt===void 0?!0:dt,be=L.showQuickJumper,Tt=L.showLessItems,tt=L.showTitle,It=tt===void 0?!0:tt,Qe=L.onShowSizeChange,$e=Qe===void 0?O:Qe,ye=L.locale,de=ye===void 0?m.Z:ye,K=L.style,xe=L.totalBoundaryShowSizeChanger,Se=xe===void 0?50:xe,$=L.disabled,P=L.simple,fe=L.showTotal,he=L.showSizeChanger,q=he===void 0?v>Se:he,re=L.sizeChangerRender,le=L.pageSizeOptions,Pe=L.itemRender,Ae=Pe===void 0?R:Pe,Ne=L.jumpPrevIcon,Te=L.jumpNextIcon,He=L.prevIcon,Ke=L.nextIcon,Ze=h.useRef(null),_e=(0,Q.Z)(10,{value:g,defaultValue:ie}),ft=(0,M.Z)(_e,2),Xe=ft[0],Ve=ft[1],Pt=(0,Q.Z)(1,{value:N,defaultValue:J,postState:function(hn){return Math.max(1,Math.min(hn,A(void 0,Xe,v)))}}),Mt=(0,M.Z)(Pt,2),st=Mt[0],Qt=Mt[1],pn=h.useState(st),Lt=(0,M.Z)(pn,2),tn=Lt[0],ze=Lt[1];(0,h.useEffect)(function(){ze(st)},[st]);var ke=Le!==O,Re="current"in L,Z=Math.max(1,st-(Tt?3:5)),ee=Math.min(A(void 0,Xe,v),st+(Tt?3:5));function me(an,hn){var En=an||h.createElement("button",{type:"button","aria-label":hn,className:"".concat(ae,"-item-link")});return typeof an=="function"&&(En=h.createElement(an,(0,te.Z)({},L))),En}function ve(an){var hn=an.target.value,En=A(void 0,Xe,v),Yn;return hn===""?Yn=hn:Number.isNaN(Number(hn))?Yn=tn:hn>=En?Yn=En:Yn=Number(hn),Yn}function Ee(an){return D(an)&&an!==st&&D(v)&&v>0}var Me=v>Xe?be:!1;function Ye(an){(an.keyCode===o.Z.UP||an.keyCode===o.Z.DOWN)&&an.preventDefault()}function nt(an){var hn=ve(an);switch(hn!==tn&&ze(hn),an.keyCode){case o.Z.ENTER:ln(hn);break;case o.Z.UP:ln(hn-1);break;case o.Z.DOWN:ln(hn+1);break;default:break}}function _t(an){ln(ve(an))}function nn(an){var hn=A(an,Xe,v),En=st>hn&&hn!==0?hn:st;Ve(an),ze(En),$e==null||$e(st,an),Qt(En),Le==null||Le(En,an)}function ln(an){if(Ee(an)&&!$){var hn=A(void 0,Xe,v),En=an;return an>hn?En=hn:an<1&&(En=1),En!==tn&&ze(En),Qt(En),Le==null||Le(En,Xe),En}return st}var zt=st>1,Jt=st<A(void 0,Xe,v);function yn(){zt&&ln(st-1)}function Bn(){Jt&&ln(st+1)}function mn(){ln(Z)}function gn(){ln(ee)}function Nt(an,hn){if(an.key==="Enter"||an.charCode===o.Z.ENTER||an.keyCode===o.Z.ENTER){for(var En=arguments.length,Yn=new Array(En>2?En-2:0),kn=2;kn<En;kn++)Yn[kn-2]=arguments[kn];hn.apply(void 0,Yn)}}function wt(an){Nt(an,yn)}function qt(an){Nt(an,Bn)}function At(an){Nt(an,mn)}function Nn(an){Nt(an,gn)}function Fe(an){var hn=Ae(an,"prev",me(He,"prev page"));return h.isValidElement(hn)?h.cloneElement(hn,{disabled:!zt}):hn}function Ie(an){var hn=Ae(an,"next",me(Ke,"next page"));return h.isValidElement(hn)?h.cloneElement(hn,{disabled:!Jt}):hn}function Kt(an){(an.type==="click"||an.keyCode===o.Z.ENTER)&&ln(tn)}var xt=null,Zt=(0,y.Z)(L,{aria:!0,data:!0}),Ht=fe&&h.createElement("li",{className:"".concat(ae,"-total-text")},fe(v,[v===0?0:(st-1)*Xe+1,st*Xe>v?v:st*Xe])),yt=null,Rt=A(void 0,Xe,v);if(Je&&v<=Xe)return null;var sn=[],Ut={rootPrefixCls:ae,onClick:ln,onKeyPress:Nt,showTitle:It,itemRender:Ae,page:-1},Gt=st-1>0?st-1:0,Vt=st+1<Rt?st+1:Rt,rn=be&&be.goButton,Ft=(0,pe.Z)(P)==="object"?P.readOnly:!P,De=rn,Ce=null;P&&(rn&&(typeof rn=="boolean"?De=h.createElement("button",{type:"button",onClick:Kt,onKeyUp:Kt},de.jump_to_confirm):De=h.createElement("span",{onClick:Kt,onKeyUp:Kt},rn),De=h.createElement("li",{title:It?"".concat(de.jump_to).concat(st,"/").concat(Rt):null,className:"".concat(ae,"-simple-pager")},De)),Ce=h.createElement("li",{title:It?"".concat(st,"/").concat(Rt):null,className:"".concat(ae,"-simple-pager")},Ft?tn:h.createElement("input",{type:"text","aria-label":de.jump_to,value:tn,disabled:$,onKeyDown:Ye,onKeyUp:nt,onChange:nt,onBlur:_t,size:3}),h.createElement("span",{className:"".concat(ae,"-slash")},"/"),Rt));var ct=Tt?1:2;if(Rt<=3+ct*2){Rt||sn.push(h.createElement(G,(0,ne.Z)({},Ut,{key:"noPager",page:1,className:"".concat(ae,"-item-disabled")})));for(var at=1;at<=Rt;at+=1)sn.push(h.createElement(G,(0,ne.Z)({},Ut,{key:at,page:at,active:st===at})))}else{var Ot=Tt?de.prev_3:de.prev_5,Wt=Tt?de.next_3:de.next_5,jt=Ae(Z,"jump-prev",me(Ne,"prev page")),on=Ae(ee,"jump-next",me(Te,"next page"));vt&&(xt=jt?h.createElement("li",{title:It?Ot:null,key:"prev",onClick:mn,tabIndex:0,onKeyDown:At,className:oe()("".concat(ae,"-jump-prev"),(0,x.Z)({},"".concat(ae,"-jump-prev-custom-icon"),!!Ne))},jt):null,yt=on?h.createElement("li",{title:It?Wt:null,key:"next",onClick:gn,tabIndex:0,onKeyDown:Nn,className:oe()("".concat(ae,"-jump-next"),(0,x.Z)({},"".concat(ae,"-jump-next-custom-icon"),!!Te))},on):null);var _n=Math.max(1,st-ct),un=Math.min(st+ct,Rt);st-1<=ct&&(un=1+ct*2),Rt-st<=ct&&(_n=Rt-ct*2);for(var Wn=_n;Wn<=un;Wn+=1)sn.push(h.createElement(G,(0,ne.Z)({},Ut,{key:Wn,page:Wn,active:st===Wn})));if(st-1>=ct*2&&st!==3&&(sn[0]=h.cloneElement(sn[0],{className:oe()("".concat(ae,"-item-after-jump-prev"),sn[0].props.className)}),sn.unshift(xt)),Rt-st>=ct*2&&st!==Rt-2){var An=sn[sn.length-1];sn[sn.length-1]=h.cloneElement(An,{className:oe()("".concat(ae,"-item-before-jump-next"),An.props.className)}),sn.push(yt)}_n!==1&&sn.unshift(h.createElement(G,(0,ne.Z)({},Ut,{key:1,page:1}))),un!==Rt&&sn.push(h.createElement(G,(0,ne.Z)({},Ut,{key:Rt,page:Rt})))}var wn=Fe(Gt);if(wn){var Mn=!zt||!Rt;wn=h.createElement("li",{title:It?de.prev_page:null,onClick:yn,tabIndex:Mn?null:0,onKeyDown:wt,className:oe()("".concat(ae,"-prev"),(0,x.Z)({},"".concat(ae,"-disabled"),Mn)),"aria-disabled":Mn},wn)}var Ln=Ie(Vt);if(Ln){var jn,Tn;P?(jn=!Jt,Tn=zt?0:null):(jn=!Jt||!Rt,Tn=jn?null:0),Ln=h.createElement("li",{title:It?de.next_page:null,onClick:Bn,tabIndex:Tn,onKeyDown:qt,className:oe()("".concat(ae,"-next"),(0,x.Z)({},"".concat(ae,"-disabled"),jn)),"aria-disabled":jn},Ln)}var Rn=oe()(ae,k,(0,x.Z)((0,x.Z)((0,x.Z)((0,x.Z)((0,x.Z)({},"".concat(ae,"-start"),rt==="start"),"".concat(ae,"-center"),rt==="center"),"".concat(ae,"-end"),rt==="end"),"".concat(ae,"-simple"),P),"".concat(ae,"-disabled"),$));return h.createElement("ul",(0,ne.Z)({className:Rn,style:K,ref:Ze},Zt),Ht,wn,P?Ce:sn,Ln,h.createElement(I,{locale:de,rootPrefixCls:ae,disabled:$,selectPrefixCls:U,changeSize:nn,pageSize:Xe,pageSizeOptions:le,quickGo:Me?ln:null,goButton:De,showSizeChanger:q,sizeChangerRender:re}))},X=W},25930:function(fn,je,b){"use strict";b.d(je,{Cd:function(){return ae}});var x=b(32855),ne=b(27247),pe=b(43079),te=b(59301),M=b(92310),f=b.n(M),oe={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Q=function(){var k=(0,te.useRef)([]),N=(0,te.useRef)(null);return(0,te.useEffect)(function(){var V=Date.now(),J=!1;k.current.forEach(function(H){if(H){J=!0;var v=H.style;v.transitionDuration=".3s, .3s, .3s, .06s",N.current&&V-N.current<100&&(v.transitionDuration="0s, 0s")}}),J&&(N.current=Date.now())}),k.current},o=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],y=function(k){var N=(0,ne.Z)((0,ne.Z)({},oe),k),V=N.className,J=N.percent,H=N.prefixCls,v=N.strokeColor,g=N.strokeLinecap,F=N.strokeWidth,ie=N.style,ue=N.trailColor,Le=N.trailWidth,Je=N.transition,rt=(0,pe.Z)(N,o);delete rt.gapPosition;var dt=Array.isArray(J)?J:[J],vt=Array.isArray(v)?v:[v],be=Q(),Tt=F/2,tt=100-F/2,It="M ".concat(g==="round"?Tt:0,",").concat(Tt,`
L `).concat(g==="round"?tt:100,",").concat(Tt),Qe="0 0 100 ".concat(F),$e=0;return te.createElement("svg",(0,x.Z)({className:f()("".concat(H,"-line"),V),viewBox:Qe,preserveAspectRatio:"none",style:ie},rt),te.createElement("path",{className:"".concat(H,"-line-trail"),d:It,strokeLinecap:g,stroke:ue,strokeWidth:Le||F,fillOpacity:"0"}),dt.map(function(ye,de){var K=1;switch(g){case"round":K=1-F/100;break;case"square":K=1-F/2/100;break;default:K=1;break}var xe={strokeDasharray:"".concat(ye*K,"px, 100px"),strokeDashoffset:"-".concat($e,"px"),transition:Je||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Se=vt[de]||vt[vt.length-1];return $e+=ye,te.createElement("path",{key:de,className:"".concat(H,"-line-path"),d:It,strokeLinecap:g,stroke:Se,strokeWidth:F,fillOpacity:"0",ref:function(P){be[de]=P},style:xe})}))},C=y,h=b(34666),m=b(11913),E=b(47273),S=0,I=(0,E.Z)();function B(){var U;return I?(U=S,S+=1):U="TEST_OR_SSR",U}var G=function(U){var k=te.useState(),N=(0,m.Z)(k,2),V=N[0],J=N[1];return te.useEffect(function(){J("rc_progress_".concat(B()))},[]),U||V},R=function(k){var N=k.bg,V=k.children;return te.createElement("div",{style:{width:"100%",height:"100%",background:N}},V)};function O(U,k){return Object.keys(U).map(function(N){var V=parseFloat(N),J="".concat(Math.floor(V*k),"%");return"".concat(U[N]," ").concat(J)})}var D=te.forwardRef(function(U,k){var N=U.prefixCls,V=U.color,J=U.gradientId,H=U.radius,v=U.style,g=U.ptg,F=U.strokeLinecap,ie=U.strokeWidth,ue=U.size,Le=U.gapDegree,Je=V&&(0,h.Z)(V)==="object",rt=Je?"#FFF":void 0,dt=ue/2,vt=te.createElement("circle",{className:"".concat(N,"-circle-path"),r:H,cx:dt,cy:dt,stroke:rt,strokeLinecap:F,strokeWidth:ie,opacity:g===0?0:1,style:v,ref:k});if(!Je)return vt;var be="".concat(J,"-conic"),Tt=Le?"".concat(180+Le/2,"deg"):"0deg",tt=O(V,(360-Le)/360),It=O(V,1),Qe="conic-gradient(from ".concat(Tt,", ").concat(tt.join(", "),")"),$e="linear-gradient(to ".concat(Le?"bottom":"top",", ").concat(It.join(", "),")");return te.createElement(te.Fragment,null,te.createElement("mask",{id:be},vt),te.createElement("foreignObject",{x:0,y:0,width:ue,height:ue,mask:"url(#".concat(be,")")},te.createElement(R,{bg:$e},te.createElement(R,{bg:Qe}))))}),A=D,W=100,X=function(k,N,V,J,H,v,g,F,ie,ue){var Le=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Je=V/100*360*((360-v)/360),rt=v===0?0:{bottom:0,top:180,left:90,right:-90}[g],dt=(100-J)/100*N;ie==="round"&&J!==100&&(dt+=ue/2,dt>=N&&(dt=N-.01));var vt=W/2;return{stroke:typeof F=="string"?F:void 0,strokeDasharray:"".concat(N,"px ").concat(k),strokeDashoffset:dt+Le,transform:"rotate(".concat(H+Je+rt,"deg)"),transformOrigin:"".concat(vt,"px ").concat(vt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Y=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function L(U){var k=U!=null?U:[];return Array.isArray(k)?k:[k]}var se=function(k){var N=(0,ne.Z)((0,ne.Z)({},oe),k),V=N.id,J=N.prefixCls,H=N.steps,v=N.strokeWidth,g=N.trailWidth,F=N.gapDegree,ie=F===void 0?0:F,ue=N.gapPosition,Le=N.trailColor,Je=N.strokeLinecap,rt=N.style,dt=N.className,vt=N.strokeColor,be=N.percent,Tt=(0,pe.Z)(N,Y),tt=W/2,It=G(V),Qe="".concat(It,"-gradient"),$e=tt-v/2,ye=Math.PI*2*$e,de=ie>0?90+ie/2:-90,K=ye*((360-ie)/360),xe=(0,h.Z)(H)==="object"?H:{count:H,gap:2},Se=xe.count,$=xe.gap,P=L(be),fe=L(vt),he=fe.find(function(Te){return Te&&(0,h.Z)(Te)==="object"}),q=he&&(0,h.Z)(he)==="object",re=q?"butt":Je,le=X(ye,K,0,100,de,ie,ue,Le,re,v),Pe=Q(),Ae=function(){var He=0;return P.map(function(Ke,Ze){var _e=fe[Ze]||fe[fe.length-1],ft=X(ye,K,He,Ke,de,ie,ue,_e,re,v);return He+=Ke,te.createElement(A,{key:Ze,color:_e,ptg:Ke,radius:$e,prefixCls:J,gradientId:Qe,style:ft,strokeLinecap:re,strokeWidth:v,gapDegree:ie,ref:function(Ve){Pe[Ze]=Ve},size:W})}).reverse()},Ne=function(){var He=Math.round(Se*(P[0]/100)),Ke=100/Se,Ze=0;return new Array(Se).fill(null).map(function(_e,ft){var Xe=ft<=He-1?fe[0]:Le,Ve=Xe&&(0,h.Z)(Xe)==="object"?"url(#".concat(Qe,")"):void 0,Pt=X(ye,K,Ze,Ke,de,ie,ue,Xe,"butt",v,$);return Ze+=(K-Pt.strokeDashoffset+$)*100/K,te.createElement("circle",{key:ft,className:"".concat(J,"-circle-path"),r:$e,cx:tt,cy:tt,stroke:Ve,strokeWidth:v,opacity:1,style:Pt,ref:function(st){Pe[ft]=st}})})};return te.createElement("svg",(0,x.Z)({className:f()("".concat(J,"-circle"),dt),viewBox:"0 0 ".concat(W," ").concat(W),style:rt,id:V,role:"presentation"},Tt),!Se&&te.createElement("circle",{className:"".concat(J,"-circle-trail"),r:$e,cx:tt,cy:tt,stroke:Le,strokeLinecap:re,strokeWidth:g||v,style:le}),Se?Ne():Ae())},ae=se,Be={Line:C,Circle:ae}},738:function(fn,je,b){"use strict";b.d(je,{Z:function(){return O}});var x=b(32855),ne=b(74430),pe=b(11913),te=b(43079),M=b(92310),f=b.n(M),oe=b(18929),Q=b(10228),o=b(26112),y=b(59301);function C(D,A){var W=D.disabled,X=D.prefixCls,Y=D.character,L=D.characterRender,se=D.index,ae=D.count,Be=D.value,U=D.allowHalf,k=D.focused,N=D.onHover,V=D.onClick,J=function(Je){N(Je,se)},H=function(Je){V(Je,se)},v=function(Je){Je.keyCode===Q.Z.ENTER&&V(Je,se)},g=se+1,F=new Set([X]);Be===0&&se===0&&k?F.add("".concat(X,"-focused")):U&&Be+.5>=g&&Be<g?(F.add("".concat(X,"-half")),F.add("".concat(X,"-active")),k&&F.add("".concat(X,"-focused"))):(g<=Be?F.add("".concat(X,"-full")):F.add("".concat(X,"-zero")),g===Be&&k&&F.add("".concat(X,"-focused")));var ie=typeof Y=="function"?Y(D):Y,ue=y.createElement("li",{className:f()(Array.from(F)),ref:A},y.createElement("div",{onClick:W?null:H,onKeyDown:W?null:v,onMouseMove:W?null:J,role:"radio","aria-checked":Be>se?"true":"false","aria-posinset":se+1,"aria-setsize":ae,tabIndex:W?-1:0},y.createElement("div",{className:"".concat(X,"-first")},ie),y.createElement("div",{className:"".concat(X,"-second")},ie)));return L&&(ue=L(ue,D)),ue}var h=y.forwardRef(C);function m(){var D=y.useRef({});function A(X){return D.current[X]}function W(X){return function(Y){D.current[X]=Y}}return[A,W]}function E(D){var A=D.pageXOffset,W="scrollLeft";if(typeof A!="number"){var X=D.document;A=X.documentElement[W],typeof A!="number"&&(A=X.body[W])}return A}function S(D){var A,W,X=D.ownerDocument,Y=X.body,L=X&&X.documentElement,se=D.getBoundingClientRect();return A=se.left,W=se.top,A-=L.clientLeft||Y.clientLeft||0,W-=L.clientTop||Y.clientTop||0,{left:A,top:W}}function I(D){var A=S(D),W=D.ownerDocument,X=W.defaultView||W.parentWindow;return A.left+=E(X),A.left}var B=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function G(D,A){var W=D.prefixCls,X=W===void 0?"rc-rate":W,Y=D.className,L=D.defaultValue,se=D.value,ae=D.count,Be=ae===void 0?5:ae,U=D.allowHalf,k=U===void 0?!1:U,N=D.allowClear,V=N===void 0?!0:N,J=D.keyboard,H=J===void 0?!0:J,v=D.character,g=v===void 0?"\u2605":v,F=D.characterRender,ie=D.disabled,ue=D.direction,Le=ue===void 0?"ltr":ue,Je=D.tabIndex,rt=Je===void 0?0:Je,dt=D.autoFocus,vt=D.onHoverChange,be=D.onChange,Tt=D.onFocus,tt=D.onBlur,It=D.onKeyDown,Qe=D.onMouseLeave,$e=(0,te.Z)(D,B),ye=m(),de=(0,pe.Z)(ye,2),K=de[0],xe=de[1],Se=y.useRef(null),$=function(){if(!ie){var Z;(Z=Se.current)===null||Z===void 0||Z.focus()}};y.useImperativeHandle(A,function(){return{focus:$,blur:function(){if(!ie){var Z;(Z=Se.current)===null||Z===void 0||Z.blur()}}}});var P=(0,oe.Z)(L||0,{value:se}),fe=(0,pe.Z)(P,2),he=fe[0],q=fe[1],re=(0,oe.Z)(null),le=(0,pe.Z)(re,2),Pe=le[0],Ae=le[1],Ne=function(Z,ee){var me=Le==="rtl",ve=Z+1;if(k){var Ee=K(Z),Me=I(Ee),Ye=Ee.clientWidth;(me&&ee-Me>Ye/2||!me&&ee-Me<Ye/2)&&(ve-=.5)}return ve},Te=function(Z){q(Z),be==null||be(Z)},He=y.useState(!1),Ke=(0,pe.Z)(He,2),Ze=Ke[0],_e=Ke[1],ft=function(){_e(!0),Tt==null||Tt()},Xe=function(){_e(!1),tt==null||tt()},Ve=y.useState(null),Pt=(0,pe.Z)(Ve,2),Mt=Pt[0],st=Pt[1],Qt=function(Z,ee){var me=Ne(ee,Z.pageX);me!==Pe&&(st(me),Ae(null)),vt==null||vt(me)},pn=function(Z){ie||(st(null),Ae(null),vt==null||vt(void 0)),Z&&(Qe==null||Qe(Z))},Lt=function(Z,ee){var me=Ne(ee,Z.pageX),ve=!1;V&&(ve=me===he),pn(),Te(ve?0:me),Ae(ve?me:null)},tn=function(Z){var ee=Z.keyCode,me=Le==="rtl",ve=k?.5:1;H&&(ee===Q.Z.RIGHT&&he<Be&&!me?(Te(he+ve),Z.preventDefault()):ee===Q.Z.LEFT&&he>0&&!me||ee===Q.Z.RIGHT&&he>0&&me?(Te(he-ve),Z.preventDefault()):ee===Q.Z.LEFT&&he<Be&&me&&(Te(he+ve),Z.preventDefault())),It==null||It(Z)};y.useEffect(function(){dt&&!ie&&$()},[]);var ze=new Array(Be).fill(0).map(function(Re,Z){return y.createElement(h,{ref:xe(Z),index:Z,count:Be,disabled:ie,prefixCls:"".concat(X,"-star"),allowHalf:k,value:Mt===null?he:Mt,onClick:Lt,onHover:Qt,key:Re||Z,character:g,characterRender:F,focused:Ze})}),ke=f()(X,Y,(0,ne.Z)((0,ne.Z)({},"".concat(X,"-disabled"),ie),"".concat(X,"-rtl"),Le==="rtl"));return y.createElement("ul",(0,x.Z)({className:ke,onMouseLeave:pn,tabIndex:ie?-1:rt,onFocus:ie?null:ft,onBlur:ie?null:Xe,onKeyDown:ie?null:tn,ref:Se},(0,o.Z)($e,{aria:!0,data:!0,attr:!0})),ze)}var R=y.forwardRef(G),O=R},29301:function(fn,je,b){"use strict";b.d(je,{Z:function(){return U}});var x=b(32855),ne=b(59301),pe=b(11592),te=b(48736),M=b(27247),f=b(34666),oe=b(76846),Q=b(8654),o=ne.createContext(null);function y(k){var N=k.children,V=k.onBatchResize,J=ne.useRef(0),H=ne.useRef([]),v=ne.useContext(o),g=ne.useCallback(function(F,ie,ue){J.current+=1;var Le=J.current;H.current.push({size:F,element:ie,data:ue}),Promise.resolve().then(function(){Le===J.current&&(V==null||V(H.current),H.current=[])}),v==null||v(F,ie,ue)},[V,v]);return ne.createElement(o.Provider,{value:g},N)}var C=b(76374),h=new Map;function m(k){k.forEach(function(N){var V,J=N.target;(V=h.get(J))===null||V===void 0||V.forEach(function(H){return H(J)})})}var E=new C.Z(m),S=null,I=null;function B(k,N){h.has(k)||(h.set(k,new Set),E.observe(k)),h.get(k).add(N)}function G(k,N){h.has(k)&&(h.get(k).delete(N),h.get(k).size||(E.unobserve(k),h.delete(k)))}var R=b(33377),O=b(93912),D=b(18881),A=b(85461),W=function(k){(0,D.Z)(V,k);var N=(0,A.Z)(V);function V(){return(0,R.Z)(this,V),N.apply(this,arguments)}return(0,O.Z)(V,[{key:"render",value:function(){return this.props.children}}]),V}(ne.Component);function X(k,N){var V=k.children,J=k.disabled,H=ne.useRef(null),v=ne.useRef(null),g=ne.useContext(o),F=typeof V=="function",ie=F?V(H):V,ue=ne.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Le=!F&&ne.isValidElement(ie)&&(0,Q.Yr)(ie),Je=Le?(0,Q.C4)(ie):null,rt=(0,Q.x1)(Je,H),dt=function(){var tt;return(0,oe.ZP)(H.current)||(H.current&&(0,f.Z)(H.current)==="object"?(0,oe.ZP)((tt=H.current)===null||tt===void 0?void 0:tt.nativeElement):null)||(0,oe.ZP)(v.current)};ne.useImperativeHandle(N,function(){return dt()});var vt=ne.useRef(k);vt.current=k;var be=ne.useCallback(function(Tt){var tt=vt.current,It=tt.onResize,Qe=tt.data,$e=Tt.getBoundingClientRect(),ye=$e.width,de=$e.height,K=Tt.offsetWidth,xe=Tt.offsetHeight,Se=Math.floor(ye),$=Math.floor(de);if(ue.current.width!==Se||ue.current.height!==$||ue.current.offsetWidth!==K||ue.current.offsetHeight!==xe){var P={width:Se,height:$,offsetWidth:K,offsetHeight:xe};ue.current=P;var fe=K===Math.round(ye)?ye:K,he=xe===Math.round(de)?de:xe,q=(0,M.Z)((0,M.Z)({},P),{},{offsetWidth:fe,offsetHeight:he});g==null||g(q,Tt,Qe),It&&Promise.resolve().then(function(){It(q,Tt)})}},[]);return ne.useEffect(function(){var Tt=dt();return Tt&&!J&&B(Tt,be),function(){return G(Tt,be)}},[H.current,J]),ne.createElement(W,{ref:v},Le?ne.cloneElement(ie,{ref:rt}):ie)}var Y=ne.forwardRef(X),L=Y,se="rc-observer-key";function ae(k,N){var V=k.children,J=typeof V=="function"?[V]:(0,pe.Z)(V);return J.map(function(H,v){var g=(H==null?void 0:H.key)||"".concat(se,"-").concat(v);return ne.createElement(L,(0,x.Z)({},k,{key:g,ref:v===0?N:void 0}),H)})}var Be=ne.forwardRef(ae);Be.Collection=y;var U=Be},6551:function(fn,je,b){"use strict";b.d(je,{ZP:function(){return oe}});var x=b(11913),ne=b(59301),pe=b(47273),te=0,M=(0,pe.Z)();function f(){var Q;return M?(Q=te,te+=1):Q="TEST_OR_SSR",Q}function oe(Q){var o=ne.useState(),y=(0,x.Z)(o,2),C=y[0],h=y[1];return ne.useEffect(function(){h("rc_select_".concat(f()))},[]),Q||C}},37463:function(fn,je,b){"use strict";b.d(je,{Ac:function(){return _e},Xo:function(){return Xe},Wx:function(){return Pt},ZP:function(){return Nn},lk:function(){return O}});var x=b(32855),ne=b(3300),pe=b(74430),te=b(27247),M=b(11913),f=b(43079),oe=b(34666),Q=b(18929),o=b(48736),y=b(59301),C=b(92310),h=b.n(C),m=b(34280),E=b(49658),S=b(8654),I=function(Ie){var Kt=Ie.className,xt=Ie.customizeIcon,Zt=Ie.customizeIconProps,Ht=Ie.children,yt=Ie.onMouseDown,Rt=Ie.onClick,sn=typeof xt=="function"?xt(Zt):xt;return y.createElement("span",{className:Kt,onMouseDown:function(Gt){Gt.preventDefault(),yt==null||yt(Gt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Rt,"aria-hidden":!0},sn!==void 0?sn:y.createElement("span",{className:h()(Kt.split(/\s+/).map(function(Ut){return"".concat(Ut,"-icon")}))},Ht))},B=I,G=function(Ie,Kt,xt,Zt,Ht){var yt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Rt=arguments.length>6?arguments[6]:void 0,sn=arguments.length>7?arguments[7]:void 0,Ut=y.useMemo(function(){if((0,oe.Z)(Zt)==="object")return Zt.clearIcon;if(Ht)return Ht},[Zt,Ht]),Gt=y.useMemo(function(){return!!(!yt&&Zt&&(xt.length||Rt)&&!(sn==="combobox"&&Rt===""))},[Zt,yt,xt.length,Rt,sn]);return{allowClear:Gt,clearIcon:y.createElement(B,{className:"".concat(Ie,"-clear"),onMouseDown:Kt,customizeIcon:Ut},"\xD7")}},R=y.createContext(null);function O(){return y.useContext(R)}function D(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ie=y.useState(!1),Kt=(0,M.Z)(Ie,2),xt=Kt[0],Zt=Kt[1],Ht=y.useRef(null),yt=function(){window.clearTimeout(Ht.current)};y.useEffect(function(){return yt},[]);var Rt=function(Ut,Gt){yt(),Ht.current=window.setTimeout(function(){Zt(Ut),Gt&&Gt()},Fe)};return[xt,Rt,yt]}function A(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ie=y.useRef(null),Kt=y.useRef(null);y.useEffect(function(){return function(){window.clearTimeout(Kt.current)}},[]);function xt(Zt){(Zt||Ie.current===null)&&(Ie.current=Zt),window.clearTimeout(Kt.current),Kt.current=window.setTimeout(function(){Ie.current=null},Fe)}return[function(){return Ie.current},xt]}function W(Fe,Ie,Kt,xt){var Zt=y.useRef(null);Zt.current={open:Ie,triggerOpen:Kt,customizedTrigger:xt},y.useEffect(function(){function Ht(yt){var Rt;if(!((Rt=Zt.current)!==null&&Rt!==void 0&&Rt.customizedTrigger)){var sn=yt.target;sn.shadowRoot&&yt.composed&&(sn=yt.composedPath()[0]||sn),Zt.current.open&&Fe().filter(function(Ut){return Ut}).every(function(Ut){return!Ut.contains(sn)&&Ut!==sn})&&Zt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Ht),function(){return window.removeEventListener("mousedown",Ht)}},[])}var X=b(10228);function Y(Fe){return Fe&&![X.Z.ESC,X.Z.SHIFT,X.Z.BACKSPACE,X.Z.TAB,X.Z.WIN_KEY,X.Z.ALT,X.Z.META,X.Z.WIN_KEY_RIGHT,X.Z.CTRL,X.Z.SEMICOLON,X.Z.EQUALS,X.Z.CAPS_LOCK,X.Z.CONTEXT_MENU,X.Z.F1,X.Z.F2,X.Z.F3,X.Z.F4,X.Z.F5,X.Z.F6,X.Z.F7,X.Z.F8,X.Z.F9,X.Z.F10,X.Z.F11,X.Z.F12].includes(Fe)}var L=b(26112),se=b(11780);function ae(Fe,Ie,Kt){var xt=(0,te.Z)((0,te.Z)({},Fe),Kt?Ie:{});return Object.keys(Ie).forEach(function(Zt){var Ht=Ie[Zt];typeof Ht=="function"&&(xt[Zt]=function(){for(var yt,Rt=arguments.length,sn=new Array(Rt),Ut=0;Ut<Rt;Ut++)sn[Ut]=arguments[Ut];return Ht.apply(void 0,sn),(yt=Fe[Zt])===null||yt===void 0?void 0:yt.call.apply(yt,[Fe].concat(sn))})}),xt}var Be=ae,U=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],k=function(Ie,Kt){var xt=Ie.prefixCls,Zt=Ie.id,Ht=Ie.inputElement,yt=Ie.autoFocus,Rt=Ie.autoComplete,sn=Ie.editable,Ut=Ie.activeDescendantId,Gt=Ie.value,Vt=Ie.open,rn=Ie.attrs,Ft=(0,f.Z)(Ie,U),De=Ht||y.createElement("input",null),Ce=De,ct=Ce.ref,at=Ce.props;return(0,o.Kp)(!("maxLength"in De.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),De=y.cloneElement(De,(0,te.Z)((0,te.Z)((0,te.Z)({type:"search"},Be(Ft,at,!0)),{},{id:Zt,ref:(0,S.sQ)(Kt,ct),autoComplete:Rt||"off",autoFocus:yt,className:h()("".concat(xt,"-selection-search-input"),at==null?void 0:at.className),role:"combobox","aria-expanded":Vt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Zt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Zt,"_list"),"aria-activedescendant":Vt?Ut:void 0},rn),{},{value:sn?Gt:"",readOnly:!sn,unselectable:sn?null:"on",style:(0,te.Z)((0,te.Z)({},at.style),{},{opacity:sn?null:0})})),De},N=y.forwardRef(k),V=N;function J(Fe){return Array.isArray(Fe)?Fe:Fe!==void 0?[Fe]:[]}var H=typeof window!="undefined"&&window.document&&window.document.documentElement,v=H;function g(Fe){return Fe!=null}function F(Fe){return!Fe&&Fe!==0}function ie(Fe){return["string","number"].includes((0,oe.Z)(Fe))}function ue(Fe){var Ie=void 0;return Fe&&(ie(Fe.title)?Ie=Fe.title.toString():ie(Fe.label)&&(Ie=Fe.label.toString())),Ie}function Le(Fe,Ie){v?y.useLayoutEffect(Fe,Ie):y.useEffect(Fe,Ie)}function Je(Fe){var Ie;return(Ie=Fe.key)!==null&&Ie!==void 0?Ie:Fe.value}var rt=function(Ie){Ie.preventDefault(),Ie.stopPropagation()},dt=function(Ie){var Kt=Ie.id,xt=Ie.prefixCls,Zt=Ie.values,Ht=Ie.open,yt=Ie.searchValue,Rt=Ie.autoClearSearchValue,sn=Ie.inputRef,Ut=Ie.placeholder,Gt=Ie.disabled,Vt=Ie.mode,rn=Ie.showSearch,Ft=Ie.autoFocus,De=Ie.autoComplete,Ce=Ie.activeDescendantId,ct=Ie.tabIndex,at=Ie.removeIcon,Ot=Ie.maxTagCount,Wt=Ie.maxTagTextLength,jt=Ie.maxTagPlaceholder,on=jt===void 0?function(ut){return"+ ".concat(ut.length," ...")}:jt,_n=Ie.tagRender,un=Ie.onToggleOpen,Wn=Ie.onRemove,An=Ie.onInputChange,wn=Ie.onInputPaste,Mn=Ie.onInputKeyDown,Ln=Ie.onInputMouseDown,jn=Ie.onInputCompositionStart,Tn=Ie.onInputCompositionEnd,Rn=Ie.onInputBlur,an=y.useRef(null),hn=(0,y.useState)(0),En=(0,M.Z)(hn,2),Yn=En[0],kn=En[1],$n=(0,y.useState)(!1),Ar=(0,M.Z)($n,2),ge=Ar[0],We=Ar[1],Ue="".concat(xt,"-selection"),et=Ht||Vt==="multiple"&&Rt===!1||Vt==="tags"?yt:"",ot=Vt==="tags"||Vt==="multiple"&&Rt===!1||rn&&(Ht||ge);Le(function(){kn(an.current.scrollWidth)},[et]);var lt=function(mt,St,Yt,vn,cn){return y.createElement("span",{title:ue(mt),className:h()("".concat(Ue,"-item"),(0,pe.Z)({},"".concat(Ue,"-item-disabled"),Yt))},y.createElement("span",{className:"".concat(Ue,"-item-content")},St),vn&&y.createElement(B,{className:"".concat(Ue,"-item-remove"),onMouseDown:rt,onClick:cn,customizeIcon:at},"\xD7"))},Bt=function(mt,St,Yt,vn,cn,Dn){var Vn=function(qn){rt(qn),un(!Ht)};return y.createElement("span",{onMouseDown:Vn},_n({label:St,value:mt,disabled:Yt,closable:vn,onClose:cn,isMaxTag:!!Dn}))},Ct=function(mt){var St=mt.disabled,Yt=mt.label,vn=mt.value,cn=!Gt&&!St,Dn=Yt;if(typeof Wt=="number"&&(typeof Yt=="string"||typeof Yt=="number")){var Vn=String(Dn);Vn.length>Wt&&(Dn="".concat(Vn.slice(0,Wt),"..."))}var Pn=function(xn){xn&&xn.stopPropagation(),Wn(mt)};return typeof _n=="function"?Bt(vn,Dn,St,cn,Pn):lt(mt,Dn,St,cn,Pn)},gt=function(mt){if(!Zt.length)return null;var St=typeof on=="function"?on(mt):on;return typeof _n=="function"?Bt(void 0,St,!1,!1,void 0,!0):lt({title:St},St,!1)},Ge=y.createElement("div",{className:"".concat(Ue,"-search"),style:{width:Yn},onFocus:function(){We(!0)},onBlur:function(){We(!1)}},y.createElement(V,{ref:sn,open:Ht,prefixCls:xt,id:Kt,inputElement:null,disabled:Gt,autoFocus:Ft,autoComplete:De,editable:ot,activeDescendantId:Ce,value:et,onKeyDown:Mn,onMouseDown:Ln,onChange:An,onPaste:wn,onCompositionStart:jn,onCompositionEnd:Tn,onBlur:Rn,tabIndex:ct,attrs:(0,L.Z)(Ie,!0)}),y.createElement("span",{ref:an,className:"".concat(Ue,"-search-mirror"),"aria-hidden":!0},et,"\xA0")),qe=y.createElement(se.Z,{prefixCls:"".concat(Ue,"-overflow"),data:Zt,renderItem:Ct,renderRest:gt,suffix:Ge,itemKey:Je,maxCount:Ot});return y.createElement("span",{className:"".concat(Ue,"-wrap")},qe,!Zt.length&&!et&&y.createElement("span",{className:"".concat(Ue,"-placeholder")},Ut))},vt=dt,be=function(Ie){var Kt=Ie.inputElement,xt=Ie.prefixCls,Zt=Ie.id,Ht=Ie.inputRef,yt=Ie.disabled,Rt=Ie.autoFocus,sn=Ie.autoComplete,Ut=Ie.activeDescendantId,Gt=Ie.mode,Vt=Ie.open,rn=Ie.values,Ft=Ie.placeholder,De=Ie.tabIndex,Ce=Ie.showSearch,ct=Ie.searchValue,at=Ie.activeValue,Ot=Ie.maxLength,Wt=Ie.onInputKeyDown,jt=Ie.onInputMouseDown,on=Ie.onInputChange,_n=Ie.onInputPaste,un=Ie.onInputCompositionStart,Wn=Ie.onInputCompositionEnd,An=Ie.onInputBlur,wn=Ie.title,Mn=y.useState(!1),Ln=(0,M.Z)(Mn,2),jn=Ln[0],Tn=Ln[1],Rn=Gt==="combobox",an=Rn||Ce,hn=rn[0],En=ct||"";Rn&&at&&!jn&&(En=at),y.useEffect(function(){Rn&&Tn(!1)},[Rn,at]);var Yn=Gt!=="combobox"&&!Vt&&!Ce?!1:!!En,kn=wn===void 0?ue(hn):wn,$n=y.useMemo(function(){return hn?null:y.createElement("span",{className:"".concat(xt,"-selection-placeholder"),style:Yn?{visibility:"hidden"}:void 0},Ft)},[hn,Yn,Ft,xt]);return y.createElement("span",{className:"".concat(xt,"-selection-wrap")},y.createElement("span",{className:"".concat(xt,"-selection-search")},y.createElement(V,{ref:Ht,prefixCls:xt,id:Zt,open:Vt,inputElement:Kt,disabled:yt,autoFocus:Rt,autoComplete:sn,editable:an,activeDescendantId:Ut,value:En,onKeyDown:Wt,onMouseDown:jt,onChange:function(ge){Tn(!0),on(ge)},onPaste:_n,onCompositionStart:un,onCompositionEnd:Wn,onBlur:An,tabIndex:De,attrs:(0,L.Z)(Ie,!0),maxLength:Rn?Ot:void 0})),!Rn&&hn?y.createElement("span",{className:"".concat(xt,"-selection-item"),title:kn,style:Yn?{visibility:"hidden"}:void 0},hn.label):null,$n)},Tt=be,tt=function(Ie,Kt){var xt=(0,y.useRef)(null),Zt=(0,y.useRef)(!1),Ht=Ie.prefixCls,yt=Ie.open,Rt=Ie.mode,sn=Ie.showSearch,Ut=Ie.tokenWithEnter,Gt=Ie.disabled,Vt=Ie.prefix,rn=Ie.autoClearSearchValue,Ft=Ie.onSearch,De=Ie.onSearchSubmit,Ce=Ie.onToggleOpen,ct=Ie.onInputKeyDown,at=Ie.onInputBlur,Ot=Ie.domRef;y.useImperativeHandle(Kt,function(){return{focus:function(kn){xt.current.focus(kn)},blur:function(){xt.current.blur()}}});var Wt=A(0),jt=(0,M.Z)(Wt,2),on=jt[0],_n=jt[1],un=function(kn){var $n=kn.which,Ar=xt.current instanceof HTMLTextAreaElement;!Ar&&yt&&($n===X.Z.UP||$n===X.Z.DOWN)&&kn.preventDefault(),ct&&ct(kn),$n===X.Z.ENTER&&Rt==="tags"&&!Zt.current&&!yt&&(De==null||De(kn.target.value)),!(Ar&&!yt&&~[X.Z.UP,X.Z.DOWN,X.Z.LEFT,X.Z.RIGHT].indexOf($n))&&Y($n)&&Ce(!0)},Wn=function(){_n(!0)},An=(0,y.useRef)(null),wn=function(kn){Ft(kn,!0,Zt.current)!==!1&&Ce(!0)},Mn=function(){Zt.current=!0},Ln=function(kn){Zt.current=!1,Rt!=="combobox"&&wn(kn.target.value)},jn=function(kn){var $n=kn.target.value;if(Ut&&An.current&&/[\r\n]/.test(An.current)){var Ar=An.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");$n=$n.replace(Ar,An.current)}An.current=null,wn($n)},Tn=function(kn){var $n=kn.clipboardData,Ar=$n==null?void 0:$n.getData("text");An.current=Ar||""},Rn=function(kn){var $n=kn.target;if($n!==xt.current){var Ar=document.body.style.msTouchAction!==void 0;Ar?setTimeout(function(){xt.current.focus()}):xt.current.focus()}},an=function(kn){var $n=on();kn.target!==xt.current&&!$n&&!(Rt==="combobox"&&Gt)&&kn.preventDefault(),(Rt!=="combobox"&&(!sn||!$n)||!yt)&&(yt&&rn!==!1&&Ft("",!0,!1),Ce())},hn={inputRef:xt,onInputKeyDown:un,onInputMouseDown:Wn,onInputChange:jn,onInputPaste:Tn,onInputCompositionStart:Mn,onInputCompositionEnd:Ln,onInputBlur:at},En=Rt==="multiple"||Rt==="tags"?y.createElement(vt,(0,x.Z)({},Ie,hn)):y.createElement(Tt,(0,x.Z)({},Ie,hn));return y.createElement("div",{ref:Ot,className:"".concat(Ht,"-selector"),onClick:Rn,onMouseDown:an},Vt&&y.createElement("div",{className:"".concat(Ht,"-prefix")},Vt),En)},It=y.forwardRef(tt),Qe=It,$e=b(65030),ye=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],de=function(Ie){var Kt=Ie===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Kt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Kt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Kt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Kt,adjustY:1},htmlRegion:"scroll"}}},K=function(Ie,Kt){var xt=Ie.prefixCls,Zt=Ie.disabled,Ht=Ie.visible,yt=Ie.children,Rt=Ie.popupElement,sn=Ie.animation,Ut=Ie.transitionName,Gt=Ie.dropdownStyle,Vt=Ie.dropdownClassName,rn=Ie.direction,Ft=rn===void 0?"ltr":rn,De=Ie.placement,Ce=Ie.builtinPlacements,ct=Ie.dropdownMatchSelectWidth,at=Ie.dropdownRender,Ot=Ie.dropdownAlign,Wt=Ie.getPopupContainer,jt=Ie.empty,on=Ie.getTriggerDOMNode,_n=Ie.onPopupVisibleChange,un=Ie.onPopupMouseEnter,Wn=(0,f.Z)(Ie,ye),An="".concat(xt,"-dropdown"),wn=Rt;at&&(wn=at(Rt));var Mn=y.useMemo(function(){return Ce||de(ct)},[Ce,ct]),Ln=sn?"".concat(An,"-").concat(sn):Ut,jn=typeof ct=="number",Tn=y.useMemo(function(){return jn?null:ct===!1?"minWidth":"width"},[ct,jn]),Rn=Gt;jn&&(Rn=(0,te.Z)((0,te.Z)({},Rn),{},{width:ct}));var an=y.useRef(null);return y.useImperativeHandle(Kt,function(){return{getPopupElement:function(){var En;return(En=an.current)===null||En===void 0?void 0:En.popupElement}}}),y.createElement($e.Z,(0,x.Z)({},Wn,{showAction:_n?["click"]:[],hideAction:_n?["click"]:[],popupPlacement:De||(Ft==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Mn,prefixCls:An,popupTransitionName:Ln,popup:y.createElement("div",{onMouseEnter:un},wn),ref:an,stretch:Tn,popupAlign:Ot,popupVisible:Ht,getPopupContainer:Wt,popupClassName:h()(Vt,(0,pe.Z)({},"".concat(An,"-empty"),jt)),popupStyle:Rn,getTriggerDOMNode:on,onPopupVisibleChange:_n}),yt)},xe=y.forwardRef(K),Se=xe,$=b(40954);function P(Fe,Ie){var Kt=Fe.key,xt;return"value"in Fe&&(xt=Fe.value),Kt!=null?Kt:xt!==void 0?xt:"rc-index-key-".concat(Ie)}function fe(Fe){return typeof Fe!="undefined"&&!Number.isNaN(Fe)}function he(Fe,Ie){var Kt=Fe||{},xt=Kt.label,Zt=Kt.value,Ht=Kt.options,yt=Kt.groupLabel,Rt=xt||(Ie?"children":"label");return{label:Rt,value:Zt||"value",options:Ht||"options",groupLabel:yt||Rt}}function q(Fe){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Kt=Ie.fieldNames,xt=Ie.childrenAsData,Zt=[],Ht=he(Kt,!1),yt=Ht.label,Rt=Ht.value,sn=Ht.options,Ut=Ht.groupLabel;function Gt(Vt,rn){Array.isArray(Vt)&&Vt.forEach(function(Ft){if(rn||!(sn in Ft)){var De=Ft[Rt];Zt.push({key:P(Ft,Zt.length),groupOption:rn,data:Ft,label:Ft[yt],value:De})}else{var Ce=Ft[Ut];Ce===void 0&&xt&&(Ce=Ft.label),Zt.push({key:P(Ft,Zt.length),group:!0,data:Ft,label:Ce}),Gt(Ft[sn],!0)}})}return Gt(Fe,!1),Zt}function re(Fe){var Ie=(0,te.Z)({},Fe);return"props"in Ie||Object.defineProperty(Ie,"props",{get:function(){return(0,o.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ie}}),Ie}var le=function(Ie,Kt,xt){if(!Kt||!Kt.length)return null;var Zt=!1,Ht=function Rt(sn,Ut){var Gt=(0,$.Z)(Ut),Vt=Gt[0],rn=Gt.slice(1);if(!Vt)return[sn];var Ft=sn.split(Vt);return Zt=Zt||Ft.length>1,Ft.reduce(function(De,Ce){return[].concat((0,ne.Z)(De),(0,ne.Z)(Rt(Ce,rn)))},[]).filter(Boolean)},yt=Ht(Ie,Kt);return Zt?typeof xt!="undefined"?yt.slice(0,xt):yt:null},Pe=y.createContext(null),Ae=Pe;function Ne(Fe){var Ie=Fe.visible,Kt=Fe.values;if(!Ie)return null;var xt=50;return y.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Kt.slice(0,xt).map(function(Zt){var Ht=Zt.label,yt=Zt.value;return["number","string"].includes((0,oe.Z)(Ht))?Ht:yt}).join(", ")),Kt.length>xt?", ...":null)}var Te=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],He=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Ke=function(Ie){return Ie==="tags"||Ie==="multiple"},Ze=y.forwardRef(function(Fe,Ie){var Kt,xt=Fe.id,Zt=Fe.prefixCls,Ht=Fe.className,yt=Fe.showSearch,Rt=Fe.tagRender,sn=Fe.direction,Ut=Fe.omitDomProps,Gt=Fe.displayValues,Vt=Fe.onDisplayValuesChange,rn=Fe.emptyOptions,Ft=Fe.notFoundContent,De=Ft===void 0?"Not Found":Ft,Ce=Fe.onClear,ct=Fe.mode,at=Fe.disabled,Ot=Fe.loading,Wt=Fe.getInputElement,jt=Fe.getRawInputElement,on=Fe.open,_n=Fe.defaultOpen,un=Fe.onDropdownVisibleChange,Wn=Fe.activeValue,An=Fe.onActiveValueChange,wn=Fe.activeDescendantId,Mn=Fe.searchValue,Ln=Fe.autoClearSearchValue,jn=Fe.onSearch,Tn=Fe.onSearchSplit,Rn=Fe.tokenSeparators,an=Fe.allowClear,hn=Fe.prefix,En=Fe.suffixIcon,Yn=Fe.clearIcon,kn=Fe.OptionList,$n=Fe.animation,Ar=Fe.transitionName,ge=Fe.dropdownStyle,We=Fe.dropdownClassName,Ue=Fe.dropdownMatchSelectWidth,et=Fe.dropdownRender,ot=Fe.dropdownAlign,lt=Fe.placement,Bt=Fe.builtinPlacements,Ct=Fe.getPopupContainer,gt=Fe.showAction,Ge=gt===void 0?[]:gt,qe=Fe.onFocus,ut=Fe.onBlur,mt=Fe.onKeyUp,St=Fe.onKeyDown,Yt=Fe.onMouseDown,vn=(0,f.Z)(Fe,Te),cn=Ke(ct),Dn=(yt!==void 0?yt:cn)||ct==="combobox",Vn=(0,te.Z)({},vn);He.forEach(function(Tr){delete Vn[Tr]}),Ut==null||Ut.forEach(function(Tr){delete Vn[Tr]});var Pn=y.useState(!1),qn=(0,M.Z)(Pn,2),xn=qn[0],mr=qn[1];y.useEffect(function(){mr((0,E.Z)())},[]);var Jn=y.useRef(null),dr=y.useRef(null),Qn=y.useRef(null),tr=y.useRef(null),gr=y.useRef(null),dn=y.useRef(!1),fr=D(),Hn=(0,M.Z)(fr,3),bn=Hn[0],On=Hn[1],nr=Hn[2];y.useImperativeHandle(Ie,function(){var Tr,xr;return{focus:(Tr=tr.current)===null||Tr===void 0?void 0:Tr.focus,blur:(xr=tr.current)===null||xr===void 0?void 0:xr.blur,scrollTo:function(Hr){var Gr;return(Gr=gr.current)===null||Gr===void 0?void 0:Gr.scrollTo(Hr)},nativeElement:Jn.current||dr.current}});var hr=y.useMemo(function(){var Tr;if(ct!=="combobox")return Mn;var xr=(Tr=Gt[0])===null||Tr===void 0?void 0:Tr.value;return typeof xr=="string"||typeof xr=="number"?String(xr):""},[Mn,ct,Gt]),lr=ct==="combobox"&&typeof Wt=="function"&&Wt()||null,In=typeof jt=="function"&&jt(),Pr=(0,S.x1)(dr,In==null||(Kt=In.props)===null||Kt===void 0?void 0:Kt.ref),zr=y.useState(!1),Kr=(0,M.Z)(zr,2),ei=Kr[0],Jr=Kr[1];(0,m.Z)(function(){Jr(!0)},[]);var Vr=(0,Q.Z)(!1,{defaultValue:_n,value:on}),_r=(0,M.Z)(Vr,2),wr=_r[0],Nr=_r[1],Er=ei?wr:!1,yr=!De&&rn;(at||yr&&Er&&ct==="combobox")&&(Er=!1);var br=yr?!1:Er,Cn=y.useCallback(function(Tr){var xr=Tr!==void 0?Tr:!Er;at||(Nr(xr),Er!==xr&&(un==null||un(xr)))},[at,Er,Nr,un]),rr=y.useMemo(function(){return(Rn||[]).some(function(Tr){return[`
`,`\r
`].includes(Tr)})},[Rn]),ir=y.useContext(Ae)||{},sr=ir.maxCount,er=ir.rawValues,vr=function(xr,Qr,Hr){if(!(cn&&fe(sr)&&(er==null?void 0:er.size)>=sr)){var Gr=!0,jr=xr;An==null||An(null);var mi=le(xr,Rn,fe(sr)?sr-er.size:void 0),gi=Hr?null:mi;return ct!=="combobox"&&gi&&(jr="",Tn==null||Tn(gi),Cn(!1),Gr=!1),jn&&hr!==jr&&jn(jr,{source:Qr?"typing":"effect"}),Gr}},Wr=function(xr){!xr||!xr.trim()||jn(xr,{source:"submit"})};y.useEffect(function(){!Er&&!cn&&ct!=="combobox"&&vr("",!1,!1)},[Er]),y.useEffect(function(){wr&&at&&Nr(!1),at&&!dn.current&&On(!1)},[at]);var Sn=A(),zn=(0,M.Z)(Sn,2),Gn=zn[0],Dr=zn[1],Rr=y.useRef(!1),Br=function(xr){var Qr=Gn(),Hr=xr.key,Gr=Hr==="Enter";if(Gr&&(ct!=="combobox"&&xr.preventDefault(),Er||Cn(!0)),Dr(!!hr),Hr==="Backspace"&&!Qr&&cn&&!hr&&Gt.length){for(var jr=(0,ne.Z)(Gt),mi=null,gi=jr.length-1;gi>=0;gi-=1){var wi=jr[gi];if(!wi.disabled){jr.splice(gi,1),mi=wi;break}}mi&&Vt(jr,{type:"remove",values:[mi]})}for(var qr=arguments.length,di=new Array(qr>1?qr-1:0),Ti=1;Ti<qr;Ti++)di[Ti-1]=arguments[Ti];if(Er&&(!Gr||!Rr.current)){var Di;Gr&&(Rr.current=!0),(Di=gr.current)===null||Di===void 0||Di.onKeyDown.apply(Di,[xr].concat(di))}St==null||St.apply(void 0,[xr].concat(di))},oi=function(xr){for(var Qr=arguments.length,Hr=new Array(Qr>1?Qr-1:0),Gr=1;Gr<Qr;Gr++)Hr[Gr-1]=arguments[Gr];if(Er){var jr;(jr=gr.current)===null||jr===void 0||jr.onKeyUp.apply(jr,[xr].concat(Hr))}xr.key==="Enter"&&(Rr.current=!1),mt==null||mt.apply(void 0,[xr].concat(Hr))},ni=function(xr){var Qr=Gt.filter(function(Hr){return Hr!==xr});Vt(Qr,{type:"remove",values:[xr]})},Xr=function(){Rr.current=!1},$r=y.useRef(!1),Ji=function(){On(!0),at||(qe&&!$r.current&&qe.apply(void 0,arguments),Ge.includes("focus")&&Cn(!0)),$r.current=!0},qi=function(){dn.current=!0,On(!1,function(){$r.current=!1,dn.current=!1,Cn(!1)}),!at&&(hr&&(ct==="tags"?jn(hr,{source:"submit"}):ct==="multiple"&&jn("",{source:"blur"})),ut&&ut.apply(void 0,arguments))},Ri=[];y.useEffect(function(){return function(){Ri.forEach(function(Tr){return clearTimeout(Tr)}),Ri.splice(0,Ri.length)}},[]);var Oi=function(xr){var Qr,Hr=xr.target,Gr=(Qr=Qn.current)===null||Qr===void 0?void 0:Qr.getPopupElement();if(Gr&&Gr.contains(Hr)){var jr=setTimeout(function(){var qr=Ri.indexOf(jr);if(qr!==-1&&Ri.splice(qr,1),nr(),!xn&&!Gr.contains(document.activeElement)){var di;(di=tr.current)===null||di===void 0||di.focus()}});Ri.push(jr)}for(var mi=arguments.length,gi=new Array(mi>1?mi-1:0),wi=1;wi<mi;wi++)gi[wi-1]=arguments[wi];Yt==null||Yt.apply(void 0,[xr].concat(gi))},$i=y.useState({}),ui=(0,M.Z)($i,2),Hi=ui[1];function Si(){Hi({})}var Gi;In&&(Gi=function(xr){Cn(xr)}),W(function(){var Tr;return[Jn.current,(Tr=Qn.current)===null||Tr===void 0?void 0:Tr.getPopupElement()]},br,Cn,!!In);var Ii=y.useMemo(function(){return(0,te.Z)((0,te.Z)({},Fe),{},{notFoundContent:De,open:Er,triggerOpen:br,id:xt,showSearch:Dn,multiple:cn,toggleOpen:Cn})},[Fe,De,br,Er,xt,Dn,cn,Cn]),es=!!En||Ot,Fi;es&&(Fi=y.createElement(B,{className:h()("".concat(Zt,"-arrow"),(0,pe.Z)({},"".concat(Zt,"-arrow-loading"),Ot)),customizeIcon:En,customizeIconProps:{loading:Ot,searchValue:hr,open:Er,focused:bn,showSearch:Dn}}));var vs=function(){var xr;Ce==null||Ce(),(xr=tr.current)===null||xr===void 0||xr.focus(),Vt([],{type:"clear",values:Gt}),vr("",!1,!1)},Ni=G(Zt,vs,Gt,an,Yn,at,hr,ct),fs=Ni.allowClear,ts=Ni.clearIcon,_i=y.createElement(kn,{ref:gr}),Mi=h()(Zt,Ht,(0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)({},"".concat(Zt,"-focused"),bn),"".concat(Zt,"-multiple"),cn),"".concat(Zt,"-single"),!cn),"".concat(Zt,"-allow-clear"),an),"".concat(Zt,"-show-arrow"),es),"".concat(Zt,"-disabled"),at),"".concat(Zt,"-loading"),Ot),"".concat(Zt,"-open"),Er),"".concat(Zt,"-customize-input"),lr),"".concat(Zt,"-show-search"),Dn)),ii=y.createElement(Se,{ref:Qn,disabled:at,prefixCls:Zt,visible:br,popupElement:_i,animation:$n,transitionName:Ar,dropdownStyle:ge,dropdownClassName:We,direction:sn,dropdownMatchSelectWidth:Ue,dropdownRender:et,dropdownAlign:ot,placement:lt,builtinPlacements:Bt,getPopupContainer:Ct,empty:rn,getTriggerDOMNode:function(xr){return dr.current||xr},onPopupVisibleChange:Gi,onPopupMouseEnter:Si},In?y.cloneElement(In,{ref:Pr}):y.createElement(Qe,(0,x.Z)({},Fe,{domRef:dr,prefixCls:Zt,inputElement:lr,ref:tr,id:xt,prefix:hn,showSearch:Dn,autoClearSearchValue:Ln,mode:ct,activeDescendantId:wn,tagRender:Rt,values:Gt,open:Er,onToggleOpen:Cn,activeValue:Wn,searchValue:hr,onSearch:vr,onSearchSubmit:Wr,onRemove:ni,tokenWithEnter:rr,onInputBlur:Xr}))),ti;return In?ti=ii:ti=y.createElement("div",(0,x.Z)({className:Mi},Vn,{ref:Jn,onMouseDown:Oi,onKeyDown:Br,onKeyUp:oi,onFocus:Ji,onBlur:qi}),y.createElement(Ne,{visible:bn&&!Er,values:Gt}),ii,Fi,fs&&ts),y.createElement(R.Provider,{value:Ii},ti)}),_e=Ze,ft=function(){return null};ft.isSelectOptGroup=!0;var Xe=ft,Ve=function(){return null};Ve.isSelectOption=!0;var Pt=Ve,Mt=b(80547),st=b(2738),Qt=b(6790);function pn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Lt=["disabled","title","children","style","className"];function tn(Fe){return typeof Fe=="string"||typeof Fe=="number"}var ze=function(Ie,Kt){var xt=O(),Zt=xt.prefixCls,Ht=xt.id,yt=xt.open,Rt=xt.multiple,sn=xt.mode,Ut=xt.searchValue,Gt=xt.toggleOpen,Vt=xt.notFoundContent,rn=xt.onPopupScroll,Ft=y.useContext(Ae),De=Ft.maxCount,Ce=Ft.flattenOptions,ct=Ft.onActiveValue,at=Ft.defaultActiveFirstOption,Ot=Ft.onSelect,Wt=Ft.menuItemSelectedIcon,jt=Ft.rawValues,on=Ft.fieldNames,_n=Ft.virtual,un=Ft.direction,Wn=Ft.listHeight,An=Ft.listItemHeight,wn=Ft.optionRender,Mn="".concat(Zt,"-item"),Ln=(0,Mt.Z)(function(){return Ce},[yt,Ce],function(gt,Ge){return Ge[0]&&gt[1]!==Ge[1]}),jn=y.useRef(null),Tn=y.useMemo(function(){return Rt&&fe(De)&&(jt==null?void 0:jt.size)>=De},[Rt,De,jt==null?void 0:jt.size]),Rn=function(Ge){Ge.preventDefault()},an=function(Ge){var qe;(qe=jn.current)===null||qe===void 0||qe.scrollTo(typeof Ge=="number"?{index:Ge}:Ge)},hn=y.useCallback(function(gt){return sn==="combobox"?!1:jt.has(gt)},[sn,(0,ne.Z)(jt).toString(),jt.size]),En=function(Ge){for(var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ut=Ln.length,mt=0;mt<ut;mt+=1){var St=(Ge+mt*qe+ut)%ut,Yt=Ln[St]||{},vn=Yt.group,cn=Yt.data;if(!vn&&!(cn!=null&&cn.disabled)&&(hn(cn.value)||!Tn))return St}return-1},Yn=y.useState(function(){return En(0)}),kn=(0,M.Z)(Yn,2),$n=kn[0],Ar=kn[1],ge=function(Ge){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ar(Ge);var ut={source:qe?"keyboard":"mouse"},mt=Ln[Ge];if(!mt){ct(null,-1,ut);return}ct(mt.value,Ge,ut)};(0,y.useEffect)(function(){ge(at!==!1?En(0):-1)},[Ln.length,Ut]);var We=y.useCallback(function(gt){return sn==="combobox"?String(gt).toLowerCase()===Ut.toLowerCase():jt.has(gt)},[sn,Ut,(0,ne.Z)(jt).toString(),jt.size]);(0,y.useEffect)(function(){var gt=setTimeout(function(){if(!Rt&&yt&&jt.size===1){var qe=Array.from(jt)[0],ut=Ln.findIndex(function(mt){var St=mt.data;return Ut?String(St.value).startsWith(Ut):St.value===qe});ut!==-1&&(ge(ut),an(ut))}});if(yt){var Ge;(Ge=jn.current)===null||Ge===void 0||Ge.scrollTo(void 0)}return function(){return clearTimeout(gt)}},[yt,Ut]);var Ue=function(Ge){Ge!==void 0&&Ot(Ge,{selected:!jt.has(Ge)}),Rt||Gt(!1)};if(y.useImperativeHandle(Kt,function(){return{onKeyDown:function(Ge){var qe=Ge.which,ut=Ge.ctrlKey;switch(qe){case X.Z.N:case X.Z.P:case X.Z.UP:case X.Z.DOWN:{var mt=0;if(qe===X.Z.UP?mt=-1:qe===X.Z.DOWN?mt=1:pn()&&ut&&(qe===X.Z.N?mt=1:qe===X.Z.P&&(mt=-1)),mt!==0){var St=En($n+mt,mt);an(St),ge(St,!0)}break}case X.Z.TAB:case X.Z.ENTER:{var Yt,vn=Ln[$n];vn&&!(vn!=null&&(Yt=vn.data)!==null&&Yt!==void 0&&Yt.disabled)&&!Tn?Ue(vn.value):Ue(void 0),yt&&Ge.preventDefault();break}case X.Z.ESC:Gt(!1),yt&&Ge.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ge){an(Ge)}}}),Ln.length===0)return y.createElement("div",{role:"listbox",id:"".concat(Ht,"_list"),className:"".concat(Mn,"-empty"),onMouseDown:Rn},Vt);var et=Object.keys(on).map(function(gt){return on[gt]}),ot=function(Ge){return Ge.label};function lt(gt,Ge){var qe=gt.group;return{role:qe?"presentation":"option",id:"".concat(Ht,"_list_").concat(Ge)}}var Bt=function(Ge){var qe=Ln[Ge];if(!qe)return null;var ut=qe.data||{},mt=ut.value,St=qe.group,Yt=(0,L.Z)(ut,!0),vn=ot(qe);return qe?y.createElement("div",(0,x.Z)({"aria-label":typeof vn=="string"&&!St?vn:null},Yt,{key:Ge},lt(qe,Ge),{"aria-selected":We(mt)}),mt):null},Ct={role:"listbox",id:"".concat(Ht,"_list")};return y.createElement(y.Fragment,null,_n&&y.createElement("div",(0,x.Z)({},Ct,{style:{height:0,width:0,overflow:"hidden"}}),Bt($n-1),Bt($n),Bt($n+1)),y.createElement(Qt.Z,{itemKey:"key",ref:jn,data:Ln,height:Wn,itemHeight:An,fullHeight:!1,onMouseDown:Rn,onScroll:rn,virtual:_n,direction:un,innerProps:_n?null:Ct},function(gt,Ge){var qe=gt.group,ut=gt.groupOption,mt=gt.data,St=gt.label,Yt=gt.value,vn=mt.key;if(qe){var cn,Dn=(cn=mt.title)!==null&&cn!==void 0?cn:tn(St)?St.toString():void 0;return y.createElement("div",{className:h()(Mn,"".concat(Mn,"-group"),mt.className),title:Dn},St!==void 0?St:vn)}var Vn=mt.disabled,Pn=mt.title,qn=mt.children,xn=mt.style,mr=mt.className,Jn=(0,f.Z)(mt,Lt),dr=(0,st.Z)(Jn,et),Qn=hn(Yt),tr=Vn||!Qn&&Tn,gr="".concat(Mn,"-option"),dn=h()(Mn,gr,mr,(0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)({},"".concat(gr,"-grouped"),ut),"".concat(gr,"-active"),$n===Ge&&!tr),"".concat(gr,"-disabled"),tr),"".concat(gr,"-selected"),Qn)),fr=ot(gt),Hn=!Wt||typeof Wt=="function"||Qn,bn=typeof fr=="number"?fr:fr||Yt,On=tn(bn)?bn.toString():void 0;return Pn!==void 0&&(On=Pn),y.createElement("div",(0,x.Z)({},(0,L.Z)(dr),_n?{}:lt(gt,Ge),{"aria-selected":We(Yt),className:dn,title:On,onMouseMove:function(){$n===Ge||tr||ge(Ge)},onClick:function(){tr||Ue(Yt)},style:xn}),y.createElement("div",{className:"".concat(gr,"-content")},typeof wn=="function"?wn(gt,{index:Ge}):bn),y.isValidElement(Wt)||Qn,Hn&&y.createElement(B,{className:"".concat(Mn,"-option-state"),customizeIcon:Wt,customizeIconProps:{value:Yt,disabled:tr,isSelected:Qn}},Qn?"\u2713":null))}))},ke=y.forwardRef(ze),Re=ke,Z=function(Fe,Ie){var Kt=y.useRef({values:new Map,options:new Map}),xt=y.useMemo(function(){var Ht=Kt.current,yt=Ht.values,Rt=Ht.options,sn=Fe.map(function(Vt){if(Vt.label===void 0){var rn;return(0,te.Z)((0,te.Z)({},Vt),{},{label:(rn=yt.get(Vt.value))===null||rn===void 0?void 0:rn.label})}return Vt}),Ut=new Map,Gt=new Map;return sn.forEach(function(Vt){Ut.set(Vt.value,Vt),Gt.set(Vt.value,Ie.get(Vt.value)||Rt.get(Vt.value))}),Kt.current.values=Ut,Kt.current.options=Gt,sn},[Fe,Ie]),Zt=y.useCallback(function(Ht){return Ie.get(Ht)||Kt.current.options.get(Ht)},[Ie]);return[xt,Zt]};function ee(Fe,Ie){return J(Fe).join("").toUpperCase().includes(Ie)}var me=function(Fe,Ie,Kt,xt,Zt){return y.useMemo(function(){if(!Kt||xt===!1)return Fe;var Ht=Ie.options,yt=Ie.label,Rt=Ie.value,sn=[],Ut=typeof xt=="function",Gt=Kt.toUpperCase(),Vt=Ut?xt:function(Ft,De){return Zt?ee(De[Zt],Gt):De[Ht]?ee(De[yt!=="children"?yt:"label"],Gt):ee(De[Rt],Gt)},rn=Ut?function(Ft){return re(Ft)}:function(Ft){return Ft};return Fe.forEach(function(Ft){if(Ft[Ht]){var De=Vt(Kt,rn(Ft));if(De)sn.push(Ft);else{var Ce=Ft[Ht].filter(function(ct){return Vt(Kt,rn(ct))});Ce.length&&sn.push((0,te.Z)((0,te.Z)({},Ft),{},(0,pe.Z)({},Ht,Ce)))}return}Vt(Kt,rn(Ft))&&sn.push(Ft)}),sn},[Fe,xt,Zt,Kt,Ie])},ve=b(6551),Ee=b(11592),Me=["children","value"],Ye=["children"];function nt(Fe){var Ie=Fe,Kt=Ie.key,xt=Ie.props,Zt=xt.children,Ht=xt.value,yt=(0,f.Z)(xt,Me);return(0,te.Z)({key:Kt,value:Ht!==void 0?Ht:Kt,children:Zt},yt)}function _t(Fe){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Ee.Z)(Fe).map(function(Kt,xt){if(!y.isValidElement(Kt)||!Kt.type)return null;var Zt=Kt,Ht=Zt.type.isSelectOptGroup,yt=Zt.key,Rt=Zt.props,sn=Rt.children,Ut=(0,f.Z)(Rt,Ye);return Ie||!Ht?nt(Kt):(0,te.Z)((0,te.Z)({key:"__RC_SELECT_GRP__".concat(yt===null?xt:yt,"__"),label:yt},Ut),{},{options:_t(sn)})}).filter(function(Kt){return Kt})}var nn=function(Ie,Kt,xt,Zt,Ht){return y.useMemo(function(){var yt=Ie,Rt=!Ie;Rt&&(yt=_t(Kt));var sn=new Map,Ut=new Map,Gt=function(Ft,De,Ce){Ce&&typeof Ce=="string"&&Ft.set(De[Ce],De)},Vt=function rn(Ft){for(var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=0;Ce<Ft.length;Ce+=1){var ct=Ft[Ce];!ct[xt.options]||De?(sn.set(ct[xt.value],ct),Gt(Ut,ct,xt.label),Gt(Ut,ct,Zt),Gt(Ut,ct,Ht)):rn(ct[xt.options],!0)}};return Vt(yt),{options:yt,valueOptions:sn,labelOptions:Ut}},[Ie,Kt,xt,Zt,Ht])},ln=nn;function zt(Fe){var Ie=y.useRef();Ie.current=Fe;var Kt=y.useCallback(function(){return Ie.current.apply(Ie,arguments)},[]);return Kt}function Jt(Fe){var Ie=Fe.mode,Kt=Fe.options,xt=Fe.children,Zt=Fe.backfill,Ht=Fe.allowClear,yt=Fe.placeholder,Rt=Fe.getInputElement,sn=Fe.showSearch,Ut=Fe.onSearch,Gt=Fe.defaultOpen,Vt=Fe.autoFocus,rn=Fe.labelInValue,Ft=Fe.value,De=Fe.inputValue,Ce=Fe.optionLabelProp,ct=isMultiple(Ie),at=sn!==void 0?sn:ct||Ie==="combobox",Ot=Kt||convertChildrenToData(xt);if(warning(Ie!=="tags"||Ot.every(function(_n){return!_n.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ie==="tags"||Ie==="combobox"){var Wt=Ot.some(function(_n){return _n.options?_n.options.some(function(un){return typeof("value"in un?un.value:un.key)=="number"}):typeof("value"in _n?_n.value:_n.key)=="number"});warning(!Wt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ie!=="combobox"||!Ce,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ie==="combobox"||!Zt,"`backfill` only works with `combobox` mode."),warning(Ie==="combobox"||!Rt,"`getInputElement` only work with `combobox` mode."),noteOnce(Ie!=="combobox"||!Rt||!Ht||!yt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ut&&!at&&Ie!=="combobox"&&Ie!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Gt||Vt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ft!=null){var jt=toArray(Ft);warning(!rn||jt.every(function(_n){return _typeof(_n)==="object"&&("key"in _n||"value"in _n)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ct||Array.isArray(Ft),"`value` should be array when `mode` is `multiple` or `tags`")}if(xt){var on=null;toNodeArray(xt).some(function(_n){if(!React.isValidElement(_n)||!_n.type)return!1;var un=_n,Wn=un.type;if(Wn.isSelectOption)return!1;if(Wn.isSelectOptGroup){var An=toNodeArray(_n.props.children).every(function(wn){return!React.isValidElement(wn)||!_n.type||wn.type.isSelectOption?!0:(on=wn.type,!1)});return!An}return on=Wn,!0}),on&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(on.displayName||on.name||on,"`.")),warning(De===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function yn(Fe,Ie){if(Fe){var Kt=function xt(Zt){for(var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yt=0;yt<Zt.length;yt++){var Rt=Zt[yt];if(Rt[Ie==null?void 0:Ie.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Ht&&Array.isArray(Rt[Ie==null?void 0:Ie.options])&&xt(Rt[Ie==null?void 0:Ie.options],!0))break}};Kt(Fe)}}var Bn=null,mn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],gn=["inputValue"];function Nt(Fe){return!Fe||(0,oe.Z)(Fe)!=="object"}var wt=y.forwardRef(function(Fe,Ie){var Kt=Fe.id,xt=Fe.mode,Zt=Fe.prefixCls,Ht=Zt===void 0?"rc-select":Zt,yt=Fe.backfill,Rt=Fe.fieldNames,sn=Fe.inputValue,Ut=Fe.searchValue,Gt=Fe.onSearch,Vt=Fe.autoClearSearchValue,rn=Vt===void 0?!0:Vt,Ft=Fe.onSelect,De=Fe.onDeselect,Ce=Fe.dropdownMatchSelectWidth,ct=Ce===void 0?!0:Ce,at=Fe.filterOption,Ot=Fe.filterSort,Wt=Fe.optionFilterProp,jt=Fe.optionLabelProp,on=Fe.options,_n=Fe.optionRender,un=Fe.children,Wn=Fe.defaultActiveFirstOption,An=Fe.menuItemSelectedIcon,wn=Fe.virtual,Mn=Fe.direction,Ln=Fe.listHeight,jn=Ln===void 0?200:Ln,Tn=Fe.listItemHeight,Rn=Tn===void 0?20:Tn,an=Fe.labelRender,hn=Fe.value,En=Fe.defaultValue,Yn=Fe.labelInValue,kn=Fe.onChange,$n=Fe.maxCount,Ar=(0,f.Z)(Fe,mn),ge=(0,ve.ZP)(Kt),We=Ke(xt),Ue=!!(!on&&un),et=y.useMemo(function(){return at===void 0&&xt==="combobox"?!1:at},[at,xt]),ot=y.useMemo(function(){return he(Rt,Ue)},[JSON.stringify(Rt),Ue]),lt=(0,Q.Z)("",{value:Ut!==void 0?Ut:sn,postState:function(rr){return rr||""}}),Bt=(0,M.Z)(lt,2),Ct=Bt[0],gt=Bt[1],Ge=ln(on,un,ot,Wt,jt),qe=Ge.valueOptions,ut=Ge.labelOptions,mt=Ge.options,St=y.useCallback(function(Cn){var rr=J(Cn);return rr.map(function(ir){var sr,er,vr,Wr,Sn;if(Nt(ir))sr=ir;else{var zn;vr=ir.key,er=ir.label,sr=(zn=ir.value)!==null&&zn!==void 0?zn:vr}var Gn=qe.get(sr);if(Gn){var Dr;if(er===void 0&&(er=Gn==null?void 0:Gn[jt||ot.label]),vr===void 0&&(vr=(Dr=Gn==null?void 0:Gn.key)!==null&&Dr!==void 0?Dr:sr),Wr=Gn==null?void 0:Gn.disabled,Sn=Gn==null?void 0:Gn.title,0)var Rr}return{label:er,value:sr,key:vr,disabled:Wr,title:Sn}})},[ot,jt,qe]),Yt=(0,Q.Z)(En,{value:hn}),vn=(0,M.Z)(Yt,2),cn=vn[0],Dn=vn[1],Vn=y.useMemo(function(){var Cn,rr=We&&cn===null?[]:cn,ir=St(rr);return xt==="combobox"&&F((Cn=ir[0])===null||Cn===void 0?void 0:Cn.value)?[]:ir},[cn,St,xt,We]),Pn=Z(Vn,qe),qn=(0,M.Z)(Pn,2),xn=qn[0],mr=qn[1],Jn=y.useMemo(function(){if(!xt&&xn.length===1){var Cn=xn[0];if(Cn.value===null&&(Cn.label===null||Cn.label===void 0))return[]}return xn.map(function(rr){var ir;return(0,te.Z)((0,te.Z)({},rr),{},{label:(ir=typeof an=="function"?an(rr):rr.label)!==null&&ir!==void 0?ir:rr.value})})},[xt,xn,an]),dr=y.useMemo(function(){return new Set(xn.map(function(Cn){return Cn.value}))},[xn]);y.useEffect(function(){if(xt==="combobox"){var Cn,rr=(Cn=xn[0])===null||Cn===void 0?void 0:Cn.value;gt(g(rr)?String(rr):"")}},[xn]);var Qn=zt(function(Cn,rr){var ir=rr!=null?rr:Cn;return(0,pe.Z)((0,pe.Z)({},ot.value,Cn),ot.label,ir)}),tr=y.useMemo(function(){if(xt!=="tags")return mt;var Cn=(0,ne.Z)(mt),rr=function(sr){return qe.has(sr)};return(0,ne.Z)(xn).sort(function(ir,sr){return ir.value<sr.value?-1:1}).forEach(function(ir){var sr=ir.value;rr(sr)||Cn.push(Qn(sr,ir.label))}),Cn},[Qn,mt,qe,xn,xt]),gr=me(tr,ot,Ct,et,Wt),dn=y.useMemo(function(){return xt!=="tags"||!Ct||gr.some(function(Cn){return Cn[Wt||"value"]===Ct})||gr.some(function(Cn){return Cn[ot.value]===Ct})?gr:[Qn(Ct)].concat((0,ne.Z)(gr))},[Qn,Wt,xt,gr,Ct,ot]),fr=function Cn(rr){var ir=(0,ne.Z)(rr).sort(function(sr,er){return Ot(sr,er,{searchValue:Ct})});return ir.map(function(sr){return Array.isArray(sr.options)?(0,te.Z)((0,te.Z)({},sr),{},{options:sr.options.length>0?Cn(sr.options):sr.options}):sr})},Hn=y.useMemo(function(){return Ot?fr(dn):dn},[dn,Ot,Ct]),bn=y.useMemo(function(){return q(Hn,{fieldNames:ot,childrenAsData:Ue})},[Hn,ot,Ue]),On=function(rr){var ir=St(rr);if(Dn(ir),kn&&(ir.length!==xn.length||ir.some(function(vr,Wr){var Sn;return((Sn=xn[Wr])===null||Sn===void 0?void 0:Sn.value)!==(vr==null?void 0:vr.value)}))){var sr=Yn?ir:ir.map(function(vr){return vr.value}),er=ir.map(function(vr){return re(mr(vr.value))});kn(We?sr:sr[0],We?er:er[0])}},nr=y.useState(null),hr=(0,M.Z)(nr,2),lr=hr[0],In=hr[1],Pr=y.useState(0),zr=(0,M.Z)(Pr,2),Kr=zr[0],ei=zr[1],Jr=Wn!==void 0?Wn:xt!=="combobox",Vr=y.useCallback(function(Cn,rr){var ir=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},sr=ir.source,er=sr===void 0?"keyboard":sr;ei(rr),yt&&xt==="combobox"&&Cn!==null&&er==="keyboard"&&In(String(Cn))},[yt,xt]),_r=function(rr,ir,sr){var er=function(){var ni,Xr=mr(rr);return[Yn?{label:Xr==null?void 0:Xr[ot.label],value:rr,key:(ni=Xr==null?void 0:Xr.key)!==null&&ni!==void 0?ni:rr}:rr,re(Xr)]};if(ir&&Ft){var vr=er(),Wr=(0,M.Z)(vr,2),Sn=Wr[0],zn=Wr[1];Ft(Sn,zn)}else if(!ir&&De&&sr!=="clear"){var Gn=er(),Dr=(0,M.Z)(Gn,2),Rr=Dr[0],Br=Dr[1];De(Rr,Br)}},wr=zt(function(Cn,rr){var ir,sr=We?rr.selected:!0;sr?ir=We?[].concat((0,ne.Z)(xn),[Cn]):[Cn]:ir=xn.filter(function(er){return er.value!==Cn}),On(ir),_r(Cn,sr),xt==="combobox"?In(""):(!Ke||rn)&&(gt(""),In(""))}),Nr=function(rr,ir){On(rr);var sr=ir.type,er=ir.values;(sr==="remove"||sr==="clear")&&er.forEach(function(vr){_r(vr.value,!1,sr)})},Er=function(rr,ir){if(gt(rr),In(null),ir.source==="submit"){var sr=(rr||"").trim();if(sr){var er=Array.from(new Set([].concat((0,ne.Z)(dr),[sr])));On(er),_r(sr,!0),gt("")}return}ir.source!=="blur"&&(xt==="combobox"&&On(rr),Gt==null||Gt(rr))},yr=function(rr){var ir=rr;xt!=="tags"&&(ir=rr.map(function(er){var vr=ut.get(er);return vr==null?void 0:vr.value}).filter(function(er){return er!==void 0}));var sr=Array.from(new Set([].concat((0,ne.Z)(dr),(0,ne.Z)(ir))));On(sr),sr.forEach(function(er){_r(er,!0)})},br=y.useMemo(function(){var Cn=wn!==!1&&ct!==!1;return(0,te.Z)((0,te.Z)({},Ge),{},{flattenOptions:bn,onActiveValue:Vr,defaultActiveFirstOption:Jr,onSelect:wr,menuItemSelectedIcon:An,rawValues:dr,fieldNames:ot,virtual:Cn,direction:Mn,listHeight:jn,listItemHeight:Rn,childrenAsData:Ue,maxCount:$n,optionRender:_n})},[$n,Ge,bn,Vr,Jr,wr,An,dr,ot,wn,ct,Mn,jn,Rn,Ue,_n]);return y.createElement(Ae.Provider,{value:br},y.createElement(_e,(0,x.Z)({},Ar,{id:ge,prefixCls:Ht,ref:Ie,omitDomProps:gn,mode:xt,displayValues:Jn,onDisplayValuesChange:Nr,direction:Mn,searchValue:Ct,onSearch:Er,autoClearSearchValue:rn,onSearchSplit:yr,dropdownMatchSelectWidth:ct,OptionList:Re,emptyOptions:!bn.length,activeValue:lr,activeDescendantId:"".concat(ge,"_list_").concat(Kr)})))}),qt=wt;qt.Option=Pt,qt.OptGroup=Xe;var At=qt,Nn=At},86351:function(fn,je,b){"use strict";b.d(je,{R:function(){return ne},w:function(){return x}});var x={},ne="rc-table-internal-hook"},97347:function(fn,je,b){"use strict";b.d(je,{L:function(){return I},Z:function(){return D}});var x=b(11913),ne=b(74430),pe=b(3300),te=b(34666),M=b(27247),f=b(43079),oe=b(11592),Q=b(48736),o=b(59301),y=b(86351),C=b(54451);function h(A){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof W=="number"?W:W.endsWith("%")?A*parseFloat(W)/100:null}function m(A,W,X){return o.useMemo(function(){if(W&&W>0){var Y=0,L=0;A.forEach(function(J){var H=h(W,J.width);H?Y+=H:L+=1});var se=Math.max(W,X),ae=Math.max(se-Y,L),Be=L,U=ae/L,k=0,N=A.map(function(J){var H=(0,M.Z)({},J),v=h(W,H.width);if(v)H.width=v;else{var g=Math.floor(U);H.width=Be===1?ae:g,ae-=g,Be-=1}return k+=H.width,H});if(k<se){var V=se/k;ae=se,N.forEach(function(J,H){var v=Math.floor(J.width*V);J.width=H===N.length-1?ae:v,ae-=v})}return[N,Math.max(k,se)]}return[A,W]},[A,W,X])}var E=["children"],S=["fixed"];function I(A){return(0,oe.Z)(A).filter(function(W){return o.isValidElement(W)}).map(function(W){var X=W.key,Y=W.props,L=Y.children,se=(0,f.Z)(Y,E),ae=(0,M.Z)({key:X},se);return L&&(ae.children=I(L)),ae})}function B(A){return A.filter(function(W){return W&&(0,te.Z)(W)==="object"&&!W.hidden}).map(function(W){var X=W.children;return X&&X.length>0?(0,M.Z)((0,M.Z)({},W),{},{children:B(X)}):W})}function G(A){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return A.filter(function(X){return X&&(0,te.Z)(X)==="object"}).reduce(function(X,Y,L){var se=Y.fixed,ae=se===!0?"left":se,Be="".concat(W,"-").concat(L),U=Y.children;return U&&U.length>0?[].concat((0,pe.Z)(X),(0,pe.Z)(G(U,Be).map(function(k){return(0,M.Z)({fixed:ae},k)}))):[].concat((0,pe.Z)(X),[(0,M.Z)((0,M.Z)({key:Be},Y),{},{fixed:ae})])},[])}function R(A){return A.map(function(W){var X=W.fixed,Y=(0,f.Z)(W,S),L=X;return X==="left"?L="right":X==="right"&&(L="left"),(0,M.Z)({fixed:L},Y)})}function O(A,W){var X=A.prefixCls,Y=A.columns,L=A.children,se=A.expandable,ae=A.expandedKeys,Be=A.columnTitle,U=A.getRowKey,k=A.onTriggerExpand,N=A.expandIcon,V=A.rowExpandable,J=A.expandIconColumnIndex,H=A.direction,v=A.expandRowByClick,g=A.columnWidth,F=A.fixed,ie=A.scrollWidth,ue=A.clientWidth,Le=o.useMemo(function(){var Qe=Y||I(L)||[];return B(Qe.slice())},[Y,L]),Je=o.useMemo(function(){if(se){var Qe=Le.slice();if(!Qe.includes(y.w)){var $e=J||0;$e>=0&&($e||F==="left"||!F)&&Qe.splice($e,0,y.w),F==="right"&&Qe.splice(Le.length,0,y.w)}var ye=Qe.indexOf(y.w);Qe=Qe.filter(function(Se,$){return Se!==y.w||$===ye});var de=Le[ye],K;F?K=F:K=de?de.fixed:null;var xe=(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({},C.v,{className:"".concat(X,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Be),"fixed",K),"className","".concat(X,"-row-expand-icon-cell")),"width",g),"render",function($,P,fe){var he=U(P,fe),q=ae.has(he),re=V?V(P):!0,le=N({prefixCls:X,expanded:q,expandable:re,record:P,onExpand:k});return v?o.createElement("span",{onClick:function(Ae){return Ae.stopPropagation()}},le):le});return Qe.map(function(Se){return Se===y.w?xe:Se})}return Le.filter(function(Se){return Se!==y.w})},[se,Le,U,ae,N,H]),rt=o.useMemo(function(){var Qe=Je;return W&&(Qe=W(Qe)),Qe.length||(Qe=[{render:function(){return null}}]),Qe},[W,Je,H]),dt=o.useMemo(function(){return H==="rtl"?R(G(rt)):G(rt)},[rt,H,ie]),vt=o.useMemo(function(){for(var Qe=-1,$e=dt.length-1;$e>=0;$e-=1){var ye=dt[$e].fixed;if(ye==="left"||ye===!0){Qe=$e;break}}if(Qe>=0)for(var de=0;de<=Qe;de+=1){var K=dt[de].fixed;if(K!=="left"&&K!==!0)return!0}var xe=dt.findIndex(function(P){var fe=P.fixed;return fe==="right"});if(xe>=0)for(var Se=xe;Se<dt.length;Se+=1){var $=dt[Se].fixed;if($!=="right")return!0}return!1},[dt]),be=m(dt,ie,ue),Tt=(0,x.Z)(be,2),tt=Tt[0],It=Tt[1];return[rt,tt,It,vt]}var D=O},4030:function(fn,je,b){"use strict";b.d(je,{w2:function(){return x.w},vP:function(){return tn.v},RQ:function(){return x.R},ER:function(){return he},Q$:function(){return at},TN:function(){return kn}});var x=b(86351),ne=b(11913),pe=b(6089),te=b(34280),M=b(13697),f=b(59301),oe=b(4676);function Q(ge){var We=f.createContext(void 0),Ue=function(ot){var lt=ot.value,Bt=ot.children,Ct=f.useRef(lt);Ct.current=lt;var gt=f.useState(function(){return{getValue:function(){return Ct.current},listeners:new Set}}),Ge=(0,ne.Z)(gt,1),qe=Ge[0];return(0,te.Z)(function(){(0,oe.unstable_batchedUpdates)(function(){qe.listeners.forEach(function(ut){ut(lt)})})},[lt]),f.createElement(We.Provider,{value:qe},Bt)};return{Context:We,Provider:Ue,defaultValue:ge}}function o(ge,We){var Ue=(0,pe.Z)(typeof We=="function"?We:function(ut){if(We===void 0)return ut;if(!Array.isArray(We))return ut[We];var mt={};return We.forEach(function(St){mt[St]=ut[St]}),mt}),et=f.useContext(ge==null?void 0:ge.Context),ot=et||{},lt=ot.listeners,Bt=ot.getValue,Ct=f.useRef();Ct.current=Ue(et?Bt():ge==null?void 0:ge.defaultValue);var gt=f.useState({}),Ge=(0,ne.Z)(gt,2),qe=Ge[1];return(0,te.Z)(function(){if(!et)return;function ut(mt){var St=Ue(mt);(0,M.Z)(Ct.current,St,!0)||qe({})}return lt.add(ut),function(){lt.delete(ut)}},[et]),Ct.current}var y=b(32855),C=b(8654);function h(){var ge=f.createContext(null);function We(){return f.useContext(ge)}function Ue(ot,lt){var Bt=(0,C.Yr)(ot),Ct=function(Ge,qe){var ut=Bt?{ref:qe}:{},mt=f.useRef(0),St=f.useRef(Ge),Yt=We();return Yt!==null?f.createElement(ot,(0,y.Z)({},Ge,ut)):((!lt||lt(St.current,Ge))&&(mt.current+=1),St.current=Ge,f.createElement(ge.Provider,{value:mt.current},f.createElement(ot,(0,y.Z)({},Ge,ut))))};return Bt?f.forwardRef(Ct):Ct}function et(ot,lt){var Bt=(0,C.Yr)(ot),Ct=function(Ge,qe){var ut=Bt?{ref:qe}:{};return We(),f.createElement(ot,(0,y.Z)({},Ge,ut))};return Bt?f.memo(f.forwardRef(Ct),lt):f.memo(Ct,lt)}return{makeImmutable:Ue,responseImmutable:et,useImmutableMark:We}}var m=h(),E=m.makeImmutable,S=m.responseImmutable,I=m.useImmutableMark,B=h(),G=B.makeImmutable,R=B.responseImmutable,O=B.useImmutableMark,D=Q(),A=D;function W(ge,We){var Ue=React.useRef(0);Ue.current+=1;var et=React.useRef(ge),ot=[];Object.keys(ge||{}).map(function(Bt){var Ct;(ge==null?void 0:ge[Bt])!==((Ct=et.current)===null||Ct===void 0?void 0:Ct[Bt])&&ot.push(Bt)}),et.current=ge;var lt=React.useRef([]);return ot.length&&(lt.current=ot),React.useDebugValue(Ue.current),React.useDebugValue(lt.current.join(", ")),We&&console.log("".concat(We,":"),Ue.current,lt.current),Ue.current}var X=null,Y=null,L=b(34666),se=b(27247),ae=b(74430),Be=b(92310),U=b.n(Be),k=b(80547),N=b(97938),V=b(48736),J=f.createContext({renderWithProps:!1}),H=J,v="RC_TABLE_KEY";function g(ge){return ge==null?[]:Array.isArray(ge)?ge:[ge]}function F(ge){var We=[],Ue={};return ge.forEach(function(et){for(var ot=et||{},lt=ot.key,Bt=ot.dataIndex,Ct=lt||g(Bt).join("-")||v;Ue[Ct];)Ct="".concat(Ct,"_next");Ue[Ct]=!0,We.push(Ct)}),We}function ie(ge){return ge!=null}function ue(ge){return typeof ge=="number"&&!Number.isNaN(ge)}function Le(ge){return ge&&(0,L.Z)(ge)==="object"&&!Array.isArray(ge)&&!f.isValidElement(ge)}function Je(ge,We,Ue,et,ot,lt){var Bt=f.useContext(H),Ct=O(),gt=(0,k.Z)(function(){if(ie(et))return[et];var Ge=We==null||We===""?[]:Array.isArray(We)?We:[We],qe=(0,N.Z)(ge,Ge),ut=qe,mt=void 0;if(ot){var St=ot(qe,ge,Ue);Le(St)?(ut=St.children,mt=St.props,Bt.renderWithProps=!0):ut=St}return[ut,mt]},[Ct,ge,et,We,ot,Ue],function(Ge,qe){if(lt){var ut=(0,ne.Z)(Ge,2),mt=ut[1],St=(0,ne.Z)(qe,2),Yt=St[1];return lt(Yt,mt)}return Bt.renderWithProps?!0:!(0,M.Z)(Ge,qe,!0)});return gt}function rt(ge,We,Ue,et){var ot=ge+We-1;return ge<=et&&ot>=Ue}function dt(ge,We){return o(A,function(Ue){var et=rt(ge,We||1,Ue.hoverStartRow,Ue.hoverEndRow);return[et,Ue.onHover]})}var vt=b(70425),be=function(We){var Ue=We.ellipsis,et=We.rowType,ot=We.children,lt,Bt=Ue===!0?{showTitle:!0}:Ue;return Bt&&(Bt.showTitle||et==="header")&&(typeof ot=="string"||typeof ot=="number"?lt=ot.toString():f.isValidElement(ot)&&typeof ot.props.children=="string"&&(lt=ot.props.children)),lt};function Tt(ge){var We,Ue,et,ot,lt,Bt,Ct,gt,Ge=ge.component,qe=ge.children,ut=ge.ellipsis,mt=ge.scope,St=ge.prefixCls,Yt=ge.className,vn=ge.align,cn=ge.record,Dn=ge.render,Vn=ge.dataIndex,Pn=ge.renderIndex,qn=ge.shouldCellUpdate,xn=ge.index,mr=ge.rowType,Jn=ge.colSpan,dr=ge.rowSpan,Qn=ge.fixLeft,tr=ge.fixRight,gr=ge.firstFixLeft,dn=ge.lastFixLeft,fr=ge.firstFixRight,Hn=ge.lastFixRight,bn=ge.appendNode,On=ge.additionalProps,nr=On===void 0?{}:On,hr=ge.isSticky,lr="".concat(St,"-cell"),In=o(A,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Pr=In.supportSticky,zr=In.allColumnsFixedLeft,Kr=In.rowHoverable,ei=Je(cn,Vn,Pn,qe,Dn,qn),Jr=(0,ne.Z)(ei,2),Vr=Jr[0],_r=Jr[1],wr={},Nr=typeof Qn=="number"&&Pr,Er=typeof tr=="number"&&Pr;Nr&&(wr.position="sticky",wr.left=Qn),Er&&(wr.position="sticky",wr.right=tr);var yr=(We=(Ue=(et=_r==null?void 0:_r.colSpan)!==null&&et!==void 0?et:nr.colSpan)!==null&&Ue!==void 0?Ue:Jn)!==null&&We!==void 0?We:1,br=(ot=(lt=(Bt=_r==null?void 0:_r.rowSpan)!==null&&Bt!==void 0?Bt:nr.rowSpan)!==null&&lt!==void 0?lt:dr)!==null&&ot!==void 0?ot:1,Cn=dt(xn,br),rr=(0,ne.Z)(Cn,2),ir=rr[0],sr=rr[1],er=(0,vt.zX)(function(Rr){var Br;cn&&sr(xn,xn+br-1),nr==null||(Br=nr.onMouseEnter)===null||Br===void 0||Br.call(nr,Rr)}),vr=(0,vt.zX)(function(Rr){var Br;cn&&sr(-1,-1),nr==null||(Br=nr.onMouseLeave)===null||Br===void 0||Br.call(nr,Rr)});if(yr===0||br===0)return null;var Wr=(Ct=nr.title)!==null&&Ct!==void 0?Ct:be({rowType:mr,ellipsis:ut,children:Vr}),Sn=U()(lr,Yt,(gt={},(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)(gt,"".concat(lr,"-fix-left"),Nr&&Pr),"".concat(lr,"-fix-left-first"),gr&&Pr),"".concat(lr,"-fix-left-last"),dn&&Pr),"".concat(lr,"-fix-left-all"),dn&&zr&&Pr),"".concat(lr,"-fix-right"),Er&&Pr),"".concat(lr,"-fix-right-first"),fr&&Pr),"".concat(lr,"-fix-right-last"),Hn&&Pr),"".concat(lr,"-ellipsis"),ut),"".concat(lr,"-with-append"),bn),"".concat(lr,"-fix-sticky"),(Nr||Er)&&hr&&Pr),(0,ae.Z)(gt,"".concat(lr,"-row-hover"),!_r&&ir)),nr.className,_r==null?void 0:_r.className),zn={};vn&&(zn.textAlign=vn);var Gn=(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)({},_r==null?void 0:_r.style),wr),zn),nr.style),Dr=Vr;return(0,L.Z)(Dr)==="object"&&!Array.isArray(Dr)&&!f.isValidElement(Dr)&&(Dr=null),ut&&(dn||fr)&&(Dr=f.createElement("span",{className:"".concat(lr,"-content")},Dr)),f.createElement(Ge,(0,y.Z)({},_r,nr,{className:Sn,style:Gn,title:Wr,scope:mt,onMouseEnter:Kr?er:void 0,onMouseLeave:Kr?vr:void 0,colSpan:yr!==1?yr:null,rowSpan:br!==1?br:null}),bn,Dr)}var tt=f.memo(Tt);function It(ge,We,Ue,et,ot){var lt=Ue[ge]||{},Bt=Ue[We]||{},Ct,gt;lt.fixed==="left"?Ct=et.left[ot==="rtl"?We:ge]:Bt.fixed==="right"&&(gt=et.right[ot==="rtl"?ge:We]);var Ge=!1,qe=!1,ut=!1,mt=!1,St=Ue[We+1],Yt=Ue[ge-1],vn=St&&!St.fixed||Yt&&!Yt.fixed||Ue.every(function(qn){return qn.fixed==="left"});if(ot==="rtl"){if(Ct!==void 0){var cn=Yt&&Yt.fixed==="left";mt=!cn&&vn}else if(gt!==void 0){var Dn=St&&St.fixed==="right";ut=!Dn&&vn}}else if(Ct!==void 0){var Vn=St&&St.fixed==="left";Ge=!Vn&&vn}else if(gt!==void 0){var Pn=Yt&&Yt.fixed==="right";qe=!Pn&&vn}return{fixLeft:Ct,fixRight:gt,lastFixLeft:Ge,firstFixRight:qe,lastFixRight:ut,firstFixLeft:mt,isSticky:et.isSticky}}var Qe=f.createContext({}),$e=Qe;function ye(ge){var We=ge.className,Ue=ge.index,et=ge.children,ot=ge.colSpan,lt=ot===void 0?1:ot,Bt=ge.rowSpan,Ct=ge.align,gt=o(A,["prefixCls","direction"]),Ge=gt.prefixCls,qe=gt.direction,ut=f.useContext($e),mt=ut.scrollColumnIndex,St=ut.stickyOffsets,Yt=ut.flattenColumns,vn=Ue+lt-1,cn=vn+1===mt?lt+1:lt,Dn=It(Ue,Ue+cn-1,Yt,St,qe);return f.createElement(tt,(0,y.Z)({className:We,index:Ue,component:"td",prefixCls:Ge,record:null,dataIndex:null,align:Ct,colSpan:cn,rowSpan:Bt,render:function(){return et}},Dn))}var de=b(43079),K=["children"];function xe(ge){var We=ge.children,Ue=(0,de.Z)(ge,K);return f.createElement("tr",Ue,We)}function Se(ge){var We=ge.children;return We}Se.Row=xe,Se.Cell=ye;var $=Se;function P(ge){var We=ge.children,Ue=ge.stickyOffsets,et=ge.flattenColumns,ot=o(A,"prefixCls"),lt=et.length-1,Bt=et[lt],Ct=f.useMemo(function(){return{stickyOffsets:Ue,flattenColumns:et,scrollColumnIndex:Bt!=null&&Bt.scrollbar?lt:null}},[Bt,et,lt,Ue]);return f.createElement($e.Provider,{value:Ct},f.createElement("tfoot",{className:"".concat(ot,"-summary")},We))}var fe=R(P),he=$,q=b(29301),re=b(24514),le=b(75152),Pe=b(26112);function Ae(ge,We,Ue,et,ot,lt,Bt){ge.push({record:We,indent:Ue,index:Bt});var Ct=lt(We),gt=ot==null?void 0:ot.has(Ct);if(We&&Array.isArray(We[et])&&gt)for(var Ge=0;Ge<We[et].length;Ge+=1)Ae(ge,We[et][Ge],Ue+1,et,ot,lt,Ge)}function Ne(ge,We,Ue,et){var ot=f.useMemo(function(){if(Ue!=null&&Ue.size){for(var lt=[],Bt=0;Bt<(ge==null?void 0:ge.length);Bt+=1){var Ct=ge[Bt];Ae(lt,Ct,0,We,Ue,et,Bt)}return lt}return ge==null?void 0:ge.map(function(gt,Ge){return{record:gt,indent:0,index:Ge}})},[ge,We,Ue,et]);return ot}function Te(ge,We,Ue,et){var ot=o(A,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),lt=ot.flattenColumns,Bt=ot.expandableType,Ct=ot.expandedKeys,gt=ot.childrenColumnName,Ge=ot.onTriggerExpand,qe=ot.rowExpandable,ut=ot.onRow,mt=ot.expandRowByClick,St=ot.rowClassName,Yt=Bt==="nest",vn=Bt==="row"&&(!qe||qe(ge)),cn=vn||Yt,Dn=Ct&&Ct.has(We),Vn=gt&&ge&&ge[gt],Pn=(0,vt.zX)(Ge),qn=ut==null?void 0:ut(ge,Ue),xn=qn==null?void 0:qn.onClick,mr=function(tr){mt&&cn&&Ge(ge,tr);for(var gr=arguments.length,dn=new Array(gr>1?gr-1:0),fr=1;fr<gr;fr++)dn[fr-1]=arguments[fr];xn==null||xn.apply(void 0,[tr].concat(dn))},Jn;typeof St=="string"?Jn=St:typeof St=="function"&&(Jn=St(ge,Ue,et));var dr=F(lt);return(0,se.Z)((0,se.Z)({},ot),{},{columnsKey:dr,nestExpandable:Yt,expanded:Dn,hasNestChildren:Vn,record:ge,onTriggerExpand:Pn,rowSupportExpand:vn,expandable:cn,rowProps:(0,se.Z)((0,se.Z)({},qn),{},{className:U()(Jn,qn==null?void 0:qn.className),onClick:mr})})}function He(ge){var We=ge.prefixCls,Ue=ge.children,et=ge.component,ot=ge.cellComponent,lt=ge.className,Bt=ge.expanded,Ct=ge.colSpan,gt=ge.isEmpty,Ge=o(A,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),qe=Ge.scrollbarSize,ut=Ge.fixHeader,mt=Ge.fixColumn,St=Ge.componentWidth,Yt=Ge.horizonScroll,vn=Ue;return(gt?Yt&&St:mt)&&(vn=f.createElement("div",{style:{width:St-(ut&&!gt?qe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(We,"-expanded-row-fixed")},vn)),f.createElement(et,{className:lt,style:{display:Bt?null:"none"}},f.createElement(tt,{component:ot,prefixCls:We,colSpan:Ct},vn))}var Ke=He;function Ze(ge){var We=ge.prefixCls,Ue=ge.record,et=ge.onExpand,ot=ge.expanded,lt=ge.expandable,Bt="".concat(We,"-row-expand-icon");if(!lt)return f.createElement("span",{className:U()(Bt,"".concat(We,"-row-spaced"))});var Ct=function(Ge){et(Ue,Ge),Ge.stopPropagation()};return f.createElement("span",{className:U()(Bt,(0,ae.Z)((0,ae.Z)({},"".concat(We,"-row-expanded"),ot),"".concat(We,"-row-collapsed"),!ot)),onClick:Ct})}function _e(ge,We,Ue){var et=[];function ot(lt){(lt||[]).forEach(function(Bt,Ct){et.push(We(Bt,Ct)),ot(Bt[Ue])})}return ot(ge),et}function ft(ge,We,Ue,et){return typeof ge=="string"?ge:typeof ge=="function"?ge(We,Ue,et):""}function Xe(ge,We,Ue,et,ot){var lt=ge.record,Bt=ge.prefixCls,Ct=ge.columnsKey,gt=ge.fixedInfoList,Ge=ge.expandIconColumnIndex,qe=ge.nestExpandable,ut=ge.indentSize,mt=ge.expandIcon,St=ge.expanded,Yt=ge.hasNestChildren,vn=ge.onTriggerExpand,cn=Ct[Ue],Dn=gt[Ue],Vn;Ue===(Ge||0)&&qe&&(Vn=f.createElement(f.Fragment,null,f.createElement("span",{style:{paddingLeft:"".concat(ut*et,"px")},className:"".concat(Bt,"-row-indent indent-level-").concat(et)}),mt({prefixCls:Bt,expanded:St,expandable:Yt,record:lt,onExpand:vn})));var Pn;return We.onCell&&(Pn=We.onCell(lt,ot)),{key:cn,fixedInfo:Dn,appendCellNode:Vn,additionalCellProps:Pn||{}}}function Ve(ge){var We=ge.className,Ue=ge.style,et=ge.record,ot=ge.index,lt=ge.renderIndex,Bt=ge.rowKey,Ct=ge.indent,gt=Ct===void 0?0:Ct,Ge=ge.rowComponent,qe=ge.cellComponent,ut=ge.scopeCellComponent,mt=Te(et,Bt,ot,gt),St=mt.prefixCls,Yt=mt.flattenColumns,vn=mt.expandedRowClassName,cn=mt.expandedRowRender,Dn=mt.rowProps,Vn=mt.expanded,Pn=mt.rowSupportExpand,qn=f.useRef(!1);qn.current||(qn.current=Vn);var xn=ft(vn,et,ot,gt),mr=f.createElement(Ge,(0,y.Z)({},Dn,{"data-row-key":Bt,className:U()(We,"".concat(St,"-row"),"".concat(St,"-row-level-").concat(gt),Dn==null?void 0:Dn.className,(0,ae.Z)({},xn,gt>=1)),style:(0,se.Z)((0,se.Z)({},Ue),Dn==null?void 0:Dn.style)}),Yt.map(function(Qn,tr){var gr=Qn.render,dn=Qn.dataIndex,fr=Qn.className,Hn=Xe(mt,Qn,tr,gt,ot),bn=Hn.key,On=Hn.fixedInfo,nr=Hn.appendCellNode,hr=Hn.additionalCellProps;return f.createElement(tt,(0,y.Z)({className:fr,ellipsis:Qn.ellipsis,align:Qn.align,scope:Qn.rowScope,component:Qn.rowScope?ut:qe,prefixCls:St,key:bn,record:et,index:ot,renderIndex:lt,dataIndex:dn,render:gr,shouldCellUpdate:Qn.shouldCellUpdate},On,{appendNode:nr,additionalProps:hr}))})),Jn;if(Pn&&(qn.current||Vn)){var dr=cn(et,ot,gt+1,Vn);Jn=f.createElement(Ke,{expanded:Vn,className:U()("".concat(St,"-expanded-row"),"".concat(St,"-expanded-row-level-").concat(gt+1),xn),prefixCls:St,component:Ge,cellComponent:qe,colSpan:Yt.length,isEmpty:!1},dr)}return f.createElement(f.Fragment,null,mr,Jn)}var Pt=R(Ve);function Mt(ge){var We=ge.columnKey,Ue=ge.onColumnResize,et=f.useRef();return(0,te.Z)(function(){et.current&&Ue(We,et.current.offsetWidth)},[]),f.createElement(q.Z,{data:We},f.createElement("td",{ref:et,style:{padding:0,border:0,height:0}},f.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var st=b(29194);function Qt(ge){var We=ge.prefixCls,Ue=ge.columnsKey,et=ge.onColumnResize,ot=f.useRef(null);return f.createElement("tr",{"aria-hidden":"true",className:"".concat(We,"-measure-row"),style:{height:0,fontSize:0},ref:ot},f.createElement(q.Z.Collection,{onBatchResize:function(Bt){(0,st.Z)(ot.current)&&Bt.forEach(function(Ct){var gt=Ct.data,Ge=Ct.size;et(gt,Ge.offsetWidth)})}},Ue.map(function(lt){return f.createElement(Mt,{key:lt,columnKey:lt,onColumnResize:et})})))}function pn(ge){var We=ge.data,Ue=ge.measureColumnWidth,et=o(A,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),ot=et.prefixCls,lt=et.getComponent,Bt=et.onColumnResize,Ct=et.flattenColumns,gt=et.getRowKey,Ge=et.expandedKeys,qe=et.childrenColumnName,ut=et.emptyNode,mt=Ne(We,qe,Ge,gt),St=f.useRef({renderWithProps:!1}),Yt=lt(["body","wrapper"],"tbody"),vn=lt(["body","row"],"tr"),cn=lt(["body","cell"],"td"),Dn=lt(["body","cell"],"th"),Vn;We.length?Vn=mt.map(function(qn,xn){var mr=qn.record,Jn=qn.indent,dr=qn.index,Qn=gt(mr,xn);return f.createElement(Pt,{key:Qn,rowKey:Qn,record:mr,index:xn,renderIndex:dr,rowComponent:vn,cellComponent:cn,scopeCellComponent:Dn,indent:Jn})}):Vn=f.createElement(Ke,{expanded:!0,className:"".concat(ot,"-placeholder"),prefixCls:ot,component:vn,cellComponent:cn,colSpan:Ct.length,isEmpty:!0},ut);var Pn=F(Ct);return f.createElement(H.Provider,{value:St.current},f.createElement(Yt,{className:"".concat(ot,"-tbody")},Ue&&f.createElement(Qt,{prefixCls:ot,columnsKey:Pn,onColumnResize:Bt}),Vn))}var Lt=R(pn),tn=b(54451),ze=["columnType"];function ke(ge){for(var We=ge.colWidths,Ue=ge.columns,et=ge.columCount,ot=o(A,["tableLayout"]),lt=ot.tableLayout,Bt=[],Ct=et||Ue.length,gt=!1,Ge=Ct-1;Ge>=0;Ge-=1){var qe=We[Ge],ut=Ue&&Ue[Ge],mt=void 0,St=void 0;if(ut&&(mt=ut[tn.v],lt==="auto"&&(St=ut.minWidth)),qe||St||mt||gt){var Yt=mt||{},vn=Yt.columnType,cn=(0,de.Z)(Yt,ze);Bt.unshift(f.createElement("col",(0,y.Z)({key:Ge,style:{width:qe,minWidth:St}},cn))),gt=!0}}return f.createElement("colgroup",null,Bt)}var Re=ke,Z=b(3300),ee=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function me(ge,We){return(0,f.useMemo)(function(){for(var Ue=[],et=0;et<We;et+=1){var ot=ge[et];if(ot!==void 0)Ue[et]=ot;else return null}return Ue},[ge.join("_"),We])}var ve=f.forwardRef(function(ge,We){var Ue=ge.className,et=ge.noData,ot=ge.columns,lt=ge.flattenColumns,Bt=ge.colWidths,Ct=ge.columCount,gt=ge.stickyOffsets,Ge=ge.direction,qe=ge.fixHeader,ut=ge.stickyTopOffset,mt=ge.stickyBottomOffset,St=ge.stickyClassName,Yt=ge.onScroll,vn=ge.maxContentScroll,cn=ge.children,Dn=(0,de.Z)(ge,ee),Vn=o(A,["prefixCls","scrollbarSize","isSticky","getComponent"]),Pn=Vn.prefixCls,qn=Vn.scrollbarSize,xn=Vn.isSticky,mr=Vn.getComponent,Jn=mr(["header","table"],"table"),dr=xn&&!qe?0:qn,Qn=f.useRef(null),tr=f.useCallback(function(hr){(0,C.mH)(We,hr),(0,C.mH)(Qn,hr)},[]);f.useEffect(function(){var hr;function lr(In){var Pr=In,zr=Pr.currentTarget,Kr=Pr.deltaX;Kr&&(Yt({currentTarget:zr,scrollLeft:zr.scrollLeft+Kr}),In.preventDefault())}return(hr=Qn.current)===null||hr===void 0||hr.addEventListener("wheel",lr,{passive:!1}),function(){var In;(In=Qn.current)===null||In===void 0||In.removeEventListener("wheel",lr)}},[]);var gr=f.useMemo(function(){return lt.every(function(hr){return hr.width})},[lt]),dn=lt[lt.length-1],fr={fixed:dn?dn.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Pn,"-cell-scrollbar")}}},Hn=(0,f.useMemo)(function(){return dr?[].concat((0,Z.Z)(ot),[fr]):ot},[dr,ot]),bn=(0,f.useMemo)(function(){return dr?[].concat((0,Z.Z)(lt),[fr]):lt},[dr,lt]),On=(0,f.useMemo)(function(){var hr=gt.right,lr=gt.left;return(0,se.Z)((0,se.Z)({},gt),{},{left:Ge==="rtl"?[].concat((0,Z.Z)(lr.map(function(In){return In+dr})),[0]):lr,right:Ge==="rtl"?hr:[].concat((0,Z.Z)(hr.map(function(In){return In+dr})),[0]),isSticky:xn})},[dr,gt,xn]),nr=me(Bt,Ct);return f.createElement("div",{style:(0,se.Z)({overflow:"hidden"},xn?{top:ut,bottom:mt}:{}),ref:tr,className:U()(Ue,(0,ae.Z)({},St,!!St))},f.createElement(Jn,{style:{tableLayout:"fixed",visibility:et||nr?null:"hidden"}},(!et||!vn||gr)&&f.createElement(Re,{colWidths:nr?[].concat((0,Z.Z)(nr),[dr]):[],columCount:Ct+1,columns:bn}),cn((0,se.Z)((0,se.Z)({},Dn),{},{stickyOffsets:On,columns:Hn,flattenColumns:bn}))))}),Ee=f.memo(ve),Me=function(We){var Ue=We.cells,et=We.stickyOffsets,ot=We.flattenColumns,lt=We.rowComponent,Bt=We.cellComponent,Ct=We.onHeaderRow,gt=We.index,Ge=o(A,["prefixCls","direction"]),qe=Ge.prefixCls,ut=Ge.direction,mt;Ct&&(mt=Ct(Ue.map(function(Yt){return Yt.column}),gt));var St=F(Ue.map(function(Yt){return Yt.column}));return f.createElement(lt,mt,Ue.map(function(Yt,vn){var cn=Yt.column,Dn=It(Yt.colStart,Yt.colEnd,ot,et,ut),Vn;return cn&&cn.onHeaderCell&&(Vn=Yt.column.onHeaderCell(cn)),f.createElement(tt,(0,y.Z)({},Yt,{scope:cn.title?Yt.colSpan>1?"colgroup":"col":null,ellipsis:cn.ellipsis,align:cn.align,component:Bt,prefixCls:qe,key:St[vn]},Dn,{additionalProps:Vn,rowType:"header"}))}))},Ye=Me;function nt(ge){var We=[];function Ue(Bt,Ct){var gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;We[gt]=We[gt]||[];var Ge=Ct,qe=Bt.filter(Boolean).map(function(ut){var mt={key:ut.key,className:ut.className||"",children:ut.title,column:ut,colStart:Ge},St=1,Yt=ut.children;return Yt&&Yt.length>0&&(St=Ue(Yt,Ge,gt+1).reduce(function(vn,cn){return vn+cn},0),mt.hasSubColumns=!0),"colSpan"in ut&&(St=ut.colSpan),"rowSpan"in ut&&(mt.rowSpan=ut.rowSpan),mt.colSpan=St,mt.colEnd=mt.colStart+St-1,We[gt].push(mt),Ge+=St,St});return qe}Ue(ge,0);for(var et=We.length,ot=function(Ct){We[Ct].forEach(function(gt){!("rowSpan"in gt)&&!gt.hasSubColumns&&(gt.rowSpan=et-Ct)})},lt=0;lt<et;lt+=1)ot(lt);return We}var _t=function(We){var Ue=We.stickyOffsets,et=We.columns,ot=We.flattenColumns,lt=We.onHeaderRow,Bt=o(A,["prefixCls","getComponent"]),Ct=Bt.prefixCls,gt=Bt.getComponent,Ge=f.useMemo(function(){return nt(et)},[et]),qe=gt(["header","wrapper"],"thead"),ut=gt(["header","row"],"tr"),mt=gt(["header","cell"],"th");return f.createElement(qe,{className:"".concat(Ct,"-thead")},Ge.map(function(St,Yt){var vn=f.createElement(Ye,{key:Yt,flattenColumns:ot,cells:St,stickyOffsets:Ue,rowComponent:ut,cellComponent:mt,onHeaderRow:lt,index:Yt});return vn}))},nn=R(_t),ln=b(97347);function zt(ge,We,Ue){var et=(0,tn.g)(ge),ot=et.expandIcon,lt=et.expandedRowKeys,Bt=et.defaultExpandedRowKeys,Ct=et.defaultExpandAllRows,gt=et.expandedRowRender,Ge=et.onExpand,qe=et.onExpandedRowsChange,ut=et.childrenColumnName,mt=ot||Ze,St=ut||"children",Yt=f.useMemo(function(){return gt?"row":ge.expandable&&ge.internalHooks===x.R&&ge.expandable.__PARENT_RENDER_ICON__||We.some(function(xn){return xn&&(0,L.Z)(xn)==="object"&&xn[St]})?"nest":!1},[!!gt,We]),vn=f.useState(function(){return Bt||(Ct?_e(We,Ue,St):[])}),cn=(0,ne.Z)(vn,2),Dn=cn[0],Vn=cn[1],Pn=f.useMemo(function(){return new Set(lt||Dn||[])},[lt,Dn]),qn=f.useCallback(function(xn){var mr=Ue(xn,We.indexOf(xn)),Jn,dr=Pn.has(mr);dr?(Pn.delete(mr),Jn=(0,Z.Z)(Pn)):Jn=[].concat((0,Z.Z)(Pn),[mr]),Vn(Jn),Ge&&Ge(!dr,xn),qe&&qe(Jn)},[Ue,Pn,We,Ge,qe]);return[et,Yt,Pn,mt,St,qn]}function Jt(ge,We,Ue){var et=ge.map(function(ot,lt){return It(lt,lt,ge,We,Ue)});return(0,k.Z)(function(){return et},[et],function(ot,lt){return!(0,M.Z)(ot,lt)})}function yn(ge){var We=(0,f.useRef)(ge),Ue=(0,f.useState)({}),et=(0,ne.Z)(Ue,2),ot=et[1],lt=(0,f.useRef)(null),Bt=(0,f.useRef)([]);function Ct(gt){Bt.current.push(gt);var Ge=Promise.resolve();lt.current=Ge,Ge.then(function(){if(lt.current===Ge){var qe=Bt.current,ut=We.current;Bt.current=[],qe.forEach(function(mt){We.current=mt(We.current)}),lt.current=null,ut!==We.current&&ot({})}})}return(0,f.useEffect)(function(){return function(){lt.current=null}},[]),[We.current,Ct]}function Bn(ge){var We=(0,f.useRef)(ge||null),Ue=(0,f.useRef)();function et(){window.clearTimeout(Ue.current)}function ot(Bt){We.current=Bt,et(),Ue.current=window.setTimeout(function(){We.current=null,Ue.current=void 0},100)}function lt(){return We.current}return(0,f.useEffect)(function(){return et},[]),[ot,lt]}function mn(){var ge=f.useState(-1),We=(0,ne.Z)(ge,2),Ue=We[0],et=We[1],ot=f.useState(-1),lt=(0,ne.Z)(ot,2),Bt=lt[0],Ct=lt[1],gt=f.useCallback(function(Ge,qe){et(Ge),Ct(qe)},[]);return[Ue,Bt,gt]}var gn=b(47273),Nt=(0,gn.Z)()?window:null;function wt(ge,We){var Ue=(0,L.Z)(ge)==="object"?ge:{},et=Ue.offsetHeader,ot=et===void 0?0:et,lt=Ue.offsetSummary,Bt=lt===void 0?0:lt,Ct=Ue.offsetScroll,gt=Ct===void 0?0:Ct,Ge=Ue.getContainer,qe=Ge===void 0?function(){return Nt}:Ge,ut=qe()||Nt,mt=!!ge;return f.useMemo(function(){return{isSticky:mt,stickyClassName:mt?"".concat(We,"-sticky-holder"):"",offsetHeader:ot,offsetSummary:Bt,offsetScroll:gt,container:ut}},[mt,gt,ot,Bt,We,ut])}function qt(ge,We,Ue){var et=(0,f.useMemo)(function(){var ot=We.length,lt=function(Ge,qe,ut){for(var mt=[],St=0,Yt=Ge;Yt!==qe;Yt+=ut)mt.push(St),We[Yt].fixed&&(St+=ge[Yt]||0);return mt},Bt=lt(0,ot,1),Ct=lt(ot-1,-1,-1).reverse();return Ue==="rtl"?{left:Ct,right:Bt}:{left:Bt,right:Ct}},[ge,We,Ue]);return et}var At=qt;function Nn(ge){var We=ge.className,Ue=ge.children;return f.createElement("div",{className:We},Ue)}var Fe=Nn,Ie=b(8224),Kt=b(16089),xt=b(76846);function Zt(ge){var We=(0,xt.bn)(ge),Ue=We.getBoundingClientRect(),et=document.documentElement;return{left:Ue.left+(window.pageXOffset||et.scrollLeft)-(et.clientLeft||document.body.clientLeft||0),top:Ue.top+(window.pageYOffset||et.scrollTop)-(et.clientTop||document.body.clientTop||0)}}var Ht=function(We,Ue){var et,ot,lt=We.scrollBodyRef,Bt=We.onScroll,Ct=We.offsetScroll,gt=We.container,Ge=We.direction,qe=o(A,"prefixCls"),ut=((et=lt.current)===null||et===void 0?void 0:et.scrollWidth)||0,mt=((ot=lt.current)===null||ot===void 0?void 0:ot.clientWidth)||0,St=ut&&mt*(mt/ut),Yt=f.useRef(),vn=yn({scrollLeft:0,isHiddenScrollBar:!0}),cn=(0,ne.Z)(vn,2),Dn=cn[0],Vn=cn[1],Pn=f.useRef({delta:0,x:0}),qn=f.useState(!1),xn=(0,ne.Z)(qn,2),mr=xn[0],Jn=xn[1],dr=f.useRef(null);f.useEffect(function(){return function(){Kt.Z.cancel(dr.current)}},[]);var Qn=function(){Jn(!1)},tr=function(bn){bn.persist(),Pn.current.delta=bn.pageX-Dn.scrollLeft,Pn.current.x=0,Jn(!0),bn.preventDefault()},gr=function(bn){var On,nr=bn||((On=window)===null||On===void 0?void 0:On.event),hr=nr.buttons;if(!mr||hr===0){mr&&Jn(!1);return}var lr=Pn.current.x+bn.pageX-Pn.current.x-Pn.current.delta,In=Ge==="rtl";lr=Math.max(In?St-mt:0,Math.min(In?0:mt-St,lr));var Pr=!In||Math.abs(lr)+Math.abs(St)<mt;Pr&&(Bt({scrollLeft:lr/mt*(ut+2)}),Pn.current.x=bn.pageX)},dn=function(){Kt.Z.cancel(dr.current),dr.current=(0,Kt.Z)(function(){if(lt.current){var bn=Zt(lt.current).top,On=bn+lt.current.offsetHeight,nr=gt===window?document.documentElement.scrollTop+window.innerHeight:Zt(gt).top+gt.clientHeight;On-(0,le.Z)()<=nr||bn>=nr-Ct?Vn(function(hr){return(0,se.Z)((0,se.Z)({},hr),{},{isHiddenScrollBar:!0})}):Vn(function(hr){return(0,se.Z)((0,se.Z)({},hr),{},{isHiddenScrollBar:!1})})}})},fr=function(bn){Vn(function(On){return(0,se.Z)((0,se.Z)({},On),{},{scrollLeft:bn/ut*mt||0})})};return f.useImperativeHandle(Ue,function(){return{setScrollLeft:fr,checkScrollBarVisible:dn}}),f.useEffect(function(){var Hn=(0,Ie.Z)(document.body,"mouseup",Qn,!1),bn=(0,Ie.Z)(document.body,"mousemove",gr,!1);return dn(),function(){Hn.remove(),bn.remove()}},[St,mr]),f.useEffect(function(){if(lt.current){for(var Hn=[],bn=(0,xt.bn)(lt.current);bn;)Hn.push(bn),bn=bn.parentElement;return Hn.forEach(function(On){return On.addEventListener("scroll",dn,!1)}),window.addEventListener("resize",dn,!1),window.addEventListener("scroll",dn,!1),gt.addEventListener("scroll",dn,!1),function(){Hn.forEach(function(On){return On.removeEventListener("scroll",dn)}),window.removeEventListener("resize",dn),window.removeEventListener("scroll",dn),gt.removeEventListener("scroll",dn)}}},[gt]),f.useEffect(function(){Dn.isHiddenScrollBar||Vn(function(Hn){var bn=lt.current;return bn?(0,se.Z)((0,se.Z)({},Hn),{},{scrollLeft:bn.scrollLeft/bn.scrollWidth*bn.clientWidth}):Hn})},[Dn.isHiddenScrollBar]),ut<=mt||!St||Dn.isHiddenScrollBar?null:f.createElement("div",{style:{height:(0,le.Z)(),width:mt,bottom:Ct},className:"".concat(qe,"-sticky-scroll")},f.createElement("div",{onMouseDown:tr,ref:Yt,className:U()("".concat(qe,"-sticky-scroll-bar"),(0,ae.Z)({},"".concat(qe,"-sticky-scroll-bar-active"),mr)),style:{width:"".concat(St,"px"),transform:"translate3d(".concat(Dn.scrollLeft,"px, 0, 0)")}}))},yt=f.forwardRef(Ht);function Rt(ge){return null}var sn=Rt;function Ut(ge){return null}var Gt=Ut,Vt="rc-table",rn=[],Ft={};function De(){return"No Data"}function Ce(ge,We){var Ue=(0,se.Z)({rowKey:"key",prefixCls:Vt,emptyText:De},ge),et=Ue.prefixCls,ot=Ue.className,lt=Ue.rowClassName,Bt=Ue.style,Ct=Ue.data,gt=Ue.rowKey,Ge=Ue.scroll,qe=Ue.tableLayout,ut=Ue.direction,mt=Ue.title,St=Ue.footer,Yt=Ue.summary,vn=Ue.caption,cn=Ue.id,Dn=Ue.showHeader,Vn=Ue.components,Pn=Ue.emptyText,qn=Ue.onRow,xn=Ue.onHeaderRow,mr=Ue.onScroll,Jn=Ue.internalHooks,dr=Ue.transformColumns,Qn=Ue.internalRefs,tr=Ue.tailor,gr=Ue.getContainerWidth,dn=Ue.sticky,fr=Ue.rowHoverable,Hn=fr===void 0?!0:fr,bn=Ct||rn,On=!!bn.length,nr=Jn===x.R,hr=f.useCallback(function(Cr,Lr){return(0,N.Z)(Vn,Cr)||Lr},[Vn]),lr=f.useMemo(function(){return typeof gt=="function"?gt:function(Cr){var Lr=Cr&&Cr[gt];return Lr}},[gt]),In=hr(["body"]),Pr=mn(),zr=(0,ne.Z)(Pr,3),Kr=zr[0],ei=zr[1],Jr=zr[2],Vr=zt(Ue,bn,lr),_r=(0,ne.Z)(Vr,6),wr=_r[0],Nr=_r[1],Er=_r[2],yr=_r[3],br=_r[4],Cn=_r[5],rr=Ge==null?void 0:Ge.x,ir=f.useState(0),sr=(0,ne.Z)(ir,2),er=sr[0],vr=sr[1],Wr=(0,ln.Z)((0,se.Z)((0,se.Z)((0,se.Z)({},Ue),wr),{},{expandable:!!wr.expandedRowRender,columnTitle:wr.columnTitle,expandedKeys:Er,getRowKey:lr,onTriggerExpand:Cn,expandIcon:yr,expandIconColumnIndex:wr.expandIconColumnIndex,direction:ut,scrollWidth:nr&&tr&&typeof rr=="number"?rr:null,clientWidth:er}),nr?dr:null),Sn=(0,ne.Z)(Wr,4),zn=Sn[0],Gn=Sn[1],Dr=Sn[2],Rr=Sn[3],Br=Dr!=null?Dr:rr,oi=f.useMemo(function(){return{columns:zn,flattenColumns:Gn}},[zn,Gn]),ni=f.useRef(),Xr=f.useRef(),$r=f.useRef(),Ji=f.useRef();f.useImperativeHandle(We,function(){return{nativeElement:ni.current,scrollTo:function(Lr){var li;if($r.current instanceof HTMLElement){var xi=Lr.index,fi=Lr.top,ss=Lr.key;if(ue(fi)){var as;(as=$r.current)===null||as===void 0||as.scrollTo({top:fi})}else{var os,ls=ss!=null?ss:lr(bn[xi]);(os=$r.current.querySelector('[data-row-key="'.concat(ls,'"]')))===null||os===void 0||os.scrollIntoView()}}else(li=$r.current)!==null&&li!==void 0&&li.scrollTo&&$r.current.scrollTo(Lr)}}});var qi=f.useRef(),Ri=f.useState(!1),Oi=(0,ne.Z)(Ri,2),$i=Oi[0],ui=Oi[1],Hi=f.useState(!1),Si=(0,ne.Z)(Hi,2),Gi=Si[0],Ii=Si[1],es=f.useState(new Map),Fi=(0,ne.Z)(es,2),vs=Fi[0],Ni=Fi[1],fs=F(Gn),ts=fs.map(function(Cr){return vs.get(Cr)}),_i=f.useMemo(function(){return ts},[ts.join("_")]),Mi=At(_i,Gn,ut),ii=Ge&&ie(Ge.y),ti=Ge&&ie(Br)||!!wr.fixed,Tr=ti&&Gn.some(function(Cr){var Lr=Cr.fixed;return Lr}),xr=f.useRef(),Qr=wt(dn,et),Hr=Qr.isSticky,Gr=Qr.offsetHeader,jr=Qr.offsetSummary,mi=Qr.offsetScroll,gi=Qr.stickyClassName,wi=Qr.container,qr=f.useMemo(function(){return Yt==null?void 0:Yt(bn)},[Yt,bn]),di=(ii||Hr)&&f.isValidElement(qr)&&qr.type===$&&qr.props.fixed,Ti,Di,ds;ii&&(Di={overflowY:On?"scroll":"auto",maxHeight:Ge.y}),ti&&(Ti={overflowX:"auto"},ii||(Di={overflowY:"hidden"}),ds={width:Br===!0?"auto":Br,minWidth:"100%"});var Vi=f.useCallback(function(Cr,Lr){Ni(function(li){if(li.get(Cr)!==Lr){var xi=new Map(li);return xi.set(Cr,Lr),xi}return li})},[]),Yr=Bn(null),Fr=(0,ne.Z)(Yr,2),Zr=Fr[0],hi=Fr[1];function si(Cr,Lr){Lr&&(typeof Lr=="function"?Lr(Cr):Lr.scrollLeft!==Cr&&(Lr.scrollLeft=Cr,Lr.scrollLeft!==Cr&&setTimeout(function(){Lr.scrollLeft=Cr},0)))}var yi=(0,pe.Z)(function(Cr){var Lr=Cr.currentTarget,li=Cr.scrollLeft,xi=ut==="rtl",fi=typeof li=="number"?li:Lr.scrollLeft,ss=Lr||Ft;if(!hi()||hi()===ss){var as;Zr(ss),si(fi,Xr.current),si(fi,$r.current),si(fi,qi.current),si(fi,(as=xr.current)===null||as===void 0?void 0:as.setScrollLeft)}var os=Lr||Xr.current;if(os){var ls=nr&&tr&&typeof Br=="number"?Br:os.scrollWidth,Vs=os.clientWidth;if(ls===Vs){ui(!1),Ii(!1);return}xi?(ui(-fi<ls-Vs),Ii(-fi>0)):(ui(fi>0),Ii(fi<ls-Vs))}}),ai=(0,pe.Z)(function(Cr){yi(Cr),mr==null||mr(Cr)}),ci=function(){if(ti&&$r.current){var Lr;yi({currentTarget:(0,xt.bn)($r.current),scrollLeft:(Lr=$r.current)===null||Lr===void 0?void 0:Lr.scrollLeft})}else ui(!1),Ii(!1)},Ds=function(Lr){var li,xi=Lr.width;(li=xr.current)===null||li===void 0||li.checkScrollBarVisible();var fi=ni.current?ni.current.offsetWidth:xi;nr&&gr&&ni.current&&(fi=gr(ni.current,fi)||fi),fi!==er&&(ci(),vr(fi))},Xt=f.useRef(!1);f.useEffect(function(){Xt.current&&ci()},[ti,Ct,zn.length]),f.useEffect(function(){Xt.current=!0},[]);var Bi=f.useState(0),ns=(0,ne.Z)(Bi,2),rs=ns[0],ea=ns[1],Us=f.useState(!0),Ks=(0,ne.Z)(Us,2),ta=Ks[0],Sa=Ks[1];(0,te.Z)(function(){(!tr||!nr)&&($r.current instanceof Element?ea((0,le.o)($r.current).width):ea((0,le.o)(Ji.current).width)),Sa((0,re.G)("position","sticky"))},[]),f.useEffect(function(){nr&&Qn&&(Qn.body.current=$r.current)});var Zs=f.useCallback(function(Cr){return f.createElement(f.Fragment,null,f.createElement(nn,Cr),di==="top"&&f.createElement(fe,Cr,qr))},[di,qr]),_s=f.useCallback(function(Cr){return f.createElement(fe,Cr,qr)},[qr]),is=hr(["table"],"table"),Cs=f.useMemo(function(){return qe||(Tr?Br==="max-content"?"auto":"fixed":ii||Hr||Gn.some(function(Cr){var Lr=Cr.ellipsis;return Lr})?"fixed":"auto")},[ii,Tr,Gn,qe,Hr]),zs,$s={colWidths:_i,columCount:Gn.length,stickyOffsets:Mi,onHeaderRow:xn,fixHeader:ii,scroll:Ge},na=f.useMemo(function(){return On?null:typeof Pn=="function"?Pn():Pn},[On,Pn]),Hs=f.createElement(Lt,{data:bn,measureColumnWidth:ii||ti||Hr}),Rs=f.createElement(Re,{colWidths:Gn.map(function(Cr){var Lr=Cr.width;return Lr}),columns:Gn}),ys=vn!=null?f.createElement("caption",{className:"".concat(et,"-caption")},vn):void 0,Es=(0,Pe.Z)(Ue,{data:!0}),ra=(0,Pe.Z)(Ue,{aria:!0});if(ii||Hr){var Is;typeof In=="function"?(Is=In(bn,{scrollbarSize:rs,ref:$r,onScroll:yi}),$s.colWidths=Gn.map(function(Cr,Lr){var li=Cr.width,xi=Lr===Gn.length-1?li-rs:li;return typeof xi=="number"&&!Number.isNaN(xi)?xi:0})):Is=f.createElement("div",{style:(0,se.Z)((0,se.Z)({},Ti),Di),onScroll:ai,ref:$r,className:U()("".concat(et,"-body"))},f.createElement(is,(0,y.Z)({style:(0,se.Z)((0,se.Z)({},ds),{},{tableLayout:Cs})},ra),ys,Rs,Hs,!di&&qr&&f.createElement(fe,{stickyOffsets:Mi,flattenColumns:Gn},qr)));var Gs=(0,se.Z)((0,se.Z)((0,se.Z)({noData:!bn.length,maxContentScroll:ti&&Br==="max-content"},$s),oi),{},{direction:ut,stickyClassName:gi,onScroll:yi});zs=f.createElement(f.Fragment,null,Dn!==!1&&f.createElement(Ee,(0,y.Z)({},Gs,{stickyTopOffset:Gr,className:"".concat(et,"-header"),ref:Xr}),Zs),Is,di&&di!=="top"&&f.createElement(Ee,(0,y.Z)({},Gs,{stickyBottomOffset:jr,className:"".concat(et,"-summary"),ref:qi}),_s),Hr&&$r.current&&$r.current instanceof Element&&f.createElement(yt,{ref:xr,offsetScroll:mi,scrollBodyRef:$r,onScroll:yi,container:wi,direction:ut}))}else zs=f.createElement("div",{style:(0,se.Z)((0,se.Z)({},Ti),Di),className:U()("".concat(et,"-content")),onScroll:yi,ref:$r},f.createElement(is,(0,y.Z)({style:(0,se.Z)((0,se.Z)({},ds),{},{tableLayout:Cs})},ra),ys,Rs,Dn!==!1&&f.createElement(nn,(0,y.Z)({},$s,oi)),Hs,qr&&f.createElement(fe,{stickyOffsets:Mi,flattenColumns:Gn},qr)));var bs=f.createElement("div",(0,y.Z)({className:U()(et,ot,(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(et,"-rtl"),ut==="rtl"),"".concat(et,"-ping-left"),$i),"".concat(et,"-ping-right"),Gi),"".concat(et,"-layout-fixed"),qe==="fixed"),"".concat(et,"-fixed-header"),ii),"".concat(et,"-fixed-column"),Tr),"".concat(et,"-fixed-column-gapped"),Tr&&Rr),"".concat(et,"-scroll-horizontal"),ti),"".concat(et,"-has-fix-left"),Gn[0]&&Gn[0].fixed),"".concat(et,"-has-fix-right"),Gn[Gn.length-1]&&Gn[Gn.length-1].fixed==="right")),style:Bt,id:cn,ref:ni},Es),mt&&f.createElement(Fe,{className:"".concat(et,"-title")},mt(bn)),f.createElement("div",{ref:Ji,className:"".concat(et,"-container")},zs),St&&f.createElement(Fe,{className:"".concat(et,"-footer")},St(bn)));ti&&(bs=f.createElement(q.Z,{onResize:Ds},bs));var ia=Jt(Gn,Mi,ut),Ls=f.useMemo(function(){return{scrollX:Br,prefixCls:et,getComponent:hr,scrollbarSize:rs,direction:ut,fixedInfoList:ia,isSticky:Hr,supportSticky:ta,componentWidth:er,fixHeader:ii,fixColumn:Tr,horizonScroll:ti,tableLayout:Cs,rowClassName:lt,expandedRowClassName:wr.expandedRowClassName,expandIcon:yr,expandableType:Nr,expandRowByClick:wr.expandRowByClick,expandedRowRender:wr.expandedRowRender,onTriggerExpand:Cn,expandIconColumnIndex:wr.expandIconColumnIndex,indentSize:wr.indentSize,allColumnsFixedLeft:Gn.every(function(Cr){return Cr.fixed==="left"}),emptyNode:na,columns:zn,flattenColumns:Gn,onColumnResize:Vi,hoverStartRow:Kr,hoverEndRow:ei,onHover:Jr,rowExpandable:wr.rowExpandable,onRow:qn,getRowKey:lr,expandedKeys:Er,childrenColumnName:br,rowHoverable:Hn}},[Br,et,hr,rs,ut,ia,Hr,ta,er,ii,Tr,ti,Cs,lt,wr.expandedRowClassName,yr,Nr,wr.expandRowByClick,wr.expandedRowRender,Cn,wr.expandIconColumnIndex,wr.indentSize,na,zn,Gn,Vi,Kr,ei,Jr,wr.rowExpandable,qn,lr,Er,br,Hn]);return f.createElement(A.Provider,{value:Ls},bs)}var ct=f.forwardRef(Ce);function at(ge){return G(ct,ge)}var Ot=at();Ot.EXPAND_COLUMN=x.w,Ot.INTERNAL_HOOKS=x.R,Ot.Column=sn,Ot.ColumnGroup=Gt,Ot.Summary=he;var Wt=Ot,jt=b(6790),on=Q(null),_n=Q(null);function un(ge,We,Ue){var et=We||1;return Ue[ge+et]-(Ue[ge]||0)}function Wn(ge){var We=ge.rowInfo,Ue=ge.column,et=ge.colIndex,ot=ge.indent,lt=ge.index,Bt=ge.component,Ct=ge.renderIndex,gt=ge.record,Ge=ge.style,qe=ge.className,ut=ge.inverse,mt=ge.getHeight,St=Ue.render,Yt=Ue.dataIndex,vn=Ue.className,cn=Ue.width,Dn=o(_n,["columnsOffset"]),Vn=Dn.columnsOffset,Pn=Xe(We,Ue,et,ot,lt),qn=Pn.key,xn=Pn.fixedInfo,mr=Pn.appendCellNode,Jn=Pn.additionalCellProps,dr=Jn.style,Qn=Jn.colSpan,tr=Qn===void 0?1:Qn,gr=Jn.rowSpan,dn=gr===void 0?1:gr,fr=et-1,Hn=un(fr,tr,Vn),bn=tr>1?cn-Hn:0,On=(0,se.Z)((0,se.Z)((0,se.Z)({},dr),Ge),{},{flex:"0 0 ".concat(Hn,"px"),width:"".concat(Hn,"px"),marginRight:bn,pointerEvents:"auto"}),nr=f.useMemo(function(){return ut?dn<=1:tr===0||dn===0||dn>1},[dn,tr,ut]);nr?On.visibility="hidden":ut&&(On.height=mt==null?void 0:mt(dn));var hr=nr?function(){return null}:St,lr={};return(dn===0||tr===0)&&(lr.rowSpan=1,lr.colSpan=1),f.createElement(tt,(0,y.Z)({className:U()(vn,qe),ellipsis:Ue.ellipsis,align:Ue.align,scope:Ue.rowScope,component:Bt,prefixCls:We.prefixCls,key:qn,record:gt,index:lt,renderIndex:Ct,dataIndex:Yt,render:hr,shouldCellUpdate:Ue.shouldCellUpdate},xn,{appendNode:mr,additionalProps:(0,se.Z)((0,se.Z)({},Jn),{},{style:On},lr)}))}var An=Wn,wn=["data","index","className","rowKey","style","extra","getHeight"],Mn=f.forwardRef(function(ge,We){var Ue=ge.data,et=ge.index,ot=ge.className,lt=ge.rowKey,Bt=ge.style,Ct=ge.extra,gt=ge.getHeight,Ge=(0,de.Z)(ge,wn),qe=Ue.record,ut=Ue.indent,mt=Ue.index,St=o(A,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Yt=St.scrollX,vn=St.flattenColumns,cn=St.prefixCls,Dn=St.fixColumn,Vn=St.componentWidth,Pn=o(on,["getComponent"]),qn=Pn.getComponent,xn=Te(qe,lt,et,ut),mr=qn(["body","row"],"div"),Jn=qn(["body","cell"],"div"),dr=xn.rowSupportExpand,Qn=xn.expanded,tr=xn.rowProps,gr=xn.expandedRowRender,dn=xn.expandedRowClassName,fr;if(dr&&Qn){var Hn=gr(qe,et,ut+1,Qn),bn=ft(dn,qe,et,ut),On={};Dn&&(On={style:(0,ae.Z)({},"--virtual-width","".concat(Vn,"px"))});var nr="".concat(cn,"-expanded-row-cell");fr=f.createElement(mr,{className:U()("".concat(cn,"-expanded-row"),"".concat(cn,"-expanded-row-level-").concat(ut+1),bn)},f.createElement(tt,{component:Jn,prefixCls:cn,className:U()(nr,(0,ae.Z)({},"".concat(nr,"-fixed"),Dn)),additionalProps:On},Hn))}var hr=(0,se.Z)((0,se.Z)({},Bt),{},{width:Yt});Ct&&(hr.position="absolute",hr.pointerEvents="none");var lr=f.createElement(mr,(0,y.Z)({},tr,Ge,{"data-row-key":lt,ref:dr?null:We,className:U()(ot,"".concat(cn,"-row"),tr==null?void 0:tr.className,(0,ae.Z)({},"".concat(cn,"-row-extra"),Ct)),style:(0,se.Z)((0,se.Z)({},hr),tr==null?void 0:tr.style)}),vn.map(function(In,Pr){return f.createElement(An,{key:Pr,component:Jn,rowInfo:xn,column:In,colIndex:Pr,indent:ut,index:et,renderIndex:mt,record:qe,inverse:Ct,getHeight:gt})}));return dr?f.createElement("div",{ref:We},lr,fr):lr}),Ln=R(Mn),jn=Ln,Tn=f.forwardRef(function(ge,We){var Ue=ge.data,et=ge.onScroll,ot=o(A,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),lt=ot.flattenColumns,Bt=ot.onColumnResize,Ct=ot.getRowKey,gt=ot.expandedKeys,Ge=ot.prefixCls,qe=ot.childrenColumnName,ut=ot.scrollX,mt=ot.direction,St=o(on),Yt=St.sticky,vn=St.scrollY,cn=St.listItemHeight,Dn=St.getComponent,Vn=St.onScroll,Pn=f.useRef(),qn=Ne(Ue,qe,gt,Ct),xn=f.useMemo(function(){var fr=0;return lt.map(function(Hn){var bn=Hn.width,On=Hn.key;return fr+=bn,[On,bn,fr]})},[lt]),mr=f.useMemo(function(){return xn.map(function(fr){return fr[2]})},[xn]);f.useEffect(function(){xn.forEach(function(fr){var Hn=(0,ne.Z)(fr,2),bn=Hn[0],On=Hn[1];Bt(bn,On)})},[xn]),f.useImperativeHandle(We,function(){var fr,Hn={scrollTo:function(On){var nr;(nr=Pn.current)===null||nr===void 0||nr.scrollTo(On)},nativeElement:(fr=Pn.current)===null||fr===void 0?void 0:fr.nativeElement};return Object.defineProperty(Hn,"scrollLeft",{get:function(){var On;return((On=Pn.current)===null||On===void 0?void 0:On.getScrollInfo().x)||0},set:function(On){var nr;(nr=Pn.current)===null||nr===void 0||nr.scrollTo({left:On})}}),Hn});var Jn=function(Hn,bn){var On,nr=(On=qn[bn])===null||On===void 0?void 0:On.record,hr=Hn.onCell;if(hr){var lr,In=hr(nr,bn);return(lr=In==null?void 0:In.rowSpan)!==null&&lr!==void 0?lr:1}return 1},dr=function(Hn){var bn=Hn.start,On=Hn.end,nr=Hn.getSize,hr=Hn.offsetY;if(On<0)return null;for(var lr=lt.filter(function(yr){return Jn(yr,bn)===0}),In=bn,Pr=function(br){if(lr=lr.filter(function(Cn){return Jn(Cn,br)===0}),!lr.length)return In=br,1},zr=bn;zr>=0&&!Pr(zr);zr-=1);for(var Kr=lt.filter(function(yr){return Jn(yr,On)!==1}),ei=On,Jr=function(br){if(Kr=Kr.filter(function(Cn){return Jn(Cn,br)!==1}),!Kr.length)return ei=Math.max(br-1,On),1},Vr=On;Vr<qn.length&&!Jr(Vr);Vr+=1);for(var _r=[],wr=function(br){var Cn=qn[br];if(!Cn)return 1;lt.some(function(rr){return Jn(rr,br)>1})&&_r.push(br)},Nr=In;Nr<=ei;Nr+=1)wr(Nr);var Er=_r.map(function(yr){var br=qn[yr],Cn=Ct(br.record,yr),rr=function(er){var vr=yr+er-1,Wr=Ct(qn[vr].record,vr),Sn=nr(Cn,Wr);return Sn.bottom-Sn.top},ir=nr(Cn);return f.createElement(jn,{key:yr,data:br,rowKey:Cn,index:yr,style:{top:-hr+ir.top},extra:!0,getHeight:rr})});return Er},Qn=f.useMemo(function(){return{columnsOffset:mr}},[mr]),tr="".concat(Ge,"-tbody"),gr=Dn(["body","wrapper"]),dn={};return Yt&&(dn.position="sticky",dn.bottom=0,(0,L.Z)(Yt)==="object"&&Yt.offsetScroll&&(dn.bottom=Yt.offsetScroll)),f.createElement(_n.Provider,{value:Qn},f.createElement(jt.Z,{fullHeight:!1,ref:Pn,prefixCls:"".concat(tr,"-virtual"),styles:{horizontalScrollBar:dn},className:tr,height:vn,itemHeight:cn||24,data:qn,itemKey:function(Hn){return Ct(Hn.record)},component:gr,scrollWidth:ut,direction:mt,onVirtualScroll:function(Hn){var bn,On=Hn.x;et({currentTarget:(bn=Pn.current)===null||bn===void 0?void 0:bn.nativeElement,scrollLeft:On})},onScroll:Vn,extraRender:dr},function(fr,Hn,bn){var On=Ct(fr.record,Hn);return f.createElement(jn,{data:fr,rowKey:On,index:Hn,style:bn.style})}))}),Rn=R(Tn),an=Rn,hn=function(We,Ue){var et=Ue.ref,ot=Ue.onScroll;return f.createElement(an,{ref:et,data:We,onScroll:ot})};function En(ge,We){var Ue=ge.data,et=ge.columns,ot=ge.scroll,lt=ge.sticky,Bt=ge.prefixCls,Ct=Bt===void 0?Vt:Bt,gt=ge.className,Ge=ge.listItemHeight,qe=ge.components,ut=ge.onScroll,mt=ot||{},St=mt.x,Yt=mt.y;typeof St!="number"&&(St=1),typeof Yt!="number"&&(Yt=500);var vn=(0,vt.zX)(function(Vn,Pn){return(0,N.Z)(qe,Vn)||Pn}),cn=(0,vt.zX)(ut),Dn=f.useMemo(function(){return{sticky:lt,scrollY:Yt,listItemHeight:Ge,getComponent:vn,onScroll:cn}},[lt,Yt,Ge,vn,cn]);return f.createElement(on.Provider,{value:Dn},f.createElement(Wt,(0,y.Z)({},ge,{className:U()(gt,"".concat(Ct,"-virtual")),scroll:(0,se.Z)((0,se.Z)({},ot),{},{x:St}),components:(0,se.Z)((0,se.Z)({},qe),{},{body:Ue!=null&&Ue.length?hn:void 0}),columns:et,internalHooks:x.R,tailor:!0,ref:We})))}var Yn=f.forwardRef(En);function kn(ge){return G(Yn,ge)}var $n=kn(),Ar=null},54451:function(fn,je,b){"use strict";b.d(je,{g:function(){return f},v:function(){return M}});var x=b(27247),ne=b(43079),pe=b(48736),te=["expandable"],M="RC_TABLE_INTERNAL_COL_DEFINE";function f(oe){var Q=oe.expandable,o=(0,ne.Z)(oe,te),y;return"expandable"in oe?y=(0,x.Z)((0,x.Z)({},o),Q):y=o,y.showExpandColumn===!1&&(y.expandIconColumnIndex=-1),y}},22711:function(fn,je,b){"use strict";b.r(je),b.d(je,{ResizableTextArea:function(){return Be},default:function(){return V}});var x=b(32855),ne=b(74430),pe=b(27247),te=b(3300),M=b(11913),f=b(43079),oe=b(92310),Q=b.n(oe),o=b(36901),y=b(66003),C=b(30292),h=b(18929),m=b(59301),E=b(34666),S=b(29301),I=b(34280),B=b(16089),G=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,R=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],O={},D;function A(J){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=J.getAttribute("id")||J.getAttribute("data-reactid")||J.getAttribute("name");if(H&&O[v])return O[v];var g=window.getComputedStyle(J),F=g.getPropertyValue("box-sizing")||g.getPropertyValue("-moz-box-sizing")||g.getPropertyValue("-webkit-box-sizing"),ie=parseFloat(g.getPropertyValue("padding-bottom"))+parseFloat(g.getPropertyValue("padding-top")),ue=parseFloat(g.getPropertyValue("border-bottom-width"))+parseFloat(g.getPropertyValue("border-top-width")),Le=R.map(function(rt){return"".concat(rt,":").concat(g.getPropertyValue(rt))}).join(";"),Je={sizingStyle:Le,paddingSize:ie,borderSize:ue,boxSizing:F};return H&&v&&(O[v]=Je),Je}function W(J){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;D||(D=document.createElement("textarea"),D.setAttribute("tab-index","-1"),D.setAttribute("aria-hidden","true"),D.setAttribute("name","hiddenTextarea"),document.body.appendChild(D)),J.getAttribute("wrap")?D.setAttribute("wrap",J.getAttribute("wrap")):D.removeAttribute("wrap");var F=A(J,H),ie=F.paddingSize,ue=F.borderSize,Le=F.boxSizing,Je=F.sizingStyle;D.setAttribute("style","".concat(Je,";").concat(G)),D.value=J.value||J.placeholder||"";var rt=void 0,dt=void 0,vt,be=D.scrollHeight;if(Le==="border-box"?be+=ue:Le==="content-box"&&(be-=ie),v!==null||g!==null){D.value=" ";var Tt=D.scrollHeight-ie;v!==null&&(rt=Tt*v,Le==="border-box"&&(rt=rt+ie+ue),be=Math.max(rt,be)),g!==null&&(dt=Tt*g,Le==="border-box"&&(dt=dt+ie+ue),vt=be>dt?"":"hidden",be=Math.min(dt,be))}var tt={height:be,overflowY:vt,resize:"none"};return rt&&(tt.minHeight=rt),dt&&(tt.maxHeight=dt),tt}var X=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Y=0,L=1,se=2,ae=m.forwardRef(function(J,H){var v=J,g=v.prefixCls,F=v.defaultValue,ie=v.value,ue=v.autoSize,Le=v.onResize,Je=v.className,rt=v.style,dt=v.disabled,vt=v.onChange,be=v.onInternalAutoSize,Tt=(0,f.Z)(v,X),tt=(0,h.Z)(F,{value:ie,postState:function(Pt){return Pt!=null?Pt:""}}),It=(0,M.Z)(tt,2),Qe=It[0],$e=It[1],ye=function(Pt){$e(Pt.target.value),vt==null||vt(Pt)},de=m.useRef();m.useImperativeHandle(H,function(){return{textArea:de.current}});var K=m.useMemo(function(){return ue&&(0,E.Z)(ue)==="object"?[ue.minRows,ue.maxRows]:[]},[ue]),xe=(0,M.Z)(K,2),Se=xe[0],$=xe[1],P=!!ue,fe=function(){try{if(document.activeElement===de.current){var Pt=de.current,Mt=Pt.selectionStart,st=Pt.selectionEnd,Qt=Pt.scrollTop;de.current.setSelectionRange(Mt,st),de.current.scrollTop=Qt}}catch(pn){}},he=m.useState(se),q=(0,M.Z)(he,2),re=q[0],le=q[1],Pe=m.useState(),Ae=(0,M.Z)(Pe,2),Ne=Ae[0],Te=Ae[1],He=function(){le(Y)};(0,I.Z)(function(){P&&He()},[ie,Se,$,P]),(0,I.Z)(function(){if(re===Y)le(L);else if(re===L){var Ve=W(de.current,!1,Se,$);le(se),Te(Ve)}else fe()},[re]);var Ke=m.useRef(),Ze=function(){B.Z.cancel(Ke.current)},_e=function(Pt){re===se&&(Le==null||Le(Pt),ue&&(Ze(),Ke.current=(0,B.Z)(function(){He()})))};m.useEffect(function(){return Ze},[]);var ft=P?Ne:null,Xe=(0,pe.Z)((0,pe.Z)({},rt),ft);return(re===Y||re===L)&&(Xe.overflowY="hidden",Xe.overflowX="hidden"),m.createElement(S.Z,{onResize:_e,disabled:!(ue||Le)},m.createElement("textarea",(0,x.Z)({},Tt,{ref:de,style:Xe,className:Q()(g,Je,(0,ne.Z)({},"".concat(g,"-disabled"),dt)),disabled:dt,value:Qe,onChange:ye})))}),Be=ae,U=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],k=m.forwardRef(function(J,H){var v,g=J.defaultValue,F=J.value,ie=J.onFocus,ue=J.onBlur,Le=J.onChange,Je=J.allowClear,rt=J.maxLength,dt=J.onCompositionStart,vt=J.onCompositionEnd,be=J.suffix,Tt=J.prefixCls,tt=Tt===void 0?"rc-textarea":Tt,It=J.showCount,Qe=J.count,$e=J.className,ye=J.style,de=J.disabled,K=J.hidden,xe=J.classNames,Se=J.styles,$=J.onResize,P=J.onClear,fe=J.onPressEnter,he=J.readOnly,q=J.autoSize,re=J.onKeyDown,le=(0,f.Z)(J,U),Pe=(0,h.Z)(g,{value:F,defaultValue:g}),Ae=(0,M.Z)(Pe,2),Ne=Ae[0],Te=Ae[1],He=Ne==null?"":String(Ne),Ke=m.useState(!1),Ze=(0,M.Z)(Ke,2),_e=Ze[0],ft=Ze[1],Xe=m.useRef(!1),Ve=m.useState(null),Pt=(0,M.Z)(Ve,2),Mt=Pt[0],st=Pt[1],Qt=(0,m.useRef)(null),pn=(0,m.useRef)(null),Lt=function(){var qt;return(qt=pn.current)===null||qt===void 0?void 0:qt.textArea},tn=function(){Lt().focus()};(0,m.useImperativeHandle)(H,function(){var wt;return{resizableTextArea:pn.current,focus:tn,blur:function(){Lt().blur()},nativeElement:((wt=Qt.current)===null||wt===void 0?void 0:wt.nativeElement)||Lt()}}),(0,m.useEffect)(function(){ft(function(wt){return!de&&wt})},[de]);var ze=m.useState(null),ke=(0,M.Z)(ze,2),Re=ke[0],Z=ke[1];m.useEffect(function(){if(Re){var wt;(wt=Lt()).setSelectionRange.apply(wt,(0,te.Z)(Re))}},[Re]);var ee=(0,y.Z)(Qe,It),me=(v=ee.max)!==null&&v!==void 0?v:rt,ve=Number(me)>0,Ee=ee.strategy(He),Me=!!me&&Ee>me,Ye=function(qt,At){var Nn=At;!Xe.current&&ee.exceedFormatter&&ee.max&&ee.strategy(At)>ee.max&&(Nn=ee.exceedFormatter(At,{max:ee.max}),At!==Nn&&Z([Lt().selectionStart||0,Lt().selectionEnd||0])),Te(Nn),(0,C.rJ)(qt.currentTarget,qt,Le,Nn)},nt=function(qt){Xe.current=!0,dt==null||dt(qt)},_t=function(qt){Xe.current=!1,Ye(qt,qt.currentTarget.value),vt==null||vt(qt)},nn=function(qt){Ye(qt,qt.target.value)},ln=function(qt){qt.key==="Enter"&&fe&&fe(qt),re==null||re(qt)},zt=function(qt){ft(!0),ie==null||ie(qt)},Jt=function(qt){ft(!1),ue==null||ue(qt)},yn=function(qt){Te(""),tn(),(0,C.rJ)(Lt(),qt,Le)},Bn=be,mn;ee.show&&(ee.showFormatter?mn=ee.showFormatter({value:He,count:Ee,maxLength:me}):mn="".concat(Ee).concat(ve?" / ".concat(me):""),Bn=m.createElement(m.Fragment,null,Bn,m.createElement("span",{className:Q()("".concat(tt,"-data-count"),xe==null?void 0:xe.count),style:Se==null?void 0:Se.count},mn)));var gn=function(qt){var At;$==null||$(qt),(At=Lt())!==null&&At!==void 0&&At.style.height&&st(!0)},Nt=!q&&!It&&!Je;return m.createElement(o.BaseInput,{ref:Qt,value:He,allowClear:Je,handleReset:yn,suffix:Bn,prefixCls:tt,classNames:(0,pe.Z)((0,pe.Z)({},xe),{},{affixWrapper:Q()(xe==null?void 0:xe.affixWrapper,(0,ne.Z)((0,ne.Z)({},"".concat(tt,"-show-count"),It),"".concat(tt,"-textarea-allow-clear"),Je))}),disabled:de,focused:_e,className:Q()($e,Me&&"".concat(tt,"-out-of-range")),style:(0,pe.Z)((0,pe.Z)({},ye),Mt&&!Nt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof mn=="string"?mn:void 0}},hidden:K,readOnly:he,onClear:P},m.createElement(Be,(0,x.Z)({},le,{autoSize:q,maxLength:rt,onKeyDown:ln,onChange:nn,onFocus:zt,onBlur:Jt,onCompositionStart:nt,onCompositionEnd:_t,className:Q()(xe==null?void 0:xe.textarea),style:(0,pe.Z)((0,pe.Z)({},Se==null?void 0:Se.textarea),{},{resize:ye==null?void 0:ye.resize}),disabled:de,prefixCls:tt,onResize:gn,ref:pn,readOnly:he})))}),N=k,V=N},29125:function(fn,je,b){"use strict";b.d(je,{G:function(){return te},Z:function(){return G}});var x=b(92310),ne=b.n(x),pe=b(59301);function te(R){var O=R.children,D=R.prefixCls,A=R.id,W=R.overlayInnerStyle,X=R.bodyClassName,Y=R.className,L=R.style;return pe.createElement("div",{className:ne()("".concat(D,"-content"),Y),style:L},pe.createElement("div",{className:ne()("".concat(D,"-inner"),X),id:A,role:"tooltip",style:W},typeof O=="function"?O():O))}var M=b(32855),f=b(27247),oe=b(43079),Q=b(65030),o={shiftX:64,adjustY:1},y={adjustX:1,shiftY:!0},C=[0,0],h={left:{points:["cr","cl"],overflow:y,offset:[-4,0],targetOffset:C},right:{points:["cl","cr"],overflow:y,offset:[4,0],targetOffset:C},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:C},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:C},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:C},leftTop:{points:["tr","tl"],overflow:y,offset:[-4,0],targetOffset:C},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:C},rightTop:{points:["tl","tr"],overflow:y,offset:[4,0],targetOffset:C},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:C},rightBottom:{points:["bl","br"],overflow:y,offset:[4,0],targetOffset:C},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:C},leftBottom:{points:["br","bl"],overflow:y,offset:[-4,0],targetOffset:C}},m=null,E=b(80402),S=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],I=function(O,D){var A=O.overlayClassName,W=O.trigger,X=W===void 0?["hover"]:W,Y=O.mouseEnterDelay,L=Y===void 0?0:Y,se=O.mouseLeaveDelay,ae=se===void 0?.1:se,Be=O.overlayStyle,U=O.prefixCls,k=U===void 0?"rc-tooltip":U,N=O.children,V=O.onVisibleChange,J=O.afterVisibleChange,H=O.transitionName,v=O.animation,g=O.motion,F=O.placement,ie=F===void 0?"right":F,ue=O.align,Le=ue===void 0?{}:ue,Je=O.destroyTooltipOnHide,rt=Je===void 0?!1:Je,dt=O.defaultVisible,vt=O.getTooltipContainer,be=O.overlayInnerStyle,Tt=O.arrowContent,tt=O.overlay,It=O.id,Qe=O.showArrow,$e=Qe===void 0?!0:Qe,ye=O.classNames,de=O.styles,K=(0,oe.Z)(O,S),xe=(0,E.Z)(It),Se=(0,pe.useRef)(null);(0,pe.useImperativeHandle)(D,function(){return Se.current});var $=(0,f.Z)({},K);"visible"in O&&($.popupVisible=O.visible);var P=function(){return pe.createElement(te,{key:"content",prefixCls:k,id:xe,bodyClassName:ye==null?void 0:ye.body,overlayInnerStyle:(0,f.Z)((0,f.Z)({},be),de==null?void 0:de.body)},tt)},fe=function(){var q=pe.Children.only(N),re=(q==null?void 0:q.props)||{},le=(0,f.Z)((0,f.Z)({},re),{},{"aria-describedby":tt?xe:null});return pe.cloneElement(N,le)};return pe.createElement(Q.Z,(0,M.Z)({popupClassName:ne()(A,ye==null?void 0:ye.root),prefixCls:k,popup:P,action:X,builtinPlacements:h,popupPlacement:ie,ref:Se,popupAlign:Le,getPopupContainer:vt,onPopupVisibleChange:V,afterPopupVisibleChange:J,popupTransitionName:H,popupAnimation:v,popupMotion:g,defaultPopupVisible:dt,autoDestroy:rt,mouseLeaveDelay:ae,popupStyle:(0,f.Z)((0,f.Z)({},Be),de==null?void 0:de.root),mouseEnterDelay:L,arrow:$e},$),fe())},B=(0,pe.forwardRef)(I),G=B},639:function(fn,je,b){"use strict";b.d(je,{Z:function(){return O}});var x=b(32855),ne=b(74430),pe=b(27247),te=b(11913),M=b(43079),f=b(59301),oe=b(92310),Q=b.n(oe),o=b(26112),y=b(30699),C=function(A){for(var W=A.prefixCls,X=A.level,Y=A.isStart,L=A.isEnd,se="".concat(W,"-indent-unit"),ae=[],Be=0;Be<X;Be+=1)ae.push(f.createElement("span",{key:Be,className:Q()(se,(0,ne.Z)((0,ne.Z)({},"".concat(se,"-start"),Y[Be]),"".concat(se,"-end"),L[Be]))}));return f.createElement("span",{"aria-hidden":"true",className:"".concat(W,"-indent")},ae)},h=f.memo(C),m=b(65065),E=b(34061),S=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],I="open",B="close",G="---",R=function(A){var W,X,Y,L=A.eventKey,se=A.className,ae=A.style,Be=A.dragOver,U=A.dragOverGapTop,k=A.dragOverGapBottom,N=A.isLeaf,V=A.isStart,J=A.isEnd,H=A.expanded,v=A.selected,g=A.checked,F=A.halfChecked,ie=A.loading,ue=A.domRef,Le=A.active,Je=A.data,rt=A.onMouseMove,dt=A.selectable,vt=(0,M.Z)(A,S),be=f.useContext(y.k),Tt=f.useContext(y.y),tt=f.useRef(null),It=f.useState(!1),Qe=(0,te.Z)(It,2),$e=Qe[0],ye=Qe[1],de=!!(be.disabled||A.disabled||(W=Tt.nodeDisabled)!==null&&W!==void 0&&W.call(Tt,Je)),K=f.useMemo(function(){return!be.checkable||A.checkable===!1?!1:be.checkable},[be.checkable,A.checkable]),xe=function(Ee){de||be.onNodeSelect(Ee,(0,E.F)(A))},Se=function(Ee){de||!K||A.disableCheckbox||be.onNodeCheck(Ee,(0,E.F)(A),!g)},$=f.useMemo(function(){return typeof dt=="boolean"?dt:be.selectable},[dt,be.selectable]),P=function(Ee){be.onNodeClick(Ee,(0,E.F)(A)),$?xe(Ee):Se(Ee)},fe=function(Ee){be.onNodeDoubleClick(Ee,(0,E.F)(A))},he=function(Ee){be.onNodeMouseEnter(Ee,(0,E.F)(A))},q=function(Ee){be.onNodeMouseLeave(Ee,(0,E.F)(A))},re=function(Ee){be.onNodeContextMenu(Ee,(0,E.F)(A))},le=f.useMemo(function(){return!!(be.draggable&&(!be.draggable.nodeDraggable||be.draggable.nodeDraggable(Je)))},[be.draggable,Je]),Pe=function(Ee){Ee.stopPropagation(),ye(!0),be.onNodeDragStart(Ee,A);try{Ee.dataTransfer.setData("text/plain","")}catch(Me){}},Ae=function(Ee){Ee.preventDefault(),Ee.stopPropagation(),be.onNodeDragEnter(Ee,A)},Ne=function(Ee){Ee.preventDefault(),Ee.stopPropagation(),be.onNodeDragOver(Ee,A)},Te=function(Ee){Ee.stopPropagation(),be.onNodeDragLeave(Ee,A)},He=function(Ee){Ee.stopPropagation(),ye(!1),be.onNodeDragEnd(Ee,A)},Ke=function(Ee){Ee.preventDefault(),Ee.stopPropagation(),ye(!1),be.onNodeDrop(Ee,A)},Ze=function(Ee){ie||be.onNodeExpand(Ee,(0,E.F)(A))},_e=f.useMemo(function(){var ve=(0,m.Z)(be.keyEntities,L)||{},Ee=ve.children;return!!(Ee||[]).length},[be.keyEntities,L]),ft=f.useMemo(function(){return N===!1?!1:N||!be.loadData&&!_e||be.loadData&&A.loaded&&!_e},[N,be.loadData,_e,A.loaded]);f.useEffect(function(){ie||typeof be.loadData=="function"&&H&&!ft&&!A.loaded&&be.onNodeLoad((0,E.F)(A))},[ie,be.loadData,be.onNodeLoad,H,ft,A]);var Xe=f.useMemo(function(){var ve;return(ve=be.draggable)!==null&&ve!==void 0&&ve.icon?f.createElement("span",{className:"".concat(be.prefixCls,"-draggable-icon")},be.draggable.icon):null},[be.draggable]),Ve=function(Ee){var Me=A.switcherIcon||be.switcherIcon;return typeof Me=="function"?Me((0,pe.Z)((0,pe.Z)({},A),{},{isLeaf:Ee})):Me},Pt=function(){if(ft){var Ee=Ve(!0);return Ee!==!1?f.createElement("span",{className:Q()("".concat(be.prefixCls,"-switcher"),"".concat(be.prefixCls,"-switcher-noop"))},Ee):null}var Me=Ve(!1);return Me!==!1?f.createElement("span",{onClick:Ze,className:Q()("".concat(be.prefixCls,"-switcher"),"".concat(be.prefixCls,"-switcher_").concat(H?I:B))},Me):null},Mt=f.useMemo(function(){if(!K)return null;var ve=typeof K!="boolean"?K:null;return f.createElement("span",{className:Q()("".concat(be.prefixCls,"-checkbox"),(0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(be.prefixCls,"-checkbox-checked"),g),"".concat(be.prefixCls,"-checkbox-indeterminate"),!g&&F),"".concat(be.prefixCls,"-checkbox-disabled"),de||A.disableCheckbox)),onClick:Se,role:"checkbox","aria-checked":F?"mixed":g,"aria-disabled":de||A.disableCheckbox,"aria-label":"Select ".concat(typeof A.title=="string"?A.title:"tree node")},ve)},[K,g,F,de,A.disableCheckbox,A.title]),st=f.useMemo(function(){return ft?null:H?I:B},[ft,H]),Qt=f.useMemo(function(){return f.createElement("span",{className:Q()("".concat(be.prefixCls,"-iconEle"),"".concat(be.prefixCls,"-icon__").concat(st||"docu"),(0,ne.Z)({},"".concat(be.prefixCls,"-icon_loading"),ie))})},[be.prefixCls,st,ie]),pn=f.useMemo(function(){var ve=!!be.draggable,Ee=!A.disabled&&ve&&be.dragOverNodeKey===L;return Ee?be.dropIndicatorRender({dropPosition:be.dropPosition,dropLevelOffset:be.dropLevelOffset,indent:be.indent,prefixCls:be.prefixCls,direction:be.direction}):null},[be.dropPosition,be.dropLevelOffset,be.indent,be.prefixCls,be.direction,be.draggable,be.dragOverNodeKey,be.dropIndicatorRender]),Lt=f.useMemo(function(){var ve=A.title,Ee=ve===void 0?G:ve,Me="".concat(be.prefixCls,"-node-content-wrapper"),Ye;if(be.showIcon){var nt=A.icon||be.icon;Ye=nt?f.createElement("span",{className:Q()("".concat(be.prefixCls,"-iconEle"),"".concat(be.prefixCls,"-icon__customize"))},typeof nt=="function"?nt(A):nt):Qt}else be.loadData&&ie&&(Ye=Qt);var _t;return typeof Ee=="function"?_t=Ee(Je):be.titleRender?_t=be.titleRender(Je):_t=Ee,f.createElement("span",{ref:tt,title:typeof Ee=="string"?Ee:"",className:Q()(Me,"".concat(Me,"-").concat(st||"normal"),(0,ne.Z)({},"".concat(be.prefixCls,"-node-selected"),!de&&(v||$e))),onMouseEnter:he,onMouseLeave:q,onContextMenu:re,onClick:P,onDoubleClick:fe},Ye,f.createElement("span",{className:"".concat(be.prefixCls,"-title")},_t),pn)},[be.prefixCls,be.showIcon,A,be.icon,Qt,be.titleRender,Je,st,he,q,re,P,fe]),tn=(0,o.Z)(vt,{aria:!0,data:!0}),ze=(0,m.Z)(be.keyEntities,L)||{},ke=ze.level,Re=J[J.length-1],Z=!de&&le,ee=be.draggingNodeKey===L,me=dt!==void 0?{"aria-selected":!!dt}:void 0;return f.createElement("div",(0,x.Z)({ref:ue,role:"treeitem","aria-expanded":N?void 0:H,className:Q()(se,"".concat(be.prefixCls,"-treenode"),(Y={},(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)(Y,"".concat(be.prefixCls,"-treenode-disabled"),de),"".concat(be.prefixCls,"-treenode-switcher-").concat(H?"open":"close"),!N),"".concat(be.prefixCls,"-treenode-checkbox-checked"),g),"".concat(be.prefixCls,"-treenode-checkbox-indeterminate"),F),"".concat(be.prefixCls,"-treenode-selected"),v),"".concat(be.prefixCls,"-treenode-loading"),ie),"".concat(be.prefixCls,"-treenode-active"),Le),"".concat(be.prefixCls,"-treenode-leaf-last"),Re),"".concat(be.prefixCls,"-treenode-draggable"),le),"dragging",ee),(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)(Y,"drop-target",be.dropTargetKey===L),"drop-container",be.dropContainerKey===L),"drag-over",!de&&Be),"drag-over-gap-top",!de&&U),"drag-over-gap-bottom",!de&&k),"filter-node",(X=be.filterTreeNode)===null||X===void 0?void 0:X.call(be,(0,E.F)(A))),"".concat(be.prefixCls,"-treenode-leaf"),ft))),style:ae,draggable:Z,onDragStart:Z?Pe:void 0,onDragEnter:le?Ae:void 0,onDragOver:le?Ne:void 0,onDragLeave:le?Te:void 0,onDrop:le?Ke:void 0,onDragEnd:le?He:void 0,onMouseMove:rt},me,tn),f.createElement(h,{prefixCls:be.prefixCls,level:ke,isStart:V,isEnd:J}),Xe,Pt(),Mt,Lt)};R.isTreeNode=1;var O=R},30699:function(fn,je,b){"use strict";b.d(je,{k:function(){return ne},y:function(){return pe}});var x=b(59301),ne=x.createContext(null),pe=x.createContext({})},89149:function(fn,je,b){"use strict";b.d(je,{OF:function(){return L.Z},y6:function(){return B.y},ZP:function(){return de}});var x=b(32855),ne=b(34666),pe=b(27247),te=b(3300),M=b(33377),f=b(93912),oe=b(83383),Q=b(18881),o=b(85461),y=b(74430),C=b(92310),h=b.n(C),m=b(10228),E=b(26112),S=b(48736),I=b(59301),B=b(30699),G=function(xe){var Se=xe.dropPosition,$=xe.dropLevelOffset,P=xe.indent,fe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Se){case-1:fe.top=0,fe.left=-$*P;break;case 1:fe.bottom=0,fe.left=-$*P;break;case 0:fe.bottom=0,fe.left=P;break}return I.createElement("div",{style:fe})},R=G;function O(K){if(K==null)throw new TypeError("Cannot destructure "+K)}var D=b(11913),A=b(43079),W=b(34280),X=b(6790),Y=b(77900),L=b(639);function se(K,xe){var Se=I.useState(!1),$=(0,D.Z)(Se,2),P=$[0],fe=$[1];(0,W.Z)(function(){if(P)return K(),function(){xe()}},[P]),(0,W.Z)(function(){return fe(!0),function(){fe(!1)}},[])}var ae=se,Be=b(34061),U=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],k=I.forwardRef(function(K,xe){var Se=K.className,$=K.style,P=K.motion,fe=K.motionNodes,he=K.motionType,q=K.onMotionStart,re=K.onMotionEnd,le=K.active,Pe=K.treeNodeRequiredProps,Ae=(0,A.Z)(K,U),Ne=I.useState(!0),Te=(0,D.Z)(Ne,2),He=Te[0],Ke=Te[1],Ze=I.useContext(B.k),_e=Ze.prefixCls,ft=fe&&he!=="hide";(0,W.Z)(function(){fe&&ft!==He&&Ke(ft)},[fe]);var Xe=function(){fe&&q()},Ve=I.useRef(!1),Pt=function(){fe&&!Ve.current&&(Ve.current=!0,re())};ae(Xe,Pt);var Mt=function(Qt){ft===Qt&&Pt()};return fe?I.createElement(Y.default,(0,x.Z)({ref:xe,visible:He},P,{motionAppear:he==="show",onVisibleChanged:Mt}),function(st,Qt){var pn=st.className,Lt=st.style;return I.createElement("div",{ref:Qt,className:h()("".concat(_e,"-treenode-motion"),pn),style:Lt},fe.map(function(tn){var ze=Object.assign({},(O(tn.data),tn.data)),ke=tn.title,Re=tn.key,Z=tn.isStart,ee=tn.isEnd;delete ze.children;var me=(0,Be.H8)(Re,Pe);return I.createElement(L.Z,(0,x.Z)({},ze,me,{title:ke,active:le,data:tn.data,key:Re,isStart:Z,isEnd:ee}))}))}):I.createElement(L.Z,(0,x.Z)({domRef:xe,className:Se,style:$},Ae,{active:le}))}),N=k;function V(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Se=K.length,$=xe.length;if(Math.abs(Se-$)!==1)return{add:!1,key:null};function P(fe,he){var q=new Map;fe.forEach(function(le){q.set(le,!0)});var re=he.filter(function(le){return!q.has(le)});return re.length===1?re[0]:null}return Se<$?{add:!0,key:P(K,xe)}:{add:!1,key:P(xe,K)}}function J(K,xe,Se){var $=K.findIndex(function(q){return q.key===Se}),P=K[$+1],fe=xe.findIndex(function(q){return q.key===Se});if(P){var he=xe.findIndex(function(q){return q.key===P.key});return xe.slice(fe+1,he)}return xe.slice(fe+1)}var H=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],v={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},g=function(){},F="RC_TREE_MOTION_".concat(Math.random()),ie={key:F},ue={key:F,level:0,index:0,pos:"0",node:ie,nodes:[ie]},Le={parent:null,children:[],pos:ue.pos,data:ie,title:null,key:F,isStart:[],isEnd:[]};function Je(K,xe,Se,$){return xe===!1||!Se?K:K.slice(0,Math.ceil(Se/$)+1)}function rt(K){var xe=K.key,Se=K.pos;return(0,Be.km)(xe,Se)}function dt(K){for(var xe=String(K.data.key),Se=K;Se.parent;)Se=Se.parent,xe="".concat(Se.data.key," > ").concat(xe);return xe}var vt=I.forwardRef(function(K,xe){var Se=K.prefixCls,$=K.data,P=K.selectable,fe=K.checkable,he=K.expandedKeys,q=K.selectedKeys,re=K.checkedKeys,le=K.loadedKeys,Pe=K.loadingKeys,Ae=K.halfCheckedKeys,Ne=K.keyEntities,Te=K.disabled,He=K.dragging,Ke=K.dragOverNodeKey,Ze=K.dropPosition,_e=K.motion,ft=K.height,Xe=K.itemHeight,Ve=K.virtual,Pt=K.scrollWidth,Mt=K.focusable,st=K.activeItem,Qt=K.focused,pn=K.tabIndex,Lt=K.onKeyDown,tn=K.onFocus,ze=K.onBlur,ke=K.onActiveChange,Re=K.onListChangeStart,Z=K.onListChangeEnd,ee=(0,A.Z)(K,H),me=I.useRef(null),ve=I.useRef(null);I.useImperativeHandle(xe,function(){return{scrollTo:function(Rt){me.current.scrollTo(Rt)},getIndentWidth:function(){return ve.current.offsetWidth}}});var Ee=I.useState(he),Me=(0,D.Z)(Ee,2),Ye=Me[0],nt=Me[1],_t=I.useState($),nn=(0,D.Z)(_t,2),ln=nn[0],zt=nn[1],Jt=I.useState($),yn=(0,D.Z)(Jt,2),Bn=yn[0],mn=yn[1],gn=I.useState([]),Nt=(0,D.Z)(gn,2),wt=Nt[0],qt=Nt[1],At=I.useState(null),Nn=(0,D.Z)(At,2),Fe=Nn[0],Ie=Nn[1],Kt=I.useRef($);Kt.current=$;function xt(){var yt=Kt.current;zt(yt),mn(yt),qt([]),Ie(null),Z()}(0,W.Z)(function(){nt(he);var yt=V(Ye,he);if(yt.key!==null)if(yt.add){var Rt=ln.findIndex(function(Ft){var De=Ft.key;return De===yt.key}),sn=Je(J(ln,$,yt.key),Ve,ft,Xe),Ut=ln.slice();Ut.splice(Rt+1,0,Le),mn(Ut),qt(sn),Ie("show")}else{var Gt=$.findIndex(function(Ft){var De=Ft.key;return De===yt.key}),Vt=Je(J($,ln,yt.key),Ve,ft,Xe),rn=$.slice();rn.splice(Gt+1,0,Le),mn(rn),qt(Vt),Ie("hide")}else ln!==$&&(zt($),mn($))},[he,$]),I.useEffect(function(){He||xt()},[He]);var Zt=_e?Bn:$,Ht={expandedKeys:he,selectedKeys:q,loadedKeys:le,loadingKeys:Pe,checkedKeys:re,halfCheckedKeys:Ae,dragOverNodeKey:Ke,dropPosition:Ze,keyEntities:Ne};return I.createElement(I.Fragment,null,Qt&&st&&I.createElement("span",{style:v,"aria-live":"assertive"},dt(st)),I.createElement("div",null,I.createElement("input",{style:v,disabled:Mt===!1||Te,tabIndex:Mt!==!1?pn:null,onKeyDown:Lt,onFocus:tn,onBlur:ze,value:"",onChange:g,"aria-label":"for screen reader"})),I.createElement("div",{className:"".concat(Se,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},I.createElement("div",{className:"".concat(Se,"-indent")},I.createElement("div",{ref:ve,className:"".concat(Se,"-indent-unit")}))),I.createElement(X.Z,(0,x.Z)({},ee,{data:Zt,itemKey:rt,height:ft,fullHeight:!1,virtual:Ve,itemHeight:Xe,scrollWidth:Pt,prefixCls:"".concat(Se,"-list"),ref:me,role:"tree",onVisibleChange:function(Rt){Rt.every(function(sn){return rt(sn)!==F})&&xt()}}),function(yt){var Rt=yt.pos,sn=Object.assign({},(O(yt.data),yt.data)),Ut=yt.title,Gt=yt.key,Vt=yt.isStart,rn=yt.isEnd,Ft=(0,Be.km)(Gt,Rt);delete sn.key,delete sn.children;var De=(0,Be.H8)(Ft,Ht);return I.createElement(N,(0,x.Z)({},sn,De,{title:Ut,active:!!st&&Gt===st.key,pos:Rt,data:yt.data,isStart:Vt,isEnd:rn,motion:_e,motionNodes:Gt===F?wt:null,motionType:Fe,onMotionStart:Re,onMotionEnd:xt,treeNodeRequiredProps:Ht,onMouseMove:function(){ke(null)}}))}))}),be=vt,Tt=b(82661),tt=b(34643),It=b(65065),Qe=10,$e=function(K){(0,Q.Z)(Se,K);var xe=(0,o.Z)(Se);function Se(){var $;(0,M.Z)(this,Se);for(var P=arguments.length,fe=new Array(P),he=0;he<P;he++)fe[he]=arguments[he];return $=xe.call.apply(xe,[this].concat(fe)),(0,y.Z)((0,oe.Z)($),"destroyed",!1),(0,y.Z)((0,oe.Z)($),"delayedDragEnterLogic",void 0),(0,y.Z)((0,oe.Z)($),"loadingRetryTimes",{}),(0,y.Z)((0,oe.Z)($),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Be.w$)()}),(0,y.Z)((0,oe.Z)($),"dragStartMousePosition",null),(0,y.Z)((0,oe.Z)($),"dragNodeProps",null),(0,y.Z)((0,oe.Z)($),"currentMouseOverDroppableNodeKey",null),(0,y.Z)((0,oe.Z)($),"listRef",I.createRef()),(0,y.Z)((0,oe.Z)($),"onNodeDragStart",function(q,re){var le=$.state,Pe=le.expandedKeys,Ae=le.keyEntities,Ne=$.props.onDragStart,Te=re.eventKey;$.dragNodeProps=re,$.dragStartMousePosition={x:q.clientX,y:q.clientY};var He=(0,Tt._5)(Pe,Te);$.setState({draggingNodeKey:Te,dragChildrenKeys:(0,Tt.wA)(Te,Ae),indent:$.listRef.current.getIndentWidth()}),$.setExpandedKeys(He),window.addEventListener("dragend",$.onWindowDragEnd),Ne==null||Ne({event:q,node:(0,Be.F)(re)})}),(0,y.Z)((0,oe.Z)($),"onNodeDragEnter",function(q,re){var le=$.state,Pe=le.expandedKeys,Ae=le.keyEntities,Ne=le.dragChildrenKeys,Te=le.flattenNodes,He=le.indent,Ke=$.props,Ze=Ke.onDragEnter,_e=Ke.onExpand,ft=Ke.allowDrop,Xe=Ke.direction,Ve=re.pos,Pt=re.eventKey;if($.currentMouseOverDroppableNodeKey!==Pt&&($.currentMouseOverDroppableNodeKey=Pt),!$.dragNodeProps){$.resetDragState();return}var Mt=(0,Tt.OM)(q,$.dragNodeProps,re,He,$.dragStartMousePosition,ft,Te,Ae,Pe,Xe),st=Mt.dropPosition,Qt=Mt.dropLevelOffset,pn=Mt.dropTargetKey,Lt=Mt.dropContainerKey,tn=Mt.dropTargetPos,ze=Mt.dropAllowed,ke=Mt.dragOverNodeKey;if(Ne.includes(pn)||!ze){$.resetDragState();return}if($.delayedDragEnterLogic||($.delayedDragEnterLogic={}),Object.keys($.delayedDragEnterLogic).forEach(function(Re){clearTimeout($.delayedDragEnterLogic[Re])}),$.dragNodeProps.eventKey!==re.eventKey&&(q.persist(),$.delayedDragEnterLogic[Ve]=window.setTimeout(function(){if($.state.draggingNodeKey!==null){var Re=(0,te.Z)(Pe),Z=(0,It.Z)(Ae,re.eventKey);Z&&(Z.children||[]).length&&(Re=(0,Tt.L0)(Pe,re.eventKey)),$.props.hasOwnProperty("expandedKeys")||$.setExpandedKeys(Re),_e==null||_e(Re,{node:(0,Be.F)(re),expanded:!0,nativeEvent:q.nativeEvent})}},800)),$.dragNodeProps.eventKey===pn&&Qt===0){$.resetDragState();return}$.setState({dragOverNodeKey:ke,dropPosition:st,dropLevelOffset:Qt,dropTargetKey:pn,dropContainerKey:Lt,dropTargetPos:tn,dropAllowed:ze}),Ze==null||Ze({event:q,node:(0,Be.F)(re),expandedKeys:Pe})}),(0,y.Z)((0,oe.Z)($),"onNodeDragOver",function(q,re){var le=$.state,Pe=le.dragChildrenKeys,Ae=le.flattenNodes,Ne=le.keyEntities,Te=le.expandedKeys,He=le.indent,Ke=$.props,Ze=Ke.onDragOver,_e=Ke.allowDrop,ft=Ke.direction;if($.dragNodeProps){var Xe=(0,Tt.OM)(q,$.dragNodeProps,re,He,$.dragStartMousePosition,_e,Ae,Ne,Te,ft),Ve=Xe.dropPosition,Pt=Xe.dropLevelOffset,Mt=Xe.dropTargetKey,st=Xe.dropContainerKey,Qt=Xe.dropTargetPos,pn=Xe.dropAllowed,Lt=Xe.dragOverNodeKey;Pe.includes(Mt)||!pn||($.dragNodeProps.eventKey===Mt&&Pt===0?$.state.dropPosition===null&&$.state.dropLevelOffset===null&&$.state.dropTargetKey===null&&$.state.dropContainerKey===null&&$.state.dropTargetPos===null&&$.state.dropAllowed===!1&&$.state.dragOverNodeKey===null||$.resetDragState():Ve===$.state.dropPosition&&Pt===$.state.dropLevelOffset&&Mt===$.state.dropTargetKey&&st===$.state.dropContainerKey&&Qt===$.state.dropTargetPos&&pn===$.state.dropAllowed&&Lt===$.state.dragOverNodeKey||$.setState({dropPosition:Ve,dropLevelOffset:Pt,dropTargetKey:Mt,dropContainerKey:st,dropTargetPos:Qt,dropAllowed:pn,dragOverNodeKey:Lt}),Ze==null||Ze({event:q,node:(0,Be.F)(re)}))}}),(0,y.Z)((0,oe.Z)($),"onNodeDragLeave",function(q,re){$.currentMouseOverDroppableNodeKey===re.eventKey&&!q.currentTarget.contains(q.relatedTarget)&&($.resetDragState(),$.currentMouseOverDroppableNodeKey=null);var le=$.props.onDragLeave;le==null||le({event:q,node:(0,Be.F)(re)})}),(0,y.Z)((0,oe.Z)($),"onWindowDragEnd",function(q){$.onNodeDragEnd(q,null,!0),window.removeEventListener("dragend",$.onWindowDragEnd)}),(0,y.Z)((0,oe.Z)($),"onNodeDragEnd",function(q,re){var le=$.props.onDragEnd;$.setState({dragOverNodeKey:null}),$.cleanDragState(),le==null||le({event:q,node:(0,Be.F)(re)}),$.dragNodeProps=null,window.removeEventListener("dragend",$.onWindowDragEnd)}),(0,y.Z)((0,oe.Z)($),"onNodeDrop",function(q,re){var le,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ae=$.state,Ne=Ae.dragChildrenKeys,Te=Ae.dropPosition,He=Ae.dropTargetKey,Ke=Ae.dropTargetPos,Ze=Ae.dropAllowed;if(Ze){var _e=$.props.onDrop;if($.setState({dragOverNodeKey:null}),$.cleanDragState(),He!==null){var ft=(0,pe.Z)((0,pe.Z)({},(0,Be.H8)(He,$.getTreeNodeRequiredProps())),{},{active:((le=$.getActiveItem())===null||le===void 0?void 0:le.key)===He,data:(0,It.Z)($.state.keyEntities,He).node}),Xe=Ne.includes(He);(0,S.ZP)(!Xe,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Ve=(0,Tt.yx)(Ke),Pt={event:q,node:(0,Be.F)(ft),dragNode:$.dragNodeProps?(0,Be.F)($.dragNodeProps):null,dragNodesKeys:[$.dragNodeProps.eventKey].concat(Ne),dropToGap:Te!==0,dropPosition:Te+Number(Ve[Ve.length-1])};Pe||_e==null||_e(Pt),$.dragNodeProps=null}}}),(0,y.Z)((0,oe.Z)($),"cleanDragState",function(){var q=$.state.draggingNodeKey;q!==null&&$.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),$.dragStartMousePosition=null,$.currentMouseOverDroppableNodeKey=null}),(0,y.Z)((0,oe.Z)($),"triggerExpandActionExpand",function(q,re){var le=$.state,Pe=le.expandedKeys,Ae=le.flattenNodes,Ne=re.expanded,Te=re.key,He=re.isLeaf;if(!(He||q.shiftKey||q.metaKey||q.ctrlKey)){var Ke=Ae.filter(function(_e){return _e.key===Te})[0],Ze=(0,Be.F)((0,pe.Z)((0,pe.Z)({},(0,Be.H8)(Te,$.getTreeNodeRequiredProps())),{},{data:Ke.data}));$.setExpandedKeys(Ne?(0,Tt._5)(Pe,Te):(0,Tt.L0)(Pe,Te)),$.onNodeExpand(q,Ze)}}),(0,y.Z)((0,oe.Z)($),"onNodeClick",function(q,re){var le=$.props,Pe=le.onClick,Ae=le.expandAction;Ae==="click"&&$.triggerExpandActionExpand(q,re),Pe==null||Pe(q,re)}),(0,y.Z)((0,oe.Z)($),"onNodeDoubleClick",function(q,re){var le=$.props,Pe=le.onDoubleClick,Ae=le.expandAction;Ae==="doubleClick"&&$.triggerExpandActionExpand(q,re),Pe==null||Pe(q,re)}),(0,y.Z)((0,oe.Z)($),"onNodeSelect",function(q,re){var le=$.state.selectedKeys,Pe=$.state,Ae=Pe.keyEntities,Ne=Pe.fieldNames,Te=$.props,He=Te.onSelect,Ke=Te.multiple,Ze=re.selected,_e=re[Ne.key],ft=!Ze;ft?Ke?le=(0,Tt.L0)(le,_e):le=[_e]:le=(0,Tt._5)(le,_e);var Xe=le.map(function(Ve){var Pt=(0,It.Z)(Ae,Ve);return Pt?Pt.node:null}).filter(Boolean);$.setUncontrolledState({selectedKeys:le}),He==null||He(le,{event:"select",selected:ft,node:re,selectedNodes:Xe,nativeEvent:q.nativeEvent})}),(0,y.Z)((0,oe.Z)($),"onNodeCheck",function(q,re,le){var Pe=$.state,Ae=Pe.keyEntities,Ne=Pe.checkedKeys,Te=Pe.halfCheckedKeys,He=$.props,Ke=He.checkStrictly,Ze=He.onCheck,_e=re.key,ft,Xe={event:"check",node:re,checked:le,nativeEvent:q.nativeEvent};if(Ke){var Ve=le?(0,Tt.L0)(Ne,_e):(0,Tt._5)(Ne,_e),Pt=(0,Tt._5)(Te,_e);ft={checked:Ve,halfChecked:Pt},Xe.checkedNodes=Ve.map(function(tn){return(0,It.Z)(Ae,tn)}).filter(Boolean).map(function(tn){return tn.node}),$.setUncontrolledState({checkedKeys:Ve})}else{var Mt=(0,tt.S)([].concat((0,te.Z)(Ne),[_e]),!0,Ae),st=Mt.checkedKeys,Qt=Mt.halfCheckedKeys;if(!le){var pn=new Set(st);pn.delete(_e);var Lt=(0,tt.S)(Array.from(pn),{checked:!1,halfCheckedKeys:Qt},Ae);st=Lt.checkedKeys,Qt=Lt.halfCheckedKeys}ft=st,Xe.checkedNodes=[],Xe.checkedNodesPositions=[],Xe.halfCheckedKeys=Qt,st.forEach(function(tn){var ze=(0,It.Z)(Ae,tn);if(ze){var ke=ze.node,Re=ze.pos;Xe.checkedNodes.push(ke),Xe.checkedNodesPositions.push({node:ke,pos:Re})}}),$.setUncontrolledState({checkedKeys:st},!1,{halfCheckedKeys:Qt})}Ze==null||Ze(ft,Xe)}),(0,y.Z)((0,oe.Z)($),"onNodeLoad",function(q){var re,le=q.key,Pe=$.state.keyEntities,Ae=(0,It.Z)(Pe,le);if(!(Ae!=null&&(re=Ae.children)!==null&&re!==void 0&&re.length)){var Ne=new Promise(function(Te,He){$.setState(function(Ke){var Ze=Ke.loadedKeys,_e=Ze===void 0?[]:Ze,ft=Ke.loadingKeys,Xe=ft===void 0?[]:ft,Ve=$.props,Pt=Ve.loadData,Mt=Ve.onLoad;if(!Pt||_e.includes(le)||Xe.includes(le))return null;var st=Pt(q);return st.then(function(){var Qt=$.state.loadedKeys,pn=(0,Tt.L0)(Qt,le);Mt==null||Mt(pn,{event:"load",node:q}),$.setUncontrolledState({loadedKeys:pn}),$.setState(function(Lt){return{loadingKeys:(0,Tt._5)(Lt.loadingKeys,le)}}),Te()}).catch(function(Qt){if($.setState(function(Lt){return{loadingKeys:(0,Tt._5)(Lt.loadingKeys,le)}}),$.loadingRetryTimes[le]=($.loadingRetryTimes[le]||0)+1,$.loadingRetryTimes[le]>=Qe){var pn=$.state.loadedKeys;(0,S.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),$.setUncontrolledState({loadedKeys:(0,Tt.L0)(pn,le)}),Te()}He(Qt)}),{loadingKeys:(0,Tt.L0)(Xe,le)}})});return Ne.catch(function(){}),Ne}}),(0,y.Z)((0,oe.Z)($),"onNodeMouseEnter",function(q,re){var le=$.props.onMouseEnter;le==null||le({event:q,node:re})}),(0,y.Z)((0,oe.Z)($),"onNodeMouseLeave",function(q,re){var le=$.props.onMouseLeave;le==null||le({event:q,node:re})}),(0,y.Z)((0,oe.Z)($),"onNodeContextMenu",function(q,re){var le=$.props.onRightClick;le&&(q.preventDefault(),le({event:q,node:re}))}),(0,y.Z)((0,oe.Z)($),"onFocus",function(){var q=$.props.onFocus;$.setState({focused:!0});for(var re=arguments.length,le=new Array(re),Pe=0;Pe<re;Pe++)le[Pe]=arguments[Pe];q==null||q.apply(void 0,le)}),(0,y.Z)((0,oe.Z)($),"onBlur",function(){var q=$.props.onBlur;$.setState({focused:!1}),$.onActiveChange(null);for(var re=arguments.length,le=new Array(re),Pe=0;Pe<re;Pe++)le[Pe]=arguments[Pe];q==null||q.apply(void 0,le)}),(0,y.Z)((0,oe.Z)($),"getTreeNodeRequiredProps",function(){var q=$.state,re=q.expandedKeys,le=q.selectedKeys,Pe=q.loadedKeys,Ae=q.loadingKeys,Ne=q.checkedKeys,Te=q.halfCheckedKeys,He=q.dragOverNodeKey,Ke=q.dropPosition,Ze=q.keyEntities;return{expandedKeys:re||[],selectedKeys:le||[],loadedKeys:Pe||[],loadingKeys:Ae||[],checkedKeys:Ne||[],halfCheckedKeys:Te||[],dragOverNodeKey:He,dropPosition:Ke,keyEntities:Ze}}),(0,y.Z)((0,oe.Z)($),"setExpandedKeys",function(q){var re=$.state,le=re.treeData,Pe=re.fieldNames,Ae=(0,Be.oH)(le,q,Pe);$.setUncontrolledState({expandedKeys:q,flattenNodes:Ae},!0)}),(0,y.Z)((0,oe.Z)($),"onNodeExpand",function(q,re){var le=$.state.expandedKeys,Pe=$.state,Ae=Pe.listChanging,Ne=Pe.fieldNames,Te=$.props,He=Te.onExpand,Ke=Te.loadData,Ze=re.expanded,_e=re[Ne.key];if(!Ae){var ft=le.includes(_e),Xe=!Ze;if((0,S.ZP)(Ze&&ft||!Ze&&!ft,"Expand state not sync with index check"),le=Xe?(0,Tt.L0)(le,_e):(0,Tt._5)(le,_e),$.setExpandedKeys(le),He==null||He(le,{node:re,expanded:Xe,nativeEvent:q.nativeEvent}),Xe&&Ke){var Ve=$.onNodeLoad(re);Ve&&Ve.then(function(){var Pt=(0,Be.oH)($.state.treeData,le,Ne);$.setUncontrolledState({flattenNodes:Pt})}).catch(function(){var Pt=$.state.expandedKeys,Mt=(0,Tt._5)(Pt,_e);$.setExpandedKeys(Mt)})}}}),(0,y.Z)((0,oe.Z)($),"onListChangeStart",function(){$.setUncontrolledState({listChanging:!0})}),(0,y.Z)((0,oe.Z)($),"onListChangeEnd",function(){setTimeout(function(){$.setUncontrolledState({listChanging:!1})})}),(0,y.Z)((0,oe.Z)($),"onActiveChange",function(q){var re=$.state.activeKey,le=$.props,Pe=le.onActiveChange,Ae=le.itemScrollOffset,Ne=Ae===void 0?0:Ae;re!==q&&($.setState({activeKey:q}),q!==null&&$.scrollTo({key:q,offset:Ne}),Pe==null||Pe(q))}),(0,y.Z)((0,oe.Z)($),"getActiveItem",function(){var q=$.state,re=q.activeKey,le=q.flattenNodes;return re===null?null:le.find(function(Pe){var Ae=Pe.key;return Ae===re})||null}),(0,y.Z)((0,oe.Z)($),"offsetActiveKey",function(q){var re=$.state,le=re.flattenNodes,Pe=re.activeKey,Ae=le.findIndex(function(He){var Ke=He.key;return Ke===Pe});Ae===-1&&q<0&&(Ae=le.length),Ae=(Ae+q+le.length)%le.length;var Ne=le[Ae];if(Ne){var Te=Ne.key;$.onActiveChange(Te)}else $.onActiveChange(null)}),(0,y.Z)((0,oe.Z)($),"onKeyDown",function(q){var re=$.state,le=re.activeKey,Pe=re.expandedKeys,Ae=re.checkedKeys,Ne=re.fieldNames,Te=$.props,He=Te.onKeyDown,Ke=Te.checkable,Ze=Te.selectable;switch(q.which){case m.Z.UP:{$.offsetActiveKey(-1),q.preventDefault();break}case m.Z.DOWN:{$.offsetActiveKey(1),q.preventDefault();break}}var _e=$.getActiveItem();if(_e&&_e.data){var ft=$.getTreeNodeRequiredProps(),Xe=_e.data.isLeaf===!1||!!(_e.data[Ne.children]||[]).length,Ve=(0,Be.F)((0,pe.Z)((0,pe.Z)({},(0,Be.H8)(le,ft)),{},{data:_e.data,active:!0}));switch(q.which){case m.Z.LEFT:{Xe&&Pe.includes(le)?$.onNodeExpand({},Ve):_e.parent&&$.onActiveChange(_e.parent.key),q.preventDefault();break}case m.Z.RIGHT:{Xe&&!Pe.includes(le)?$.onNodeExpand({},Ve):_e.children&&_e.children.length&&$.onActiveChange(_e.children[0].key),q.preventDefault();break}case m.Z.ENTER:case m.Z.SPACE:{Ke&&!Ve.disabled&&Ve.checkable!==!1&&!Ve.disableCheckbox?$.onNodeCheck({},Ve,!Ae.includes(le)):!Ke&&Ze&&!Ve.disabled&&Ve.selectable!==!1&&$.onNodeSelect({},Ve);break}}}He==null||He(q)}),(0,y.Z)((0,oe.Z)($),"setUncontrolledState",function(q){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!$.destroyed){var Pe=!1,Ae=!0,Ne={};Object.keys(q).forEach(function(Te){if($.props.hasOwnProperty(Te)){Ae=!1;return}Pe=!0,Ne[Te]=q[Te]}),Pe&&(!re||Ae)&&$.setState((0,pe.Z)((0,pe.Z)({},Ne),le))}}),(0,y.Z)((0,oe.Z)($),"scrollTo",function(q){$.listRef.current.scrollTo(q)}),$}return(0,f.Z)(Se,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var P=this.props,fe=P.activeKey,he=P.itemScrollOffset,q=he===void 0?0:he;fe!==void 0&&fe!==this.state.activeKey&&(this.setState({activeKey:fe}),fe!==null&&this.scrollTo({key:fe,offset:q}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var P=this.state,fe=P.focused,he=P.flattenNodes,q=P.keyEntities,re=P.draggingNodeKey,le=P.activeKey,Pe=P.dropLevelOffset,Ae=P.dropContainerKey,Ne=P.dropTargetKey,Te=P.dropPosition,He=P.dragOverNodeKey,Ke=P.indent,Ze=this.props,_e=Ze.prefixCls,ft=Ze.className,Xe=Ze.style,Ve=Ze.showLine,Pt=Ze.focusable,Mt=Ze.tabIndex,st=Mt===void 0?0:Mt,Qt=Ze.selectable,pn=Ze.showIcon,Lt=Ze.icon,tn=Ze.switcherIcon,ze=Ze.draggable,ke=Ze.checkable,Re=Ze.checkStrictly,Z=Ze.disabled,ee=Ze.motion,me=Ze.loadData,ve=Ze.filterTreeNode,Ee=Ze.height,Me=Ze.itemHeight,Ye=Ze.scrollWidth,nt=Ze.virtual,_t=Ze.titleRender,nn=Ze.dropIndicatorRender,ln=Ze.onContextMenu,zt=Ze.onScroll,Jt=Ze.direction,yn=Ze.rootClassName,Bn=Ze.rootStyle,mn=(0,E.Z)(this.props,{aria:!0,data:!0}),gn;ze&&((0,ne.Z)(ze)==="object"?gn=ze:typeof ze=="function"?gn={nodeDraggable:ze}:gn={});var Nt={prefixCls:_e,selectable:Qt,showIcon:pn,icon:Lt,switcherIcon:tn,draggable:gn,draggingNodeKey:re,checkable:ke,checkStrictly:Re,disabled:Z,keyEntities:q,dropLevelOffset:Pe,dropContainerKey:Ae,dropTargetKey:Ne,dropPosition:Te,dragOverNodeKey:He,indent:Ke,direction:Jt,dropIndicatorRender:nn,loadData:me,filterTreeNode:ve,titleRender:_t,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return I.createElement(B.k.Provider,{value:Nt},I.createElement("div",{className:h()(_e,ft,yn,(0,y.Z)((0,y.Z)((0,y.Z)({},"".concat(_e,"-show-line"),Ve),"".concat(_e,"-focused"),fe),"".concat(_e,"-active-focused"),le!==null)),style:Bn},I.createElement(be,(0,x.Z)({ref:this.listRef,prefixCls:_e,style:Xe,data:he,disabled:Z,selectable:Qt,checkable:!!ke,motion:ee,dragging:re!==null,height:Ee,itemHeight:Me,virtual:nt,focusable:Pt,focused:fe,tabIndex:st,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ln,onScroll:zt,scrollWidth:Ye},this.getTreeNodeRequiredProps(),mn))))}}],[{key:"getDerivedStateFromProps",value:function(P,fe){var he=fe.prevProps,q={prevProps:P};function re(st){return!he&&P.hasOwnProperty(st)||he&&he[st]!==P[st]}var le,Pe=fe.fieldNames;if(re("fieldNames")&&(Pe=(0,Be.w$)(P.fieldNames),q.fieldNames=Pe),re("treeData")?le=P.treeData:re("children")&&((0,S.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),le=(0,Be.zn)(P.children)),le){q.treeData=le;var Ae=(0,Be.I8)(le,{fieldNames:Pe});q.keyEntities=(0,pe.Z)((0,y.Z)({},F,ue),Ae.keyEntities)}var Ne=q.keyEntities||fe.keyEntities;if(re("expandedKeys")||he&&re("autoExpandParent"))q.expandedKeys=P.autoExpandParent||!he&&P.defaultExpandParent?(0,Tt.r7)(P.expandedKeys,Ne):P.expandedKeys;else if(!he&&P.defaultExpandAll){var Te=(0,pe.Z)({},Ne);delete Te[F];var He=[];Object.keys(Te).forEach(function(st){var Qt=Te[st];Qt.children&&Qt.children.length&&He.push(Qt.key)}),q.expandedKeys=He}else!he&&P.defaultExpandedKeys&&(q.expandedKeys=P.autoExpandParent||P.defaultExpandParent?(0,Tt.r7)(P.defaultExpandedKeys,Ne):P.defaultExpandedKeys);if(q.expandedKeys||delete q.expandedKeys,le||q.expandedKeys){var Ke=(0,Be.oH)(le||fe.treeData,q.expandedKeys||fe.expandedKeys,Pe);q.flattenNodes=Ke}if(P.selectable&&(re("selectedKeys")?q.selectedKeys=(0,Tt.BT)(P.selectedKeys,P):!he&&P.defaultSelectedKeys&&(q.selectedKeys=(0,Tt.BT)(P.defaultSelectedKeys,P))),P.checkable){var Ze;if(re("checkedKeys")?Ze=(0,Tt.E6)(P.checkedKeys)||{}:!he&&P.defaultCheckedKeys?Ze=(0,Tt.E6)(P.defaultCheckedKeys)||{}:le&&(Ze=(0,Tt.E6)(P.checkedKeys)||{checkedKeys:fe.checkedKeys,halfCheckedKeys:fe.halfCheckedKeys}),Ze){var _e=Ze,ft=_e.checkedKeys,Xe=ft===void 0?[]:ft,Ve=_e.halfCheckedKeys,Pt=Ve===void 0?[]:Ve;if(!P.checkStrictly){var Mt=(0,tt.S)(Xe,!0,Ne);Xe=Mt.checkedKeys,Pt=Mt.halfCheckedKeys}q.checkedKeys=Xe,q.halfCheckedKeys=Pt}}return re("loadedKeys")&&(q.loadedKeys=P.loadedKeys),q}}]),Se}(I.Component);(0,y.Z)($e,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:R,allowDrop:function(){return!0},expandAction:!1}),(0,y.Z)($e,"TreeNode",L.Z);var ye=$e,de=ye},82661:function(fn,je,b){"use strict";b.d(je,{BT:function(){return I},E6:function(){return R},L0:function(){return y},OM:function(){return S},_5:function(){return o},r7:function(){return O},wA:function(){return h},yx:function(){return C}});var x=b(3300),ne=b(34666),pe=b(48736),te=b(59301),M=b(639),f=b(65065),oe=b(34061),Q=null;function o(D,A){if(!D)return[];var W=D.slice(),X=W.indexOf(A);return X>=0&&W.splice(X,1),W}function y(D,A){var W=(D||[]).slice();return W.indexOf(A)===-1&&W.push(A),W}function C(D){return D.split("-")}function h(D,A){var W=[],X=(0,f.Z)(A,D);function Y(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];L.forEach(function(se){var ae=se.key,Be=se.children;W.push(ae),Y(Be)})}return Y(X.children),W}function m(D){if(D.parent){var A=C(D.pos);return Number(A[A.length-1])===D.parent.children.length-1}return!1}function E(D){var A=C(D.pos);return Number(A[A.length-1])===0}function S(D,A,W,X,Y,L,se,ae,Be,U){var k,N=D.clientX,V=D.clientY,J=D.target.getBoundingClientRect(),H=J.top,v=J.height,g=(U==="rtl"?-1:1)*(((Y==null?void 0:Y.x)||0)-N),F=(g-12)/X,ie=Be.filter(function(de){var K;return(K=ae[de])===null||K===void 0||(K=K.children)===null||K===void 0?void 0:K.length}),ue=(0,f.Z)(ae,W.eventKey);if(V<H+v/2){var Le=se.findIndex(function(de){return de.key===ue.key}),Je=Le<=0?0:Le-1,rt=se[Je].key;ue=(0,f.Z)(ae,rt)}var dt=ue.key,vt=ue,be=ue.key,Tt=0,tt=0;if(!ie.includes(dt))for(var It=0;It<F&&m(ue);It+=1)ue=ue.parent,tt+=1;var Qe=A.data,$e=ue.node,ye=!0;return E(ue)&&ue.level===0&&V<H+v/2&&L({dragNode:Qe,dropNode:$e,dropPosition:-1})&&ue.key===W.eventKey?Tt=-1:(vt.children||[]).length&&ie.includes(be)?L({dragNode:Qe,dropNode:$e,dropPosition:0})?Tt=0:ye=!1:tt===0?F>-1.5?L({dragNode:Qe,dropNode:$e,dropPosition:1})?Tt=1:ye=!1:L({dragNode:Qe,dropNode:$e,dropPosition:0})?Tt=0:L({dragNode:Qe,dropNode:$e,dropPosition:1})?Tt=1:ye=!1:L({dragNode:Qe,dropNode:$e,dropPosition:1})?Tt=1:ye=!1,{dropPosition:Tt,dropLevelOffset:tt,dropTargetKey:ue.key,dropTargetPos:ue.pos,dragOverNodeKey:be,dropContainerKey:Tt===0?null:((k=ue.parent)===null||k===void 0?void 0:k.key)||null,dropAllowed:ye}}function I(D,A){if(D){var W=A.multiple;return W?D.slice():D.length?[D[0]]:D}}var B=function(A){return A};function G(D,A){if(!D)return[];var W=A||{},X=W.processProps,Y=X===void 0?B:X,L=Array.isArray(D)?D:[D];return L.map(function(se){var ae=se.children,Be=_objectWithoutProperties(se,Q),U=G(ae,A);return React.createElement(TreeNode,_extends({key:Be.key},Y(Be)),U)})}function R(D){if(!D)return null;var A;if(Array.isArray(D))A={checkedKeys:D,halfCheckedKeys:void 0};else if((0,ne.Z)(D)==="object")A={checkedKeys:D.checked||void 0,halfCheckedKeys:D.halfChecked||void 0};else return(0,pe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return A}function O(D,A){var W=new Set;function X(Y){if(!W.has(Y)){var L=(0,f.Z)(A,Y);if(L){W.add(Y);var se=L.parent,ae=L.node;ae.disabled||se&&X(se.key)}}}return(D||[]).forEach(function(Y){X(Y)}),(0,x.Z)(W)}},34643:function(fn,je,b){"use strict";b.d(je,{S:function(){return oe}});var x=b(48736),ne=b(65065);function pe(Q,o){var y=new Set;return Q.forEach(function(C){o.has(C)||y.add(C)}),y}function te(Q){var o=Q||{},y=o.disabled,C=o.disableCheckbox,h=o.checkable;return!!(y||C)||h===!1}function M(Q,o,y,C){for(var h=new Set(Q),m=new Set,E=0;E<=y;E+=1){var S=o.get(E)||new Set;S.forEach(function(R){var O=R.key,D=R.node,A=R.children,W=A===void 0?[]:A;h.has(O)&&!C(D)&&W.filter(function(X){return!C(X.node)}).forEach(function(X){h.add(X.key)})})}for(var I=new Set,B=y;B>=0;B-=1){var G=o.get(B)||new Set;G.forEach(function(R){var O=R.parent,D=R.node;if(!(C(D)||!R.parent||I.has(R.parent.key))){if(C(R.parent.node)){I.add(O.key);return}var A=!0,W=!1;(O.children||[]).filter(function(X){return!C(X.node)}).forEach(function(X){var Y=X.key,L=h.has(Y);A&&!L&&(A=!1),!W&&(L||m.has(Y))&&(W=!0)}),A&&h.add(O.key),W&&m.add(O.key),I.add(O.key)}})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(pe(m,h))}}function f(Q,o,y,C,h){for(var m=new Set(Q),E=new Set(o),S=0;S<=C;S+=1){var I=y.get(S)||new Set;I.forEach(function(O){var D=O.key,A=O.node,W=O.children,X=W===void 0?[]:W;!m.has(D)&&!E.has(D)&&!h(A)&&X.filter(function(Y){return!h(Y.node)}).forEach(function(Y){m.delete(Y.key)})})}E=new Set;for(var B=new Set,G=C;G>=0;G-=1){var R=y.get(G)||new Set;R.forEach(function(O){var D=O.parent,A=O.node;if(!(h(A)||!O.parent||B.has(O.parent.key))){if(h(O.parent.node)){B.add(D.key);return}var W=!0,X=!1;(D.children||[]).filter(function(Y){return!h(Y.node)}).forEach(function(Y){var L=Y.key,se=m.has(L);W&&!se&&(W=!1),!X&&(se||E.has(L))&&(X=!0)}),W||m.delete(D.key),X&&E.add(D.key),B.add(D.key)}})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(pe(E,m))}}function oe(Q,o,y,C){var h=[],m;C?m=C:m=te;var E=new Set(Q.filter(function(G){var R=!!(0,ne.Z)(y,G);return R||h.push(G),R})),S=new Map,I=0;Object.keys(y).forEach(function(G){var R=y[G],O=R.level,D=S.get(O);D||(D=new Set,S.set(O,D)),D.add(R),I=Math.max(I,O)}),(0,x.ZP)(!h.length,"Tree missing follow keys: ".concat(h.slice(0,100).map(function(G){return"'".concat(G,"'")}).join(", ")));var B;return o===!0?B=M(E,S,I,m):B=f(E,o.halfCheckedKeys,S,I,m),B}},65065:function(fn,je,b){"use strict";b.d(je,{Z:function(){return x}});function x(ne,pe){return ne[pe]}},34061:function(fn,je,b){"use strict";b.d(je,{F:function(){return O},H8:function(){return R},I8:function(){return G},km:function(){return h},oH:function(){return I},w$:function(){return m},zn:function(){return S}});var x=b(34666),ne=b(3300),pe=b(27247),te=b(43079),M=b(11592),f=b(2738),oe=b(48736),Q=b(65065),o=["children"];function y(D,A){return"".concat(D,"-").concat(A)}function C(D){return D&&D.type&&D.type.isTreeNode}function h(D,A){return D!=null?D:A}function m(D){var A=D||{},W=A.title,X=A._title,Y=A.key,L=A.children,se=W||"title";return{title:se,_title:X||[se],key:Y||"key",children:L||"children"}}function E(D,A){var W=new Map;function X(Y){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Y||[]).forEach(function(se){var ae=se[A.key],Be=se[A.children];warning(ae!=null,"Tree node must have a certain key: [".concat(L).concat(ae,"]"));var U=String(ae);warning(!W.has(U)||ae===null||ae===void 0,"Same 'key' exist in the Tree: ".concat(U)),W.set(U,!0),X(Be,"".concat(L).concat(U," > "))})}X(D)}function S(D){function A(W){var X=(0,M.Z)(W);return X.map(function(Y){if(!C(Y))return(0,oe.ZP)(!Y,"Tree/TreeNode can only accept TreeNode as children."),null;var L=Y.key,se=Y.props,ae=se.children,Be=(0,te.Z)(se,o),U=(0,pe.Z)({key:L},Be),k=A(ae);return k.length&&(U.children=k),U}).filter(function(Y){return Y})}return A(D)}function I(D,A,W){var X=m(W),Y=X._title,L=X.key,se=X.children,ae=new Set(A===!0?[]:A),Be=[];function U(k){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return k.map(function(V,J){for(var H=y(N?N.pos:"0",J),v=h(V[L],H),g,F=0;F<Y.length;F+=1){var ie=Y[F];if(V[ie]!==void 0){g=V[ie];break}}var ue=Object.assign((0,f.Z)(V,[].concat((0,ne.Z)(Y),[L,se])),{title:g,key:v,parent:N,pos:H,children:null,data:V,isStart:[].concat((0,ne.Z)(N?N.isStart:[]),[J===0]),isEnd:[].concat((0,ne.Z)(N?N.isEnd:[]),[J===k.length-1])});return Be.push(ue),A===!0||ae.has(v)?ue.children=U(V[se]||[],ue):ue.children=[],ue})}return U(D),Be}function B(D,A,W){var X={};(0,x.Z)(W)==="object"?X=W:X={externalGetKey:W},X=X||{};var Y=X,L=Y.childrenPropName,se=Y.externalGetKey,ae=Y.fieldNames,Be=m(ae),U=Be.key,k=Be.children,N=L||k,V;se?typeof se=="string"?V=function(v){return v[se]}:typeof se=="function"&&(V=function(v){return se(v)}):V=function(v,g){return h(v[U],g)};function J(H,v,g,F){var ie=H?H[N]:D,ue=H?y(g.pos,v):"0",Le=H?[].concat((0,ne.Z)(F),[H]):[];if(H){var Je=V(H,ue),rt={node:H,index:v,pos:ue,key:Je,parentPos:g.node?g.pos:null,level:g.level+1,nodes:Le};A(rt)}ie&&ie.forEach(function(dt,vt){J(dt,vt,{node:H,pos:ue,level:g?g.level+1:-1},Le)})}J(null)}function G(D){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=A.initWrapper,X=A.processEntity,Y=A.onProcessFinished,L=A.externalGetKey,se=A.childrenPropName,ae=A.fieldNames,Be=arguments.length>2?arguments[2]:void 0,U=L||Be,k={},N={},V={posEntities:k,keyEntities:N};return W&&(V=W(V)||V),B(D,function(J){var H=J.node,v=J.index,g=J.pos,F=J.key,ie=J.parentPos,ue=J.level,Le=J.nodes,Je={node:H,nodes:Le,index:v,key:F,pos:g,level:ue},rt=h(F,g);k[g]=Je,N[rt]=Je,Je.parent=k[ie],Je.parent&&(Je.parent.children=Je.parent.children||[],Je.parent.children.push(Je)),X&&X(Je,V)},{externalGetKey:U,childrenPropName:se,fieldNames:ae}),Y&&Y(V),V}function R(D,A){var W=A.expandedKeys,X=A.selectedKeys,Y=A.loadedKeys,L=A.loadingKeys,se=A.checkedKeys,ae=A.halfCheckedKeys,Be=A.dragOverNodeKey,U=A.dropPosition,k=A.keyEntities,N=(0,Q.Z)(k,D),V={eventKey:D,expanded:W.indexOf(D)!==-1,selected:X.indexOf(D)!==-1,loaded:Y.indexOf(D)!==-1,loading:L.indexOf(D)!==-1,checked:se.indexOf(D)!==-1,halfChecked:ae.indexOf(D)!==-1,pos:String(N?N.pos:""),dragOver:Be===D&&U===0,dragOverGapTop:Be===D&&U===-1,dragOverGapBottom:Be===D&&U===1};return V}function O(D){var A=D.data,W=D.expanded,X=D.selected,Y=D.checked,L=D.loaded,se=D.loading,ae=D.halfChecked,Be=D.dragOver,U=D.dragOverGapTop,k=D.dragOverGapBottom,N=D.pos,V=D.active,J=D.eventKey,H=(0,pe.Z)((0,pe.Z)({},A),{},{expanded:W,selected:X,checked:Y,loaded:L,loading:se,halfChecked:ae,dragOver:Be,dragOverGapTop:U,dragOverGapBottom:k,pos:N,active:V,key:J});return"props"in H||Object.defineProperty(H,"props",{get:function(){return(0,oe.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),D}}),H}},8224:function(fn,je,b){"use strict";b.d(je,{Z:function(){return ne}});var x=b(4676);function ne(pe,te,M,f){var oe=x.unstable_batchedUpdates?function(o){x.unstable_batchedUpdates(M,o)}:M;return pe!=null&&pe.addEventListener&&pe.addEventListener(te,oe,f),{remove:function(){pe!=null&&pe.removeEventListener&&pe.removeEventListener(te,oe,f)}}}},24514:function(fn,je,b){"use strict";b.d(je,{G:function(){return te}});var x=b(47273),ne=function(f){if((0,x.Z)()&&window.document.documentElement){var oe=Array.isArray(f)?f:[f],Q=window.document.documentElement;return oe.some(function(o){return o in Q.style})}return!1},pe=function(f,oe){if(!ne(f))return!1;var Q=document.createElement("div"),o=Q.style[f];return Q.style[f]=oe,Q.style[f]!==o};function te(M,f){return!Array.isArray(M)&&f!==void 0?pe(M,f):ne(M)}},49658:function(fn,je){"use strict";je.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var b=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(b)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(b==null?void 0:b.substr(0,4))}},6790:function(fn,je,b){"use strict";b.d(je,{Z:function(){return Qe}});var x=b(32855),ne=b(34666),pe=b(27247),te=b(74430),M=b(11913),f=b(43079),oe=b(92310),Q=b.n(oe),o=b(29301),y=b(70425),C=b(34280),h=b(59301),m=b(4676),E=h.forwardRef(function($e,ye){var de=$e.height,K=$e.offsetY,xe=$e.offsetX,Se=$e.children,$=$e.prefixCls,P=$e.onInnerResize,fe=$e.innerProps,he=$e.rtl,q=$e.extra,re={},le={display:"flex",flexDirection:"column"};return K!==void 0&&(re={height:de,position:"relative",overflow:"hidden"},le=(0,pe.Z)((0,pe.Z)({},le),{},(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({transform:"translateY(".concat(K,"px)")},he?"marginRight":"marginLeft",-xe),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:re},h.createElement(o.Z,{onResize:function(Ae){var Ne=Ae.offsetHeight;Ne&&P&&P()}},h.createElement("div",(0,x.Z)({style:le,className:Q()((0,te.Z)({},"".concat($,"-holder-inner"),$)),ref:ye},fe),Se,q)))});E.displayName="Filler";var S=E;function I($e){var ye=$e.children,de=$e.setRef,K=h.useCallback(function(xe){de(xe)},[]);return h.cloneElement(ye,{ref:K})}function B($e,ye,de,K,xe,Se,$,P){var fe=P.getKey;return $e.slice(ye,de+1).map(function(he,q){var re=ye+q,le=$(he,re,{style:{width:K},offsetX:xe}),Pe=fe(he);return h.createElement(I,{key:Pe,setRef:function(Ne){return Se(he,Ne)}},le)})}function G($e,ye,de,K){var xe=de-$e,Se=ye-de,$=Math.min(xe,Se)*2;if(K<=$){var P=Math.floor(K/2);return K%2?de+P+1:de-P}return xe>Se?de-(K-Se):de+(K-xe)}function R($e,ye,de){var K=$e.length,xe=ye.length,Se,$;if(K===0&&xe===0)return null;K<xe?(Se=$e,$=ye):(Se=ye,$=$e);var P={__EMPTY_ITEM__:!0};function fe(Ae){return Ae!==void 0?de(Ae):P}for(var he=null,q=Math.abs(K-xe)!==1,re=0;re<$.length;re+=1){var le=fe(Se[re]),Pe=fe($[re]);if(le!==Pe){he=re,q=q||le!==fe($[re+1]);break}}return he===null?null:{index:he,multiple:q}}function O($e,ye,de){var K=h.useState($e),xe=(0,M.Z)(K,2),Se=xe[0],$=xe[1],P=h.useState(null),fe=(0,M.Z)(P,2),he=fe[0],q=fe[1];return h.useEffect(function(){var re=R(Se||[],$e||[],ye);(re==null?void 0:re.index)!==void 0&&(de==null||de(re.index),q($e[re.index])),$($e)},[$e]),[he]}var D=b(16089),A=(typeof navigator=="undefined"?"undefined":(0,ne.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),W=A,X=function($e,ye,de,K){var xe=(0,h.useRef)(!1),Se=(0,h.useRef)(null);function $(){clearTimeout(Se.current),xe.current=!0,Se.current=setTimeout(function(){xe.current=!1},50)}var P=(0,h.useRef)({top:$e,bottom:ye,left:de,right:K});return P.current.top=$e,P.current.bottom=ye,P.current.left=de,P.current.right=K,function(fe,he){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,re=fe?he<0&&P.current.left||he>0&&P.current.right:he<0&&P.current.top||he>0&&P.current.bottom;return q&&re?(clearTimeout(Se.current),xe.current=!1):(!re||xe.current)&&$(),!xe.current&&re}};function Y($e,ye,de,K,xe,Se,$){var P=(0,h.useRef)(0),fe=(0,h.useRef)(null),he=(0,h.useRef)(null),q=(0,h.useRef)(!1),re=X(ye,de,K,xe);function le(Ke,Ze){if(D.Z.cancel(fe.current),!re(!1,Ze)){var _e=Ke;if(!_e._virtualHandled)_e._virtualHandled=!0;else return;P.current+=Ze,he.current=Ze,W||_e.preventDefault(),fe.current=(0,D.Z)(function(){var ft=q.current?10:1;$(P.current*ft,!1),P.current=0})}}function Pe(Ke,Ze){$(Ze,!0),W||Ke.preventDefault()}var Ae=(0,h.useRef)(null),Ne=(0,h.useRef)(null);function Te(Ke){if($e){D.Z.cancel(Ne.current),Ne.current=(0,D.Z)(function(){Ae.current=null},2);var Ze=Ke.deltaX,_e=Ke.deltaY,ft=Ke.shiftKey,Xe=Ze,Ve=_e;(Ae.current==="sx"||!Ae.current&&ft&&_e&&!Ze)&&(Xe=_e,Ve=0,Ae.current="sx");var Pt=Math.abs(Xe),Mt=Math.abs(Ve);Ae.current===null&&(Ae.current=Se&&Pt>Mt?"x":"y"),Ae.current==="y"?le(Ke,Ve):Pe(Ke,Xe)}}function He(Ke){$e&&(q.current=Ke.detail===he.current)}return[Te,He]}function L($e,ye,de,K){var xe=h.useMemo(function(){return[new Map,[]]},[$e,de.id,K]),Se=(0,M.Z)(xe,2),$=Se[0],P=Se[1],fe=function(q){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q,le=$.get(q),Pe=$.get(re);if(le===void 0||Pe===void 0)for(var Ae=$e.length,Ne=P.length;Ne<Ae;Ne+=1){var Te,He=$e[Ne],Ke=ye(He);$.set(Ke,Ne);var Ze=(Te=de.get(Ke))!==null&&Te!==void 0?Te:K;if(P[Ne]=(P[Ne-1]||0)+Ze,Ke===q&&(le=Ne),Ke===re&&(Pe=Ne),le!==void 0&&Pe!==void 0)break}return{top:P[le-1]||0,bottom:P[Pe]}};return fe}var se=b(33377),ae=b(93912),Be=function(){function $e(){(0,se.Z)(this,$e),(0,te.Z)(this,"maps",void 0),(0,te.Z)(this,"id",0),(0,te.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ae.Z)($e,[{key:"set",value:function(de,K){this.diffRecords.set(de,this.maps[de]),this.maps[de]=K,this.id+=1}},{key:"get",value:function(de){return this.maps[de]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),$e}(),U=Be;function k($e){var ye=parseFloat($e);return isNaN(ye)?0:ye}function N($e,ye,de){var K=h.useState(0),xe=(0,M.Z)(K,2),Se=xe[0],$=xe[1],P=(0,h.useRef)(new Map),fe=(0,h.useRef)(new U),he=(0,h.useRef)(0);function q(){he.current+=1}function re(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;q();var Ae=function(){var He=!1;P.current.forEach(function(Ke,Ze){if(Ke&&Ke.offsetParent){var _e=Ke.offsetHeight,ft=getComputedStyle(Ke),Xe=ft.marginTop,Ve=ft.marginBottom,Pt=k(Xe),Mt=k(Ve),st=_e+Pt+Mt;fe.current.get(Ze)!==st&&(fe.current.set(Ze,st),He=!0)}}),He&&$(function(Ke){return Ke+1})};if(Pe)Ae();else{he.current+=1;var Ne=he.current;Promise.resolve().then(function(){Ne===he.current&&Ae()})}}function le(Pe,Ae){var Ne=$e(Pe),Te=P.current.get(Ne);Ae?(P.current.set(Ne,Ae),re()):P.current.delete(Ne),!Te!=!Ae&&(Ae?ye==null||ye(Pe):de==null||de(Pe))}return(0,h.useEffect)(function(){return q},[]),[le,re,fe.current,Se]}var V=14/15;function J($e,ye,de){var K=(0,h.useRef)(!1),xe=(0,h.useRef)(0),Se=(0,h.useRef)(0),$=(0,h.useRef)(null),P=(0,h.useRef)(null),fe,he=function(Pe){if(K.current){var Ae=Math.ceil(Pe.touches[0].pageX),Ne=Math.ceil(Pe.touches[0].pageY),Te=xe.current-Ae,He=Se.current-Ne,Ke=Math.abs(Te)>Math.abs(He);Ke?xe.current=Ae:Se.current=Ne;var Ze=de(Ke,Ke?Te:He,!1,Pe);Ze&&Pe.preventDefault(),clearInterval(P.current),Ze&&(P.current=setInterval(function(){Ke?Te*=V:He*=V;var _e=Math.floor(Ke?Te:He);(!de(Ke,_e,!0)||Math.abs(_e)<=.1)&&clearInterval(P.current)},16))}},q=function(){K.current=!1,fe()},re=function(Pe){fe(),Pe.touches.length===1&&!K.current&&(K.current=!0,xe.current=Math.ceil(Pe.touches[0].pageX),Se.current=Math.ceil(Pe.touches[0].pageY),$.current=Pe.target,$.current.addEventListener("touchmove",he,{passive:!1}),$.current.addEventListener("touchend",q,{passive:!0}))};fe=function(){$.current&&($.current.removeEventListener("touchmove",he),$.current.removeEventListener("touchend",q))},(0,C.Z)(function(){return $e&&ye.current.addEventListener("touchstart",re,{passive:!0}),function(){var le;(le=ye.current)===null||le===void 0||le.removeEventListener("touchstart",re),fe(),clearInterval(P.current)}},[$e])}function H($e){return Math.floor(Math.pow($e,.5))}function v($e,ye){var de="touches"in $e?$e.touches[0]:$e;return de[ye?"pageX":"pageY"]-window[ye?"scrollX":"scrollY"]}function g($e,ye,de){h.useEffect(function(){var K=ye.current;if($e&&K){var xe=!1,Se,$,P=function(){D.Z.cancel(Se)},fe=function le(){P(),Se=(0,D.Z)(function(){de($),le()})},he=function(Pe){if(!(Pe.target.draggable||Pe.button!==0)){var Ae=Pe;Ae._virtualHandled||(Ae._virtualHandled=!0,xe=!0)}},q=function(){xe=!1,P()},re=function(Pe){if(xe){var Ae=v(Pe,!1),Ne=K.getBoundingClientRect(),Te=Ne.top,He=Ne.bottom;if(Ae<=Te){var Ke=Te-Ae;$=-H(Ke),fe()}else if(Ae>=He){var Ze=Ae-He;$=H(Ze),fe()}else P()}};return K.addEventListener("mousedown",he),K.ownerDocument.addEventListener("mouseup",q),K.ownerDocument.addEventListener("mousemove",re),function(){K.removeEventListener("mousedown",he),K.ownerDocument.removeEventListener("mouseup",q),K.ownerDocument.removeEventListener("mousemove",re),P()}}},[$e])}var F=10;function ie($e,ye,de,K,xe,Se,$,P){var fe=h.useRef(),he=h.useState(null),q=(0,M.Z)(he,2),re=q[0],le=q[1];return(0,C.Z)(function(){if(re&&re.times<F){if(!$e.current){le(function(ee){return(0,pe.Z)({},ee)});return}Se();var Pe=re.targetAlign,Ae=re.originAlign,Ne=re.index,Te=re.offset,He=$e.current.clientHeight,Ke=!1,Ze=Pe,_e=null;if(He){for(var ft=Pe||Ae,Xe=0,Ve=0,Pt=0,Mt=Math.min(ye.length-1,Ne),st=0;st<=Mt;st+=1){var Qt=xe(ye[st]);Ve=Xe;var pn=de.get(Qt);Pt=Ve+(pn===void 0?K:pn),Xe=Pt}for(var Lt=ft==="top"?Te:He-Te,tn=Mt;tn>=0;tn-=1){var ze=xe(ye[tn]),ke=de.get(ze);if(ke===void 0){Ke=!0;break}if(Lt-=ke,Lt<=0)break}switch(ft){case"top":_e=Ve-Te;break;case"bottom":_e=Pt-He+Te;break;default:{var Re=$e.current.scrollTop,Z=Re+He;Ve<Re?Ze="top":Pt>Z&&(Ze="bottom")}}_e!==null&&$(_e),_e!==re.lastTop&&(Ke=!0)}Ke&&le((0,pe.Z)((0,pe.Z)({},re),{},{times:re.times+1,targetAlign:Ze,lastTop:_e}))}},[re,$e.current]),function(Pe){if(Pe==null){P();return}if(D.Z.cancel(fe.current),typeof Pe=="number")$(Pe);else if(Pe&&(0,ne.Z)(Pe)==="object"){var Ae,Ne=Pe.align;"index"in Pe?Ae=Pe.index:Ae=ye.findIndex(function(Ke){return xe(Ke)===Pe.key});var Te=Pe.offset,He=Te===void 0?0:Te;le({times:0,index:Ae,offset:He,originAlign:Ne})}}}var ue=h.forwardRef(function($e,ye){var de=$e.prefixCls,K=$e.rtl,xe=$e.scrollOffset,Se=$e.scrollRange,$=$e.onStartMove,P=$e.onStopMove,fe=$e.onScroll,he=$e.horizontal,q=$e.spinSize,re=$e.containerSize,le=$e.style,Pe=$e.thumbStyle,Ae=$e.showScrollBar,Ne=h.useState(!1),Te=(0,M.Z)(Ne,2),He=Te[0],Ke=Te[1],Ze=h.useState(null),_e=(0,M.Z)(Ze,2),ft=_e[0],Xe=_e[1],Ve=h.useState(null),Pt=(0,M.Z)(Ve,2),Mt=Pt[0],st=Pt[1],Qt=!K,pn=h.useRef(),Lt=h.useRef(),tn=h.useState(Ae),ze=(0,M.Z)(tn,2),ke=ze[0],Re=ze[1],Z=h.useRef(),ee=function(){Ae===!0||Ae===!1||(clearTimeout(Z.current),Re(!0),Z.current=setTimeout(function(){Re(!1)},3e3))},me=Se-re||0,ve=re-q||0,Ee=h.useMemo(function(){if(xe===0||me===0)return 0;var yn=xe/me;return yn*ve},[xe,me,ve]),Me=function(Bn){Bn.stopPropagation(),Bn.preventDefault()},Ye=h.useRef({top:Ee,dragging:He,pageY:ft,startTop:Mt});Ye.current={top:Ee,dragging:He,pageY:ft,startTop:Mt};var nt=function(Bn){Ke(!0),Xe(v(Bn,he)),st(Ye.current.top),$(),Bn.stopPropagation(),Bn.preventDefault()};h.useEffect(function(){var yn=function(Nt){Nt.preventDefault()},Bn=pn.current,mn=Lt.current;return Bn.addEventListener("touchstart",yn,{passive:!1}),mn.addEventListener("touchstart",nt,{passive:!1}),function(){Bn.removeEventListener("touchstart",yn),mn.removeEventListener("touchstart",nt)}},[]);var _t=h.useRef();_t.current=me;var nn=h.useRef();nn.current=ve,h.useEffect(function(){if(He){var yn,Bn=function(Nt){var wt=Ye.current,qt=wt.dragging,At=wt.pageY,Nn=wt.startTop;D.Z.cancel(yn);var Fe=pn.current.getBoundingClientRect(),Ie=re/(he?Fe.width:Fe.height);if(qt){var Kt=(v(Nt,he)-At)*Ie,xt=Nn;!Qt&&he?xt-=Kt:xt+=Kt;var Zt=_t.current,Ht=nn.current,yt=Ht?xt/Ht:0,Rt=Math.ceil(yt*Zt);Rt=Math.max(Rt,0),Rt=Math.min(Rt,Zt),yn=(0,D.Z)(function(){fe(Rt,he)})}},mn=function(){Ke(!1),P()};return window.addEventListener("mousemove",Bn,{passive:!0}),window.addEventListener("touchmove",Bn,{passive:!0}),window.addEventListener("mouseup",mn,{passive:!0}),window.addEventListener("touchend",mn,{passive:!0}),function(){window.removeEventListener("mousemove",Bn),window.removeEventListener("touchmove",Bn),window.removeEventListener("mouseup",mn),window.removeEventListener("touchend",mn),D.Z.cancel(yn)}}},[He]),h.useEffect(function(){return ee(),function(){clearTimeout(Z.current)}},[xe]),h.useImperativeHandle(ye,function(){return{delayHidden:ee}});var ln="".concat(de,"-scrollbar"),zt={position:"absolute",visibility:ke?null:"hidden"},Jt={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return he?(Object.assign(zt,{height:8,left:0,right:0,bottom:0}),Object.assign(Jt,(0,te.Z)({height:"100%",width:q},Qt?"left":"right",Ee))):(Object.assign(zt,(0,te.Z)({width:8,top:0,bottom:0},Qt?"right":"left",0)),Object.assign(Jt,{width:"100%",height:q,top:Ee})),h.createElement("div",{ref:pn,className:Q()(ln,(0,te.Z)((0,te.Z)((0,te.Z)({},"".concat(ln,"-horizontal"),he),"".concat(ln,"-vertical"),!he),"".concat(ln,"-visible"),ke)),style:(0,pe.Z)((0,pe.Z)({},zt),le),onMouseDown:Me,onMouseMove:ee},h.createElement("div",{ref:Lt,className:Q()("".concat(ln,"-thumb"),(0,te.Z)({},"".concat(ln,"-thumb-moving"),He)),style:(0,pe.Z)((0,pe.Z)({},Jt),Pe),onMouseDown:nt}))}),Le=ue,Je=20;function rt(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,de=$e/ye*$e;return isNaN(de)&&(de=0),de=Math.max(de,Je),Math.floor(de)}var dt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],vt=[],be={overflowY:"auto",overflowAnchor:"none"};function Tt($e,ye){var de=$e.prefixCls,K=de===void 0?"rc-virtual-list":de,xe=$e.className,Se=$e.height,$=$e.itemHeight,P=$e.fullHeight,fe=P===void 0?!0:P,he=$e.style,q=$e.data,re=$e.children,le=$e.itemKey,Pe=$e.virtual,Ae=$e.direction,Ne=$e.scrollWidth,Te=$e.component,He=Te===void 0?"div":Te,Ke=$e.onScroll,Ze=$e.onVirtualScroll,_e=$e.onVisibleChange,ft=$e.innerProps,Xe=$e.extraRender,Ve=$e.styles,Pt=$e.showScrollBar,Mt=Pt===void 0?"optional":Pt,st=(0,f.Z)($e,dt),Qt=h.useCallback(function(Ge){return typeof le=="function"?le(Ge):Ge==null?void 0:Ge[le]},[le]),pn=N(Qt,null,null),Lt=(0,M.Z)(pn,4),tn=Lt[0],ze=Lt[1],ke=Lt[2],Re=Lt[3],Z=!!(Pe!==!1&&Se&&$),ee=h.useMemo(function(){return Object.values(ke.maps).reduce(function(Ge,qe){return Ge+qe},0)},[ke.id,ke.maps]),me=Z&&q&&(Math.max($*q.length,ee)>Se||!!Ne),ve=Ae==="rtl",Ee=Q()(K,(0,te.Z)({},"".concat(K,"-rtl"),ve),xe),Me=q||vt,Ye=(0,h.useRef)(),nt=(0,h.useRef)(),_t=(0,h.useRef)(),nn=(0,h.useState)(0),ln=(0,M.Z)(nn,2),zt=ln[0],Jt=ln[1],yn=(0,h.useState)(0),Bn=(0,M.Z)(yn,2),mn=Bn[0],gn=Bn[1],Nt=(0,h.useState)(!1),wt=(0,M.Z)(Nt,2),qt=wt[0],At=wt[1],Nn=function(){At(!0)},Fe=function(){At(!1)},Ie={getKey:Qt};function Kt(Ge){Jt(function(qe){var ut;typeof Ge=="function"?ut=Ge(qe):ut=Ge;var mt=Wn(ut);return Ye.current.scrollTop=mt,mt})}var xt=(0,h.useRef)({start:0,end:Me.length}),Zt=(0,h.useRef)(),Ht=O(Me,Qt),yt=(0,M.Z)(Ht,1),Rt=yt[0];Zt.current=Rt;var sn=h.useMemo(function(){if(!Z)return{scrollHeight:void 0,start:0,end:Me.length-1,offset:void 0};if(!me){var Ge;return{scrollHeight:((Ge=nt.current)===null||Ge===void 0?void 0:Ge.offsetHeight)||0,start:0,end:Me.length-1,offset:void 0}}for(var qe=0,ut,mt,St,Yt=Me.length,vn=0;vn<Yt;vn+=1){var cn=Me[vn],Dn=Qt(cn),Vn=ke.get(Dn),Pn=qe+(Vn===void 0?$:Vn);Pn>=zt&&ut===void 0&&(ut=vn,mt=qe),Pn>zt+Se&&St===void 0&&(St=vn),qe=Pn}return ut===void 0&&(ut=0,mt=0,St=Math.ceil(Se/$)),St===void 0&&(St=Me.length-1),St=Math.min(St+1,Me.length-1),{scrollHeight:qe,start:ut,end:St,offset:mt}},[me,Z,zt,Me,Re,Se]),Ut=sn.scrollHeight,Gt=sn.start,Vt=sn.end,rn=sn.offset;xt.current.start=Gt,xt.current.end=Vt,h.useLayoutEffect(function(){var Ge=ke.getRecord();if(Ge.size===1){var qe=Array.from(Ge.keys())[0],ut=Ge.get(qe),mt=Me[Gt];if(mt&&ut===void 0){var St=Qt(mt);if(St===qe){var Yt=ke.get(qe),vn=Yt-$;Kt(function(cn){return cn+vn})}}}ke.resetRecord()},[Ut]);var Ft=h.useState({width:0,height:Se}),De=(0,M.Z)(Ft,2),Ce=De[0],ct=De[1],at=function(qe){ct({width:qe.offsetWidth,height:qe.offsetHeight})},Ot=(0,h.useRef)(),Wt=(0,h.useRef)(),jt=h.useMemo(function(){return rt(Ce.width,Ne)},[Ce.width,Ne]),on=h.useMemo(function(){return rt(Ce.height,Ut)},[Ce.height,Ut]),_n=Ut-Se,un=(0,h.useRef)(_n);un.current=_n;function Wn(Ge){var qe=Ge;return Number.isNaN(un.current)||(qe=Math.min(qe,un.current)),qe=Math.max(qe,0),qe}var An=zt<=0,wn=zt>=_n,Mn=mn<=0,Ln=mn>=Ne,jn=X(An,wn,Mn,Ln),Tn=function(){return{x:ve?-mn:mn,y:zt}},Rn=(0,h.useRef)(Tn()),an=(0,y.zX)(function(Ge){if(Ze){var qe=(0,pe.Z)((0,pe.Z)({},Tn()),Ge);(Rn.current.x!==qe.x||Rn.current.y!==qe.y)&&(Ze(qe),Rn.current=qe)}});function hn(Ge,qe){var ut=Ge;qe?((0,m.flushSync)(function(){gn(ut)}),an()):Kt(ut)}function En(Ge){var qe=Ge.currentTarget.scrollTop;qe!==zt&&Kt(qe),Ke==null||Ke(Ge),an()}var Yn=function(qe){var ut=qe,mt=Ne?Ne-Ce.width:0;return ut=Math.max(ut,0),ut=Math.min(ut,mt),ut},kn=(0,y.zX)(function(Ge,qe){qe?((0,m.flushSync)(function(){gn(function(ut){var mt=ut+(ve?-Ge:Ge);return Yn(mt)})}),an()):Kt(function(ut){var mt=ut+Ge;return mt})}),$n=Y(Z,An,wn,Mn,Ln,!!Ne,kn),Ar=(0,M.Z)($n,2),ge=Ar[0],We=Ar[1];J(Z,Ye,function(Ge,qe,ut,mt){var St=mt;return jn(Ge,qe,ut)?!1:!St||!St._virtualHandled?(St&&(St._virtualHandled=!0),ge({preventDefault:function(){},deltaX:Ge?qe:0,deltaY:Ge?0:qe}),!0):!1}),g(me,Ye,function(Ge){Kt(function(qe){return qe+Ge})}),(0,C.Z)(function(){function Ge(ut){var mt=An&&ut.detail<0,St=wn&&ut.detail>0;Z&&!mt&&!St&&ut.preventDefault()}var qe=Ye.current;return qe.addEventListener("wheel",ge,{passive:!1}),qe.addEventListener("DOMMouseScroll",We,{passive:!0}),qe.addEventListener("MozMousePixelScroll",Ge,{passive:!1}),function(){qe.removeEventListener("wheel",ge),qe.removeEventListener("DOMMouseScroll",We),qe.removeEventListener("MozMousePixelScroll",Ge)}},[Z,An,wn]),(0,C.Z)(function(){if(Ne){var Ge=Yn(mn);gn(Ge),an({x:Ge})}},[Ce.width,Ne]);var Ue=function(){var qe,ut;(qe=Ot.current)===null||qe===void 0||qe.delayHidden(),(ut=Wt.current)===null||ut===void 0||ut.delayHidden()},et=ie(Ye,Me,ke,$,Qt,function(){return ze(!0)},Kt,Ue);h.useImperativeHandle(ye,function(){return{nativeElement:_t.current,getScrollInfo:Tn,scrollTo:function(qe){function ut(mt){return mt&&(0,ne.Z)(mt)==="object"&&("left"in mt||"top"in mt)}ut(qe)?(qe.left!==void 0&&gn(Yn(qe.left)),et(qe.top)):et(qe)}}}),(0,C.Z)(function(){if(_e){var Ge=Me.slice(Gt,Vt+1);_e(Ge,Me)}},[Gt,Vt,Me]);var ot=L(Me,Qt,ke,$),lt=Xe==null?void 0:Xe({start:Gt,end:Vt,virtual:me,offsetX:mn,offsetY:rn,rtl:ve,getSize:ot}),Bt=B(Me,Gt,Vt,Ne,mn,tn,re,Ie),Ct=null;Se&&(Ct=(0,pe.Z)((0,te.Z)({},fe?"height":"maxHeight",Se),be),Z&&(Ct.overflowY="hidden",Ne&&(Ct.overflowX="hidden"),qt&&(Ct.pointerEvents="none")));var gt={};return ve&&(gt.dir="rtl"),h.createElement("div",(0,x.Z)({ref:_t,style:(0,pe.Z)((0,pe.Z)({},he),{},{position:"relative"}),className:Ee},gt,st),h.createElement(o.Z,{onResize:at},h.createElement(He,{className:"".concat(K,"-holder"),style:Ct,ref:Ye,onScroll:En,onMouseEnter:Ue},h.createElement(S,{prefixCls:K,height:Ut,offsetX:mn,offsetY:rn,scrollWidth:Ne,onInnerResize:ze,ref:nt,innerProps:ft,rtl:ve,extra:lt},Bt))),me&&Ut>Se&&h.createElement(Le,{ref:Ot,prefixCls:K,scrollOffset:zt,scrollRange:Ut,rtl:ve,onScroll:hn,onStartMove:Nn,onStopMove:Fe,spinSize:on,containerSize:Ce.height,style:Ve==null?void 0:Ve.verticalScrollBar,thumbStyle:Ve==null?void 0:Ve.verticalScrollBarThumb,showScrollBar:Mt}),me&&Ne>Ce.width&&h.createElement(Le,{ref:Wt,prefixCls:K,scrollOffset:mn,scrollRange:Ne,rtl:ve,onScroll:hn,onStartMove:Nn,onStopMove:Fe,spinSize:jt,containerSize:Ce.width,horizontal:!0,style:Ve==null?void 0:Ve.horizontalScrollBar,thumbStyle:Ve==null?void 0:Ve.horizontalScrollBarThumb,showScrollBar:Mt}))}var tt=h.forwardRef(Tt);tt.displayName="List";var It=tt,Qe=It},83145:function(fn,je,b){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.CopyToClipboard=void 0;var x=pe(b(59301)),ne=pe(b(25769));function pe(R){return R&&R.__esModule?R:{default:R}}function te(R){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?te=function(D){return typeof D}:te=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},te(R)}function M(R,O){var D=Object.keys(R);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(R);O&&(A=A.filter(function(W){return Object.getOwnPropertyDescriptor(R,W).enumerable})),D.push.apply(D,A)}return D}function f(R){for(var O=1;O<arguments.length;O++){var D=arguments[O]!=null?arguments[O]:{};O%2?M(D,!0).forEach(function(A){B(R,A,D[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(D)):M(D).forEach(function(A){Object.defineProperty(R,A,Object.getOwnPropertyDescriptor(D,A))})}return R}function oe(R,O){if(R==null)return{};var D=Q(R,O),A,W;if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(R);for(W=0;W<X.length;W++)A=X[W],!(O.indexOf(A)>=0)&&Object.prototype.propertyIsEnumerable.call(R,A)&&(D[A]=R[A])}return D}function Q(R,O){if(R==null)return{};var D={},A=Object.keys(R),W,X;for(X=0;X<A.length;X++)W=A[X],!(O.indexOf(W)>=0)&&(D[W]=R[W]);return D}function o(R,O){if(!(R instanceof O))throw new TypeError("Cannot call a class as a function")}function y(R,O){for(var D=0;D<O.length;D++){var A=O[D];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(R,A.key,A)}}function C(R,O,D){return O&&y(R.prototype,O),D&&y(R,D),R}function h(R,O){return O&&(te(O)==="object"||typeof O=="function")?O:E(R)}function m(R){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)},m(R)}function E(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function S(R,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(O&&O.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),O&&I(R,O)}function I(R,O){return I=Object.setPrototypeOf||function(A,W){return A.__proto__=W,A},I(R,O)}function B(R,O,D){return O in R?Object.defineProperty(R,O,{value:D,enumerable:!0,configurable:!0,writable:!0}):R[O]=D,R}var G=function(R){S(O,R);function O(){var D,A;o(this,O);for(var W=arguments.length,X=new Array(W),Y=0;Y<W;Y++)X[Y]=arguments[Y];return A=h(this,(D=m(O)).call.apply(D,[this].concat(X))),B(E(A),"onClick",function(L){var se=A.props,ae=se.text,Be=se.onCopy,U=se.children,k=se.options,N=x.default.Children.only(U),V=(0,ne.default)(ae,k);Be&&Be(ae,V),N&&N.props&&typeof N.props.onClick=="function"&&N.props.onClick(L)}),A}return C(O,[{key:"render",value:function(){var A=this.props,W=A.text,X=A.onCopy,Y=A.options,L=A.children,se=oe(A,["text","onCopy","options","children"]),ae=x.default.Children.only(L);return x.default.cloneElement(ae,f({},se,{onClick:this.onClick}))}}]),O}(x.default.PureComponent);je.CopyToClipboard=G,B(G,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(fn,je,b){"use strict";var x=b(83145),ne=x.CopyToClipboard;ne.CopyToClipboard=ne,fn.exports=ne},76374:function(fn,je,b){"use strict";var x=function(){if(typeof Map!="undefined")return Map;function U(k,N){var V=-1;return k.some(function(J,H){return J[0]===N?(V=H,!0):!1}),V}return function(){function k(){this.__entries__=[]}return Object.defineProperty(k.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),k.prototype.get=function(N){var V=U(this.__entries__,N),J=this.__entries__[V];return J&&J[1]},k.prototype.set=function(N,V){var J=U(this.__entries__,N);~J?this.__entries__[J][1]=V:this.__entries__.push([N,V])},k.prototype.delete=function(N){var V=this.__entries__,J=U(V,N);~J&&V.splice(J,1)},k.prototype.has=function(N){return!!~U(this.__entries__,N)},k.prototype.clear=function(){this.__entries__.splice(0)},k.prototype.forEach=function(N,V){V===void 0&&(V=null);for(var J=0,H=this.__entries__;J<H.length;J++){var v=H[J];N.call(V,v[1],v[0])}},k}()}(),ne=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,pe=function(){return typeof b.g!="undefined"&&b.g.Math===Math?b.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),te=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(pe):function(U){return setTimeout(function(){return U(Date.now())},1e3/60)}}(),M=2;function f(U,k){var N=!1,V=!1,J=0;function H(){N&&(N=!1,U()),V&&g()}function v(){te(H)}function g(){var F=Date.now();if(N){if(F-J<M)return;V=!0}else N=!0,V=!1,setTimeout(v,k);J=F}return g}var oe=20,Q=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",y=function(){function U(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=f(this.refresh.bind(this),oe)}return U.prototype.addObserver=function(k){~this.observers_.indexOf(k)||this.observers_.push(k),this.connected_||this.connect_()},U.prototype.removeObserver=function(k){var N=this.observers_,V=N.indexOf(k);~V&&N.splice(V,1),!N.length&&this.connected_&&this.disconnect_()},U.prototype.refresh=function(){var k=this.updateObservers_();k&&this.refresh()},U.prototype.updateObservers_=function(){var k=this.observers_.filter(function(N){return N.gatherActive(),N.hasActive()});return k.forEach(function(N){return N.broadcastActive()}),k.length>0},U.prototype.connect_=function(){!ne||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},U.prototype.disconnect_=function(){!ne||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},U.prototype.onTransitionEnd_=function(k){var N=k.propertyName,V=N===void 0?"":N,J=Q.some(function(H){return!!~V.indexOf(H)});J&&this.refresh()},U.getInstance=function(){return this.instance_||(this.instance_=new U),this.instance_},U.instance_=null,U}(),C=function(U,k){for(var N=0,V=Object.keys(k);N<V.length;N++){var J=V[N];Object.defineProperty(U,J,{value:k[J],enumerable:!1,writable:!1,configurable:!0})}return U},h=function(U){var k=U&&U.ownerDocument&&U.ownerDocument.defaultView;return k||pe},m=W(0,0,0,0);function E(U){return parseFloat(U)||0}function S(U){for(var k=[],N=1;N<arguments.length;N++)k[N-1]=arguments[N];return k.reduce(function(V,J){var H=U["border-"+J+"-width"];return V+E(H)},0)}function I(U){for(var k=["top","right","bottom","left"],N={},V=0,J=k;V<J.length;V++){var H=J[V],v=U["padding-"+H];N[H]=E(v)}return N}function B(U){var k=U.getBBox();return W(0,0,k.width,k.height)}function G(U){var k=U.clientWidth,N=U.clientHeight;if(!k&&!N)return m;var V=h(U).getComputedStyle(U),J=I(V),H=J.left+J.right,v=J.top+J.bottom,g=E(V.width),F=E(V.height);if(V.boxSizing==="border-box"&&(Math.round(g+H)!==k&&(g-=S(V,"left","right")+H),Math.round(F+v)!==N&&(F-=S(V,"top","bottom")+v)),!O(U)){var ie=Math.round(g+H)-k,ue=Math.round(F+v)-N;Math.abs(ie)!==1&&(g-=ie),Math.abs(ue)!==1&&(F-=ue)}return W(J.left,J.top,g,F)}var R=function(){return typeof SVGGraphicsElement!="undefined"?function(U){return U instanceof h(U).SVGGraphicsElement}:function(U){return U instanceof h(U).SVGElement&&typeof U.getBBox=="function"}}();function O(U){return U===h(U).document.documentElement}function D(U){return ne?R(U)?B(U):G(U):m}function A(U){var k=U.x,N=U.y,V=U.width,J=U.height,H=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,v=Object.create(H.prototype);return C(v,{x:k,y:N,width:V,height:J,top:N,right:k+V,bottom:J+N,left:k}),v}function W(U,k,N,V){return{x:U,y:k,width:N,height:V}}var X=function(){function U(k){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=W(0,0,0,0),this.target=k}return U.prototype.isActive=function(){var k=D(this.target);return this.contentRect_=k,k.width!==this.broadcastWidth||k.height!==this.broadcastHeight},U.prototype.broadcastRect=function(){var k=this.contentRect_;return this.broadcastWidth=k.width,this.broadcastHeight=k.height,k},U}(),Y=function(){function U(k,N){var V=A(N);C(this,{target:k,contentRect:V})}return U}(),L=function(){function U(k,N,V){if(this.activeObservations_=[],this.observations_=new x,typeof k!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=k,this.controller_=N,this.callbackCtx_=V}return U.prototype.observe=function(k){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(k instanceof h(k).Element))throw new TypeError('parameter 1 is not of type "Element".');var N=this.observations_;N.has(k)||(N.set(k,new X(k)),this.controller_.addObserver(this),this.controller_.refresh())}},U.prototype.unobserve=function(k){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(k instanceof h(k).Element))throw new TypeError('parameter 1 is not of type "Element".');var N=this.observations_;N.has(k)&&(N.delete(k),N.size||this.controller_.removeObserver(this))}},U.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},U.prototype.gatherActive=function(){var k=this;this.clearActive(),this.observations_.forEach(function(N){N.isActive()&&k.activeObservations_.push(N)})},U.prototype.broadcastActive=function(){if(this.hasActive()){var k=this.callbackCtx_,N=this.activeObservations_.map(function(V){return new Y(V.target,V.broadcastRect())});this.callback_.call(k,N,k),this.clearActive()}},U.prototype.clearActive=function(){this.activeObservations_.splice(0)},U.prototype.hasActive=function(){return this.activeObservations_.length>0},U}(),se=typeof WeakMap!="undefined"?new WeakMap:new x,ae=function(){function U(k){if(!(this instanceof U))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var N=y.getInstance(),V=new L(k,N,this);se.set(this,V)}return U}();["observe","unobserve","disconnect"].forEach(function(U){ae.prototype[U]=function(){var k;return(k=se.get(this))[U].apply(k,arguments)}});var Be=function(){return typeof pe.ResizeObserver!="undefined"?pe.ResizeObserver:ae}();je.Z=Be},27774:function(fn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.SizeSensorId=je.SensorTabIndex=je.SensorClassName=void 0;var b="size-sensor-id";je.SizeSensorId=b;var x="size-sensor-object";je.SensorClassName=x;var ne="-1";je.SensorTabIndex=ne},79301:function(fn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var b=function(ne){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,te=null;return function(){for(var M=this,f=arguments.length,oe=new Array(f),Q=0;Q<f;Q++)oe[Q]=arguments[Q];clearTimeout(te),te=setTimeout(function(){ne.apply(M,oe)},pe)}};je.default=b},79789:function(fn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var b=1,x=function(){return"".concat(b++)};je.default=x},47242:function(fn,je,b){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.ver=je.clear=je.bind=void 0;var x=b(16478),ne=function(f,oe){var Q=(0,x.getSensor)(f);return Q.bind(oe),function(){Q.unbind(oe)}};je.bind=ne;var pe=function(f){var oe=(0,x.getSensor)(f);(0,x.removeSensor)(oe)};je.clear=pe;var te="1.0.2";je.ver=te},16478:function(fn,je,b){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.removeSensor=je.getSensor=je.Sensors=void 0;var x=te(b(79789)),ne=b(57829),pe=b(27774);function te(o){return o&&o.__esModule?o:{default:o}}var M={};je.Sensors=M;function f(o){o&&M[o]&&delete M[o]}var oe=function(y){var C=y.getAttribute(pe.SizeSensorId);if(C&&M[C])return M[C];var h=(0,x.default)();y.setAttribute(pe.SizeSensorId,h);var m=(0,ne.createSensor)(y,function(){return f(h)});return M[h]=m,m};je.getSensor=oe;var Q=function(y){var C=y.element.getAttribute(pe.SizeSensorId);y.destroy(),f(C)};je.removeSensor=Q},57829:function(fn,je,b){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.createSensor=void 0;var x=b(20953),ne=b(55202),pe=typeof ResizeObserver!="undefined"?ne.createSensor:x.createSensor;je.createSensor=pe},20953:function(fn,je,b){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.createSensor=void 0;var x=pe(b(79301)),ne=b(27774);function pe(M){return M&&M.__esModule?M:{default:M}}var te=function(f,oe){var Q=void 0,o=[],y=function(){getComputedStyle(f).position==="static"&&(f.style.position="relative");var I=document.createElement("object");return I.onload=function(){I.contentDocument.defaultView.addEventListener("resize",C),C()},I.style.display="block",I.style.position="absolute",I.style.top="0",I.style.left="0",I.style.height="100%",I.style.width="100%",I.style.overflow="hidden",I.style.pointerEvents="none",I.style.zIndex="-1",I.style.opacity="0",I.setAttribute("class",ne.SensorClassName),I.setAttribute("tabindex",ne.SensorTabIndex),I.type="text/html",f.appendChild(I),I.data="about:blank",I},C=(0,x.default)(function(){o.forEach(function(S){S(f)})}),h=function(I){Q||(Q=y()),o.indexOf(I)===-1&&o.push(I)},m=function(){Q&&Q.parentNode&&(Q.contentDocument&&Q.contentDocument.defaultView.removeEventListener("resize",C),Q.parentNode.removeChild(Q),f.removeAttribute(ne.SizeSensorId),Q=void 0,o=[],oe&&oe())},E=function(I){var B=o.indexOf(I);B!==-1&&o.splice(B,1),o.length===0&&Q&&m()};return{element:f,bind:h,destroy:m,unbind:E}};je.createSensor=te},55202:function(fn,je,b){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.createSensor=void 0;var x=b(27774),ne=pe(b(79301));function pe(M){return M&&M.__esModule?M:{default:M}}var te=function(f,oe){var Q=void 0,o=[],y=(0,ne.default)(function(){o.forEach(function(S){S(f)})}),C=function(){var I=new ResizeObserver(y);return I.observe(f),y(),I},h=function(I){Q||(Q=C()),o.indexOf(I)===-1&&o.push(I)},m=function(){Q.disconnect(),o=[],Q=void 0,f.removeAttribute(x.SizeSensorId),oe&&oe()},E=function(I){var B=o.indexOf(I);B!==-1&&o.splice(B,1),o.length===0&&Q&&m()};return{element:f,bind:h,destroy:m,unbind:E}};je.createSensor=te},98040:function(fn){fn.exports=function(){var je=document.getSelection();if(!je.rangeCount)return function(){};for(var b=document.activeElement,x=[],ne=0;ne<je.rangeCount;ne++)x.push(je.getRangeAt(ne));switch(b.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":b.blur();break;default:b=null;break}return je.removeAllRanges(),function(){je.type==="Caret"&&je.removeAllRanges(),je.rangeCount||x.forEach(function(pe){je.addRange(pe)}),b&&b.focus()}}},93314:function(fn){"use strict";fn.exports="data:image/png;base64,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"},96908:function(fn){"use strict";fn.exports="data:image/png;base64,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"},57177:function(fn){"use strict";fn.exports="data:image/png;base64,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"},81378:function(fn){"use strict";fn.exports="data:image/png;base64,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"},68535:function(fn,je,b){"use strict";b.d(je,{ZP:function(){return gs}});const x=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ne=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=pe},pe=Number.MAX_SAFE_INTEGER||9007199254740991;let te=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),M=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",a.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",a.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.ASSET_LIST_LOAD_ERROR="assetListLoadError",a.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",a.ASSET_LIST_PARSING_ERROR="assetListParsingError",a.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.ATTACH_MEDIA_ERROR="attachMediaError",a.UNKNOWN="unknown",a}({}),f=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a}({});var oe={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Q={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class o{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class y{constructor(e,t,n,r=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new o(e),this.fast_=new o(t),this.defaultTTFB_=r,this.ttfb_=new o(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new o(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new o(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new o(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,r=e/1e3,i=n/r;this.fast_.sample(r,i),this.slow_.sample(r,i)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function C(a,e,t){return(e=I(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function h(){return h=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},h.apply(null,arguments)}function m(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),t.push.apply(t,n)}return t}function E(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?m(Object(t),!0).forEach(function(n){C(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function S(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function I(a){var e=S(a,"string");return typeof e=="symbol"?e:e+""}class B{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const n=`[${e}]:`;this.trace=G,this.debug=t.debug.bind(null,n),this.log=t.log.bind(null,n),this.warn=t.warn.bind(null,n),this.info=t.info.bind(null,n),this.error=t.error.bind(null,n)}}const G=function(){},R={trace:G,debug:G,log:G,warn:G,info:G,error:G};function O(){return h({},R)}function D(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):G}function A(a,e,t){return e[a]?e[a].bind(e):D(a,t)}const W=O();function X(a,e,t){const n=O();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=A(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.11`)}catch(i){return O()}r.forEach(i=>{W[i]=A(i,a)})}else h(W,n);return n}const Y=W;function L(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function se(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function ae(a,e){const t=Object.keys(a),n=Object.keys(e),r=t.length,i=n.length;return!r||!i||r===i&&!t.some(s=>n.indexOf(s)===-1)}function Be(a,e=!1){if(typeof TextDecoder!="undefined"){const u=new TextDecoder("utf-8").decode(a);if(e){const d=u.indexOf("\0");return d!==-1?u.substring(0,d):u}return u.replace(/\0/g,"")}const t=a.length;let n,r,i,s="",l=0;for(;l<t;){if(n=a[l++],n===0&&e)return s;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(n);break;case 12:case 13:r=a[l++],s+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=a[l++],i=a[l++],s+=String.fromCharCode((n&15)<<12|(r&63)<<6|(i&63)<<0);break}}return s}function U(a){let e="";for(let t=0;t<a.length;t++){let n=a[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}function k(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function N(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var V={exports:{}},J;function H(){return J||(J=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(c,u,d){if(d=d||{},c=c.trim(),u=u.trim(),!u){if(!d.alwaysNormalize)return c;var p=l.parseURL(c);if(!p)throw new Error("Error trying to parse base URL.");return p.path=l.normalizePath(p.path),l.buildURLFromParts(p)}var _=l.parseURL(u);if(!_)throw new Error("Error trying to parse relative URL.");if(_.scheme)return d.alwaysNormalize?(_.path=l.normalizePath(_.path),l.buildURLFromParts(_)):u;var w=l.parseURL(c);if(!w)throw new Error("Error trying to parse base URL.");if(!w.netLoc&&w.path&&w.path[0]!=="/"){var T=r.exec(w.path);w.netLoc=T[1],w.path=T[2]}w.netLoc&&!w.path&&(w.path="/");var j={scheme:w.scheme,netLoc:_.netLoc,path:null,params:_.params,query:_.query,fragment:_.fragment};if(!_.netLoc&&(j.netLoc=w.netLoc,_.path[0]!=="/"))if(!_.path)j.path=w.path,_.params||(j.params=w.params,_.query||(j.query=w.query));else{var z=w.path,ce=z.substring(0,z.lastIndexOf("/")+1)+_.path;j.path=l.normalizePath(ce)}return j.path===null&&(j.path=d.alwaysNormalize?l.normalizePath(_.path):_.path),l.buildURLFromParts(j)},parseURL:function(c){var u=n.exec(c);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(c){for(c=c.split("").reverse().join("").replace(i,"");c.length!==(c=c.replace(s,"")).length;);return c.split("").reverse().join("")},buildURLFromParts:function(c){return c.scheme+c.netLoc+c.path+c.params+c.query+c.fragment}};a.exports=l})()}(V)),V.exports}var v=H();class g{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var F={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ie{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,dt(this,"stats")}setByteRange(e,t){const n=e.split("@",2);let r;n.length===1?r=(t==null?void 0:t.byteRangeEndOffset)||0:r=parseInt(n[1]),this._byteRange=[r,parseInt(n[0])+r]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[F.AUDIO]:null,[F.VIDEO]:null,[F.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new g),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=v.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[F.AUDIO]=null,e[F.VIDEO]=null,e[F.AUDIOVIDEO]=null}}function ue(a){return a.sn!=="initSegment"}class Le extends ie{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange.length){const e=this.byteRange[0],t=this.byteRange[1];if(x(e)&&x(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const n=Object.keys(this.levelkeys);if(n.length===1){const r=this._decryptdata=this.levelkeys[n[0]]||null;if(r)return r.getDecryptData(this.sn)}}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=x(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){var t;const n=Object.keys(this.levelkeys),r=n.length;if(r>1||r===1&&(t=this.levelkeys[n[0]])!=null&&t.encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!x(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return ue(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,r,i,s=!1){const{elementaryStreams:l}=this,c=l[e];if(!c){l[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}c.startPTS=Math.min(c.startPTS,t),c.endPTS=Math.max(c.endPTS,n),c.startDTS=Math.min(c.startDTS,r),c.endDTS=Math.max(c.endDTS,i)}}class Je extends ie{constructor(e,t,n,r,i){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function rt(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||rt(t,e)}}function dt(a,e){const t=rt(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const vt=Math.pow(2,32)-1,be=[].push,Tt={video:1,audio:2,id3:3,text:4};function tt(a){return String.fromCharCode.apply(null,a)}function It(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Qe(a,e){const t=ye(a,e);return t<0?4294967296+t:t}function $e(a,e){let t=Qe(a,e);return t*=Math.pow(2,32),t+=Qe(a,e+4),t}function ye(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function de(a){const e=a.byteLength;for(let t=0;t<e;){const n=Qe(a,t);if(n>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=n>1?t+n:e}return!1}function K(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=Qe(a,r),s=tt(a.subarray(r+4,r+8)),l=i>1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,l));else{const c=K(a.subarray(r+8,l),e.slice(1));c.length&&be.apply(t,c)}r=l}return t}function xe(a){const e=[],t=a[0];let n=8;const r=Qe(a,n);n+=4;let i=0,s=0;t===0?(i=Qe(a,n),s=Qe(a,n+4),n+=8):(i=$e(a,n),s=$e(a,n+8),n+=16),n+=2;let l=a.length+s;const c=It(a,n);n+=2;for(let u=0;u<c;u++){let d=n;const p=Qe(a,d);d+=4;const _=p&2147483647;if((p&2147483648)>>>31===1)return Y.warn("SIDX has hierarchical references (not supported)"),null;const T=Qe(a,d);d+=4,e.push({referenceSize:_,subsegmentDuration:T,info:{duration:T/r,start:l,end:l+_-1}}),l+=_,d+=4,n=d}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:c,references:e}}function Se(a){const e=[],t=K(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=K(i,["tkhd"])[0];if(s){let l=s[0];const c=Qe(s,l===0?12:20),u=K(i,["mdia","mdhd"])[0];if(u){l=u[0];const d=Qe(u,l===0?12:20),p=K(i,["mdia","hdlr"])[0];if(p){const _=tt(p.subarray(8,12)),w={soun:F.AUDIO,vide:F.VIDEO}[_],T=K(i,["mdia","minf","stbl","stsd"])[0],j=$(T);w?(e[c]={timescale:d,type:w,stsd:j},e[w]=E({timescale:d,id:c},j)):e[c]={timescale:d,type:_,stsd:j}}}}}return K(a,["moov","mvex","trex"]).forEach(r=>{const i=Qe(r,4),s=e[i];s&&(s.default={duration:Qe(r,12),flags:Qe(r,20)})}),e}function $(a){const e=a.subarray(8),t=e.subarray(86),n=tt(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const u=K(e,[n])[0].subarray(n==="enca"?28:78);K(u,["sinf"]).forEach(p=>{const _=K(p,["schm"])[0];if(_){const w=tt(_.subarray(4,8));if(w==="cbcs"||w==="cenc"){const T=K(p,["frma"])[0];T&&(r=tt(T))}}})}const l=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const c=K(t,["avcC"])[0];c&&c.length>3&&(r+="."+q(c[1])+q(c[2])+q(c[3]),i=P(l==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const c=K(e,[n])[0],u=K(c.subarray(28),["esds"])[0];if(u&&u.length>7){let d=4;if(u[d++]!==3)break;d=he(u,d),d+=2;const p=u[d++];if(p&128&&(d+=2),p&64&&(d+=u[d++]),u[d++]!==4)break;d=he(u,d);const _=u[d++];if(_===64)r+="."+q(_);else break;if(d+=12,u[d++]!==5)break;d=he(u,d);const w=u[d++];let T=(w&248)>>3;T===31&&(T+=1+((w&7)<<3)+((u[d]&224)>>5)),r+="."+T}break}case"hvc1":case"hev1":{const c=K(t,["hvcC"])[0];if(c&&c.length>12){const u=c[1],d=["","A","B","C"][u>>6],p=u&31,_=Qe(c,2),w=(u&32)>>5?"H":"L",T=c[12],j=c.subarray(6,12);r+="."+d+p,r+="."+fe(_).toString(16).toUpperCase(),r+="."+w+T;let z="";for(let ce=j.length;ce--;){const Oe=j[ce];(Oe||z)&&(z="."+Oe.toString(16).toUpperCase()+z)}r+=z}i=P(l=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=P(r,t)||r;break}case"vp09":{const c=K(t,["vpcC"])[0];if(c&&c.length>6){const u=c[4],d=c[5],p=c[6]>>4&15;r+="."+re(u)+"."+re(d)+"."+re(p)}break}case"av01":{const c=K(t,["av1C"])[0];if(c&&c.length>2){const u=c[1]>>>5,d=c[1]&31,p=c[2]>>>7?"H":"M",_=(c[2]&64)>>6,w=(c[2]&32)>>5,T=u===2&&_?w?12:10:_?10:8,j=(c[2]&16)>>4,z=(c[2]&8)>>3,ce=(c[2]&4)>>2,Oe=c[2]&3;r+="."+u+"."+re(d)+p+"."+re(T)+"."+j+"."+z+ce+Oe+"."+re(1)+"."+re(1)+"."+re(1)+"."+0,i=P("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function P(a,e){const t=K(e,["dvvC"]),n=t.length?t[0]:K(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+re(r)+"."+re(i)}}function fe(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function he(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function q(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function re(a){return(a<10?"0":"")+a}function le(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&K(a,["moov","trak"]).forEach(r=>{const s=K(r,["mdia","minf","stbl","stsd"])[0].subarray(8);let l=K(s,["enca"]);const c=l.length>0;c||(l=K(s,["encv"])),l.forEach(u=>{const d=c?u.subarray(28):u.subarray(78);K(d,["sinf"]).forEach(_=>{const w=Pe(_);if(w){const T=w.subarray(8,24);T.some(j=>j!==0)||(Y.log(`[eme] Patching keyId in 'enc${c?"a":"v"}>sinf>>tenc' box: ${U(T)} -> ${U(t)}`),w.set(t,8))}})})})}function Pe(a){const e=K(a,["schm"])[0];if(e){const t=tt(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return K(a,["schi","tenc"])[0]}return null}function Ae(a,e,t){const n={},r=K(a,["moof","traf"]);for(let i=0;i<r.length;i++){const s=r[i],l=K(s,["tfhd"])[0],c=Qe(l,4),u=e[c];if(!u)continue;n[c]||(n[c]={start:NaN,duration:0,sampleCount:0,timescale:u.timescale,type:u.type});const d=n[c],p=K(s,["tfdt"])[0];if(p){const we=p[0];let it=Qe(p,4);we===1&&(it===vt?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(it*=vt+1,it+=Qe(p,8))),x(it)&&(!x(d.start)||it<d.start)&&(d.start=it)}const _=u.default,w=Qe(l,0)|(_==null?void 0:_.flags);let T=(_==null?void 0:_.duration)||0;w&8&&(w&2?T=Qe(l,12):T=Qe(l,8));const j=K(s,["trun"]);let z=d.start||0,ce=0,Oe=T;for(let we=0;we<j.length;we++){const it=j[we],Et=Qe(it,4),$t=d.sampleCount;d.sampleCount+=Et;const ht=it[3]&1,Dt=it[3]&4,kt=it[2]&1,pt=it[2]&2,en=it[2]&4,Zn=it[2]&8;let ar=8,pr=Et;for(ht&&(ar+=4),Dt&&Et&&(!(it[ar+1]&1)&&d.keyFrameIndex===void 0&&(d.keyFrameIndex=$t),ar+=4,kt?(Oe=Qe(it,ar),ar+=4):Oe=T,pt&&(ar+=4),Zn&&(ar+=4),z+=Oe,ce+=Oe,pr--);pr--;)kt?(Oe=Qe(it,ar),ar+=4):Oe=T,pt&&(ar+=4),en&&(it[ar+1]&1||d.keyFrameIndex===void 0&&(d.keyFrameIndex=d.sampleCount-(pr+1),d.keyFrameStart=z),ar+=4),Zn&&(ar+=4),z+=Oe,ce+=Oe;!ce&&T&&(ce+=T*Et)}d.duration+=ce}if(!Object.keys(n).some(i=>n[i].duration)){let i=1/0,s=0;const l=K(a,["sidx"]);for(let c=0;c<l.length;c++){const u=xe(l[c]);if(u!=null&&u.references){i=Math.min(i,u.earliestPresentationTime/u.timescale);const d=u.references.reduce((p,_)=>p+_.info.duration||0,0);s=Math.max(s,d+u.earliestPresentationTime/u.timescale)}}s&&x(s)&&Object.keys(n).forEach(c=>{n[c].duration||(n[c].duration=s*n[c].timescale-n[c].start)})}return n}function Ne(a){const e={valid:null,remainder:null},t=K(a,["moof"]);if(t.length<2)return e.remainder=a,e;const n=t[t.length-1];return e.valid=a.slice(0,n.byteOffset-8),e.remainder=a.slice(n.byteOffset-8),e}function Te(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function He(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return K(n,["moof"]).map(c=>{const u=c.byteOffset-8;K(c,["traf"]).map(p=>{const _=K(p,["tfdt"]).map(w=>{const T=w[0];let j=Qe(w,4);return T===1&&(j*=Math.pow(2,32),j+=Qe(w,8)),j/r})[0];return _!==void 0&&(a=_),K(p,["tfhd"]).map(w=>{const T=Qe(w,4),j=Qe(w,0)&16777215,z=(j&1)!==0,ce=(j&2)!==0,Oe=(j&8)!==0;let we=0;const it=(j&16)!==0;let Et=0;const $t=(j&32)!==0;let ht=8;T===i&&(z&&(ht+=8),ce&&(ht+=4),Oe&&(we=Qe(w,ht),ht+=4),it&&(Et=Qe(w,ht),ht+=4),$t&&(ht+=4),e.type==="video"&&(s=Ke(e.codec)),K(p,["trun"]).map(Dt=>{const kt=Dt[0],pt=Qe(Dt,0)&16777215,en=(pt&1)!==0;let Zn=0;const ar=(pt&4)!==0,pr=(pt&256)!==0;let or=0;const Fn=(pt&512)!==0;let ur=0;const Xn=(pt&1024)!==0,cr=(pt&2048)!==0;let Sr=0;const Un=Qe(Dt,4);let Kn=8;en&&(Zn=Qe(Dt,Kn),Kn+=4),ar&&(Kn+=4);let Ir=Zn+u;for(let Ur=0;Ur<Un;Ur++){if(pr?(or=Qe(Dt,Kn),Kn+=4):or=we,Fn?(ur=Qe(Dt,Kn),Kn+=4):ur=Et,Xn&&(Kn+=4),cr&&(kt===0?Sr=Qe(Dt,Kn):Sr=ye(Dt,Kn),Kn+=4),e.type===F.VIDEO){let kr=0;for(;kr<ur;){const Or=Qe(n,Ir);if(Ir+=4,Ze(s,n[Ir])){const Ei=n.subarray(Ir,Ir+Or);_e(Ei,s?2:1,a+Sr/r,t)}Ir+=Or,kr+=Or+4}}a+=or/r}}))})})}),t}function Ke(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function Ze(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function _e(a,e,t,n){const r=ft(a);let i=0;i+=e;let s=0,l=0,c=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;c=r[i++],s+=c}while(c===255);l=0;do{if(i>=r.length)break;c=r[i++],l+=c}while(c===255);const u=r.length-i;let d=i;if(l<u)i+=l;else if(l>u){Y.error(`Malformed SEI payload. ${l} is too small, only ${u} bytes left to parse.`);break}if(s===4){if(r[d++]===181){const _=It(r,d);if(d+=2,_===49){const w=Qe(r,d);if(d+=4,w===1195456820){const T=r[d++];if(T===3){const j=r[d++],z=31&j,ce=64&j,Oe=ce?2+z*3:0,we=new Uint8Array(Oe);if(ce){we[0]=j;for(let it=1;it<Oe;it++)we[it]=r[d++]}n.push({type:T,payloadType:s,pts:t,bytes:we})}}}}}else if(s===5&&l>16){const p=[];for(let T=0;T<16;T++){const j=r[d++].toString(16);p.push(j.length==1?"0"+j:j),(T===3||T===5||T===7||T===9)&&p.push("-")}const _=l-16,w=new Uint8Array(_);for(let T=0;T<_;T++)w[T]=r[d++];n.push({payloadType:s,pts:t,uuid:p.join(""),userData:Be(w),userDataBytes:w})}}}function ft(a){const e=a.byteLength,t=[];let n=1;for(;n<e-2;)a[n]===0&&a[n+1]===0&&a[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return a;const r=e-t.length,i=new Uint8Array(r);let s=0;for(n=0;n<r;s++,n++)s===t[0]&&(s++,t.shift()),i[n]=a[s];return i}function Xe(a){const e=a[0];let t="",n="",r=0,i=0,s=0,l=0,c=0,u=0;if(e===0){for(;tt(a.subarray(u,u+1))!=="\0";)t+=tt(a.subarray(u,u+1)),u+=1;for(t+=tt(a.subarray(u,u+1)),u+=1;tt(a.subarray(u,u+1))!=="\0";)n+=tt(a.subarray(u,u+1)),u+=1;n+=tt(a.subarray(u,u+1)),u+=1,r=Qe(a,12),i=Qe(a,16),l=Qe(a,20),c=Qe(a,24),u=28}else if(e===1){u+=4,r=Qe(a,u),u+=4;const p=Qe(a,u);u+=4;const _=Qe(a,u);for(u+=4,s=Cl(2,32)*p+_,ne(s)||(s=Number.MAX_SAFE_INTEGER,Y.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=Qe(a,u),u+=4,c=Qe(a,u),u+=4;tt(a.subarray(u,u+1))!=="\0";)t+=tt(a.subarray(u,u+1)),u+=1;for(t+=tt(a.subarray(u,u+1)),u+=1;tt(a.subarray(u,u+1))!=="\0";)n+=tt(a.subarray(u,u+1)),u+=1;n+=tt(a.subarray(u,u+1)),u+=1}const d=a.subarray(u,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:l,id:c,payload:d}}function Ve(a,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const i=new Uint8Array(n);for(i[0]=n>>24&255,i[1]=n>>16&255,i[2]=n>>8&255,i[3]=n&255,i.set(a,4),r=0,n=8;r<t;r++)i.set(e[r],n),n+=e[r].byteLength;return i}function Pt(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let i;n>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),Ve([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t)}const Mt=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),st={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Qt(a,e){const t=st[e];return!!t&&!!t[a.slice(0,4)]}function pn(a,e,t=!0){return!a.split(",").some(n=>!Lt(n,e,t))}function Lt(a,e,t=!0){var n;const r=L(t);return(n=r==null?void 0:r.isTypeSupported(tn(a,e)))!=null?n:!1}function tn(a,e){return`${e}/mp4;codecs=${a}`}function ze(a){if(a){const e=a.substring(0,4);return st.video[e]}return 2}function ke(a){const e=Mt();return a.split(",").reduce((t,n)=>{const i=e&&Ke(n)?9:st.video[n];return i?(i*2+t)/(t?3:2):(st.audio[n]+t)/(t?2:1)},0)}const Re={};function Z(a,e=!0){if(Re[a])return Re[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let r=0;r<t.length;r++){var n;if(Lt(t[r],"audio",e))return Re[a]=t[r],t[r];if(t[r]==="mp3"&&(n=L(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const ee=/flac|opus|mp4a\.40\.34/i;function me(a,e=!0){return a.replace(ee,t=>Z(t.toLowerCase(),e))}function ve(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)Qt(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function Ee(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Me(a,"audio")||Me(a,"video")))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let n=t.length;n--;)if(t[n].substring(0,4)===a.substring(0,4))return t[n]}return t[0]}}return e||a}function Me(a,e){return Qt(a,e)&&Lt(a,e)}function Ye(a){const e=a.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");n.length>2&&n[0]==="avc1"&&(e[t]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[2]).toString(16)).slice(-4)}`)}return e.join(",")}function nt(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return a}function _t(a){const e=L(a)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function nn(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const ln={supported:!0,powerEfficient:!0,smooth:!0},zt={supported:!1,smooth:!1,powerEfficient:!1},Jt={supported:!0,configurations:[],decodingInfoResults:[ln]};function yn(a,e){return{supported:!1,configurations:e,decodingInfoResults:[zt],error:a}}function Bn(a,e,t,n,r,i){const s=a.videoCodec,l=a.audioCodec?a.audioGroups:null,c=i==null?void 0:i.audioCodec,u=i==null?void 0:i.channels,d=u?parseInt(u):c?1/0:2;let p=null;if(l!=null&&l.length)try{l.length===1&&l[0]?p=e.groups[l[0]].channels:p=l.reduce((_,w)=>{if(w){const T=e.groups[w];if(!T)throw new Error(`Audio track group ${w} not found`);Object.keys(T.channels).forEach(j=>{_[j]=(_[j]||0)+T.channels[j]})}return _},{2:0})}catch(_){return!0}return s!==void 0&&(s.split(",").some(_=>Ke(_))||a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(n,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(r,8e6))||!!p&&x(d)&&Object.keys(p).some(_=>parseInt(_)>d)}function mn(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(Jt);const i=[],s=gn(a),l=s.length,c=Nt(a,e,l>0),u=c.length;for(let d=l||1*u||1;d--;){const p={type:"media-source"};if(l&&(p.video=s[d%l]),u){p.audio=c[d%u];const _=p.audio.bitrate;p.video&&_&&(p.video.bitrate-=_)}i.push(p)}if(r){const d=navigator.userAgent;if(r.split(",").some(p=>Ke(p))&&Mt())return Promise.resolve(yn(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${d})`),i))}return Promise.all(i.map(d=>{const p=At(d);return n[p]||(n[p]=t.decodingInfo(d))})).then(d=>({supported:!d.some(p=>!p.supported),configurations:i,decodingInfoResults:d})).catch(d=>({supported:!1,configurations:i,decodingInfoResults:[],error:d}))}function gn(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=qt(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,l=a.videoRange.toLowerCase();return t?t.map(c=>{const u={contentType:tn(nt(c),"video"),width:r,height:i,bitrate:n,framerate:s};return l!=="sdr"&&(u.transferFunction=l),u}):[]}function Nt(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=qt(a);return r&&a.audioGroups?a.audioGroups.reduce((s,l)=>{var c;const u=l?(c=e.groups[l])==null?void 0:c.tracks:null;return u?u.reduce((d,p)=>{if(p.groupId===l){const _=parseFloat(p.channels||"");r.forEach(w=>{const T={contentType:tn(w,"audio"),bitrate:t?wt(w,i):i};_&&(T.channels=""+_),d.push(T)})}return d},s):s},[]):[]}function wt(a,e){if(e<=1)return 1;let t=128e3;return a==="ec-3"?t=768e3:a==="ac-3"&&(t=64e4),Math.min(e/2,t)}function qt(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function At(a){let e="";const{audio:t,video:n}=a;if(n){const r=nn(n.contentType);e+=`${r}_r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction||"sd"}_${Math.ceil(n.bitrate/1e5)}`}if(t){const r=nn(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const Nn=["NONE","TYPE-0","TYPE-1",null];function Fe(a){return Nn.indexOf(a)>-1}const Ie=["SDR","PQ","HLG"];function Kt(a){return!!a&&Ie.indexOf(a)>-1}var xt={No:"",Yes:"YES",v2:"v2"};function Zt(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?xt.v2:xt.Yes:xt.No}class Ht{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class yt{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(n=>!!n).map(n=>n.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const n=(t=e.supplemental)==null?void 0:t.videoCodec;n&&n!==e.videoCodec&&(this.codecSet+=`,${n.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Rt(this._audioGroups,e)}hasSubtitleGroup(e){return Rt(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let n=this._audioGroups;n||(n=this._audioGroups=[]),n.indexOf(t)===-1&&n.push(t)}else if(e==="text"){let n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),n.indexOf(t)===-1&&n.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Rt(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function sn(){if(typeof matchMedia=="function"){const a=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(a.media!==e.media)return a.matches===!0}return!1}function Ut(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||Ie.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&sn(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const Gt=a=>{const e=new WeakSet;return(t,n)=>{if(a&&(n=a(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},Vt=(a,e)=>JSON.stringify(a,Gt(e));function rn(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,l=n==null?void 0:n.audioCodec,c=r==null?void 0:r.videoCodec,u=s&&parseInt(s)===2;let d=!1,p=!1,_=1/0,w=1/0,T=1/0,j=1/0,z=0,ce=[];const{preferHDR:Oe,allowedVideoRanges:we}=Ut(e,r);for(let Dt=i.length;Dt--;){const kt=a[i[Dt]];d||(d=kt.channels[2]>0),_=Math.min(_,kt.minHeight),w=Math.min(w,kt.minFramerate),T=Math.min(T,kt.minBitrate),we.filter(en=>kt.videoRanges[en]>0).length>0&&(p=!0)}_=x(_)?_:0,w=x(w)?w:0;const it=Math.max(1080,_),Et=Math.max(30,w);T=x(T)?T:t,t=Math.max(T,t),p||(e=void 0);const $t=i.length>1;return{codecSet:i.reduce((Dt,kt)=>{const pt=a[kt];if(kt===Dt)return Dt;if(ce=p?we.filter(en=>pt.videoRanges[en]>0):[],$t){if(pt.minBitrate>t)return Ft(kt,`min bitrate of ${pt.minBitrate} > current estimate of ${t}`),Dt;if(!pt.hasDefaultAudio)return Ft(kt,"no renditions with default or auto-select sound found"),Dt;if(l&&kt.indexOf(l.substring(0,4))%5!==0)return Ft(kt,`audio codec preference "${l}" not found`),Dt;if(s&&!u){if(!pt.channels[s])return Ft(kt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(pt.channels)})`),Dt}else if((!l||u)&&d&&pt.channels[2]===0)return Ft(kt,"no renditions with stereo sound found"),Dt;if(pt.minHeight>it)return Ft(kt,`min resolution of ${pt.minHeight} > maximum of ${it}`),Dt;if(pt.minFramerate>Et)return Ft(kt,`min framerate of ${pt.minFramerate} > maximum of ${Et}`),Dt;if(!ce.some(en=>pt.videoRanges[en]>0))return Ft(kt,`no variants with VIDEO-RANGE of ${Vt(ce)} found`),Dt;if(c&&kt.indexOf(c.substring(0,4))%5!==0)return Ft(kt,`video codec preference "${c}" not found`),Dt;if(pt.maxScore<z)return Ft(kt,`max score of ${pt.maxScore} < selected max of ${z}`),Dt}return Dt&&(ke(kt)>=ke(Dt)||pt.fragmentError>a[Dt].fragmentError)?Dt:(j=pt.minIndex,z=pt.maxScore,kt)},void 0),videoRanges:ce,preferHDR:Oe,minFramerate:w,minBitrate:T,minIndex:j}}function Ft(a,e){Y.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function De(a){return a.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function Ce(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const l=i.audioGroups;let c=r[i.codecSet];c||(r[i.codecSet]=c={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!l,fragmentError:0}),c.minBitrate=Math.min(c.minBitrate,i.bitrate);const u=Math.min(i.height,i.width);return c.minHeight=Math.min(c.minHeight,u),c.minFramerate=Math.min(c.minFramerate,i.frameRate),c.minIndex=Math.min(c.minIndex,s),c.maxScore=Math.max(c.maxScore,i.score),c.fragmentError+=i.fragmentError,c.videoRanges[i.videoRange]=(c.videoRanges[i.videoRange]||0)+1,l&&l.forEach(d=>{if(!d)return;const p=e.groups[d];p&&(c.hasDefaultAudio=c.hasDefaultAudio||e.hasDefaultAudio?p.hasDefault:p.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(p.channels).forEach(_=>{c.channels[_]=(c.channels[_]||0)+p.channels[_]}))}),r},{})}function ct(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}}function at(a,e,t){if("attrs"in a){const n=e.indexOf(a);if(n!==-1)return n}for(let n=0;n<e.length;n++){const r=e[n];if(Ot(a,r,t))return n}return-1}function Ot(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:l}=a,c=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||Wt(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(c===void 0||e.forced===c)&&(!("characteristics"in a)||jt(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function Wt(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function jt(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function on(a,e){const{audioCodec:t,channels:n}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function _n(a,e,t,n,r){const i=e[n],l=e.reduce((_,w,T)=>{const j=w.uri;return(_[j]||(_[j]=[])).push(T),_},{})[i.uri];l.length>1&&(n=Math.max.apply(Math,l));const c=i.videoRange,u=i.frameRate,d=i.codecSet.substring(0,4),p=un(e,n,_=>{if(_.videoRange!==c||_.frameRate!==u||_.codecSet.substring(0,4)!==d)return!1;const w=_.audioGroups,T=t.filter(j=>!w||w.indexOf(j.groupId)!==-1);return at(a,T,r)>-1});return p>-1?p:un(e,n,_=>{const w=_.audioGroups,T=t.filter(j=>!w||w.indexOf(j.groupId)!==-1);return at(a,T,r)>-1})}function un(a,e,t){for(let n=e;n>-1;n--)if(t(a[n]))return n;for(let n=e+1;n<a.length;n++)if(t(a[n]))return n;return-1}function Wn(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class An extends B{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:i,hls:s}=this,{autoLevelEnabled:l,media:c}=s;if(!r||!c)return;const u=performance.now(),d=i?i.stats:r.stats,p=i?i.duration:r.duration,_=u-d.loading.start,w=s.minAutoLevel,T=r.level,j=this._nextAutoLevel;if(d.aborted||d.loaded&&d.loaded===d.total||T<=w){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const z=j>-1&&j!==T,ce=!!t||z;if(!ce&&(c.paused||!c.playbackRate||!c.readyState))return;const Oe=s.mainForwardBufferInfo;if(!ce&&Oe===null)return;const we=this.bwEstimator.getEstimateTTFB(),it=Math.abs(c.playbackRate);if(_<=Math.max(we,1e3*(p/(it*2))))return;const Et=Oe?Oe.len/it:0,$t=d.loading.first?d.loading.first-d.loading.start:-1,ht=d.loaded&&$t>-1,Dt=this.getBwEstimate(),kt=s.levels,pt=kt[T],en=Math.max(d.loaded,Math.round(p*(r.bitrate||pt.averageBitrate)/8));let Zn=ht?_-$t:_;Zn<1&&ht&&(Zn=Math.min(_,d.loaded*8/Dt));const ar=ht?d.loaded*1e3/Zn:0,pr=we/1e3,or=ar?(en-d.loaded)/ar:en*8/Dt+pr;if(or<=Et)return;const Fn=ar?ar*8:Dt,ur=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,Xn=this.hls.config.abrBandWidthUpFactor;let cr=Number.POSITIVE_INFINITY,Sr;for(Sr=T-1;Sr>w;Sr--){const Ur=kt[Sr].maxBitrate,kr=!kt[Sr].details||ur;if(cr=this.getTimeToLoadFrag(pr,Fn,p*Ur,kr),cr<Math.min(Et,p+pr))break}if(cr>=or||cr>p*10)return;ht?this.bwEstimator.sample(_-Math.min(we,$t),d.loaded):this.bwEstimator.sampleTTFB(_);const Un=kt[Sr].maxBitrate;this.getBwEstimate()*Xn>Un&&this.resetEstimator(Un);const Kn=this.findBestLevel(Un,w,Sr,0,Et,1,1);Kn>-1&&(Sr=Kn),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${T} is loading too slowly;
Fragment duration: ${r.duration.toFixed(3)}
Time to underbuffer: ${Et.toFixed(3)} s
Estimated load time for current fragment: ${or.toFixed(3)} s
Estimated load time for down switch fragment: ${cr.toFixed(3)} s
TTFB estimate: ${$t|0} ms
Current BW estimate: ${x(Dt)?Dt|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${Sr} @ ${Un|0} bps`),s.nextLoadLevel=s.nextAutoLevel=Sr,this.clearTimer();const Ir=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===Sr&&Sr>0){const Ur=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Sr>0?"and switching down":""}
Fragment duration: ${r.duration.toFixed(3)} s
Time to underbuffer: ${Ur.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,Sr>w){let kr=this.findBestLevel(this.hls.levels[w].bitrate,w,Sr,0,Ur,1,1);kr===-1&&(kr=w),this.hls.nextLoadLevel=this.hls.nextAutoLevel=kr,this.resetEstimator(this.hls.levels[kr].bitrate)}}};z||or>cr*2?Ir():this.timer=self.setInterval(Ir,cr*1e3),s.trigger(f.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:d})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new y(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(f.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var r;this.fragCurrent=n,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case M.BUFFER_ADD_CODEC_ERROR:case M.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case M.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:i}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const s=performance.now(),l=i?i.stats:n.stats,c=s-l.loading.start,u=l.loading.first?l.loading.first-l.loading.start:-1;if(l.loaded&&u>-1){const p=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(c-Math.min(p,u),l.loaded)}else this.bwEstimator.sampleTTFB(c)}break}}}getTimeToLoadFrag(e,t,n,r){const i=e+n/t,s=r?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,i=r.end-r.first;x(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===Q.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=n?n.duration:t.duration,s=this.hls.levels[t.level],l=(s.loaded?s.loaded.bytes:0)+r.loaded,c=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:l,duration:c},s.realBitrate=Math.round(8*l/c)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(f.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,i=r!=null&&r.stats.loaded?r.stats:n.stats;if(i.aborted||this.ignoreFragment(n))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==Q.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,i=this.findBestLevel(n,t,e,0,r,1,1);if(i>-1)return i;const s=this.hls.firstLevel,l=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${l}`),l}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,n=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=n&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:i,minAutoLevel:s}=n,l=t?t.duration:e?e.duration:0,c=this.getBwEstimate(),u=this.getStarvationDelay();let d=i.abrBandWidthFactor,p=i.abrBandWidthUpFactor;if(u){const z=this.findBestLevel(c,s,r,u,0,d,p);if(z>=0)return this.rebufferNotice=-1,z}let _=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!u){const z=this.bitrateTestDelay;z&&(_=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-z,this.info(`bitrate test took ${Math.round(1e3*z)}ms, set first fragment max fetchDuration to ${Math.round(1e3*_)} ms`),d=p=1)}const w=this.findBestLevel(c,s,r,u,_,d,p);if(this.rebufferNotice!==w&&(this.rebufferNotice=w,this.info(`${u?"rebuffering expected":"buffer is empty"}, optimal quality level ${w}`)),w>-1)return w;const T=n.levels[s],j=n.loadLevelObj;return j&&(T==null?void 0:T.bitrate)<j.bitrate?s:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,r,i,s,l){var c;const u=r+i,d=this.lastLoadedFragLevel,p=d===-1?this.hls.firstLevel:d,{fragCurrent:_,partCurrent:w}=this,{levels:T,allAudioTracks:j,loadLevel:z,config:ce}=this.hls;if(T.length===1)return 0;const Oe=T[p],we=!!((c=this.hls.latestLevelDetails)!=null&&c.live),it=z===-1||d===-1;let Et,$t="SDR",ht=(Oe==null?void 0:Oe.frameRate)||0;const{audioPreference:Dt,videoPreference:kt}=ce,pt=this.audioTracksByGroup||(this.audioTracksByGroup=De(j));let en=-1;if(it){if(this.firstSelection!==-1)return this.firstSelection;const Fn=this.codecTiers||(this.codecTiers=Ce(T,pt,t,n)),ur=rn(Fn,$t,e,Dt,kt),{codecSet:Xn,videoRanges:cr,minFramerate:Sr,minBitrate:Un,minIndex:Kn,preferHDR:Ir}=ur;en=Kn,Et=Xn,$t=Ir?cr[cr.length-1]:cr[0],ht=Sr,e=Math.max(e,Un),this.log(`picked start tier ${Vt(ur)}`)}else Et=Oe==null?void 0:Oe.codecSet,$t=Oe==null?void 0:Oe.videoRange;const Zn=w?w.duration:_?_.duration:0,ar=this.bwEstimator.getEstimateTTFB()/1e3,pr=[];for(let Fn=n;Fn>=t;Fn--){var or;const ur=T[Fn],Xn=Fn>p;if(!ur)continue;if(ce.useMediaCapabilities&&!ur.supportedResult&&!ur.supportedPromise){const kr=navigator.mediaCapabilities;typeof(kr==null?void 0:kr.decodingInfo)=="function"&&Bn(ur,pt,$t,ht,e,Dt)?(ur.supportedPromise=mn(ur,pt,kr,this.supportedCache),ur.supportedPromise.then(Or=>{if(!this.hls)return;ur.supportedResult=Or;const Ei=this.hls.levels,vi=Ei.indexOf(ur);Or.error?this.warn(`MediaCapabilities decodingInfo error: "${Or.error}" for level ${vi} ${Vt(Or)}`):Or.supported?Or.decodingInfoResults.some(ki=>ki.smooth===!1||ki.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${vi} not smooth or powerEfficient: ${Vt(Or)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${vi} ${Vt(Or)}`),vi>-1&&Ei.length>1&&(this.log(`Removing unsupported level ${vi}`),this.hls.removeLevel(vi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(Or=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${Or}`)})):ur.supportedResult=Jt}if((Et&&ur.codecSet!==Et||$t&&ur.videoRange!==$t||Xn&&ht>ur.frameRate||!Xn&&ht>0&&ht<ur.frameRate||(or=ur.supportedResult)!=null&&(or=or.decodingInfoResults)!=null&&or.some(kr=>kr.smooth===!1))&&(!it||Fn!==en)){pr.push(Fn);continue}const cr=ur.details,Sr=(w?cr==null?void 0:cr.partTarget:cr==null?void 0:cr.averagetargetduration)||Zn;let Un;Xn?Un=l*e:Un=s*e;const Kn=Zn&&r>=Zn*2&&i===0?ur.averageBitrate:ur.maxBitrate,Ir=this.getTimeToLoadFrag(ar,Un,Kn*Sr,cr===void 0);if(Un>=Kn&&(Fn===d||ur.loadError===0&&ur.fragmentError===0)&&(Ir<=ar||!x(Ir)||we&&!this.bitrateTestDelay||Ir<u)){const kr=this.forcedAutoLevel;return Fn!==z&&(kr===-1||kr!==z)&&(pr.length&&this.trace(`Skipped level(s) ${pr.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${T[pr[0]].codecs}" ${T[pr[0]].videoRange}; not compatible with "${Et}" ${$t}`),this.info(`switch candidate:${p}->${Fn} adjustedbw(${Math.round(Un)})-bitrate=${Math.round(Un-Kn)} ttfb:${ar.toFixed(1)} avgDuration:${Sr.toFixed(1)} maxFetchDuration:${u.toFixed(1)} fetchDuration:${Ir.toFixed(1)} firstSelection:${it} codecSet:${ur.codecSet} videoRange:${ur.videoRange} hls.loadLevel:${z}`)),it&&(this.firstSelection=Fn),Fn}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}}const wn={search:function(a,e){let t=0,n=a.length-1,r=null,i=null;for(;t<=n;){r=(t+n)/2|0,i=a[r];const s=e(i);if(s>0)t=r+1;else if(s<0)n=r-1;else return i}return null}};function Mn(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!x(e))return null;const n=a[0].programDateTime;if(e<(n||0))return null;const r=a[a.length-1].endProgramDateTime;if(e>=(r||0))return null;for(let i=0;i<a.length;++i){const s=a[i];if(Rn(e,t,s))return s}return null}function Ln(a,e,t=0,n=0,r=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const l=a.endDTS-t;l>0&&l<15e-7&&(t+=15e-7),i&&a.level!==i.level&&i.end<=a.end&&(i=e[2+a.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Tn(t,n,i)===0||jn(i,a,Math.min(r,n))))return i;const s=wn.search(e,Tn.bind(null,t,n));return s&&(s!==a||!i)?s:i}function jn(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((r,i)=>(i[0]==="INF"&&(r+=parseFloat(i[1])),r),t);return a.start<=n}return!1}function Tn(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=a?1:t.start-n>a&&t.start?-1:0}function Rn(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function an(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){let n=a.fragments;const{fragmentHint:r}=a;r&&(n=n.concat(r));let i;return wn.search(n,s=>s.cc<e?1:s.cc>e?-1:(i=s,s.end<=t?1:s.start>t?-1:0)),i||null}return null}function hn(a){switch(a.details){case M.FRAG_LOAD_TIMEOUT:case M.KEY_LOAD_TIMEOUT:case M.LEVEL_LOAD_TIMEOUT:case M.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function En(a,e){const t=hn(e);return a.default[`${t?"timeout":"error"}Retry`]}function Yn(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function kn(a){return E(E({},a),{errorRetry:null,timeoutRetry:null})}function $n(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(Ar(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function Ar(a){return ge(a)||!!a&&(a<400||a>499)}function ge(a){return a===0&&navigator.onLine===!1}var We={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Ue={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class et extends B{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.ERROR,this.onError,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.ERROR,this.onError,this),e.off(f.ERROR,this.onErrorOut,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===Q.MAIN?e.level:this.getVariantIndex()}getVariantIndex(){var e;const t=this.hls,n=t.currentLevel;return(e=t.loadLevelObj)!=null&&e.details||n===-1?t.loadLevel:n}variantHasKey(e,t){if(e){var n;if((n=e.details)!=null&&n.hasKey(t))return!0;const r=e.audioGroups;if(r)return this.hls.allAudioTracks.filter(s=>r.indexOf(s.groupId)>=0).some(s=>{var l;return(l=s.details)==null?void 0:l.hasKey(t)})}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case M.FRAG_LOAD_ERROR:case M.FRAG_LOAD_TIMEOUT:case M.KEY_LOAD_ERROR:case M.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case M.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=ot();return}case M.FRAG_GAP:case M.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=We.SendAlternateToPenaltyBox;return}case M.LEVEL_EMPTY_ERROR:case M.LEVEL_PARSING_ERROR:{var s;const c=t.parent===Q.MAIN?t.level:r.loadLevel;t.details===M.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,c):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,c))}return;case M.LEVEL_LOAD_ERROR:case M.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case M.AUDIO_TRACK_LOAD_ERROR:case M.AUDIO_TRACK_LOAD_TIMEOUT:case M.SUBTITLE_LOAD_ERROR:case M.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const c=r.loadLevelObj;if(c&&(i.type===oe.AUDIO_TRACK&&c.hasAudioGroup(i.groupId)||i.type===oe.SUBTITLE_TRACK&&c.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=We.SendAlternateToPenaltyBox,t.errorAction.flags=Ue.MoveAllAlternatesMatchingHost;return}}return;case M.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:We.SendAlternateToPenaltyBox,flags:Ue.MoveAllAlternatesMatchingHDCP};return;case M.KEY_SYSTEM_SESSION_UPDATE_FAILED:case M.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case M.KEY_SYSTEM_NO_SESSION:t.errorAction={action:We.SendAlternateToPenaltyBox,flags:Ue.MoveAllAlternatesMatchingKey};return;case M.BUFFER_ADD_CODEC_ERROR:case M.REMUX_ALLOC_ERROR:case M.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:r.loadLevel)}return;case M.INTERNAL_EXCEPTION:case M.BUFFER_APPENDING_ERROR:case M.BUFFER_FULL_ERROR:case M.LEVEL_SWITCH_ERROR:case M.BUFFER_STALLED_ERROR:case M.BUFFER_SEEK_OVER_HOLE:case M.BUFFER_NUDGE_ON_STALL:t.errorAction=ot();return}t.type===te.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=ot())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=En(n.config.playlistLoadPolicy,e),i=this.playlistError++;if($n(r,i,hn(e),e.response))return{action:We.RetryRequest,flags:Ue.None,retryConfig:r,retryCount:i};const l=this.getLevelSwitchAction(e,t);return r&&(l.retryConfig=r,l.retryCount=i),l}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,l=En(e.details.startsWith("key")?s:i,e),c=t.levels.reduce((d,p)=>d+p.fragmentError,0);if(r&&(e.details!==M.FRAG_GAP&&r.fragmentError++,$n(l,c,hn(e),e.response)))return{action:We.RetryRequest,flags:Ue.None,retryConfig:l,retryCount:c};const u=this.getLevelSwitchAction(e,n);return l&&(u.retryConfig=l,u.retryCount=c),u}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const u=e.details;r.loadError++,u===M.BUFFER_APPEND_ERROR&&r.fragmentError++;let d=-1;const{levels:p,loadLevel:_,minAutoLevel:w,maxAutoLevel:T}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const j=(i=e.frag)==null?void 0:i.type,ce=(j===Q.AUDIO&&u===M.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(u===M.BUFFER_ADD_CODEC_ERROR||u===M.BUFFER_APPEND_ERROR))&&p.some(({audioCodec:$t})=>r.audioCodec!==$t),we=e.sourceBufferName==="video"&&(u===M.BUFFER_ADD_CODEC_ERROR||u===M.BUFFER_APPEND_ERROR)&&p.some(({codecSet:$t,audioCodec:ht})=>r.codecSet!==$t&&r.audioCodec===ht),{type:it,groupId:Et}=(s=e.context)!=null?s:{};for(let $t=p.length;$t--;){const ht=($t+_)%p.length;if(ht!==_&&ht>=w&&ht<=T&&p[ht].loadError===0){var l,c;const Dt=p[ht];if(u===M.FRAG_GAP&&j===Q.MAIN&&e.frag){const kt=p[ht].details;if(kt){const pt=Ln(e.frag,kt.fragments,e.frag.start);if(pt!=null&&pt.gap)continue}}else{if(it===oe.AUDIO_TRACK&&Dt.hasAudioGroup(Et)||it===oe.SUBTITLE_TRACK&&Dt.hasSubtitleGroup(Et))continue;if(j===Q.AUDIO&&(l=r.audioGroups)!=null&&l.some(kt=>Dt.hasAudioGroup(kt))||j===Q.SUBTITLE&&(c=r.subtitleGroups)!=null&&c.some(kt=>Dt.hasSubtitleGroup(kt))||ce&&r.audioCodec===Dt.audioCodec||we&&r.codecSet===Dt.codecSet||!ce&&r.codecSet!==Dt.codecSet)continue}d=ht;break}}if(d>-1&&n.loadLevel!==d)return e.levelRetry=!0,this.playlistError=0,{action:We.SendAlternateToPenaltyBox,flags:Ue.None,nextAutoLevel:d}}return{action:We.SendAlternateToPenaltyBox,flags:Ue.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case We.DoNothing:break;case We.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==M.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break;case We.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r}=n,i=n.nextAutoLevel;switch(r){case Ue.None:this.switchLevel(e,i);break;case Ue.MoveAllAlternatesMatchingHDCP:{const c=this.getVariantLevelIndex(e.frag),u=t.levels[c],d=u==null?void 0:u.attrs["HDCP-LEVEL"];if(n.hdcpLevel=d,d){t.maxHdcpLevel=Nn[Nn.indexOf(d)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case Ue.MoveAllAlternatesMatchingKey:{const c=e.decryptdata;if(c){const u=this.hls.levels;for(let d=u.length;d--;)if(this.variantHasKey(u[d],c)){var s,l;this.log(`Banned key found in level ${d} (${u[d].bitrate}bps) or audio group "${(s=u[d].audioGroups)==null?void 0:s.join(",")}" (${(l=e.frag)==null?void 0:l.type} fragment) ${U(c.keyId||[])}`),u[d].fragmentError++,u[d].loadError++,this.log(`Removing level ${d} with key error (${e.error})`),this.hls.removeLevel(d)}u.length&&(n.resolved=!0)}break}}n.resolved||this.switchLevel(e,i)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===M.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=nn(e.mimeType),r=this.hls.levels;for(let i=r.length;i--;)r[i][`${e.sourceBufferName}Codec`]===n&&(this.log(`Removing level ${i} for ${e.details} ("${n}" not supported)`),this.hls.removeLevel(i))}}}function ot(a){const e={action:We.DoNothing,flags:Ue.None};return a&&(e.resolved=!0),e}var lt={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Bt{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e&&(e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.BUFFER_APPENDED,this.onBufferAppended,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.BUFFER_APPENDED,this.onBufferAppended,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let r=n.length;r--;){const i=n[r];if(!i)break;if(i.start<=e&&e<=i.end&&i.loaded)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,n){const{fragments:r}=this,i=Object.keys(r);for(let s=i.length;s--;){const l=r[i[s]];if((l==null?void 0:l.body.type)===t&&(!n||l.buffered)){const c=l.body;if(c.start<=e&&e<=c.end)return c}}return null}detectEvictedFragments(e,t,n,r,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(l=>{const c=this.fragments[l];if(!c||s>=c.body.sn)return;if(!c.buffered&&(!c.loaded||i)){c.body.type===n&&this.removeFragment(c.body);return}const u=c.range[e];if(u){if(u.time.length===0){this.removeFragment(c.body);return}u.time.some(d=>{const p=!this.isTimeBuffered(d.startPTS,d.endPTS,t);return p&&this.removeFragment(c.body),p})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=gt(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(l=>{const c=n.elementaryStreams[l];if(!c)return;const u=t[l],d=s||c.partial===!0;i.range[l]=this.getBufferedTimes(n,e.part,d,u)}),i.loaded=null,Object.keys(i.range).length?(i.buffered=!0,(i.body.endList=n.endList||i.body.endList)&&(this.endListFragments[i.body.type]=i),Ct(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=Ge(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=gt(e);let r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,r.buffered=!0)}getBufferedTimes(e,t,n,r){const i={time:[],partial:n},s=e.start,l=e.end,c=e.minEndPTS||l,u=e.maxStartPTS||s;for(let d=0;d<r.length;d++){const p=r.start(d)-this.bufferPadding,_=r.end(d)+this.bufferPadding;if(u>=p&&c<=_){i.time.push({startPTS:Math.max(s,r.start(d)),endPTS:Math.min(l,r.end(d))});break}else if(s<_&&l>p){const w=Math.max(s,r.start(d)),T=Math.min(l,r.end(d));T>w&&(i.partial=!0,i.time.push({startPTS:w,endPTS:T}))}else if(l<=p)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:l,fragments:c}=this;return Object.keys(c).forEach(u=>{const d=c[u];d&&Ct(d)&&(r=d.body.start-l,i=d.body.end+l,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=d.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Ct(t))}getState(e){const t=gt(e),n=this.fragments[t];return n?n.buffered?Ct(n)?lt.PARTIAL:lt.OK:lt.APPENDING:lt.NOT_LOADED}isTimeBuffered(e,t,n){let r,i;for(let s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,i=gt(n);this.fragments[i]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:i,type:s}=t;if(n.sn==="initSegment")return;const l=n.type;if(r){let u=this.activePartLists[l];u||(this.activePartLists[l]=u=[]),u.push(r)}this.timeRanges=i;const c=i[s];this.detectEvictedFragments(s,c,l,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=gt(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const i=t[n[r]];if((i==null?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,n,r,i){r&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const l=this.fragments[s];if(!l)return;const c=l.body;c.type!==n||r&&!c.gap||c.start<t&&c.end>e&&(l.buffered||i)&&this.removeFragment(c)})}removeFragment(e){const t=gt(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=Ge(n,i=>i.fragment.sn!==r)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const t=(e=this.hls)==null||(e=e.latestLevelDetails)==null?void 0:e.partList;t&&t.forEach(n=>n.clearElementaryStreamInfo())}}function Ct(a){var e,t,n;return a.buffered&&!!(a.body.gap||(e=a.range.video)!=null&&e.partial||(t=a.range.audio)!=null&&t.partial||(n=a.range.audiovideo)!=null&&n.partial)}function gt(a){return`${a.type}_${a.level}_${a.sn}`}function Ge(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var qe={cbc:0,ctr:1};class ut{constructor(e,t,n){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=n}decrypt(e,t){switch(this.aesMode){case qe.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case qe.ctr:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}function mt(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class St{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let r=0;r<4;r++)n[r]=t.getUint32(r*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],s=n[2],l=n[3],c=this.invSubMix,u=c[0],d=c[1],p=c[2],_=c[3],w=new Uint32Array(256);let T=0,j=0,z=0;for(z=0;z<256;z++)z<128?w[z]=z<<1:w[z]=z<<1^283;for(z=0;z<256;z++){let ce=j^j<<1^j<<2^j<<3^j<<4;ce=ce>>>8^ce&255^99,e[T]=ce,t[ce]=T;const Oe=w[T],we=w[Oe],it=w[we];let Et=w[ce]*257^ce*16843008;r[T]=Et<<24|Et>>>8,i[T]=Et<<16|Et>>>16,s[T]=Et<<8|Et>>>24,l[T]=Et,Et=it*16843009^we*65537^Oe*257^T*16843008,u[ce]=Et<<24|Et>>>8,d[ce]=Et<<16|Et>>>16,p[ce]=Et<<8|Et>>>24,_[ce]=Et,T?(T=Oe^w[w[w[it^Oe]]],j^=w[w[j]]):T=j=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)return;this.key=t;const i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);const s=this.ksRows=(i+6+1)*4;let l,c;const u=this.keySchedule=new Uint32Array(s),d=this.invKeySchedule=new Uint32Array(s),p=this.sBox,_=this.rcon,w=this.invSubMix,T=w[0],j=w[1],z=w[2],ce=w[3];let Oe,we;for(l=0;l<s;l++){if(l<i){Oe=u[l]=t[l];continue}we=Oe,l%i===0?(we=we<<8|we>>>24,we=p[we>>>24]<<24|p[we>>>16&255]<<16|p[we>>>8&255]<<8|p[we&255],we^=_[l/i|0]<<24):i>6&&l%i===4&&(we=p[we>>>24]<<24|p[we>>>16&255]<<16|p[we>>>8&255]<<8|p[we&255]),u[l]=Oe=(u[l-i]^we)>>>0}for(c=0;c<s;c++)l=s-c,c&3?we=u[l]:we=u[l-4],c<4||l<=4?d[c]=we:d[c]=T[p[we>>>24]]^j[p[we>>>16&255]]^z[p[we>>>8&255]]^ce[p[we&255]],d[c]=d[c]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,c=l[0],u=l[1],d=l[2],p=l[3],_=this.uint8ArrayToUint32Array_(n);let w=_[0],T=_[1],j=_[2],z=_[3];const ce=new Int32Array(e),Oe=new Int32Array(ce.length);let we,it,Et,$t,ht,Dt,kt,pt,en,Zn,ar,pr,or,Fn;const ur=this.networkToHostOrderSwap;for(;t<ce.length;){for(en=ur(ce[t]),Zn=ur(ce[t+1]),ar=ur(ce[t+2]),pr=ur(ce[t+3]),ht=en^i[0],Dt=pr^i[1],kt=ar^i[2],pt=Zn^i[3],or=4,Fn=1;Fn<r;Fn++)we=c[ht>>>24]^u[Dt>>16&255]^d[kt>>8&255]^p[pt&255]^i[or],it=c[Dt>>>24]^u[kt>>16&255]^d[pt>>8&255]^p[ht&255]^i[or+1],Et=c[kt>>>24]^u[pt>>16&255]^d[ht>>8&255]^p[Dt&255]^i[or+2],$t=c[pt>>>24]^u[ht>>16&255]^d[Dt>>8&255]^p[kt&255]^i[or+3],ht=we,Dt=it,kt=Et,pt=$t,or=or+4;we=s[ht>>>24]<<24^s[Dt>>16&255]<<16^s[kt>>8&255]<<8^s[pt&255]^i[or],it=s[Dt>>>24]<<24^s[kt>>16&255]<<16^s[pt>>8&255]<<8^s[ht&255]^i[or+1],Et=s[kt>>>24]<<24^s[pt>>16&255]<<16^s[ht>>8&255]<<8^s[Dt&255]^i[or+2],$t=s[pt>>>24]<<24^s[ht>>16&255]<<16^s[Dt>>8&255]<<8^s[kt&255]^i[or+3],Oe[t]=ur(we^w),Oe[t+1]=ur($t^T),Oe[t+2]=ur(Et^j),Oe[t+3]=ur(it^z),w=en,T=Zn,j=ar,z=pr,t=t+4}return Oe.buffer}}class Yt{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=vn(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function vn(a){switch(a){case qe.cbc:return"AES-CBC";case qe.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const cn=16;class Dn{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(n){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?mt(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise((i,s)=>{const l=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(l,t,n,r);const c=this.flush();c?i(c.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:i,currentResult:s,remainderData:l}=this;if(r!==qe.cbc||t.byteLength!==16)return Y.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=Te(l,e),this.remainderData=null);const c=this.getValidChunk(e);if(!c.length)return null;i&&(n=i);let u=this.softwareDecrypter;u||(u=this.softwareDecrypter=new St),u.expandKey(t);const d=s;return this.currentResult=u.decrypt(c.buffer,0,n),this.currentIV=c.slice(-16).buffer,d||null}webCryptoDecrypt(e,t,n,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n,r));this.key=t,this.fastAesKey=new Yt(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new ut(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(Y.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,n,r)))}onWebCryptoError(e,t,n,r){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);const s=this.flush();if(s)return s.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%cn;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(Y.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Vn=Math.pow(2,17);class Pn{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new Jn({type:te.NETWORK_ERROR,details:M.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,c)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(T=>T[0]==="GAP")){c(xn(e));return}else e.gap=!1;const u=this.loader=i?new i(r):new s(r),d=qn(e);e.loader=u;const p=kn(r.fragLoadPolicy.default),_={loadPolicy:p,timeout:p.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Vn};e.stats=u.stats;const w={onSuccess:(T,j,z,ce)=>{this.resetLoader(e,u);let Oe=T.data;z.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Oe.slice(0,16)),Oe=Oe.slice(16)),l({frag:e,part:null,payload:Oe,networkDetails:ce})},onError:(T,j,z,ce)=>{this.resetLoader(e,u),c(new Jn({type:te.NETWORK_ERROR,details:M.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:E({url:n,data:void 0},T),error:new Error(`HTTP Error ${T.code} ${T.text}`),networkDetails:z,stats:ce}))},onAbort:(T,j,z)=>{this.resetLoader(e,u),c(new Jn({type:te.NETWORK_ERROR,details:M.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:z,stats:T}))},onTimeout:(T,j,z)=>{this.resetLoader(e,u),c(new Jn({type:te.NETWORK_ERROR,details:M.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${_.timeout}ms`),networkDetails:z,stats:T}))}};t&&(w.onProgress=(T,j,z,ce)=>t({frag:e,part:null,payload:z,networkDetails:ce})),u.load(d,_,w)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,c)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){c(xn(e,t));return}const u=this.loader=i?new i(r):new s(r),d=qn(e,t);e.loader=u;const p=kn(r.fragLoadPolicy.default),_={loadPolicy:p,timeout:p.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Vn};t.stats=u.stats,u.load(d,_,{onSuccess:(w,T,j,z)=>{this.resetLoader(e,u),this.updateStatsFromPart(e,t);const ce={frag:e,part:t,payload:w.data,networkDetails:z};n(ce),l(ce)},onError:(w,T,j,z)=>{this.resetLoader(e,u),c(new Jn({type:te.NETWORK_ERROR,details:M.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:E({url:d.url,data:void 0},w),error:new Error(`HTTP Error ${w.code} ${w.text}`),networkDetails:j,stats:z}))},onAbort:(w,T,j)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,u),c(new Jn({type:te.NETWORK_ERROR,details:M.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:j,stats:w}))},onTimeout:(w,T,j)=>{this.resetLoader(e,u),c(new Jn({type:te.NETWORK_ERROR,details:M.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${_.timeout}ms`),networkDetails:j,stats:w}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const c=Math.round(e.duration/t.duration),u=Math.min(Math.round(n.loaded/i),c),p=(c-u)*Math.round(n.loaded/u);n.total=n.loaded+p}else n.total=Math.max(n.loaded,n.total);const s=n.loading,l=r.loading;s.start?s.first+=l.first-l.start:(s.start=l.start,s.first=l.first),s.end=l.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function qn(a,e=null){const t=e||a,n={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(x(r)&&x(i)){var s;let l=r,c=i;if(a.sn==="initSegment"&&mr((s=a.decryptdata)==null?void 0:s.method)){const u=i-r;u%16&&(c=i+(16-u%16)),r!==0&&(n.resetIV=!0,l=r-16)}n.rangeStart=l,n.rangeEnd=c}return n}function xn(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:te.MEDIA_ERROR,details:M.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new Jn(n)}function mr(a){return a==="AES-128"||a==="AES-256"}class Jn extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class dr extends B{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class Qn{constructor(e,t,n,r=0,i=-1,s=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=tr(),this.buffering={audio:tr(),video:tr(),audiovideo:tr()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function tr(){return{start:0,executeStart:0,executeEnd:0,end:0}}const gr={length:0,start:()=>0,end:()=>0};class dn{static isBuffered(e,t){if(e){const n=dn.getBuffered(e);for(let r=n.length;r--;)if(t>=n.start(r)&&t<=n.end(r))return!0}return!1}static bufferedRanges(e){if(e){const t=dn.getBuffered(e);return dn.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}static bufferInfo(e,t,n){if(e){const r=dn.bufferedRanges(e);if(r.length)return dn.bufferedInfo(r,t,n)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.length>1&&e.sort((d,p)=>d.start-p.start||p.end-d.end);let r=-1,i=[];if(n)for(let d=0;d<e.length;d++){t>=e[d].start&&t<=e[d].end&&(r=d);const p=i.length;if(p){const _=i[p-1].end;e[d].start-_<n?e[d].end>_&&(i[p-1].end=e[d].end):i.push(e[d])}else i.push(e[d])}else i=e;let s=0,l,c=t,u=t;for(let d=0;d<i.length;d++){const p=i[d].start,_=i[d].end;if(r===-1&&t>=p&&t<=_&&(r=d),t+n>=p&&t<_)c=p,u=_,s=u-t;else if(t+n<p){l=p;break}}return{len:s,start:c||0,end:u||0,nextStart:l,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||gr}catch(t){return Y.log("failed to get media.buffered",t),gr}}}const fr=/\{\$([a-zA-Z0-9-_]+)\}/g;function Hn(a){return fr.test(a)}function bn(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(fr,n=>{const r=n.substring(2,n.length-1),i=t==null?void 0:t[r];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),n):i})}return e}function On(a,e,t){let n=a.variableList;n||(a.variableList=n={});let r,i;if("QUERYPARAM"in e){r=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(r))i=s.get(r);else throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else r=e.NAME,i=e.VALUE;r in n?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=i||""}function nr(a,e,t){const n=e.IMPORT;if(t&&n in t){let r=a.variableList;r||(a.variableList=r={}),r[n]=t[n]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const hr=/^(\d+)x(\d+)$/,lr=/(.+?)=(".*?"|.*?)(?:,|$)/g;class In{constructor(e,t){typeof e=="string"&&(e=In.parseAttrList(e,t)),h(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(r*2,r*2+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((r,i)=>(r[i.toLowerCase()]=!0,r),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=hr.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={},i='"';for(lr.lastIndex=0;(n=lr.exec(e))!==null;){const s=n[1].trim();let l=n[2];const c=l.indexOf(i)===0&&l.lastIndexOf(i)===l.length-1;let u=!1;if(c)l=l.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":u=!0}if(t&&(c||u))l=bn(t,l);else if(!u&&!c)switch(s){case"CLOSED-CAPTIONS":if(l==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":Y.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=l}return r}}const Pr="com.apple.hls.interstitial";function zr(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Kr(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class ei{constructor(e,t,n=0){var r;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(r=t==null?void 0:t.tagOrder)!=null?r:n,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){Y.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=h(new In({}),i,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const i=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);x(i.getTime())&&(this._endDate=i)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(Y.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(x(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===Pr}get isValid(){return!!this.id&&!this._badValueForSameId&&x(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const Jr=10;class Vr{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}hasKey(e){return this.encryptedFragments.some(t=>{let n=t.decryptdata;return n||(t.setKeyFormat(e.keyFormat),n=t.decryptdata),!!n&&e.matches(n)})}get hasProgramDateTime(){return this.fragments.length?x(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Jr}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){return this.fragments.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function _r(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function wr(a,e){return!a&&!e?!0:!a||!e?!1:_r(a,e)}function Nr(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function Er(a){switch(a){case"AES-128":case"AES-256":return qe.cbc;case"AES-256-CTR":return qe.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function yr(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function br(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function Cn(a){const e=br(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function rr(a){const e=function(n,r,i){const s=n[r];n[r]=n[i],n[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function ir(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),r=n[n.length-1].split(",");if(r.length===2){const i=r[0]==="base64",s=r[1];i?(n.splice(-1,1),t=yr(s)):t=Cn(s)}}return t}const sr=typeof self!="undefined"?self:void 0;var er={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},vr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Wr(a){switch(a){case vr.FAIRPLAY:return er.FAIRPLAY;case vr.PLAYREADY:return er.PLAYREADY;case vr.WIDEVINE:return er.WIDEVINE;case vr.CLEARKEY:return er.CLEARKEY}}function Sn(a){switch(a){case er.FAIRPLAY:return vr.FAIRPLAY;case er.PLAYREADY:return vr.PLAYREADY;case er.WIDEVINE:return vr.WIDEVINE;case er.CLEARKEY:return vr.CLEARKEY}}function zn(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[er.FAIRPLAY,er.WIDEVINE,er.PLAYREADY,er.CLEARKEY].filter(r=>!!e[r]):[];return!n[er.WIDEVINE]&&t&&n.push(er.WIDEVINE),n}const Gn=function(a){return sr!=null&&(a=sr.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Dr(a,e,t,n){let r;switch(a){case er.FAIRPLAY:r=["cenc","sinf"];break;case er.WIDEVINE:case er.PLAYREADY:r=["cenc"];break;case er.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Rr(r,e,t,n)}function Rr(a,e,t,n){return[{initDataTypes:a,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs=${i}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs=${i}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function Br(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function oi(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(s){const l=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(l){const c=yr(l).subarray(0,16);return rr(c),c}}return null}let ni={};class Xr{static clearKeyUriToKeyIdMap(){ni={}}constructor(e,t,n,r=[1],i=null,s){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!Nr(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(k(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&_r(e.keyFormatVersions,this.keyFormatVersions)&&wr(e.iv,this.iv)&&wr(e.keyId,this.keyId)}isSupported(){if(this.method){if(Nr(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case vr.FAIRPLAY:case vr.WIDEVINE:case vr.PLAYREADY:case vr.CLEARKEY:return["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(Nr(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(Y.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=$r(e);return new Xr(this.method,this.uri,"identity",this.keyFormatVersions,n)}if(this.pssh&&this.keyId)return this;const t=ir(this.uri);if(t)switch(this.keyFormat){case vr.WIDEVINE:if(this.pssh=t,!this.keyId&&t.length>=22){const n=t.length-22;this.keyId=t.subarray(n,n+16)}break;case vr.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Pt(n,null,t),this.keyId=oi(t);break}default:{let n=t.subarray(0,16);if(n.length!==16){const r=new Uint8Array(16);r.set(n,16-n.length),n=r}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){let n=ni[this.uri];if(!n){const r=Object.keys(ni).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,r),ni[this.uri]=n}this.keyId=n}return this}}function $r(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const Ji=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,qi=/#EXT-X-MEDIA:(.*)/g,Ri=/^#EXT(?:INF|-X-TARGETDURATION):/m,Oi=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),$i=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class ui{static findGroup(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r.id===t)return r}}static resolve(e,t){return v.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Ri.test(e)}static parseMasterPlaylist(e,t){const n=Hn(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];Ji.lastIndex=0;let s;for(;(s=Ji.exec(e))!=null;)if(s[1]){var l;const u=new In(s[1],r),d=bn(r,s[2]),p={attrs:u,bitrate:u.decimalInteger("BANDWIDTH")||u.decimalInteger("AVERAGE-BANDWIDTH"),name:u.NAME,url:ui.resolve(d,t)},_=u.decimalResolution("RESOLUTION");_&&(p.width=_.width,p.height=_.height),es(u.CODECS,p);const w=u["SUPPLEMENTAL-CODECS"];w&&(p.supplemental={},es(w,p.supplemental)),(l=p.unknownCodecs)!=null&&l.length||i.push(p),r.levels.push(p)}else if(s[3]){const u=s[3],d=s[4];switch(u){case"SESSION-DATA":{const p=new In(d,r),_=p["DATA-ID"];_&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[_]=p);break}case"SESSION-KEY":{const p=Gi(d,t,r);p.encrypted&&p.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(p)):Y.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${d}"`);break}case"DEFINE":{{const p=new In(d,r);On(r,p,t)}break}case"CONTENT-STEERING":{const p=new In(d,r);r.contentSteering={uri:ui.resolve(p["SERVER-URI"],t),pathwayId:p["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=Ii(d);break}}}const c=i.length>0&&i.length<r.levels.length;return r.levels=c?i:r.levels,r.levels.length===0&&(r.playlistParsingError=new Error("no levels found in manifest")),r}static parseMasterPlaylistMedia(e,t,n){let r;const i={},s=n.levels,l={AUDIO:s.map(u=>({id:u.attrs.AUDIO,audioCodec:u.audioCodec})),SUBTITLES:s.map(u=>({id:u.attrs.SUBTITLES,textCodec:u.textCodec})),"CLOSED-CAPTIONS":[]};let c=0;for(qi.lastIndex=0;(r=qi.exec(e))!==null;){const u=new In(r[1],n),d=u.TYPE;if(d){const p=l[d],_=i[d]||[];i[d]=_;const w=u.LANGUAGE,T=u["ASSOC-LANGUAGE"],j=u.CHANNELS,z=u.CHARACTERISTICS,ce=u["INSTREAM-ID"],Oe={attrs:u,bitrate:0,id:c++,groupId:u["GROUP-ID"]||"",name:u.NAME||w||"",type:d,default:u.bool("DEFAULT"),autoselect:u.bool("AUTOSELECT"),forced:u.bool("FORCED"),lang:w,url:u.URI?ui.resolve(u.URI,t):""};if(T&&(Oe.assocLang=T),j&&(Oe.channels=j),z&&(Oe.characteristics=z),ce&&(Oe.instreamId=ce),p!=null&&p.length){const we=ui.findGroup(p,Oe.groupId)||p[0];Fi(Oe,we,"audioCodec"),Fi(Oe,we,"textCodec")}_.push(Oe)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var l;const c={url:t},u=new Vr(t),d=u.fragments,p=[];let _=null,w=0,T=0,j=0,z=0,ce=0,Oe=null,we=new Le(r,c),it,Et,$t,ht=-1,Dt=!1,kt=null,pt;if(Oi.lastIndex=0,u.m3u8=e,u.hasVariableRefs=Hn(e),((l=Oi.exec(e))==null?void 0:l[0])!=="#EXTM3U")return u.playlistParsingError=new Error("Missing format identifier #EXTM3U"),u;for(;(it=Oi.exec(e))!==null;){Dt&&(Dt=!1,we=new Le(r,c),we.playlistOffset=j,we.setStart(j),we.sn=w,we.cc=z,ce&&(we.bitrate=ce),we.level=n,_&&(we.initSegment=_,_.rawProgramDateTime&&(we.rawProgramDateTime=_.rawProgramDateTime,_.rawProgramDateTime=null),kt&&(we.setByteRange(kt),kt=null)));const pr=it[1];if(pr){we.duration=parseFloat(pr);const or=(" "+it[2]).slice(1);we.title=or||null,we.tagList.push(or?["INF",pr,or]:["INF",pr])}else if(it[3]){if(x(we.duration)){we.playlistOffset=j,we.setStart(j),$t&&ts(we,$t,u),we.sn=w,we.level=n,we.cc=z,d.push(we);const or=(" "+it[3]).slice(1);we.relurl=bn(u,or),Ni(we,Oe,p),Oe=we,j+=we.duration,w++,T=0,Dt=!0}}else{if(it=it[0].match($i),!it){Y.warn("No matches on slow regex match for level playlist!");continue}for(Et=1;Et<it.length&&it[Et]===void 0;Et++);const or=(" "+it[Et]).slice(1),Fn=(" "+it[Et+1]).slice(1),ur=it[Et+2]?(" "+it[Et+2]).slice(1):null;switch(or){case"BYTERANGE":Oe?we.setByteRange(Fn,Oe):we.setByteRange(Fn);break;case"PROGRAM-DATE-TIME":we.rawProgramDateTime=Fn,we.tagList.push(["PROGRAM-DATE-TIME",Fn]),ht===-1&&(ht=d.length);break;case"PLAYLIST-TYPE":u.type&&_i(u,or,it),u.type=Fn.toUpperCase();break;case"MEDIA-SEQUENCE":u.startSN!==0?_i(u,or,it):d.length>0&&Mi(u,or,it),w=u.startSN=parseInt(Fn);break;case"SKIP":{u.skippedSegments&&_i(u,or,it);const Xn=new In(Fn,u),cr=Xn.decimalInteger("SKIPPED-SEGMENTS");if(x(cr)){u.skippedSegments+=cr;for(let Un=cr;Un--;)d.push(null);w+=cr}const Sr=Xn.enumeratedString("RECENTLY-REMOVED-DATERANGES");Sr&&(u.recentlyRemovedDateranges=(u.recentlyRemovedDateranges||[]).concat(Sr.split(" ")));break}case"TARGETDURATION":u.targetduration!==0&&_i(u,or,it),u.targetduration=Math.max(parseInt(Fn),1);break;case"VERSION":u.version!==null&&_i(u,or,it),u.version=parseInt(Fn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":u.live||_i(u,or,it),u.live=!1;break;case"#":(Fn||ur)&&we.tagList.push(ur?[Fn,ur]:[Fn]);break;case"DISCONTINUITY":z++,we.tagList.push(["DIS"]);break;case"GAP":we.gap=!0,we.tagList.push([or]);break;case"BITRATE":we.tagList.push([or,Fn]),ce=parseInt(Fn)*1e3,x(ce)?we.bitrate=ce:ce=0;break;case"DATERANGE":{const Xn=new In(Fn,u),cr=new ei(Xn,u.dateRanges[Xn.ID],u.dateRangeTagCount);u.dateRangeTagCount++,cr.isValid||u.skippedSegments?u.dateRanges[cr.id]=cr:Y.warn(`Ignoring invalid DATERANGE tag: "${Fn}"`),we.tagList.push(["EXT-X-DATERANGE",Fn]);break}case"DEFINE":{{const Xn=new In(Fn,u);"IMPORT"in Xn?nr(u,Xn,s):On(u,Xn,t)}break}case"DISCONTINUITY-SEQUENCE":u.startCC!==0?_i(u,or,it):d.length>0&&Mi(u,or,it),u.startCC=z=parseInt(Fn);break;case"KEY":{const Xn=Gi(Fn,t,u);if(Xn.isSupported()){if(Xn.method==="NONE"){$t=void 0;break}$t||($t={});const cr=$t[Xn.keyFormat];cr!=null&&cr.matches(Xn)||(cr&&($t=h({},$t)),$t[Xn.keyFormat]=Xn)}else Y.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Fn}"`);break}case"START":u.startTimeOffset=Ii(Fn);break;case"MAP":{const Xn=new In(Fn,u);if(we.duration){const cr=new Le(r,c);fs(cr,Xn,n,$t),_=cr,we.initSegment=_,_.rawProgramDateTime&&!we.rawProgramDateTime&&(we.rawProgramDateTime=_.rawProgramDateTime)}else{const cr=we.byteRangeEndOffset;if(cr){const Sr=we.byteRangeStartOffset;kt=`${cr-Sr}@${Sr}`}else kt=null;fs(we,Xn,n,$t),_=we,Dt=!0}_.cc=z;break}case"SERVER-CONTROL":{pt&&_i(u,or,it),pt=new In(Fn),u.canBlockReload=pt.bool("CAN-BLOCK-RELOAD"),u.canSkipUntil=pt.optionalFloat("CAN-SKIP-UNTIL",0),u.canSkipDateRanges=u.canSkipUntil>0&&pt.bool("CAN-SKIP-DATERANGES"),u.partHoldBack=pt.optionalFloat("PART-HOLD-BACK",0),u.holdBack=pt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{u.partTarget&&_i(u,or,it);const Xn=new In(Fn);u.partTarget=Xn.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Xn=u.partList;Xn||(Xn=u.partList=[]);const cr=T>0?Xn[Xn.length-1]:void 0,Sr=T++,Un=new In(Fn,u),Kn=new Je(Un,we,c,Sr,cr);Xn.push(Kn),we.duration+=Kn.duration;break}case"PRELOAD-HINT":{const Xn=new In(Fn,u);u.preloadHint=Xn;break}case"RENDITION-REPORT":{const Xn=new In(Fn,u);u.renditionReports=u.renditionReports||[],u.renditionReports.push(Xn);break}default:Y.warn(`line parsed but not handled: ${it}`);break}}}Oe&&!Oe.relurl?(d.pop(),j-=Oe.duration,u.partList&&(u.fragmentHint=Oe)):u.partList&&(Ni(we,Oe,p),we.cc=z,u.fragmentHint=we,$t&&ts(we,$t,u)),u.targetduration||(u.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const en=d.length,Zn=d[0],ar=d[en-1];if(j+=u.skippedSegments*u.targetduration,j>0&&en&&ar){u.averagetargetduration=j/en;const pr=ar.sn;u.endSN=pr!=="initSegment"?pr:0,u.live||(ar.endList=!0),ht>0&&(vs(d,ht),Zn&&p.unshift(Zn))}return u.fragmentHint&&(j+=u.fragmentHint.duration),u.totalduration=j,p.length&&u.dateRangeTagCount&&Zn&&Hi(p,u),u.endCC=z,u}}function Hi(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const l=e.fragments[e.fragments.length-1];a.push(l),t++}else return;const n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let l=i.length;l--;){const c=e.dateRanges[i[l]],u=c.startDate.getTime();c.tagAnchor=n.ref;for(let d=t;d--;){var s;if(((s=a[d])==null?void 0:s.sn)<e.startSN)break;const p=Si(e,u,a,d,r);if(p!==-1){c.tagAnchor=e.fragments[p].ref;break}}}}function Si(a,e,t,n,r){const i=t[n];if(i){const l=i.programDateTime;if(e>=l||n===0){var s;const c=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=l+c*1e3){const u=t[n].sn-a.startSN;if(u<0)return-1;const d=a.fragments;if(d.length>t.length){const _=(t[n+1]||d[d.length-1]).sn-a.startSN;for(let w=_;w>u;w--){const T=d[w].programDateTime;if(e>=T&&e<T+d[w].duration*1e3)return w}}return u}}}return-1}function Gi(a,e,t){var n,r;const i=new In(a,t),s=(n=i.METHOD)!=null?n:"",l=i.URI,c=i.hexadecimalInteger("IV"),u=i.KEYFORMATVERSIONS,d=(r=i.KEYFORMAT)!=null?r:"identity";l&&i.IV&&!c&&Y.error(`Invalid IV: ${i.IV}`);const p=l?ui.resolve(l,e):"",_=(u||"1").split("/").map(Number).filter(Number.isFinite);return new Xr(s,p,d,_,c,i.KEYID)}function Ii(a){const t=new In(a).decimalFloatingPoint("TIME-OFFSET");return x(t)?t:null}function es(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>Qt(i,n));r.length&&(e[`${n}Codec`]=r.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>r.indexOf(i)===-1))}),e.unknownCodecs=t}function Fi(a,e,t){const n=e[t];n&&(a[t]=n)}function vs(a,e){let t=a[e];for(let n=e;n--;){const r=a[n];if(!r)return;r.programDateTime=t.programDateTime-r.duration*1e3,t=r}}function Ni(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function fs(a,e,t,n){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",n&&(a.levelkeys=n),a.initSegment=null}function ts(a,e,t){a.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(r=>e[r].isCommonEncryption)&&n.push(a)}function _i(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function Mi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function ii(a,e){const t=e.startPTS;if(x(t)){let n=0,r;e.sn>a.sn?(n=t-a.start,r=a):(n=a.start-t,r=e),r.duration!==n&&r.setDuration(n)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.setStart(a.start+(a.minEndPTS-a.start)):e.setStart(a.start+a.duration):e.setStart(Math.max(a.start-e.duration,0))}function ti(a,e,t,n,r,i,s){n-t<=0&&(s.warn("Fragment should have a positive duration",e),n=t+e.duration,i=r+e.duration);let c=t,u=n;const d=e.startPTS,p=e.endPTS;if(x(d)){const ce=Math.abs(d-t);a&&ce>a.totalduration?s.warn(`media timestamps and playlist times differ by ${ce}s for level ${e.level} ${a.url}`):x(e.deltaPTS)?e.deltaPTS=Math.max(ce,e.deltaPTS):e.deltaPTS=ce,c=Math.max(t,d),t=Math.min(t,d),r=e.startDTS!==void 0?Math.min(r,e.startDTS):r,u=Math.min(n,p),n=Math.max(n,p),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const _=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=c,e.startDTS=r,e.endPTS=n,e.minEndPTS=u,e.endDTS=i;const w=e.sn;if(!a||w<a.startSN||w>a.endSN)return 0;let T;const j=w-a.startSN,z=a.fragments;for(z[j]=e,T=j;T>0;T--)ii(z[T],z[T-1]);for(T=j;T<z.length-1;T++)ii(z[T],z[T+1]);return a.fragmentHint&&ii(z[z.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,_}function Tr(a,e,t){if(a===e)return;let n=null;const r=a.fragments;for(let d=r.length-1;d>=0;d--){const p=r[d].initSegment;if(p){n=p;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;Hr(a,e,(d,p,_,w)=>{if((!e.startCC||e.skippedSegments)&&p.cc!==d.cc){const T=d.cc-p.cc;for(let j=_;j<w.length;j++)w[j].cc+=T;e.endCC=w[w.length-1].cc}x(d.startPTS)&&x(d.endPTS)&&(p.setStart(p.startPTS=d.startPTS),p.startDTS=d.startDTS,p.maxStartPTS=d.maxStartPTS,p.endPTS=d.endPTS,p.endDTS=d.endDTS,p.minEndPTS=d.minEndPTS,p.setDuration(d.endPTS-d.startPTS),p.duration&&(i=p),e.PTSKnown=e.alignedSliding=!0),d.hasStreams&&(p.elementaryStreams=d.elementaryStreams),p.loader=d.loader,d.hasStats&&(p.stats=d.stats),d.initSegment&&(p.initSegment=d.initSegment,n=d.initSegment)});const s=e.fragments,l=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&l.forEach(d=>{var p;d&&(!d.initSegment||d.initSegment.relurl===((p=n)==null?void 0:p.relurl))&&(d.initSegment=n)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(d=>!d),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let d=e.skippedSegments;d--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=xr(a.dateRanges,e,t));const d=a.fragments.filter(p=>p.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let p=1;p<l.length;p++)l[p].programDateTime===null&&Ni(l[p],l[p-1],d);Hi(d,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var c;const d=wi(a,e.startSN-1);e.startCC=(c=d==null?void 0:d.cc)!=null?c:s[0].cc}Qr(a.partList,e.partList,(d,p)=>{p.elementaryStreams=d.elementaryStreams,p.stats=d.stats}),i?ti(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):jr(a,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const u=e.advancedDateTime;if(e.advanced&&u){const d=e.edge;e.driftStart||(e.driftStartTime=u,e.driftStart=d),e.driftEndTime=u,e.driftEnd=d}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function xr(a,e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=e,i=h({},a);r&&r.forEach(c=>{delete i[c]});const l=Object.keys(i).length;return l?(Object.keys(n).forEach(c=>{const u=i[c],d=new ei(n[c].attr,u);d.isValid?(i[c]=d,u||(d.tagOrder+=l)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Vt(n[c].attr)}"`)}),i):n}function Qr(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],l=e[r+n];s&&l&&s.index===l.index&&s.fragment.sn===l.fragment.sn?t(s,l):n--}}}function Hr(a,e,t){const n=e.skippedSegments,r=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(n?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,c=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let u=r;u<=i;u++){const d=c[s+u];let p=l[u];if(n&&!p&&d&&(p=e.fragments[u]=d),d&&p){t(d,p,u,l);const _=d.relurl,w=p.relurl;if(_&&Di(_,w)){e.playlistParsingError=Gr(`media sequence mismatch ${p.sn}:`,a,e,d,p);return}else if(d.cc!==p.cc){e.playlistParsingError=Gr(`discontinuity sequence mismatch (${d.cc}!=${p.cc})`,a,e,d,p);return}}}}function Gr(a,e,t,n,r){return new Error(`${a} ${r.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function jr(a,e,t=!0){const n=e.startSN+e.skippedSegments-a.startSN,r=a.fragments,i=n>=0;let s=0;if(i&&n<r.length)s=r[n].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;mi(e,s)}function mi(a,e){if(e){const t=a.fragments;for(let n=a.skippedSegments;n<t.length;n++)t[n].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function gi(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const n=a.fragments;if(n.length&&t*4>e){const i=n[n.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function wi(a,e,t){if(!a)return null;let n=a.fragments[e-a.startSN];return n||(n=a.fragmentHint,n&&n.sn===e)?n:e<a.startSN&&t&&t.sn===e?t:null}function qr(a,e,t){return a?di(a.partList,e,t):null}function di(a,e,t){if(a)for(let n=a.length;n--;){const r=a[n];if(r.index===t&&r.fragment.sn===e)return r}return null}function Ti(a){a.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(r=>{r.level=t,r.initSegment&&(r.initSegment.level=t)})})}function Di(a,e){return a!==e&&e?ds(a)!==ds(e):!1}function ds(a){return a.replace(/\?[^?]*$/,"")}function Vi(a,e){for(let n=0,r=a.length;n<r;n++){var t;if(((t=a[n])==null?void 0:t.cc)===e)return a[n]}return null}function Yr(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Fr(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function Zr(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)Fr(t[n],a);e.fragmentHint&&Fr(e.fragmentHint,a),e.alignedSliding=!0}function hi(a,e){a&&(si(e,a),e.alignedSliding||yi(e,a),!e.alignedSliding&&!e.skippedSegments&&jr(a,e,!1))}function si(a,e){if(!Yr(e,a))return;const t=Math.min(e.endCC,a.endCC),n=Vi(e.fragments,t),r=Vi(a.fragments,t);if(!n||!r)return;Y.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;Zr(i,a)}function yi(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,n=e.fragments;if(!t.length||!n.length)return;let r,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(r=Vi(n,s),i=Vi(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=Vi(t,r.cc)||t[Math.floor(t.length/2)]);const l=r.programDateTime,c=i.programDateTime;if(!l||!c)return;const u=(c-l)/1e3-(i.start-r.start);Zr(u,a)}function ai(a,e,t){ci(a,e,t),a.addEventListener(e,t)}function ci(a,e,t){a.removeEventListener(e,t)}const Ds={toString:function(a){let e="";const t=a.length;for(let n=0;n<t;n++)e+=`[${a.start(n).toFixed(3)}-${a.end(n).toFixed(3)}]`;return e}},Xt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class Bi extends dr{constructor(e,t,n,r,i){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Xt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:s,fragCurrent:l,media:c,mediaBuffer:u,state:d}=this,p=c?c.currentTime:0,_=dn.bufferInfo(u||c,p,s.maxBufferHole),w=!_.len;if(this.log(`Media seeking to ${x(p)?p.toFixed(3):p}, state: ${d}, ${w?"out of":"in"} buffer`),this.state===Xt.ENDED)this.resetLoadingState();else if(l){const T=s.maxFragLookUpTolerance,j=l.start-T,z=l.start+l.duration+T;if(w||z<_.start||j>_.end){const ce=p>z;(p<j||ce)&&(ce&&l.loader&&(this.log(`Cancelling fragment load for seek (sn: ${l.sn})`),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(c){this.fragmentTracker.removeFragmentsInRange(p,1/0,this.playlistType,!0);const T=this.lastCurrentTime;if(p>T&&(this.lastCurrentTime=p),!this.loadingParts){const j=Math.max(_.end,p),z=this.shouldLoadParts(this.getLevelDetails(),j);z&&(this.log(`LL-Part loading ON after seeking to ${p.toFixed(2)} with buffer @${j.toFixed(2)}`),this.loadingParts=z)}}this.hls.hasEnoughToStart||(this.log(`Setting ${w?"startPosition":"nextLoadPosition"} to ${p} for seek without enough to start`),this.nextLoadPosition=p,w&&(this.startPosition=p)),w&&this.state===Xt.IDLE&&this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=i,this.hls=e,this.fragmentLoader=new Pn(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Dn(e.config)}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Xt.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Xt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const i=e.buffered;this.config.maxBufferHole&&i&&i.length>1&&(e=dn.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>r&&s<t.edge||this.media.currentTime<e.start)return!1;const c=t.partList;if(c!=null&&c.length){const d=c[c.length-1];return dn.isBuffered(this.media,d.start+d.duration/2)}const u=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(u)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null)return this.levelLastLoaded.details}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;ai(n,"seeking",this.onMediaSeeking),ai(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===Xt.STOPPED&&this.startLoad(r.startPosition)}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(r!==null){if(r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),ci(r,"seeking",this.onMediaSeeking),ci(r,"ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=Xt.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const r=i=>{const s=i.frag;if(this.fragContextChanged(s)){this.warn(`${s.type} sn: ${s.sn}${i.part?" part: "+i.part.index:""} of ${this.fragInfo(s,!1,i.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,n,r).then(i=>{if(!i)return;const s=this.state,l=i.frag;if(this.fragContextChanged(l)){(s===Xt.FRAG_LOADING||!this.fragCurrent&&s===Xt.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=Xt.IDLE);return}"payload"in i&&(this.log(`Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${l.level}`),this.hls.trigger(f.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Xt.STOPPED||this.state===Xt.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===lt.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),l=Math.max(e.duration,s?s.len:this.config.maxBufferLength),c=this.backtrackFragment;((c?e.sn-c.sn:0)===1||this.reduceMaxBufferLength(l,e.duration))&&n.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===lt.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(f.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const r=n==null?void 0:n.frag;if(!r||this.fragContextChanged(r)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{frag:i,payload:s}=n,l=i.decryptdata;if(s&&s.byteLength>0&&l!=null&&l.key&&l.iv&&Nr(l.method)){const c=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),l.key.buffer,l.iv.buffer,Er(l.method)).catch(u=>{throw r.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.FRAG_DECRYPT_ERROR,fatal:!1,error:u,reason:u.message,frag:i}),u}).then(u=>{const d=self.performance.now();return r.trigger(f.FRAG_DECRYPTED,{frag:i,payload:u,stats:{tstart:c,tdecrypt:d}}),n.payload=u,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Xt.STOPPED||this.state===Xt.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state!==Xt.STOPPED&&(this.state=Xt.IDLE),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}unhandledEncryptionError(e,t){var n,r;const i=e.tracks;if(i&&!t.encrypted&&((n=i.audio)!=null&&n.encrypted||(r=i.video)!=null&&r.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){const s=this.media,l=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(l.message),!s||s.mediaKeys?!1:(this.hls.trigger(f.ERROR,{type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_NO_KEYS,fatal:!1,error:l,frag:t}),this.resetTransmuxer(),!0)}return!1}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?Ds.toString(dn.getBuffered(n)):"(detached)"})`),ue(e)){var r;if(e.type!==Q.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=Xt.IDLE;return}}const i=(r=this.levels)==null?void 0:r[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=Xt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:i}=e,s=!i||i.length===0||i.some(c=>!c),l=new Qn(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(l)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){var i;this.fragCurrent=e;const s=t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let l=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)){if(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=Xt.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(_=>{if(!this.fragContextChanged(_.frag))return this.hls.trigger(f.KEY_LOADED,_),this.state===Xt.KEY_LOADING&&(this.state=Xt.IDLE),_}),this.hls.trigger(f.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(l=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),l&&this.log("[eme] blocking frag load until media-keys acquired"));const c=this.fragPrevious;if(ue(e)&&(!c||e.sn!==c.sn)){const _=this.shouldLoadParts(t.details,e.end);_!==this.loadingParts&&(this.log(`LL-Part loading ${_?"ON":"OFF"} loading sn ${c==null?void 0:c.sn}->${e.sn}`),this.loadingParts=_)}if(n=Math.max(e.start,n||0),this.loadingParts&&ue(e)){const _=s.partList;if(_&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const w=this.getNextPart(_,e,n);if(w>-1){const T=_[w];e=this.fragCurrent=T.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${T.index} (${w}/${_.length-1}) of ${this.fragInfo(e,!1,T)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=T.start+T.duration,this.state=Xt.FRAG_LOADING;let j;return l?j=l.then(z=>!z||this.fragContextChanged(z.frag)?null:this.doFragPartsLoad(e,T,t,r)).catch(z=>this.handleFragLoadError(z)):j=this.doFragPartsLoad(e,T,t,r).catch(z=>this.handleFragLoadError(z)),this.hls.trigger(f.FRAG_LOADING,{frag:e,part:T,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):j}else if(!e.url||this.loadedEndOfParts(_,n))return Promise.resolve(null)}}if(ue(e)&&this.loadingParts){var u;this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${(u=s.partList)==null?void 0:u.filter(_=>_.loaded).map(_=>`[${_.start}-${_.end}]`)}`),this.loadingParts=!1}else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${"["+s.startSN+"-"+s.endSN+"]"}, target: ${parseFloat(n.toFixed(3))}`),x(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Xt.FRAG_LOADING;const d=this.config.progressive;let p;return d&&l?p=l.then(_=>!_||this.fragContextChanged(_.frag)?null:this.fragmentLoader.load(e,r)).catch(_=>this.handleFragLoadError(_)):p=Promise.all([this.fragmentLoader.load(e,d?r:void 0),l]).then(([_])=>(!d&&r&&r(_),_)).catch(_=>this.handleFragLoadError(_)),this.hls.trigger(f.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):p}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var l;const c=[],u=(l=n.details)==null?void 0:l.partList,d=p=>{this.fragmentLoader.loadPart(e,p,r).then(_=>{c[p.index]=_;const w=_.part;this.hls.trigger(f.FRAG_LOADED,_);const T=qr(n.details,e.sn,p.index+1)||di(u,e.sn,p.index+1);if(T)d(T);else return i({frag:e,part:w,partsLoaded:c})}).catch(s)};d(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===M.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===te.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetFragmentLoading(t.frag)):this.hls.trigger(f.ERROR,t)}else this.hls.trigger(f.ERROR,{type:te.OTHER_ERROR,details:M.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Xt.PARSING){!this.fragCurrent&&this.state!==Xt.STOPPED&&this.state!==Xt.ERROR&&(this.state=Xt.IDLE);return}const{frag:n,part:r,level:i}=t,s=self.performance.now();n.stats.parsing.end=s,r&&(r.stats.parsing.end=s);const l=this.getLevelDetails(),u=l&&n.sn>l.endSN||this.shouldLoadParts(l,n.end);u!==this.loadingParts&&(this.log(`LL-Part loading ${u?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=u),this.updateLevelTiming(n,r,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var n;const i=e.partList[0];if(i.fragment.type===Q.SUBTITLE)return!1;const s=i.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=s){var r;if((this.hls.hasEnoughToStart?((r=this.media)==null?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:i,part:s}=e;if(!(t!=null&&t[r]))return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const l=t[r],c=l.details,u=s>-1?qr(c,i,s):null,d=u?u.fragment:wi(c,i,n);return d?(n&&n!==d&&(d.stats=n.stats),{frag:d,part:u,level:l}):null}bufferFragmentData(e,t,n,r,i){if(this.state!==Xt.PARSING)return;const{data1:s,data2:l}=e;let c=s;if(l&&(c=Te(s,l)),!c.length)return;const u=this.initPTS[t.cc],d=u?-u.baseTime/u.timescale:void 0,p={type:e.type,frag:t,part:n,chunkMeta:r,offset:d,parent:t.type,data:c};if(this.hls.trigger(f.BUFFER_APPENDING,p),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!dn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=dn.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),l=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-l>s&&this.flushMainBuffer(l,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!x(r))return null;const s=this.lastCurrentTime>r||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,s)}getFwdBufferInfoAtPos(e,t,n,r){const i=dn.bufferInfo(e,t,r);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,n);if(s&&(i.nextStart<=s.end||s.gap)){const l=Math.max(Math.min(i.nextStart,s.end)-t,r);return dn.bufferInfo(e,t,l)}}return i}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),i=Math.max(e-t*3,n.maxMaxBufferLength/2,r);return i>=r?(n.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=Q.MAIN){const n=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:i}=this,s=n[0].start,l=i.lowLatencyMode&&!!t.partList;let c=null;if(t.live){const p=i.initialLiveManifestSize;if(r<p)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${p})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var u;l&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),c=this.getInitialLiveFragment(t);const _=this.hls.startPosition,w=this.hls.liveSyncPosition,T=c?(_!==-1&&_>=s?_:w)||c.start:e;this.log(`Setting startPosition to ${T} to match start frag at live edge. mainStart: ${_} liveSyncPosition: ${w} frag.start: ${(u=c)==null?void 0:u.start}`),this.startPosition=this.nextLoadPosition=T}}else e<=s&&(c=n[0]);if(!c){const p=this.loadingParts?t.partEnd:t.fragmentEnd;c=this.getFragmentAtPosition(e,p,t)}let d=this.filterReplacedPrimary(c,t);if(!d&&c){const p=c.sn-t.startSN;d=this.filterReplacedPrimary(n[p+1]||null,t)}return this.mapToInitFragWhenRequired(d)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===lt.OK||n===lt.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&n.nextStart)){const l=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(l!==null&&n.len+l.len>=i){const c=s.sn;return this.loopSn!==c&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${c}`),this.loopSn=c),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(ns(this.config)){var e;if((e=this.hls.interstitialsManager)==null||(e=e.playingItem)==null?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(ns(this.config)&&e.type!==Q.SUBTITLE){const n=this.hls.interstitialsManager,r=n==null?void 0:n.bufferingItem;if(r){const s=r.event;if(s){if(s.appendInPlace||Math.abs(e.start-r.start)>1||r.start===0)return null}else if(e.end<=r.start&&(t==null?void 0:t.live)===!1||e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}const i=n==null?void 0:n.playerQueue;if(i)for(let s=i.length;s--;){const l=i[s].interstitial;if(l.appendInPlace&&e.start>=l.startTime&&e.end<=l.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!e.initSegment.data&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,i=!1,s=!0;for(let l=0,c=e.length;l<c;l++){const u=e[l];if(s=s&&!u.independent,r>-1&&n<u.start)break;const d=u.loaded;d?r=-1:(i||(u.independent||s)&&u.fragment===t)&&(u.fragment!==t&&this.warn(`Need buffer at ${n} but next unloaded part starts at ${u.start}`),r=l),i=d}return r}loadedEndOfParts(e,t){let n;for(let r=e.length;r--;){if(n=e[r],!n.loaded)return!1;if(t>n.start)return!0}return!1}getInitialLiveFragment(e){const t=e.fragments,n=this.fragPrevious;let r=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),r=Mn(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){const i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];n.cc===s.cc&&(r=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=an(e,n.cc,n.end),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(r=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:i}=this,{fragments:s,endSN:l}=n;const{fragmentHint:c}=n,{maxFragLookUpTolerance:u}=r,d=n.partList,p=!!(this.loadingParts&&d!=null&&d.length&&c);p&&!this.bitrateTest&&d[d.length-1].fragment.sn===c.sn&&(s=s.concat(c),l=c.sn);let _;if(e<t){var w;const j=e<this.lastCurrentTime||e>t-u||(w=this.media)!=null&&w.paused||!this.startFragRequested?0:u;_=Ln(i,s,e,j)}else _=s[s.length-1];if(_){const T=_.sn-n.startSN,j=this.fragmentTracker.getState(_);if((j===lt.OK||j===lt.PARTIAL&&_.gap)&&(i=_),i&&_.sn===i.sn&&(!p||d[0].fragment.sn>_.sn||!n.live)&&_.level===i.level){const ce=s[T+1];_.sn<l&&this.fragmentTracker.getState(ce)!==lt.OK?_=ce:_=null}}return _}alignPlaylists(e,t,n){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,l=e.alignedSliding&&x(i);if(s||!l&&!i){hi(n,e);const c=e.fragmentStart;return this.log(`Live playlist sliding: ${c.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),c}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const r=this.timelineOffset;if(n===-1){const i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&x(s)?(n=t+s,s<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${s} found in ${i?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+r}this.nextLoadPosition=n+r}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&ue(e)&&e.stats.aborted&&(this.log(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==Xt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Xt.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const ce=this.getCurrentContext(t.chunkMeta);ce&&(t.frag=ce.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var i;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const s=t.details===M.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const l=t.errorAction;if(!l){this.state=Xt.ERROR;return}const{action:c,flags:u,retryCount:d=0,retryConfig:p}=l,_=!!p,w=_&&c===We.RetryRequest,T=_&&!l.resolved&&u===Ue.MoveAllAlternatesMatchingHost,j=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!w&&T&&ue(r)&&!r.endList&&j)this.resetFragmentErrors(e),this.treatAsGap(r),l.resolved=!0;else if((w||T)&&d<p.maxNumRetry){var z;const ce=ge((z=t.response)==null?void 0:z.code),Oe=Yn(p,d);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+Oe,this.state=Xt.FRAG_LOADING_WAITING_RETRY,l.resolved=!0,ce){this.log("Waiting for connection (offline)"),this.retryDate=1/0,t.reason="offline";return}this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${d+1}/${p.maxNumRetry} in ${Oe}ms`)}else if(p)if(this.resetFragmentErrors(e),d<p.maxNumRetry)!s&&c!==We.RemoveAlternatePermanently&&(l.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${d})`);return}else c===We.SendAlternateToPenaltyBox?this.state=Xt.WAITING_LEVEL:this.state=Xt.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!ge(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Xt.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===Xt.PARSING||this.state===Xt.PARSED){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),i=r&&r.len>.5;i&&this.reduceMaxBufferLength(r.len,(t==null?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===Q.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Xt.STOPPED&&(this.state=Xt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=dn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Xt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Xt.STOPPED&&(this.state=Xt.IDLE)}resetStartWhenNotLoaded(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const e=this.levelLastLoaded,t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.log(`Loading context changed while buffering sn ${e.sn} of ${this.playlistLabel()} ${e.level===-1?"<removed>":e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){const i=n.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((c,u)=>{const d=e.elementaryStreams[u];if(d){const p=d.endPTS-d.startPTS;if(p<=0)return this.warn(`Could not parse fragment ${e.sn} ${u} duration reliably (${p})`),c||!1;const _=r?0:ti(i,e,d.startPTS,d.endPTS,d.startDTS,d.endDTS,this);return this.hls.trigger(f.LEVEL_PTS_UPDATED,{details:i,level:n,drift:_,type:u,frag:e,start:d.startPTS,end:d.endPTS}),!0}return c},!1)){var l;if(n.fragmentError===0&&this.treatAsGap(e,n),((l=this.transmuxer)==null?void 0:l.error)===null){const c=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(c.message),this.hls.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.FRAG_PARSING_ERROR,fatal:!1,error:c,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Xt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(f.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===Q.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,i;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((i=t&&!n?e.endPTS:(n||e).end)!=null?i:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function ns(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class rs{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;if(e.length)e.length===1?n=e[0]:n=ea(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function ea(a,e){const t=new Uint8Array(e);let n=0;for(let r=0;r<a.length;r++){const i=a[r];t.set(i,n),n+=i.length}return t}var Us={exports:{}},Ks;function ta(){return Ks||(Ks=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,p,_){if(typeof d!="function")throw new TypeError("The listener must be a function");var w=new r(d,p||c,_),T=t?t+u:u;return c._events[T]?c._events[T].fn?c._events[T]=[c._events[T],w]:c._events[T].push(w):(c._events[T]=w,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,p;if(this._eventsCount===0)return u;for(p in d=this._events)e.call(d,p)&&u.push(t?p.slice(1):p);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=t?t+u:u,p=this._events[d];if(!p)return[];if(p.fn)return[p.fn];for(var _=0,w=p.length,T=new Array(w);_<w;_++)T[_]=p[_].fn;return T},l.prototype.listenerCount=function(u){var d=t?t+u:u,p=this._events[d];return p?p.fn?1:p.length:0},l.prototype.emit=function(u,d,p,_,w,T){var j=t?t+u:u;if(!this._events[j])return!1;var z=this._events[j],ce=arguments.length,Oe,we;if(z.fn){switch(z.once&&this.removeListener(u,z.fn,void 0,!0),ce){case 1:return z.fn.call(z.context),!0;case 2:return z.fn.call(z.context,d),!0;case 3:return z.fn.call(z.context,d,p),!0;case 4:return z.fn.call(z.context,d,p,_),!0;case 5:return z.fn.call(z.context,d,p,_,w),!0;case 6:return z.fn.call(z.context,d,p,_,w,T),!0}for(we=1,Oe=new Array(ce-1);we<ce;we++)Oe[we-1]=arguments[we];z.fn.apply(z.context,Oe)}else{var it=z.length,Et;for(we=0;we<it;we++)switch(z[we].once&&this.removeListener(u,z[we].fn,void 0,!0),ce){case 1:z[we].fn.call(z[we].context);break;case 2:z[we].fn.call(z[we].context,d);break;case 3:z[we].fn.call(z[we].context,d,p);break;case 4:z[we].fn.call(z[we].context,d,p,_);break;default:if(!Oe)for(Et=1,Oe=new Array(ce-1);Et<ce;Et++)Oe[Et-1]=arguments[Et];z[we].fn.apply(z[we].context,Oe)}}return!0},l.prototype.on=function(u,d,p){return i(this,u,d,p,!1)},l.prototype.once=function(u,d,p){return i(this,u,d,p,!0)},l.prototype.removeListener=function(u,d,p,_){var w=t?t+u:u;if(!this._events[w])return this;if(!d)return s(this,w),this;var T=this._events[w];if(T.fn)T.fn===d&&(!_||T.once)&&(!p||T.context===p)&&s(this,w);else{for(var j=0,z=[],ce=T.length;j<ce;j++)(T[j].fn!==d||_&&!T[j].once||p&&T[j].context!==p)&&z.push(T[j]);z.length?this._events[w]=z.length===1?z[0]:z:s(this,w)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=t?t+u:u,this._events[d]&&s(this,d)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=t,l.EventEmitter=l,a.exports=l}(Us)),Us.exports}var Sa=ta(),Zs=N(Sa);const _s="1.6.11",is={};function Cs(){return typeof __HLS_WORKER_BUNDLE__=="function"}function zs(){const a=is[_s];if(a)return a.clientCount++,a;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return is[_s]=r,r}function $s(a){const e=is[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,r={worker:new self.Worker(t),scriptURL:t,clientCount:1};return is[a]=r,r}function na(a){const e=is[a||_s];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete is[a||_s],r&&self.URL.revokeObjectURL(r),n.terminate()}}function Hs(a,e){return e+10<=a.length&&a[e]===51&&a[e+1]===68&&a[e+2]===73&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function Rs(a,e){return e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function ys(a,e){let t=0;return t=(a[e]&127)<<21,t|=(a[e+1]&127)<<14,t|=(a[e+2]&127)<<7,t|=a[e+3]&127,t}function Es(a,e){const t=e;let n=0;for(;Rs(a,e);){n+=10;const r=ys(a,e+6);n+=r,Hs(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function ra(a,e,t,n){const r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const w=new Error(`invalid ADTS sampling index:${s}`);a.emit(f.ERROR,f.ERROR,{type:te.MEDIA_ERROR,details:M.FRAG_PARSING_ERROR,fatal:!0,error:w,reason:w.message});return}const l=(i>>6&3)+1,c=e[t+3]>>6&3|(i&1)<<2,u="mp4a.40."+l,d=r[s];let p=s;(l===5||l===29)&&(p-=3);const _=[l<<3|(p&14)>>1,(p&1)<<7|c<<3];return Y.log(`manifest codec:${n}, parsed codec:${u}, channels:${c}, rate:${d} (ADTS object type:${l} sampling index:${s})`),{config:_,samplerate:d,channelCount:c,codec:u,parsedCodec:u,manifestCodec:n}}function Is(a,e){return a[e]===255&&(a[e+1]&246)===240}function Gs(a,e){return a[e+1]&1?7:9}function bs(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function ia(a,e){return e+5<a.length}function Ls(a,e){return e+1<a.length&&Is(a,e)}function Cr(a,e){return ia(a,e)&&Is(a,e)&&bs(a,e)<=a.length-e}function Lr(a,e){if(Ls(a,e)){const t=Gs(a,e);if(e+t>=a.length)return!1;const n=bs(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||Ls(a,r)}return!1}function li(a,e,t,n,r){if(!a.samplerate){const i=ra(e,t,n,r);if(!i)return;h(a,i)}}function xi(a){return 1024*9e4/a}function fi(a,e){const t=Gs(a,e);if(e+t<=a.length){const n=bs(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function ss(a,e,t,n,r){const i=xi(a.samplerate),s=n+r*i,l=fi(e,t);let c;if(l){const{frameLength:p,headerLength:_}=l,w=_+p,T=Math.max(0,t+w-e.length);T?(c=new Uint8Array(w-_),c.set(e.subarray(t+_,e.length),0)):c=e.subarray(t+_,t+w);const j={unit:c,pts:s};return T||a.samples.push(j),{sample:j,length:w,missing:T}}const u=e.length-t;return c=new Uint8Array(u),c.set(e.subarray(t,e.length),0),{sample:{unit:c,pts:s},length:u,missing:-1}}function as(a,e){return Rs(a,e)&&ys(a,e+6)+10<=a.length-e}function os(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function ls(a,e=0,t=1/0){return Vs(a,e,t,Uint8Array)}function Vs(a,e,t,n){const r=Ll(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=kl(a)?a.byteOffset:0,l=(s+a.byteLength)/i,c=(s+e)/i,u=Math.floor(Math.max(0,Math.min(c,l))),d=Math.floor(Math.min(u+Math.max(t,0),l));return new n(r,u,d-u)}function Ll(a){return a instanceof ArrayBuffer?a:a.buffer}function kl(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function Pl(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=a.data.subarray(1).indexOf(0);if(n===-1)return;const r=Be(ls(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const l=Be(ls(a.data,3+n,s));let c;return r==="-->"?c=Be(ls(a.data,4+n+s)):c=os(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=l,e.data=c,e}function Ol(a){if(a.size<2)return;const e=Be(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function Fl(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=Be(a.data.subarray(t),!0);t+=n.length+1;const r=Be(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Be(a.data.subarray(1));return{key:a.type,info:"",data:e}}function Nl(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=Be(a.data.subarray(t),!0);t+=n.length+1;const r=Be(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Be(a.data);return{key:a.type,info:"",data:e}}function Ml(a){return a.type==="PRIV"?Ol(a):a.type[0]==="W"?Nl(a):a.type==="APIC"?Pl(a):Fl(a)}function Bl(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=ys(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const sa=10,Ul=10;function oo(a){let e=0;const t=[];for(;Rs(a,e);){const n=ys(a,e+6);a[e+5]>>6&1&&(e+=sa),e+=sa;const r=e+n;for(;e+Ul<r;){const i=Bl(a.subarray(e)),s=Ml(i);s&&t.push(s),e+=i.size+sa}Hs(a,e)&&(e+=sa)}return t}function lo(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function Kl(a){if(a.data.byteLength===8){const e=new Uint8Array(a.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function wa(a){const e=oo(a);for(let t=0;t<e.length;t++){const n=e[t];if(lo(n))return Kl(n)}}let Ci=function(a){return a.audioId3="org.id3",a.dateRange="com.apple.quicktime.HLS",a.emsg="https://aomedia.org/emsg/ID3",a.misbklv="urn:misb:KLV:bin:1910.1",a}({});function Wi(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class Aa{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=Te(this.cachedData,e),this.cachedData=null);let n=Es(e,0),r=n?n.length:0,i;const s=this._audioTrack,l=this._id3Track,c=n?wa(n):void 0,u=e.length;for((this.basePTS===null||this.frameIndex===0&&x(c))&&(this.basePTS=Zl(c,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Ci.audioId3,duration:Number.POSITIVE_INFINITY});r<u;){if(this.canParse(e,r)){const d=this.appendFrame(s,e,r);d?(this.frameIndex++,this.lastPTS=d.sample.pts,r+=d.length,i=r):r=u}else as(e,r)?(n=Es(e,r),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Ci.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===u&&i!==u){const d=e.slice(i);this.cachedData?this.cachedData=Te(this.cachedData,d):this.cachedData=d}}return{audioTrack:s,videoTrack:Wi(),id3Track:l,textTrack:Wi()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Wi(),id3Track:this._id3Track,textTrack:Wi()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const Zl=(a,e,t)=>{if(x(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let aa=null;const zl=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],$l=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Hl=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Gl=[0,1,1,4];function uo(a,e,t,n,r){if(t+24>e.length)return;const i=co(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,l=n+r*s,c={unit:e.subarray(t,t+i.frameLength),pts:l,dts:l};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(c),{sample:c,length:i.frameLength,missing:0}}}function co(a,e){const t=a[e+1]>>3&3,n=a[e+1]>>1&3,r=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&i!==3){const s=a[e+2]>>1&1,l=a[e+3]>>6,c=t===3?3-n:n===3?3:4,u=zl[c*14+r-1]*1e3,p=$l[(t===3?0:t===2?1:2)*3+i],_=l===3?1:2,w=Hl[t][n],T=Gl[n],j=w*8*T,z=Math.floor(w*u/p+s)*T;if(aa===null){const we=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);aa=we?parseInt(we[1]):0}return!!aa&&aa<=87&&n===2&&u>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:p,channelCount:_,frameLength:z,samplesPerFrame:j}}}function Ta(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function fo(a,e){return e+1<a.length&&Ta(a,e)}function Vl(a,e){return Ta(a,e)&&4<=a.length-e}function ho(a,e){if(e+1<a.length&&Ta(a,e)){const n=co(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||fo(a,i)}return!1}class Wl extends Aa{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const n=Es(e,0);let r=(n==null?void 0:n.length)||0;if(ho(e,r))return!1;for(let i=e.length;r<i;r++)if(Lr(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return Cr(e,t)}appendFrame(e,t,n){li(e,this.observer,t,n,e.manifestCodec);const r=ss(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const po=(a,e)=>{let t=0,n=5;e+=n;const r=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;n>0;){s[0]=a[e];const l=Math.min(n,8),c=8-l;i[0]=4278190080>>>24+c<<c,r[0]=(s[0]&i[0])>>c,t=t?t<<l|r[0]:r[0],e+=1,n-=l}return t};class jl extends Aa{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const r=mo(e,t,n,this.basePTS,this.frameIndex);if(r!==-1)return{sample:e.samples[e.samples.length-1],length:r,missing:0}}static probe(e){if(!e)return!1;const t=Es(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&wa(t)!==void 0&&po(e,n)<16}}function mo(a,e,t,n,r){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const l=[48e3,44100,32e3][i],c=e[t+4]&63,d=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][c*3+i]*2;if(t+d>e.length)return-1;const p=e[t+6]>>5;let _=0;p===2?_+=2:(p&1&&p!==1&&(_+=2),p&4&&(_+=2));const w=(e[t+6]<<8|e[t+7])>>12-_&1,j=[2,1,2,3,3,4,4,5][p]+w,z=e[t+5]>>3,ce=e[t+5]&7,Oe=new Uint8Array([i<<6|z<<1|ce>>2,(ce&3)<<6|p<<3|w<<2|c>>4,c<<4&224]),we=1536/l*9e4,it=n+r*we,Et=e.subarray(t,t+d);return a.config=Oe,a.channelCount=j,a.samplerate=l,a.samples.push({unit:Et,pts:it}),d}class Yl extends Aa{resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Es(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&wa(t)!==void 0&&po(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(ho(e,n))return Y.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return Vl(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return uo(e,t,n,this.basePTS,this.frameIndex)}}const Xl=/\/emsg[-/]ID3/i;class Ql{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,r){const i=this.videoTrack=Wi("video",1),s=this.audioTrack=Wi("audio",1),l=this.txtTrack=Wi("text",1);if(this.id3Track=Wi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const c=Se(e);if(c.video){const{id:u,timescale:d,codec:p,supplemental:_}=c.video;i.id=u,i.timescale=l.timescale=d,i.codec=p,i.supplemental=_}if(c.audio){const{id:u,timescale:d,codec:p}=c.audio;s.id=u,s.timescale=d,s.codec=p}l.id=Tt.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return de(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=Te(this.remainderData,e));const l=Ne(n);this.remainderData=l.remainder,r.samples=l.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=He(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=He(e,t),{videoTrack:t,audioTrack:Wi(),id3Track:r,textTrack:Wi()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=K(e.samples,["emsg"]);r&&r.forEach(i=>{const s=Xe(i);if(Xl.test(s.schemeIdUri)){const l=go(s,t);let c=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;c<=.001&&(c=Number.POSITIVE_INFINITY);const u=s.payload;n.samples.push({data:u,len:u.byteLength,dts:l,pts:l,type:Ci.emsg,duration:c})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=go(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:Ci.misbklv,duration:Number.POSITIVE_INFINITY})}})}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function go(a,e){return x(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class Jl{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Dn(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,qe.cbc)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const i=r.subarray(16,r.length-r.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(l=>{const c=new Uint8Array(l);r.set(c,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)}).catch(n)}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e}decryptAvcSample(e,t,n,r,i){const s=ft(i.data),l=this.getAvcEncryptedData(s);this.decryptBuffer(l.buffer).then(c=>{i.data=this.getAvcDecryptedUnit(s,c),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,r)}).catch(r)}decryptAvcSamples(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){r();return}const i=e[t].units;for(;!(n>=i.length);n++){const s=i[n];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,n,r,s),!this.decrypter.isSync()))return}}}}class vo{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,r;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const i=n.units;r=i[i.length-1]}return r}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,r=n.length;if(r){const i=n[r-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let i=e.naluState||0;const s=i,l=[];let c=0,u,d,p,_=-1,w=0;for(i===-1&&(_=0,w=this.getNALuType(t,0),i=0,c=1);c<r;){if(u=t[c++],!i){i=u?0:1;continue}if(i===1){i=u?0:2;continue}if(!u)i=3;else if(u===1){if(d=c-i-1,_>=0){const T={data:t.subarray(_,d),type:w};l.push(T)}else{const T=this.getLastNalUnit(e.samples);T&&(s&&c<=4-s&&T.state&&(T.data=T.data.subarray(0,T.data.byteLength-s)),d>0&&(T.data=Te(T.data,t.subarray(0,d)),T.state=0))}c<r?(p=this.getNALuType(t,c),_=c,w=p,i=0):i=-1}else i=0}if(_>=0&&i>=0){const T={data:t.subarray(_,r),type:w,state:i};l.push(T)}if(l.length===0){const T=this.getLastNalUnit(e.samples);T&&(T.data=Te(T.data,t))}return e.naluState=i,l}}class Ws{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&Y.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class ql extends vo{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,c=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(u=>{var d,p;switch(u.type){case 1:{let j=!1;l=!0;const z=u.data;if(c&&z.length>4){const ce=this.readSliceType(z);(ce===2||ce===4||ce===7||ce===9)&&(j=!0)}if(j){var _;(_=s)!=null&&_.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.frame=!0,s.key=j;break}case 5:l=!0,(d=s)!=null&&d.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 6:{l=!0,_e(u.data,1,n.pts,t.samples);break}case 7:{var w,T;l=!0,c=!0;const j=u.data,z=this.readSPS(j);if(!e.sps||e.width!==z.width||e.height!==z.height||((w=e.pixelRatio)==null?void 0:w[0])!==z.pixelRatio[0]||((T=e.pixelRatio)==null?void 0:T[1])!==z.pixelRatio[1]){e.width=z.width,e.height=z.height,e.pixelRatio=z.pixelRatio,e.sps=[j];const ce=j.subarray(1,4);let Oe="avc1.";for(let we=0;we<3;we++){let it=ce[we].toString(16);it.length<2&&(it="0"+it),Oe+=it}e.codec=Oe}break}case 8:l=!0,e.pps=[u.data];break;case 9:l=!0,e.audFound=!0,(p=s)!=null&&p.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:l=!0;break;default:l=!1;break}s&&l&&s.units.push(u)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new Ws(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,r=8,i;for(let s=0;s<e;s++)r!==0&&(i=t.readEG(),r=(n+i+256)%256),n=r===0?n:r}readSPS(e){const t=new Ws(e);let n=0,r=0,i=0,s=0,l,c,u;const d=t.readUByte.bind(t),p=t.readBits.bind(t),_=t.readUEG.bind(t),w=t.readBoolean.bind(t),T=t.skipBits.bind(t),j=t.skipEG.bind(t),z=t.skipUEG.bind(t),ce=this.skipScalingList.bind(this);d();const Oe=d();if(p(5),T(3),d(),z(),Oe===100||Oe===110||Oe===122||Oe===244||Oe===44||Oe===83||Oe===86||Oe===118||Oe===128){const Dt=_();if(Dt===3&&T(1),z(),z(),T(1),w())for(c=Dt!==3?8:12,u=0;u<c;u++)w()&&(u<6?ce(16,t):ce(64,t))}z();const we=_();if(we===0)_();else if(we===1)for(T(1),j(),j(),l=_(),u=0;u<l;u++)j();z(),T(1);const it=_(),Et=_(),$t=p(1);$t===0&&T(1),T(1),w()&&(n=_(),r=_(),i=_(),s=_());let ht=[1,1];if(w()&&w())switch(d()){case 1:ht=[1,1];break;case 2:ht=[12,11];break;case 3:ht=[10,11];break;case 4:ht=[16,11];break;case 5:ht=[40,33];break;case 6:ht=[24,11];break;case 7:ht=[20,11];break;case 8:ht=[32,11];break;case 9:ht=[80,33];break;case 10:ht=[18,11];break;case 11:ht=[15,11];break;case 12:ht=[64,33];break;case 13:ht=[160,99];break;case 14:ht=[4,3];break;case 15:ht=[3,2];break;case 16:ht=[2,1];break;case 255:{ht=[d()<<8|d(),d()<<8|d()];break}}return{width:Math.ceil((it+1)*16-n*2-r*2),height:(2-$t)*(Et+1)*16-($t?2:4)*(i+s),pixelRatio:ht}}}class eu extends vo{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,c=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(u=>{var d,p;switch(u.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.frame=!0,l=!0;break;case 16:case 17:case 18:case 21:if(l=!0,c){var _;(_=s)!=null&&_.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:l=!0,(d=s)!=null&&d.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 39:l=!0,_e(u.data,2,n.pts,t.samples);break;case 32:l=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=h(e.params,this.readVPS(u.data)),this.initVPS=u.data),e.vps=[u.data];break;case 33:if(l=!0,c=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],u.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const w=this.readSPS(u.data);e.width=w.width,e.height=w.height,e.pixelRatio=w.pixelRatio,e.codec=w.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const T in w.params)e.params[T]=w.params[T]}this.pushParameterSet(e.sps,u.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0;break;case 34:if(l=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const w=this.readPPS(u.data);for(const T in w)e.params[T]=w[T]}this.pushParameterSet(e.pps,u.data,e.vps)}break;case 35:l=!0,e.audFound=!0,(p=s)!=null&&p.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:l=!1;break}s&&l&&s.units.push(u)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&e[r]===3&&e[r-1]===0&&e[r-2]===0||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new Ws(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const n=t.readBits(3),r=t.readBoolean();return{numTemporalLayers:n+1,temporalIdNested:r}}readSPS(e){const t=new Ws(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),l=t.readUByte(),c=t.readUByte(),u=t.readUByte(),d=t.readUByte(),p=t.readUByte(),_=t.readUByte(),w=t.readUByte(),T=t.readUByte(),j=t.readUByte(),z=t.readUByte(),ce=t.readUByte(),Oe=[],we=[];for(let Mr=0;Mr<n;Mr++)Oe.push(t.readBoolean()),we.push(t.readBoolean());if(n>0)for(let Mr=n;Mr<8;Mr++)t.readBits(2);for(let Mr=0;Mr<n;Mr++)Oe[Mr]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),we[Mr]&&t.readUByte();t.readUEG();const it=t.readUEG();it==3&&t.skipBits(1);const Et=t.readUEG(),$t=t.readUEG(),ht=t.readBoolean();let Dt=0,kt=0,pt=0,en=0;ht&&(Dt+=t.readUEG(),kt+=t.readUEG(),pt+=t.readUEG(),en+=t.readUEG());const Zn=t.readUEG(),ar=t.readUEG(),pr=t.readUEG(),or=t.readBoolean();for(let Mr=or?0:n;Mr<=n;Mr++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(let bi=0;bi<4;bi++)for(let Pi=0;Pi<(bi===3?2:6);Pi++)if(!t.readBoolean())t.readUEG();else{const zi=Math.min(64,1<<4+(bi<<1));bi>1&&t.readEG();for(let Bs=0;Bs<zi;Bs++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const Xn=t.readUEG();let cr=0;for(let Mr=0;Mr<Xn;Mr++){let bi=!1;if(Mr!==0&&(bi=t.readBoolean()),bi){Mr===Xn&&t.readUEG(),t.readBoolean(),t.readUEG();let Pi=0;for(let As=0;As<=cr;As++){const zi=t.readBoolean();let Bs=!1;zi||(Bs=t.readBoolean()),(zi||Bs)&&Pi++}cr=Pi}else{const Pi=t.readUEG(),As=t.readUEG();cr=Pi+As;for(let zi=0;zi<Pi;zi++)t.readUEG(),t.readBoolean();for(let zi=0;zi<As;zi++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const Mr=t.readUEG();for(let bi=0;bi<Mr;bi++){for(let Pi=0;Pi<pr+4;Pi++)t.readBits(1);t.readBits(1)}}let Un=0,Kn=1,Ir=1,Ur=!0,kr=1,Or=0;t.readBoolean(),t.readBoolean();let Ei=!1;if(t.readBoolean()){if(t.readBoolean()){const Ts=t.readUByte(),Sl=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],xa=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Ts>0&&Ts<16?(Kn=Sl[Ts-1],Ir=xa[Ts-1]):Ts===255&&(Kn=t.readBits(16),Ir=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),Ei=t.readBoolean(),Ei&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(kr=t.readBits(32),Or=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const xa=t.readBoolean(),wl=t.readBoolean();let Js=!1;(xa||wl)&&(Js=t.readBoolean(),Js&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),Js&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let Al=0;Al<=n;Al++){Ur=t.readBoolean();const Of=Ur||t.readBoolean();let Tl=!1;Of?t.readEG():Tl=t.readBoolean();const Dl=Tl?1:t.readUEG()+1;if(xa)for(let qs=0;qs<Dl;qs++)t.readUEG(),t.readUEG(),Js&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(wl)for(let qs=0;qs<Dl;qs++)t.readUEG(),t.readUEG(),Js&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Un=t.readUEG())}let ki=Et,Qi=$t;if(ht){let Mr=1,bi=1;it===1?Mr=bi=2:it==2&&(Mr=2),ki=Et-Mr*kt-Mr*Dt,Qi=$t-bi*en-bi*pt}const ws=r?["A","B","C"][r]:"",Pf=l<<24|c<<16|u<<8|d;let so=0;for(let Mr=0;Mr<32;Mr++)so=(so|(Pf>>Mr&1)<<31-Mr)>>>0;let ao=so.toString(16);return s===1&&ao==="2"&&(ao="6"),{codecString:`hvc1.${ws}${s}.${ao}.${i?"H":"L"}${ce}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[l,c,u,d],general_constraint_indicator_flags:[p,_,w,T,j,z],general_level_idc:ce,bit_depth:Zn+8,bit_depth_luma_minus8:Zn,bit_depth_chroma_minus8:ar,min_spatial_segmentation_idc:Un,chroma_format_idc:it,frame_rate:{fixed:Ur,fps:Or/kr}},width:ki,height:Qi,pixelRatio:[Kn,Ir]}}readPPS(e){const t=new Ws(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const r=t.readBoolean(),i=t.readBoolean();let s=1;return i&&r?s=0:i?s=3:r&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const pi=188;class hs{constructor(e,t,n,r){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.videoParser=null}static probe(e,t){const n=hs.syncOffset(e);return n>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`),n!==-1}static syncOffset(e){const t=e.length;let n=Math.min(pi*5,t-pi)+1,r=0;for(;r<n;){let i=!1,s=-1,l=0;for(let c=r;c<t;c+=pi)if(e[c]===71&&(t-c===pi||e[c+pi]===71)){if(l++,s===-1&&(s=c,s!==0&&(n=Math.min(s+pi*99,e.length-pi)+1)),i||(i=Da(e,c)===0),i&&l>1&&(s===0&&l>2||c+pi>n))return s}else{if(l)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:Tt[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=hs.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=hs.createTrack("audio",r),this._id3Track=hs.createTrack("id3"),this._txtTrack=hs.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){n||(this.sampleAes=null);let i;const s=this._videoTrack,l=this._audioTrack,c=this._id3Track,u=this._txtTrack;let d=s.pid,p=s.pesData,_=l.pid,w=c.pid,T=l.pesData,j=c.pesData,z=null,ce=this.pmtParsed,Oe=this._pmtId,we=e.length;if(this.remainderData&&(e=Te(this.remainderData,e),we=e.length,this.remainderData=null),we<pi&&!r)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:c,textTrack:u};const it=Math.max(0,hs.syncOffset(e));we-=(we-it)%pi,we<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,we,e.buffer.byteLength-we));let Et=0;for(let ht=it;ht<we;ht+=pi)if(e[ht]===71){const Dt=!!(e[ht+1]&64),kt=Da(e,ht),pt=(e[ht+3]&48)>>4;let en;if(pt>1){if(en=ht+5+e[ht+4],en===ht+pi)continue}else en=ht+4;switch(kt){case d:Dt&&(p&&(i=ks(p,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,u,i,!1)),p={data:[],size:0}),p&&(p.data.push(e.subarray(en,ht+pi)),p.size+=ht+pi-en);break;case _:if(Dt){if(T&&(i=ks(T,this.logger)))switch(l.segmentCodec){case"aac":this.parseAACPES(l,i);break;case"mp3":this.parseMPEGPES(l,i);break;case"ac3":this.parseAC3PES(l,i);break}T={data:[],size:0}}T&&(T.data.push(e.subarray(en,ht+pi)),T.size+=ht+pi-en);break;case w:Dt&&(j&&(i=ks(j,this.logger))&&this.parseID3PES(c,i),j={data:[],size:0}),j&&(j.data.push(e.subarray(en,ht+pi)),j.size+=ht+pi-en);break;case 0:Dt&&(en+=e[en]+1),Oe=this._pmtId=tu(e,en);break;case Oe:{Dt&&(en+=e[en]+1);const Zn=nu(e,en,this.typeSupported,n,this.observer,this.logger);d=Zn.videoPid,d>0&&(s.pid=d,s.segmentCodec=Zn.segmentVideoCodec),_=Zn.audioPid,_>0&&(l.pid=_,l.segmentCodec=Zn.segmentAudioCodec),w=Zn.id3Pid,w>0&&(c.pid=w),z!==null&&!ce&&(this.logger.warn(`MPEG-TS PMT found at ${ht} after unknown PID '${z}'. Backtracking to sync byte @${it} to parse all TS packets.`),z=null,ht=it-188),ce=this.pmtParsed=!0;break}case 17:case 8191:break;default:z=kt;break}}else Et++;Et>0&&Ca(this.observer,new Error(`Found ${Et} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=p,l.pesData=T,c.pesData=j;const $t={audioTrack:l,videoTrack:s,id3Track:c,textTrack:u};return r&&this.extractRemainingSamples($t),$t}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:r,textTrack:i}=e,s=n.pesData,l=t.pesData,c=r.pesData;let u;if(s&&(u=ks(s,this.logger))?(this.readyVideoParser(n.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(n,i,u,!0),n.pesData=null)):n.pesData=s,l&&(u=ks(l,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,u);break;case"mp3":this.parseMPEGPES(t,u);break;case"ac3":this.parseAC3PES(t,u);break}t.pesData=null}else l!=null&&l.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=l;c&&(u=ks(c,this.logger))?(this.parseID3PES(r,u),r.pesData=null):r.pesData=c}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new Jl(this.observer,this.config,t);return this.decrypt(r,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new ql:e==="hevc"&&(this.videoParser=new eu))}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:i}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{n(e)}):n(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let i=t.data;if(r){this.aacOverFlow=null;const p=r.missing,_=r.sample.unit.byteLength;if(p===-1)i=Te(r.sample.unit,i);else{const w=_-p;r.sample.unit.set(i.subarray(0,p),w),e.samples.push(r.sample),n=r.missing}}let s,l;for(s=n,l=i.length;s<l-1&&!Ls(i,s);s++);if(s!==n){let p;const _=s<l-1;if(_?p=`AAC PES did not start with ADTS header,offset:${s}`:p="No ADTS header found in AAC PES",Ca(this.observer,new Error(p),_,this.logger),!_)return}li(e,this.observer,i,s,this.audioCodec);let c;if(t.pts!==void 0)c=t.pts;else if(r){const p=xi(e.samplerate);c=r.sample.pts+p}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let u=0,d;for(;s<l;)if(d=ss(e,i,s,c,u),s+=d.length,d.missing){this.aacOverFlow=d;break}else for(u++;s<l-1&&!Ls(i,s);s++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let i=0,s=0;const l=t.pts;if(l===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<r;)if(fo(n,s)){const c=uo(e,n,s,l,i);if(c)s+=c.length,i++;else break}else s++}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(r===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=n.length;let s=0,l=0,c;for(;l<i&&(c=mo(e,n,l,r,s++))>0;)l+=c}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=h({},t,{type:this._videoTrack?Ci.emsg:Ci.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function Da(a,e){return((a[e+1]&31)<<8)+a[e+2]}function tu(a,e){return(a[e+10]&31)<<8|a[e+11]}function nu(a,e,t,n,r,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},l=(a[e+1]&15)<<8|a[e+2],c=e+3+l-4,u=(a[e+10]&15)<<8|a[e+11];for(e+=12+u;e<c;){const d=Da(a,e),p=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){Ra("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=d);break;case 21:s.id3Pid===-1&&(s.id3Pid=d);break;case 219:if(!n){Ra("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=d);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=d,s.segmentAudioCodec="mp3");break;case 193:if(!n){Ra("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=d,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&p>0){let _=e+5,w=p;for(;w>2;){switch(a[_]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=d,s.segmentAudioCodec="ac3");break}const j=a[_+1]+2;_+=j,w-=j}}break;case 194:case 135:return Ca(r,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=d,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=p+5}return s}function Ca(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(f.ERROR,f.ERROR,{type:te.MEDIA_ERROR,details:M.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function Ra(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function ks(a,e){let t=0,n,r,i,s,l;const c=a.data;if(!a||a.size===0)return null;for(;c[0].length<19&&c.length>1;)c[0]=Te(c[0],c[1]),c.splice(1,1);if(n=c[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(r=(n[4]<<8)+n[5],r&&r>a.size-6)return null;const d=n[7];d&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,d&64?(l=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,s-l>60*9e4&&(e.warn(`${Math.round((s-l)/9e4)}s delta between PTS and DTS, align them`),s=l)):l=s),i=n[8];let p=i+9;if(a.size<=p)return null;a.size-=p;const _=new Uint8Array(a.size);for(let w=0,T=c.length;w<T;w++){n=c[w];let j=n.byteLength;if(p)if(p>j){p-=j;continue}else n=n.subarray(p),j-=p,p=0;_.set(n,t),t+=j}return r&&(r-=i+3),{data:_,pts:s,dts:l,len:r}}return null}class ru{static getSilentFrame(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const ps=Math.pow(2,32)-1;class bt{static init(){bt.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in bt.types)bt.types.hasOwnProperty(e)&&(bt.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);bt.HDLR_TYPES={video:t,audio:n};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i=new Uint8Array([0,0,0,0,0,0,0,0]);bt.STTS=bt.STSC=bt.STCO=i,bt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),bt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),bt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),bt.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),l=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);bt.FTYP=bt.box(bt.types.ftyp,s,c,s,l),bt.DINF=bt.box(bt.types.dinf,bt.box(bt.types.dref,r))}static box(e,...t){let n=8,r=t.length;const i=r;for(;r--;)n+=t[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(e,4),r=0,n=8;r<i;r++)s.set(t[r],n),n+=t[r].byteLength;return s}static hdlr(e){return bt.box(bt.types.hdlr,bt.HDLR_TYPES[e])}static mdat(e){return bt.box(bt.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(ps+1)),r=Math.floor(t%(ps+1));return bt.box(bt.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))}static mdia(e){return bt.box(bt.types.mdia,bt.mdhd(e.timescale||0,e.duration||0),bt.hdlr(e.type),bt.minf(e))}static mfhd(e){return bt.box(bt.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?bt.box(bt.types.minf,bt.box(bt.types.smhd,bt.SMHD),bt.DINF,bt.stbl(e)):bt.box(bt.types.minf,bt.box(bt.types.vmhd,bt.VMHD),bt.DINF,bt.stbl(e))}static moof(e,t,n){return bt.box(bt.types.moof,bt.mfhd(e),bt.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=bt.trak(e[t]);return bt.box.apply(null,[bt.types.moov,bt.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(bt.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=bt.trex(e[t]);return bt.box.apply(null,[bt.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(ps+1)),r=Math.floor(t%(ps+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return bt.box(bt.types.mvhd,i)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,i;for(r=0;r<t.length;r++)i=t[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return bt.box(bt.types.sdtp,n)}static stbl(e){return bt.box(bt.types.stbl,bt.stsd(e),bt.box(bt.types.stts,bt.STTS),bt.box(bt.types.stsc,bt.STSC),bt.box(bt.types.stsz,bt.STSZ),bt.box(bt.types.stco,bt.STCO))}static avc1(e){let t=[],n=[],r,i,s;for(r=0;r<e.sps.length;r++)i=e.sps[r],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)i=e.pps[r],s=i.byteLength,n.push(s>>>8&255),n.push(s&255),n=n.concat(Array.prototype.slice.call(i));const l=bt.box(bt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),c=e.width,u=e.height,d=e.pixelRatio[0],p=e.pixelRatio[1];return bt.box(bt.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,c>>8&255,c&255,u>>8&255,u&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,bt.box(bt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),bt.box(bt.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,d&255,p>>24,p>>16&255,p>>8&255,p&255])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return bt.box(bt.types.mp4a,bt.audioStsd(e),bt.box(bt.types.esds,bt.esds(e)))}static mp3(e){return bt.box(bt.types[".mp3"],bt.audioStsd(e))}static ac3(e){return bt.box(bt.types["ac-3"],bt.audioStsd(e),bt.box(bt.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return bt.box(bt.types.stsd,bt.STSD,bt.mp4a(e));if(t==="ac3"&&e.config)return bt.box(bt.types.stsd,bt.STSD,bt.ac3(e));if(t==="mp3"&&e.codec==="mp3")return bt.box(bt.types.stsd,bt.STSD,bt.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return bt.box(bt.types.stsd,bt.STSD,bt.avc1(e));if(t==="hevc"&&e.vps)return bt.box(bt.types.stsd,bt.STSD,bt.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),r=e.width||0,i=e.height||0,s=Math.floor(n/(ps+1)),l=Math.floor(n%(ps+1));return bt.box(bt.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const n=bt.sdtp(e),r=e.id,i=Math.floor(t/(ps+1)),s=Math.floor(t%(ps+1));return bt.box(bt.types.traf,bt.box(bt.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),bt.box(bt.types.tfdt,new Uint8Array([1,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255])),bt.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,bt.box(bt.types.trak,bt.tkhd(e),bt.mdia(e))}static trex(e){const t=e.id;return bt.box(bt.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],r=n.length,i=12+16*r,s=new Uint8Array(i);let l,c,u,d,p,_;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),l=0;l<r;l++)c=n[l],u=c.duration,d=c.size,p=c.flags,_=c.cts,s.set([u>>>24&255,u>>>16&255,u>>>8&255,u&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,p.isLeading<<2|p.dependsOn,p.isDependedOn<<6|p.hasRedundancy<<4|p.paddingValue<<1|p.isNonSync,p.degradPrio&61440,p.degradPrio&15,_>>>24&255,_>>>16&255,_>>>8&255,_&255],12+16*l);return bt.box(bt.types.trun,s)}static initSegment(e){bt.types||bt.init();const t=bt.moov(e);return Te(bt.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=4,i=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),r-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let s=i.length;for(let T=0;T<n.length;T+=1){s+=3;for(let j=0;j<n[T].length;j+=1)s+=2+n[T][j].length}const l=new Uint8Array(s);l.set(i,0),s=i.length;const c=n.length-1;for(let T=0;T<n.length;T+=1){l.set(new Uint8Array([32+T|(T===c?128:0),0,n[T].length]),s),s+=3;for(let j=0;j<n[T].length;j+=1)l.set(new Uint8Array([n[T][j].length>>8,n[T][j].length&255]),s),s+=2,l.set(n[T][j],s),s+=n[T][j].length}const u=bt.box(bt.types.hvcC,l),d=e.width,p=e.height,_=e.pixelRatio[0],w=e.pixelRatio[1];return bt.box(bt.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,d>>8&255,d&255,p>>8&255,p&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u,bt.box(bt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),bt.box(bt.types.pasp,new Uint8Array([_>>24,_>>16&255,_>>8&255,_&255,w>>24,w>>16&255,w>>8&255,w&255])))}}bt.types=void 0,bt.HDLR_TYPES=void 0,bt.STTS=void 0,bt.STSC=void 0,bt.STCO=void 0,bt.STSZ=void 0,bt.VMHD=void 0,bt.SMHD=void 0,bt.STSD=void 0,bt.FTYP=void 0,bt.DINF=void 0;const _o=9e4;function Ia(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function iu(a,e,t=1,n=!1){return Ia(a,e,1/t,n)}function js(a,e=!1){return Ia(a,1e3,1/_o,e)}function su(a,e=1){return Ia(a,_o,1/e)}const au=10*1e3,ou=1024,lu=1152,uu=1536;let Ps=null,La=null;function yo(a,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class oa extends B{constructor(e,t,n,r){if(super("mp4-remuxer",r),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextVideoTs=null,this.nextAudioTs=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,Ps===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Ps=s?parseInt(s[1]):0}if(La===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);La=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.log("initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e[0].pts,r=e.reduce((i,s)=>{let l=s.pts,c=l-i;return c<-4294967296&&(t=!0,l=Li(l,n),c=l-i),c>0?i:l},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,l,c){let u,d,p,_,w,T,j=i,z=i;const ce=e.pid>-1,Oe=t.pid>-1,we=t.samples.length,it=e.samples.length>0,Et=l&&we>0||we>1;if((!ce||it)&&(!Oe||Et)||this.ISGenerated||l){if(this.ISGenerated){var ht,Dt,kt,pt;const pr=this.videoTrackConfig;(pr&&(t.width!==pr.width||t.height!==pr.height||((ht=t.pixelRatio)==null?void 0:ht[0])!==((Dt=pr.pixelRatio)==null?void 0:Dt[0])||((kt=t.pixelRatio)==null?void 0:kt[1])!==((pt=pr.pixelRatio)==null?void 0:pt[1]))||!pr&&Et||this.nextAudioTs===null&&it)&&this.resetInitSegment()}this.ISGenerated||(p=this.generateIS(e,t,i,s));const en=this.isVideoContiguous;let Zn=-1,ar;if(Et&&(Zn=cu(t.samples),!en&&this.config.forceKeyFrameOnDiscontinuity))if(T=!0,Zn>0){this.warn(`Dropped ${Zn} out of ${we} video samples due to a missing keyframe`);const pr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Zn),t.dropped+=Zn,z+=(t.samples[0].pts-pr)/t.inputTimeScale,ar=z}else Zn===-1&&(this.warn(`No keyframe found out of ${we} video samples`),T=!1);if(this.ISGenerated){if(it&&Et){const pr=this.getVideoStartPts(t.samples),Fn=(Li(e.samples[0].pts,pr)-pr)/t.inputTimeScale;j+=Math.max(0,Fn),z+=Math.max(0,-Fn)}if(it){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),p=this.generateIS(e,t,i,s)),d=this.remuxAudio(e,j,this.isAudioContiguous,s,Oe||Et||c===Q.AUDIO?z:void 0),Et){const pr=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),p=this.generateIS(e,t,i,s)),u=this.remuxVideo(t,z,en,pr)}}else Et&&(u=this.remuxVideo(t,z,en,0));u&&(u.firstKeyFrame=Zn,u.independent=Zn!==-1,u.firstKeyFramePTS=ar)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(w=Eo(n,i,this._initPTS,this._initDTS)),r.samples.length&&(_=bo(r,i,this._initPTS))),{audio:d,video:u,initSegment:p,independent:T,text:_,id3:w}}generateIS(e,t,n,r){const i=e.samples,s=t.samples,l=this.typeSupported,c={},u=this._initPTS;let d=!u||r,p="audio/mp4",_,w,T,j=-1;if(d&&(_=w=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":l.mpeg?(p="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}c.audio={id:"audio",container:p,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):bt.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(j=e.id,T=e.inputTimeScale,!u||T!==u.timescale?_=w=i[0].pts-Math.round(T*n):d=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,c.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:bt.initSegment([t]),metadata:{width:t.width,height:t.height}},d)if(j=t.id,T=t.inputTimeScale,!u||T!==u.timescale){const z=this.getVideoStartPts(s),ce=Math.round(T*n);w=Math.min(w,Li(s[0].dts,z)-ce),_=Math.min(_,z-ce)}else d=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(c).length)return this.ISGenerated=!0,d?(u&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${_/T} != initPTS: ${u.baseTime/u.timescale} (${u.baseTime}/${u.timescale}) trackId: ${u.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${_/T} (${_}/${T}) trackId: ${j}`),this._initPTS={baseTime:_,timescale:T,trackId:j},this._initDTS={baseTime:w,timescale:T,trackId:j}):_=T=void 0,{tracks:c,initPTS:_,timescale:T,trackId:j}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,l=[],c=s.length,u=this._initPTS,d=u.baseTime*i/u.timescale;let p=this.nextVideoTs,_=8,w=this.videoSampleDuration,T,j,z=Number.POSITIVE_INFINITY,ce=Number.NEGATIVE_INFINITY,Oe=!1;if(!n||p===null){const Un=d+t*i,Kn=s[0].pts-Li(s[0].dts,s[0].pts);Ps&&p!==null&&Math.abs(Un-Kn-(p+d))<15e3?n=!0:p=Un-Kn-d}const we=p+d;for(let Un=0;Un<c;Un++){const Kn=s[Un];Kn.pts=Li(Kn.pts,we),Kn.dts=Li(Kn.dts,we),Kn.dts<s[Un>0?Un-1:Un].dts&&(Oe=!0)}Oe&&s.sort(function(Un,Kn){const Ir=Un.dts-Kn.dts,Ur=Un.pts-Kn.pts;return Ir||Ur}),T=s[0].dts,j=s[s.length-1].dts;const it=j-T,Et=it?Math.round(it/(c-1)):w||e.inputTimeScale/30;if(n){const Un=T-we,Kn=Un>Et,Ir=Un<-1;if((Kn||Ir)&&(Kn?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${js(Un,!0)} ms (${Un}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${js(-Un,!0)} ms (${Un}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Ir||we>=s[0].pts||Ps)){T=we;const Ur=s[0].pts-Un;if(Kn)s[0].dts=T,s[0].pts=Ur;else{let kr=!0;for(let Or=0;Or<s.length&&!(s[Or].dts>Ur&&kr);Or++){const Ei=s[Or].pts;if(s[Or].dts-=Un,s[Or].pts-=Un,Or<s.length-1){const vi=s[Or+1].pts,ki=s[Or].pts,Qi=vi<=ki,ws=vi<=Ei;kr=Qi==ws}}}this.log(`Video: Initial PTS/DTS adjusted: ${js(Ur,!0)}/${js(T,!0)}, delta: ${js(Un,!0)} ms`)}}T=Math.max(0,T);let $t=0,ht=0,Dt=T;for(let Un=0;Un<c;Un++){const Kn=s[Un],Ir=Kn.units,Ur=Ir.length;let kr=0;for(let Or=0;Or<Ur;Or++)kr+=Ir[Or].data.length;ht+=kr,$t+=Ur,Kn.length=kr,Kn.dts<Dt?(Kn.dts=Dt,Dt+=Et/4|0||1):Dt=Kn.dts,z=Math.min(Kn.pts,z),ce=Math.max(Kn.pts,ce)}j=s[c-1].dts;const kt=ht+4*$t+8;let pt;try{pt=new Uint8Array(kt)}catch(Un){this.observer.emit(f.ERROR,f.ERROR,{type:te.MUX_ERROR,details:M.REMUX_ALLOC_ERROR,fatal:!1,error:Un,bytes:kt,reason:`fail allocating video mdat ${kt}`});return}const en=new DataView(pt.buffer);en.setUint32(0,kt),pt.set(bt.types.mdat,4);let Zn=!1,ar=Number.POSITIVE_INFINITY,pr=Number.POSITIVE_INFINITY,or=Number.NEGATIVE_INFINITY,Fn=Number.NEGATIVE_INFINITY;for(let Un=0;Un<c;Un++){const Kn=s[Un],Ir=Kn.units;let Ur=0;for(let Ei=0,vi=Ir.length;Ei<vi;Ei++){const ki=Ir[Ei],Qi=ki.data,ws=ki.data.byteLength;en.setUint32(_,ws),_+=4,pt.set(Qi,_),_+=ws,Ur+=4+ws}let kr;if(Un<c-1)w=s[Un+1].dts-Kn.dts,kr=s[Un+1].pts-Kn.pts;else{const Ei=this.config,vi=Un>0?Kn.dts-s[Un-1].dts:Et;if(kr=Un>0?Kn.pts-s[Un-1].pts:Et,Ei.stretchShortVideoTrack&&this.nextAudioTs!==null){const ki=Math.floor(Ei.maxBufferHole*i),Qi=(r?z+r*i:this.nextAudioTs+d)-Kn.pts;Qi>ki?(w=Qi-vi,w<0?w=vi:Zn=!0,this.log(`It is approximately ${Qi/90} ms to the next segment; using duration ${w/90} ms for the last video frame.`)):w=vi}else w=vi}const Or=Math.round(Kn.pts-Kn.dts);ar=Math.min(ar,w),or=Math.max(or,w),pr=Math.min(pr,kr),Fn=Math.max(Fn,kr),l.push(yo(Kn.key,w,Ur,Or))}if(l.length){if(Ps){if(Ps<70){const Un=l[0].flags;Un.dependsOn=2,Un.isNonSync=0}}else if(La&&Fn-pr<or-ar&&Et/or<.025&&l[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Un=T;for(let Kn=0,Ir=l.length;Kn<Ir;Kn++){const Ur=Un+l[Kn].duration,kr=Un+l[Kn].cts;if(Kn<Ir-1){const Or=Ur+l[Kn+1].cts;l[Kn].duration=Or-kr}else l[Kn].duration=Kn?l[Kn-1].duration:Et;l[Kn].cts=0,Un=Ur}}}w=Zn||!w?Et:w;const ur=j+w;this.nextVideoTs=p=ur-d,this.videoSampleDuration=w,this.isVideoContiguous=!0;const Sr={data1:bt.moof(e.sequenceNumber++,T,h(e,{samples:l})),data2:pt,startPTS:(z-d)/i,endPTS:(ce+w-d)/i,startDTS:(T-d)/i,endDTS:p/i,type:"video",hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Sr}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return lu;case"ac3":return uu;default:return ou}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,l=e.samplerate?e.samplerate:s,c=s/l,u=this.getSamplesPerFrame(e),d=u*c,p=this._initPTS,_=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,w=[],T=i!==void 0;let j=e.samples,z=_?0:8,ce=this.nextAudioTs||-1;const Oe=p.baseTime*s/p.timescale,we=Oe+t*s;if(this.isAudioContiguous=n=n||j.length&&ce>0&&(r&&Math.abs(we-(ce+Oe))<9e3||Math.abs(Li(j[0].pts,we)-(ce+Oe))<20*d),j.forEach(function(Fn){Fn.pts=Li(Fn.pts,we)}),!n||ce<0){if(j=j.filter(Fn=>Fn.pts>=0),!j.length)return;i===0?ce=0:r&&!T?ce=Math.max(0,we-Oe):ce=j[0].pts-Oe}if(e.segmentCodec==="aac"){const Fn=this.config.maxAudioFramesDrift;for(let ur=0,Xn=ce+Oe;ur<j.length;ur++){const cr=j[ur],Sr=cr.pts,Un=Sr-Xn,Kn=Math.abs(1e3*Un/s);if(Un<=-Fn*d&&T)ur===0&&(this.warn(`Audio frame @ ${(Sr/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*Un/s)} ms.`),this.nextAudioTs=ce=Sr-Oe,Xn=Sr);else if(Un>=Fn*d&&Kn<au&&T){let Ir=Math.round(Un/d);for(Xn=Sr-Ir*d;Xn<0&&Ir&&d;)Ir--,Xn+=d;ur===0&&(this.nextAudioTs=ce=Xn-Oe),this.warn(`Injecting ${Ir} audio frames @ ${((Xn-Oe)/s).toFixed(3)}s due to ${Math.round(1e3*Un/s)} ms gap.`);for(let Ur=0;Ur<Ir;Ur++){let kr=ru.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);kr||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),kr=cr.unit.subarray()),j.splice(ur,0,{unit:kr,pts:Xn}),Xn+=d,ur++}}cr.pts=Xn,Xn+=d}}let it=null,Et=null,$t,ht=0,Dt=j.length;for(;Dt--;)ht+=j[Dt].unit.byteLength;for(let Fn=0,ur=j.length;Fn<ur;Fn++){const Xn=j[Fn],cr=Xn.unit;let Sr=Xn.pts;if(Et!==null){const Kn=w[Fn-1];Kn.duration=Math.round((Sr-Et)/c)}else if(n&&e.segmentCodec==="aac"&&(Sr=ce+Oe),it=Sr,ht>0){ht+=z;try{$t=new Uint8Array(ht)}catch(Kn){this.observer.emit(f.ERROR,f.ERROR,{type:te.MUX_ERROR,details:M.REMUX_ALLOC_ERROR,fatal:!1,error:Kn,bytes:ht,reason:`fail allocating audio mdat ${ht}`});return}_||(new DataView($t.buffer).setUint32(0,ht),$t.set(bt.types.mdat,4))}else return;$t.set(cr,z);const Un=cr.byteLength;z+=Un,w.push(yo(!0,u,Un,0)),Et=Sr}const kt=w.length;if(!kt)return;const pt=w[w.length-1];ce=Et-Oe,this.nextAudioTs=ce+c*pt.duration;const en=_?new Uint8Array(0):bt.moof(e.sequenceNumber++,it/c,h({},e,{samples:w}));e.samples=[];const Zn=(it-Oe)/s,ar=ce/s,or={data1:en,data2:$t,startPTS:Zn,endPTS:ar,startDTS:Zn,endDTS:ar,type:"audio",hasAudio:!0,hasVideo:!1,nb:kt};return this.isAudioContiguous=!0,or}}function Li(a,e){let t;if(e===null)return a;for(e<a?t=-8589934592:t=8589934592;Math.abs(a-e)>4294967296;)a+=t;return a}function cu(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function Eo(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let l=0;l<r;l++){const c=a.samples[l];c.pts=Li(c.pts-t.baseTime*i/t.timescale,e*i)/i,c.dts=Li(c.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function bo(a,e,t){const n=a.samples.length;if(!n)return;const r=a.inputTimeScale;for(let s=0;s<n;s++){const l=a.samples[s];l.pts=Li(l.pts-t.baseTime*r/t.timescale,e*r)/r}a.samples.sort((s,l)=>s.pts-l.pts);const i=a.samples;return a.samples=[],{samples:i}}class fu extends B{constructor(e,t,n,r){super("passthrough-remuxer",r),this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e,r),this.emitInitSegment=!0}generateInitSegment(e,t){let{audioCodec:n,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const{audio:i,video:s}=this.initData=Se(e);if(t)le(e,t);else{const c=i||s;c!=null&&c.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${c.codec}")!`)}i&&(n=xo(i,F.AUDIO,this)),s&&(r=xo(s,F.VIDEO,this));const l={};i&&s?l.audiovideo={container:"video/mp4",codec:n+","+r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?l.audio={container:"audio/mp4",codec:n,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?l.video={container:"video/mp4",codec:r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=l}remux(e,t,n,r,i,s){var l,c;let{initPTS:u,lastEndTime:d}=this;const p={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};x(d)||(d=this.lastEndTime=i||0);const _=t.samples;if(!_.length)return p;const w={initPTS:void 0,timescale:void 0,trackId:void 0};let T=this.initData;if((l=T)!=null&&l.length||(this.generateInitSegment(_),T=this.initData),!((c=T)!=null&&c.length))return this.warn("Failed to generate initSegment."),p;this.emitInitSegment&&(w.tracks=this.initTracks,this.emitInitSegment=!1);const j=Ae(_,T,this),z=T.audio?j[T.audio.id]:null,ce=T.video?j[T.video.id]:null,Oe=la(ce,1/0),we=la(z,1/0),it=la(ce,0,!0),Et=la(z,0,!0);let $t=i,ht=0;const Dt=z&&(!ce||!u&&we<Oe||u&&u.trackId===T.audio.id),kt=Dt?z:ce;if(kt){const Xn=kt.timescale,cr=kt.start-i*Xn,Sr=Dt?T.audio.id:T.video.id;$t=kt.start/Xn,ht=Dt?Et-we:it-Oe,(s||!u)&&(du(u,$t,i,ht)||Xn!==u.timescale)&&(u&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${cr/Xn} != initPTS: ${u.baseTime/u.timescale} (${u.baseTime}/${u.timescale}) trackId: ${u.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${$t-i} (${cr}/${Xn}) trackId: ${Sr}`),u=null,w.initPTS=cr,w.timescale=Xn,w.trackId=Sr)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);u?(w.initPTS=u.baseTime,w.timescale=u.timescale,w.trackId=u.trackId):((!w.timescale||w.trackId===void 0||w.initPTS===void 0)&&(this.warn("Could not set initPTS"),w.initPTS=$t,w.timescale=1,w.trackId=-1),this.initPTS=u={baseTime:w.initPTS,timescale:w.timescale,trackId:w.trackId});const pt=$t-u.baseTime/u.timescale,en=pt+ht;ht>0?this.lastEndTime=en:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const Zn=!!T.audio,ar=!!T.video;let pr="";Zn&&(pr+="audio"),ar&&(pr+="video");const or=(T.audio?T.audio.encrypted:!1)||(T.video?T.video.encrypted:!1),Fn={data1:_,startPTS:pt,startDTS:pt,endPTS:en,endDTS:en,type:pr,hasAudio:Zn,hasVideo:ar,nb:1,dropped:0,encrypted:or};p.audio=Zn&&!ar?Fn:void 0,p.video=ar?Fn:void 0;const ur=ce==null?void 0:ce.sampleCount;if(ur){const Xn=ce.keyFrameIndex,cr=Xn!==-1;Fn.nb=ur,Fn.dropped=Xn===0||this.isVideoContiguous?0:cr?Xn:ur,Fn.independent=cr,Fn.firstKeyFrame=Xn,cr&&ce.keyFrameStart&&(Fn.firstKeyFramePTS=(ce.keyFrameStart-u.baseTime)/u.timescale),this.isVideoContiguous||(p.independent=cr),this.isVideoContiguous||(this.isVideoContiguous=cr),Fn.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${Xn}/${ur} dropped: ${Fn.dropped} start: ${Fn.firstKeyFramePTS||"NA"}`)}return p.initSegment=w,p.id3=Eo(n,i,u,u),r.samples.length&&(p.text=bo(r,i,u)),p}}function la(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function du(a,e,t,n){if(a===null)return!0;const r=Math.max(n,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>r}function xo(a,e,t){const n=a.codec;return n&&n.length>4?n:e===F.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?me(n,!1):(t.warn(`Unhandled audio codec "${n}" in mp4 MAP`),n||"mp4a"):(t.warn(`Unhandled video codec "${n}" in mp4 MAP`),n||"avc1")}let us;try{us=self.performance.now.bind(self.performance)}catch(a){us=Date.now}const ua=[{demux:Ql,remux:fu},{demux:hs,remux:oa},{demux:Wl,remux:oa},{demux:Yl,remux:oa}];ua.splice(2,0,{demux:jl,remux:oa});class So{constructor(e,t,n,r,i,s){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const i=n.transmuxing;i.executeStart=us();let s=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:c}=this;r&&(this.currentTransmuxState=r);const{contiguous:u,discontinuity:d,trackSwitch:p,accurateTimeOffset:_,timeOffset:w,initSegmentChange:T}=r||l,{audioCodec:j,videoCodec:z,defaultInitPts:ce,duration:Oe,initSegmentData:we}=c,it=hu(s,t);if(it&&Nr(it.method)){const Dt=this.getDecrypter(),kt=Er(it.method);if(Dt.isSync()){let pt=Dt.softwareDecrypt(s,it.key.buffer,it.iv.buffer,kt);if(n.part>-1){const Zn=Dt.flush();pt=Zn&&Zn.buffer}if(!pt)return i.executeEnd=us(),ka(n);s=new Uint8Array(pt)}else return this.asyncResult=!0,this.decryptionPromise=Dt.webCryptoDecrypt(s,it.key.buffer,it.iv.buffer,kt).then(pt=>{const en=this.push(pt,null,n);return this.decryptionPromise=null,en}),this.decryptionPromise}const Et=this.needsProbing(d,p);if(Et){const Dt=this.configureTransmuxer(s);if(Dt)return this.logger.warn(`[transmuxer] ${Dt.message}`),this.observer.emit(f.ERROR,f.ERROR,{type:te.MEDIA_ERROR,details:M.FRAG_PARSING_ERROR,fatal:!1,error:Dt,reason:Dt.message}),i.executeEnd=us(),ka(n)}(d||p||T||Et)&&this.resetInitSegment(we,j,z,Oe,t),(d||T||Et)&&this.resetInitialTimestamp(ce),u||this.resetContiguity();const $t=this.transmux(s,it,w,_,n);this.asyncResult=Ys($t);const ht=this.currentTransmuxState;return ht.contiguous=!0,ht.discontinuity=!1,ht.trackSwitch=!1,i.executeEnd=us(),$t}flush(e){const t=e.transmuxing;t.executeStart=us();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:l}=r;if(n){const p=n.flush();p&&s.push(this.push(p.buffer,null,e))}const{demuxer:c,remuxer:u}=this;if(!c||!u){t.executeEnd=us();const p=[ka(e)];return this.asyncResult?Promise.resolve(p):p}const d=c.flush(l);return Ys(d)?(this.asyncResult=!0,d.then(p=>(this.flushRemux(s,p,e),s))):(this.flushRemux(s,d,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:l}=t,{accurateTimeOffset:c,timeOffset:u}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===Q.MAIN?"level":"track"} ${n.level}`);const d=this.remuxer.remux(r,i,s,l,u,c,!0,this.id);e.push({remuxResult:d,chunkMeta:n}),n.transmuxing.executeEnd=us()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,r,i){const{demuxer:s,remuxer:l}=this;!s||!l||(s.resetInitSegment(e,t,n,r),l.resetInitSegment(e,t,n,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,n,r,i):s=this.transmuxUnencrypted(e,n,r,i),s}transmuxUnencrypted(e,t,n,r){const{audioTrack:i,videoTrack:s,id3Track:l,textTrack:c}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,l,c,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,i){return this.demuxer.demuxSampleAes(e,t,n).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,n,r,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let i;for(let p=0,_=ua.length;p<_;p++){var s;if((s=ua[p].demux)!=null&&s.probe(e,this.logger)){i=ua[p];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const l=this.demuxer,c=this.remuxer,u=i.remux,d=i.demux;(!c||!(c instanceof u))&&(this.remuxer=new u(n,t,r,this.logger)),(!l||!(l instanceof d))&&(this.demuxer=new d(n,t,r,this.logger),this.probe=d.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Dn(this.config)),e}}function hu(a,e){let t=null;return a.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const ka=a=>({remuxResult:{},chunkMeta:a});function Ys(a){return"then"in a&&a.then instanceof Function}class pu{constructor(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i||null}}class mu{constructor(e,t,n,r,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=s}}let wo=0;class Ao{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=wo++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=c=>{const u=c.data,d=this.hls;if(!(!d||!(u!=null&&u.event)||u.instanceNo!==this.instanceNo))switch(u.event){case"init":{var p;const _=(p=this.workerContext)==null?void 0:p.objectURL;_&&self.URL.revokeObjectURL(_);break}case"transmuxComplete":{this.handleTransmuxComplete(u.data);break}case"flush":{this.onFlush(u.data);break}case"workerLog":{d.logger[u.data.logType]&&d.logger[u.data.logType](u.data.message);break}default:{u.data=u.data||{},u.data.frag=this.frag,u.data.part=this.part,u.data.id=this.id,d.trigger(u.event,u.data);break}}},this.onWorkerError=c=>{if(!this.hls)return;const u=new Error(`${c.message} (${c.filename}:${c.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(f.ERROR,{type:te.OTHER_ERROR,details:M.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:u})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(c,u)=>{u=u||{},u.frag=this.frag||void 0,c===f.ERROR&&(u=u,u.parent=this.id,u.part=this.part,this.error=u.error),this.hls.trigger(c,u)};this.observer=new Zs,this.observer.on(f.FRAG_DECRYPTED,s),this.observer.on(f.ERROR,s);const l=_t(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const c=this.hls.logger;if(i.workerPath||Cs()){try{i.workerPath?(c.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=$s(i.workerPath)):(c.log(`injecting Web Worker for "${t}"`),this.workerContext=zs());const{worker:d}=this.workerContext;d.addEventListener("message",this.onWorkerMessage),d.addEventListener("error",this.onWorkerError),d.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:l,id:t,config:Vt(i)})}catch(d){c.warn(`Error setting up "${t}" Web Worker, fallback to inline`,d),this.terminateWorker(),this.error=null,this.transmuxer=new So(this.observer,l,i,"",t,e.logger)}return}}this.transmuxer=new So(this.observer,l,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=wo++;const t=this.hls.config,n=_t(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:Vt(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),na(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,n,r,i,s,l,c,u,d){var p,_;u.transmuxing.start=self.performance.now();const{instanceNo:w,transmuxer:T}=this,j=s?s.start:i.start,z=i.decryptdata,ce=this.frag,Oe=!(ce&&i.cc===ce.cc),we=!(ce&&u.level===ce.level),it=ce?u.sn-ce.sn:-1,Et=this.part?u.part-this.part.index:-1,$t=it===0&&u.id>1&&u.id===(ce==null?void 0:ce.stats.chunkCount),ht=!we&&(it===1||it===0&&(Et===1||$t&&Et<=0)),Dt=self.performance.now();(we||it||i.stats.parsing.start===0)&&(i.stats.parsing.start=Dt),s&&(Et||!ht)&&(s.stats.parsing.start=Dt);const kt=!(ce&&((p=i.initSegment)==null?void 0:p.url)===((_=ce.initSegment)==null?void 0:_.url)),pt=new mu(Oe,ht,c,we,j,kt);if(!ht||Oe||kt){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${u.sn}${u.part>-1?" part: "+u.part:""} ${this.id===Q.MAIN?"level":"track"}: ${u.level} id: ${u.id}
discontinuity: ${Oe}
trackSwitch: ${we}
contiguous: ${ht}
accurateTimeOffset: ${c}
timeOffset: ${j}
initSegmentChange: ${kt}`);const en=new pu(n,r,t,l,d);this.configureTransmuxer(en)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:w,cmd:"demux",data:e,decryptdata:z,chunkMeta:u,state:pt},e instanceof ArrayBuffer?[e]:[]);else if(T){const en=T.push(e,z,u,pt);Ys(en)?en.then(Zn=>{this.handleTransmuxComplete(Zn)}).catch(Zn=>{this.transmuxerError(Zn,u,"transmuxer-interface push error")}):this.handleTransmuxComplete(en)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:n}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(n){const r=n.flush(e);Ys(r)?r.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(r,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:n}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):n&&n.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const To=100;class gu extends Bi{constructor(e,t,n){super(e,t,n,"audio-stream-controller",Q.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(f.BUFFER_RESET,this.onBufferReset,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(f.BUFFER_RESET,this.onBufferReset,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){if(n===Q.MAIN){const l=t.cc,c=this.fragCurrent;if(this.initPTS[l]={baseTime:r,timescale:i,trackId:s},this.log(`InitPTS for cc: ${l} found from main: ${r/i} (${r}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===Xt.WAITING_INIT_PTS){const u=this.waitingData;(!u&&!this.loadingParts||u&&u.frag.cc!==l)&&this.syncWithAnchor(t,u==null?void 0:u.frag)}else!this.hls.hasEnoughToStart&&c&&c.cc!==l?(c.abortRequests(),this.syncWithAnchor(t,c)):this.state===Xt.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var n;const r=((n=this.mainFragLoading)==null?void 0:n.frag)||null;if(t&&(r==null?void 0:r.cc)===t.cc)return;const i=(r||e).cc,s=this.getLevelDetails(),l=this.getLoadPosition(),c=an(s,i,l);c&&(this.log(`Syncing with main frag at ${c.start} cc ${c.cc}`),this.startFragRequested=!1,this.nextLoadPosition=c.start,this.resetLoadingState(),this.state===Xt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Xt.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(To),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=Xt.IDLE):this.state=Xt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Xt.IDLE:this.doTickIdle();break;case Xt.WAITING_TRACK:{const{levels:e,trackId:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(r))break;this.state=Xt.WAITING_INIT_PTS}break}case Xt.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case Xt.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:t,part:n,cache:r,complete:i}=e,s=this.mainAnchor;if(this.initPTS[t.cc]!==void 0){this.waitingData=null,this.state=Xt.FRAG_LOADING;const l=r.flush().buffer,c={frag:t,part:n,payload:l,networkDetails:null};this._handleFragmentLoadProgress(c),i&&super._handleFragmentLoadComplete(c)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=Xt.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:n,media:r,trackId:i}=this,s=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(n!=null&&n[i]))return;const l=n[i],c=l.details;if(!c||this.waitForLive(l)||this.waitForCdnTuneIn(c)){this.state=Xt.WAITING_TRACK,this.startFragRequested=!1;return}const u=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&u&&(this.bufferFlushed=!1,this.afterBufferFlushed(u,F.AUDIO,Q.AUDIO));const d=this.getFwdBufferInfo(u,Q.AUDIO);if(d===null)return;if(!this.switchingTrack&&this._streamEnded(d,c)){t.trigger(f.BUFFER_EOS,{type:"audio"}),this.state=Xt.ENDED;return}const p=d.len,_=t.maxBufferLength,w=c.fragments,T=w[0].start,j=this.getLoadPosition(),z=this.flushing?j:d.end;if(this.switchingTrack&&r){const we=j;c.PTSKnown&&we<T&&(d.end>T||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=T+.05)}if(p>=_&&!this.switchingTrack&&z<w[w.length-1].start)return;let ce=this.getNextFragment(z,c);if(ce&&this.isLoopLoading(ce,z)&&(ce=this.getNextFragmentLoopLoading(ce,c,d,Q.MAIN,_)),!ce){this.bufferFlushed=!0;return}let Oe=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&Oe&&ue(ce)&&!ce.endList&&(!c.live||!this.loadingParts&&z<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(Oe)===lt.OK&&(this.mainFragLoading=Oe=null),Oe&&ue(Oe))){if(ce.start>Oe.end){const it=this.fragmentTracker.getFragAtPos(z,Q.MAIN);it&&it.end>Oe.end&&(Oe=it,this.mainFragLoading={frag:it,targetBufferTime:null})}if(ce.start>Oe.end)return}this.loadFragment(ce,l,z)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new yt(n))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:r}=this;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==Xt.STOPPED&&(this.setInterval(To),this.state=Xt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(f.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:l,track:c}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${c.name}" of "${l}"`);return}const u=this.mainDetails;if(!u||i.endCC>u.endCC||u.expired){this.cachedTrackLoadedData=t,this.state!==Xt.STOPPED&&(this.state=Xt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${c.name}" of "${l}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const d=r[s];let p=0;if(i.live||(n=d.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(d.details){var _;p=this.alignPlaylists(i,d.details,(_=this.levelLastLoaded)==null?void 0:_.details)}i.alignedSliding||(si(i,u),i.alignedSliding||yi(i,u),p=i.fragmentStart)}d.details=i,this.levelLastLoaded=d,this.startFragRequested||this.setStartPosition(u,p),this.hls.trigger(f.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===Xt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Xt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:l,levels:c}=this;if(!c){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const u=c[l];if(!u){this.warn("Audio track is undefined on fragment load progress");return}const d=u.details;if(!d){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const p=s.defaultAudioCodec||u.audioCodec||"mp4a.40.2";let _=this.transmuxer;_||(_=this.transmuxer=new Ao(this.hls,Q.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const w=this.initPTS[n.cc],T=(t=n.initSegment)==null?void 0:t.data;if(w!==void 0){const z=r?r.index:-1,ce=z!==-1,Oe=new Qn(n.level,n.sn,n.stats.chunkCount,i.byteLength,z,ce);_.push(i,T,p,"",n,r,d.totalduration,!1,Oe,w)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${d.startSN} ,${d.endSN}],track ${l}`);const{cache:j}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new rs,complete:!1};j.push(new Uint8Array(i)),this.state!==Xt.STOPPED&&(this.state=Xt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===Q.MAIN&&ue(t.frag)&&(this.mainFragLoading=t,this.state===Xt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==Q.AUDIO){!this.audioOnly&&n.type===Q.MAIN&&!n.elementaryStreams.video&&!n.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(ue(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(f.AUDIO_TRACK_SWITCHED,E({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=Xt.ERROR;return}switch(t.details){case M.FRAG_GAP:case M.FRAG_PARSING_ERROR:case M.FRAG_DECRYPT_ERROR:case M.FRAG_LOAD_ERROR:case M.FRAG_LOAD_TIMEOUT:case M.KEY_LOAD_ERROR:case M.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Q.AUDIO,t);break;case M.AUDIO_TRACK_LOAD_ERROR:case M.AUDIO_TRACK_LOAD_TIMEOUT:case M.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Xt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===oe.AUDIO_TRACK&&(this.state=Xt.IDLE);break;case M.BUFFER_ADD_CODEC_ERROR:case M.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case M.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case M.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==F.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==F.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Xt.ENDED&&(this.state=Xt.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,Q.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:c,part:u,level:d}=l,{details:p}=d,{audio:_,text:w,id3:T,initSegment:j}=i;if(this.fragContextChanged(c)||!p){this.fragmentTracker.removeFragment(c);return}if(this.state=Xt.PARSING,this.switchingTrack&&_&&this.completeAudioSwitch(this.switchingTrack),j!=null&&j.tracks){const z=c.initSegment||c;if(this.unhandledEncryptionError(j,c))return;this._bufferInitSegment(d,j.tracks,z,s),r.trigger(f.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:n,tracks:j.tracks})}if(_){const{startPTS:z,endPTS:ce,startDTS:Oe,endDTS:we}=_;u&&(u.elementaryStreams[F.AUDIO]={startPTS:z,endPTS:ce,startDTS:Oe,endDTS:we}),c.setElementaryStreamInfo(F.AUDIO,z,ce,Oe,we),this.bufferFragmentData(_,c,u,s)}if(T!=null&&(t=T.samples)!=null&&t.length){const z=h({id:n,frag:c,details:p},T);r.trigger(f.FRAG_PARSING_METADATA,z)}if(w){const z=h({id:n,frag:c,details:p},w);r.trigger(f.FRAG_PARSING_USERDATA,z)}}_bufferInitSegment(e,t,n,r){if(this.state!==Xt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=Q.AUDIO;const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&s.split(",").length===1&&(i.levelCodec=s),this.hls.trigger(f.BUFFER_CODECS,t);const l=i.initSegment;if(l!=null&&l.byteLength){const c={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:l};this.hls.trigger(f.BUFFER_APPENDING,c)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===lt.NOT_LOADED||r===lt.PARTIAL){var i;if(!ue(e))this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=Xt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&yi(t.details,s)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l}=this.bufferedTrack;Ot({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l},e,on)||(Wn(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(f.AUDIO_TRACK_SWITCHED,E({},e))}}class Pa extends B{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let i=-1;for(let s=0;s<r.length;s++){const l=r[s];let c;try{c=new self.URL(l.URI,t.url).href}catch(u){this.warn(`Could not construct new URL for Rendition Report: ${u}`),c=l.URI||""}if(c===e){i=s;break}else c===e.substring(0,c.length)&&(i=s)}if(i!==-1){const s=r[i],l=parseInt(s["LAST-MSN"])||t.lastPartSn;let c=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const d=Math.min(t.age-t.partTarget,t.targetduration);c>=0&&d>t.partTarget&&(c+=1)}const u=n&&Zt(n);return new Ht(l,c>=0?c:void 0,u)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:r,stats:i}=t,s=self.performance.now(),l=i.loading.first?Math.max(0,s-i.loading.first):0;r.advancedDateTime=Date.now()-l;const c=this.hls.config.timelineOffset;if(c!==r.appliedTimelineOffset){const d=Math.max(c||0,0);r.appliedTimelineOffset=d,r.fragments.forEach(p=>{p.setStart(p.playlistOffset+d)})}if(r.live||n!=null&&n.live){const d="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){Tr(n,r,this);const Oe=r.playlistParsingError;if(Oe){this.warn(Oe);const we=this.hls;if(!we.config.ignorePlaylistParsingErrors){var u;const{networkDetails:it}=t;we.trigger(f.ERROR,{type:te.NETWORK_ERROR,details:M.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:Oe,reason:Oe.message,level:t.level||void 0,parent:(u=r.fragments[0])==null?void 0:u.type,networkDetails:it,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const p=this.hls.mainForwardBufferInfo,_=p?p.end-p.len:0,w=(r.edge-_)*1e3,T=gi(r,w);if(r.requestScheduled+T<s?r.requestScheduled=s:r.requestScheduled+=T,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let j,z,ce;if(r.canBlockReload&&r.endSN&&r.advanced){const Oe=this.hls.config.lowLatencyMode,we=r.lastPartSn,it=r.endSN,Et=r.lastPartIndex,$t=Et!==-1,ht=we===it;$t?ht?(z=it+1,ce=Oe?0:Et):(z=we,ce=Oe?Et+1:r.maxPartIndex):z=it+1;const Dt=r.age,kt=Dt+r.ageHeader;let pt=Math.min(kt-r.partTarget,r.targetduration*1.5);if(pt>0){if(kt>r.targetduration*3)this.log(`Playlist last advanced ${Dt.toFixed(2)}s ago. Omitting segment and part directives.`),z=void 0,ce=void 0;else if(n!=null&&n.tuneInGoal&&kt-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${pt} with playlist age: ${r.age}`),pt=0;else{const en=Math.floor(pt/r.targetduration);if(z+=en,ce!==void 0){const Zn=Math.round(pt%r.targetduration/r.partTarget);ce+=Zn}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${Dt.toFixed(2)}s goal: ${pt} skip sn ${en} to part ${ce}`)}r.tuneInGoal=pt}if(j=this.getDeliveryDirectives(r,t.deliveryDirectives,z,ce),Oe||!ht){r.requestScheduled=s,this.loadingPlaylist(d,j);return}}else(r.canBlockReload||r.canSkipUntil)&&(j=this.getDeliveryDirectives(r,t.deliveryDirectives,z,ce));j&&z!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(T-l*2,T/2)),this.scheduleLoading(d,j,r)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=r.requestScheduled;if(i>=s){this.loadingPlaylist(e,t);return}const l=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(l)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),l)}getDeliveryDirectives(e,t,n,r){let i=Zt(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=xt.No),new Ht(n,r,i)}checkRetry(e){const t=e.details,n=hn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=r||{},c=!!r&&!!l&&(i===We.RetryRequest||!r.resolved&&i===We.SendAlternateToPenaltyBox);if(c){var u;if(s>=l.maxNumRetry)return!1;if(n&&(u=e.context)!=null&&u.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const d=Yn(l,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),d),this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" in ${d}ms`)}e.levelRetry=!0,r.resolved=!0}return c}}function Do(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!Xs(a[t].attrs,e[t].attrs))return!1;return!0}function Xs(a,e,t){const n=a["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>a[r]!==e[r])}function Oa(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class vu extends Pa{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(f.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Audio track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(l=>(r==null?void 0:r.indexOf(l))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const l=this.tracks.filter(_=>!n||n.indexOf(_.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(_=>_.default)&&(this.selectDefaultTrack=!1),l.forEach((_,w)=>{_.id=w});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const c=this.hls.config.audioPreference;if(!i&&c){const _=at(c,l,on);if(_>-1)i=l[_];else{const w=at(c,this.tracks);i=this.tracks[w]}}let u=this.findTrackId(i);u===-1&&i&&(u=this.findTrackId(null));const d={audioTracks:l};this.log(`Updating audio tracks, ${l.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(f.AUDIO_TRACKS_UPDATED,d);const p=this.trackId;if(u!==-1&&p===-1)this.setAudioTrack(u);else if(l.length&&p===-1){var s;const _=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${l.length}`);this.warn(_.message),this.hls.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:_})}}}onError(e,t){t.fatal||!t.context||t.context.type===oe.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&Ot(e,r,on))return r;const i=at(e,this.tracksInGroup,on);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(r){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const l=_n(e,t.levels,n,s,on);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=at(e,n);if(s>-1)return n[s]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],i=r.details&&!r.details.live;if(e===this.trackId&&r===n&&i||(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(f.AUDIO_TRACK_SWITCHING,E({},r)),i))return;const s=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(!(this.selectDefaultTrack&&!r.default)&&(!e||Ot(e,r,on)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:c}=e;for(let u=0;u<t.length;u++){const d=t[u];if(Ot({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:c},d,on))return u}for(let u=0;u<t.length;u++){const d=t[u];if(Xs(e.attrs,d.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return u}for(let u=0;u<t.length;u++){const d=t[u];if(Xs(e.attrs,d.attrs,["LANGUAGE"]))return u}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&Wn(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(f.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class _u{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(this.queues===null||this.tracks===null)return;const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(i){var n;if(r.onError(i),this.queues===null||this.tracks===null)return;const s=(n=this.tracks[e])==null?void 0:n.buffer;s!=null&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
${this.list("video")}
${this.list("audio")}
${this.list("audiovideo")}}`}list(e){var t,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],r=n==null?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.label).join(", "))||""}}const Co=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,Ro="HlsJsTrackRemovedError";class yu extends Error{constructor(e){super(e),this.name=Ro}}class Eu extends B{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var r;this.hls&&((r=this.mediaSource)==null?void 0:r.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:r,mediaSource:i}=this;n&&this.log("Media source opened"),!(!r||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(f.MEDIA_ATTACHED,{media:r,mediaSource:i}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:n,_objectUrl:r}=this;n!==r&&this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=se(L(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.BUFFER_RESET,this.onBufferReset,this),e.on(f.BUFFER_APPENDING,this.onBufferAppending,this),e.on(f.BUFFER_CODECS,this.onBufferCodecs,this),e.on(f.BUFFER_EOS,this.onBufferEos,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.FRAG_PARSED,this.onFragParsed,this),e.on(f.FRAG_CHANGED,this.onFragChanged,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.BUFFER_RESET,this.onBufferReset,this),e.off(f.BUFFER_APPENDING,this.onBufferAppending,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.BUFFER_EOS,this.onBufferEos,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.FRAG_PARSED,this.onFragParsed,this),e.off(f.FRAG_CHANGED,this.onFragChanged,this),e.off(f.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};if(this.operationQueue){const i=this.isUpdating();i||this.operationQueue.removeBlockers();const s=this.isQueued();(i||s)&&this.warn(`Transfering MediaSource with${s?" operations in queue":""}${i?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?h(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=h({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[1]=null}),{media:e,mediaSource:t,tracks:n}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media;this.transferData=this.overrides=void 0;const r=L(this.appendSource);if(r){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(s),i)this._objectUrl=n.src,this.attachTransferred();else{const l=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{n.removeAttribute("src");const c=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||c&&s instanceof c,Io(n),bu(n,l),n.load()}catch(c){n.src=l}else n.src=l}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,i=r?Object.keys(r):null,s=i?i.length:0,l=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(r&&i&&s){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
required tracks: ${Vt(n,(c,u)=>c==="initSegment"?void 0:u)};
transfer tracks: ${Vt(r,(c,u)=>c==="initSegment"?void 0:u)}}`),!ae(r,n)){t.mediaSource=null,t.tracks=void 0;const c=e.currentTime,u=this.details,d=Math.max(c,(u==null?void 0:u.fragments[0].start)||0);if(d-c>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${c} -> ${d}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${d} currentTime: ${c}`),this.onMediaDetaching(f.MEDIA_DETACHING,{}),this.onMediaAttaching(f.MEDIA_ATTACHING,t),e.currentTime=d;return}this.transferData=void 0,i.forEach(c=>{const u=c,d=r[u];if(d){const p=d.buffer;if(p){const _=this.fragmentTracker,w=d.id;if(_.hasFragments(w)||_.hasParts(w)){const z=dn.getBuffered(p);_.detectEvictedFragments(u,z,w,null,!0)}const T=Fa(u),j=[u,p];this.sourceBuffers[T]=j,p.updating&&this.operationQueue&&this.operationQueue.prependBlocker(u),this.trackSourceBuffer(u,d)}}}),l(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),l()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([l])=>{l&&this.removeBuffer(l)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const l=i.readyState==="open";try{const c=i.sourceBuffers;for(let u=c.length;u--;)l&&c[u].abort(),i.removeSourceBuffer(c[u]);l&&i.endOfStream()}catch(c){this.warn(`onMediaDetaching: ${c.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(r.removeAttribute("src"),this.appendSource&&Io(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(f.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Fa(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new _u(this.tracks)}onBufferCodecs(e,t){const n=this.tracks,r=Object.keys(t);this.log(`BUFFER_CODECS: "${r}" (current SB count ${this.sourceBufferCount})`);const i="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),s=!i&&this.sourceBufferCount&&this.media&&r.some(l=>!n[l]);if(i||s){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${r}" SourceBuffers`);return}r.forEach(l=>{var c,u;const d=t[l],{id:p,codec:_,levelCodec:w,container:T,metadata:j,supplemental:z}=d;let ce=n[l];const Oe=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[l],we=Oe!=null&&Oe.buffer?Oe:ce,it=(we==null?void 0:we.pendingCodec)||(we==null?void 0:we.codec),Et=we==null?void 0:we.levelCodec;ce||(ce=n[l]={buffer:void 0,listeners:[],codec:_,supplemental:z,container:T,levelCodec:w,metadata:j,id:p});const $t=Ee(it,Et),ht=$t==null?void 0:$t.replace(Co,"$1");let Dt=Ee(_,w);const kt=(u=Dt)==null?void 0:u.replace(Co,"$1");Dt&&$t&&ht!==kt&&(l.slice(0,5)==="audio"&&(Dt=me(Dt,this.appendSource)),this.log(`switching codec ${it} to ${Dt}`),Dt!==(ce.pendingCodec||ce.codec)&&(ce.pendingCodec=Dt),ce.container=T,this.appendChangeType(l,T,Dt))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,i={label:`change-type=${r}`,execute:()=>{const s=this.tracks[e];if(s){const l=s.buffer;l!=null&&l.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),l.changeType(r),s.codec=n,s.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:s=>{this.warn(`Failed to change ${e} SourceBuffer type`,s)}};this.append(i,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const n=e.start,r=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,Q.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var l;const c=this.tracks.video;(this.lastVideoAppendEnd>r||c!=null&&c.buffer&&dn.isBuffered(c.buffer,r)||((l=this.fragmentTracker.getAppendedFrag(r,Q.MAIN))==null?void 0:l.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:l=>{this.warn("Error executing block-audio operation",l)}};this.blockedAudioAppend={op:s,frag:e},this.append(s,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:i,parent:s,frag:l,part:c,chunkMeta:u,offset:d}=t,p=u.buffering[i],{sn:_,cc:w}=l,T=self.performance.now();p.start=T;const j=l.stats.buffering,z=c?c.stats.buffering:null;j.start===0&&(j.start=T),z&&z.start===0&&(z.start=T);const ce=n.audio;let Oe=!1;i==="audio"&&(ce==null?void 0:ce.container)==="audio/mpeg"&&(Oe=!this.lastMpegAudioChunk||u.id===1||this.lastMpegAudioChunk.sn!==u.sn,this.lastMpegAudioChunk=u);const we=n.video,it=we==null?void 0:we.buffer;if(it&&_!=="initSegment"){const ht=c||l,Dt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(we.ending||we.ended)){const pt=ht.start+ht.duration*.05,en=it.buffered,Zn=this.currentOp("video");!en.length&&!Zn?this.blockAudio(ht):!Zn&&!dn.isBuffered(it,pt)&&this.lastVideoAppendEnd<pt&&this.blockAudio(ht)}else if(i==="video"){const kt=ht.end;if(Dt){const pt=Dt.frag.start;(kt>pt||kt<this.lastVideoAppendEnd||dn.isBuffered(it,pt))&&this.unblockAudio()}this.lastVideoAppendEnd=kt}}const Et=(c||l).start,$t={label:`append-${i}`,execute:()=>{var ht;p.executeStart=self.performance.now();const Dt=(ht=this.tracks[i])==null?void 0:ht.buffer;Dt&&(Oe?this.updateTimestampOffset(Dt,Et,.1,i,_,w):d!==void 0&&x(d)&&this.updateTimestampOffset(Dt,d,1e-6,i,_,w)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const ht=self.performance.now();p.executeEnd=p.end=ht,j.first===0&&(j.first=ht),z&&z.first===0&&(z.first=ht);const Dt={};this.sourceBuffers.forEach(([kt,pt])=>{kt&&(Dt[kt]=dn.getBuffered(pt))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(f.BUFFER_APPENDED,{type:i,frag:l,part:c,chunkMeta:u,parent:l.type,timeRanges:Dt})},onError:ht=>{var Dt;const kt={type:te.MEDIA_ERROR,parent:l.type,details:M.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:c,chunkMeta:u,error:ht,err:ht,fatal:!1},pt=(Dt=this.media)==null?void 0:Dt.error;if(ht.code===DOMException.QUOTA_EXCEEDED_ERR||ht.name=="QuotaExceededError"||"quota"in ht)kt.details=M.BUFFER_FULL_ERROR;else if(ht.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!pt)kt.errorAction=ot(!0);else if(ht.name===Ro&&this.sourceBufferCount===0)kt.errorAction=ot(!0);else{const en=++this.appendErrors[i];this.warn(`Failed ${en}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${pt||"no media error"})`),(en>=this.hls.config.appendErrorMaxRetry||pt)&&(kt.fatal=!0)}this.hls.trigger(f.ERROR,kt)}};this.append($t,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(f.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:i}=t;n?this.append(this.getFlushOp(n,r,i),n):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,r,i),s)})}onFragParsed(e,t){const{frag:n,part:r}=t,i=[],s=r?r.elementaryStreams:n.elementaryStreams;s[F.AUDIOVIDEO]?i.push("audiovideo"):(s[F.AUDIO]&&i.push("audio"),s[F.VIDEO]&&i.push("video"));const l=()=>{const c=self.performance.now();n.stats.buffering.end=c,r&&(r.stats.buffering.end=c);const u=r?r.stats:n.stats;this.hls.trigger(f.FRAG_BUFFERED,{frag:n,part:r,stats:u,id:n.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(l,i).catch(c=>{this.warn(`Fragment buffered callback ${c}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const t=this.tracks[e];if(t)return!t.ended||t.ending}return!1})}onBufferEos(e,t){var n;this.sourceBuffers.forEach(([s])=>{if(s){const l=this.tracks[s];(!t.type||t.type===s)&&(l.ending=!0,l.ended||(l.ended=!0,this.log(`${s} buffer reached EOS`)))}});const r=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var l;return s&&!((l=this.tracks[s])!=null&&l.ended)})?r?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream(),this.hls.trigger(f.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(f.BUFFERED_TO_END,void 0)):t.type==="video"&&this.unblockAudio()}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,t){if(t.details===M.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;x(r)&&r!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const r=e.config,i=n.currentTime,s=t.levelTargetDuration,l=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(x(l)&&l>=0){const u=Math.max(l,s),d=Math.floor(i/s)*s-u;this.flushBackBuffer(i,s,d)}const c=r.frontBufferFlushThreshold;if(x(c)&&c>0){const u=Math.max(r.maxBufferLength,c),d=Math.max(u,s),p=Math.floor(i/s)*s+d;this.flushFrontBuffer(i,s,p)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const l=dn.getBuffered(i);if(l.length>0&&n>l.start(0)){var s;this.hls.trigger(f.BACK_BUFFER_REACHED,{bufferEnd:n});const c=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(f.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(c!=null&&c.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=dn.getBuffered(i),l=s.length;if(l<2)return;const c=s.start(l-1),u=s.end(l-1);if(n>c||e>=c&&e<=u)return;this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:c,endOffset:1/0,type:r})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&n.setLiveSeekableRange){const u=Math.max(0,t.fragmentStart),d=Math.max(u,r);return{duration:1/0,start:u,end:d}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return x(i)?{duration:i}:null;const s=this.media.duration,l=x(n.duration)?n.duration:0;return r>l&&r>s||!x(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(x(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),r.duration=e),t!==void 0&&n!==void 0&&(this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${n}.`),r.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${Vt(n)}`),this.tracksReady){var r;const i=(r=this.transferData)==null?void 0:r.tracks;i&&Object.keys(i).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(f.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const i in e){const s=i,l=e[s];if(this.isPending(l)){const c=this.getTrackCodec(l,s),u=`${l.container};codecs=${c}`;l.codec=c,this.log(`creating sourceBuffer(${u})${this.currentOp(s)?" Queued":""} ${Vt(l)}`);try{const d=n.addSourceBuffer(u),p=Fa(s),_=[s,d];t[p]=_,l.buffer=d}catch(d){var r;this.error(`error while trying to add sourceBuffer: ${d.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:d,sourceBufferName:s,mimeType:u,parent:l.id});return}this.trackSourceBuffer(s,l)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&pn(n,"video")&&(r=ve(r,n));const i=Ee(r,e.levelCodec);return i?t.slice(0,5)==="audio"?me(i,this.appendSource):i:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(i,s)=>{const l=s.removedRanges;l!=null&&l.length&&this.hls.trigger(f.BUFFER_FLUSHED,{type:i})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.currentOp(e);i&&i.onError(r)}updateTimestampOffset(e,t,n,r,i,s){const l=t-e.timestampOffset;Math.abs(l)>=n&&(this.log(`Updating ${r} SourceBuffer timestampOffset to ${t} (sn: ${i} cc: ${s})`),e.timestampOffset=t)}removeExecutor(e,t,n){const{media:r,mediaSource:i}=this,s=this.tracks[e],l=s==null?void 0:s.buffer;if(!r||!i||!l){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const c=x(r.duration)?r.duration:1/0,u=x(i.duration)?i.duration:1/0,d=Math.max(0,t),p=Math.min(n,c,u);p>d&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${d},${p}] from the ${e} SourceBuffer`),l.remove(d,p)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new yu(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,r=t.map(s=>this.appendBlocker(s));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(s=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const r=(n=this.tracks[t])==null?void 0:n.buffer;!r||r.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,n){const r=this.tracks[e];if(!r)return;const i=r.buffer;if(!i)return;const s=n.bind(this,e);r.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(r=>{n.removeEventListener(r.event,r.listener)}),t.listeners.length=0)}}function Io(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function bu(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function Fa(a){return a==="audio"?1:0}class Na{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(f.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.BUFFER_CODECS,this.onBufferCodecs,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(f.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&x(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((r,i)=>this.isLevelAllowed(r)&&i<=e);return this.clientRect=null,Na.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const r=(l,c)=>c?l.width!==c.width||l.height!==c.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let l=0;l<e.length;l+=1){const c=e[l];if((c.width>=s||c.height>=s)&&r(c,e[l+1])){i=l;break}}return i}}const Ai={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},xu={HLS:"h"};class ji{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof ji?n:new ji(n))),this.value=e,this.params=t}}const Su="Dict";function wu(a){return Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a=="object"?JSON.stringify(a):String(a)}function Au(a,e,t,n){return new Error(`failed to ${a} "${wu(e)}" as ${t}`,{cause:n})}function Yi(a,e,t){return Au("serialize",a,e,t)}class Lo{constructor(e){this.description=e}}const ko="Bare Item",Tu="Boolean";function Du(a){if(typeof a!="boolean")throw Yi(a,Tu);return a?"?1":"?0"}function Cu(a){return btoa(String.fromCharCode(...a))}const Ru="Byte Sequence";function Iu(a){if(ArrayBuffer.isView(a)===!1)throw Yi(a,Ru);return`:${Cu(a)}:`}const Lu="Integer";function ku(a){return a<-999999999999999||999999999999999<a}function Po(a){if(ku(a))throw Yi(a,Lu);return a.toString()}function Pu(a){return`@${Po(a.getTime()/1e3)}`}function Oo(a,e){if(a<0)return-Oo(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const r=Math.floor(a*t);return(r%2===0?r:r+1)/t}else return Math.round(a*t)/t}const Ou="Decimal";function Fu(a){const e=Oo(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Yi(a,Ou);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Nu="String",Mu=/[\x00-\x1f\x7f]+/;function Bu(a){if(Mu.test(a))throw Yi(a,Nu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Uu(a){return a.description||a.toString().slice(7,-1)}const Ku="Token";function Fo(a){const e=Uu(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Yi(e,Ku);return e}function Ma(a){switch(typeof a){case"number":if(!x(a))throw Yi(a,ko);return Number.isInteger(a)?Po(a):Fu(a);case"string":return Bu(a);case"symbol":return Fo(a);case"boolean":return Du(a);case"object":if(a instanceof Date)return Pu(a);if(a instanceof Uint8Array)return Iu(a);if(a instanceof Lo)return Fo(a);default:throw Yi(a,ko)}}const Zu="Key";function Ba(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw Yi(a,Zu);return a}function Ua(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${Ba(e)}`:`;${Ba(e)}=${Ma(t)}`).join("")}function No(a){return a instanceof ji?`${Ma(a.value)}${Ua(a.params)}`:Ma(a)}function zu(a){return`(${a.value.map(No).join(" ")})${Ua(a.params)}`}function $u(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw Yi(a,Su);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof ji||(i=new ji(i));let s=Ba(r);return i.value===!0?s+=Ua(i.params):(s+="=",Array.isArray(i.value)?s+=zu(i):s+=No(i)),s}).join(`,${n}`)}function Mo(a,e){return $u(a,e)}const Xi="CMCD-Object",ri="CMCD-Request",xs="CMCD-Session",ms="CMCD-Status",Hu={br:Xi,ab:Xi,d:Xi,ot:Xi,tb:Xi,tpb:Xi,lb:Xi,tab:Xi,lab:Xi,url:Xi,pb:ri,bl:ri,tbl:ri,dl:ri,ltc:ri,mtp:ri,nor:ri,nrr:ri,rc:ri,sn:ri,sta:ri,su:ri,ttfb:ri,ttfbb:ri,ttlb:ri,cmsdd:ri,cmsds:ri,smrt:ri,df:ri,cs:ri,ts:ri,cid:xs,pr:xs,sf:xs,sid:xs,st:xs,v:xs,msd:xs,bs:ms,bsd:ms,cdn:ms,rtp:ms,bg:ms,pt:ms,ec:ms,e:ms},Gu={REQUEST:ri};function Vu(a){return Object.keys(a).reduce((e,t)=>{var n;return(n=a[t])===null||n===void 0||n.forEach(r=>e[r]=t),e},{})}function Wu(a,e){const t={};if(!a)return t;const n=Object.keys(a),r=e?Vu(e):{};return n.reduce((i,s)=>{var l;const c=Hu[s]||r[s]||Gu.REQUEST,u=(l=i[c])!==null&&l!==void 0?l:i[c]={};return u[s]=a[s],i},t)}function ju(a){return["ot","sf","st","e","sta"].includes(a)}function Yu(a){return typeof a=="number"?x(a):a!=null&&a!==""&&a!==!1}const Bo="event";function Xu(a,e){const t=new URL(a),n=new URL(e);if(t.origin!==n.origin)return a;const r=t.pathname.split("/").slice(1),i=n.pathname.split("/").slice(1,-1);for(;r[0]===i[0];)r.shift(),i.shift();for(;i.length;)i.shift(),r.unshift("..");return r.join("/")+t.search+t.hash}const ca=a=>Math.round(a),Ka=(a,e)=>Array.isArray(a)?a.map(t=>Ka(t,e)):a instanceof ji&&typeof a.value=="string"?new ji(Ka(a.value,e),a.params):(e.baseUrl&&(a=Xu(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),fa=a=>ca(a/100)*100,Qu={br:ca,d:ca,bl:fa,dl:fa,mtp:fa,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof ji&&typeof a.value=="string"?t=new ji([a]):typeof a=="string"&&(t=[a])),Ka(t,e)},rtp:fa,tb:ca},Uo="request",Ko="response",Za=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],Ju=["e"],qu=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function da(a){return qu.test(a)}function ec(a){return Za.includes(a)||Ju.includes(a)||da(a)}const Zo=["d","dl","nor","ot","rtp","su"];function tc(a){return Za.includes(a)||Zo.includes(a)||da(a)}const nc=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function rc(a){return Za.includes(a)||Zo.includes(a)||nc.includes(a)||da(a)}const ic=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function sc(a){return ic.includes(a)||da(a)}const ac={[Ko]:rc,[Bo]:ec,[Uo]:tc};function zo(a,e={}){const t={};if(a==null||typeof a!="object")return t;const n=e.version||a.v||1,r=e.reportingMode||Uo,i=n===1?sc:ac[r];let s=Object.keys(a).filter(i);const l=e.filter;typeof l=="function"&&(s=s.filter(l));const c=r===Ko||r===Bo;c&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const u=h({},Qu,e.formatters),d={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(p=>{let _=a[p];const w=u[p];if(typeof w=="function"&&(_=w(_,d)),p==="v"){if(n===1)return;_=n}p=="pr"&&_===1||(c&&p==="ts"&&!x(_)&&(_=Date.now()),Yu(_)&&(ju(p)&&typeof _=="string"&&(_=new Lo(_)),t[p]=_))}),t}function oc(a,e={}){const t={};if(!a)return t;const n=zo(a,e),r=Wu(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,l])=>{const c=Mo(l,{whitespace:!1});return c&&(i[s]=c),i},t)}function lc(a,e,t){return h(a,oc(e,t))}const uc="CMCD";function cc(a,e={}){return a?Mo(zo(a,e),{whitespace:!1}):""}function fc(a,e={}){if(!a)return"";const t=cc(a,e);return encodeURIComponent(t)}function dc(a,e={}){if(!a)return"";const t=fc(a,e);return`${uc}=${t}`}const $o=/CMCD=[^&#]+/;function hc(a,e,t){const n=dc(e,t);if(!n)return a;if($o.test(a))return a.replace($o,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class pc{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=r=>{try{this.apply(r,{ot:Ai.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=r=>{try{const{frag:i,part:s}=r,l=this.hls.levels[i.level],c=this.getObjectType(i),u={d:(s||i).duration*1e3,ot:c};(c===Ai.VIDEO||c===Ai.AUDIO||c==Ai.MUXED)&&(u.br=l.bitrate/1e3,u.tb=this.getTopBandwidth(c)/1e3,u.bl=this.getBufferLength(c));const d=s?this.getNextPart(s):this.getNextFrag(i);d!=null&&d.url&&d.url!==i.url&&(u.nor=d.url),this.apply(r,u)}catch(i){this.hls.logger.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHED,this.onMediaDetached,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHED,this.onMediaDetached,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,r;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(r=t.tracks.video)==null?void 0:r.buffer}createData(){var e;return{v:1,sf:xu.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){h(t,this.createData());const n=t.ot===Ai.INIT||t.ot===Ai.VIDEO||t.ot===Ai.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce((s,l)=>(r.includes(l)&&(s[l]=t[l]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),lc(e.headers,t,i)):e.url=hc(e.url,t,i)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const r=e.sn-n.startSN;return n.fragments[r+1]}}getNextPart(e){var t;const{index:n,fragment:r}=e,i=(t=this.hls.levels[r.level])==null||(t=t.details)==null?void 0:t.partList;if(i){const{sn:s}=r;for(let l=i.length-1;l>=0;l--){const c=i[l];if(c.index===n&&c.fragment.sn===s)return i[l+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Ai.TIMED_TEXT;if(e.sn==="initSegment")return Ai.INIT;if(t==="audio")return Ai.AUDIO;if(t==="main")return this.hls.audioTracks.length?Ai.VIDEO:Ai.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===Ai.AUDIO)n=r.audioTracks;else{const i=r.maxAutoLevel,s=i>-1?i+1:r.levels.length;n=r.levels.slice(0,s)}return n.forEach(i=>{i.bitrate>t&&(t=i.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===Ai.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:dn.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,l){t(i),this.loader.load(i,s,l)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,l){t(i),this.loader.load(i,s,l)}}}}const mc=3e5;class gc extends B{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===We.SendAlternateToPenaltyBox&&n.flags===Ue.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:l,pathwayId:c,type:u}=t.context;l&&r?s=this.getPathwayForGroupId(l,u,s):c&&(s=c)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&r&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==s),t.details===M.BUFFER_APPEND_ERROR&&!t.fatal?n.resolved=!0:n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${r&&r.length} priorities: ${Vt(i)} penalized: ${Vt(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach(i=>{r-n[i]>mc&&delete n[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in n)continue;if(s===this.pathwayId)return;const l=this.hls.nextLoadLevel,c=this.hls.levels[l];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,Ti(t),this.hls.trigger(f.LEVELS_UPDATED,{levels:t});const u=this.hls.levels[l];c&&u&&this.levels&&(u.attrs["STABLE-VARIANT-ID"]!==c.attrs["STABLE-VARIANT-ID"]&&u.bitrate!==c.bitrate&&this.log(`Unstable Pathways change from bitrate ${c.bitrate} to ${u.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===oe.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===oe.SUBTITLE_TRACK&&r[i].hasSubtitleGroup(e))return r[i].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach(i=>{const{ID:s,"BASE-ID":l,"URI-REPLACEMENT":c}=i;if(t.some(d=>d.pathwayId===s))return;const u=this.getLevelsForPathway(l).map(d=>{const p=new In(d.attrs);p["PATHWAY-ID"]=s;const _=p.AUDIO&&`${p.AUDIO}_clone_${s}`,w=p.SUBTITLES&&`${p.SUBTITLES}_clone_${s}`;_&&(n[p.AUDIO]=_,p.AUDIO=_),w&&(r[p.SUBTITLES]=w,p.SUBTITLES=w);const T=Go(d.uri,p["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",c),j=new yt({attrs:p,audioCodec:d.audioCodec,bitrate:d.bitrate,height:d.height,name:d.name,url:T,videoCodec:d.videoCodec,width:d.width});if(d.audioGroups)for(let z=1;z<d.audioGroups.length;z++)j.addGroupId("audio",`${d.audioGroups[z]}_clone_${s}`);if(d.subtitleGroups)for(let z=1;z<d.subtitleGroups.length;z++)j.addGroupId("text",`${d.subtitleGroups[z]}_clone_${s}`);return j});t.push(...u),Ho(this.audioTracks,n,c,s),Ho(this.subtitleTracks,r,c,s)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(d){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const d=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+d)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,l=s.errorRetry||s.timeoutRetry||{},c={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},u={onSuccess:(d,p,_,w)=>{this.log(`Loaded steering manifest: "${r}"`);const T=d.data;if((T==null?void 0:T.VERSION)!==1){this.log(`Steering VERSION ${T.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=T.TTL;const{"RELOAD-URI":j,"PATHWAY-CLONES":z,"PATHWAY-PRIORITY":ce}=T;if(j)try{this.uri=new self.URL(j,r).href}catch(we){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${j}`);return}this.scheduleRefresh(this.uri||_.url),z&&this.clonePathways(z);const Oe={steeringManifest:T,url:r.toString()};this.hls.trigger(f.STEERING_MANIFEST_LOADED,Oe),ce&&this.updatePathwayPriority(ce)},onError:(d,p,_,w)=>{if(this.log(`Error loading steering manifest: ${d.code} ${d.text} (${p.url})`),this.stopLoad(),d.code===410){this.enabled=!1,this.log(`Steering manifest ${p.url} no longer available`);return}let T=this.timeToLoad*1e3;if(d.code===429){const j=this.loader;if(typeof(j==null?void 0:j.getResponseHeader)=="function"){const z=j.getResponseHeader("Retry-After");z&&(T=parseFloat(z)*1e3)}this.log(`Steering manifest ${p.url} rate limited`);return}this.scheduleRefresh(this.uri||p.url,T)},onTimeout:(d,p,_)=>{this.log(`Timeout loading steering manifest (${p.url})`),this.scheduleRefresh(this.uri||p.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,c,u)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const r=(n=this.hls)==null?void 0:n.media;if(r&&!r.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Ho(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const l=h({},s);return l.details=void 0,l.attrs=new In(l.attrs),l.url=l.attrs.URI=Go(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[r],l.attrs["PATHWAY-ID"]=n,l});a.push(...i)})}function Go(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let l;e&&(l=s==null?void 0:s[e],l&&(a=l));const c=new self.URL(a);return r&&!l&&(c.host=r),i&&Object.keys(i).sort().forEach(u=>{u&&c.searchParams.set(u,i[u])}),c.href}class Os extends B{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=Os.CDMCleanupPromise?[Os.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=t=>{const{initDataType:n,initData:r}=t,i=`"${t.type}" event: init data type: "${n}"`;if(this.debug(i),r!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=zn(this.config));const l=s.map(Sn).filter(c=>!!c);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=Wr(s);if(n!=="sinf"||l!==er.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}let c;try{const w=tt(new Uint8Array(r)),T=yr(JSON.parse(w).sinf),j=Pe(T);if(!j)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");c=new Uint8Array(j.subarray(8,24))}catch(w){this.warn(`${i} Failed to parse sinf: ${w}`);return}const u=U(c),{keyIdToKeySessionPromise:d,mediaKeySessions:p}=this;let _=d[u];for(let w=0;w<p.length;w++){const T=p[w],j=T.decryptdata;if(!j.keyId)continue;const z=U(j.keyId);if(u===z||j.uri.replace(/-/g,"").indexOf(u)!==-1){if(_=d[z],!_)continue;if(j.pssh)break;delete d[z],j.pssh=new Uint8Array(r),j.keyId=c,_=d[u]=_.then(()=>this.generateRequestWithPreferredKeySession(T,n,r,"encrypted-event-key-match")),_.catch(ce=>this.handleError(ce));break}}_||this.handleError(new Error(`Key ID ${u} not encountered in playlist. Key-system sessions ${p.length}.`))}).catch(s=>this.handleError(s))}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(f.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(f.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(f.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(f.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t==null?void 0:t[e];if(r)return r.licenseUrl;if(e===er.WIDEVINE&&n)return n}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t==null?void 0:t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(s,l,c)=>!!s&&c.indexOf(s)===l,r=t.map(s=>s.audioCodec).filter(n),i=t.map(s=>s.videoCodec).filter(n);return r.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,l)=>{const c=u=>{const d=u.shift();this.getMediaKeysPromise(d,r,i).then(p=>s({keySystem:d,mediaKeys:p})).catch(p=>{u.length?c(u):p instanceof Ui?l(p):l(new Ui({type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_NO_ACCESS,error:p,fatal:!0},p.message))})};c(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return Gn===null&&self.location.protocol==="http:"&&(r=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(r))}return n(e,t)}getMediaKeysPromise(e,t,n){var r;const i=Dr(e,t,n,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],l=(r=s)==null?void 0:r.keySystemAccess;if(!l){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Vt(i)}`),l=this.requestMediaKeySystemAccess(e,i);const c=s=this.keySystemAccessPromises[e]={keySystemAccess:l};return l.catch(u=>{this.log(`Failed to obtain access to key-system "${e}": ${u}`)}),l.then(u=>{this.log(`Access for key-system "${u.keySystem}" obtained`);const d=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const p=c.mediaKeys=u.createMediaKeys().then(_=>(this.log(`Media-keys created for "${e}"`),c.hasMediaKeys=!0,d.then(w=>w?this.setMediaKeysServerCertificate(_,e,w):_)));return p.catch(_=>{this.error(`Failed to create media-keys for "${e}"}: ${_}`)}),p})}return l.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${U(e.keyId||[])}`);const r=n.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t),i="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return U(e.keyId)}updateKeySession(e,t){const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyId ${U(e.decryptdata.keyId||[])}
} (data length: ${t.byteLength})`),n.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>Sn(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:n})=>this.attemptSetMediaKeys(t,n))}selectKeySystem(e){return new Promise((t,n)=>{this.getKeySystemSelectionPromise(e).then(({keySystem:r})=>{const i=Sn(r);i?t(i):n(new Error(`Unable to find format for key-system "${r}"`))}).catch(n)})}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=zn(this.config),n=e.map(Wr).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(n)}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),r=this.bannedKeyIds[n];if(r){const l=Vo(r,t);return this.handleError(l,e.frag),Promise.reject(l)}const i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);const s=this.keyIdToKeySessionPromise[n];if(!s){const l=this.getKeySystemForKeyPromise(t).then(({keySystem:c,mediaKeys:u})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(c,u).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:c,mediaKeys:u,decryptdata:t}))))).then(c=>{const u="cenc",d=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(c,u,d,"playlist-key")});return l.catch(c=>this.handleError(c,e.frag)),this.keyIdToKeySessionPromise[n]=l,l}return s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){this.hls&&(this.error(e.message),e instanceof Ui?(t&&(e.data.frag=t),this.hls.trigger(f.ERROR,e.data)):this.hls.trigger(f.ERROR,{type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=Wr(e.keyFormat),i=r?[r]:zn(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=zn(this.config)),e.length===0)throw new Ui({type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Vt({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaKeys===t)return Promise.resolve();const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).then(()=>{if(!this.media)throw this.mediaKeys=null,new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.mediaKeys=t,this.setMediaKeysQueue.push(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>n.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,n,r){var i;const s=(i=this.config.drmSystems)==null||(i=i[e.keySystem])==null?void 0:i.generateRequest;if(s)try{const _=s.call(this.hls,t,n,e);if(!_)throw new Error("Invalid response from configured generateRequest filter");t=_.initDataType,n=_.initData?_.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(_){if(this.warn(_.message),this.hls&&this.hls.config.debug)throw _}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${l} (init data type: ${t} length: ${n.byteLength})`);const c=new Zs,u=e._onmessage=_=>{const w=e.mediaKeysSession;if(!w){c.emit("error",new Error("invalid state"));return}const{messageType:T,message:j}=_;this.log(`"${T}" message event for session "${w.sessionId}" message size: ${j.byteLength}`),T==="license-request"||T==="license-renewal"?this.renewLicense(e,j).catch(z=>{c.eventNames().length?c.emit("error",z):this.handleError(z)}):T==="license-release"?e.keySystem===er.FAIRPLAY&&(this.updateKeySession(e,br("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${T}"`)},d=e._onkeystatuseschange=_=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const T=e.keyStatus;this.onKeyStatusChange(e);const j=e.keyStatus;j!==T&&(c.emit("keyStatus",j,e),j==="expired"&&(this.log(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e)))};ai(e.mediaKeysSession,"message",u),ai(e.mediaKeysSession,"keystatuseschange",d);const p=new Promise((_,w)=>{c.on("error",w),c.on("keyStatus",(T,{decryptdata:j})=>{T.startsWith("usable")?_():T==="internal-error"||T==="output-restricted"?w(Vo(T,j)):T==="expired"?w(new Error(`key expired while generating request (keyId: ${l})`)):this.warn(`unhandled key status change "${T}" (keyId: ${l})`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${l}`)}).catch(_=>{throw new Ui({type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_NO_SESSION,error:_,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${_}`)}).then(()=>p).catch(_=>{throw c.removeAllListeners(),this.removeSession(e),_}).then(()=>(c.removeAllListeners(),e))}onKeyStatusChange(e){const t=U(new Uint8Array(e.decryptdata.keyId||[]));e.mediaKeysSession.keyStatuses.forEach((n,r)=>{if(typeof r=="string"&&typeof n=="object"){const l=r;r=n,n=l}const i=U("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r));n==="internal-error"&&(this.bannedKeyIds[i]=n);const s=i===t;this.log(`${s?"":"un"}matched key status change "${n}" for keyStatuses keyId: ${i} session keyId: ${t} uri: ${e.decryptdata.uri}`),s&&(e.keyStatus=n)})}fetchServerCertificate(e){const t=this.config,n=t.loader,r=new n(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,l)=>{const c={responseType:"arraybuffer",url:i},u=t.certLoadPolicy.default,d={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},p={onSuccess:(_,w,T,j)=>{s(_.data)},onError:(_,w,T,j)=>{l(new Ui({type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:T,response:E({url:c.url,data:void 0},_)},`"${e}" certificate request failed (${i}). Status: ${_.code} (${_.text})`))},onTimeout:(_,w,T)=>{l(new Ui({type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:T,response:{url:c.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(_,w,T)=>{l(new Error("aborted"))}};r.load(c,d,p)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,i)=>{e.setServerCertificate(n).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new Ui({type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new Ui({type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:r,fatal:!1},r.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=new DOMParser().parseFromString(n,"application/xml"),i=r.querySelectorAll("HttpHeader");if(i.length>0){let d;for(let p=0,_=i.length;p<_;p++){var s,l;d=i[p];const w=(s=d.querySelector("name"))==null?void 0:s.textContent,T=(l=d.querySelector("value"))==null?void 0:l.textContent;w&&T&&e.setRequestHeader(w,T)}}const c=r.querySelector("Challenge"),u=c==null?void 0:c.textContent;if(!u)throw new Error("Cannot find <Challenge> in key message");return br(atob(u))}setupLicenseXHR(e,t,n,r){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,n,r)}).catch(s=>{if(!n.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,n,r)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||r})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((r,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let c=l.response;this.log(`License received ${c instanceof ArrayBuffer?c.byteLength:c}`);const u=this.config.licenseResponseCallback;if(u)try{c=u.call(this.hls,l,s,e)}catch(d){this.error(d)}r(c)}else{const c=n.errorRetry,u=c?c.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>u||l.status>=400&&l.status<500)i(new Ui({type:te.KEY_SYSTEM_ERROR,details:M.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:l,response:{url:s,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${s}). Status: ${l.status} (${l.statusText})`));else{const d=u-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${d} attempts left`),this.requestLicense(e,t).then(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,s,e,t).then(({xhr:c,licenseChallenge:u})=>{e.keySystem==er.PLAYREADY&&(u=this.unpackPlayReadyKeyMessage(c,u)),c.send(u)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,ai(n,"encrypted",this.onMediaEncrypted),ai(n,"waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(ci(e,"encrypted",this.onMediaEncrypted),ci(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;if(this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={},!this.mediaKeys&&!this.mediaKeySessions.length)return;const t=this.media,n=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Xr.clearKeyUriToKeyIdMap();const r=n.length;Os.CDMCleanupPromise=Promise.all(n.map(i=>this.removeSession(i)).concat(t==null||(e=t.setMediaKeys(null))==null?void 0:e.catch(i=>{this.log(`Could not clear media keys: ${i}`),this.hls&&this.hls.trigger(f.ERROR,{type:te.OTHER_ERROR,details:M.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${i}`)})}))).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}`),this.hls&&this.hls.trigger(f.ERROR,{type:te.OTHER_ERROR,details:M.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${i}`)})}).then(()=>{r&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this.keyFormatPromise=null,this.bannedKeyIds={}}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((r,i)=>(r.indexOf(i.keyFormat)===-1&&r.push(i.keyFormat),r),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n,decryptdata:r}=e;if(t){this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${U((r==null?void 0:r.keyId)||[])}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);i>-1&&this.mediaKeySessions.splice(i,1);const{drmSystemOptions:s}=this.config;return(Br(s)?new Promise((c,u)=>{self.setTimeout(()=>u(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(c).catch(u)}):Promise.resolve()).catch(c=>{this.log(`Could not remove session: ${c}`),this.hls&&this.hls.trigger(f.ERROR,{type:te.OTHER_ERROR,details:M.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${c}`)})}).then(()=>t.close()).catch(c=>{this.log(`Could not close session: ${c}`),this.hls&&this.hls.trigger(f.ERROR,{type:te.OTHER_ERROR,details:M.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}}}Os.CDMCleanupPromise=void 0;class Ui extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}function Vo(a,e){const t=a==="output-restricted",n=t?M.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:M.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new Ui({type:te.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class vc{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(f.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(f.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const i=r-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/i,u=this.hls;if(u.trigger(f.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){let d=u.currentLevel;u.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=d)&&(d=d-1,u.trigger(f.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:u.currentLevel}),u.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function Wo(a,e){let t;try{t=new Event("addtrack")}catch(n){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function jo(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(e.id))try{if(a.addCue(e),!a.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){Y.debug(`[texttrack-utils]: ${n}`);try{const r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,a.addCue(r)}catch(r){Y.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function Fs(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let n=a.cues.length;n--;)e&&a.cues[n].removeEventListener("enter",e),a.removeCue(a.cues[n]);t==="disabled"&&(a.mode=t)}function za(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=yc(a.cues,e,t);for(let s=0;s<i.length;s++)(!n||n(i[s]))&&a.removeCue(i[s])}r==="disabled"&&(a.mode=r)}function _c(a,e){if(e<=a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let n=0,r=t,i;for(;n<=r;)if(i=Math.floor((r+n)/2),e<a[i].startTime)r=i-1;else if(e>a[i].startTime&&n<t)n=i+1;else return i;return a[n].startTime-e<e-a[r].startTime?n:r}function yc(a,e,t){const n=[],r=_c(a,e);if(r>-1)for(let i=r,s=a.length;i<s;i++){const l=a[i];if(l.startTime>=e&&l.endTime<=t)n.push(l);else if(l.startTime>t)return n}return n}function ha(a){const e=[];for(let t=0;t<a.length;t++){const n=a[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(a[t])}return e}class Ec extends Pa{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const n=ha(this.media.textTracks);for(let i=0;i<n.length;i++)if(n[i].mode==="hidden")t=n[i];else if(n[i].mode==="showing"){t=n[i];break}const r=this.findTrackForTextTrack(t);this.subtitleTrack!==r&&this.setSubtitleTrack(r)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(f.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;ha(n.textTracks).forEach(s=>{Fs(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Subtitle track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(s=>(r==null?void 0:r.indexOf(s))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(d=>!n||n.indexOf(d.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(d=>d.default)&&(this.selectDefaultTrack=!1),s.forEach((d,p)=>{d.id=p});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const l=this.hls.config.subtitlePreference;if(!i&&l){this.selectDefaultTrack=!1;const d=at(l,s);if(d>-1)i=s[d];else{const p=at(l,this.tracks);i=this.tracks[p]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const u={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(f.SUBTITLE_TRACKS_UPDATED,u),c!==-1&&this.trackId===-1&&this.setSubtitleTrack(c)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const i=t[r];if(!(n&&!i.default||!n&&!e)&&(!e||Ot(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if(Xs(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if(Xs(e.attrs,i.attrs,["LANGUAGE"]))return r}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(Oa(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===oe.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&Ot(e,n))return n;const r=at(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=at(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(f.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=ha(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>Oa(n,i))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==r&&(i.mode="disabled")}),r){const i=this.subtitleDisplay?"showing":"hidden";r.mode!==i&&(r.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!x(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(f.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&i)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:s,groupId:l="",name:c,type:u,url:d}=r;this.hls.trigger(f.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:c,type:u,url:d});const p=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(p)}}function bc(){try{return crypto.randomUUID()}catch(a){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r=="x"?i:i&3|8).toString(16)})}}}function Qs(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const Ns=.025;let pa=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function xc(a,e,t){return`${a.identifier}-${t+1}-${Qs(e)}`}class Sc{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){var t;if(e>0&&e>=this.assetList.length)return!0;const n=this.playoutLimit;return e<=0||isNaN(n)?!1:n===0?!0:(((t=this.assetList[e])==null?void 0:t.startOffset)||0)>n}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return $a(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,n=$a(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=x(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return $a(e,t)}return e}get appendInPlace(){return this.appendInPlaceStarted?!0:this.appendInPlaceDisabled?!1:!!(!this.cue.once&&!this.cue.pre&&this.startIsAligned&&(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<Ns))}set appendInPlace(e){if(this.appendInPlaceStarted){this.resetOnResume=!e;return}this.appendInPlaceDisabled=!e}get timelineStart(){return this._timelineStart!==null?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let t;return this._duration!==null?t=this._duration:this.dateRange.duration?t=this.dateRange.duration:t=this.dateRange.plannedDuration||0,!isNaN(e)&&e<t&&(t=e),t}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return this.dateRange.attr["X-TIMELINE-OCCUPIES"]==="RANGE"?pa.Range:pa.Point}get supplementsPrimary(){return this.dateRange.attr["X-TIMELINE-STYLE"]==="PRIMARY"}get contentMayVary(){return this.dateRange.attr["X-CONTENT-MAY-VARY"]!=="NO"}get assetUrl(){return this.dateRange.attr["X-ASSET-URI"]}get assetListUrl(){return this.dateRange.attr["X-ASSET-LIST"]}get baseUrl(){return this.base.url}get assetListLoaded(){return this.assetList.length>0||this.assetListResponse!==null}toString(){return wc(this)}}function $a(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<Ns)?e.start:e.start+e.duration}function Yo(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function Ha(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function wc(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function Ms(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class Ac{constructor(e,t,n,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls&&this.hls.trigger(f.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;const s=()=>{this.hasDetails=!0};i.once(f.LEVEL_LOADED,s),i.once(f.AUDIO_TRACK_LOADED,s),i.once(f.SUBTITLE_TRACK_LOADED,s),i.on(f.MEDIA_ATTACHING,(l,{media:c})=>{this.removeMediaListeners(),this.mediaAttached=c,this.interstitial.playoutLimit&&(c.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(f.BUFFER_APPENDED,()=>{const d=this.bufferedEnd;this.reachedPlayout(d)&&(this._bufferedEosTime=d,i.trigger(f.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){return this.interstitial.appendInPlace}loadSource(){const e=this.hls;if(e)if(e.url)e.levels.length&&!e.started&&e.startLoad(-1,!0);else{let t=this.assetItem.uri;try{t=Yo(t,e.config.primarySessionId||"").href}catch(n){}e.loadSource(t)}}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e)return!1;const n=Math.min(this._bufferedEosTime||1/0,this.duration),r=this.timelineOffset,i=dn.bufferInfo(e,r,0);return this.getAssetTime(i.end)>=n-.02}reachedPlayout(e){const n=this.interstitial.playoutLimit;return this.startOffset+e>=n}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=dn.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;if(!e)return 0;const t=this.interstitial.playoutLimit;if(t){const n=t-this.startOffset;if(n>0&&n<e)return n}return e}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){var t;this.loadSource(),(t=this.hls)==null||t.attachMedia(e)}detachMedia(){var e;this.removeMediaListeners(),this.mediaAttached=null,(e=this.hls)==null||e.detachMedia()}resumeBuffering(){var e;(e=this.hls)==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.hls)==null||e.pauseBuffering()}transferMedia(){var e;return this.bufferSnapShot(),((e=this.hls)==null?void 0:e.transferMedia())||null}resetDetails(){const e=this.hls;if(e&&this.hasDetails){e.stopLoad();const t=n=>delete n.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,n){var r;(r=this.hls)==null||r.on(e,t)}once(e,t,n){var r;(r=this.hls)==null||r.once(e,t)}off(e,t,n){var r;(r=this.hls)==null||r.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${Ms(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const Xo=.033;class Tc extends B{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(i=r[n])!=null&&i.event;){var i;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const i=n[r].event;if(i!=null&&i.restrictions.jump&&!i.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if(((n=t[r].event)==null?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let i=0;i<r;i++){const s=n[i];if(!s.error){const l=s.timelineStart;if(t===l||t>l&&(t<l+(s.duration||0)||i===r-1))return i}}return 0}get assetIdAtEnd(){var e;const t=(e=this.items)==null||(e=e[this.length-1])==null?void 0:e.event;if(t){const n=t.assetList,r=n[n.length-1];if(r)return r.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,i=this.events,s=this.parseDateRanges(r,{url:n.url},t),l=Object.keys(r),c=i?i.filter(u=>!l.includes(u.identifier)):[];s.length&&s.sort((u,d)=>{const p=u.cue.pre,_=u.cue.post,w=d.cue.pre,T=d.cue.post;if(p&&!w)return-1;if(w&&!p||_&&!T)return 1;if(T&&!_)return-1;if(!p&&!w&&!_&&!T){const j=u.startTime,z=d.startTime;if(j!==z)return j-z}return u.dateRange.tagOrder-d.dateRange.tagOrder}),this.events=s,c.forEach(u=>{this.removeEvent(u)}),this.updateSchedule(e,c)}updateSchedule(e,t=[],n=!1){const r=this.events||[];if(r.length||t.length||this.length<2){const i=this.items,s=this.parseSchedule(r,e);(n||t.length||(i==null?void 0:i.length)!==s.length||s.some((c,u)=>Math.abs(c.playout.start-i[u].playout.start)>.005||Math.abs(c.playout.end-i[u].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,n){const r=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const l=i[s],c=e[l];if(c.isInterstitial){let u=this.eventMap[l];u?u.setDateRange(c):(u=new Sc(c,t),this.eventMap[l]=u,n===!1&&(u.appendInPlace=n)),r.push(u)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,i=r.live?1/0:r.edge;let s=0;if(e=e.filter(c=>!c.error&&!(c.cue.once&&c.hasPlayed)),e.length){this.resolveOffsets(e,t);let c=0,u=0;if(e.forEach((d,p)=>{const _=d.cue.pre,w=d.cue.post,T=e[p-1]||null,j=d.appendInPlace,z=w?i:d.startOffset,ce=d.duration,Oe=d.timelineOccupancy===pa.Range?ce:0,we=d.resumptionOffset,it=(T==null?void 0:T.startTime)===z,Et=z+d.cumulativeDuration;let $t=j?Et+ce:z+we;if(_||!w&&z<=0){const Dt=u;u+=Oe,d.timelineStart=Et;const kt=s;s+=ce,n.push({event:d,start:Et,end:$t,playout:{start:kt,end:s},integrated:{start:Dt,end:u}})}else if(z<=i){if(!it){const pt=z-c;if(pt>Xo){const en=c,Zn=u;u+=pt;const ar=s;s+=pt;const pr={previousEvent:e[p-1]||null,nextEvent:d,start:en,end:en+pt,playout:{start:ar,end:s},integrated:{start:Zn,end:u}};n.push(pr)}else pt>0&&T&&(T.cumulativeDuration+=pt,n[n.length-1].end=z)}w&&($t=Et),d.timelineStart=Et;const Dt=u;u+=Oe;const kt=s;s+=ce,n.push({event:d,start:Et,end:$t,playout:{start:kt,end:s},integrated:{start:Dt,end:u}})}else return;const ht=d.resumeTime;w||ht>i?c=i:c=ht}),c<i){var l;const d=c,p=u,_=i-c;u+=_;const w=s;s+=_,n.push({previousEvent:((l=n[n.length-1])==null?void 0:l.event)||null,nextEvent:null,start:c,end:d+_,playout:{start:w,end:s},integrated:{start:p,end:u}})}this.setDurations(i,s,u)}else n.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let i=0,s=-1;e.forEach((l,c)=>{const u=l.cue.pre,d=l.cue.post,p=u?0:d?r:l.startTime;this.updateAssetDurations(l),s===p?l.cumulativeDuration=i:(i=0,s=p),!d&&l.snapOptions.in&&(l.resumeAnchor=Ln(null,n.fragments,l.startOffset+l.resumptionOffset,0,0)||void 0),l.appendInPlace&&!l.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(l,t)||(l.appendInPlace=!1)),!l.appendInPlace&&c+1<e.length&&e[c+1].startTime-e[c].resumeTime<Xo&&(e[c+1].appendInPlace=!1,e[c+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${l}`));const w=x(l.resumeOffset)?l.resumeOffset:l.duration;i+=w})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>Ns?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):!Object.keys(t).some(s=>{const l=t[s].details,c=l.edge;if(n>=c)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${c}`),!1;const u=Ln(null,l.fragments,n);if(!u)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${s} playlist (${l.fragStart}-${l.fragmentEnd})`),!0;const d=s==="audio"?.175:0;return Math.abs(u.start-n)<Ns+d||Math.abs(u.end-n)<Ns+d?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${s} fragment bounds (${u.start}-${u.end} sn: ${u.sn} cc: ${u.cc})`),!0)})}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,i=!1;for(let s=0;s<e.assetList.length;s++){const l=e.assetList[s],c=t+n;l.startOffset=n,l.timelineStart=c,r||(r=l.duration===null),i||(i=!!l.error);const u=l.error?0:l.duration||0;n+=u}r&&!i?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function Ki(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class Dc{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=Yo(n,this.hls.sessionId,e.baseUrl)}catch(_){const w=this.assignAssetListError(e,M.ASSET_LIST_LOAD_ERROR,_,n);this.hls.trigger(f.ERROR,w);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,l=new s(i),c={responseType:"json",url:r.href},u=i.interstitialAssetListLoadPolicy.default,d={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},p={onSuccess:(_,w,T,j)=>{const z=_.data,ce=z==null?void 0:z.ASSETS;if(!Array.isArray(ce)){const Oe=this.assignAssetListError(e,M.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),T.url,w,j);this.hls.trigger(f.ERROR,Oe);return}e.assetListResponse=z,this.hls.trigger(f.ASSET_LIST_LOADED,{event:e,assetListResponse:z,networkDetails:j})},onError:(_,w,T,j)=>{const z=this.assignAssetListError(e,M.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${_.code} ${_.text} (${w.url})`),w.url,j,T);this.hls.trigger(f.ERROR,z)},onTimeout:(_,w,T)=>{const j=this.assignAssetListError(e,M.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${w.url})`),w.url,_,T);this.hls.trigger(f.ERROR,j)}};return l.load(c,d,p),this.hls.trigger(f.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:te.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function Qo(a){a==null||a.play().catch(()=>{})}function ma(a,e){return`[${a}] Advancing timeline position to ${e}`}class Cc extends B{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled||!this.schedule)return;const r=n-this.timelinePos;if(Math.abs(r)<1/7056e5)return;const s=r<=-.01;this.timelinePos=n,this.bufferedPos=n;const l=this.playingItem;if(!l){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(!0),this.checkBuffer(),s&&n<l.start||n>=l.end){var c;const w=this.findItemIndex(l);let T=this.schedule.findItemIndexAtTime(n);if(T===-1&&(T=w+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${w} to ${T})`)),!this.isInterstitial(l)&&(c=this.media)!=null&&c.paused&&(this.shouldPlay=!1),!s&&T>w){const j=this.schedule.findJumpRestrictedIndex(w+1,T);if(j>w){this.setSchedulePosition(j);return}}this.setSchedulePosition(T);return}const u=this.playingAsset;if(!u){if(this.playingLastItem&&this.isInterstitial(l)){const w=l.event.assetList[0];w&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,w))}return}const d=u.timelineStart,p=u.duration||0;if(s&&n<d||n>=d+p){var _;(_=l.event)!=null&&_.appendInPlace&&(this.clearInterstitial(l.event,l),this.flushFrontBuffer(n)),this.setScheduleToAssetAtTime(n,u)}},this.onTimeupdate=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;if(n>this.timelinePos)this.timelinePos=n,n>this.bufferedPos&&this.checkBuffer();else return;const r=this.playingItem;if(!r||this.playingLastItem)return;if(n>=r.end){this.timelinePos=r.end;const l=this.findItemIndex(r);this.setSchedulePosition(l+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);n>=s&&this.setScheduleToAssetAtTime(n,i)},this.onScheduleUpdate=(n,r)=>{const i=this.schedule;if(!i)return;const s=this.playingItem,l=i.events||[],c=i.items||[],u=i.durations,d=n.map(j=>j.identifier),p=!!(l.length||d.length);(p||r)&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
Schedule: ${c.map(j=>Ki(j))} pos: ${this.timelinePos}`),d.length&&this.log(`Removed events ${d}`);let _=null,w=null;s&&(_=this.updateItem(s,this.timelinePos),this.itemsMatch(s,_)?this.playingItem=_:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const T=this.bufferingItem;if(T&&(w=this.updateItem(T,this.bufferedPos),this.itemsMatch(T,w)?this.bufferingItem=w:T.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(T.event,null))),n.forEach(j=>{j.assetList.forEach(z=>{this.clearAssetPlayer(z.identifier,null)})}),this.playerQueue.forEach(j=>{if(j.interstitial.appendInPlace){const z=j.assetItem.timelineStart,ce=j.timelineOffset-z;if(ce)try{j.timelineOffset=z}catch(Oe){Math.abs(ce)>Ns&&this.warn(`${Oe} ("${j.assetId}" ${j.timelineOffset}->${z})`)}}}),p||r){if(this.hls.trigger(f.INTERSTITIALS_UPDATED,{events:l.slice(0),schedule:c.slice(0),durations:u,removedIds:d}),this.isInterstitial(s)&&d.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}s&&this.trimInPlace(_,s),T&&w!==_&&this.trimInPlace(w,T),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Dc(e),this.schedule=new Tc(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(f.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(f.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(f.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(f.BUFFER_APPENDED,this.onBufferAppended,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(f.MEDIA_ENDED,this.onMediaEnded,this),e.on(f.ERROR,this.onError,this),e.on(f.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(f.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(f.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(f.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.BUFFER_APPENDED,this.onBufferAppended,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(f.MEDIA_ENDED,this.onMediaEnded,this),e.off(f.ERROR,this.onError,this),e.off(f.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.schedule=this.manager=null,this.hls=this.HlsPlayerClass=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){ci(e,"play",this.onPlay),ci(e,"pause",this.onPause),ci(e,"seeking",this.onSeeking),ci(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;ai(n,"seeking",this.onSeeking),ai(n,"timeupdate",this.onTimeupdate),ai(n,"play",this.onPlay),ai(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const i=this.findItemIndex(n);this.setSchedulePosition(i)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.log(`Removing schedule state for detachedData and ${i}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=p=>p&&e.getAssetPlayer(p.identifier),r=(p,_,w,T,j)=>{if(p){let z=p[_].start;const ce=p.event;if(ce){if(_==="playout"||ce.timelineOccupancy!==pa.Point){const Oe=n(w);(Oe==null?void 0:Oe.interstitial)===ce&&(z+=Oe.assetItem.startOffset+Oe[j])}}else{const Oe=T==="bufferedPos"?s():e[T];z+=Oe-p.start}return z}return 0},i=(p,_)=>{var w;if(p!==0&&_!=="primary"&&(w=e.schedule)!=null&&w.length){var T;const j=e.schedule.findItemIndexAtTime(p),z=(T=e.schedule.items)==null?void 0:T[j];if(z){const ce=z[_].start-z.start;return p+ce}}return p},s=()=>{const p=e.bufferedPos;return p===Number.MAX_VALUE?l("primary"):Math.max(p,0)},l=p=>{var _,w;return(_=e.primaryDetails)!=null&&_.live?e.primaryDetails.edge:((w=e.schedule)==null?void 0:w.durations[p])||0},c=(p,_)=>{var w,T;const j=e.effectivePlayingItem;if(j!=null&&(w=j.event)!=null&&w.restrictions.skip||!e.schedule)return;e.log(`seek to ${p} "${_}"`);const z=e.effectivePlayingItem,ce=e.schedule.findItemIndexAtTime(p,_),Oe=(T=e.schedule.items)==null?void 0:T[ce],we=e.getBufferingPlayer(),it=we==null?void 0:we.interstitial,Et=it==null?void 0:it.appendInPlace,$t=z&&e.itemsMatch(z,Oe);if(z&&(Et||$t)){const ht=n(e.playingAsset),Dt=(ht==null?void 0:ht.media)||e.primaryMedia;if(Dt){const kt=_==="primary"?Dt.currentTime:r(z,_,e.playingAsset,"timelinePos","currentTime"),pt=p-kt,en=(Et?kt:Dt.currentTime)+pt;if(en>=0&&(!ht||Et||en<=ht.duration)){Dt.currentTime=en;return}}}if(Oe){let ht=p;if(_!=="primary"){const kt=Oe[_].start,pt=p-kt;ht=Oe.start+pt}const Dt=!e.isInterstitial(Oe);if((!e.isInterstitial(z)||z.event.appendInPlace)&&(Dt||Oe.event.appendInPlace)){const kt=e.media||(Et?we==null?void 0:we.media:null);kt&&(kt.currentTime=ht)}else if(z){const kt=e.findItemIndex(z);if(ce>kt){const en=e.schedule.findJumpRestrictedIndex(kt+1,ce);if(en>kt){e.setSchedulePosition(en);return}}let pt=0;if(Dt)e.timelinePos=ht,e.checkBuffer();else{const en=Oe.event.assetList,Zn=p-(Oe[_]||Oe).start;for(let ar=en.length;ar--;){const pr=en[ar];if(pr.duration&&Zn>=pr.startOffset&&Zn<pr.startOffset+pr.duration){pt=ar;break}}}e.setSchedulePosition(ce,pt)}}},u=()=>{const p=e.effectivePlayingItem;if(e.isInterstitial(p))return p;const _=t();return e.isInterstitial(_)?_:null},d={get bufferedEnd(){const p=t(),_=e.bufferingItem;if(_&&_===p){var w;return r(_,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-_.playout.start||((w=e.bufferingAsset)==null?void 0:w.startOffset)||0}return 0},get currentTime(){const p=u(),_=e.effectivePlayingItem;return _&&_===p?r(_,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-_.playout.start:0},set currentTime(p){const _=u(),w=e.effectivePlayingItem;w&&w===_&&c(p+w.playout.start,"playout")},get duration(){const p=u();return p?p.playout.end-p.playout.start:0},get assetPlayers(){var p;const _=(p=u())==null?void 0:p.event.assetList;return _?_.map(w=>e.getAssetPlayer(w.identifier)):[]},get playingIndex(){var p;const _=(p=u())==null?void 0:p.event;return _&&e.effectivePlayingAsset?_.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return u()}};return this.manager={get events(){var p;return((p=e.schedule)==null||(p=p.events)==null?void 0:p.slice(0))||[]},get schedule(){var p;return((p=e.schedule)==null||(p=p.items)==null?void 0:p.slice(0))||[]},get interstitialPlayer(){return u()?d:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const p=t();return e.findItemIndex(p)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const p=e.effectivePlayingItem;return e.findItemIndex(p)},primary:{get bufferedEnd(){return s()},get currentTime(){const p=e.timelinePos;return p>0?p:0},set currentTime(p){c(p,"primary")},get duration(){return l("primary")},get seekableStart(){var p;return((p=e.primaryDetails)==null?void 0:p.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(p){c(p,"integrated")},get duration(){return l("integrated")},get seekableStart(){var p;return i(((p=e.primaryDetails)==null?void 0:p.fragmentStart)||0,"integrated")}},skip:()=>{const p=e.effectivePlayingItem,_=p==null?void 0:p.event;if(_&&!_.restrictions.skip){const w=e.findItemIndex(p);if(_.appendInPlace){const T=p.playout.start+p.event.duration;c(T+.001,"playout")}else e.advanceAfterAssetEnded(_,w,1/0)}}}}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let r=this.media;!r&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(r=this.primaryMedia);const i=(t=r)==null?void 0:t.currentTime;if(!(i===void 0||!x(i)))return i}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r){this.detachedData={media:r};return}const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Vt(i)}`),this.detachedData=i}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let i=null;const s=this.hls,l=e!==s,c=l&&e.interstitial.appendInPlace,u=(n=this.detachedData)==null?void 0:n.mediaSource;let d;if(s.media)c&&(i=s.transferMedia(),this.detachedData=i),d="Primary";else if(u){const T=this.getBufferingPlayer();T?(i=T.transferMedia(),d=`${T}`):d="detached MediaSource"}else d="detached media";if(!i){if(u)i=this.detachedData,this.log(`using detachedData: MediaSource ${Vt(i)}`);else if(!this.detachedData||s.media===t){const T=this.playerQueue;T.length>1&&T.forEach(j=>{if(l&&j.interstitial.appendInPlace!==c){const z=j.interstitial;this.clearInterstitial(j.interstitial,null),z.appendInPlace=!1,z.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${z}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const p=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",_=p&&i?i:t;this.log(`${p?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${d} (media.currentTime: ${t.currentTime})`);const w=this.schedule;if(_===i&&w){const T=l&&e.assetId===w.assetIdAtEnd;_.overrides={duration:w.duration,endOfStream:!l||T,cueRemoval:!l}}e.attachMedia(_)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e==null?void 0:e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const i=this.hls.startPosition;if(this.log(ma("checkStart",i)),this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,l=e.findItemIndexAtTime(s);this.setSchedulePosition(l)}}else if(r&&!this.playingItem){const i=e.findItemIndex(r);this.setSchedulePosition(i)}}advanceAssetBuffering(e,t){const n=e.event,r=n.findAssetIndex(t),i=Ha(n,r);if(!n.isAssetPastPlayoutLimit(i))this.bufferedToEvent(e,i);else if(this.schedule){var s;const l=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];l&&this.bufferedToItem(l)}}advanceAfterAssetEnded(e,t,n){const r=Ha(e,n);if(e.isAssetPastPlayoutLimit(r)){if(this.schedule){const i=this.schedule.items;if(i){const s=t+1,l=i.length;if(s>=l){this.setSchedulePosition(-1);return}const c=e.resumeTime;this.timelinePos<c&&(this.log(ma("advanceAfterAssetEnded",c)),this.timelinePos=c,e.appendInPlace&&this.advanceInPlace(c),this.checkBuffer(this.bufferedPos<c)),this.setSchedulePosition(s)}}}else{if(e.appendInPlace){const i=e.assetList[r];i&&this.advanceInPlace(i.timelineStart)}this.setSchedulePosition(t,r)}}setScheduleToAssetAtTime(e,t){const n=this.schedule;if(!n)return;const r=t.parentIdentifier,i=n.getEvent(r);if(i){const s=n.findEventIndex(r),l=n.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,l-1)}}setSchedulePosition(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(!r||this.playbackDisabled)return;const i=e>=0?r[e]:null;this.log(`setSchedulePosition ${e}, ${t} (${i&&Ki(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,l=this.playingLastItem;if(this.isInterstitial(s)){const d=s.event,p=this.playingAsset,_=p==null?void 0:p.identifier,w=_?this.getAssetPlayer(_):null;if(w&&_&&(!this.eventItemsMatch(s,i)||t!==void 0&&_!==d.assetList[t].identifier)){var c;const T=d.findAssetIndex(p);if(this.log(`INTERSTITIAL_ASSET_ENDED ${T+1}/${d.assetList.length} ${Ms(p)}`),this.endedAsset=p,this.playingAsset=null,this.hls.trigger(f.INTERSTITIAL_ASSET_ENDED,{asset:p,assetListIndex:T,event:d,schedule:r.slice(0),scheduleIndex:e,player:w}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(d,this.findItemIndex(this.playingItem),T);return}this.retreiveMediaSource(_,i),w.media&&!((c=this.detachedData)!=null&&c.mediaSource)&&w.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${d} ${Ki(s)}`),d.hasPlayed=!0,this.hls.trigger(f.INTERSTITIAL_ENDED,{event:d,schedule:r.slice(0),scheduleIndex:e}),d.cue.once)){var u;this.updateSchedule();const T=(u=this.schedule)==null?void 0:u.items;if(i&&T){const j=this.findItemIndex(i);this.advanceSchedule(j,T,t,s,l)}return}}this.advanceSchedule(e,r,t,s,l)}advanceSchedule(e,t,n,r,i){const s=this.schedule;if(!s)return;const l=t[e]||null,c=this.primaryMedia,u=this.playerQueue;if(u.length&&u.forEach(d=>{const p=d.interstitial,_=s.findEventIndex(p.identifier);(_<e||_>e+1)&&this.clearInterstitial(p,l)}),this.isInterstitial(l)){this.timelinePos=Math.min(Math.max(this.timelinePos,l.start),l.end);const d=l.event;if(n===void 0){n=s.findAssetIndex(d,this.timelinePos);const T=Ha(d,n-1);if(d.isAssetPastPlayoutLimit(T)||d.appendInPlace&&this.timelinePos===l.end){this.advanceAfterAssetEnded(d,e,n);return}n=T}const p=this.waitingItem;this.assetsBuffered(l,c)||this.setBufferingItem(l);let _=this.preloadAssets(d,n);if(this.eventItemsMatch(l,p||r)||(this.waitingItem=l,this.log(`INTERSTITIAL_STARTED ${Ki(l)} ${d.appendInPlace?"append in place":""}`),this.hls.trigger(f.INTERSTITIAL_STARTED,{event:d,schedule:t.slice(0),scheduleIndex:e})),!d.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${d}`);return}if(d.assetListLoader&&(d.assetListLoader.destroy(),d.assetListLoader=void 0),!c){this.log(`Waiting for attachMedia to start Interstitial ${d}`);return}this.waitingItem=this.endedItem=null,this.playingItem=l;const w=d.assetList[n];if(!w){this.advanceAfterAssetEnded(d,e,n||0);return}if(_||(_=this.getAssetPlayer(w.identifier)),_===null||_.destroyed){const T=d.assetList.length;this.warn(`asset ${n+1}/${T} player destroyed ${d}`),_=this.createAssetPlayer(d,w,n),_.loadSource()}if(!this.eventItemsMatch(l,this.bufferingItem)&&d.appendInPlace&&this.isAssetBuffered(w))return;this.startAssetPlayer(_,n,t,e,c),this.shouldPlay&&Qo(_.media)}else l?(this.resumePrimary(l,e,r),this.shouldPlay&&Qo(this.hls.media)):i&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(s.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e;return(e=this.mediaSelection)==null?void 0:e.main.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,n){var r,i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${Ki(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let l=this.timelinePos;(l<e.start||l>=e.end)&&(l=this.getPrimaryResumption(e,t),this.log(ma("resumePrimary",l)),this.timelinePos=l),this.attachPrimary(l,e)}if(!n)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${Ki(e)}`),this.hls.trigger(f.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const r=this.primaryDetails;if(t===0)return this.hls.startPosition;if(r&&(n<r.fragmentStart||n>r.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:dn.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.log(ma("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs((((n=r.mainForwardBufferInfo)==null?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){var e;this.stopLoad(),(e=this.schedule)==null||e.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(f.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(f.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1||!this.schedule)return;const n=this.hls.levels[t.level],r=E(E({},this.mediaSelection||this.altSelection),{},{main:n});this.mediaSelection=r,this.schedule.parseInterstitialDateRanges(r,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const n=this.hls.audioTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=E(E({},this.altSelection),{},{audio:n});return}const i=E(E({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=E(E({},this.altSelection),{},{subtitles:n});return}const i=E(E({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=ct(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=ct(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setSubtitleOption(t)||t.id!==-1&&r.setSubtitleOption(n)))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const r=this.timelinePos;this.bufferedPos=r,this.checkBuffer()}}onBufferedToEnd(e){if(!this.schedule)return;const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let r=0;r<t.length;r++){const i=t[r];if(i.cue.post){var n;const s=this.schedule.findEventIndex(i.identifier),l=(n=this.schedule.items)==null?void 0:n[s];this.isInterstitial(l)&&this.eventItemsMatch(l,this.bufferingItem)&&this.bufferedToItem(l,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(e&&r){const i=this.findItemIndex(e,t);return r[i]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((i,s)=>{e.event.isAssetPastPlayoutLimit(s)&&this.clearAssetPlayer(i.identifier,null)});const n=e.end+.25,r=dn.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${Ki(e)} (was ${Ki(t)})`),this.attachPrimary(n,null,!0),this.flushFrontBuffer(n))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e&&this.schedule?this.schedule.findItemIndex(e,t):-1}updateSchedule(e=!1){var t;const n=this.mediaSelection;n&&((t=this.schedule)==null||t.updateSchedule(n,[],e))}checkBuffer(e){var t;const n=(t=this.schedule)==null?void 0:t.items;if(!n)return;const r=dn.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,n,e)}updateBufferedPos(e,t,n){const r=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e||!r)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,l=this.findItemIndex(s);let c=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var u;const d=this.findItemIndex(i),p=Math.min(d+1,t.length-1),_=t[p];if((c===-1&&i&&e>=i.end||(u=_.event)!=null&&u.appendInPlace&&e+.01>=_.start)&&(c=p),this.isInterstitial(i)){const w=i.event;if(p-l>1&&w.appendInPlace===!1||w.assetList.length===0&&w.assetListLoader)return}if(this.bufferedPos=e,c>d&&c>l)this.bufferedToItem(_);else{const w=this.primaryDetails;this.primaryLive&&w&&e>w.edge-w.targetduration&&_.start<w.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(_)&&this.preloadAssets(_.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(c===l?this.bufferedToItem(s):c===l+1&&this.bufferedToItem(t[c]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(r=>{const i=this.getAssetPlayer(r.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(!this.itemsMatch(e,t)&&n){const{items:r,events:i}=n;if(!r||!i)return t;const s=this.isInterstitial(e),l=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const c=l?l.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${Ki(e)}`+(t?` (${c.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const u=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((d,p)=>{const _=this.getAssetPlayer(d.identifier);_&&(p===u&&_.loadSource(),_.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(u=>u.pauseBuffering());this.hls.trigger(f.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const r=this.detachedData;r?r.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=n.assetList.length===0&&!n.assetListLoader,i=n.cue.once;if(r||!i){const s=this.preloadAssets(n,t);if(s!=null&&s.interstitial.appendInPlace){const l=this.primaryMedia;l&&this.bufferAssetPlayer(s,l)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,i=r===0&&!e.assetListLoader,s=e.cue.once;if(i){const c=e.timelineStart;if(e.appendInPlace){var l;const _=this.playingItem;!this.isInterstitial(_)&&(_==null||(l=_.nextEvent)==null?void 0:l.identifier)===e.identifier&&this.flushFrontBuffer(c+.25)}let u,d=0;if(!this.playingItem&&this.primaryLive&&(d=this.hls.startPosition,d===-1&&(d=this.hls.liveSyncPosition||0)),d&&!(e.cue.pre||e.cue.post)){const _=d-c;_>0&&(u=Math.round(_*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${u?` live-start: ${d} start-offset: ${u}`:""}`),n)return this.createAsset(e,0,0,c,e.duration,n);const p=this.assetListLoader.loadAssetList(e,u);p&&(e.assetListLoader=p)}else if(!s&&r){for(let u=t;u<r;u++){const d=e.assetList[u],p=this.getAssetPlayerQueueIndex(d.identifier);(p===-1||this.playerQueue[p].destroyed)&&!d.error&&this.createAssetPlayer(e,d,u)}const c=e.assetList[t];if(c){const u=this.getAssetPlayer(c.identifier);return u&&u.loadSource(),u}}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(r=>{this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,r,i,s){const l={parentIdentifier:e.identifier,identifier:xc(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,l,t)}createAssetPlayer(e,t,n){const r=this.hls,i=r.userConfig;let s=i.videoPreference;const l=r.loadLevelObj||r.levels[r.currentLevel];(s||l)&&(s=h({},s),l.videoCodec&&(s.videoCodec=l.videoCodec),l.videoRange&&(s.allowedVideoRanges=[l.videoRange]));const c=r.audioTracks[r.audioTrack],u=r.subtitleTracks[r.subtitleTrack];let d=0;if(this.primaryLive||e.appendInPlace){const it=this.timelinePos-t.timelineStart;if(it>1){const Et=t.duration;Et&&it<Et&&(d=it)}}const p=t.identifier,_=E(E({},i),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:p,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:d,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:c||i.audioPreference,subtitlePreference:u||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(_.timelineOffset=t.timelineStart));const w=_.cmcd;w!=null&&w.sessionId&&w.contentId&&(_.cmcd=h({},w,{contentId:Qs(t.uri)})),this.getAssetPlayer(p)&&this.warn(`Duplicate date range identifier ${e} and asset ${p}`);const T=new Ac(this.HlsPlayerClass,_,e,t);this.playerQueue.push(T),e.assetList[n]=t;let j=!0;const z=it=>{if(it.live){var Et;const Dt=new Error(`Interstitials MUST be VOD assets ${e}`),kt={fatal:!0,type:te.OTHER_ERROR,details:M.INTERSTITIAL_ASSET_ITEM_ERROR,error:Dt},pt=((Et=this.schedule)==null?void 0:Et.findEventIndex(e.identifier))||-1;this.handleAssetItemError(kt,e,pt,n,Dt.message);return}const $t=it.edge-it.fragmentStart,ht=t.duration;(j||ht===null||$t>ht)&&(j=!1,this.log(`Interstitial asset "${p}" duration change ${ht} > ${$t}`),t.duration=$t,this.updateSchedule())};T.on(f.LEVEL_UPDATED,(it,{details:Et})=>z(Et)),T.on(f.LEVEL_PTS_UPDATED,(it,{details:Et})=>z(Et)),T.on(f.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const ce=(it,Et)=>{const $t=this.getAssetPlayer(p);if($t&&Et.tracks){$t.off(f.BUFFER_CODECS,ce),$t.tracks=Et.tracks;const ht=this.primaryMedia;this.bufferingAsset===$t.assetItem&&ht&&!$t.media&&this.bufferAssetPlayer($t,ht)}};T.on(f.BUFFER_CODECS,ce);const Oe=()=>{var it;const Et=this.getAssetPlayer(p);if(this.log(`buffered to end of asset ${Et}`),!Et||!this.schedule)return;const $t=this.schedule.findEventIndex(e.identifier),ht=(it=this.schedule.items)==null?void 0:it[$t];this.isInterstitial(ht)&&this.advanceAssetBuffering(ht,t)};T.on(f.BUFFERED_TO_END,Oe);const we=it=>()=>{if(!this.getAssetPlayer(p)||!this.schedule)return;this.shouldPlay=!0;const $t=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,$t,it)};return T.once(f.MEDIA_ENDED,we(n)),T.once(f.PLAYOUT_LIMIT_REACHED,we(1/0)),T.on(f.ERROR,(it,Et)=>{if(!this.schedule)return;const $t=this.getAssetPlayer(p);if(Et.details===M.BUFFER_STALLED_ERROR){if($t!=null&&$t.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(Et,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${Et.error} ${e}`)}),T.on(f.DESTROYING,()=>{if(!this.getAssetPlayer(p)||!this.schedule)return;const Et=new Error(`Asset player destroyed unexpectedly ${p}`),$t={fatal:!0,type:te.OTHER_ERROR,details:M.INTERSTITIAL_ASSET_ITEM_ERROR,error:Et};this.handleAssetItemError($t,e,this.schedule.findEventIndex(e.identifier),n,Et.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${Ms(t)}`),this.hls.trigger(f.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:T}),T}clearInterstitial(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)}),e.reset()}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(t!==-1){this.log(`reset asset player "${e}" after error`);const n=this.playerQueue[t];this.transferMediaFromPlayer(n,null),n.resetDetails()}}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){const r=this.playerQueue[n];this.log(`clear ${r} toSegment: ${t&&Ki(t)}`),this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,i){const{interstitial:s,assetItem:l,assetId:c}=e,u=s.assetList.length,d=this.playingAsset;this.endedAsset=null,this.playingAsset=l,(!d||d.identifier!==c)&&(d&&(this.clearAssetPlayer(d.identifier,n[r]),delete d.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${u} ${Ms(l)}`),this.hls.trigger(f.INTERSTITIAL_ASSET_STARTED,{asset:l,assetListIndex:t,event:s,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var n,r;if(!this.schedule)return;const{interstitial:i,assetItem:s}=e,l=this.schedule.findEventIndex(i.identifier),c=(n=this.schedule.items)==null?void 0:n[l];if(!c)return;e.loadSource(),this.setBufferingItem(c),this.bufferingAsset=s;const u=this.getBufferingPlayer();if(u===e)return;const d=i.appendInPlace;if(d&&(u==null?void 0:u.interstitial.appendInPlace)===!1)return;const p=(u==null?void 0:u.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(d&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(p&&!ae(p,e.tracks)){const _=new Error(`Asset ${Ms(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(p)}')`),w={fatal:!0,type:te.OTHER_ERROR,details:M.INTERSTITIAL_ASSET_ITEM_ERROR,error:_},T=i.findAssetIndex(s);this.handleAssetItemError(w,i,l,T,_.message);return}}this.transferMediaTo(e,t)}handleInPlaceStall(e){const t=this.schedule,n=this.primaryMedia;if(!t||!n)return;const r=n.currentTime,i=t.findAssetIndex(e,r),s=e.assetList[i];if(s){const l=this.getAssetPlayer(s.identifier);if(l){const c=l.currentTime||r-s.timelineStart,u=l.duration-c;if(this.warn(`Stalled at ${c} of ${c+u} in ${l} ${e} (media.currentTime: ${r})`),c&&(u/n.playbackRate<.5||l.bufferedInPlaceToEnd(n))&&l.hls){const d=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,d,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,n,r,i){if(e.details===M.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&Ms(s)} ${e.error}`),!this.schedule)return;const l=(s==null?void 0:s.identifier)||"",c=this.getAssetPlayerQueueIndex(l),u=this.playerQueue[c]||null,d=this.schedule.items,p=h({},e,{fatal:!1,errorAction:ot(!0),asset:s,assetListIndex:r,event:t,schedule:d,scheduleIndex:n,player:u});if(this.hls.trigger(f.INTERSTITIAL_ASSET_ERROR,p),!e.fatal)return;const _=this.playingAsset,w=this.bufferingAsset,T=new Error(i);if(s&&(this.clearAssetPlayer(l,null),s.error=T),!t.assetList.some(j=>!j.error))t.error=T;else for(let j=r;j<t.assetList.length;j++)this.resetAssetPlayer(t.assetList[j].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):_&&_.identifier===l?this.advanceAfterAssetEnded(t,n,r):w&&w.identifier===l&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,w)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;if(n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${Ki(n)} error: ${e.error}`);let r=this.timelinePos;r===-1&&(r=this.hls.startPosition);const i=this.updateItem(n,r);if(this.itemsMatch(n,i)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t)),!this.schedule)return;const s=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(s)}else this.checkStart()}onAssetListLoaded(e,t){var n,r;const i=t.event,s=i.identifier,l=t.assetListResponse.ASSETS;if(!((n=this.schedule)!=null&&n.hasEvent(s)))return;const c=i.timelineStart,u=i.duration;let d=0;l.forEach((j,z)=>{const ce=parseFloat(j.DURATION);this.createAsset(i,z,d,c+d,ce,j.URI),d+=ce}),i.duration=d,this.log(`Loaded asset-list with duration: ${d} (was: ${u}) ${i}`);const p=this.waitingItem,_=(p==null?void 0:p.event.identifier)===s;this.updateSchedule();const w=(r=this.bufferingItem)==null?void 0:r.event;if(_){var T;const j=this.schedule.findEventIndex(s),z=(T=this.schedule.items)==null?void 0:T[j];if(z){if(!this.playingItem&&this.timelinePos>z.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==j){i.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${i}`),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem(z)}this.setSchedulePosition(j)}else if((w==null?void 0:w.identifier)===s){const j=i.assetList[0];if(j){const z=this.getAssetPlayer(j.identifier);if(w.appendInPlace){const ce=this.primaryMedia;z&&ce&&this.bufferAssetPlayer(z,ce)}else z&&z.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case M.ASSET_LIST_PARSING_ERROR:case M.ASSET_LIST_LOAD_ERROR:case M.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case M.BUFFER_STALLED_ERROR:{const n=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&n.event.appendInPlace){this.handleInPlaceStall(n.event);return}this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Jo=500;class Rc extends Bi{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",Q.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(f.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(f.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Xt.IDLE,this.setInterval(Jo),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:r}=t;if(this.fragContextChanged(n)||(ue(n)&&(this.fragPrevious=n),this.state=Xt.IDLE),!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const l=n.start;for(let u=0;u<i.length;u++)if(l>=i[u].start&&l<=i[u].end){s=i[u];break}const c=n.start+n.duration;s?s.end=c:(s={start:l,end:c},i.push(s)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(n===0&&r!==Number.POSITIVE_INFINITY){const i=r-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let l=0;l<s.length;){if(s[l].end<=i){s.shift();continue}else if(s[l].start<i)s[l].start=i;else break;l++}}),this.fragmentTracker.removeFragmentsInRange(n,i,Q.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===Q.SUBTITLE&&(t.details===M.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Xt.STOPPED&&(this.state=Xt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&Do(this.levels,t)){this.levels=t.map(n=>new yt(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new yt(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Q.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,!((n=this.levels)!=null&&n.length)||this.currentTrackId===-1){this.clearInterval();return}const r=this.levels[this.currentTrackId];r!=null&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.state!==Xt.STOPPED&&this.setInterval(Jo)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:l}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${l}`);return}const c=i[l];if(l>=i.length||!c)return;this.log(`Subtitle track ${l} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let u=0;if(s.live||(n=c.details)!=null&&n.live){if(s.deltaUpdateFailed)return;const p=this.mainDetails;if(!p){this.startFragRequested=!1;return}const _=p.fragments[0];if(!c.details)s.hasProgramDateTime&&p.hasProgramDateTime?(yi(s,p),u=s.fragmentStart):_&&(u=_.start,mi(s,u));else{var d;u=this.alignPlaylists(s,c.details,(d=this.levelLastLoaded)==null?void 0:d.details),u===0&&_&&(u=_.start,mi(s,u))}p&&!this.startFragRequested&&this.setStartPosition(p,u)}c.details=s,this.levelLastLoaded=c,l===r&&(this.hls.trigger(f.SUBTITLE_TRACK_UPDATED,{details:s,id:l,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Xt.IDLE&&(Ln(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),c.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&Nr(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Er(r.method)).catch(l=>{throw i.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const c=performance.now();i.trigger(f.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:c}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=Xt.IDLE})}}doTick(){if(!this.media){this.state=Xt.IDLE;return}if(this.state===Xt.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details||this.waitForLive(n))return;const{config:r}=this,i=this.getLoadPosition(),s=dn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:l,len:c}=s,u=n.details,d=this.hls.maxBufferLength+u.levelTargetDuration;if(c>d)return;const p=u.fragments,_=p.length,w=u.edge;let T=null;const j=this.fragPrevious;if(l<w){const Oe=r.maxFragLookUpTolerance,we=l>w-Oe?0:Oe;T=Ln(j,p,Math.max(p[0].start,l),we),!T&&j&&j.start<p[0].start&&(T=p[0])}else T=p[_-1];if(T=this.filterReplacedPrimary(T,n.details),!T)return;const z=T.sn-u.startSN,ce=p[z-1];if(ce&&ce.cc===T.cc&&this.fragmentTracker.getState(ce)===lt.NOT_LOADED&&(T=ce),this.fragmentTracker.getState(T)===lt.NOT_LOADED){const Oe=this.mapToInitFragWhenRequired(T);Oe&&this.loadFragment(Oe,n,l)}}}loadFragment(e,t,n){ue(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new Ic(this.tracksBuffered[this.currentTrackId]||[])}}class Ic{constructor(e){this.buffered=void 0;const t=(n,r,i)=>{if(r=r>>>0,r>i-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${i})`);return e[r][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const Lc={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},qo=a=>String.fromCharCode(Lc[a]||a),Zi=15,cs=100,kc={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Pc={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Oc={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Fc={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Nc=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Mc{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;Y.log(`${this.time} [${e}] ${n}`)}}}const Ss=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class el{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Bc{constructor(){this.uchar=" ",this.penState=new el}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class Uc{constructor(e){this.chars=[],this.pos=0,this.currPenState=new el,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<cs;t++)this.chars.push(new Bc);this.logger=e}equals(e){for(let t=0;t<cs;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<cs;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<cs;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>cs&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=cs)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=qo(e);if(this.pos>=cs){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1)}clearFromPos(e){let t;for(t=e;t<cs;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<cs;n++){const r=this.chars[n].uchar;r!==" "&&(t=!1),e.push(r)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class Ga{constructor(e){this.rows=[],this.currRow=Zi-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Zi;t++)this.rows.push(new Uc(e));this.logger=e}reset(){for(let e=0;e<Zi;e++)this.rows[e].clear();this.currRow=Zi-1}equals(e){let t=!0;for(let n=0;n<Zi;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<Zi;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Zi;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+Vt(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let l=0;l<Zi;l++)this.rows[l].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const l=s.rows[i].cueStartTime,c=this.logger.time;if(l!==null&&c!==null&&l<c)for(let u=0;u<this.nrRollUpRows;u++)this.rows[t-this.nrRollUpRows+u+1].copy(s.rows[i+u])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);n.setCursor(e.indent),e.color=n.chars[s].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+Vt(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",r=-1;for(let i=0;i<Zi;i++){const s=this.rows[i].getTextString();s&&(r=i+1,e?t.push("Row "+r+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
`)),n}getTextAndFormat(){return this.rows}}class tl{constructor(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Ga(n),this.nonDisplayedMemory=new Ga(n),this.lastOutputScreen=new Ga(n),this.currRollUpRow=this.displayedMemory.rows[Zi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Zi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}this.logger.log(2,"MIDROW: "+Vt(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class nl{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Zc(),this.logger=void 0;const r=this.logger=new Mc;this.channels=[null,new tl(e,t,r),new tl(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=t[n]&127,i=t[n+1]&127;let s=!1,l=null;if(r===0&&i===0)continue;this.logger.log(3,()=>"["+Ss([t[n],t[n+1]])+"] -> ("+Ss([r,i])+")");const c=this.cmdHistory;if(r>=16&&r<=31){if(Kc(r,i,c)){ga(null,null,c),this.logger.log(3,()=>"Repeated command ("+Ss([r,i])+") is dropped");continue}ga(r,i,this.cmdHistory),s=this.parseCmd(r,i),s||(s=this.parseMidrow(r,i)),s||(s=this.parsePAC(r,i)),s||(s=this.parseBackgroundAttributes(r,i))}else ga(null,null,c);if(!s&&(l=this.parseChars(r,i),l)){const d=this.currentChannel;d&&d>0?this.channels[d].insertChars(l):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!l&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Ss([r,i])+" orig: "+Ss([t[n],t[n+1]]))}}parseCmd(e,t){const n=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=33&&t<=35;if(!(n||r))return!1;const i=e===20||e===21||e===23?1:2,s=this.channels[i];return e===20||e===21||e===28||e===29?t===32?s.ccRCL():t===33?s.ccBS():t===34?s.ccAOF():t===35?s.ccAON():t===36?s.ccDER():t===37?s.ccRU(2):t===38?s.ccRU(3):t===39?s.ccRU(4):t===40?s.ccFON():t===41?s.ccRDC():t===42?s.ccTR():t===43?s.ccRTD():t===44?s.ccEDM():t===45?s.ccCR():t===46?s.ccENM():t===47&&s.ccEOC():s.ccTO(t-32),this.currentChannel=i,!0}parseMidrow(e,t){let n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return r?(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+Ss([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const r=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(r||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?n=s===1?kc[e]:Oc[e]:n=s===1?Pc[e]:Fc[e];const l=this.channels[s];return l?(l.setPAC(this.interpretPAC(n,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,r.underline=(n&1)===1,n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=Math.floor((n-16)/2)*4,r}parseChars(e,t){let n,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){let s;i===17?s=t+80:i===18?s=t+112:s=t+144,this.logger.log(2,()=>"Special char '"+qo(s)+"' in channel "+n),r=[s]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+Ss(r).join(",")),r}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=45&&t<=47;if(!(n||r))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=Nc[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const l=e<=23?1:2;return this.channels[l].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}ga(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function ga(a,e,t){t.a=a,t.b=e}function Kc(a,e,t){return t.a===a&&t.b===e}function Zc(){return{a:null,b:null}}var Va=function(){if(sr!=null&&sr.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(l,c){if(typeof c!="string"||!Array.isArray(l))return!1;const u=c.toLowerCase();return~l.indexOf(u)?u:!1}function n(l){return t(a,l)}function r(l){return t(e,l)}function i(l,...c){let u=1;for(;u<arguments.length;u++){const d=arguments[u];for(const p in d)l[p]=d[p]}return l}function s(l,c,u){const d=this,p={enumerable:!0};d.hasBeenReset=!1;let _="",w=!1,T=l,j=c,z=u,ce=null,Oe="",we=!0,it="auto",Et="start",$t=50,ht="middle",Dt=50,kt="middle";Object.defineProperty(d,"id",i({},p,{get:function(){return _},set:function(pt){_=""+pt}})),Object.defineProperty(d,"pauseOnExit",i({},p,{get:function(){return w},set:function(pt){w=!!pt}})),Object.defineProperty(d,"startTime",i({},p,{get:function(){return T},set:function(pt){if(typeof pt!="number")throw new TypeError("Start time must be set to a number.");T=pt,this.hasBeenReset=!0}})),Object.defineProperty(d,"endTime",i({},p,{get:function(){return j},set:function(pt){if(typeof pt!="number")throw new TypeError("End time must be set to a number.");j=pt,this.hasBeenReset=!0}})),Object.defineProperty(d,"text",i({},p,{get:function(){return z},set:function(pt){z=""+pt,this.hasBeenReset=!0}})),Object.defineProperty(d,"region",i({},p,{get:function(){return ce},set:function(pt){ce=pt,this.hasBeenReset=!0}})),Object.defineProperty(d,"vertical",i({},p,{get:function(){return Oe},set:function(pt){const en=n(pt);if(en===!1)throw new SyntaxError("An invalid or illegal string was specified.");Oe=en,this.hasBeenReset=!0}})),Object.defineProperty(d,"snapToLines",i({},p,{get:function(){return we},set:function(pt){we=!!pt,this.hasBeenReset=!0}})),Object.defineProperty(d,"line",i({},p,{get:function(){return it},set:function(pt){if(typeof pt!="number"&&pt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");it=pt,this.hasBeenReset=!0}})),Object.defineProperty(d,"lineAlign",i({},p,{get:function(){return Et},set:function(pt){const en=r(pt);if(!en)throw new SyntaxError("An invalid or illegal string was specified.");Et=en,this.hasBeenReset=!0}})),Object.defineProperty(d,"position",i({},p,{get:function(){return $t},set:function(pt){if(pt<0||pt>100)throw new Error("Position must be between 0 and 100.");$t=pt,this.hasBeenReset=!0}})),Object.defineProperty(d,"positionAlign",i({},p,{get:function(){return ht},set:function(pt){const en=r(pt);if(!en)throw new SyntaxError("An invalid or illegal string was specified.");ht=en,this.hasBeenReset=!0}})),Object.defineProperty(d,"size",i({},p,{get:function(){return Dt},set:function(pt){if(pt<0||pt>100)throw new Error("Size must be between 0 and 100.");Dt=pt,this.hasBeenReset=!0}})),Object.defineProperty(d,"align",i({},p,{get:function(){return kt},set:function(pt){const en=r(pt);if(!en)throw new SyntaxError("An invalid or illegal string was specified.");kt=en,this.hasBeenReset=!0}})),d.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class zc{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function rl(a){function e(n,r,i,s){return(n|0)*3600+(r|0)*60+(i|0)+parseFloat(s||0)}const t=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class $c{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function il(a,e,t,n){const r=n?a.split(n):[a];for(const i in r){if(typeof r[i]!="string")continue;const s=r[i].split(t);if(s.length!==2)continue;const l=s[0],c=s[1];e(l,c)}}const Wa=new Va(0,0,""),va=Wa.align==="middle"?"middle":"center";function Hc(a,e,t){const n=a;function r(){const l=rl(a);if(l===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),l}function i(l,c){const u=new $c;il(l,function(_,w){let T;switch(_){case"region":for(let j=t.length-1;j>=0;j--)if(t[j].id===w){u.set(_,t[j].region);break}break;case"vertical":u.alt(_,w,["rl","lr"]);break;case"line":T=w.split(","),u.integer(_,T[0]),u.percent(_,T[0])&&u.set("snapToLines",!1),u.alt(_,T[0],["auto"]),T.length===2&&u.alt("lineAlign",T[1],["start",va,"end"]);break;case"position":T=w.split(","),u.percent(_,T[0]),T.length===2&&u.alt("positionAlign",T[1],["start",va,"end","line-left","line-right","auto"]);break;case"size":u.percent(_,w);break;case"align":u.alt(_,w,["start",va,"end","left","right"]);break}},/:/,/\s/),c.region=u.get("region",null),c.vertical=u.get("vertical","");let d=u.get("line","auto");d==="auto"&&Wa.line===-1&&(d=-1),c.line=d,c.lineAlign=u.get("lineAlign","start"),c.snapToLines=u.get("snapToLines",!0),c.size=u.get("size",100),c.align=u.get("align",va);let p=u.get("position","auto");p==="auto"&&Wa.position===50&&(p=c.align==="start"||c.align==="left"?0:c.align==="end"||c.align==="right"?100:50),c.position=p}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=r(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);a=a.slice(3),s(),e.endTime=r(),s(),i(a,e)}function sl(a){return a.replace(/<br(?: \/)?>/gi,`
`)}class Gc{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new zc,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function n(){let i=t.buffer,s=0;for(i=sl(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
`;)++s;const l=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
`&&++s,t.buffer=i.slice(s),l}function r(i){il(i,function(s,l){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=n();const l=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(l!=null&&l[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new Va(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Hc(i,t.cue,t.regionList)}catch(l){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const l=i.indexOf("-->")!==-1;if(!i||l&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
`),t.cue.text+=i}continue;case"BADCUE":i||(t.state="ID")}}}catch(i){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const Vc=/\r\n|\n\r|\n|\r/g,ja=function(e,t,n=0){return e.slice(n,n+t.length)===t},Wc=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!x(t)||!x(n)||!x(r)||!x(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function Ya(a,e,t){return Qs(a.toString())+Qs(e.toString())+Qs(t)}const jc=function(e,t,n){let r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC]}e.presentationOffset=n};function Yc(a,e,t,n,r,i,s){const l=new Gc,c=Be(new Uint8Array(a)).trim().replace(Vc,`
`).split(`
`),u=[],d=e?su(e.baseTime,e.timescale):0;let p="00:00.000",_=0,w=0,T,j=!0;l.oncue=function(z){const ce=t[n];let Oe=t.ccOffset;const we=(_-d)/9e4;if(ce!=null&&ce.new&&(w!==void 0?Oe=t.ccOffset=ce.start:jc(t,n,we)),we){if(!e){T=new Error("Missing initPTS for VTT MPEGTS");return}Oe=we-t.presentationOffset}const it=z.endTime-z.startTime,Et=Li((z.startTime+Oe-w)*9e4,r*9e4)/9e4;z.startTime=Math.max(Et,0),z.endTime=Math.max(Et+it,0);const $t=z.text.trim();z.text=decodeURIComponent(encodeURIComponent($t)),z.id||(z.id=Ya(z.startTime,z.endTime,$t)),z.endTime>0&&u.push(z)},l.onparsingerror=function(z){T=z},l.onflush=function(){if(T){s(T);return}i(u)},c.forEach(z=>{if(j)if(ja(z,"X-TIMESTAMP-MAP=")){j=!1,z.slice(16).split(",").forEach(ce=>{ja(ce,"LOCAL:")?p=ce.slice(6):ja(ce,"MPEGTS:")&&(_=parseInt(ce.slice(7)))});try{w=Wc(p)/1e3}catch(ce){T=ce}return}else z===""&&(j=!1);l.parse(z+`
`)}),l.flush()}const Xa="stpp.ttml.im1t",al=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ol=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Xc={left:"start",center:"center",right:"end",start:"start",end:"end"};function ll(a,e,t,n){const r=K(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(l=>Be(l)),s=iu(e.baseTime,1,e.timescale);try{i.forEach(l=>t(Qc(l,s)))}catch(l){n(l)}}function Qc(a,e){const r=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((p,_)=>(p[_]=r.getAttribute(`ttp:${_}`)||i[_],p),{}),l=r.getAttribute("xml:space")!=="preserve",c=ul(Qa(r,"styling","style")),u=ul(Qa(r,"layout","region")),d=Qa(r,"body","[begin]");return[].map.call(d,p=>{const _=cl(p,l);if(!_||!p.hasAttribute("begin"))return null;const w=qa(p.getAttribute("begin"),s),T=qa(p.getAttribute("dur"),s);let j=qa(p.getAttribute("end"),s);if(w===null)throw fl(p);if(j===null){if(T===null)throw fl(p);j=w+T}const z=new Va(w-e,j-e,_);z.id=Ya(z.startTime,z.endTime,z.text);const ce=u[p.getAttribute("region")],Oe=c[p.getAttribute("style")],we=Jc(ce,Oe,c),{textAlign:it}=we;if(it){const Et=Xc[it];Et&&(z.lineAlign=Et),z.align=it}return h(z,we),z}).filter(p=>p!==null)}function Qa(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function ul(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function cl(a,e){return[].slice.call(a.childNodes).reduce((t,n,r)=>{var i;return n.nodeName==="br"&&r?t+`
`:(i=n.childNodes)!=null&&i.length?cl(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function Jc(a,e,t){const n="http://www.w3.org/ns/ttml#styling";let r=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(r=t[s]),i.reduce((l,c)=>{const u=Ja(e,n,c)||Ja(a,n,c)||Ja(r,n,c);return u&&(l[c]=u),l},{})}function Ja(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function fl(a){return new Error(`Could not parse ttml timestamp ${a}`)}function qa(a,e){if(!a)return null;let t=rl(a);return t===null&&(al.test(a)?t=qc(a,e):ol.test(a)&&(t=ef(a,e))),t}function qc(a,e){const t=al.exec(a),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function ef(a,e){const t=ol.exec(a),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class _a{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class tf{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=pl(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this),e.on(f.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(f.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(f.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this),e.off(f.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(f.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(f.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new _a(this,"textTrack1"),t=new _a(this,"textTrack2"),n=new _a(this,"textTrack3"),r=new _a(this,"textTrack4");this.cea608Parser1=new nl(1,e,t),this.cea608Parser2=new nl(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let l=i.length;l--;){const c=i[l],u=nf(c[0],c[1],t,n);if(u>=0&&(c[0]=Math.min(c[0],t),c[1]=Math.max(c[1],n),s=!0,u/(n-t)>.5))return}if(s||i.push([t,n]),this.config.renderTextTracksNatively){const l=this.captionsTracks[e];this.Cues.newCue(l,t,n,r)}else{const l=this.Cues.newCue(null,t,n,r);this.hls.trigger(f.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){const{unparsedVttFrags:l}=this;n===Q.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i,trackId:s}),l.length&&(this.unparsedVttFrags=[],l.forEach(c=>{this.initPTS[c.frag.cc]?this.onFragLoaded(f.FRAG_LOADED,c):this.hls.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const i=n.textTracks[r];if(hl(i,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:r}=this,{label:i,languageCode:s}=t[e],l=this.getExistingTrack(i,s);if(l)n[e]=l,Fs(n[e]),Wo(n[e],r);else{const c=this.createTextTrack("captions",i,s);c&&(c[e]=!0,n[e]=c)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,r={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(f.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach(i=>{Fs(r[i]),delete r[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=pl(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let n=0;n<t.length;n++)Fs(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===Xa);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(Do(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,l=s?ha(s.textTracks):null;if(this.tracks.forEach((c,u)=>{let d;if(l){let p=null;for(let _=0;_<l.length;_++)if(l[_]&&hl(l[_],c)){p=l[_],l[_]=null;break}p&&(d=p)}if(d)Fs(d);else{const p=dl(c);d=this.createTextTrack(p,c.name,c.lang),d&&(d.mode="disabled")}d&&this.textTracks.push(d)}),l!=null&&l.length){const c=l.filter(u=>u!==null).map(u=>u.label);c.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${c.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(l=>({label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}));this.hls.trigger(f.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const r=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!r)return;const i=`textTrack${r[1]}`,s=this.captionsProperties[i];s&&(s.label=n.name,n.lang&&(s.languageCode=n.lang),s.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===Q.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:l}=this,{cc:c,sn:u}=t.frag,d=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(u!==l+1||u===l&&d!==this.lastPartIndex+1||c!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=c,this.lastSn=u,this.lastPartIndex=d}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===Q.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const l=this.tracks[n.level],c=this.vttCCs;c[n.cc]||(c[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),l&&l.textCodec===Xa?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;ll(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,l=i.length-1;if(!i[n.cc]&&l===-1){s.push(e);return}const c=this.hls,u=(t=n.initSegment)!=null&&t.data?Te(n.initSegment.data,new Uint8Array(r)).buffer:r;Yc(u,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,d=>{this._appendCues(d,n.level),c.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},d=>{const p=d.message==="Missing initPTS for VTT MPEGTS";p?s.push(e):this._fallbackToIMSC1(n,r),c.logger.log(`Failed to parse VTT cue: ${d}`),!(p&&l>n.cc)&&c.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:d})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||ll(t,this.initPTS[e.cc],()=>{n.textCodec=Xa,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const r=this.textTracks[t];if(!r||r.mode==="disabled")return;e.forEach(i=>jo(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(f.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===Q.SUBTITLE&&this.onFragLoaded(f.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(!(n.type===Q.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let i=0;i<r.length;i++){const s=r[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const l=this.extractCea608Data(s);this.cea608Parser1.addData(r[i].pts,l[0]),this.cea608Parser2.addData(r[i].pts,l[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:i}){const{media:s}=this;if(!(!s||s.currentTime<n)){if(!i||i==="video"){const{captionsTracks:l}=this;Object.keys(l).forEach(c=>za(l[c],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(c=>za(l[c],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let i=0;i<n;i++){const s=e[r++],l=127&e[r++],c=127&e[r++];if(l===0&&c===0)continue;if((4&s)!==0){const d=3&s;(d===0||d===1)&&(t[d].push(l),t[d].push(c))}}return t}}function dl(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function hl(a,e){return!!a&&a.kind===dl(e)&&Oa(e,a)}function nf(a,e,t,n){return Math.min(e,n)-Math.max(a,t)}function pl(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const rf=/\s/,sf={newCue(a,e,t,n){const r=[];let i,s,l,c,u;const d=self.VTTCue||self.TextTrackCue;for(let _=0;_<n.rows.length;_++)if(i=n.rows[_],l=!0,c=0,u="",!i.isEmpty()){var p;for(let j=0;j<i.chars.length;j++)rf.test(i.chars[j].uchar)&&l?c++:(u+=i.chars[j].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),c>=16?c--:c++;const w=sl(u.trim()),T=Ya(e,t,w);a!=null&&(p=a.cues)!=null&&p.getCueById(T)||(s=new d(e,t,w),s.id=T,s.line=_+1,s.align="left",s.position=10+Math.min(80,Math.floor(c*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((_,w)=>_.line==="auto"||w.line==="auto"?0:_.line>8&&w.line>8?w.line-_.line:_.line-w.line),r.forEach(_=>jo(a,_))),r}};function af(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const of=/(\d+)-(\d+)\/(\d+)/;class ml{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||ff,this.controller=new self.AbortController,this.stats=new g}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();const i=lf(e,this.controller.signal),s=e.responseType==="arraybuffer",l=s?"byteLength":"length",{maxTimeToFirstByteMs:c,maxLoadTimeMs:u}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=c&&x(c)?c:u,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Ys(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(p=>{var _;this.response=this.loader=p;const w=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=u,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},u-(w-r.loading.start)),!p.ok){const{status:j,statusText:z}=p;throw new df(z||"fetch, bad network response",j,p)}r.loading.first=w,r.total=cf(p.headers)||r.total;const T=(_=this.callbacks)==null?void 0:_.onProgress;return T&&x(t.highWaterMark)?this.loadProgressively(p,r,e,t.highWaterMark,T):s?p.arrayBuffer():e.responseType==="json"?p.json():p.text()}).then(p=>{var _,w;const T=this.response;if(!T)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const j=p[l];j&&(r.loaded=r.total=j);const z={url:T.url,data:p,code:T.status},ce=(_=this.callbacks)==null?void 0:_.onProgress;ce&&!x(t.highWaterMark)&&ce(r,e,p,T),(w=this.callbacks)==null||w.onSuccess(z,r,e,T)}).catch(p=>{var _;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const w=p&&p.code||0,T=p?p.message:null;(_=this.callbacks)==null||_.onError({code:w,text:T},e,p?p.details:null,r)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,r=0,i){const s=new rs,l=e.body.getReader(),c=()=>l.read().then(u=>{if(u.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const d=u.value,p=d.length;return t.loaded+=p,p<r||s.dataLength?(s.push(d),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,d.buffer,e),c()}).catch(()=>Promise.reject());return c()}}function lf(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(h({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function uf(a){const e=of.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function cf(a){const e=a.get("Content-Range");if(e){const n=uf(e);if(x(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function ff(a,e){return new self.Request(a.url,e)}class df extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const hf=/^age:\s*[\d.]+\s*$/im;class gl{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new g,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return i(n,t.url)}).catch(s=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),i(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(s=>{var l;(l=this.callbacks)==null||l.onError({code:n.status,text:s.message},t,n,r)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const r=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=n.loadPolicy;if(r)for(const l in r)e.setRequestHeader(l,r[l]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=i&&x(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),r===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const u=t.status,d=t.responseType==="text"?t.responseText:null;if(u>=200&&u<300){const T=d!=null?d:t.response;if(T!=null){var s,l;n.loading.end=Math.max(self.performance.now(),n.loading.first);const j=t.responseType==="arraybuffer"?T.byteLength:T.length;n.loaded=n.total=j,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const z=(s=this.callbacks)==null?void 0:s.onProgress;z&&z(n,e,T,t);const ce={url:t.responseURL,data:T,code:u};(l=this.callbacks)==null||l.onSuccess(ce,n,e,t);return}}const p=i.loadPolicy.errorRetry,_=n.retry,w={url:e.url,data:void 0,code:u};if($n(p,_,!1,w))this.retry(p);else{var c;Y.error(`${u} while loading ${e.url}`),(c=this.callbacks)==null||c.onError({code:u,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if($n(e,t,!0))this.retry(e);else{var n;Y.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=Yn(e,n.retry),n.retry++,Y.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&hf.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const pf={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},mf=E(E({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:gl,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:An,bufferController:Eu,capLevelController:Na,errorController:et,fpsController:vc,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Gn,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:pf},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},gf()),{},{subtitleStreamController:Rc,subtitleTrackController:Ec,timelineController:tf,audioStreamController:gu,audioTrackController:vu,emeController:Os,cmcdController:pc,contentSteeringController:gc,interstitialsController:Cc});function gf(){return{cueHandler:sf,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function vf(a,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=eo(a),r=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(s=>{const l=`${s==="level"?"playlist":s}LoadPolicy`,c=e[l]===void 0,u=[];i.forEach(d=>{const p=`${s}Loading${d}`,_=e[p];if(_!==void 0&&c){u.push(p);const w=n[l].default;switch(e[l]={default:w},d){case"TimeOut":w.maxLoadTimeMs=_,w.maxTimeToFirstByteMs=_;break;case"MaxRetry":w.errorRetry.maxNumRetry=_,w.timeoutRetry.maxNumRetry=_;break;case"RetryDelay":w.errorRetry.retryDelayMs=_,w.timeoutRetry.retryDelayMs=_;break;case"MaxRetryTimeout":w.errorRetry.maxRetryDelayMs=_,w.timeoutRetry.maxRetryDelayMs=_;break}}}),u.length&&t.warn(`hls.js config: "${u.join('", "')}" setting(s) are deprecated, use "${l}": ${Vt(e[l])}`)}),E(E({},n),e)}function eo(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(eo):Object.keys(a).reduce((e,t)=>(e[t]=eo(a[t]),e),{}):a}function _f(a,e){const t=a.loader;t!==ml&&t!==gl?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):af()&&(a.loader=ml,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const ya=2,yf=.1,Ef=.05,bf=100;class xf extends dr{constructor(e,t){super("gap-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(f.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(bf),this.mediaSource=t.mediaSource;const n=this.media=t.media;ai(n,"playing",this.onMediaPlaying),ai(n,"waiting",this.onMediaWaiting),ai(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(ci(n,"playing",this.onMediaPlaying),ci(n,"waiting",this.onMediaWaiting),ci(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,r;const i=(n=this.hls)==null?void 0:n.config;if(!i)return;const s=this.media;if(!s)return;const{seeking:l}=s,c=this.seeking&&!l,u=!this.seeking&&l,d=s.paused&&!l||s.ended||s.playbackRate===0;if(this.seeking=l,e!==t){t&&(this.ended=0),this.moved=!0,l||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!d&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(u||c){c&&this.stallResolved(e);return}if(d){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(f.MEDIA_ENDED,{stalled:!1}));return}if(!dn.getBuffered(s).length){this.nudgeRetry=0;return}const p=dn.bufferInfo(s,e,0),_=p.nextStart||0,w=this.fragmentTracker;if(l&&w&&this.hls){const $t=vl(this.hls.inFlightFragments,e),ht=p.len>ya,Dt=!_||$t||_-e>ya&&!w.getPartialFragment(e);if(ht||Dt)return;this.moved=!1}const T=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&w){if(!(p.len>0)&&!_)return;const ht=Math.max(_,p.start||0)-e,kt=!!(T!=null&&T.live)?T.targetduration*2:ya,pt=Ea(e,w);if(ht>0&&(ht<=kt||pt)){s.paused||this._trySkipBufferHole(pt);return}}const j=i.detectStallWithCurrentTimeMs,z=self.performance.now(),ce=this.waiting;let Oe=this.stalled;if(Oe===null)if(ce>0&&z-ce<j)Oe=this.stalled=ce;else{this.stalled=z;return}const we=z-Oe;if(!l&&(we>=j||ce)&&this.hls){var it;if(((it=this.mediaSource)==null?void 0:it.readyState)==="ended"&&!(T!=null&&T.live)&&Math.abs(e-((T==null?void 0:T.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(f.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(p),!this.media||!this.hls)return}const Et=dn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(Et,we,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(f.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&r&&r.length>1&&e>r.end(0)){const i=dn.bufferedInfo(dn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=dn.timeRangesToArray(r),l=dn.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const c=dn.bufferedInfo(s,e,0).bufferedIndex,u=s[l].end,d=s[l+1].start;if((c===-1||c>l)&&d-u<1&&e-u<2){const p=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${u} -> ${d} buffered index: ${c}`);this.warn(p.message),this.media.currentTime+=1e-6;let _=Ea(e,this.fragmentTracker);_&&"fragment"in _?_=_.fragment:_||(_=void 0);const w=dn.bufferInfo(this.media,e,0);this.hls.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:p,reason:p.message,frag:_,buffer:w.len,bufferInfo:w})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:l}=this,c=(r=this.hls)==null?void 0:r.config;if(!l||!s||!c)return;const u=(i=this.hls)==null?void 0:i.latestLevelDetails,d=Ea(n,s);if((d||u!=null&&u.live&&n<u.fragmentStart)&&(this._trySkipBufferHole(d)||!this.media))return;const p=e.buffered,_=this.adjacentTraversal(e,n);(p&&p.length>1&&e.len>c.maxBufferHole||e.nextStart&&(e.nextStart-n<c.maxBufferHole||_))&&(t>c.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const n=this.fragmentTracker,r=e.nextStart;if(n&&r){const i=n.getFragAtPos(t,Q.MAIN),s=n.getFragAtPos(r,Q.MAIN);if(i&&s)return s.sn-i.sn<2}return!1}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:i}=this;if(!r&&i!==null&&n&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${Vt(e)})`);this.warn(s.message),t.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,i=(t=this.hls)==null?void 0:t.config;if(!r||!n||!i)return 0;const s=r.currentTime,l=dn.bufferInfo(r,s,0),c=s<l.start?l.start:l.nextStart;if(c&&this.hls){const d=l.len<=i.maxBufferHole,p=l.len>0&&l.len<1&&r.readyState<3,_=c-s;if(_>0&&(d||p)){if(_>i.maxBufferHole){let T=!1;if(s===0){const j=n.getAppendedFrag(0,Q.MAIN);j&&c<j.end&&(T=!0)}if(!T&&e){var u;if(!((u=this.hls.loadLevelObj)!=null&&u.details)||vl(this.hls.inFlightFragments,c))return 0;let z=!1,ce=e.end;for(;ce<c;){const Oe=Ea(ce,n);if(Oe)ce+=Oe.duration;else{z=!0;break}}if(z)return 0}}const w=Math.max(c+Ef,s+yf);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${w}`),this.moved=!0,r.currentTime=w,!(e!=null&&e.gap)){const T=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${w}`),j={type:te.MEDIA_ERROR,details:M.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:T,reason:T.message,buffer:l.len,bufferInfo:l};e&&("fragment"in e?j.part=e:j.frag=e),this.hls.trigger(f.ERROR,j)}return w}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,i=t==null?void 0:t.config;if(!n||!i)return 0;const s=n.currentTime;if(this.nudgeRetry++,r<i.nudgeMaxRetry){const l=s+(r+1)*i.nudgeOffset,c=new Error(`Nudging 'currentTime' from ${s} to ${l}`);this.warn(c.message),n.currentTime=l,t.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.BUFFER_NUDGE_ON_STALL,error:c,fatal:!1,buffer:e.len,bufferInfo:e})}else{const l=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(l.message),t.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.BUFFER_STALLED_ERROR,error:l,fatal:!0,buffer:e.len,bufferInfo:e})}}}function vl(a,e){const t=_l(a.main);if(t&&t.start<=e)return t;const n=_l(a.audio);return n&&n.start<=e?n:null}function _l(a){if(!a)return null;switch(a.state){case Xt.IDLE:case Xt.STOPPED:case Xt.ENDED:case Xt.ERROR:return null}return a.frag}function Ea(a,e){return e.getAppendedFrag(a,Q.MAIN)||e.getPartialFragment(a)}const Sf=.25;function to(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function no(a,e,t,n,r){let i=new a(e,t,"");try{i.value=n,r&&(i.type=r)}catch(s){i=new a(e,t,Vt(r?E({type:r},n):n))}return i}const ba=(()=>{const a=to();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class wf{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(f.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e&&(e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){var e;const t=(e=this.hls)==null?void 0:e.latestLevelDetails;t&&this.updateDateRangeCues(t)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&Fs(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return Wo(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:n,enableID3MetadataCues:r}=this.hls.config;if(!n&&!r)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=to();if(s)for(let l=0;l<i.length;l++){const c=i[l].type;if(c===Ci.emsg&&!n||!r)continue;const u=oo(i[l].data),d=i[l].pts;let p=d+i[l].duration;p>ba&&(p=ba),p-d<=0&&(p=d+Sf);for(let w=0;w<u.length;w++){const T=u[w];if(!lo(T)){this.updateId3CueEnds(d,c);const j=no(s,d,p,T,c);j&&this.id3Track.addCue(j)}}}}updateId3CueEnds(e,t){var n;const r=(n=this.id3Track)==null?void 0:n.cues;if(r)for(let i=r.length;i--;){const s=r[i];s.type===t&&s.startTime<e&&s.endTime===ba&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:l,enableID3MetadataCues:c}}=s;if(i&&(l||c)){let u;r==="audio"?u=d=>d.type===Ci.audioId3&&c:r==="video"?u=d=>d.type===Ci.emsg&&l:u=d=>d.type===Ci.audioId3&&c||d.type===Ci.emsg&&l,za(i,t,n,u)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.hls||!this.media)return;const{assetPlayerId:n,timelineOffset:r,enableDateRangeMetadataCues:i,interstitialsController:s}=this.hls.config;if(!i)return;const l=to();if(n&&r&&!s){const{fragmentStart:j,fragmentEnd:z}=e;let ce=this.assetCue;ce?(ce.startTime=j,ce.endTime=z):l&&(ce=this.assetCue=no(l,j,z,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),ce&&(ce.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(ce),ce.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:c}=this,{dateRanges:u}=e,d=Object.keys(u);let p=this.dateRangeCuesAppended;if(c&&t){var _;if((_=c.cues)!=null&&_.length){const j=Object.keys(p).filter(z=>!d.includes(z));for(let z=j.length;z--;){var w;const ce=j[z],Oe=(w=p[ce])==null?void 0:w.cues;delete p[ce],Oe&&Object.keys(Oe).forEach(we=>{const it=Oe[we];if(it){it.removeEventListener("enter",this.onEventCueEnter);try{c.removeCue(it)}catch(Et){}}})}}else p=this.dateRangeCuesAppended={}}const T=e.fragments[e.fragments.length-1];if(!(d.length===0||!x(T==null?void 0:T.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let j=0;j<d.length;j++){const z=d[j],ce=u[z],Oe=ce.startTime,we=p[z],it=(we==null?void 0:we.cues)||{};let Et=(we==null?void 0:we.durationKnown)||!1,$t=ba;const{duration:ht,endDate:Dt}=ce;if(Dt&&ht!==null)$t=Oe+ht,Et=!0;else if(ce.endOnNext&&!Et){const pt=d.reduce((en,Zn)=>{if(Zn!==ce.id){const ar=u[Zn];if(ar.class===ce.class&&ar.startDate>ce.startDate&&(!en||ce.startDate<en.startDate))return ar}return en},null);pt&&($t=pt.startTime,Et=!0)}const kt=Object.keys(ce.attr);for(let pt=0;pt<kt.length;pt++){const en=kt[pt];if(!zr(en))continue;const Zn=it[en];if(Zn)Et&&!(we!=null&&we.durationKnown)?Zn.endTime=$t:Math.abs(Zn.startTime-Oe)>.01&&(Zn.startTime=Oe,Zn.endTime=$t);else if(l){let ar=ce.attr[en];Kr(en)&&(ar=k(ar));const or=no(l,Oe,$t,{key:en,data:ar},Ci.dateRange);or&&(or.id=z,this.id3Track.addCue(or),it[en]=or,s&&(en==="X-ASSET-LIST"||en==="X-ASSET-URL")&&or.addEventListener("enter",this.onEventCueEnter))}}p[z]={cues:it,dateRange:ce,durationKnown:Et}}}}}class Af{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!n.live)return;const l=this.targetLatency;if(l===null)return;const c=r-l,u=Math.min(this.maxLatency,l+n.targetduration);if(c<u&&c>.05&&this.forwardBufferLength>1){const p=Math.min(2,Math.max(1,s)),_=Math.round(2/(1+Math.exp(-.75*c-this.edgeStalled))*20)/20,w=Math.min(p,Math.max(1,_));this.changeMediaPlaybackRate(t,w)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:l}=this.config,c=this.hls.userConfig;let u=l&&n||t;(this._targetLatencyUpdated||c.liveSyncDuration||c.liveSyncDurationCount||u===0)&&(u=i!==void 0?i:s*r);const d=r;return u+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,d)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const n=this.levelDetails;if(n===null)return null;const r=n.edge,i=e-t-this.edgeStalled,s=r-n.totalduration,l=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),l)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===M.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(n=this.levelDetails)!=null&&n.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var n,r;e.playbackRate!==t&&((n=this.hls)==null||n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(r=this.targetLatency)==null?void 0:r.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class Tf extends Pa{constructor(e,t){super(e,"level-controller"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,r=[],i={},s={};let l=!1,c=!1,u=!1;t.levels.forEach(d=>{const p=d.attrs;let{audioCodec:_,videoCodec:w}=d;_&&(d.audioCodec=_=me(_,n)||void 0),w&&(w=d.videoCodec=Ye(w));const{width:T,height:j,unknownCodecs:z}=d;let ce=z?z.length:0;if(z)for(let pt=ce;pt--;){const en=z[pt];this.isAudioSupported(en)?(d.audioCodec=_=_?`${_},${en}`:en,ce--,st.audio[_.substring(0,4)]=2):this.isVideoSupported(en)&&(d.videoCodec=w=w?`${w},${en}`:en,ce--,st.video[w.substring(0,4)]=2)}if(l||(l=!!(T&&j)),c||(c=!!w),u||(u=!!_),ce||_&&!this.isAudioSupported(_)||w&&!this.isVideoSupported(w)){this.log(`Some or all CODECS not supported "${p.CODECS}"`);return}const{CODECS:Oe,"FRAME-RATE":we,"HDCP-LEVEL":it,"PATHWAY-ID":Et,RESOLUTION:$t,"VIDEO-RANGE":ht}=p,kt=`${`${Et||"."}-`}${d.bitrate}-${$t}-${we}-${Oe}-${ht}-${it}`;if(i[kt])if(i[kt].uri!==d.url&&!d.attrs["PATHWAY-ID"]){const pt=s[kt]+=1;d.attrs["PATHWAY-ID"]=new Array(pt+1).join(".");const en=this.createLevel(d);i[kt]=en,r.push(en)}else i[kt].addGroupId("audio",p.AUDIO),i[kt].addGroupId("text",p.SUBTITLES);else{const pt=this.createLevel(d);i[kt]=pt,s[kt]=1,r.push(pt)}}),this.filterAndSortMediaOptions(r,t,l,c,u)}createLevel(e){const t=new yt(e),n=e.supplemental;if(n!=null&&n.videoCodec&&!this.isVideoSupported(n.videoCodec)){const r=new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);this.log(r.message),t.supportedResult=yn(r,[])}return t}isAudioSupported(e){return pn(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return pn(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){let s=[],l=[],c=e;if((n||r)&&i&&(c=c.filter(({videoCodec:z,videoRange:ce,width:Oe,height:we})=>(!!z||!!(Oe&&we))&&Kt(ce))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let z="no level with compatible codecs found in manifest",ce=z;t.levels.length&&(ce=`one or more CODECS in variant not supported: ${Vt(t.levels.map(we=>we.attrs.CODECS).filter((we,it,Et)=>Et.indexOf(we)===it))}`,this.warn(ce),z+=` (${ce})`);const Oe=new Error(z);this.hls.trigger(f.ERROR,{type:te.MEDIA_ERROR,details:M.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:Oe,reason:ce})}});return}t.audioTracks&&(s=t.audioTracks.filter(z=>!z.audioCodec||this.isAudioSupported(z.audioCodec)),yl(s)),t.subtitles&&(l=t.subtitles,yl(l));const u=c.slice(0);c.sort((z,ce)=>{if(z.attrs["HDCP-LEVEL"]!==ce.attrs["HDCP-LEVEL"])return(z.attrs["HDCP-LEVEL"]||"")>(ce.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&z.height!==ce.height)return z.height-ce.height;if(z.frameRate!==ce.frameRate)return z.frameRate-ce.frameRate;if(z.videoRange!==ce.videoRange)return Ie.indexOf(z.videoRange)-Ie.indexOf(ce.videoRange);if(z.videoCodec!==ce.videoCodec){const Oe=ze(z.videoCodec),we=ze(ce.videoCodec);if(Oe!==we)return we-Oe}if(z.uri===ce.uri&&z.codecSet!==ce.codecSet){const Oe=ke(z.codecSet),we=ke(ce.codecSet);if(Oe!==we)return we-Oe}return z.averageBitrate!==ce.averageBitrate?z.averageBitrate-ce.averageBitrate:0});let d=u[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==u.length)){for(let z=0;z<u.length;z++)if(u[z].pathwayId===c[0].pathwayId){d=u[z];break}}this._levels=c;for(let z=0;z<c.length;z++)if(c[z]===d){var p;this._firstLevel=z;const ce=d.bitrate,Oe=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${ce}`),((p=this.hls.userConfig)==null?void 0:p.abrEwmaDefaultEstimate)===void 0){const we=Math.min(ce,this.hls.config.abrEwmaDefaultEstimateMax);we>Oe&&Oe===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=we)}break}const _=i&&!r,w=this.hls.config,T=!!(w.audioStreamController&&w.audioTrackController),j={levels:c,audioTracks:s,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:T&&!_&&s.some(z=>!!z.url)};this.hls.trigger(f.MANIFEST_PARSED,j)}get levels(){return this._levels.length===0?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const d=new Error("invalid level idx"),p=e<0;if(this.hls.trigger(f.ERROR,{type:te.OTHER_ERROR,details:M.LEVEL_SWITCH_ERROR,level:e,fatal:p,error:d,reason:d.message}),p)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,i=r?r.attrs["PATHWAY-ID"]:void 0,s=t[e],l=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&i===l)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${l?" with Pathway "+l:""} from level ${n}${i?" with Pathway "+i:""}`);const c={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(f.LEVEL_SWITCHING,c);const u=s.details;if(!u||u.live){const d=this.switchParams(s.uri,r==null?void 0:r.details,u);this.loadPlaylist(d)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),n=e.filter(r=>t.indexOf(r)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=n}}onError(e,t){t.fatal||!t.context||t.context.type===oe.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===Q.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(i=>!!n[i]))return;const r=this._levels[t.level];r!=null&&r.loadError&&(this.log(`Resetting level error count of ${r.loadError} on frag buffered`),r.loadError=0)}}onLevelLoaded(e,t){var n;const{level:r,details:i}=t,s=t.levelInfo;if(!s){var l;this.warn(`Invalid level index ${r}`),(l=t.deliveryDirectives)!=null&&l.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let c=s.details;c===t.details&&c.advanced&&(c=void 0),this.playlistLoaded(r,t,c)}else(n=t.deliveryDirectives)!=null&&n.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,l=s==null?void 0:s.age;this.log(`Loading level index ${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${n}`),this.hls.trigger(f.LEVEL_LOADING,{url:n,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const n=this._levels.filter((i,s)=>s!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(l=>l.level=-1)),!1));Ti(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(f.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(f.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function yl(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function El(){return self.SourceBuffer||self.WebKitSourceBuffer}function bl(){if(!L())return!1;const e=El();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Df(){if(!bl())return!1;const a=L();return typeof(a==null?void 0:a.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>a.isTypeSupported(tn(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(tn(e,"audio"))))}function Cf(){var a;const e=El();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const Rf=100;class If extends Bi{constructor(e,t,n){super(e,t,n,"stream-controller",Q.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const r=this.media,i=r?r.currentTime:null;if(i===null||!x(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,Q.MAIN,0);if(s===null||s.len===0){this.warn(`Main forward buffer length at ${i} on "seeked" event ${s?s.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval(Rf),this.level=-1,!this.startFragRequested){let i=r.startLevel;i===-1&&(r.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=r.firstAutoLevel),r.nextLoadLevel=i,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=Xt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Xt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Xt.WAITING_LEVEL:{const{levels:e,level:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&(!r.live||this.levelLastLoaded===n&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(r))break;this.state=Xt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Xt.IDLE;break}break}case Xt.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===Xt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(t===null||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[i]))return;const s=n[i],l=this.getMainFwdBufferInfo();if(l===null)return;const c=this.getLevelDetails();if(c&&this._streamEnded(l,c)){const j={};this.altAudio===2&&(j.type="video"),this.hls.trigger(f.BUFFER_EOS,j),this.state=Xt.ENDED;return}if(!this.buffering)return;e.loadLevel!==i&&e.manualLevel===-1&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const u=s.details;if(!u||this.state===Xt.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Xt.WAITING_LEVEL,this.startFragRequested=!1;return}const d=l.len,p=this.getMaxBufferLength(s.maxBitrate);if(d>=p)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const _=this.backtrackFragment?this.backtrackFragment.start:l.end;let w=this.getNextFragment(_,u);if(this.couldBacktrack&&!this.fragPrevious&&w&&ue(w)&&this.fragmentTracker.getState(w)!==lt.OK){var T;const z=((T=this.backtrackFragment)!=null?T:w).sn-u.startSN,ce=u.fragments[z-1];ce&&w.cc===ce.cc&&(w=ce,this.fragmentTracker.removeFragment(ce))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(w&&this.isLoopLoading(w,_)){if(!w.gap){const z=this.audioOnly&&!this.altAudio?F.AUDIO:F.VIDEO,ce=(z===F.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;ce&&this.afterBufferFlushed(ce,z,Q.MAIN)}w=this.getNextFragmentLoopLoading(w,u,l,Q.MAIN,p)}w&&(w.initSegment&&!w.initSegment.data&&!this.bitrateTest&&(w=w.initSegment),this.loadFragment(w,s,_))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===lt.NOT_LOADED||r===lt.PARTIAL?ue(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,n):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,Q.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);const i=this.getLevelDetails();if(i!=null&&i.live){const l=this.getMainFwdBufferInfo();if(!l||l.len<i.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,c=e[l],u=this.fragLastKbps;u&&this.fragCurrent?n=this.fragCurrent.duration*c.maxBitrate/(1e3*u)+1:n=0}else n=0;const s=this.getBufferedFrag(t.currentTime+n);if(s){const l=this.followingBufferedFrag(s);if(l){this.abortCurrentFrag();const c=l.maxStartPTS?l.maxStartPTS:l.start,u=l.duration,d=Math.max(s.end,c+Math.min(Math.max(u-this.config.maxFragLookUpTolerance,u*(this.couldBacktrack?.5:.125)),u*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(d,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Xt.KEY_LOADING:case Xt.FRAG_LOADING:case Xt.FRAG_LOADING_WAITING_RETRY:case Xt.PARSING:case Xt.PARSED:this.state=Xt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;ai(n,"playing",this.onMediaPlaying),ai(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(ci(n,"playing",this.onMediaPlaying),ci(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(f.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,r=!1;for(let i=0;i<t.levels.length;i++){const s=t.levels[i].audioCodec;s&&(n=n||s.indexOf("mp4a.40.2")!==-1,r=r||s.indexOf("mp4a.40.5")!==-1)}this.audioCodecSwitch=n&&r&&!Cf(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==Xt.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=Xt.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,l=t.details,c=l.totalduration;if(!r){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${l.startSN},${l.endSN}]${l.lastPartSn?`[part-${l.lastPartSn}-${l.lastPartIndex}]`:""}, cc [${l.startCC}, ${l.endCC}] duration:${c}`);const u=t.levelInfo,d=this.fragCurrent;d&&(this.state===Xt.FRAG_LOADING||this.state===Xt.FRAG_LOADING_WAITING_RETRY)&&d.level!==t.level&&d.loader&&this.abortCurrentFrag();let p=0;if(l.live||(n=u.details)!=null&&n.live){var _;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;p=this.alignPlaylists(l,u.details,(_=this.levelLastLoaded)==null?void 0:_.details)}if(u.details=l,this.levelLastLoaded=u,i||this.setStartPosition(l,p),this.hls.trigger(f.LEVEL_UPDATED,{details:l,level:s}),this.state===Xt.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=Xt.IDLE}i&&l.live&&this.synchronizeToLiveEdge(l),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,l=e.edge,c=i>=s-t.maxFragLookUpTolerance&&i<=l;if(r!==null&&n.duration>r&&(i<r||!c)){const d=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!c&&n.readyState<4||i<l-d)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState))if(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${l}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var u;const p=dn.bufferInfo(n,r,0);if(!((u=p.buffered)!=null&&u.length)){n.currentTime=r;return}if(p.start<=i){n.currentTime=r;return}const{nextStart:w}=dn.bufferedInfo(p.buffered,i,0);w&&(n.currentTime=w)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=s[n.level];if(!l){this.warn(`Level ${n.level} not found on progress`);return}const c=l.details;if(!c){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const u=l.videoCodec,d=c.PTSKnown||!c.live,p=(t=n.initSegment)==null?void 0:t.data,_=this._getAudioCodec(l),w=this.transmuxer=this.transmuxer||new Ao(this.hls,Q.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),T=r?r.index:-1,j=T!==-1,z=new Qn(n.level,n.sn,n.stats.chunkCount,i.byteLength,T,j),ce=this.initPTS[n.cc];w.push(i,p,_,u,n,r,c.totalduration,d,z,ce)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio===2;if(Wn(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r){this.fragmentTracker.removeAllFragments(),n.once(f.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(f.AUDIO_TRACK_SWITCHED,t)}),n.trigger(f.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(f.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=Wn(t.url,this.hls);if(n){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,i,s=!1;for(const l in n){const c=n[l];if(c.id==="main"){if(i=l,r=c,l==="video"){const u=n[l];u&&(this.videoBuffer=u.buffer)}}else s=!0}s&&r?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,i=n.type===Q.MAIN;if(i){if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===Xt.PARSED&&(this.state=Xt.IDLE);return}const l=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),ue(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&dn.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=Xt.ERROR;return}switch(t.details){case M.FRAG_GAP:case M.FRAG_PARSING_ERROR:case M.FRAG_DECRYPT_ERROR:case M.FRAG_LOAD_ERROR:case M.FRAG_LOAD_TIMEOUT:case M.KEY_LOAD_ERROR:case M.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Q.MAIN,t);break;case M.LEVEL_LOAD_ERROR:case M.LEVEL_LOAD_TIMEOUT:case M.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Xt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===oe.LEVEL&&(this.state=Xt.IDLE);break;case M.BUFFER_ADD_CODEC_ERROR:case M.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case M.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case M.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Xt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==F.AUDIO||!this.altAudio){const n=(t===F.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,Q.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const r=this.timelineOffset;r&&n&&(n+=r);const i=this.getLevelDetails(),s=dn.getBuffered(e),l=s.length?s.start(0):0,c=l-n,u=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||c>0&&(c<u||this.loadingParts&&c<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${c} to match buffer start`),n+=c,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${l}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:r}=this,i=n==null?void 0:n.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=Xt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const s=i.stats;s.parsing.start=s.parsing.end=s.buffering.start=s.buffering.end=self.performance.now(),r.trigger(f.FRAG_LOADED,n),i.bitrateTest=!1}).catch(n=>{this.state===Xt.STOPPED||this.state===Xt.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const t=this.playlistType,{hls:n}=this,{remuxResult:r,chunkMeta:i}=e,s=this.getCurrentContext(i);if(!s){this.resetWhenMissingContext(i);return}const{frag:l,part:c,level:u}=s,{video:d,text:p,id3:_,initSegment:w}=r,{details:T}=u,j=this.altAudio?void 0:r.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=Xt.PARSING,w){const z=w.tracks;if(z){const it=l.initSegment||l;if(this.unhandledEncryptionError(w,l))return;this._bufferInitSegment(u,z,it,i),n.trigger(f.FRAG_PARSING_INIT_SEGMENT,{frag:it,id:t,tracks:z})}const ce=w.initPTS,Oe=w.timescale,we=this.initPTS[l.cc];if(x(ce)&&(!we||we.baseTime!==ce||we.timescale!==Oe)){const it=w.trackId;this.initPTS[l.cc]={baseTime:ce,timescale:Oe,trackId:it},n.trigger(f.INIT_PTS_FOUND,{frag:l,id:t,initPTS:ce,timescale:Oe,trackId:it})}}if(d&&T){j&&d.type==="audiovideo"&&this.logMuxedErr(l);const z=T.fragments[l.sn-1-T.startSN],ce=l.sn===T.startSN,Oe=!z||l.cc>z.cc;if(r.independent!==!1){const{startPTS:we,endPTS:it,startDTS:Et,endDTS:$t}=d;if(c)c.elementaryStreams[d.type]={startPTS:we,endPTS:it,startDTS:Et,endDTS:$t};else if(d.firstKeyFrame&&d.independent&&i.id===1&&!Oe&&(this.couldBacktrack=!0),d.dropped&&d.independent){const ht=this.getMainFwdBufferInfo(),Dt=(ht?ht.end:this.getLoadPosition())+this.config.maxBufferHole,kt=d.firstKeyFramePTS?d.firstKeyFramePTS:we;if(!ce&&Dt<kt-this.config.maxBufferHole&&!Oe){this.backtrack(l);return}else Oe&&(l.gap=!0);l.setElementaryStreamInfo(d.type,l.start,it,l.start,$t,!0)}else ce&&we-(T.appliedTimelineOffset||0)>ya&&(l.gap=!0);l.setElementaryStreamInfo(d.type,we,it,Et,$t),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(d,l,c,i,ce||Oe)}else if(ce||Oe)l.gap=!0;else{this.backtrack(l);return}}if(j){const{startPTS:z,endPTS:ce,startDTS:Oe,endDTS:we}=j;c&&(c.elementaryStreams[F.AUDIO]={startPTS:z,endPTS:ce,startDTS:Oe,endDTS:we}),l.setElementaryStreamInfo(F.AUDIO,z,ce,Oe,we),this.bufferFragmentData(j,l,c,i)}if(T&&_!=null&&_.samples.length){const z={id:t,frag:l,details:T,samples:_.samples};n.trigger(f.FRAG_PARSING_METADATA,z)}if(T&&p){const z={id:t,frag:l,details:T,samples:p.samples};n.trigger(f.FRAG_PARSING_USERDATA,z)}}logMuxedErr(e){this.warn(`${ue(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==Xt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:i,video:s,audiovideo:l}=t;if(i){const u=e.audioCodec;let d=Ee(i.codec,u);d==="mp4a"&&(d="mp4a.40.5");const p=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){d&&(d.indexOf("mp4a.40.5")!==-1?d="mp4a.40.2":d="mp4a.40.5");const _=i.metadata;_&&"channelCount"in _&&(_.channelCount||1)!==1&&p.indexOf("firefox")===-1&&(d="mp4a.40.5")}d&&d.indexOf("mp4a.40.5")!==-1&&p.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(d="mp4a.40.2",this.log(`Android: force audio codec to ${d}`)),u&&u!==d&&this.log(`Swapping manifest audio codec "${u}" for "${d}"`),i.levelCodec=d,i.id=Q.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${d||""}/${u||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=Q.MAIN;const u=s.codec;if((u==null?void 0:u.length)===4)switch(u){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${u}]${s.codec!==u?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}l&&(this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),delete t.video,delete t.audio);const c=Object.keys(t);if(c.length){if(this.hls.trigger(f.BUFFER_CODECS,t),!this.hls)return;c.forEach(u=>{const p=t[u].initSegment;p!=null&&p.byteLength&&this.hls.trigger(f.BUFFER_APPENDING,{type:u,data:p,frag:n,part:null,chunkMeta:r,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,Q.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,n=e==null?void 0:e[t];return n?this.getMaxBufferLength(n.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Xt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(dn.isBuffered(e,n)?t=this.getAppendedFrag(n):dn.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,i=t.level;(!r||t.sn!==r.sn||r.level!==i)&&(this.fragPlaying=t,this.hls.trigger(f.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(f.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return x(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(x(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?Ln(null,n.fragments,t):null);if(r){const i=r.programDateTime;if(i!==null){const s=i+(t-r.start)*1e3;return new Date(s)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class Lf extends B{constructor(e,t){super("key-loader",t),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyIdToKeyInfo){const r=this.keyIdToKeyInfo[n].loader;if(r){var t;if(e&&e!==((t=r.context)==null?void 0:t.frag.type))return;r.abort()}}}detach(){for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e].loader;t&&t.destroy()}this.keyIdToKeyInfo={}}createKeyLoadError(e,t=M.KEY_LOAD_ERROR,n,r,i){return new Jn({type:te.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})}loadClear(e,t,n){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let r=0,i=t.length;r<i;r++){const s=t[r];if(e.cc<=s.cc&&(!ue(e)||!ue(s)||e.sn<s.sn)||!n&&r==i-1)return this.emeController.selectKeySystemFormat(s).then(l=>{if(!this.emeController)return;s.setKeyFormat(l);const c=Wr(l);if(c)return this.emeController.getKeySystemAccess([c])})}if(this.config.requireKeySystemAccessOnStart){const r=zn(this.config);if(r.length)return this.emeController.getKeySystemAccess(r)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,r;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const d=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,M.KEY_LOAD_ERROR,d))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,M.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const l=ro(i);let c=this.keyIdToKeyInfo[l];if((n=c)!=null&&n.decryptdata.key)return i.key=c.decryptdata.key,Promise.resolve({frag:e,keyInfo:c});if((r=c)!=null&&r.keyLoadPromise){var u;switch((u=c.mediaKeySessionContext)==null?void 0:u.keyStatus){case"usable":case"usable-in-future":return c.keyLoadPromise.then(p=>{const{keyInfo:_}=p;return i.key=_.decryptdata.key,{frag:e,keyInfo:_}})}}switch(this.log(`Loading key ${U(i.keyId||[])} from ${e.type} ${e.level}`),c=this.keyIdToKeyInfo[l]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(c,e):this.loadKeyEME(c,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(c,e);default:return Promise.reject(this.createKeyLoadError(e,M.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const r=this.emeController.loadKey(n);return(e.keyLoadPromise=r.then(i=>(e.mediaKeySessionContext=i,n))).catch(i=>{throw e.keyLoadPromise=null,i.data&&(i.data.frag=t),i})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,i=new r(n);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,l)=>{const c={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},u=n.keyLoadPolicy.default,d={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},p={onSuccess:(_,w,T,j)=>{const{frag:z,keyInfo:ce,url:Oe}=T,we=ro(ce.decryptdata)||Oe;if(!z.decryptdata||ce!==this.keyIdToKeyInfo[we])return l(this.createKeyLoadError(z,M.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),j));ce.decryptdata.key=z.decryptdata.key=new Uint8Array(_.data),z.keyLoader=null,ce.loader=null,s({frag:z,keyInfo:ce})},onError:(_,w,T,j)=>{this.resetLoader(w),l(this.createKeyLoadError(t,M.KEY_LOAD_ERROR,new Error(`HTTP Error ${_.code} loading key ${_.text}`),T,E({url:c.url,data:void 0},_)))},onTimeout:(_,w,T)=>{this.resetLoader(w),l(this.createKeyLoadError(t,M.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),T))},onAbort:(_,w,T)=>{this.resetLoader(w),l(this.createKeyLoadError(t,M.INTERNAL_ABORTED,new Error("key loading aborted"),T))}};i.load(c,d,p)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null);const s=ro(n.decryptdata)||r;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function ro(a){const e=a.keyId;return e?U(e):a.uri}function xl(a){const{type:e}=a;switch(e){case oe.AUDIO_TRACK:return Q.AUDIO;case oe.SUBTITLE_TRACK:return Q.SUBTITLE;default:return Q.MAIN}}function io(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class kf{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(f.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(f.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,i=n||r,s=new i(t);return this.loaders[e.type]=s,s}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:oe.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:l,levelInfo:c}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:oe.LEVEL,url:s,deliveryDirectives:l,levelOrTrack:c})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:oe.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:oe.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const n=this.loaders[oe.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[oe.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const u=this.hls.logger,d=r.context;if(d&&d.levelOrTrack===e.levelOrTrack&&(d.url===e.url||d.deliveryDirectives&&!e.deliveryDirectives)){d.url===e.url?u.log(`[playlist-loader]: ignore ${e.url} ongoing request`):u.log(`[playlist-loader]: ignore ${e.url} in favor of ${d.url}`);return}u.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===oe.MANIFEST?i=n.manifestLoadPolicy.default:i=h({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),x((t=e.deliveryDirectives)==null?void 0:t.part)){let u;if(e.type===oe.LEVEL&&e.level!==null?u=this.hls.levels[e.level].details:e.type===oe.AUDIO_TRACK&&e.id!==null?u=this.hls.audioTracks[e.id].details:e.type===oe.SUBTITLE_TRACK&&e.id!==null&&(u=this.hls.subtitleTracks[e.id].details),u){const d=u.partTarget,p=u.targetduration;if(d&&p){const _=Math.max(d*3,p*.8)*1e3;i=h({},i,{maxTimeToFirstByteMs:Math.min(_,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(_,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},l={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},c={onSuccess:(u,d,p,_)=>{const w=this.getInternalLoader(p);this.resetInternalLoader(p.type);const T=u.data;if(T.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(u,p,new Error("no EXTM3U delimiter"),_||null,d);return}d.parsing.start=performance.now(),ui.isMediaPlaylist(T)||p.type!==oe.MANIFEST?this.handleTrackOrLevelPlaylist(u,d,p,_||null,w):this.handleMasterPlaylist(u,d,p,_)},onError:(u,d,p,_)=>{this.handleNetworkError(d,p,!1,u,_)},onTimeout:(u,d,p)=>{this.handleNetworkError(d,p,!0,void 0,u)}};r.load(e,l,c)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const i=this.hls,s=e.data,l=io(e,n),c=ui.parseMasterPlaylist(s,l);if(c.playlistParsingError){this.handleManifestParsingError(e,n,c.playlistParsingError,r,t);return}const{contentSteering:u,levels:d,sessionData:p,sessionKeys:_,startTimeOffset:w,variableList:T}=c;this.variableList=T;const{AUDIO:j=[],SUBTITLES:z,"CLOSED-CAPTIONS":ce}=ui.parseMasterPlaylistMedia(s,l,c);j.length&&!j.some(we=>!we.url)&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),j.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new In({}),bitrate:0,url:""})),i.trigger(f.MANIFEST_LOADED,{levels:d,audioTracks:j,subtitles:z,captions:ce,contentSteering:u,url:l,stats:t,networkDetails:r,sessionData:p,sessionKeys:_,startTimeOffset:w,variableList:T})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:l,level:c,type:u}=n,d=io(e,n),p=x(c)?c:x(l)?l:0,_=xl(n),w=ui.parseLevelPlaylist(e.data,d,p,_,0,this.variableList);if(u===oe.MANIFEST){const T={attrs:new In({}),bitrate:0,details:w,name:"",url:d};w.requestScheduled=t.loading.start+gi(w,0),s.trigger(f.MANIFEST_LOADED,{levels:[T],audioTracks:[],url:d,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=w,this.handlePlaylistLoaded(w,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(f.ERROR,{type:te.NETWORK_ERROR,details:M.MANIFEST_PARSING_ERROR,fatal:t.type===oe.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})}handleNetworkError(e,t,n=!1,r,i){let s=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===oe.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===oe.AUDIO_TRACK||e.type===oe.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let c=M.UNKNOWN,u=!1;const d=this.getInternalLoader(e);switch(e.type){case oe.MANIFEST:c=n?M.MANIFEST_LOAD_TIMEOUT:M.MANIFEST_LOAD_ERROR,u=!0;break;case oe.LEVEL:c=n?M.LEVEL_LOAD_TIMEOUT:M.LEVEL_LOAD_ERROR,u=!1;break;case oe.AUDIO_TRACK:c=n?M.AUDIO_TRACK_LOAD_TIMEOUT:M.AUDIO_TRACK_LOAD_ERROR,u=!1;break;case oe.SUBTITLE_TRACK:c=n?M.SUBTITLE_TRACK_LOAD_TIMEOUT:M.SUBTITLE_LOAD_ERROR,u=!1;break}d&&this.resetInternalLoader(e.type);const p={type:te.NETWORK_ERROR,details:c,fatal:u,url:e.url,loader:d,context:e,error:l,networkDetails:t,stats:i};if(r){const _=(t==null?void 0:t.url)||e.url;p.response=E({url:_,data:void 0},r)}this.hls.trigger(f.ERROR,p)}handlePlaylistLoaded(e,t,n,r,i,s){const l=this.hls,{type:c,level:u,id:d,groupId:p,deliveryDirectives:_}=r,w=io(t,r),T=xl(r),j=typeof r.level=="number"&&T===Q.MAIN?u:void 0;if(!e.fragments.length){const ce=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(f.ERROR,{type:te.NETWORK_ERROR,details:M.LEVEL_EMPTY_ERROR,fatal:!1,url:w,error:ce,reason:ce.message,response:t,context:r,level:j,parent:T,networkDetails:i,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const z=e.playlistParsingError;if(z){if(this.hls.logger.warn(`${z} ${e.url}`),!l.config.ignorePlaylistParsingErrors){l.trigger(f.ERROR,{type:te.NETWORK_ERROR,details:M.LEVEL_PARSING_ERROR,fatal:!1,url:w,error:z,reason:z.message,response:t,context:r,level:j,parent:T,networkDetails:i,stats:n});return}e.playlistParsingError=null}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),c){case oe.MANIFEST:case oe.LEVEL:l.trigger(f.LEVEL_LOADED,{details:e,levelInfo:r.levelOrTrack||l.levels[0],level:j||0,id:d||0,stats:n,networkDetails:i,deliveryDirectives:_,withoutMultiVariant:c===oe.MANIFEST});break;case oe.AUDIO_TRACK:l.trigger(f.AUDIO_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:d||0,groupId:p||"",stats:n,networkDetails:i,deliveryDirectives:_});break;case oe.SUBTITLE_TRACK:l.trigger(f.SUBTITLE_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:d||0,groupId:p||"",stats:n,networkDetails:i,deliveryDirectives:_});break}}}class gs{static get version(){return _s}static isMSESupported(){return bl()}static isSupported(){return Df()}static getMediaSource(){return L()}static get Events(){return f}static get MetadataSchema(){return Ci}static get ErrorTypes(){return te}static get ErrorDetails(){return M}static get DefaultConfig(){return gs.defaultConfig?gs.defaultConfig:mf}static set DefaultConfig(e){gs.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Zs,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const t=this.logger=X(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=vf(gs.DefaultConfig,e,t);this.userConfig=e,n.progressive&&_f(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:l,fpsController:c}=n,u=new l(this),d=this.abrController=new r(this),p=new Bt(this),_=n.interstitialsController,w=_?this.interstitialsController=new _(this,gs):null,T=this.bufferController=new i(this,p),j=this.capLevelController=new s(this),z=new c(this),ce=new kf(this),Oe=n.contentSteeringController,we=Oe?new Oe(this):null,it=this.levelController=new Tf(this,we),Et=new wf(this),$t=new Lf(this.config,this.logger),ht=this.streamController=new If(this,p,$t),Dt=this.gapController=new xf(this,p);j.setStreamController(ht),z.setStreamController(ht);const kt=[ce,it,ht];w&&kt.splice(1,0,w),we&&kt.splice(1,0,we),this.networkControllers=kt;const pt=[d,T,Dt,j,z,Et,p];this.audioTrackController=this.createController(n.audioTrackController,kt);const en=n.audioStreamController;en&&kt.push(this.audioStreamController=new en(this,p,$t)),this.subtitleTrackController=this.createController(n.subtitleTrackController,kt);const Zn=n.subtitleStreamController;Zn&&kt.push(this.subtititleStreamController=new Zn(this,p,$t)),this.createController(n.timelineController,pt),$t.emeController=this.emeController=this.createController(n.emeController,pt),this.cmcdController=this.createController(n.cmcdController,pt),this.latencyController=this.createController(Af,pt),this.coreComponents=pt,kt.push(u);const ar=u.onErrorOut;typeof ar=="function"&&this.on(f.ERROR,ar,u),this.on(f.MANIFEST_LOADED,ce.onManifestLoaded,ce)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===f.ERROR;this.trigger(f.ERROR,{type:te.OTHER_ERROR,details:M.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(f.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const i=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(f.ERROR,{type:te.OTHER_ERROR,details:M.ATTACH_MEDIA_ERROR,fatal:!0,error:i});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(f.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(f.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(f.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=v.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(f.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[Q.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[Q.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[Q.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=e==null?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=bc()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){Fe(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(t===-1&&e!=null&&e.length?r=e.length-1:r=t,n)for(let i=r;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=n)return i}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const n=De(t);return mn(e,n,navigator.mediaCapabilities)}}gs.defaultConfig=void 0},16722:function(fn,je,b){"use strict";b.d(je,{Z:function(){return Q}});const x=o=>typeof o=="object"&&o!=null&&o.nodeType===1,ne=(o,y)=>(!y||o!=="hidden")&&o!=="visible"&&o!=="clip",pe=(o,y)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const C=getComputedStyle(o,null);return ne(C.overflowY,y)||ne(C.overflowX,y)||(h=>{const m=(E=>{if(!E.ownerDocument||!E.ownerDocument.defaultView)return null;try{return E.ownerDocument.defaultView.frameElement}catch(S){return null}})(h);return!!m&&(m.clientHeight<h.scrollHeight||m.clientWidth<h.scrollWidth)})(o)}return!1},te=(o,y,C,h,m,E,S,I)=>E<o&&S>y||E>o&&S<y?0:E<=o&&I<=C||S>=y&&I>=C?E-o-h:S>y&&I<C||E<o&&I>C?S-y+m:0,M=o=>{const y=o.parentElement;return y==null?o.getRootNode().host||null:y},f=(o,y)=>{var C,h,m,E;if(typeof document=="undefined")return[];const{scrollMode:S,block:I,inline:B,boundary:G,skipOverflowHiddenElements:R}=y,O=typeof G=="function"?G:Le=>Le!==G;if(!x(o))throw new TypeError("Invalid target");const D=document.scrollingElement||document.documentElement,A=[];let W=o;for(;x(W)&&O(W);){if(W=M(W),W===D){A.push(W);break}W!=null&&W===document.body&&pe(W)&&!pe(document.documentElement)||W!=null&&pe(W,R)&&A.push(W)}const X=(h=(C=window.visualViewport)==null?void 0:C.width)!=null?h:innerWidth,Y=(E=(m=window.visualViewport)==null?void 0:m.height)!=null?E:innerHeight,{scrollX:L,scrollY:se}=window,{height:ae,width:Be,top:U,right:k,bottom:N,left:V}=o.getBoundingClientRect(),{top:J,right:H,bottom:v,left:g}=(Le=>{const Je=window.getComputedStyle(Le);return{top:parseFloat(Je.scrollMarginTop)||0,right:parseFloat(Je.scrollMarginRight)||0,bottom:parseFloat(Je.scrollMarginBottom)||0,left:parseFloat(Je.scrollMarginLeft)||0}})(o);let F=I==="start"||I==="nearest"?U-J:I==="end"?N+v:U+ae/2-J+v,ie=B==="center"?V+Be/2-g+H:B==="end"?k+H:V-g;const ue=[];for(let Le=0;Le<A.length;Le++){const Je=A[Le],{height:rt,width:dt,top:vt,right:be,bottom:Tt,left:tt}=Je.getBoundingClientRect();if(S==="if-needed"&&U>=0&&V>=0&&N<=Y&&k<=X&&(Je===D&&!pe(Je)||U>=vt&&N<=Tt&&V>=tt&&k<=be))return ue;const It=getComputedStyle(Je),Qe=parseInt(It.borderLeftWidth,10),$e=parseInt(It.borderTopWidth,10),ye=parseInt(It.borderRightWidth,10),de=parseInt(It.borderBottomWidth,10);let K=0,xe=0;const Se="offsetWidth"in Je?Je.offsetWidth-Je.clientWidth-Qe-ye:0,$="offsetHeight"in Je?Je.offsetHeight-Je.clientHeight-$e-de:0,P="offsetWidth"in Je?Je.offsetWidth===0?0:dt/Je.offsetWidth:0,fe="offsetHeight"in Je?Je.offsetHeight===0?0:rt/Je.offsetHeight:0;if(D===Je)K=I==="start"?F:I==="end"?F-Y:I==="nearest"?te(se,se+Y,Y,$e,de,se+F,se+F+ae,ae):F-Y/2,xe=B==="start"?ie:B==="center"?ie-X/2:B==="end"?ie-X:te(L,L+X,X,Qe,ye,L+ie,L+ie+Be,Be),K=Math.max(0,K+se),xe=Math.max(0,xe+L);else{K=I==="start"?F-vt-$e:I==="end"?F-Tt+de+$:I==="nearest"?te(vt,Tt,rt,$e,de+$,F,F+ae,ae):F-(vt+rt/2)+$/2,xe=B==="start"?ie-tt-Qe:B==="center"?ie-(tt+dt/2)+Se/2:B==="end"?ie-be+ye+Se:te(tt,be,dt,Qe,ye+Se,ie,ie+Be,Be);const{scrollLeft:he,scrollTop:q}=Je;K=fe===0?0:Math.max(0,Math.min(q+K/fe,Je.scrollHeight-rt/fe+$)),xe=P===0?0:Math.max(0,Math.min(he+xe/P,Je.scrollWidth-dt/P+Se)),F+=q-K,ie+=he-xe}ue.push({el:Je,top:K,left:xe})}return ue},oe=o=>o===!1?{block:"end",inline:"nearest"}:(y=>y===Object(y)&&Object.keys(y).length!==0)(o)?o:{block:"start",inline:"nearest"};function Q(o,y){if(!o.isConnected||!(m=>{let E=m;for(;E&&E.parentNode;){if(E.parentNode===document)return!0;E=E.parentNode instanceof ShadowRoot?E.parentNode.host:E.parentNode}return!1})(o))return;const C=(m=>{const E=window.getComputedStyle(m);return{top:parseFloat(E.scrollMarginTop)||0,right:parseFloat(E.scrollMarginRight)||0,bottom:parseFloat(E.scrollMarginBottom)||0,left:parseFloat(E.scrollMarginLeft)||0}})(o);if((m=>typeof m=="object"&&typeof m.behavior=="function")(y))return y.behavior(f(o,y));const h=typeof y=="boolean"||y==null?void 0:y.behavior;for(const{el:m,top:E,left:S}of f(o,oe(y))){const I=E-C.top+C.bottom,B=S-C.left+C.right;m.scroll({top:I,left:B,behavior:h})}}}}]);
}());