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__Commo...

162 lines
1.3 MiB

!(function(){var Wc=Object.defineProperty;var Hc=Object.getOwnPropertySymbols;var zc=Object.prototype.hasOwnProperty,Zc=Object.prototype.propertyIsEnumerable;var Kc=Math.pow,Rc=(kn,Ft,Y)=>Ft in kn?Wc(kn,Ft,{enumerable:!0,configurable:!0,writable:!0,value:Y}):kn[Ft]=Y,kc=(kn,Ft)=>{for(var Y in Ft||(Ft={}))zc.call(Ft,Y)&&Rc(kn,Y,Ft[Y]);if(Hc)for(var Y of Hc(Ft))Zc.call(Ft,Y)&&Rc(kn,Y,Ft[Y]);return kn};var fi=(kn,Ft,Y)=>Rc(kn,typeof Ft!="symbol"?Ft+"":Ft,Y);(self.webpackChunk=self.webpackChunk||[]).push([[2303],{95869:function(kn,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return V}});var re=Y(54476),Te=Y(59301),He={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z"}}]},name:"solution",theme:"outlined"},xe=He,ne=Y(7657),y=function(le,O){return Te.createElement(ne.Z,(0,re.Z)({},le,{ref:O,icon:xe}))},Se=Te.forwardRef(y),V=Se},65030:function(kn,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return tn}});var re=Y(33885),Te=Y(42978),He=Y(75931),xe=Y(43403),ne=Y(92310),y=Y.n(ne),Se=Y(29301),V=Y(76846),o=Y(96452),le=Y(6089),O=Y(80402),B=Y(34280),E=Y(49658),F=Y(59301),L=Y(54476),Ae=Y(77900),Z=Y(8654);function J(Re){var P=Re.prefixCls,v=Re.align,T=Re.arrow,X=Re.arrowPos,k=T||{},K=k.className,ce=k.content,Me=X.x,We=Me===void 0?0:Me,lt=X.y,ht=lt===void 0?0:lt,jt=F.useRef();if(!v||!v.points)return null;var vt={position:"absolute"};if(v.autoArrow!==!1){var Rt=v.points[0],yt=v.points[1],xt=Rt[0],At=Rt[1],gt=yt[0],It=yt[1];xt===gt||!["t","b"].includes(xt)?vt.top=ht:xt==="t"?vt.top=0:vt.bottom=0,At===It||!["l","r"].includes(At)?vt.left=We:At==="l"?vt.left=0:vt.right=0}return F.createElement("div",{ref:jt,className:y()("".concat(P,"-arrow"),K),style:vt},ce)}function H(Re){var P=Re.prefixCls,v=Re.open,T=Re.zIndex,X=Re.mask,k=Re.motion;return X?F.createElement(Ae.default,(0,L.Z)({},k,{motionAppear:!0,visible:v,removeOnLeave:!0}),function(K){var ce=K.className;return F.createElement("div",{style:{zIndex:T},className:y()("".concat(P,"-mask"),ce)})}):null}var z=F.memo(function(Re){var P=Re.children;return P},function(Re,P){return P.cache}),oe=z,be=F.forwardRef(function(Re,P){var v=Re.popup,T=Re.className,X=Re.prefixCls,k=Re.style,K=Re.target,ce=Re.onVisibleChanged,Me=Re.open,We=Re.keepDom,lt=Re.fresh,ht=Re.onClick,jt=Re.mask,vt=Re.arrow,Rt=Re.arrowPos,yt=Re.align,xt=Re.motion,At=Re.maskMotion,gt=Re.forceRender,It=Re.getPopupContainer,Ht=Re.autoDestroy,un=Re.portal,Yt=Re.zIndex,_n=Re.onMouseEnter,on=Re.onMouseLeave,Un=Re.onPointerEnter,Gn=Re.onPointerDownCapture,dr=Re.ready,Xt=Re.offsetX,Cn=Re.offsetY,Ge=Re.offsetR,Pe=Re.offsetB,Ie=Re.onAlign,ee=Re.onPrepare,ue=Re.stretch,me=Re.targetWidth,Fe=Re.targetHeight,Qe=typeof v=="function"?v():v,Tt=Me||We,Kt=(It==null?void 0:It.length)>0,Lt=F.useState(!It||!Kt),yn=(0,Te.Z)(Lt,2),qn=yn[0],or=yn[1];if((0,B.Z)(function(){!qn&&Kt&&K&&or(!0)},[qn,Kt,K]),!qn)return null;var cn="auto",qt={left:"-1000vw",top:"-1000vh",right:cn,bottom:cn};if(dr||!Me){var fr,pr=yt.points,Ve=yt.dynamicInset||((fr=yt._experimental)===null||fr===void 0?void 0:fr.dynamicInset),lr=Ve&&pr[0][1]==="r",rr=Ve&&pr[0][0]==="b";lr?(qt.right=Ge,qt.left=cn):(qt.left=Xt,qt.right=cn),rr?(qt.bottom=Pe,qt.top=cn):(qt.top=Cn,qt.bottom=cn)}var ir={};return ue&&(ue.includes("height")&&Fe?ir.height=Fe:ue.includes("minHeight")&&Fe&&(ir.minHeight=Fe),ue.includes("width")&&me?ir.width=me:ue.includes("minWidth")&&me&&(ir.minWidth=me)),Me||(ir.pointerEvents="none"),F.createElement(un,{open:gt||Tt,getContainer:It&&function(){return It(K)},autoDestroy:Ht},F.createElement(H,{prefixCls:X,open:Me,zIndex:Yt,mask:jt,motion:At}),F.createElement(Se.Z,{onResize:Ie,disabled:!Me},function(ri){return F.createElement(Ae.default,(0,L.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:gt,leavedClassName:"".concat(X,"-hidden")},xt,{onAppearPrepare:ee,onEnterPrepare:ee,visible:Me,onVisibleChanged:function(li){var Gr;xt==null||(Gr=xt.onVisibleChanged)===null||Gr===void 0||Gr.call(xt,li),ce(li)}}),function(Cr,li){var Gr=Cr.className,Ci=Cr.style,ii=y()(X,Gr,T);return F.createElement("div",{ref:(0,Z.sQ)(ri,P,li),className:ii,style:(0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)({"--arrow-x":"".concat(Rt.x||0,"px"),"--arrow-y":"".concat(Rt.y||0,"px")},qt),ir),Ci),{},{boxSizing:"border-box",zIndex:Yt},k),onMouseEnter:_n,onMouseLeave:on,onPointerEnter:Un,onClick:ht,onPointerDownCapture:Gn},vt&&F.createElement(J,{prefixCls:X,arrow:vt,arrowPos:Rt,align:yt}),F.createElement(oe,{cache:!Me&&!lt},Qe))})}))}),De=be,ke=F.forwardRef(function(Re,P){var v=Re.children,T=Re.getTriggerDOMNode,X=(0,Z.Yr)(v),k=F.useCallback(function(ce){(0,Z.mH)(P,T?T(ce):ce)},[T]),K=(0,Z.x1)(k,(0,Z.C4)(v));return X?F.cloneElement(v,{ref:K}):v}),ge=ke,Ue=F.createContext(null),Je=Ue;function Be(Re){return Re?Array.isArray(Re)?Re:[Re]:[]}function nt(Re,P,v,T){return F.useMemo(function(){var X=Be(v!=null?v:P),k=Be(T!=null?T:P),K=new Set(X),ce=new Set(k);return Re&&(K.has("hover")&&(K.delete("hover"),K.add("click")),ce.has("hover")&&(ce.delete("hover"),ce.add("click"))),[K,ce]},[Re,P,v,T])}var ie=Y(29194);function Q(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],v=arguments.length>2?arguments[2]:void 0;return v?Re[0]===P[0]:Re[0]===P[0]&&Re[1]===P[1]}function q(Re,P,v,T){for(var X=v.points,k=Object.keys(Re),K=0;K<k.length;K+=1){var ce,Me=k[K];if(Q((ce=Re[Me])===null||ce===void 0?void 0:ce.points,X,T))return"".concat(P,"-placement-").concat(Me)}return""}function se(Re,P,v,T){return P||(v?{motionName:"".concat(Re,"-").concat(v)}:T?{motionName:T}:null)}function de(Re){return Re.ownerDocument.defaultView}function fe(Re){for(var P=[],v=Re==null?void 0:Re.parentElement,T=["hidden","scroll","clip","auto"];v;){var X=de(v).getComputedStyle(v),k=X.overflowX,K=X.overflowY,ce=X.overflow;[k,K,ce].some(function(Me){return T.includes(Me)})&&P.push(v),v=v.parentElement}return P}function b(Re){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Re)?P:Re}function S(Re){return b(parseFloat(Re),0)}function W(Re,P){var v=(0,re.Z)({},Re);return(P||[]).forEach(function(T){if(!(T instanceof HTMLBodyElement||T instanceof HTMLHtmlElement)){var X=de(T).getComputedStyle(T),k=X.overflow,K=X.overflowClipMargin,ce=X.borderTopWidth,Me=X.borderBottomWidth,We=X.borderLeftWidth,lt=X.borderRightWidth,ht=T.getBoundingClientRect(),jt=T.offsetHeight,vt=T.clientHeight,Rt=T.offsetWidth,yt=T.clientWidth,xt=S(ce),At=S(Me),gt=S(We),It=S(lt),Ht=b(Math.round(ht.width/Rt*1e3)/1e3),un=b(Math.round(ht.height/jt*1e3)/1e3),Yt=(Rt-yt-gt-It)*Ht,_n=(jt-vt-xt-At)*un,on=xt*un,Un=At*un,Gn=gt*Ht,dr=It*Ht,Xt=0,Cn=0;if(k==="clip"){var Ge=S(K);Xt=Ge*Ht,Cn=Ge*un}var Pe=ht.x+Gn-Xt,Ie=ht.y+on-Cn,ee=Pe+ht.width+2*Xt-Gn-dr-Yt,ue=Ie+ht.height+2*Cn-on-Un-_n;v.left=Math.max(v.left,Pe),v.top=Math.max(v.top,Ie),v.right=Math.min(v.right,ee),v.bottom=Math.min(v.bottom,ue)}}),v}function _e(Re){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,v="".concat(P),T=v.match(/^(.*)\%$/);return T?Re*(parseFloat(T[1])/100):parseFloat(v)}function qe(Re,P){var v=P||[],T=(0,Te.Z)(v,2),X=T[0],k=T[1];return[_e(Re.width,X),_e(Re.height,k)]}function mt(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Re[0],Re[1]]}function Gt(Re,P){var v=P[0],T=P[1],X,k;return v==="t"?k=Re.y:v==="b"?k=Re.y+Re.height:k=Re.y+Re.height/2,T==="l"?X=Re.x:T==="r"?X=Re.x+Re.width:X=Re.x+Re.width/2,{x:X,y:k}}function Qt(Re,P){var v={t:"b",b:"t",l:"r",r:"l"};return Re.map(function(T,X){return X===P?v[T]||"c":T}).join("")}function sn(Re,P,v,T,X,k,K){var ce=F.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:X[T]||{}}),Me=(0,Te.Z)(ce,2),We=Me[0],lt=Me[1],ht=F.useRef(0),jt=F.useMemo(function(){return P?fe(P):[]},[P]),vt=F.useRef({}),Rt=function(){vt.current={}};Re||Rt();var yt=(0,le.Z)(function(){if(P&&v&&Re){let Pi=function(Mi,Vi){var Wi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Sr,vs=Tt.x+Mi,Qs=Tt.y+Vi,Os=vs+rr,os=Qs+lr,Qr=Math.max(vs,Wi.left),Ln=Math.max(Qs,Wi.top),Bn=Math.min(Os,Wi.right),vr=Math.min(os,Wi.bottom);return Math.max(0,(Bn-Qr)*(vr-Ln))},hi=function(){an=Tt.y+Ke,En=an+lr,Qn=Tt.x+ve,fn=Qn+rr};var gt,It,Ht,un,Yt=P,_n=Yt.ownerDocument,on=de(Yt),Un=on.getComputedStyle(Yt),Gn=Un.position,dr=Yt.style.left,Xt=Yt.style.top,Cn=Yt.style.right,Ge=Yt.style.bottom,Pe=Yt.style.overflow,Ie=(0,re.Z)((0,re.Z)({},X[T]),k),ee=_n.createElement("div");(gt=Yt.parentElement)===null||gt===void 0||gt.appendChild(ee),ee.style.left="".concat(Yt.offsetLeft,"px"),ee.style.top="".concat(Yt.offsetTop,"px"),ee.style.position=Gn,ee.style.height="".concat(Yt.offsetHeight,"px"),ee.style.width="".concat(Yt.offsetWidth,"px"),Yt.style.left="0",Yt.style.top="0",Yt.style.right="auto",Yt.style.bottom="auto",Yt.style.overflow="hidden";var ue;if(Array.isArray(v))ue={x:v[0],y:v[1],width:0,height:0};else{var me,Fe,Qe=v.getBoundingClientRect();Qe.x=(me=Qe.x)!==null&&me!==void 0?me:Qe.left,Qe.y=(Fe=Qe.y)!==null&&Fe!==void 0?Fe:Qe.top,ue={x:Qe.x,y:Qe.y,width:Qe.width,height:Qe.height}}var Tt=Yt.getBoundingClientRect(),Kt=on.getComputedStyle(Yt),Lt=Kt.height,yn=Kt.width;Tt.x=(It=Tt.x)!==null&&It!==void 0?It:Tt.left,Tt.y=(Ht=Tt.y)!==null&&Ht!==void 0?Ht:Tt.top;var qn=_n.documentElement,or=qn.clientWidth,cn=qn.clientHeight,qt=qn.scrollWidth,fr=qn.scrollHeight,pr=qn.scrollTop,Ve=qn.scrollLeft,lr=Tt.height,rr=Tt.width,ir=ue.height,ri=ue.width,Cr={left:0,top:0,right:or,bottom:cn},li={left:-Ve,top:-pr,right:qt-Ve,bottom:fr-pr},Gr=Ie.htmlRegion,Ci="visible",ii="visibleFirst";Gr!=="scroll"&&Gr!==ii&&(Gr=Ci);var pi=Gr===ii,es=W(li,jt),br=W(Cr,jt),Sr=Gr===Ci?br:es,Nr=pi?br:Sr;Yt.style.left="auto",Yt.style.top="auto",Yt.style.right="0",Yt.style.bottom="0";var xi=Yt.getBoundingClientRect();Yt.style.left=dr,Yt.style.top=Xt,Yt.style.right=Cn,Yt.style.bottom=Ge,Yt.style.overflow=Pe,(un=Yt.parentElement)===null||un===void 0||un.removeChild(ee);var qr=b(Math.round(rr/parseFloat(yn)*1e3)/1e3),Ki=b(Math.round(lr/parseFloat(Lt)*1e3)/1e3);if(qr===0||Ki===0||(0,V.Sh)(v)&&!(0,ie.Z)(v))return;var Ti=Ie.offset,Vn=Ie.targetOffset,Vt=qe(Tt,Ti),ze=(0,Te.Z)(Vt,2),ut=ze[0],Pt=ze[1],St=qe(ue,Vn),zt=(0,Te.Z)(St,2),Et=zt[0],bt=zt[1];ue.x-=Et,ue.y-=bt;var nn=Ie.points||[],vn=(0,Te.Z)(nn,2),wn=vn[0],ur=vn[1],Dn=mt(ur),Zn=mt(wn),M=Gt(ue,Dn),N=Gt(Tt,Zn),he=(0,re.Z)({},Ie),ve=M.x-N.x+ut,Ke=M.y-N.y+Pt,rt=Pi(ve,Ke),Bt=Pi(ve,Ke,br),Ct=Gt(ue,["t","l"]),$t=Gt(Tt,["t","l"]),Ut=Gt(ue,["b","r"]),Le=Gt(Tt,["b","r"]),st=Ie.overflow||{},Ot=st.adjustX,mn=st.adjustY,pn=st.shiftX,en=st.shiftY,ln=function(Vi){return typeof Vi=="boolean"?Vi:Vi>=0},an,En,Qn,fn;hi();var dn=ln(mn),$n=Zn[0]===Dn[0];if(dn&&Zn[0]==="t"&&(En>Nr.bottom||vt.current.bt)){var ar=Ke;$n?ar-=lr-ir:ar=Ct.y-Le.y-Pt;var Kn=Pi(ve,ar),Rn=Pi(ve,ar,br);Kn>rt||Kn===rt&&(!pi||Rn>=Bt)?(vt.current.bt=!0,Ke=ar,Pt=-Pt,he.points=[Qt(Zn,0),Qt(Dn,0)]):vt.current.bt=!1}if(dn&&Zn[0]==="b"&&(an<Nr.top||vt.current.tb)){var hr=Ke;$n?hr+=lr-ir:hr=Ut.y-$t.y-Pt;var er=Pi(ve,hr),_r=Pi(ve,hr,br);er>rt||er===rt&&(!pi||_r>=Bt)?(vt.current.tb=!0,Ke=hr,Pt=-Pt,he.points=[Qt(Zn,0),Qt(Dn,0)]):vt.current.tb=!1}var Rr=ln(Ot),Yr=Zn[1]===Dn[1];if(Rr&&Zn[1]==="l"&&(fn>Nr.right||vt.current.rl)){var kr=ve;Yr?kr-=rr-ri:kr=Ct.x-Le.x-ut;var Ir=Pi(kr,Ke),cr=Pi(kr,Ke,br);Ir>rt||Ir===rt&&(!pi||cr>=Bt)?(vt.current.rl=!0,ve=kr,ut=-ut,he.points=[Qt(Zn,1),Qt(Dn,1)]):vt.current.rl=!1}if(Rr&&Zn[1]==="r"&&(Qn<Nr.left||vt.current.lr)){var Fr=ve;Yr?Fr+=rr-ri:Fr=Ut.x-$t.x-ut;var Dr=Pi(Fr,Ke),Ri=Pi(Fr,Ke,br);Dr>rt||Dr===rt&&(!pi||Ri>=Bt)?(vt.current.lr=!0,ve=Fr,ut=-ut,he.points=[Qt(Zn,1),Qt(Dn,1)]):vt.current.lr=!1}hi();var Vr=pn===!0?0:pn;typeof Vr=="number"&&(Qn<br.left&&(ve-=Qn-br.left-ut,ue.x+ri<br.left+Vr&&(ve+=ue.x-br.left+ri-Vr)),fn>br.right&&(ve-=fn-br.right-ut,ue.x>br.right-Vr&&(ve+=ue.x-br.right+Vr)));var Wr=en===!0?0:en;typeof Wr=="number"&&(an<br.top&&(Ke-=an-br.top-Pt,ue.y+ir<br.top+Wr&&(Ke+=ue.y-br.top+ir-Wr)),En>br.bottom&&(Ke-=En-br.bottom-Pt,ue.y>br.bottom-Wr&&(Ke+=ue.y-br.bottom+Wr)));var Lr=Tt.x+ve,Ai=Lr+rr,Hr=Tt.y+Ke,Ei=Hr+lr,Ii=ue.x,Yn=Ii+ri,ts=ue.y,As=ts+ir,ki=Math.max(Lr,Ii),Si=Math.min(Ai,Yn),$i=(ki+Si)/2,_s=$i-Lr,xs=Math.max(Hr,ts),ei=Math.min(Ei,As),ds=(xs+ei)/2,ns=ds-Hr;K==null||K(P,he);var Gi=xi.right-Tt.x-(ve+Tt.width),qi=xi.bottom-Tt.y-(Ke+Tt.height);qr===1&&(ve=Math.round(ve),Gi=Math.round(Gi)),Ki===1&&(Ke=Math.round(Ke),qi=Math.round(qi));var Ss={ready:!0,offsetX:ve/qr,offsetY:Ke/Ki,offsetR:Gi/qr,offsetB:qi/Ki,arrowX:_s/qr,arrowY:ns/Ki,scaleX:qr,scaleY:Ki,align:he};lt(Ss)}}),xt=function(){ht.current+=1;var It=ht.current;Promise.resolve().then(function(){ht.current===It&&yt()})},At=function(){lt(function(It){return(0,re.Z)((0,re.Z)({},It),{},{ready:!1})})};return(0,B.Z)(At,[T]),(0,B.Z)(function(){Re||At()},[Re]),[We.ready,We.offsetX,We.offsetY,We.offsetR,We.offsetB,We.arrowX,We.arrowY,We.scaleX,We.scaleY,We.align,xt]}var Wt=Y(94480);function kt(Re,P,v,T,X){(0,B.Z)(function(){if(Re&&P&&v){let ht=function(){T(),X()};var k=P,K=v,ce=fe(k),Me=fe(K),We=de(K),lt=new Set([We].concat((0,Wt.Z)(ce),(0,Wt.Z)(Me)));return lt.forEach(function(jt){jt.addEventListener("scroll",ht,{passive:!0})}),We.addEventListener("resize",ht,{passive:!0}),T(),function(){lt.forEach(function(jt){jt.removeEventListener("scroll",ht),We.removeEventListener("resize",ht)})}}},[Re,P,v])}var Xe=Y(48736);function dt(Re,P,v,T,X,k,K,ce){var Me=F.useRef(Re);Me.current=Re;var We=F.useRef(!1);F.useEffect(function(){if(P&&T&&(!X||k)){var ht=function(){We.current=!1},jt=function(Ht){var un;Me.current&&!K(((un=Ht.composedPath)===null||un===void 0||(un=un.call(Ht))===null||un===void 0?void 0:un[0])||Ht.target)&&!We.current&&ce(!1)},vt=de(T);vt.addEventListener("pointerdown",ht,!0),vt.addEventListener("mousedown",jt,!0),vt.addEventListener("contextmenu",jt,!0);var Rt=(0,o.A)(v);if(Rt&&(Rt.addEventListener("mousedown",jt,!0),Rt.addEventListener("contextmenu",jt,!0)),0)var yt,xt,At,gt;return function(){vt.removeEventListener("pointerdown",ht,!0),vt.removeEventListener("mousedown",jt,!0),vt.removeEventListener("contextmenu",jt,!0),Rt&&(Rt.removeEventListener("mousedown",jt,!0),Rt.removeEventListener("contextmenu",jt,!0))}}},[P,v,T,X,k]);function lt(){We.current=!0}return lt}var ot=["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 ft(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xe.Z,P=F.forwardRef(function(v,T){var X=v.prefixCls,k=X===void 0?"rc-trigger-popup":X,K=v.children,ce=v.action,Me=ce===void 0?"hover":ce,We=v.showAction,lt=v.hideAction,ht=v.popupVisible,jt=v.defaultPopupVisible,vt=v.onPopupVisibleChange,Rt=v.afterPopupVisibleChange,yt=v.mouseEnterDelay,xt=v.mouseLeaveDelay,At=xt===void 0?.1:xt,gt=v.focusDelay,It=v.blurDelay,Ht=v.mask,un=v.maskClosable,Yt=un===void 0?!0:un,_n=v.getPopupContainer,on=v.forceRender,Un=v.autoDestroy,Gn=v.destroyPopupOnHide,dr=v.popup,Xt=v.popupClassName,Cn=v.popupStyle,Ge=v.popupPlacement,Pe=v.builtinPlacements,Ie=Pe===void 0?{}:Pe,ee=v.popupAlign,ue=v.zIndex,me=v.stretch,Fe=v.getPopupClassNameFromAlign,Qe=v.fresh,Tt=v.alignPoint,Kt=v.onPopupClick,Lt=v.onPopupAlign,yn=v.arrow,qn=v.popupMotion,or=v.maskMotion,cn=v.popupTransitionName,qt=v.popupAnimation,fr=v.maskTransitionName,pr=v.maskAnimation,Ve=v.className,lr=v.getTriggerDOMNode,rr=(0,He.Z)(v,ot),ir=Un||Gn||!1,ri=F.useState(!1),Cr=(0,Te.Z)(ri,2),li=Cr[0],Gr=Cr[1];(0,B.Z)(function(){Gr((0,E.Z)())},[]);var Ci=F.useRef({}),ii=F.useContext(Je),pi=F.useMemo(function(){return{registerSubPopup:function(Bn,vr){Ci.current[Bn]=vr,ii==null||ii.registerSubPopup(Bn,vr)}}},[ii]),es=(0,O.Z)(),br=F.useState(null),Sr=(0,Te.Z)(br,2),Nr=Sr[0],xi=Sr[1],qr=F.useRef(null),Ki=(0,le.Z)(function(Ln){qr.current=Ln,(0,V.Sh)(Ln)&&Nr!==Ln&&xi(Ln),ii==null||ii.registerSubPopup(es,Ln)}),Ti=F.useState(null),Vn=(0,Te.Z)(Ti,2),Vt=Vn[0],ze=Vn[1],ut=F.useRef(null),Pt=(0,le.Z)(function(Ln){(0,V.Sh)(Ln)&&Vt!==Ln&&(ze(Ln),ut.current=Ln)}),St=F.Children.only(K),zt=(St==null?void 0:St.props)||{},Et={},bt=(0,le.Z)(function(Ln){var Bn,vr,ti=Vt;return(ti==null?void 0:ti.contains(Ln))||((Bn=(0,o.A)(ti))===null||Bn===void 0?void 0:Bn.host)===Ln||Ln===ti||(Nr==null?void 0:Nr.contains(Ln))||((vr=(0,o.A)(Nr))===null||vr===void 0?void 0:vr.host)===Ln||Ln===Nr||Object.values(Ci.current).some(function(Pr){return(Pr==null?void 0:Pr.contains(Ln))||Ln===Pr})}),nn=se(k,qn,qt,cn),vn=se(k,or,pr,fr),wn=F.useState(jt||!1),ur=(0,Te.Z)(wn,2),Dn=ur[0],Zn=ur[1],M=ht!=null?ht:Dn,N=(0,le.Z)(function(Ln){ht===void 0&&Zn(Ln)});(0,B.Z)(function(){Zn(ht||!1)},[ht]);var he=F.useRef(M);he.current=M;var ve=F.useRef([]);ve.current=[];var Ke=(0,le.Z)(function(Ln){var Bn;N(Ln),((Bn=ve.current[ve.current.length-1])!==null&&Bn!==void 0?Bn:M)!==Ln&&(ve.current.push(Ln),vt==null||vt(Ln))}),rt=F.useRef(),Bt=function(){clearTimeout(rt.current)},Ct=function(Bn){var vr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Bt(),vr===0?Ke(Bn):rt.current=setTimeout(function(){Ke(Bn)},vr*1e3)};F.useEffect(function(){return Bt},[]);var $t=F.useState(!1),Ut=(0,Te.Z)($t,2),Le=Ut[0],st=Ut[1];(0,B.Z)(function(Ln){(!Ln||M)&&st(!0)},[M]);var Ot=F.useState(null),mn=(0,Te.Z)(Ot,2),pn=mn[0],en=mn[1],ln=F.useState(null),an=(0,Te.Z)(ln,2),En=an[0],Qn=an[1],fn=function(Bn){Qn([Bn.clientX,Bn.clientY])},dn=sn(M,Nr,Tt&&En!==null?En:Vt,Ge,Ie,ee,Lt),$n=(0,Te.Z)(dn,11),ar=$n[0],Kn=$n[1],Rn=$n[2],hr=$n[3],er=$n[4],_r=$n[5],Rr=$n[6],Yr=$n[7],kr=$n[8],Ir=$n[9],cr=$n[10],Fr=nt(li,Me,We,lt),Dr=(0,Te.Z)(Fr,2),Ri=Dr[0],Vr=Dr[1],Wr=Ri.has("click"),Lr=Vr.has("click")||Vr.has("contextMenu"),Ai=(0,le.Z)(function(){Le||cr()}),Hr=function(){he.current&&Tt&&Lr&&Ct(!1)};kt(M,Vt,Nr,Ai,Hr),(0,B.Z)(function(){Ai()},[En,Ge]),(0,B.Z)(function(){M&&!(Ie!=null&&Ie[Ge])&&Ai()},[JSON.stringify(ee)]);var Ei=F.useMemo(function(){var Ln=q(Ie,k,Ir,Tt);return y()(Ln,Fe==null?void 0:Fe(Ir))},[Ir,Fe,Ie,k,Tt]);F.useImperativeHandle(T,function(){return{nativeElement:ut.current,popupElement:qr.current,forceAlign:Ai}});var Ii=F.useState(0),Yn=(0,Te.Z)(Ii,2),ts=Yn[0],As=Yn[1],ki=F.useState(0),Si=(0,Te.Z)(ki,2),$i=Si[0],_s=Si[1],xs=function(){if(me&&Vt){var Bn=Vt.getBoundingClientRect();As(Bn.width),_s(Bn.height)}},ei=function(){xs(),Ai()},ds=function(Bn){st(!1),cr(),Rt==null||Rt(Bn)},ns=function(){return new Promise(function(Bn){xs(),en(function(){return Bn})})};(0,B.Z)(function(){pn&&(cr(),pn(),en(null))},[pn]);function Gi(Ln,Bn,vr,ti){Et[Ln]=function(Pr){var ys;ti==null||ti(Pr),Ct(Bn,vr);for(var Qi=arguments.length,Bi=new Array(Qi>1?Qi-1:0),Ys=1;Ys<Qi;Ys++)Bi[Ys-1]=arguments[Ys];(ys=zt[Ln])===null||ys===void 0||ys.call.apply(ys,[zt,Pr].concat(Bi))}}(Wr||Lr)&&(Et.onClick=function(Ln){var Bn;he.current&&Lr?Ct(!1):!he.current&&Wr&&(fn(Ln),Ct(!0));for(var vr=arguments.length,ti=new Array(vr>1?vr-1:0),Pr=1;Pr<vr;Pr++)ti[Pr-1]=arguments[Pr];(Bn=zt.onClick)===null||Bn===void 0||Bn.call.apply(Bn,[zt,Ln].concat(ti))});var qi=dt(M,Lr,Vt,Nr,Ht,Yt,bt,Ct),Ss=Ri.has("hover"),Pi=Vr.has("hover"),hi,Mi;Ss&&(Gi("onMouseEnter",!0,yt,function(Ln){fn(Ln)}),Gi("onPointerEnter",!0,yt,function(Ln){fn(Ln)}),hi=function(Bn){(M||Le)&&Nr!==null&&Nr!==void 0&&Nr.contains(Bn.target)&&Ct(!0,yt)},Tt&&(Et.onMouseMove=function(Ln){var Bn;(Bn=zt.onMouseMove)===null||Bn===void 0||Bn.call(zt,Ln)})),Pi&&(Gi("onMouseLeave",!1,At),Gi("onPointerLeave",!1,At),Mi=function(){Ct(!1,At)}),Ri.has("focus")&&Gi("onFocus",!0,gt),Vr.has("focus")&&Gi("onBlur",!1,It),Ri.has("contextMenu")&&(Et.onContextMenu=function(Ln){var Bn;he.current&&Vr.has("contextMenu")?Ct(!1):(fn(Ln),Ct(!0)),Ln.preventDefault();for(var vr=arguments.length,ti=new Array(vr>1?vr-1:0),Pr=1;Pr<vr;Pr++)ti[Pr-1]=arguments[Pr];(Bn=zt.onContextMenu)===null||Bn===void 0||Bn.call.apply(Bn,[zt,Ln].concat(ti))}),Ve&&(Et.className=y()(zt.className,Ve));var Vi=F.useRef(!1);Vi.current||(Vi.current=on||M||Le);var Wi=(0,re.Z)((0,re.Z)({},zt),Et),vs={},Qs=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Qs.forEach(function(Ln){rr[Ln]&&(vs[Ln]=function(){for(var Bn,vr=arguments.length,ti=new Array(vr),Pr=0;Pr<vr;Pr++)ti[Pr]=arguments[Pr];(Bn=Wi[Ln])===null||Bn===void 0||Bn.call.apply(Bn,[Wi].concat(ti)),rr[Ln].apply(rr,ti)})});var Os=F.cloneElement(St,(0,re.Z)((0,re.Z)({},Wi),vs)),os={x:_r,y:Rr},Qr=yn?(0,re.Z)({},yn!==!0?yn:{}):null;return F.createElement(F.Fragment,null,F.createElement(Se.Z,{disabled:!M,ref:Pt,onResize:ei},F.createElement(ge,{getTriggerDOMNode:lr},Os)),Vi.current&&F.createElement(Je.Provider,{value:pi},F.createElement(De,{portal:Re,ref:Ki,prefixCls:k,popup:dr,className:y()(Xt,Ei),style:Cn,target:Vt,onMouseEnter:hi,onMouseLeave:Mi,onPointerEnter:hi,zIndex:ue,open:M,keepDom:Le,fresh:Qe,onClick:Kt,onPointerDownCapture:qi,mask:Ht,motion:nn,maskMotion:vn,onVisibleChanged:ds,onPrepare:ns,forceRender:on,autoDestroy:ir,getPopupContainer:_n,align:Ir,arrow:Qr,arrowPos:os,ready:ar,offsetX:Kn,offsetY:Rn,offsetR:hr,offsetB:er,onAlign:Ai,stretch:me,targetWidth:ts/Yr,targetHeight:$i/kr})))});return P}var tn=ft(xe.Z)},53281:function(kn,Ft,Y){"use strict";Y.r(Ft),Y.d(Ft,{default:function(){return yt}});var re=Y(59301),Te=Y(56656),He=Y.n(Te),xe=Y(86129),ne=Y.n(xe),y=Y(82093),Se=Y(76560),V=Y(62957),o=Y(6767),le=Y(77019),O=Y(5269),B=Y(99571),E=Y(458),F=Y(91882),L=Y(37285),Ae=Y(54172),Z=Y(71114),J=Y(82326),H=Y(29787),z=Y(27812),oe=Y(95869),be=Y(87169),De=Y(26227),ke=Y(90524),ge=Y(34055),Ue=Y(49661),Je=Y(28284),Be=Y(71051),nt=Y(37568),ie=({defaultValue:xt,onBlur:At,max:gt,className:It="game-score"})=>{const[Ht,un]=(0,re.useState)(xt);(0,re.useEffect)(()=>{un(xt)},[xt]);function Yt(on){un(on)}function _n(){Ht&&(At(Ht>gt?gt:Ht),un(null))}return re.createElement(Be.Z,{max:gt,min:0,className:It,value:Ht,onChange:Yt,onBlur:_n})},Q={greyText:"greyText___lvEE6",info:"info___El01Z",label:"label___GmvST",blackContent:"blackContent___FYo0Z",orangeContent:"orangeContent____uYQ3",inputLabel:"inputLabel___ruiZm",tableTitle:"tableTitle___ir3x7",scoreTable:"scoreTable___b9Z37"},q=Y(46383),se=Y(3493),de=Y(59301),fe=Object.defineProperty,b=Object.defineProperties,S=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,mt=(xt,At,gt)=>At in xt?fe(xt,At,{enumerable:!0,configurable:!0,writable:!0,value:gt}):xt[At]=gt,Gt=(xt,At)=>{for(var gt in At||(At={}))_e.call(At,gt)&&mt(xt,gt,At[gt]);if(W)for(var gt of W(At))qe.call(At,gt)&&mt(xt,gt,At[gt]);return xt},Qt=(xt,At)=>b(xt,S(At)),sn=(xt,At,gt)=>new Promise((It,Ht)=>{var un=on=>{try{_n(gt.next(on))}catch(Un){Ht(Un)}},Yt=on=>{try{_n(gt.throw(on))}catch(Un){Ht(Un)}},_n=on=>on.done?It(on.value):Promise.resolve(on.value).then(un,Yt);_n((gt=gt.apply(xt,At)).next())});const Wt=({shixunHomeworks:xt,dispatch:At,classroomList:gt,gethomeworkreport:It,homeWorkReport:Ht})=>{var un,Yt;const{shixunWorkReport:_n}=xt,on=(0,Se.useParams)(),[Un,Gn]=(0,re.useState)(!1),[dr,Xt]=(0,re.useState)(!1),[Cn,Ge]=(0,re.useState)(""),[Pe]=Je.default.useForm(),Ie=Je.default.useWatch("comment",Pe),ee=Je.default.useWatch("hidden_comment",Pe),[ue,me]=(0,re.useState)(!1),Fe=(0,re.useRef)({}),[Qe,Tt]=V.default.useModal(),Kt=()=>sn(void 0,null,function*(){Xt(!0);const cn=Pe.getFieldsValue();(yield(0,y.ZP)(`/api/student_works/${on.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:cn.hidden_comment,comment:cn.comment}})).status===0&&(o.ZP.success("\u70B9\u8BC4\u6210\u529F"),Pe.resetFields(),At({type:"classroomList/setActionTabs",payload:{}}),It()),Xt(!1)}),Lt=()=>sn(void 0,null,function*(){if(!Cn){o.ZP.warning("\u8BF7\u586B\u5199\u5206\u6570");return}Xt(!0);const cn=Pe.getFieldsValue();(yield(0,y.ZP)(`/api/student_works/${on.homeworkId}/add_score.json`,{method:"post",body:{comment:cn.comment,score:Cn}})).status===0&&(o.ZP.success("\u70B9\u8BC4\u6210\u529F"),At({type:"classroomList/setActionTabs",payload:{}}),It()),Xt(!1)}),yn=cn=>sn(void 0,null,function*(){const{mes:qt,setChatData:fr,setTyping:pr}=cn,Ve=yield(0,y.ZP)("/api/intelligent_reviews/large_model_intelligent_qa.json",{method:"post",body:Gt({query:qt,student_work_id:on.homeworkId},Fe.current)});Ve.answer=(Ve==null?void 0:Ve.status)==-3?Ve.message:Ve==null?void 0:Ve.answer,Ve!=null&&Ve.answer&&fr(lr=>[...lr].map((rr,ir)=>ir===lr.length-1?Qt(Gt({},rr),{text:Ve==null?void 0:Ve.answer,loading:!1,response:Ve}):rr))}),qn=({chatData:cn,setChatData:qt,setLoading:fr,getData:pr,renderChatItems:Ve})=>{At({type:"shixunHomeworks/setActionTabs",payload:{key:"\u667A\u80FD\u8BC4\u9605\u914D\u7F6E",onOk:lr=>{Fe.current=lr,me(!0),fr(!0);const rr=Ve();rr[0].show=!1,qt(rr),pr()}}})},or=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:160,render:cn=>cn||"--"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",width:110},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time",width:160},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"cost_time",width:160},{title:"\u7F3A\u8BC4\u6263\u5206",dataIndex:"absence_penalty",width:90,render:cn=>cn||"--"},{title:"\u5F97\u5206",dataIndex:"score",width:90,render:(cn,qt)=>de.createElement("div",null,de.createElement("span",{style:{color:parseFloat(qt.score_full)!==parseFloat(cn)?"#E30000":"#53C41B"}},cn),"/",qt.score_full)},{title:"\u8C03\u5206",width:100,dataIndex:"action",render:(cn,qt)=>(0,ge.GJ)()?de.createElement(ie,{max:qt.score_full,onBlur:fr=>sn(void 0,null,function*(){var pr;if((0,ge.Rm)()&&!((pr=gt.AssistantObject.practice)!=null&&pr.can_appraise)){o.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const Ve=yield(0,y.ZP)(`/api/student_works/${on.homeworkId}/adjust_score.json`,{method:"post",body:{score:fr}});It(),Ve.status===0&&o.ZP.success("\u8C03\u5206\u6210\u529F")})}):Ht!=null&&Ht.is_anonymous?de.createElement(Be.Z,{min:0,value:Cn,onChange:fr=>Ge(fr),max:qt.score_full}):cn}].filter(cn=>Ht!=null&&Ht.is_anonymous?!["late_penalty","score","absence_penalty"].includes(cn.dataIndex):!0);return de.createElement(de.Fragment,null,de.createElement(V.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",afterClose:()=>{Pe.resetFields(),Ge("")},confirmLoading:dr,open:gt.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>sn(void 0,null,function*(){var cn;if((0,ge.Rm)()&&!((cn=gt.AssistantObject.practice)!=null&&cn.can_appraise)){o.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}if(Ht!=null&&Ht.is_anonymous){Lt();return}const qt=Pe.getFieldsValue();JSON.stringify(qt)==="{}"||qt.hidden_comment===""&&qt.comment===""?Gn(!0):Kt()}),onCancel:()=>{At({type:"classroomList/setActionTabs",payload:{}})}},de.createElement(le.Z,{className:Q.info},de.createElement(O.Z,null,de.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u59D3\u540D"),de.createElement("span",{className:Q.blackContent},Ht==null?void 0:Ht.username)),de.createElement(O.Z,null,de.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u5B66\u53F7"),de.createElement("span",{className:Q.blackContent},(Ht==null?void 0:Ht.student_id)||"--")),!(Ht!=null&&Ht.is_anonymous)&&de.createElement(de.Fragment,null,de.createElement(O.Z,null,de.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u73ED\u7EA7"),de.createElement("span",{className:Q.blackContent},(Ht==null?void 0:Ht.group_name)||"--")),de.createElement(O.Z,null,de.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u8865\u4EA4\u6263\u5206"),de.createElement("span",{className:Q.orangeContent},((un=Ht==null?void 0:Ht.stage_list[0])==null?void 0:un.late_penalty)||"--")),de.createElement(O.Z,null,de.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u7F3A\u8BC4\u6263\u5206"),de.createElement("span",{className:Q.orangeContent},((Yt=Ht==null?void 0:Ht.stage_list[0])==null?void 0:Yt.absence_penalty)||"--")),de.createElement(O.Z,null,de.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u603B\u6210\u7EE9"),de.createElement("span",{className:Q.orangeContent},(Ht==null?void 0:Ht.stage_list[0].score)||"--")))),de.createElement(Je.default,{form:Pe,onChange:()=>{Un&&Gn(!1)}},de.createElement("div",{className:"w-full flex justify-between item-center"},de.createElement("div",{className:`${Q.inputLabel} ${Q.greyText}`,style:{marginBottom:0}},Ht!=null&&Ht.is_anonymous?"\u8BC4\u8BED":"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),de.createElement("div",{className:"mb10"},de.createElement(q.Z,{title:"\u667A\u80FD\u8BC4\u9605",visible:ue,onOpen:qn,onClose:()=>{me(!1)},loadingOption:{text:"AI\u8BC4\u9605\u4E2D..."},hideUpload:!0,showDefaultTips:!1,hideInputBox:!0,customRequest:yn,extraAnswerAction:cn=>{var qt;return!cn.loading&&![-1,-3].includes((qt=cn==null?void 0:cn.response)==null?void 0:qt.status)&&de.createElement("div",{className:Q.apply,onClick:()=>{const fr=()=>{var pr,Ve,lr;Pe.setFieldsValue({comment:(pr=cn==null?void 0:cn.response)==null?void 0:pr.remarks,hidden_comment:(Ve=cn==null?void 0:cn.response)==null?void 0:Ve.remarks}),Ge((lr=cn==null?void 0:cn.response)==null?void 0:lr.score),me(!1)};if(Cn||Ie||ee){Qe.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u5206\u6216\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4E00\u952E\u5E94\u7528\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u5E94\u7528\uFF1F",okText:"\u5E94\u7528",onOk:fr});return}fr()}},de.createElement("i",{style:{color:"#3061D0"},className:"iconfont icon-yijianyingyong1 font12 mr5"}),"\u4E00\u952E\u5E94\u7528")}},de.createElement(B.ZP,{icon:de.createElement("img",{src:Y(11689)}),type:"link"},"\u667A\u80FD\u8BC4\u9605")))),de.createElement(Je.default.Item,{name:"comment"},de.createElement(nt.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),!(Ht!=null&&Ht.is_anonymous)&&de.createElement(de.Fragment,null,de.createElement("div",{className:`${Q.inputLabel} ${Q.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),de.createElement(Je.default.Item,{name:"hidden_comment"},de.createElement(nt.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))," ")),Un&&de.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),de.createElement("div",{className:Q.tableTitle},"\u5173\u5361\u6210\u7EE9"),de.createElement(Ae.default,{className:Q.scoreTable,dataSource:Ht==null?void 0:Ht.stage_list,rowKey:"challenge_id",pagination:!1,columns:or})),de.createElement(se.Z,null))};var kt=(0,Se.connect)(({shixunHomeworks:xt,classroomList:At})=>({shixunHomeworks:xt,classroomList:At}))(Wt),Xe={},dt=(xt,At,gt)=>new Promise((It,Ht)=>{var un=on=>{try{_n(gt.next(on))}catch(Un){Ht(Un)}},Yt=on=>{try{_n(gt.throw(on))}catch(Un){Ht(Un)}},_n=on=>on.done?It(on.value):Promise.resolve(on.value).then(un,Yt);_n((gt=gt.apply(xt,At)).next())});const ot=({shixunHomeworks:xt,dispatch:At,gethomeworkreport:gt,homeWorkReport:It})=>{var Ht,un;const{shixunWorkReport:Yt}=xt;console.log(It,"homeWorkReport");const _n=(0,Se.useParams)(),[on,Un]=(0,re.useState)(!1),[Gn]=Je.default.useForm(),{user_name:dr,score:Xt,comment_time:Cn,content:Ge,score_id:Pe,user_id:Ie}=((un=(Ht=xt==null?void 0:xt.actionTabs)==null?void 0:Ht.selectArrs)==null?void 0:un.data)||{},ee=()=>dt(void 0,null,function*(){yield Gn.validateFields(),Un(!0);const ue=Gn.getFieldsValue();(yield(0,y.ZP)(`/api/student_works/${_n.homeworkId}/appeal_anonymous_score.json`,{method:"post",body:{comment:ue.comment,score_id:Pe,userId:Ie}})).status===0&&(o.ZP.success("\u64CD\u4F5C\u6210\u529F"),At({type:"shixunHomeworks/setActionTabs",payload:{}}),gt()),Un(!1)});return re.createElement(V.default,{centered:!0,width:600,title:"\u533F\u8BC4\u7533\u8BC9",afterClose:()=>{Gn.resetFields()},confirmLoading:on,open:xt.actionTabs.key==="\u533F\u8BC4\u7533\u8BC9",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:ee,onCancel:()=>{At({type:"shixunHomeworks/setActionTabs",payload:{}})}},re.createElement("div",{className:"p20",style:{background:"#F7F8F9",padding:15,marginBottom:20}},re.createElement(le.Z,{justify:"space-between",className:Xe.info},re.createElement("span",null,re.createElement("span",{className:"c-grey-666"},dr),re.createElement("span",{className:"c-grey-333 ml5"},"\u8C03\u5206\u4E3A"),re.createElement("span",{className:"c-orange ml5"},Xt,"\u5206")),re.createElement("span",{className:"c-grey-333"},Cn)),re.createElement("div",{className:"c-grey-333 mt5"},Ge)),re.createElement(Je.default,{form:Gn,className:"mt15",layout:"vertical"},re.createElement(Je.default.Item,{name:"comment",label:"\u7533\u8BC9",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0"}]},re.createElement(nt.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0",rows:3}))))};var ft=(0,Se.connect)(({shixunHomeworks:xt})=>({shixunHomeworks:xt}))(ot),tn=Y(82572),Re={flex_box_center:"flex_box_center___uz0LL",flex_space_between:"flex_space_between___kuKI5",flex_box_vertical_center:"flex_box_vertical_center___VzPH1",flex_box_center_end:"flex_box_center_end___Tyr1U",flex_box_column:"flex_box_column___qsgVa",title:"title___SFyGM",export:"export___ezPhH",title1_right:"title1_right___tMOJn",userPic:"userPic___mW4Rr",userInfo:"userInfo___vYvSZ",listItem:"listItem___gJf4Z",rightInfo:"rightInfo___PRYRt",shixunTitle:"shixunTitle___STlvE",shixunWrp:"shixunWrp___knhTt",footerBar:"footerBar___R5IlQ",footerBarStatic:"footerBarStatic___M4EQj",exitComment:"exitComment___NoCI4",nextComment:"nextComment___sFj7z",modal:"modal___TwQdH",tag:"tag___RErUu"},P=Y(38394),v=Y(45278),T=Y(44164),X=Y.n(T),k=Y(59301),K=Object.defineProperty,ce=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,lt=(xt,At,gt)=>At in xt?K(xt,At,{enumerable:!0,configurable:!0,writable:!0,value:gt}):xt[At]=gt,ht=(xt,At)=>{for(var gt in At||(At={}))Me.call(At,gt)&&lt(xt,gt,At[gt]);if(ce)for(var gt of ce(At))We.call(At,gt)&&lt(xt,gt,At[gt]);return xt},jt=(xt,At)=>{var gt={};for(var It in xt)Me.call(xt,It)&&At.indexOf(It)<0&&(gt[It]=xt[It]);if(xt!=null&&ce)for(var It of ce(xt))At.indexOf(It)<0&&We.call(xt,It)&&(gt[It]=xt[It]);return gt},vt=(xt,At,gt)=>new Promise((It,Ht)=>{var un=on=>{try{_n(gt.next(on))}catch(Un){Ht(Un)}},Yt=on=>{try{_n(gt.throw(on))}catch(Un){Ht(Un)}},_n=on=>on.done?It(on.value):Promise.resolve(on.value).then(un,Yt);_n((gt=gt.apply(xt,At)).next())});const Rt=xt=>{var At=xt,{shixunHomeworks:gt,classroomList:It,globalSetting:Ht,loading:un,user:Yt,dispatch:_n}=At,on=jt(At,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),Un,Gn,dr,Xt,Cn,Ge,Pe;const[Ie,ee]=(0,re.useState)(ht({},(0,Se.useParams)())),ue=(0,Se.useParams)(),me=(0,Se.useLocation)(),[]=(0,re.useState)([]),[Fe,Qe]=(0,re.useState)({last:!1}),[Tt,Kt]=(0,re.useState)({last:!1}),Lt=(0,re.useRef)(),yn=(0,re.useRef)(),[qn,or]=(0,re.useState)(!1),[cn,qt]=(0,re.useState)(!1),[fr,pr]=(0,re.useState)(!1),[Ve,lr]=(0,re.useState)(),[rr,ir]=(0,re.useState)(),[ri,Cr]=(0,re.useState)(!0),[li,Gr]=(0,re.useState)(),Ci=(0,ge.GJ)(),[ii,pi]=(0,re.useState)(new(ne())),[es,br]=(0,re.useState)(0),[Sr,Nr]=(0,re.useState)([]),[xi,qr]=(0,re.useState)(!1),[Ki,Ti]=(0,re.useState)(!1),[Vn,Vt]=(0,re.useState)(""),[ze,ut]=(0,re.useState)(!1),[Pt,St]=(0,re.useState)(!0),[zt,Et]=(0,re.useState)(0),[bt]=(0,Se.useSearchParams)(),nn=()=>vt(void 0,null,function*(){(Yt.userInfo.is_teacher||Yt.userInfo.admin)&&(ut(!0),St(!1))});(0,re.useEffect)(()=>{nn(),console.log("\u6253\u5370\u7684------",Ve),console.log(gt),Vt(Ve==null?void 0:Ve.repeat_minus_score)},[Ve,Yt]),(0,re.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",Ve==null?void 0:Ve.work_score),Et(Ve==null?void 0:Ve.work_score)},[Ve==null?void 0:Ve.work_score,Vn]),(0,re.useEffect)(()=>(_n({type:"globalSetting/footerToggle",payload:!1}),()=>{_n({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,re.useEffect)(()=>{var Le;if(Ve){let st=[];(Le=Ve==null?void 0:Ve.target_test_sets)==null||Le.map((Ot,mn)=>{var pn;(pn=Ot==null?void 0:Ot.targets)==null||pn.map((en,ln)=>{var an;en.name=Ot==null?void 0:Ot.name,en.total_target_score=Ot==null?void 0:Ot.total_target_score,en.actual_target_score=Ot==null?void 0:Ot.actual_target_score,en.rowSpan=ln===0?(an=Ot==null?void 0:Ot.targets)==null?void 0:an.length:0,en.order=mn+1,st.push(en)})}),Gr(st),_n({type:"classroomList/getAssistantPermissions",payload:{course_id:Ie.coursesId}})}},[Ve]),(0,re.useEffect)(()=>{gt.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&Sr.length>0&&Ve!=null&&Ve.course_name&&Dn("all")},[Ve==null?void 0:Ve.course_name]),(0,re.useEffect)(()=>{console.log(ue),ee(ht({},ue))},[me.pathname]);const vn=()=>{document.body.scrollIntoView()};function wn(){return vt(this,null,function*(){var Le,st,Ot,mn;const pn=JSON.parse(localStorage.all_student_works_param||"{}"),en=yield _n({type:"shixunHomeworks/getAllStudentWorks",payload:ht(ht({},Ie),pn)});Nr(en.all_student_works);const ln=(Le=en.all_student_works)==null?void 0:Le.map(an=>String(an.student_work_id)).indexOf(Ie.homeworkId);ln===((st=en.all_student_works)==null?void 0:st.length)-1?Qe({last:!0}):Qe((Ot=en.all_student_works)==null?void 0:Ot[ln+1]),Kt(ln===0?{last:!0}:(mn=en.all_student_works)==null?void 0:mn[ln-1])})}const ur=()=>{document.querySelectorAll("canvas").forEach(Le=>{(!Le.clientWidth||!Le.clientHeight)&&Le.remove()})},Dn=Le=>vt(void 0,null,function*(){let st=0,Ot;Ot=V.default.info({width:460,title:k.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",k.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:k.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",k.createElement("span",{className:"c-blue"},st+1),"/",Le!=="all"?1:Sr==null?void 0:Sr.length,k.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:Re.modal,onOk:()=>{}});const mn={margin:[0,0],filename:`${Ve==null?void 0:Ve.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}};function pn(){return vt(this,null,function*(){vn(),st++,setTimeout(()=>vt(this,null,function*(){var ln;ur();const an=ii.folder(`${(ln=Ve==null?void 0:Ve.stage_list[0])==null?void 0:ln.shixun_name}`),En=document.querySelector("#export-all").children;let Qn=X()();for(let fn=0;fn<En.length;fn++)yield Qn.set(mn).from(En[fn]).toContainer().toCanvas().toPdf().get("pdf").then(dn=>vt(this,null,function*(){fn<En.length-1&&(yield dn.addPage())}));an.file(`${Sr[st-1].student_work_user_name}.pdf`,Qn.output("blob")),Ot.update({content:k.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",k.createElement("span",{className:"c-blue"},st),"/",Sr==null?void 0:Sr.length,k.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),st==(Sr==null?void 0:Sr.length)?(Ot.destroy(),Zn()):en()}),2200)})}function en(){return vt(this,null,function*(){var ln,an,En,Qn,fn;const dn=yield(0,y.ZP)(`/api/student_works/${Sr[st].student_work_id}/jupyter_work_report.json`,{method:"get"});if((dn==null?void 0:dn.status)===0)if(lr(dn.data),(an=(ln=dn==null?void 0:dn.data)==null?void 0:ln.shixun_detail[0])!=null&&an.myshixun_identifier){Cr(!0);const $n=yield(0,y.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(Qn=(En=dn==null?void 0:dn.data)==null?void 0:En.shixun_detail[0])==null?void 0:Qn.myshixun_identifier,student_work_id:(fn=dn==null?void 0:dn.data)==null?void 0:fn.work_id}});$n.status===0&&(ir($n.html_content),Cr(!1),ve(),pn())}else pn()})}if(Le!=="all"||(Sr==null?void 0:Sr.length)<2){ur(),vn();const ln=yn.current.children;let an=X()();const En=ii.folder(`${Ve==null?void 0:Ve.username}`);for(let Qn=0;Qn<ln.length;Qn++)yield an.set(mn).from(ln[Qn]).toContainer().toCanvas().toPdf().get("pdf").then(fn=>vt(void 0,null,function*(){Qn<ln.length-1&&(yield fn.addPage())}));or(!1),En.file(`${Ve==null?void 0:Ve.username}.pdf`,an.output("blob"),{base64:!1}),Ot.destroy(),Zn();return}else en()}),Zn=()=>{ii.generateAsync({type:"blob"}).then(function(Le){const st=document.createElement("a");st.href=window.URL.createObjectURL(Le),st.download=(Ve==null?void 0:Ve.course_name)+".zip",document.body.appendChild(st);const Ot=document.createEvent("MouseEvents");Ot.initEvent("click",!1,!1),st.dispatchEvent(Ot),document.body.removeChild(st),pi(new(ne()))}),pr(!1)};(0,re.useEffect)(()=>{Ke()},[Ie.homeworkId]),(0,re.useEffect)(()=>{Ve!=null&&Ve.work_id&&((0,ge.GJ)()||Ve!=null&&Ve.is_anonymous)&&wn()},[Ve==null?void 0:Ve.work_id]),(0,re.useEffect)(()=>{console.log(Ve)},[Ve]);const M=()=>vt(void 0,null,function*(){const Le=yield(0,y.ZP)(`/api/student_works/${Ie.homeworkId}/jupyter_work_report.json`,{method:"get"});(Le==null?void 0:Le.status)===0&&lr(Le.data)}),N=()=>vt(void 0,null,function*(){var Le,st,Ot,mn,pn;const en=yield(0,y.ZP)(`/api/student_works/${Ie.homeworkId}/jupyter_work_report.json`,{method:"get"});if((en==null?void 0:en.status)===0&&(lr(en.data),(st=(Le=en==null?void 0:en.data)==null?void 0:Le.shixun_detail[0])!=null&&st.myshixun_identifier)){Cr(!0);const ln=yield(0,y.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(mn=(Ot=en==null?void 0:en.data)==null?void 0:Ot.shixun_detail[0])==null?void 0:mn.myshixun_identifier,student_work_id:(pn=en==null?void 0:en.data)==null?void 0:pn.work_id}});if(ln.status===0){ir(ln.html_content),Cr(!1),he(ln.html_content);return}}}),he=Le=>{var st,Ot;(Ot=(st=Le==null?void 0:Le.match)==null?void 0:st.call(Le,/<script [^>]*src=['"]([^'"]+)[^>]*>/gi))==null||Ot.map(mn=>{const pn=document.createElement("script");pn.src=/<script [^>]*src=['"]([^'"]+)[^>]*>/gi.exec(mn)[1],document.body.appendChild(pn)}),ve()},ve=()=>{try{window.MathJax&&(MathJax.Hub.Config({TeX:{equationNumbers:{autoNumber:"AMS",useLabelIds:!0}},tex2jax:{inlineMath:[["$","$"],["\\\\(","\\\\)"]],displayMath:[["$$","$$"],["\\\\[","\\\\]"]],processEscapes:!0,processEnvironments:!0},displayAlign:"center",CommonHTML:{linebreaks:{automatic:!0}},"HTML-CSS":{linebreaks:{automatic:!0}}}),MathJax.Hub.Queue(["Typeset",MathJax.Hub]))}catch(Le){}},Ke=()=>vt(void 0,null,function*(){qt(!0),N(),qt(!1)}),rt=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0,render:(Le,st,Ot)=>Le},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:Ve!=null&&Ve.is_anonymous?220:170,render:Le=>Le||"--"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",width:Ve!=null&&Ve.is_anonymous?140:90},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time",width:Ve!=null&&Ve.is_anonymous?220:170},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"cost_time",width:130},{title:"\u8865\u4EA4\u6263\u5206",dataIndex:"late_penalty",width:90,render:Le=>Le||"--"},{title:"\u7F3A\u8BC4\u6263\u5206",dataIndex:"absence_penalty",width:90,render:Le=>Le||"--"},{title:"\u5F97\u5206",dataIndex:"score",width:100,render:(Le,st)=>k.createElement("div",null,k.createElement("span",{style:{color:parseFloat(st.score_full)!==parseFloat(Le)?"red":"green"}},Le||0),"/",st.score_full)},{title:"\u8C03\u5206",dataIndex:"action",width:110,render:(Le,st)=>Ci?k.createElement(ie,{max:st.score_full,onBlur:Ot=>vt(void 0,null,function*(){var mn;if((0,ge.Rm)()&&!((mn=It.AssistantObject.practice)!=null&&mn.can_appraise)){o.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const pn=yield(0,y.ZP)(`/api/student_works/${Ie.homeworkId}/adjust_score.json`,{method:"post",body:{score:Ot}});M(),pn.status===0&&o.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):Le}].filter(Le=>Ve!=null&&Ve.is_anonymous?!["late_penalty","absence_penalty","score","action"].includes(Le.dataIndex):!0),Bt=Ve==null?void 0:Ve.comment_scores.map(Le=>{var st,Ot,mn;return{children:k.createElement(le.Z,null,k.createElement(O.Z,{span:24},k.createElement(le.Z,null,k.createElement(O.Z,{flex:1},k.createElement("span",{className:"c-light-black mr10"},Le.user_name),k.createElement("span",null,"\u8C03\u5206\u4E3A"),k.createElement("span",{className:"ml10 c-orange"},Le.score?Le.score:0,"\u5206")),k.createElement(O.Z,null,k.createElement("span",{className:"c-light-black ml10"},Le.comment_time)))),k.createElement(O.Z,{span:24,className:"mt8"},k.createElement(le.Z,{className:"mt8"},k.createElement(O.Z,{span:22},Le.content?k.createElement(P.Z,{value:Le.content,style:{fontSize:14}}):k.createElement("span",{className:"c-light-black"},"\u6682\u672A\u5199\u8BC4\u8BED")),k.createElement(O.Z,{className:"tr",span:2},(Le==null?void 0:Le.can_appeal)&&!(Le!=null&&Le.is_invalid)&&k.createElement(B.ZP,{size:"small",type:"primary",onClick:()=>{_n({type:"shixunHomeworks/setActionTabs",payload:{key:"\u533F\u8BC4\u7533\u8BC9",selectArrs:{data:ht({},Le)}}})}},"\u7533\u8BC9")))),!!(Le!=null&&Le.appeal_info)&&k.createElement(O.Z,{span:24,className:"mt8"},k.createElement("div",{className:"p20",style:{background:"#F7F8F9",padding:15}},k.createElement(le.Z,{justify:"space-between"},k.createElement("span",null,k.createElement("span",{className:"c-grey-333"},(st=Le==null?void 0:Le.appeal_info)==null?void 0:st.user_name),k.createElement("span",null,(Le==null?void 0:Le.appeal_status)===1&&k.createElement("span",{className:`tag-style bg-orange ml10 ${Re.tag}`},"\u7533\u8BC9\u4E2D"),(Le==null?void 0:Le.appeal_status)===2&&k.createElement("span",{className:`tag-style bg-grey-ede c-light-black ml10 ${Re.tag}`},"\u7533\u8BC9\u5DF2\u64A4\u9500"),(Le==null?void 0:Le.appeal_status)===3&&k.createElement("span",{className:`tag-style ml10 ${Re.tag}`,style:{background:"#57BE40"}},"\u7533\u8BC9\u6210\u529F"),(Le==null?void 0:Le.appeal_status)===4&&k.createElement("span",{className:`tag-style bg-grey-ede c-light-black ml10 ${Re.tag}`},"\u7533\u8BC9\u88AB\u62D2\u7EDD"),(Le==null?void 0:Le.appeal_status)===5&&k.createElement("span",{className:`tag-style c-light-black ml10 ${Re.tag}`,style:{background:"#E9EAED"}},"\u7533\u8BC9\u5931\u8D25"))),k.createElement("span",{className:"c-light-black"}," ",He()((Ot=Le==null?void 0:Le.appeal_info)==null?void 0:Ot.time).format("YYYY-MM-DD HH:mm:ss"))),k.createElement(le.Z,{justify:"space-between",className:"mt10"},k.createElement(O.Z,{flex:1},(mn=Le.appeal_info)==null?void 0:mn.content),k.createElement(O.Z,{style:{flexShrink:0,marginLeft:"auto"}},(Le==null?void 0:Le.appeal_status)===1&&(0,ge.GJ)()&&k.createElement("span",{onClick:()=>{V.default.confirm({title:"\u63A5\u53D7\u7533\u8BC9",icon:null,content:"\u6B64\u533F\u8BC4\u8BB0\u5F55\u5C06\u4F5C\u5E9F\uFF0C\u533F\u8BC4\u5B66\u751F\u7684\u4F5C\u54C1\u5C06\u88AB\u6263\u51CF\u8FDD\u89C4\u533F\u8BC4\u5206 \u662F\u5426\u786E\u8BA4\u63A5\u53D7\u7533\u8BC9\uFF1F",onOk:()=>vt(void 0,null,function*(){const pn=yield(0,y.ZP)(`/api/student_works/${Ie.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:Le.score_id,status:3}});(pn==null?void 0:pn.status)===0&&M()})})},className:"c-red current"},"\u63A5\u53D7\u7533\u8BC9"),(Le==null?void 0:Le.appeal_status)===1&&(0,ge.GJ)()&&k.createElement("span",{onClick:()=>{V.default.confirm({icon:null,title:"\u63A5\u53D7\u7533\u8BC9",content:"\u6B64\u533F\u8BC4\u8BB0\u5F55\u88AB\u8BA4\u4E3A\u5408\u7406\uFF0C\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\u7533\u8BC9\uFF1F",onOk:()=>vt(void 0,null,function*(){const pn=yield(0,y.ZP)(`/api/student_works/${Ie.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:Le.score_id,status:4}});(pn==null?void 0:pn.status)===0&&M()})})},className:"c-light-black current ml10"},"\u62D2\u7EDD\u7533\u8BC9"))))))}}),Ct=Le=>{ir(null),_n({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{Le==="next"?Se.history.push(`/classrooms/${Ie.coursesId}/common_homework/${Ie.categoryId}/${Fe==null?void 0:Fe.student_work_id}/comment?page=${bt.get("page")}`):Se.history.push(`/classrooms/${Ie.coursesId}/common_homework/${Ie.categoryId}/${Tt==null?void 0:Tt.student_work_id}/comment?page=${bt.get("page")}`)},200)},$t=Le=>{Vt(""),Le.target.value&&(console.log("\u8FDB\u6765",Ve),Le.target.value=Le.target.value>(Ve==null?void 0:Ve.repeat_setting_score)?Ve==null?void 0:Ve.repeat_setting_score:Le.target.value,Vt(Le.target.value))},Ut=()=>vt(void 0,null,function*(){const Le=yield(0,y.ZP)(`/api/student_works/${Ve==null?void 0:Ve.work_id}/update_repeat_score`,{method:"put",body:{score:Vn}});yield _n({type:"shixunHomeworks/gethomeWorkReport",payload:ht({},Ie)}),Le.status===0&&o.ZP.info("\u64CD\u4F5C\u6210\u529F")});return console.log(!!(Ve!=null&&Ve.category),Ve==null?void 0:Ve.course_id,"homeWorkReport"),k.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},k.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},k.createElement(E.Z,{loading:cn,active:!0,avatar:{size:40},paragraph:{rows:5}},k.createElement("div",{className:"edu-container"},(Ve==null?void 0:Ve.course_id)&&k.createElement("section",{className:"animated fadeIn"},k.createElement("aside",{className:""},(Ve==null?void 0:Ve.category)&&k.createElement(F.Z,{separator:">"},k.createElement(F.Z.Item,null,k.createElement(Se.Link,{to:`/classrooms/${Ve==null?void 0:Ve.course_id}/common_homework`},Ve==null?void 0:Ve.course_name)),k.createElement(F.Z.Item,null,k.createElement(Se.Link,{to:`/classrooms/${Ve==null?void 0:Ve.course_id}/common_homework/${Ve!=null&&Ve.category.main?"":Ve==null?void 0:Ve.category.category_id}`},Ve==null?void 0:Ve.category.category_name)),k.createElement(F.Z.Item,null,k.createElement(Se.Link,{to:`/classrooms/${Ve==null?void 0:Ve.course_id}/common_homework/${Ve==null?void 0:Ve.homework_common_id}/detail`},"\u4F5C\u4E1A\u8BE6\u60C5")),k.createElement(F.Z.Item,null,Ve==null?void 0:Ve.username))),k.createElement("aside",{className:[Re.title1,"mt20"].join(" ")},k.createElement(le.Z,{align:"middle"},k.createElement(O.Z,{flex:1},k.createElement(Se.Link,{to:`/classrooms/${Ve==null?void 0:Ve.course_id}/common_homework/${Ve==null?void 0:Ve.homework_common_id}/detail?page=${bt.get("page")}`},k.createElement(z.Z,{className:"font16 c-black"})),k.createElement("strong",{style:{fontWeight:700},className:"font20 ml5"},Ve==null?void 0:Ve.shixun_name),k.createElement(Ue.VV,{status:Ve==null?void 0:Ve.homework_status})),k.createElement(O.Z,{className:Re.title1_right},!(Ve!=null&&Ve.is_anonymous)&&!!(Ve!=null&&Ve.work_status)&&k.createElement(B.ZP,null,k.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),k.createElement(Se.Link,{className:"c-black",target:"_blank",to:`/tasks/${(Gn=(Un=Ve==null?void 0:Ve.shixun_detail)==null?void 0:Un[0])==null?void 0:Gn.myshixun_identifier}/jupyter${(0,ge.GJ)()?"":`?homework_common_id=${ue.categoryId}`}`},(0,ge.GJ)()?"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD":"\u67E5\u770B\u5B9E\u8BAD")),(0,ge.GJ)()&&!((dr=Ve==null?void 0:Ve.homework_status)!=null&&dr.includes("\u5DF2\u622A\u6B62"))&&k.createElement(B.ZP,{className:"ml10",onClick:()=>vt(void 0,null,function*(){yield _n({type:"shixunHomeworks/setActionTabs",payload:{key:"redoShixunModal",homework_common_id:ue.categoryId,student_work_id:ue.homeworkId}})})},k.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),!(Ve!=null&&Ve.is_anonymous)&&k.createElement(B.ZP,{className:"ml10",onClick:()=>{var Le;if((0,ge.Rm)()&&!((Le=It.AssistantObject.normal)!=null&&Le.can_download)){o.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Dn("")},loading:qn},k.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,ge.GJ)()&&(Sr==null?void 0:Sr.length)>1&&k.createElement(B.ZP,{className:"ml10",onClick:()=>{var Le;if((0,ge.Rm)()&&!((Le=It.AssistantObject.normal)!=null&&Le.can_download)){o.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Dn("all")}},k.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),k.createElement("aside",{className:"mt30 relative"})),k.createElement("aside",{className:"edu-container bg-white",ref:Lt},k.createElement("div",{id:"export-all",ref:yn},k.createElement("div",{id:"export-all-1"},k.createElement("div",{className:Re.title},k.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),k.createElement("div",null,!((Xt=Ve==null?void 0:Ve.homework_status)!=null&&Xt.includes("\u5DF2\u622A\u6B62")&&(0,ge.dE)())&&((0,ge.GJ)()||(Ve==null?void 0:Ve.is_anonymous))&&k.createElement(B.ZP,{className:"mr20",type:"primary",onClick:()=>{_n({type:"classroomList/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Ve==null?void 0:Ve.user_id,data:ht({},Ve)}}})}},k.createElement(oe.Z,null),Ve!=null&&Ve.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),k.createElement(L.Z,{style:{marginTop:0}}),k.createElement(le.Z,{className:"pl30 pr30"},k.createElement(O.Z,null,k.createElement("img",{className:Re.userPic,src:`${ke.Z.IMG_SERVER}/images/${Ve==null?void 0:Ve.image_url}`,alt:Ve==null?void 0:Ve.username})),k.createElement(O.Z,{className:"pt20"},k.createElement("span",{className:"font16 ml40"},Ve==null?void 0:Ve.username),k.createElement(Ue.Y,{status:Ve==null?void 0:Ve.work_status}),k.createElement("ul",{className:Re.userInfo},k.createElement("li",null,"\u5B66\u53F7\uFF1A",(Ve==null?void 0:Ve.student_id)||"--"),((0,ge.GJ)()||!(Ve!=null&&Ve.is_anonymous))&&k.createElement("li",null,"\u5206\u73ED\uFF1A",(Ve==null?void 0:Ve.group_name)||"--"),k.createElement("br",null)))),k.createElement("aside",{className:"pl30 pr30 mt30 mb10"},k.createElement(Ae.default,{dataSource:Ve==null?void 0:Ve.stage_list,rowKey:Le=>Le==null?void 0:Le.challenge_id,pagination:!1,columns:rt})),((Ve==null?void 0:Ve.work_comment_hidden)||(Ve==null?void 0:Ve.work_comment))&&k.createElement("div",null,k.createElement(le.Z,{align:"middle"},k.createElement(O.Z,{flex:1},k.createElement("h1",{className:Re.title},"\u70B9\u8BC4\u5185\u5BB9")),k.createElement(O.Z,{className:"pr30"},(0,ge.GJ)()&&k.createElement(B.ZP,{onClick:()=>vt(void 0,null,function*(){V.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:k.createElement(be.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return vt(this,null,function*(){(yield(0,v.gZ)({comment_id:Ve==null?void 0:Ve.comment_id,homeworkId:Ie.homeworkId})).status===0&&(o.ZP.success("\u5220\u9664\u6210\u529F"),M())})}})})},k.createElement(De.Z,null),"\u5220\u9664"))),(Ve==null?void 0:Ve.work_comment)&&k.createElement("aside",{className:"pl30 pr30",style:{marginTop:"-5px"}},k.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),k.createElement("br",null),k.createElement(P.Z,{value:Ve==null?void 0:Ve.work_comment,className:"font14"})),(Ve==null?void 0:Ve.work_comment_hidden)&&k.createElement("aside",{className:"pl30 pr30 mt15"},k.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),k.createElement("br",null),k.createElement(P.Z,{value:Ve==null?void 0:Ve.work_comment_hidden,className:"font14"}))),(Ve==null?void 0:Ve.comment_scores.length)>0&&k.createElement(k.Fragment,null,k.createElement("h1",{className:Re.title},"\u8C03\u5206\u539F\u56E0"),k.createElement("aside",{className:"pl30 pr30",style:{marginTop:"4px"}},k.createElement(Z.Z,{items:Bt}))),((Cn=Ve==null?void 0:Ve.shixun_detail[0])==null?void 0:Cn.myshixun_identifier)&&k.createElement(k.Fragment,null,k.createElement("h1",{className:Re.title,style:{marginTop:"-20px"}},"\u5B9E\u8BAD\u8BE6\u60C5"),k.createElement("aside",{className:"pl30 pr30"},k.createElement("div",{className:Re.shixunWrp},k.createElement("h2",null,k.createElement("span",null,"\u8BC4\u6D4B\u4EE3\u7801",k.createElement("span",{className:"ml5 font12 c-grey-999"},"\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u540E\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\u8BE6\u60C5")),k.createElement("span",null,k.createElement(J.default,{style:{width:200},value:(Ge=Ve==null?void 0:Ve.shixun_detail[0])==null?void 0:Ge.path}," ",Ve==null?void 0:Ve.shixun_detail.map(Le=>k.createElement(Option,{value:Le.path},Le.path))," "))),k.createElement(H.Z,{spinning:ri},k.createElement("div",{style:{width:"100%",minHeight:"550px",padding:"16px"},dangerouslySetInnerHTML:{__html:rr}})))))))),((0,ge.GJ)()||(Ve==null?void 0:Ve.is_anonymous))&&k.createElement("aside",{className:`${Re.footerBar} ${qn?Re.footerBarStatic:""}`},k.createElement("aside",{className:"edu-container"},k.createElement(le.Z,{align:"middle"},k.createElement(O.Z,{flex:"1"},k.createElement(Se.Link,{className:Re.exitComment,to:`/classrooms/${Ie.coursesId}/common_homework/${Ie.categoryId}/detail?page=${bt.get("page")}`},"\u8FD4\u56DE\u5217\u8868")),k.createElement(O.Z,{flex:"1",className:"tr"},k.createElement(B.ZP,{type:"default",disabled:Tt==null?void 0:Tt.last,onClick:()=>Ct()},"\u4E0A\u4E00\u4E2A"),k.createElement(B.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:Fe==null?void 0:Fe.last,onClick:()=>Ct("next")},"\u4E0B\u4E00\u4E2A"),!((Pe=Ve==null?void 0:Ve.homework_status)!=null&&Pe.includes("\u5DF2\u622A\u6B62")&&(0,ge.dE)())&&((0,ge.GJ)()||(Ve==null?void 0:Ve.is_anonymous))&&k.createElement(B.ZP,{type:"primary",onClick:()=>vt(void 0,null,function*(){_n({type:"classroomList/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Ve==null?void 0:Ve.user_id,data:ht({},Ve)}}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),k.createElement(ft,{gethomeworkreport:M,homeWorkReport:Ve}),k.createElement(kt,{gethomeworkreport:M,homeWorkReport:Ve}),k.createElement(tn.Z,{getData:M}),k.createElement(V.default,{open:xi,width:860,centered:!0,onCancel:()=>{qr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},k.createElement("div",{style:{color:"#333333",fontWeight:400}},k.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),k.createElement("br",null),k.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),k.createElement("br",null),k.createElement("span",null," \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),k.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),k.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),k.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},k.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),k.createElement("br",null),k.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "),k.createElement("br",null),k.createElement("span",null," \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),k.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),k.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),k.createElement("br",null),k.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),k.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},k.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),k.createElement("br",null),k.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),k.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},k.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),k.createElement("br",null),k.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),k.createElement(V.default,{open:Ki,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{Ti(!1)},width:600},k.createElement("div",{style:{fontWeight:400,color:"#333333"}},k.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",k.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),k.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",k.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),k.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",k.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))};var yt=(0,Se.connect)(({shixunHomeworks:xt,classroomList:At,loading:gt,globalSetting:It,user:Ht})=>({shixunHomeworks:xt,classroomList:At,globalSetting:It,loading:gt.effects,user:Ht}))(Rt)},82572:function(kn,Ft,Y){"use strict";var re=Y(62957),Te=Y(6767),He=Y(82093),xe=Y(76560),ne=Y(34055),y=Y(59301),Se=(o,le,O)=>new Promise((B,E)=>{var F=Z=>{try{Ae(O.next(Z))}catch(J){E(J)}},L=Z=>{try{Ae(O.throw(Z))}catch(J){E(J)}},Ae=Z=>Z.done?B(Z.value):Promise.resolve(Z.value).then(F,L);Ae((O=O.apply(o,le)).next())});const V=({shixunHomeworks:o,dispatch:le,classroomList:O,getData:B})=>y.createElement(re.default,{centered:!0,title:"\u63D0\u793A",open:o.actionTabs.key==="redoShixunModal",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Se(void 0,null,function*(){var E;if((0,ne.Rm)()&&!((E=O.AssistantObject.normal)!=null&&E.can_redo)){Te.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}(yield(0,He.ZP)(`/api/homework_commons/${o.actionTabs.homework_common_id}/batch_redo_modal.json`,{method:"post",body:{student_work_id:o.actionTabs.student_work_id}})).status===0&&(Te.ZP.success("\u64CD\u4F5C\u6210\u529F"),le({type:"shixunHomeworks/setActionTabs",payload:{}}),B())}),onCancel:()=>{le({type:"shixunHomeworks/setActionTabs",payload:{}})}},y.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C",o.actionTabs.isshixun?"\u5B66\u751F\u5B9E\u8BAD":"\u5B66\u751F\u4F5C\u54C1\u63D0\u4EA4","\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),y.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"));Ft.Z=(0,xe.connect)(({shixunHomeworks:o,classroomList:le})=>({shixunHomeworks:o,classroomList:le}))(V)},71114:function(kn,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return Je}});var re=Y(59301),Te=Y(92310),He=Y.n(Te),xe=Y(48755),ne=Y(83397),y=Y(36237),Se=Y(63356),V=Y(16931),o=Y(51636);const le=Be=>{const{componentCls:nt,calc:ie}=Be;return{[nt]:Object.assign(Object.assign({},(0,Se.Wf)(Be)),{margin:0,padding:0,listStyle:"none",[`${nt}-item`]:{position:"relative",margin:0,paddingBottom:Be.itemPaddingBottom,fontSize:Be.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:Be.itemHeadSize,insetInlineStart:ie(ie(Be.itemHeadSize).sub(Be.tailWidth)).div(2).equal(),height:`calc(100% - ${(0,y.unit)(Be.itemHeadSize)})`,borderInlineStart:`${(0,y.unit)(Be.tailWidth)} ${Be.lineType} ${Be.tailColor}`},"&-pending":{[`${nt}-item-head`]:{fontSize:Be.fontSizeSM,backgroundColor:"transparent"},[`${nt}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:Be.itemHeadSize,height:Be.itemHeadSize,backgroundColor:Be.dotBg,border:`${(0,y.unit)(Be.dotBorderWidth)} ${Be.lineType} transparent`,borderRadius:"50%","&-blue":{color:Be.colorPrimary,borderColor:Be.colorPrimary},"&-red":{color:Be.colorError,borderColor:Be.colorError},"&-green":{color:Be.colorSuccess,borderColor:Be.colorSuccess},"&-gray":{color:Be.colorTextDisabled,borderColor:Be.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:ie(Be.itemHeadSize).div(2).equal(),insetInlineStart:ie(Be.itemHeadSize).div(2).equal(),width:"auto",height:"auto",marginBlockStart:0,paddingBlock:Be.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:ie(ie(Be.fontSize).mul(Be.lineHeight).sub(Be.fontSize)).mul(-1).add(Be.lineWidth).equal(),marginInlineStart:ie(Be.margin).add(Be.itemHeadSize).equal(),marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${nt}-item-tail`]:{display:"none"},[`> ${nt}-item-content`]:{minHeight:ie(Be.controlHeightLG).mul(1.2).equal()}}},[`&${nt}-alternate,
&${nt}-right,
&${nt}-label`]:{[`${nt}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:ie(Be.marginXXS).mul(-1).equal(),"&-custom":{marginInlineStart:ie(Be.tailWidth).div(2).equal()}},"&-left":{[`${nt}-item-content`]:{insetInlineStart:`calc(50% - ${(0,y.unit)(Be.marginXXS)})`,width:`calc(50% - ${(0,y.unit)(Be.marginSM)})`,textAlign:"start"}},"&-right":{[`${nt}-item-content`]:{width:`calc(50% - ${(0,y.unit)(Be.marginSM)})`,margin:0,textAlign:"end"}}}},[`&${nt}-right`]:{[`${nt}-item-right`]:{[`${nt}-item-tail,
${nt}-item-head,
${nt}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(0,y.unit)(ie(ie(Be.itemHeadSize).add(Be.tailWidth)).div(2).equal())})`},[`${nt}-item-content`]:{width:`calc(100% - ${(0,y.unit)(ie(Be.itemHeadSize).add(Be.marginXS).equal())})`}}},[`&${nt}-pending
${nt}-item-last
${nt}-item-tail`]:{display:"block",height:`calc(100% - ${(0,y.unit)(Be.margin)})`,borderInlineStart:`${(0,y.unit)(Be.tailWidth)} dotted ${Be.tailColor}`},[`&${nt}-reverse
${nt}-item-last
${nt}-item-tail`]:{display:"none"},[`&${nt}-reverse ${nt}-item-pending`]:{[`${nt}-item-tail`]:{insetBlockStart:Be.margin,display:"block",height:`calc(100% - ${(0,y.unit)(Be.margin)})`,borderInlineStart:`${(0,y.unit)(Be.tailWidth)} dotted ${Be.tailColor}`},[`${nt}-item-content`]:{minHeight:ie(Be.controlHeightLG).mul(1.2).equal()}},[`&${nt}-label`]:{[`${nt}-item-label`]:{position:"absolute",insetBlockStart:ie(ie(Be.fontSize).mul(Be.lineHeight).sub(Be.fontSize)).mul(-1).add(Be.tailWidth).equal(),width:`calc(50% - ${(0,y.unit)(Be.marginSM)})`,textAlign:"end"},[`${nt}-item-right`]:{[`${nt}-item-label`]:{insetInlineStart:`calc(50% + ${(0,y.unit)(Be.marginSM)})`,width:`calc(50% - ${(0,y.unit)(Be.marginSM)})`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${nt}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},O=Be=>({tailColor:Be.colorSplit,tailWidth:Be.lineWidthBold,dotBorderWidth:Be.wireframe?Be.lineWidthBold:Be.lineWidth*3,dotBg:Be.colorBgContainer,itemPaddingBottom:Be.padding*1.25});var B=(0,V.I$)("Timeline",Be=>{const nt=(0,o.mergeToken)(Be,{itemHeadSize:10,customHeadPaddingVertical:Be.paddingXXS,paddingInlineEnd:2});return[le(nt)]},O),E=function(Be,nt){var ie={};for(var Q in Be)Object.prototype.hasOwnProperty.call(Be,Q)&&nt.indexOf(Q)<0&&(ie[Q]=Be[Q]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,Q=Object.getOwnPropertySymbols(Be);q<Q.length;q++)nt.indexOf(Q[q])<0&&Object.prototype.propertyIsEnumerable.call(Be,Q[q])&&(ie[Q[q]]=Be[Q[q]]);return ie},L=Be=>{var{prefixCls:nt,className:ie,color:Q="blue",dot:q,pending:se=!1,position:de,label:fe,children:b}=Be,S=E(Be,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:W}=re.useContext(xe.E_),_e=W("timeline",nt),qe=He()(`${_e}-item`,{[`${_e}-item-pending`]:se},ie),mt=/blue|red|green|gray/.test(Q||"")?void 0:Q,Gt=He()(`${_e}-item-head`,{[`${_e}-item-head-custom`]:!!q,[`${_e}-item-head-${Q}`]:!mt});return re.createElement("li",Object.assign({},S,{className:qe}),fe&&re.createElement("div",{className:`${_e}-item-label`},fe),re.createElement("div",{className:`${_e}-item-tail`}),re.createElement("div",{className:Gt,style:{borderColor:mt,color:mt}},q),re.createElement("div",{className:`${_e}-item-content`},b))},Ae=Y(94480),Z=Y(58617),J=function(Be,nt){var ie={};for(var Q in Be)Object.prototype.hasOwnProperty.call(Be,Q)&&nt.indexOf(Q)<0&&(ie[Q]=Be[Q]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,Q=Object.getOwnPropertySymbols(Be);q<Q.length;q++)nt.indexOf(Q[q])<0&&Object.prototype.propertyIsEnumerable.call(Be,Q[q])&&(ie[Q[q]]=Be[Q[q]]);return ie},z=Be=>{var{prefixCls:nt,className:ie,pending:Q=!1,children:q,items:se,rootClassName:de,reverse:fe=!1,direction:b,hashId:S,pendingDot:W,mode:_e=""}=Be,qe=J(Be,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const mt=(ot,ft)=>_e==="alternate"?ot==="right"?`${nt}-item-right`:ot==="left"?`${nt}-item-left`:ft%2===0?`${nt}-item-left`:`${nt}-item-right`:_e==="left"?`${nt}-item-left`:_e==="right"?`${nt}-item-right`:ot==="right"?`${nt}-item-right`:"",Gt=(0,Ae.Z)(se||[]),Qt=typeof Q=="boolean"?null:Q;Q&&Gt.push({pending:!!Q,dot:W||re.createElement(Z.Z,null),children:Qt}),fe&&Gt.reverse();const sn=Gt.length,Wt=`${nt}-item-last`,kt=Gt.filter(ot=>!!ot).map((ot,ft)=>{var tn;const Re=ft===sn-2?Wt:"",P=ft===sn-1?Wt:"",{className:v}=ot,T=J(ot,["className"]);return re.createElement(L,Object.assign({},T,{className:He()([v,!fe&&Q?Re:P,mt((tn=ot==null?void 0:ot.position)!==null&&tn!==void 0?tn:"",ft)]),key:(ot==null?void 0:ot.key)||ft}))}),Xe=Gt.some(ot=>!!(ot!=null&&ot.label)),dt=He()(nt,{[`${nt}-pending`]:!!Q,[`${nt}-reverse`]:!!fe,[`${nt}-${_e}`]:!!_e&&!Xe,[`${nt}-label`]:Xe,[`${nt}-rtl`]:b==="rtl"},ie,de,S);return re.createElement("ul",Object.assign({},qe,{className:dt}),kt)},oe=Y(11592);function be(Be,nt){return Be&&Array.isArray(Be)?Be:(0,oe.Z)(nt).map(ie=>{var Q,q;return Object.assign({children:(q=(Q=ie==null?void 0:ie.props)===null||Q===void 0?void 0:Q.children)!==null&&q!==void 0?q:""},ie.props)})}var De=be,ke=function(Be,nt){var ie={};for(var Q in Be)Object.prototype.hasOwnProperty.call(Be,Q)&&nt.indexOf(Q)<0&&(ie[Q]=Be[Q]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,Q=Object.getOwnPropertySymbols(Be);q<Q.length;q++)nt.indexOf(Q[q])<0&&Object.prototype.propertyIsEnumerable.call(Be,Q[q])&&(ie[Q[q]]=Be[Q[q]]);return ie};const ge=Be=>{const{getPrefixCls:nt,direction:ie,timeline:Q}=re.useContext(xe.E_),{prefixCls:q,children:se,items:de,className:fe,style:b}=Be,S=ke(Be,["prefixCls","children","items","className","style"]),W=nt("timeline",q),_e=(0,ne.Z)(W),[qe,mt,Gt]=B(W,_e),Qt=De(de,se);return qe(re.createElement(z,Object.assign({},S,{className:He()(Q==null?void 0:Q.className,fe,Gt,_e),style:Object.assign(Object.assign({},Q==null?void 0:Q.style),b),prefixCls:W,direction:ie,items:Qt,hashId:mt})))};ge.Item=L;var Ue=ge,Je=Ue},86251:function(kn,Ft){"use strict";Ft.byteLength=Se,Ft.toByteArray=o,Ft.fromByteArray=B;for(var Y=[],re=[],Te=typeof Uint8Array!="undefined"?Uint8Array:Array,He="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xe=0,ne=He.length;xe<ne;++xe)Y[xe]=He[xe],re[He.charCodeAt(xe)]=xe;re[45]=62,re[95]=63;function y(E){var F=E.length;if(F%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var L=E.indexOf("=");L===-1&&(L=F);var Ae=L===F?0:4-L%4;return[L,Ae]}function Se(E){var F=y(E),L=F[0],Ae=F[1];return(L+Ae)*3/4-Ae}function V(E,F,L){return(F+L)*3/4-L}function o(E){var F,L=y(E),Ae=L[0],Z=L[1],J=new Te(V(E,Ae,Z)),H=0,z=Z>0?Ae-4:Ae,oe;for(oe=0;oe<z;oe+=4)F=re[E.charCodeAt(oe)]<<18|re[E.charCodeAt(oe+1)]<<12|re[E.charCodeAt(oe+2)]<<6|re[E.charCodeAt(oe+3)],J[H++]=F>>16&255,J[H++]=F>>8&255,J[H++]=F&255;return Z===2&&(F=re[E.charCodeAt(oe)]<<2|re[E.charCodeAt(oe+1)]>>4,J[H++]=F&255),Z===1&&(F=re[E.charCodeAt(oe)]<<10|re[E.charCodeAt(oe+1)]<<4|re[E.charCodeAt(oe+2)]>>2,J[H++]=F>>8&255,J[H++]=F&255),J}function le(E){return Y[E>>18&63]+Y[E>>12&63]+Y[E>>6&63]+Y[E&63]}function O(E,F,L){for(var Ae,Z=[],J=F;J<L;J+=3)Ae=(E[J]<<16&16711680)+(E[J+1]<<8&65280)+(E[J+2]&255),Z.push(le(Ae));return Z.join("")}function B(E){for(var F,L=E.length,Ae=L%3,Z=[],J=16383,H=0,z=L-Ae;H<z;H+=J)Z.push(O(E,H,H+J>z?z:H+J));return Ae===1?(F=E[L-1],Z.push(Y[F>>2]+Y[F<<4&63]+"==")):Ae===2&&(F=(E[L-2]<<8)+E[L-1],Z.push(Y[F>>10]+Y[F>>4&63]+Y[F<<2&63]+"=")),Z.join("")}},19208:function(kn,Ft,Y){"use strict";var re;var Te=Y(86251),He=Y(67467),xe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ft.lW=V,re=H,Ft.h2=50;var ne=2147483647;re=ne,V.TYPED_ARRAY_SUPPORT=y(),!V.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function y(){try{var P=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(P,v),P.foo()===42}catch(T){return!1}}Object.defineProperty(V.prototype,"parent",{enumerable:!0,get:function(){if(V.isBuffer(this))return this.buffer}}),Object.defineProperty(V.prototype,"offset",{enumerable:!0,get:function(){if(V.isBuffer(this))return this.byteOffset}});function Se(P){if(P>ne)throw new RangeError('The value "'+P+'" is invalid for option "size"');var v=new Uint8Array(P);return Object.setPrototypeOf(v,V.prototype),v}function V(P,v,T){if(typeof P=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(P)}return o(P,v,T)}V.poolSize=8192;function o(P,v,T){if(typeof P=="string")return E(P,v);if(ArrayBuffer.isView(P))return L(P);if(P==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P);if(ft(P,ArrayBuffer)||P&&ft(P.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ft(P,SharedArrayBuffer)||P&&ft(P.buffer,SharedArrayBuffer)))return Ae(P,v,T);if(typeof P=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var X=P.valueOf&&P.valueOf();if(X!=null&&X!==P)return V.from(X,v,T);var k=Z(P);if(k)return k;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof P[Symbol.toPrimitive]=="function")return V.from(P[Symbol.toPrimitive]("string"),v,T);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P)}V.from=function(P,v,T){return o(P,v,T)},Object.setPrototypeOf(V.prototype,Uint8Array.prototype),Object.setPrototypeOf(V,Uint8Array);function le(P){if(typeof P!="number")throw new TypeError('"size" argument must be of type number');if(P<0)throw new RangeError('The value "'+P+'" is invalid for option "size"')}function O(P,v,T){return le(P),P<=0?Se(P):v!==void 0?typeof T=="string"?Se(P).fill(v,T):Se(P).fill(v):Se(P)}V.alloc=function(P,v,T){return O(P,v,T)};function B(P){return le(P),Se(P<0?0:J(P)|0)}V.allocUnsafe=function(P){return B(P)},V.allocUnsafeSlow=function(P){return B(P)};function E(P,v){if((typeof v!="string"||v==="")&&(v="utf8"),!V.isEncoding(v))throw new TypeError("Unknown encoding: "+v);var T=z(P,v)|0,X=Se(T),k=X.write(P,v);return k!==T&&(X=X.slice(0,k)),X}function F(P){for(var v=P.length<0?0:J(P.length)|0,T=Se(v),X=0;X<v;X+=1)T[X]=P[X]&255;return T}function L(P){if(ft(P,Uint8Array)){var v=new Uint8Array(P);return Ae(v.buffer,v.byteOffset,v.byteLength)}return F(P)}function Ae(P,v,T){if(v<0||P.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(P.byteLength<v+(T||0))throw new RangeError('"length" is outside of buffer bounds');var X;return v===void 0&&T===void 0?X=new Uint8Array(P):T===void 0?X=new Uint8Array(P,v):X=new Uint8Array(P,v,T),Object.setPrototypeOf(X,V.prototype),X}function Z(P){if(V.isBuffer(P)){var v=J(P.length)|0,T=Se(v);return T.length===0||P.copy(T,0,0,v),T}if(P.length!==void 0)return typeof P.length!="number"||tn(P.length)?Se(0):F(P);if(P.type==="Buffer"&&Array.isArray(P.data))return F(P.data)}function J(P){if(P>=ne)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ne.toString(16)+" bytes");return P|0}function H(P){return+P!=P&&(P=0),V.alloc(+P)}V.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==V.prototype},V.compare=function(v,T){if(ft(v,Uint8Array)&&(v=V.from(v,v.offset,v.byteLength)),ft(T,Uint8Array)&&(T=V.from(T,T.offset,T.byteLength)),!V.isBuffer(v)||!V.isBuffer(T))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===T)return 0;for(var X=v.length,k=T.length,K=0,ce=Math.min(X,k);K<ce;++K)if(v[K]!==T[K]){X=v[K],k=T[K];break}return X<k?-1:k<X?1:0},V.isEncoding=function(v){switch(String(v).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},V.concat=function(v,T){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return V.alloc(0);var X;if(T===void 0)for(T=0,X=0;X<v.length;++X)T+=v[X].length;var k=V.allocUnsafe(T),K=0;for(X=0;X<v.length;++X){var ce=v[X];if(ft(ce,Uint8Array))K+ce.length>k.length?V.from(ce).copy(k,K):Uint8Array.prototype.set.call(k,ce,K);else if(V.isBuffer(ce))ce.copy(k,K);else throw new TypeError('"list" argument must be an Array of Buffers');K+=ce.length}return k};function z(P,v){if(V.isBuffer(P))return P.length;if(ArrayBuffer.isView(P)||ft(P,ArrayBuffer))return P.byteLength;if(typeof P!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof P);var T=P.length,X=arguments.length>2&&arguments[2]===!0;if(!X&&T===0)return 0;for(var k=!1;;)switch(v){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":return Wt(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return dt(P).length;default:if(k)return X?-1:Wt(P).length;v=(""+v).toLowerCase(),k=!0}}V.byteLength=z;function oe(P,v,T){var X=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((T===void 0||T>this.length)&&(T=this.length),T<=0)||(T>>>=0,v>>>=0,T<=v))return"";for(P||(P="utf8");;)switch(P){case"hex":return b(this,v,T);case"utf8":case"utf-8":return Q(this,v,T);case"ascii":return de(this,v,T);case"latin1":case"binary":return fe(this,v,T);case"base64":return ie(this,v,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,v,T);default:if(X)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),X=!0}}V.prototype._isBuffer=!0;function be(P,v,T){var X=P[v];P[v]=P[T],P[T]=X}V.prototype.swap16=function(){var v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var T=0;T<v;T+=2)be(this,T,T+1);return this},V.prototype.swap32=function(){var v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var T=0;T<v;T+=4)be(this,T,T+3),be(this,T+1,T+2);return this},V.prototype.swap64=function(){var v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var T=0;T<v;T+=8)be(this,T,T+7),be(this,T+1,T+6),be(this,T+2,T+5),be(this,T+3,T+4);return this},V.prototype.toString=function(){var v=this.length;return v===0?"":arguments.length===0?Q(this,0,v):oe.apply(this,arguments)},V.prototype.toLocaleString=V.prototype.toString,V.prototype.equals=function(v){if(!V.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:V.compare(this,v)===0},V.prototype.inspect=function(){var v="",T=Ft.h2;return v=this.toString("hex",0,T).replace(/(.{2})/g,"$1 ").trim(),this.length>T&&(v+=" ... "),"<Buffer "+v+">"},xe&&(V.prototype[xe]=V.prototype.inspect),V.prototype.compare=function(v,T,X,k,K){if(ft(v,Uint8Array)&&(v=V.from(v,v.offset,v.byteLength)),!V.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(T===void 0&&(T=0),X===void 0&&(X=v?v.length:0),k===void 0&&(k=0),K===void 0&&(K=this.length),T<0||X>v.length||k<0||K>this.length)throw new RangeError("out of range index");if(k>=K&&T>=X)return 0;if(k>=K)return-1;if(T>=X)return 1;if(T>>>=0,X>>>=0,k>>>=0,K>>>=0,this===v)return 0;for(var ce=K-k,Me=X-T,We=Math.min(ce,Me),lt=this.slice(k,K),ht=v.slice(T,X),jt=0;jt<We;++jt)if(lt[jt]!==ht[jt]){ce=lt[jt],Me=ht[jt];break}return ce<Me?-1:Me<ce?1:0};function De(P,v,T,X,k){if(P.length===0)return-1;if(typeof T=="string"?(X=T,T=0):T>2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,tn(T)&&(T=k?0:P.length-1),T<0&&(T=P.length+T),T>=P.length){if(k)return-1;T=P.length-1}else if(T<0)if(k)T=0;else return-1;if(typeof v=="string"&&(v=V.from(v,X)),V.isBuffer(v))return v.length===0?-1:ke(P,v,T,X,k);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(P,v,T):Uint8Array.prototype.lastIndexOf.call(P,v,T):ke(P,[v],T,X,k);throw new TypeError("val must be string, number or Buffer")}function ke(P,v,T,X,k){var K=1,ce=P.length,Me=v.length;if(X!==void 0&&(X=String(X).toLowerCase(),X==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(P.length<2||v.length<2)return-1;K=2,ce/=2,Me/=2,T/=2}function We(Rt,yt){return K===1?Rt[yt]:Rt.readUInt16BE(yt*K)}var lt;if(k){var ht=-1;for(lt=T;lt<ce;lt++)if(We(P,lt)===We(v,ht===-1?0:lt-ht)){if(ht===-1&&(ht=lt),lt-ht+1===Me)return ht*K}else ht!==-1&&(lt-=lt-ht),ht=-1}else for(T+Me>ce&&(T=ce-Me),lt=T;lt>=0;lt--){for(var jt=!0,vt=0;vt<Me;vt++)if(We(P,lt+vt)!==We(v,vt)){jt=!1;break}if(jt)return lt}return-1}V.prototype.includes=function(v,T,X){return this.indexOf(v,T,X)!==-1},V.prototype.indexOf=function(v,T,X){return De(this,v,T,X,!0)},V.prototype.lastIndexOf=function(v,T,X){return De(this,v,T,X,!1)};function ge(P,v,T,X){T=Number(T)||0;var k=P.length-T;X?(X=Number(X),X>k&&(X=k)):X=k;var K=v.length;X>K/2&&(X=K/2);for(var ce=0;ce<X;++ce){var Me=parseInt(v.substr(ce*2,2),16);if(tn(Me))return ce;P[T+ce]=Me}return ce}function Ue(P,v,T,X){return ot(Wt(v,P.length-T),P,T,X)}function Je(P,v,T,X){return ot(kt(v),P,T,X)}function Be(P,v,T,X){return ot(dt(v),P,T,X)}function nt(P,v,T,X){return ot(Xe(v,P.length-T),P,T,X)}V.prototype.write=function(v,T,X,k){if(T===void 0)k="utf8",X=this.length,T=0;else if(X===void 0&&typeof T=="string")k=T,X=this.length,T=0;else if(isFinite(T))T=T>>>0,isFinite(X)?(X=X>>>0,k===void 0&&(k="utf8")):(k=X,X=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var K=this.length-T;if((X===void 0||X>K)&&(X=K),v.length>0&&(X<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");for(var ce=!1;;)switch(k){case"hex":return ge(this,v,T,X);case"utf8":case"utf-8":return Ue(this,v,T,X);case"ascii":case"latin1":case"binary":return Je(this,v,T,X);case"base64":return Be(this,v,T,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nt(this,v,T,X);default:if(ce)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),ce=!0}},V.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(P,v,T){return v===0&&T===P.length?Te.fromByteArray(P):Te.fromByteArray(P.slice(v,T))}function Q(P,v,T){T=Math.min(P.length,T);for(var X=[],k=v;k<T;){var K=P[k],ce=null,Me=K>239?4:K>223?3:K>191?2:1;if(k+Me<=T){var We,lt,ht,jt;switch(Me){case 1:K<128&&(ce=K);break;case 2:We=P[k+1],(We&192)===128&&(jt=(K&31)<<6|We&63,jt>127&&(ce=jt));break;case 3:We=P[k+1],lt=P[k+2],(We&192)===128&&(lt&192)===128&&(jt=(K&15)<<12|(We&63)<<6|lt&63,jt>2047&&(jt<55296||jt>57343)&&(ce=jt));break;case 4:We=P[k+1],lt=P[k+2],ht=P[k+3],(We&192)===128&&(lt&192)===128&&(ht&192)===128&&(jt=(K&15)<<18|(We&63)<<12|(lt&63)<<6|ht&63,jt>65535&&jt<1114112&&(ce=jt))}}ce===null?(ce=65533,Me=1):ce>65535&&(ce-=65536,X.push(ce>>>10&1023|55296),ce=56320|ce&1023),X.push(ce),k+=Me}return se(X)}var q=4096;function se(P){var v=P.length;if(v<=q)return String.fromCharCode.apply(String,P);for(var T="",X=0;X<v;)T+=String.fromCharCode.apply(String,P.slice(X,X+=q));return T}function de(P,v,T){var X="";T=Math.min(P.length,T);for(var k=v;k<T;++k)X+=String.fromCharCode(P[k]&127);return X}function fe(P,v,T){var X="";T=Math.min(P.length,T);for(var k=v;k<T;++k)X+=String.fromCharCode(P[k]);return X}function b(P,v,T){var X=P.length;(!v||v<0)&&(v=0),(!T||T<0||T>X)&&(T=X);for(var k="",K=v;K<T;++K)k+=Re[P[K]];return k}function S(P,v,T){for(var X=P.slice(v,T),k="",K=0;K<X.length-1;K+=2)k+=String.fromCharCode(X[K]+X[K+1]*256);return k}V.prototype.slice=function(v,T){var X=this.length;v=~~v,T=T===void 0?X:~~T,v<0?(v+=X,v<0&&(v=0)):v>X&&(v=X),T<0?(T+=X,T<0&&(T=0)):T>X&&(T=X),T<v&&(T=v);var k=this.subarray(v,T);return Object.setPrototypeOf(k,V.prototype),k};function W(P,v,T){if(P%1!==0||P<0)throw new RangeError("offset is not uint");if(P+v>T)throw new RangeError("Trying to access beyond buffer length")}V.prototype.readUintLE=V.prototype.readUIntLE=function(v,T,X){v=v>>>0,T=T>>>0,X||W(v,T,this.length);for(var k=this[v],K=1,ce=0;++ce<T&&(K*=256);)k+=this[v+ce]*K;return k},V.prototype.readUintBE=V.prototype.readUIntBE=function(v,T,X){v=v>>>0,T=T>>>0,X||W(v,T,this.length);for(var k=this[v+--T],K=1;T>0&&(K*=256);)k+=this[v+--T]*K;return k},V.prototype.readUint8=V.prototype.readUInt8=function(v,T){return v=v>>>0,T||W(v,1,this.length),this[v]},V.prototype.readUint16LE=V.prototype.readUInt16LE=function(v,T){return v=v>>>0,T||W(v,2,this.length),this[v]|this[v+1]<<8},V.prototype.readUint16BE=V.prototype.readUInt16BE=function(v,T){return v=v>>>0,T||W(v,2,this.length),this[v]<<8|this[v+1]},V.prototype.readUint32LE=V.prototype.readUInt32LE=function(v,T){return v=v>>>0,T||W(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},V.prototype.readUint32BE=V.prototype.readUInt32BE=function(v,T){return v=v>>>0,T||W(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},V.prototype.readIntLE=function(v,T,X){v=v>>>0,T=T>>>0,X||W(v,T,this.length);for(var k=this[v],K=1,ce=0;++ce<T&&(K*=256);)k+=this[v+ce]*K;return K*=128,k>=K&&(k-=Math.pow(2,8*T)),k},V.prototype.readIntBE=function(v,T,X){v=v>>>0,T=T>>>0,X||W(v,T,this.length);for(var k=T,K=1,ce=this[v+--k];k>0&&(K*=256);)ce+=this[v+--k]*K;return K*=128,ce>=K&&(ce-=Math.pow(2,8*T)),ce},V.prototype.readInt8=function(v,T){return v=v>>>0,T||W(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},V.prototype.readInt16LE=function(v,T){v=v>>>0,T||W(v,2,this.length);var X=this[v]|this[v+1]<<8;return X&32768?X|4294901760:X},V.prototype.readInt16BE=function(v,T){v=v>>>0,T||W(v,2,this.length);var X=this[v+1]|this[v]<<8;return X&32768?X|4294901760:X},V.prototype.readInt32LE=function(v,T){return v=v>>>0,T||W(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},V.prototype.readInt32BE=function(v,T){return v=v>>>0,T||W(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},V.prototype.readFloatLE=function(v,T){return v=v>>>0,T||W(v,4,this.length),He.read(this,v,!0,23,4)},V.prototype.readFloatBE=function(v,T){return v=v>>>0,T||W(v,4,this.length),He.read(this,v,!1,23,4)},V.prototype.readDoubleLE=function(v,T){return v=v>>>0,T||W(v,8,this.length),He.read(this,v,!0,52,8)},V.prototype.readDoubleBE=function(v,T){return v=v>>>0,T||W(v,8,this.length),He.read(this,v,!1,52,8)};function _e(P,v,T,X,k,K){if(!V.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>k||v<K)throw new RangeError('"value" argument is out of bounds');if(T+X>P.length)throw new RangeError("Index out of range")}V.prototype.writeUintLE=V.prototype.writeUIntLE=function(v,T,X,k){if(v=+v,T=T>>>0,X=X>>>0,!k){var K=Math.pow(2,8*X)-1;_e(this,v,T,X,K,0)}var ce=1,Me=0;for(this[T]=v&255;++Me<X&&(ce*=256);)this[T+Me]=v/ce&255;return T+X},V.prototype.writeUintBE=V.prototype.writeUIntBE=function(v,T,X,k){if(v=+v,T=T>>>0,X=X>>>0,!k){var K=Math.pow(2,8*X)-1;_e(this,v,T,X,K,0)}var ce=X-1,Me=1;for(this[T+ce]=v&255;--ce>=0&&(Me*=256);)this[T+ce]=v/Me&255;return T+X},V.prototype.writeUint8=V.prototype.writeUInt8=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,1,255,0),this[T]=v&255,T+1},V.prototype.writeUint16LE=V.prototype.writeUInt16LE=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,2,65535,0),this[T]=v&255,this[T+1]=v>>>8,T+2},V.prototype.writeUint16BE=V.prototype.writeUInt16BE=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,2,65535,0),this[T]=v>>>8,this[T+1]=v&255,T+2},V.prototype.writeUint32LE=V.prototype.writeUInt32LE=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,4,4294967295,0),this[T+3]=v>>>24,this[T+2]=v>>>16,this[T+1]=v>>>8,this[T]=v&255,T+4},V.prototype.writeUint32BE=V.prototype.writeUInt32BE=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,4,4294967295,0),this[T]=v>>>24,this[T+1]=v>>>16,this[T+2]=v>>>8,this[T+3]=v&255,T+4},V.prototype.writeIntLE=function(v,T,X,k){if(v=+v,T=T>>>0,!k){var K=Math.pow(2,8*X-1);_e(this,v,T,X,K-1,-K)}var ce=0,Me=1,We=0;for(this[T]=v&255;++ce<X&&(Me*=256);)v<0&&We===0&&this[T+ce-1]!==0&&(We=1),this[T+ce]=(v/Me>>0)-We&255;return T+X},V.prototype.writeIntBE=function(v,T,X,k){if(v=+v,T=T>>>0,!k){var K=Math.pow(2,8*X-1);_e(this,v,T,X,K-1,-K)}var ce=X-1,Me=1,We=0;for(this[T+ce]=v&255;--ce>=0&&(Me*=256);)v<0&&We===0&&this[T+ce+1]!==0&&(We=1),this[T+ce]=(v/Me>>0)-We&255;return T+X},V.prototype.writeInt8=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,1,127,-128),v<0&&(v=255+v+1),this[T]=v&255,T+1},V.prototype.writeInt16LE=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,2,32767,-32768),this[T]=v&255,this[T+1]=v>>>8,T+2},V.prototype.writeInt16BE=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,2,32767,-32768),this[T]=v>>>8,this[T+1]=v&255,T+2},V.prototype.writeInt32LE=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,4,2147483647,-2147483648),this[T]=v&255,this[T+1]=v>>>8,this[T+2]=v>>>16,this[T+3]=v>>>24,T+4},V.prototype.writeInt32BE=function(v,T,X){return v=+v,T=T>>>0,X||_e(this,v,T,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[T]=v>>>24,this[T+1]=v>>>16,this[T+2]=v>>>8,this[T+3]=v&255,T+4};function qe(P,v,T,X,k,K){if(T+X>P.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function mt(P,v,T,X,k){return v=+v,T=T>>>0,k||qe(P,v,T,4,34028234663852886e22,-34028234663852886e22),He.write(P,v,T,X,23,4),T+4}V.prototype.writeFloatLE=function(v,T,X){return mt(this,v,T,!0,X)},V.prototype.writeFloatBE=function(v,T,X){return mt(this,v,T,!1,X)};function Gt(P,v,T,X,k){return v=+v,T=T>>>0,k||qe(P,v,T,8,17976931348623157e292,-17976931348623157e292),He.write(P,v,T,X,52,8),T+8}V.prototype.writeDoubleLE=function(v,T,X){return Gt(this,v,T,!0,X)},V.prototype.writeDoubleBE=function(v,T,X){return Gt(this,v,T,!1,X)},V.prototype.copy=function(v,T,X,k){if(!V.isBuffer(v))throw new TypeError("argument should be a Buffer");if(X||(X=0),!k&&k!==0&&(k=this.length),T>=v.length&&(T=v.length),T||(T=0),k>0&&k<X&&(k=X),k===X||v.length===0||this.length===0)return 0;if(T<0)throw new RangeError("targetStart out of bounds");if(X<0||X>=this.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("sourceEnd out of bounds");k>this.length&&(k=this.length),v.length-T<k-X&&(k=v.length-T+X);var K=k-X;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(T,X,k):Uint8Array.prototype.set.call(v,this.subarray(X,k),T),K},V.prototype.fill=function(v,T,X,k){if(typeof v=="string"){if(typeof T=="string"?(k=T,T=0,X=this.length):typeof X=="string"&&(k=X,X=this.length),k!==void 0&&typeof k!="string")throw new TypeError("encoding must be a string");if(typeof k=="string"&&!V.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(v.length===1){var K=v.charCodeAt(0);(k==="utf8"&&K<128||k==="latin1")&&(v=K)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(T<0||this.length<T||this.length<X)throw new RangeError("Out of range index");if(X<=T)return this;T=T>>>0,X=X===void 0?this.length:X>>>0,v||(v=0);var ce;if(typeof v=="number")for(ce=T;ce<X;++ce)this[ce]=v;else{var Me=V.isBuffer(v)?v:V.from(v,k),We=Me.length;if(We===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(ce=0;ce<X-T;++ce)this[ce+T]=Me[ce%We]}return this};var Qt=/[^+/0-9A-Za-z-_]/g;function sn(P){if(P=P.split("=")[0],P=P.trim().replace(Qt,""),P.length<2)return"";for(;P.length%4!==0;)P=P+"=";return P}function Wt(P,v){v=v||1/0;for(var T,X=P.length,k=null,K=[],ce=0;ce<X;++ce){if(T=P.charCodeAt(ce),T>55295&&T<57344){if(!k){if(T>56319){(v-=3)>-1&&K.push(239,191,189);continue}else if(ce+1===X){(v-=3)>-1&&K.push(239,191,189);continue}k=T;continue}if(T<56320){(v-=3)>-1&&K.push(239,191,189),k=T;continue}T=(k-55296<<10|T-56320)+65536}else k&&(v-=3)>-1&&K.push(239,191,189);if(k=null,T<128){if((v-=1)<0)break;K.push(T)}else if(T<2048){if((v-=2)<0)break;K.push(T>>6|192,T&63|128)}else if(T<65536){if((v-=3)<0)break;K.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((v-=4)<0)break;K.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return K}function kt(P){for(var v=[],T=0;T<P.length;++T)v.push(P.charCodeAt(T)&255);return v}function Xe(P,v){for(var T,X,k,K=[],ce=0;ce<P.length&&!((v-=2)<0);++ce)T=P.charCodeAt(ce),X=T>>8,k=T%256,K.push(k),K.push(X);return K}function dt(P){return Te.toByteArray(sn(P))}function ot(P,v,T,X){for(var k=0;k<X&&!(k+T>=v.length||k>=P.length);++k)v[k+T]=P[k];return k}function ft(P,v){return P instanceof v||P!=null&&P.constructor!=null&&P.constructor.name!=null&&P.constructor.name===v.name}function tn(P){return P!==P}var Re=function(){for(var P="0123456789abcdef",v=new Array(256),T=0;T<16;++T)for(var X=T*16,k=0;k<16;++k)v[X+k]=P[T]+P[k];return v}()},64018:function(){var kn,Ft,Y,re=!1,Te,He;window.PR_SHOULD_USE_CONTINUATION=!0;var xe,ne;(function(){var y=window,Se=["break,continue,do,else,for,if,return,while"],V=[Se,"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=[V,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],le=[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"],O=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],B=[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"],E="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",F=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],L="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",Ae=[Se,"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"],Z=[Se,"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"],J=[Se,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],H=[le,B,O,F,L,Ae,Z,J],z=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,oe="str",be="kwd",De="com",ke="typ",ge="lit",Ue="pun",Je="pln",Be="tag",nt="dec",ie="src",Q="atn",q="atv",se="nocode",de="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function fe(P){for(var v=0,T=!1,X=!1,k=0,K=P.length;k<K;++k){var ce=P[k];if(ce.ignoreCase)X=!0;else if(/[a-z]/i.test(ce.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){T=!0,X=!1;break}}var Me={b:8,t:9,n:10,v:11,f:12,r:13};function We(Rt){var yt=Rt.charCodeAt(0);if(yt!==92)return yt;var xt=Rt.charAt(1);return yt=Me[xt],yt||("0"<=xt&&xt<="7"?parseInt(Rt.substring(1),8):xt==="u"||xt==="x"?parseInt(Rt.substring(2),16):Rt.charCodeAt(1))}function lt(Rt){if(Rt<32)return(Rt<16?"\\x0":"\\x")+Rt.toString(16);var yt=String.fromCharCode(Rt);return yt==="\\"||yt==="-"||yt==="]"||yt==="^"?"\\"+yt:yt}function ht(Rt){var yt=Rt.substring(1,Rt.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")),xt=[],At=yt[0]==="^",gt=["["];At&&gt.push("^");for(var It=At?1:0,Ht=yt.length;It<Ht;++It){var un=yt[It];if(/\\[bdsw]/i.test(un))gt.push(un);else{var Yt=We(un),_n;It+2<Ht&&yt[It+1]==="-"?(_n=We(yt[It+2]),It+=2):_n=Yt,xt.push([Yt,_n]),_n<65||Yt>122||(_n<65||Yt>90||xt.push([Math.max(65,Yt)|32,Math.min(_n,90)|32]),_n<97||Yt>122||xt.push([Math.max(97,Yt)&-33,Math.min(_n,122)&-33]))}}xt.sort(function(dr,Xt){return dr[0]-Xt[0]||Xt[1]-dr[1]});for(var on=[],Un=[],It=0;It<xt.length;++It){var Gn=xt[It];Gn[0]<=Un[1]+1?Un[1]=Math.max(Un[1],Gn[1]):on.push(Un=Gn)}for(var It=0;It<on.length;++It){var Gn=on[It];gt.push(lt(Gn[0])),Gn[1]>Gn[0]&&(Gn[1]+1>Gn[0]&&gt.push("-"),gt.push(lt(Gn[1])))}return gt.push("]"),gt.join("")}function jt(Rt){for(var yt=Rt.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")),xt=yt.length,At=[],gt=0,It=0;gt<xt;++gt){var Ht=yt[gt];if(Ht==="(")++It;else if(Ht.charAt(0)==="\\"){var un=+Ht.substring(1);un&&(un<=It?At[un]=-1:yt[gt]=lt(un))}}for(var gt=1;gt<At.length;++gt)At[gt]===-1&&(At[gt]=++v);for(var gt=0,It=0;gt<xt;++gt){var Ht=yt[gt];if(Ht==="(")++It,At[It]||(yt[gt]="(?:");else if(Ht.charAt(0)==="\\"){var un=+Ht.substring(1);un&&un<=It&&(yt[gt]="\\"+At[un])}}for(var gt=0;gt<xt;++gt)yt[gt]==="^"&&yt[gt+1]!=="^"&&(yt[gt]="");if(Rt.ignoreCase&&T)for(var gt=0;gt<xt;++gt){var Ht=yt[gt],Yt=Ht.charAt(0);Ht.length>=2&&Yt==="["?yt[gt]=ht(Ht):Yt!=="\\"&&(yt[gt]=Ht.replace(/[a-zA-Z]/g,function(Un){var Gn=Un.charCodeAt(0);return"["+String.fromCharCode(Gn&-33,Gn|32)+"]"}))}return yt.join("")}for(var vt=[],k=0,K=P.length;k<K;++k){var ce=P[k];if(ce.global||ce.multiline)throw new Error(""+ce);vt.push("(?:"+jt(ce)+")")}return new RegExp(vt.join("|"),X?"gi":"g")}function b(P,v){var T=/(?:^|\s)nocode(?:\s|$)/,X=[],k=0,K=[],ce=0;function Me(We){var lt=We.nodeType;if(lt==1){if(T.test(We.className))return;for(var ht=We.firstChild;ht;ht=ht.nextSibling)Me(ht);var jt=We.nodeName.toLowerCase();(jt==="br"||jt==="li")&&(X[ce]=`
`,K[ce<<1]=k++,K[ce++<<1|1]=We)}else if(lt==3||lt==4){var vt=We.nodeValue;vt.length&&(v?vt=vt.replace(/\r\n?/g,`
`):vt=vt.replace(/[ \t\r\n]+/g," "),X[ce]=vt,K[ce<<1]=k,k+=vt.length,K[ce++<<1|1]=We)}}return Me(P),{sourceCode:X.join("").replace(/\n$/,""),spans:K}}function S(P,v,T,X,k){if(T){var K={sourceNode:P,pre:1,langExtension:null,numberLines:null,sourceCode:T,spans:null,basePos:v,decorations:null};X(K),k.push.apply(k,K.decorations)}}var W=/\S/;function _e(P){for(var v=void 0,T=P.firstChild;T;T=T.nextSibling){var X=T.nodeType;v=X===1?v?P:T:X===3&&W.test(T.nodeValue)?P:v}return v===P?void 0:v}function qe(P,v){var T={},X;(function(){for(var ce=P.concat(v),Me=[],We={},lt=0,ht=ce.length;lt<ht;++lt){var jt=ce[lt],vt=jt[3];if(vt)for(var Rt=vt.length;--Rt>=0;)T[vt.charAt(Rt)]=jt;var yt=jt[1],xt=""+yt;We.hasOwnProperty(xt)||(Me.push(yt),We[xt]=null)}Me.push(/[\0-\uffff]/),X=fe(Me)})();var k=v.length,K=function(ce){for(var Me=ce.sourceCode,We=ce.basePos,lt=ce.sourceNode,ht=[We,Je],jt=0,vt=Me.match(X)||[],Rt={},yt=0,xt=vt.length;yt<xt;++yt){var At=vt[yt],gt=Rt[At],It=void 0,Ht;if(typeof gt=="string")Ht=!1;else{var un=T[At.charAt(0)];if(un)It=At.match(un[1]),gt=un[0];else{for(var Yt=0;Yt<k;++Yt)if(un=v[Yt],It=At.match(un[1]),It){gt=un[0];break}It||(gt=Je)}Ht=gt.length>=5&&gt.substring(0,5)==="lang-",Ht&&!(It&&typeof It[1]=="string")&&(Ht=!1,gt=ie),Ht||(Rt[At]=gt)}var _n=jt;if(jt+=At.length,!Ht)ht.push(We+_n,gt);else{var on=It[1],Un=At.indexOf(on),Gn=Un+on.length;It[2]&&(Gn=At.length-It[2].length,Un=Gn-on.length);var dr=gt.substring(5);S(lt,We+_n,At.substring(0,Un),K,ht),S(lt,We+_n+Un,on,Xe(dr,on),ht),S(lt,We+_n+Gn,At.substring(Gn),K,ht)}}ce.decorations=ht};return K}function mt(P){var v=[],T=[];P.tripleQuotedStrings?v.push([oe,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):P.multiLineStrings?v.push([oe,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):v.push([oe,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),P.verbatimStrings&&T.push([oe,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var X=P.hashComments;X&&(P.cStyleComments?(X>1?v.push([De,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):v.push([De,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),T.push([oe,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):v.push([De,/^#[^\r\n]*/,null,"#"])),P.cStyleComments&&(T.push([De,/^\/\/[^\r\n]*/,null]),T.push([De,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var k=P.regexLiterals;if(k){var K=k>1?"":`
\r`,ce=K?".":"[\\S\\s]",Me="/(?=[^/*"+K+"])(?:[^/\\x5B\\x5C"+K+"]|\\x5C"+ce+"|\\x5B(?:[^\\x5C\\x5D"+K+"]|\\x5C"+ce+")*(?:\\x5D|$))+/";T.push(["lang-regex",RegExp("^"+de+"("+Me+")")])}var We=P.types;We&&T.push([ke,We]);var lt=(""+P.keywords).replace(/^ | $/g,"");lt.length&&T.push([be,new RegExp("^(?:"+lt.replace(/[\s,]+/g,"|")+")\\b"),null]),v.push([Je,/^\s+/,null,` \r
\xA0`]);var ht="^.[^\\s\\w.$@'\"`/\\\\]*";return P.regexLiterals&&(ht+="(?!s*/)"),T.push([ge,/^@[a-z_$][a-z_$@0-9]*/i,null],[ke,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Je,/^[a-z_$][a-z_$@0-9]*/i,null],[ge,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Je,/^\\[\s\S]?/,null],[Ue,new RegExp(ht),null]),qe(v,T)}var Gt=mt({keywords:H,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Qt(P,v,T){for(var X=/(?:^|\s)nocode(?:\s|$)/,k=/\r\n?|\n/,K=P.ownerDocument,ce=K.createElement("li");P.firstChild;)ce.appendChild(P.firstChild);var Me=[ce];function We(yt){var xt=yt.nodeType;if(xt==1&&!X.test(yt.className))if(yt.nodeName==="br")lt(yt),yt.parentNode&&yt.parentNode.removeChild(yt);else for(var At=yt.firstChild;At;At=At.nextSibling)We(At);else if((xt==3||xt==4)&&T){var gt=yt.nodeValue,It=gt.match(k);if(It){var Ht=gt.substring(0,It.index);yt.nodeValue=Ht;var un=gt.substring(It.index+It[0].length);if(un){var Yt=yt.parentNode;Yt.insertBefore(K.createTextNode(un),yt.nextSibling)}lt(yt),Ht||yt.parentNode.removeChild(yt)}}}function lt(yt){for(;!yt.nextSibling;)if(yt=yt.parentNode,!yt)return;function xt(It,Ht){var un=Ht?It.cloneNode(!1):It,Yt=It.parentNode;if(Yt){var _n=xt(Yt,1),on=It.nextSibling;_n.appendChild(un);for(var Un=on;Un;Un=on)on=Un.nextSibling,_n.appendChild(Un)}return un}for(var At=xt(yt.nextSibling,0),gt;(gt=At.parentNode)&&gt.nodeType===1;)At=gt;Me.push(At)}for(var ht=0;ht<Me.length;++ht)We(Me[ht]);v===(v|0)&&Me[0].setAttribute("value",v);var jt=K.createElement("ol");jt.className="linenums";for(var vt=Math.max(0,v-1|0)||0,ht=0,Rt=Me.length;ht<Rt;++ht)ce=Me[ht],ce.className="L"+(ht+vt)%10,ce.firstChild||ce.appendChild(K.createTextNode("\xA0")),jt.appendChild(ce);P.appendChild(jt)}function sn(P){var v=/\bMSIE\s(\d+)/.exec(navigator.userAgent);v=v&&+v[1]<=8;var T=/\n/g,X=P.sourceCode,k=X.length,K=0,ce=P.spans,Me=ce.length,We=0,lt=P.decorations,ht=lt.length,jt=0;lt[ht]=k;var vt,Rt;for(Rt=vt=0;Rt<ht;)lt[Rt]!==lt[Rt+2]?(lt[vt++]=lt[Rt++],lt[vt++]=lt[Rt++]):Rt+=2;for(ht=vt,Rt=vt=0;Rt<ht;){for(var yt=lt[Rt],xt=lt[Rt+1],At=Rt+2;At+2<=ht&&lt[At+1]===xt;)At+=2;lt[vt++]=yt,lt[vt++]=xt,Rt=At}ht=lt.length=vt;var gt=P.sourceNode,It="";gt&&(It=gt.style.display,gt.style.display="none");try{for(var Ht=null;We<Me;){var un=ce[We],Yt=ce[We+2]||k,_n=lt[jt+2]||k,At=Math.min(Yt,_n),on=ce[We+1],Un;if(on.nodeType!==1&&(Un=X.substring(K,At))){v&&(Un=Un.replace(T,"\r")),on.nodeValue=Un;var Gn=on.ownerDocument,dr=Gn.createElement("span");dr.className=lt[jt+1];var Xt=on.parentNode;Xt.replaceChild(dr,on),dr.appendChild(on),K<Yt&&(ce[We+1]=on=Gn.createTextNode(X.substring(At,Yt)),Xt.insertBefore(on,dr.nextSibling))}K=At,K>=Yt&&(We+=2),K>=_n&&(jt+=2)}}finally{gt&&(gt.style.display=It)}}var Wt={};function kt(P,v){for(var T=v.length;--T>=0;){var X=v[T];Wt.hasOwnProperty(X)?y.console&&console.warn("cannot override language handler %s",X):Wt[X]=P}}function Xe(P,v){return P&&Wt.hasOwnProperty(P)||(P=/^\s*</.test(v)?"default-markup":"default-code"),Wt[P]}kt(Gt,["default-code"]),kt(qe([],[[Je,/^[^<?]+/],[nt,/^<!\w[^>]*(?:>|$)/],[De,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Ue,/^(?:<[%?]|[%?]>)/],["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"]),kt(qe([[Je,/^[\s]+/,null,` \r
`],[q,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Be,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Q,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Ue,/^[=<>\/]+/],["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"]),kt(qe([],[[q,/^[\s\S]+/]]),["uq.val"]),kt(mt({keywords:le,hashComments:!0,cStyleComments:!0,types:z}),["c","cc","cpp","cxx","cyc","m"]),kt(mt({keywords:"null,true,false"}),["json"]),kt(mt({keywords:B,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:z}),["cs"]),kt(mt({keywords:O,cStyleComments:!0}),["java"]),kt(mt({keywords:J,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),kt(mt({keywords:Ae,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),kt(mt({keywords:L,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),kt(mt({keywords:Z,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),kt(mt({keywords:F,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),kt(mt({keywords:E,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),kt(qe([],[[oe,/^[\s\S]+/]]),["regex"]);function dt(P){var v=P.langExtension;try{var T=b(P.sourceNode,P.pre),X=T.sourceCode;P.sourceCode=X,P.spans=T.spans,P.basePos=0,Xe(v,X)(P),sn(P)}catch(k){y.console&&console.log(k&&k.stack||k)}}function ot(P,v,T){var X=T||!1,k=v||null,K=document.createElement("div");K.innerHTML="<pre>"+P+"</pre>",K=K.firstChild,X&&Qt(K,X,!0);var ce={langExtension:k,numberLines:X,sourceNode:K,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return dt(ce),K.innerHTML}function ft(P,v){var T=v||document.body,X=T.ownerDocument||document;function k(un){return T.getElementsByTagName(un)}for(var K=[k("pre"),k("code"),k("xmp")],ce=[],Me=0;Me<K.length;++Me)for(var We=0,lt=K[Me].length;We<lt;++We)ce.push(K[Me][We]);K=null;var ht=Date;ht.now||(ht={now:function(){return+new Date}});var jt=0,vt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Rt=/\bprettyprint\b/,yt=/\bprettyprinted\b/,xt=/pre|xmp/i,At=/^code$/i,gt=/^(?:pre|code|xmp)$/i,It={};function Ht(){for(var un=y.PR_SHOULD_USE_CONTINUATION?ht.now()+250:1/0;jt<ce.length&&ht.now()<un;jt++){for(var Yt=ce[jt],_n=It,on=Yt;on=on.previousSibling;){var Un=on.nodeType,Gn=(Un===7||Un===8)&&on.nodeValue;if(Gn?!/^\??prettify\b/.test(Gn):Un!==3||/\S/.test(on.nodeValue))break;if(Gn){_n={},Gn.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Kt,Lt,yn){_n[Lt]=yn});break}}var dr=Yt.className;if((_n!==It||Rt.test(dr))&&!yt.test(dr)){for(var Xt=!1,Cn=Yt.parentNode;Cn;Cn=Cn.parentNode){var Ge=Cn.tagName;if(gt.test(Ge)&&Cn.className&&Rt.test(Cn.className)){Xt=!0;break}}if(!Xt){Yt.className+=" prettyprinted";var Pe=_n.lang;if(!Pe){Pe=dr.match(vt);var Ie;!Pe&&(Ie=_e(Yt))&&At.test(Ie.tagName)&&(Pe=Ie.className.match(vt)),Pe&&(Pe=Pe[1])}var ee;if(xt.test(Yt.tagName))ee=1;else{var ue=Yt.currentStyle,me=X.defaultView,Fe=ue?ue.whiteSpace:me&&me.getComputedStyle?me.getComputedStyle(Yt,null).getPropertyValue("white-space"):0;ee=Fe&&Fe.substring(0,3)==="pre"}var Qe=_n.linenums;(Qe=Qe==="true"||+Qe)||(Qe=dr.match(/\blinenums\b(?::(\d+))?/),Qe=Qe?Qe[1]&&Qe[1].length?+Qe[1]:!0:!1),Qe&&Qt(Yt,Qe,ee);var Tt={langExtension:Pe,sourceNode:Yt,numberLines:Qe,pre:ee,sourceCode:null,basePos:null,spans:null,decorations:null};dt(Tt)}}}jt<ce.length?y.setTimeout(Ht,250):typeof P=="function"&&P()}Ht()}var tn=y.PR={createSimpleLexer:qe,registerLangHandler:kt,sourceDecorator:mt,PR_ATTRIB_NAME:Q,PR_ATTRIB_VALUE:q,PR_COMMENT:De,PR_DECLARATION:nt,PR_KEYWORD:be,PR_LITERAL:ge,PR_NOCODE:se,PR_PLAIN:Je,PR_PUNCTUATION:Ue,PR_SOURCE:ie,PR_STRING:oe,PR_TAG:Be,PR_TYPE:ke,prettyPrintOne:re?y.prettyPrintOne=ot:xe=ot,prettyPrint:ne=re?y.prettyPrint=ft:ne=ft},Re=y.define;typeof Re=="function"&&Re.amd&&Re("google-code-prettify",[],function(){return tn})})()},25769:function(kn,Ft,Y){"use strict";var re=Y(98040),Te={"text/plain":"Text","text/html":"Url",default:"Text"},He="Copy to clipboard: #{key}, Enter";function xe(y){var Se=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return y.replace(/#{\s*key\s*}/g,Se)}function ne(y,Se){var V,o,le,O,B,E,F=!1;Se||(Se={}),V=Se.debug||!1;try{le=re(),O=document.createRange(),B=document.getSelection(),E=document.createElement("span"),E.textContent=y,E.ariaHidden="true",E.style.all="unset",E.style.position="fixed",E.style.top=0,E.style.clip="rect(0, 0, 0, 0)",E.style.whiteSpace="pre",E.style.webkitUserSelect="text",E.style.MozUserSelect="text",E.style.msUserSelect="text",E.style.userSelect="text",E.addEventListener("copy",function(Ae){if(Ae.stopPropagation(),Se.format)if(Ae.preventDefault(),typeof Ae.clipboardData=="undefined"){V&&console.warn("unable to use e.clipboardData"),V&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var Z=Te[Se.format]||Te.default;window.clipboardData.setData(Z,y)}else Ae.clipboardData.clearData(),Ae.clipboardData.setData(Se.format,y);Se.onCopy&&(Ae.preventDefault(),Se.onCopy(Ae.clipboardData))}),document.body.appendChild(E),O.selectNodeContents(E),B.addRange(O);var L=document.execCommand("copy");if(!L)throw new Error("copy command was unsuccessful");F=!0}catch(Ae){V&&console.error("unable to copy using execCommand: ",Ae),V&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(Se.format||"text",y),Se.onCopy&&Se.onCopy(window.clipboardData),F=!0}catch(Z){V&&console.error("unable to copy using clipboardData: ",Z),V&&console.error("falling back to prompt"),o=xe("message"in Se?Se.message:He),window.prompt(o,y)}}finally{B&&(typeof B.removeRange=="function"?B.removeRange(O):B.removeAllRanges()),E&&document.body.removeChild(E),le()}return F}kn.exports=ne},6341:function(kn,Ft,Y){"use strict";Y.d(Ft,{Jx:function(){return Pl}});function re(l,C="utf8"){return new TextDecoder(C).decode(l)}const Te=new TextEncoder;function He(l){return Te.encode(l)}const xe=1024*8,ne=(()=>{const l=new Uint8Array(4),C=new Uint32Array(l.buffer);return!((C[0]=1)&l[0])})(),y={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class Se{constructor(C=xe,p={}){fi(this,"buffer");fi(this,"byteLength");fi(this,"byteOffset");fi(this,"length");fi(this,"offset");fi(this,"lastWrittenByte");fi(this,"littleEndian");fi(this,"_data");fi(this,"_mark");fi(this,"_marks");let R=!1;typeof C=="number"?C=new ArrayBuffer(C):(R=!0,this.lastWrittenByte=C.byteLength);const j=p.offset?p.offset>>>0:0,te=C.byteLength-j;let Ye=j;(ArrayBuffer.isView(C)||C instanceof Se)&&(C.byteLength!==C.buffer.byteLength&&(Ye=C.byteOffset+j),C=C.buffer),R?this.lastWrittenByte=te:this.lastWrittenByte=0,this.buffer=C,this.length=te,this.byteLength=te,this.byteOffset=Ye,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,Ye,te),this._mark=0,this._marks=[]}available(C=1){return this.offset+C<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(C=1){return this.offset+=C,this}back(C=1){return this.offset-=C,this}seek(C){return this.offset=C,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const C=this._marks.pop();if(C===void 0)throw new Error("Mark stack empty");return this.seek(C),this}rewind(){return this.offset=0,this}ensureAvailable(C=1){if(!this.available(C)){const R=(this.offset+C)*2,j=new Uint8Array(R);j.set(new Uint8Array(this.buffer)),this.buffer=j.buffer,this.length=R,this.byteLength=R,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(C=1){return this.readArray(C,"uint8")}readArray(C,p){const R=y[p].BYTES_PER_ELEMENT*C,j=this.byteOffset+this.offset,te=this.buffer.slice(j,j+R);if(this.littleEndian===ne&&p!=="uint8"&&p!=="int8"){const Ne=new Uint8Array(this.buffer.slice(j,j+R));Ne.reverse();const rn=new y[p](Ne.buffer);return this.offset+=R,rn.reverse(),rn}const Ye=new y[p](te);return this.offset+=R,Ye}readInt16(){const C=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,C}readUint16(){const C=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,C}readInt32(){const C=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,C}readUint32(){const C=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,C}readFloat32(){const C=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,C}readFloat64(){const C=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,C}readBigInt64(){const C=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,C}readBigUint64(){const C=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,C}readChar(){return String.fromCharCode(this.readInt8())}readChars(C=1){let p="";for(let R=0;R<C;R++)p+=this.readChar();return p}readUtf8(C=1){return re(this.readBytes(C))}decodeText(C=1,p="utf8"){return re(this.readBytes(C),p)}writeBoolean(C){return this.writeUint8(C?255:0),this}writeInt8(C){return this.ensureAvailable(1),this._data.setInt8(this.offset++,C),this._updateLastWrittenByte(),this}writeUint8(C){return this.ensureAvailable(1),this._data.setUint8(this.offset++,C),this._updateLastWrittenByte(),this}writeByte(C){return this.writeUint8(C)}writeBytes(C){this.ensureAvailable(C.length);for(let p=0;p<C.length;p++)this._data.setUint8(this.offset++,C[p]);return this._updateLastWrittenByte(),this}writeInt16(C){return this.ensureAvailable(2),this._data.setInt16(this.offset,C,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(C){return this.ensureAvailable(2),this._data.setUint16(this.offset,C,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(C){return this.ensureAvailable(4),this._data.setInt32(this.offset,C,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(C){return this.ensureAvailable(4),this._data.setUint32(this.offset,C,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(C){return this.ensureAvailable(4),this._data.setFloat32(this.offset,C,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(C){return this.ensureAvailable(8),this._data.setFloat64(this.offset,C,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(C){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,C,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(C){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,C,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(C){return this.writeUint8(C.charCodeAt(0))}writeChars(C){for(let p=0;p<C.length;p++)this.writeUint8(C.charCodeAt(p));return this}writeUtf8(C){return this.writeBytes(He(C))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}const V=4,o=0,le=1,O=2;function B(l){let C=l.length;for(;--C>=0;)l[C]=0}const E=0,F=1,L=2,Ae=3,Z=258,J=29,H=256,z=H+1+J,oe=30,be=19,De=2*z+1,ke=15,ge=16,Ue=7,Je=256,Be=16,nt=17,ie=18,Q=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),q=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),se=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),de=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),fe=512,b=new Array((z+2)*2);B(b);const S=new Array(oe*2);B(S);const W=new Array(fe);B(W);const _e=new Array(Z-Ae+1);B(_e);const qe=new Array(J);B(qe);const mt=new Array(oe);B(mt);function Gt(l,C,p,R,j){this.static_tree=l,this.extra_bits=C,this.extra_base=p,this.elems=R,this.max_length=j,this.has_stree=l&&l.length}let Qt,sn,Wt;function kt(l,C){this.dyn_tree=l,this.max_code=0,this.stat_desc=C}const Xe=l=>l<256?W[l]:W[256+(l>>>7)],dt=(l,C)=>{l.pending_buf[l.pending++]=C&255,l.pending_buf[l.pending++]=C>>>8&255},ot=(l,C,p)=>{l.bi_valid>ge-p?(l.bi_buf|=C<<l.bi_valid&65535,dt(l,l.bi_buf),l.bi_buf=C>>ge-l.bi_valid,l.bi_valid+=p-ge):(l.bi_buf|=C<<l.bi_valid&65535,l.bi_valid+=p)},ft=(l,C,p)=>{ot(l,p[C*2],p[C*2+1])},tn=(l,C)=>{let p=0;do p|=l&1,l>>>=1,p<<=1;while(--C>0);return p>>>1},Re=l=>{l.bi_valid===16?(dt(l,l.bi_buf),l.bi_buf=0,l.bi_valid=0):l.bi_valid>=8&&(l.pending_buf[l.pending++]=l.bi_buf&255,l.bi_buf>>=8,l.bi_valid-=8)},P=(l,C)=>{const p=C.dyn_tree,R=C.max_code,j=C.stat_desc.static_tree,te=C.stat_desc.has_stree,Ye=C.stat_desc.extra_bits,Ne=C.stat_desc.extra_base,rn=C.stat_desc.max_length;let Oe,it,Pn,hn,Zt,Wn,si=0;for(hn=0;hn<=ke;hn++)l.bl_count[hn]=0;for(p[l.heap[l.heap_max]*2+1]=0,Oe=l.heap_max+1;Oe<De;Oe++)it=l.heap[Oe],hn=p[p[it*2+1]*2+1]+1,hn>rn&&(hn=rn,si++),p[it*2+1]=hn,!(it>R)&&(l.bl_count[hn]++,Zt=0,it>=Ne&&(Zt=Ye[it-Ne]),Wn=p[it*2],l.opt_len+=Wn*(hn+Zt),te&&(l.static_len+=Wn*(j[it*2+1]+Zt)));if(si!==0){do{for(hn=rn-1;l.bl_count[hn]===0;)hn--;l.bl_count[hn]--,l.bl_count[hn+1]+=2,l.bl_count[rn]--,si-=2}while(si>0);for(hn=rn;hn!==0;hn--)for(it=l.bl_count[hn];it!==0;)Pn=l.heap[--Oe],!(Pn>R)&&(p[Pn*2+1]!==hn&&(l.opt_len+=(hn-p[Pn*2+1])*p[Pn*2],p[Pn*2+1]=hn),it--)}},v=(l,C,p)=>{const R=new Array(ke+1);let j=0,te,Ye;for(te=1;te<=ke;te++)j=j+p[te-1]<<1,R[te]=j;for(Ye=0;Ye<=C;Ye++){let Ne=l[Ye*2+1];Ne!==0&&(l[Ye*2]=tn(R[Ne]++,Ne))}},T=()=>{let l,C,p,R,j;const te=new Array(ke+1);for(p=0,R=0;R<J-1;R++)for(qe[R]=p,l=0;l<1<<Q[R];l++)_e[p++]=R;for(_e[p-1]=R,j=0,R=0;R<16;R++)for(mt[R]=j,l=0;l<1<<q[R];l++)W[j++]=R;for(j>>=7;R<oe;R++)for(mt[R]=j<<7,l=0;l<1<<q[R]-7;l++)W[256+j++]=R;for(C=0;C<=ke;C++)te[C]=0;for(l=0;l<=143;)b[l*2+1]=8,l++,te[8]++;for(;l<=255;)b[l*2+1]=9,l++,te[9]++;for(;l<=279;)b[l*2+1]=7,l++,te[7]++;for(;l<=287;)b[l*2+1]=8,l++,te[8]++;for(v(b,z+1,te),l=0;l<oe;l++)S[l*2+1]=5,S[l*2]=tn(l,5);Qt=new Gt(b,Q,H+1,z,ke),sn=new Gt(S,q,0,oe,ke),Wt=new Gt(new Array(0),se,0,be,Ue)},X=l=>{let C;for(C=0;C<z;C++)l.dyn_ltree[C*2]=0;for(C=0;C<oe;C++)l.dyn_dtree[C*2]=0;for(C=0;C<be;C++)l.bl_tree[C*2]=0;l.dyn_ltree[Je*2]=1,l.opt_len=l.static_len=0,l.sym_next=l.matches=0},k=l=>{l.bi_valid>8?dt(l,l.bi_buf):l.bi_valid>0&&(l.pending_buf[l.pending++]=l.bi_buf),l.bi_buf=0,l.bi_valid=0},K=(l,C,p,R)=>{const j=C*2,te=p*2;return l[j]<l[te]||l[j]===l[te]&&R[C]<=R[p]},ce=(l,C,p)=>{const R=l.heap[p];let j=p<<1;for(;j<=l.heap_len&&(j<l.heap_len&&K(C,l.heap[j+1],l.heap[j],l.depth)&&j++,!K(C,R,l.heap[j],l.depth));)l.heap[p]=l.heap[j],p=j,j<<=1;l.heap[p]=R},Me=(l,C,p)=>{let R,j,te=0,Ye,Ne;if(l.sym_next!==0)do R=l.pending_buf[l.sym_buf+te++]&255,R+=(l.pending_buf[l.sym_buf+te++]&255)<<8,j=l.pending_buf[l.sym_buf+te++],R===0?ft(l,j,C):(Ye=_e[j],ft(l,Ye+H+1,C),Ne=Q[Ye],Ne!==0&&(j-=qe[Ye],ot(l,j,Ne)),R--,Ye=Xe(R),ft(l,Ye,p),Ne=q[Ye],Ne!==0&&(R-=mt[Ye],ot(l,R,Ne)));while(te<l.sym_next);ft(l,Je,C)},We=(l,C)=>{const p=C.dyn_tree,R=C.stat_desc.static_tree,j=C.stat_desc.has_stree,te=C.stat_desc.elems;let Ye,Ne,rn=-1,Oe;for(l.heap_len=0,l.heap_max=De,Ye=0;Ye<te;Ye++)p[Ye*2]!==0?(l.heap[++l.heap_len]=rn=Ye,l.depth[Ye]=0):p[Ye*2+1]=0;for(;l.heap_len<2;)Oe=l.heap[++l.heap_len]=rn<2?++rn:0,p[Oe*2]=1,l.depth[Oe]=0,l.opt_len--,j&&(l.static_len-=R[Oe*2+1]);for(C.max_code=rn,Ye=l.heap_len>>1;Ye>=1;Ye--)ce(l,p,Ye);Oe=te;do Ye=l.heap[1],l.heap[1]=l.heap[l.heap_len--],ce(l,p,1),Ne=l.heap[1],l.heap[--l.heap_max]=Ye,l.heap[--l.heap_max]=Ne,p[Oe*2]=p[Ye*2]+p[Ne*2],l.depth[Oe]=(l.depth[Ye]>=l.depth[Ne]?l.depth[Ye]:l.depth[Ne])+1,p[Ye*2+1]=p[Ne*2+1]=Oe,l.heap[1]=Oe++,ce(l,p,1);while(l.heap_len>=2);l.heap[--l.heap_max]=l.heap[1],P(l,C),v(p,rn,l.bl_count)},lt=(l,C,p)=>{let R,j=-1,te,Ye=C[0*2+1],Ne=0,rn=7,Oe=4;for(Ye===0&&(rn=138,Oe=3),C[(p+1)*2+1]=65535,R=0;R<=p;R++)te=Ye,Ye=C[(R+1)*2+1],!(++Ne<rn&&te===Ye)&&(Ne<Oe?l.bl_tree[te*2]+=Ne:te!==0?(te!==j&&l.bl_tree[te*2]++,l.bl_tree[Be*2]++):Ne<=10?l.bl_tree[nt*2]++:l.bl_tree[ie*2]++,Ne=0,j=te,Ye===0?(rn=138,Oe=3):te===Ye?(rn=6,Oe=3):(rn=7,Oe=4))},ht=(l,C,p)=>{let R,j=-1,te,Ye=C[0*2+1],Ne=0,rn=7,Oe=4;for(Ye===0&&(rn=138,Oe=3),R=0;R<=p;R++)if(te=Ye,Ye=C[(R+1)*2+1],!(++Ne<rn&&te===Ye)){if(Ne<Oe)do ft(l,te,l.bl_tree);while(--Ne!==0);else te!==0?(te!==j&&(ft(l,te,l.bl_tree),Ne--),ft(l,Be,l.bl_tree),ot(l,Ne-3,2)):Ne<=10?(ft(l,nt,l.bl_tree),ot(l,Ne-3,3)):(ft(l,ie,l.bl_tree),ot(l,Ne-11,7));Ne=0,j=te,Ye===0?(rn=138,Oe=3):te===Ye?(rn=6,Oe=3):(rn=7,Oe=4)}},jt=l=>{let C;for(lt(l,l.dyn_ltree,l.l_desc.max_code),lt(l,l.dyn_dtree,l.d_desc.max_code),We(l,l.bl_desc),C=be-1;C>=3&&l.bl_tree[de[C]*2+1]===0;C--);return l.opt_len+=3*(C+1)+5+5+4,C},vt=(l,C,p,R)=>{let j;for(ot(l,C-257,5),ot(l,p-1,5),ot(l,R-4,4),j=0;j<R;j++)ot(l,l.bl_tree[de[j]*2+1],3);ht(l,l.dyn_ltree,C-1),ht(l,l.dyn_dtree,p-1)},Rt=l=>{let C=4093624447,p;for(p=0;p<=31;p++,C>>>=1)if(C&1&&l.dyn_ltree[p*2]!==0)return o;if(l.dyn_ltree[9*2]!==0||l.dyn_ltree[10*2]!==0||l.dyn_ltree[13*2]!==0)return le;for(p=32;p<H;p++)if(l.dyn_ltree[p*2]!==0)return le;return o};let yt=!1;const xt=l=>{yt||(T(),yt=!0),l.l_desc=new kt(l.dyn_ltree,Qt),l.d_desc=new kt(l.dyn_dtree,sn),l.bl_desc=new kt(l.bl_tree,Wt),l.bi_buf=0,l.bi_valid=0,X(l)},At=(l,C,p,R)=>{ot(l,(E<<1)+(R?1:0),3),k(l),dt(l,p),dt(l,~p),p&&l.pending_buf.set(l.window.subarray(C,C+p),l.pending),l.pending+=p},gt=l=>{ot(l,F<<1,3),ft(l,Je,b),Re(l)},It=(l,C,p,R)=>{let j,te,Ye=0;l.level>0?(l.strm.data_type===O&&(l.strm.data_type=Rt(l)),We(l,l.l_desc),We(l,l.d_desc),Ye=jt(l),j=l.opt_len+3+7>>>3,te=l.static_len+3+7>>>3,te<=j&&(j=te)):j=te=p+5,p+4<=j&&C!==-1?At(l,C,p,R):l.strategy===V||te===j?(ot(l,(F<<1)+(R?1:0),3),Me(l,b,S)):(ot(l,(L<<1)+(R?1:0),3),vt(l,l.l_desc.max_code+1,l.d_desc.max_code+1,Ye+1),Me(l,l.dyn_ltree,l.dyn_dtree)),X(l),R&&k(l)},Ht=(l,C,p)=>(l.pending_buf[l.sym_buf+l.sym_next++]=C,l.pending_buf[l.sym_buf+l.sym_next++]=C>>8,l.pending_buf[l.sym_buf+l.sym_next++]=p,C===0?l.dyn_ltree[p*2]++:(l.matches++,C--,l.dyn_ltree[(_e[p]+H+1)*2]++,l.dyn_dtree[Xe(C)*2]++),l.sym_next===l.sym_end);var un=xt,Yt=At,_n=It,on=Ht,Un=gt,Gn={_tr_init:un,_tr_stored_block:Yt,_tr_flush_block:_n,_tr_tally:on,_tr_align:Un},Xt=(l,C,p,R)=>{let j=l&65535|0,te=l>>>16&65535|0,Ye=0;for(;p!==0;){Ye=p>2e3?2e3:p,p-=Ye;do j=j+C[R++]|0,te=te+j|0;while(--Ye);j%=65521,te%=65521}return j|te<<16|0};const Cn=()=>{let l,C=[];for(var p=0;p<256;p++){l=p;for(var R=0;R<8;R++)l=l&1?3988292384^l>>>1:l>>>1;C[p]=l}return C},Ge=new Uint32Array(Cn());var Ie=(l,C,p,R)=>{const j=Ge,te=R+p;l^=-1;for(let Ye=R;Ye<te;Ye++)l=l>>>8^j[(l^C[Ye])&255];return l^-1},ee={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ue={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:me,_tr_stored_block:Fe,_tr_flush_block:Qe,_tr_tally:Tt,_tr_align:Kt}=Gn,{Z_NO_FLUSH:Lt,Z_PARTIAL_FLUSH:yn,Z_FULL_FLUSH:qn,Z_FINISH:or,Z_BLOCK:cn,Z_OK:qt,Z_STREAM_END:fr,Z_STREAM_ERROR:pr,Z_DATA_ERROR:Ve,Z_BUF_ERROR:lr,Z_DEFAULT_COMPRESSION:rr,Z_FILTERED:ir,Z_HUFFMAN_ONLY:ri,Z_RLE:Cr,Z_FIXED:li,Z_DEFAULT_STRATEGY:Gr,Z_UNKNOWN:Ci,Z_DEFLATED:ii}=ue,pi=9,es=15,br=8,xi=256+1+29,qr=30,Ki=19,Ti=2*xi+1,Vn=15,Vt=3,ze=258,ut=ze+Vt+1,Pt=32,St=42,zt=57,Et=69,bt=73,nn=91,vn=103,wn=113,ur=666,Dn=1,Zn=2,M=3,N=4,he=3,ve=(l,C)=>(l.msg=ee[C],C),Ke=l=>l*2-(l>4?9:0),rt=l=>{let C=l.length;for(;--C>=0;)l[C]=0},Bt=l=>{let C,p,R,j=l.w_size;C=l.hash_size,R=C;do p=l.head[--R],l.head[R]=p>=j?p-j:0;while(--C);C=j,R=C;do p=l.prev[--R],l.prev[R]=p>=j?p-j:0;while(--C)};let $t=(l,C,p)=>(C<<l.hash_shift^p)&l.hash_mask;const Ut=l=>{const C=l.state;let p=C.pending;p>l.avail_out&&(p=l.avail_out),p!==0&&(l.output.set(C.pending_buf.subarray(C.pending_out,C.pending_out+p),l.next_out),l.next_out+=p,C.pending_out+=p,l.total_out+=p,l.avail_out-=p,C.pending-=p,C.pending===0&&(C.pending_out=0))},Le=(l,C)=>{Qe(l,l.block_start>=0?l.block_start:-1,l.strstart-l.block_start,C),l.block_start=l.strstart,Ut(l.strm)},st=(l,C)=>{l.pending_buf[l.pending++]=C},Ot=(l,C)=>{l.pending_buf[l.pending++]=C>>>8&255,l.pending_buf[l.pending++]=C&255},mn=(l,C,p,R)=>{let j=l.avail_in;return j>R&&(j=R),j===0?0:(l.avail_in-=j,C.set(l.input.subarray(l.next_in,l.next_in+j),p),l.state.wrap===1?l.adler=Xt(l.adler,C,j,p):l.state.wrap===2&&(l.adler=Ie(l.adler,C,j,p)),l.next_in+=j,l.total_in+=j,j)},pn=(l,C)=>{let p=l.max_chain_length,R=l.strstart,j,te,Ye=l.prev_length,Ne=l.nice_match;const rn=l.strstart>l.w_size-ut?l.strstart-(l.w_size-ut):0,Oe=l.window,it=l.w_mask,Pn=l.prev,hn=l.strstart+ze;let Zt=Oe[R+Ye-1],Wn=Oe[R+Ye];l.prev_length>=l.good_match&&(p>>=2),Ne>l.lookahead&&(Ne=l.lookahead);do if(j=C,!(Oe[j+Ye]!==Wn||Oe[j+Ye-1]!==Zt||Oe[j]!==Oe[R]||Oe[++j]!==Oe[R+1])){R+=2,j++;do;while(Oe[++R]===Oe[++j]&&Oe[++R]===Oe[++j]&&Oe[++R]===Oe[++j]&&Oe[++R]===Oe[++j]&&Oe[++R]===Oe[++j]&&Oe[++R]===Oe[++j]&&Oe[++R]===Oe[++j]&&Oe[++R]===Oe[++j]&&R<hn);if(te=ze-(hn-R),R=hn-ze,te>Ye){if(l.match_start=C,Ye=te,te>=Ne)break;Zt=Oe[R+Ye-1],Wn=Oe[R+Ye]}}while((C=Pn[C&it])>rn&&--p!==0);return Ye<=l.lookahead?Ye:l.lookahead},en=l=>{const C=l.w_size;let p,R,j;do{if(R=l.window_size-l.lookahead-l.strstart,l.strstart>=C+(C-ut)&&(l.window.set(l.window.subarray(C,C+C-R),0),l.match_start-=C,l.strstart-=C,l.block_start-=C,l.insert>l.strstart&&(l.insert=l.strstart),Bt(l),R+=C),l.strm.avail_in===0)break;if(p=mn(l.strm,l.window,l.strstart+l.lookahead,R),l.lookahead+=p,l.lookahead+l.insert>=Vt)for(j=l.strstart-l.insert,l.ins_h=l.window[j],l.ins_h=$t(l,l.ins_h,l.window[j+1]);l.insert&&(l.ins_h=$t(l,l.ins_h,l.window[j+Vt-1]),l.prev[j&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=j,j++,l.insert--,!(l.lookahead+l.insert<Vt)););}while(l.lookahead<ut&&l.strm.avail_in!==0)},ln=(l,C)=>{let p=l.pending_buf_size-5>l.w_size?l.w_size:l.pending_buf_size-5,R,j,te,Ye=0,Ne=l.strm.avail_in;do{if(R=65535,te=l.bi_valid+42>>3,l.strm.avail_out<te||(te=l.strm.avail_out-te,j=l.strstart-l.block_start,R>j+l.strm.avail_in&&(R=j+l.strm.avail_in),R>te&&(R=te),R<p&&(R===0&&C!==or||C===Lt||R!==j+l.strm.avail_in)))break;Ye=C===or&&R===j+l.strm.avail_in?1:0,Fe(l,0,0,Ye),l.pending_buf[l.pending-4]=R,l.pending_buf[l.pending-3]=R>>8,l.pending_buf[l.pending-2]=~R,l.pending_buf[l.pending-1]=~R>>8,Ut(l.strm),j&&(j>R&&(j=R),l.strm.output.set(l.window.subarray(l.block_start,l.block_start+j),l.strm.next_out),l.strm.next_out+=j,l.strm.avail_out-=j,l.strm.total_out+=j,l.block_start+=j,R-=j),R&&(mn(l.strm,l.strm.output,l.strm.next_out,R),l.strm.next_out+=R,l.strm.avail_out-=R,l.strm.total_out+=R)}while(Ye===0);return Ne-=l.strm.avail_in,Ne&&(Ne>=l.w_size?(l.matches=2,l.window.set(l.strm.input.subarray(l.strm.next_in-l.w_size,l.strm.next_in),0),l.strstart=l.w_size,l.insert=l.strstart):(l.window_size-l.strstart<=Ne&&(l.strstart-=l.w_size,l.window.set(l.window.subarray(l.w_size,l.w_size+l.strstart),0),l.matches<2&&l.matches++,l.insert>l.strstart&&(l.insert=l.strstart)),l.window.set(l.strm.input.subarray(l.strm.next_in-Ne,l.strm.next_in),l.strstart),l.strstart+=Ne,l.insert+=Ne>l.w_size-l.insert?l.w_size-l.insert:Ne),l.block_start=l.strstart),l.high_water<l.strstart&&(l.high_water=l.strstart),Ye?N:C!==Lt&&C!==or&&l.strm.avail_in===0&&l.strstart===l.block_start?Zn:(te=l.window_size-l.strstart,l.strm.avail_in>te&&l.block_start>=l.w_size&&(l.block_start-=l.w_size,l.strstart-=l.w_size,l.window.set(l.window.subarray(l.w_size,l.w_size+l.strstart),0),l.matches<2&&l.matches++,te+=l.w_size,l.insert>l.strstart&&(l.insert=l.strstart)),te>l.strm.avail_in&&(te=l.strm.avail_in),te&&(mn(l.strm,l.window,l.strstart,te),l.strstart+=te,l.insert+=te>l.w_size-l.insert?l.w_size-l.insert:te),l.high_water<l.strstart&&(l.high_water=l.strstart),te=l.bi_valid+42>>3,te=l.pending_buf_size-te>65535?65535:l.pending_buf_size-te,p=te>l.w_size?l.w_size:te,j=l.strstart-l.block_start,(j>=p||(j||C===or)&&C!==Lt&&l.strm.avail_in===0&&j<=te)&&(R=j>te?te:j,Ye=C===or&&l.strm.avail_in===0&&R===j?1:0,Fe(l,l.block_start,R,Ye),l.block_start+=R,Ut(l.strm)),Ye?M:Dn)},an=(l,C)=>{let p,R;for(;;){if(l.lookahead<ut){if(en(l),l.lookahead<ut&&C===Lt)return Dn;if(l.lookahead===0)break}if(p=0,l.lookahead>=Vt&&(l.ins_h=$t(l,l.ins_h,l.window[l.strstart+Vt-1]),p=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart),p!==0&&l.strstart-p<=l.w_size-ut&&(l.match_length=pn(l,p)),l.match_length>=Vt)if(R=Tt(l,l.strstart-l.match_start,l.match_length-Vt),l.lookahead-=l.match_length,l.match_length<=l.max_lazy_match&&l.lookahead>=Vt){l.match_length--;do l.strstart++,l.ins_h=$t(l,l.ins_h,l.window[l.strstart+Vt-1]),p=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart;while(--l.match_length!==0);l.strstart++}else l.strstart+=l.match_length,l.match_length=0,l.ins_h=l.window[l.strstart],l.ins_h=$t(l,l.ins_h,l.window[l.strstart+1]);else R=Tt(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++;if(R&&(Le(l,!1),l.strm.avail_out===0))return Dn}return l.insert=l.strstart<Vt-1?l.strstart:Vt-1,C===or?(Le(l,!0),l.strm.avail_out===0?M:N):l.sym_next&&(Le(l,!1),l.strm.avail_out===0)?Dn:Zn},En=(l,C)=>{let p,R,j;for(;;){if(l.lookahead<ut){if(en(l),l.lookahead<ut&&C===Lt)return Dn;if(l.lookahead===0)break}if(p=0,l.lookahead>=Vt&&(l.ins_h=$t(l,l.ins_h,l.window[l.strstart+Vt-1]),p=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart),l.prev_length=l.match_length,l.prev_match=l.match_start,l.match_length=Vt-1,p!==0&&l.prev_length<l.max_lazy_match&&l.strstart-p<=l.w_size-ut&&(l.match_length=pn(l,p),l.match_length<=5&&(l.strategy===ir||l.match_length===Vt&&l.strstart-l.match_start>4096)&&(l.match_length=Vt-1)),l.prev_length>=Vt&&l.match_length<=l.prev_length){j=l.strstart+l.lookahead-Vt,R=Tt(l,l.strstart-1-l.prev_match,l.prev_length-Vt),l.lookahead-=l.prev_length-1,l.prev_length-=2;do++l.strstart<=j&&(l.ins_h=$t(l,l.ins_h,l.window[l.strstart+Vt-1]),p=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart);while(--l.prev_length!==0);if(l.match_available=0,l.match_length=Vt-1,l.strstart++,R&&(Le(l,!1),l.strm.avail_out===0))return Dn}else if(l.match_available){if(R=Tt(l,0,l.window[l.strstart-1]),R&&Le(l,!1),l.strstart++,l.lookahead--,l.strm.avail_out===0)return Dn}else l.match_available=1,l.strstart++,l.lookahead--}return l.match_available&&(R=Tt(l,0,l.window[l.strstart-1]),l.match_available=0),l.insert=l.strstart<Vt-1?l.strstart:Vt-1,C===or?(Le(l,!0),l.strm.avail_out===0?M:N):l.sym_next&&(Le(l,!1),l.strm.avail_out===0)?Dn:Zn},Qn=(l,C)=>{let p,R,j,te;const Ye=l.window;for(;;){if(l.lookahead<=ze){if(en(l),l.lookahead<=ze&&C===Lt)return Dn;if(l.lookahead===0)break}if(l.match_length=0,l.lookahead>=Vt&&l.strstart>0&&(j=l.strstart-1,R=Ye[j],R===Ye[++j]&&R===Ye[++j]&&R===Ye[++j])){te=l.strstart+ze;do;while(R===Ye[++j]&&R===Ye[++j]&&R===Ye[++j]&&R===Ye[++j]&&R===Ye[++j]&&R===Ye[++j]&&R===Ye[++j]&&R===Ye[++j]&&j<te);l.match_length=ze-(te-j),l.match_length>l.lookahead&&(l.match_length=l.lookahead)}if(l.match_length>=Vt?(p=Tt(l,1,l.match_length-Vt),l.lookahead-=l.match_length,l.strstart+=l.match_length,l.match_length=0):(p=Tt(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++),p&&(Le(l,!1),l.strm.avail_out===0))return Dn}return l.insert=0,C===or?(Le(l,!0),l.strm.avail_out===0?M:N):l.sym_next&&(Le(l,!1),l.strm.avail_out===0)?Dn:Zn},fn=(l,C)=>{let p;for(;;){if(l.lookahead===0&&(en(l),l.lookahead===0)){if(C===Lt)return Dn;break}if(l.match_length=0,p=Tt(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++,p&&(Le(l,!1),l.strm.avail_out===0))return Dn}return l.insert=0,C===or?(Le(l,!0),l.strm.avail_out===0?M:N):l.sym_next&&(Le(l,!1),l.strm.avail_out===0)?Dn:Zn};function dn(l,C,p,R,j){this.good_length=l,this.max_lazy=C,this.nice_length=p,this.max_chain=R,this.func=j}const $n=[new dn(0,0,0,0,ln),new dn(4,4,8,4,an),new dn(4,5,16,8,an),new dn(4,6,32,32,an),new dn(4,4,16,16,En),new dn(8,16,32,32,En),new dn(8,16,128,128,En),new dn(8,32,128,256,En),new dn(32,128,258,1024,En),new dn(32,258,258,4096,En)],ar=l=>{l.window_size=2*l.w_size,rt(l.head),l.max_lazy_match=$n[l.level].max_lazy,l.good_match=$n[l.level].good_length,l.nice_match=$n[l.level].nice_length,l.max_chain_length=$n[l.level].max_chain,l.strstart=0,l.block_start=0,l.lookahead=0,l.insert=0,l.match_length=l.prev_length=Vt-1,l.match_available=0,l.ins_h=0};function Kn(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ii,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Ti*2),this.dyn_dtree=new Uint16Array((2*qr+1)*2),this.bl_tree=new Uint16Array((2*Ki+1)*2),rt(this.dyn_ltree),rt(this.dyn_dtree),rt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Vn+1),this.heap=new Uint16Array(2*xi+1),rt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*xi+1),rt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Rn=l=>{if(!l)return 1;const C=l.state;return!C||C.strm!==l||C.status!==St&&C.status!==zt&&C.status!==Et&&C.status!==bt&&C.status!==nn&&C.status!==vn&&C.status!==wn&&C.status!==ur?1:0},hr=l=>{if(Rn(l))return ve(l,pr);l.total_in=l.total_out=0,l.data_type=Ci;const C=l.state;return C.pending=0,C.pending_out=0,C.wrap<0&&(C.wrap=-C.wrap),C.status=C.wrap===2?zt:C.wrap?St:wn,l.adler=C.wrap===2?0:1,C.last_flush=-2,me(C),qt},er=l=>{const C=hr(l);return C===qt&&ar(l.state),C},_r=(l,C)=>Rn(l)||l.state.wrap!==2?pr:(l.state.gzhead=C,qt),Rr=(l,C,p,R,j,te)=>{if(!l)return pr;let Ye=1;if(C===rr&&(C=6),R<0?(Ye=0,R=-R):R>15&&(Ye=2,R-=16),j<1||j>pi||p!==ii||R<8||R>15||C<0||C>9||te<0||te>li||R===8&&Ye!==1)return ve(l,pr);R===8&&(R=9);const Ne=new Kn;return l.state=Ne,Ne.strm=l,Ne.status=St,Ne.wrap=Ye,Ne.gzhead=null,Ne.w_bits=R,Ne.w_size=1<<Ne.w_bits,Ne.w_mask=Ne.w_size-1,Ne.hash_bits=j+7,Ne.hash_size=1<<Ne.hash_bits,Ne.hash_mask=Ne.hash_size-1,Ne.hash_shift=~~((Ne.hash_bits+Vt-1)/Vt),Ne.window=new Uint8Array(Ne.w_size*2),Ne.head=new Uint16Array(Ne.hash_size),Ne.prev=new Uint16Array(Ne.w_size),Ne.lit_bufsize=1<<j+6,Ne.pending_buf_size=Ne.lit_bufsize*4,Ne.pending_buf=new Uint8Array(Ne.pending_buf_size),Ne.sym_buf=Ne.lit_bufsize,Ne.sym_end=(Ne.lit_bufsize-1)*3,Ne.level=C,Ne.strategy=te,Ne.method=p,er(l)},Yr=(l,C)=>Rr(l,C,ii,es,br,Gr),kr=(l,C)=>{if(Rn(l)||C>cn||C<0)return l?ve(l,pr):pr;const p=l.state;if(!l.output||l.avail_in!==0&&!l.input||p.status===ur&&C!==or)return ve(l,l.avail_out===0?lr:pr);const R=p.last_flush;if(p.last_flush=C,p.pending!==0){if(Ut(l),l.avail_out===0)return p.last_flush=-1,qt}else if(l.avail_in===0&&Ke(C)<=Ke(R)&&C!==or)return ve(l,lr);if(p.status===ur&&l.avail_in!==0)return ve(l,lr);if(p.status===St&&p.wrap===0&&(p.status=wn),p.status===St){let j=ii+(p.w_bits-8<<4)<<8,te=-1;if(p.strategy>=ri||p.level<2?te=0:p.level<6?te=1:p.level===6?te=2:te=3,j|=te<<6,p.strstart!==0&&(j|=Pt),j+=31-j%31,Ot(p,j),p.strstart!==0&&(Ot(p,l.adler>>>16),Ot(p,l.adler&65535)),l.adler=1,p.status=wn,Ut(l),p.pending!==0)return p.last_flush=-1,qt}if(p.status===zt){if(l.adler=0,st(p,31),st(p,139),st(p,8),p.gzhead)st(p,(p.gzhead.text?1:0)+(p.gzhead.hcrc?2:0)+(p.gzhead.extra?4:0)+(p.gzhead.name?8:0)+(p.gzhead.comment?16:0)),st(p,p.gzhead.time&255),st(p,p.gzhead.time>>8&255),st(p,p.gzhead.time>>16&255),st(p,p.gzhead.time>>24&255),st(p,p.level===9?2:p.strategy>=ri||p.level<2?4:0),st(p,p.gzhead.os&255),p.gzhead.extra&&p.gzhead.extra.length&&(st(p,p.gzhead.extra.length&255),st(p,p.gzhead.extra.length>>8&255)),p.gzhead.hcrc&&(l.adler=Ie(l.adler,p.pending_buf,p.pending,0)),p.gzindex=0,p.status=Et;else if(st(p,0),st(p,0),st(p,0),st(p,0),st(p,0),st(p,p.level===9?2:p.strategy>=ri||p.level<2?4:0),st(p,he),p.status=wn,Ut(l),p.pending!==0)return p.last_flush=-1,qt}if(p.status===Et){if(p.gzhead.extra){let j=p.pending,te=(p.gzhead.extra.length&65535)-p.gzindex;for(;p.pending+te>p.pending_buf_size;){let Ne=p.pending_buf_size-p.pending;if(p.pending_buf.set(p.gzhead.extra.subarray(p.gzindex,p.gzindex+Ne),p.pending),p.pending=p.pending_buf_size,p.gzhead.hcrc&&p.pending>j&&(l.adler=Ie(l.adler,p.pending_buf,p.pending-j,j)),p.gzindex+=Ne,Ut(l),p.pending!==0)return p.last_flush=-1,qt;j=0,te-=Ne}let Ye=new Uint8Array(p.gzhead.extra);p.pending_buf.set(Ye.subarray(p.gzindex,p.gzindex+te),p.pending),p.pending+=te,p.gzhead.hcrc&&p.pending>j&&(l.adler=Ie(l.adler,p.pending_buf,p.pending-j,j)),p.gzindex=0}p.status=bt}if(p.status===bt){if(p.gzhead.name){let j=p.pending,te;do{if(p.pending===p.pending_buf_size){if(p.gzhead.hcrc&&p.pending>j&&(l.adler=Ie(l.adler,p.pending_buf,p.pending-j,j)),Ut(l),p.pending!==0)return p.last_flush=-1,qt;j=0}p.gzindex<p.gzhead.name.length?te=p.gzhead.name.charCodeAt(p.gzindex++)&255:te=0,st(p,te)}while(te!==0);p.gzhead.hcrc&&p.pending>j&&(l.adler=Ie(l.adler,p.pending_buf,p.pending-j,j)),p.gzindex=0}p.status=nn}if(p.status===nn){if(p.gzhead.comment){let j=p.pending,te;do{if(p.pending===p.pending_buf_size){if(p.gzhead.hcrc&&p.pending>j&&(l.adler=Ie(l.adler,p.pending_buf,p.pending-j,j)),Ut(l),p.pending!==0)return p.last_flush=-1,qt;j=0}p.gzindex<p.gzhead.comment.length?te=p.gzhead.comment.charCodeAt(p.gzindex++)&255:te=0,st(p,te)}while(te!==0);p.gzhead.hcrc&&p.pending>j&&(l.adler=Ie(l.adler,p.pending_buf,p.pending-j,j))}p.status=vn}if(p.status===vn){if(p.gzhead.hcrc){if(p.pending+2>p.pending_buf_size&&(Ut(l),p.pending!==0))return p.last_flush=-1,qt;st(p,l.adler&255),st(p,l.adler>>8&255),l.adler=0}if(p.status=wn,Ut(l),p.pending!==0)return p.last_flush=-1,qt}if(l.avail_in!==0||p.lookahead!==0||C!==Lt&&p.status!==ur){let j=p.level===0?ln(p,C):p.strategy===ri?fn(p,C):p.strategy===Cr?Qn(p,C):$n[p.level].func(p,C);if((j===M||j===N)&&(p.status=ur),j===Dn||j===M)return l.avail_out===0&&(p.last_flush=-1),qt;if(j===Zn&&(C===yn?Kt(p):C!==cn&&(Fe(p,0,0,!1),C===qn&&(rt(p.head),p.lookahead===0&&(p.strstart=0,p.block_start=0,p.insert=0))),Ut(l),l.avail_out===0))return p.last_flush=-1,qt}return C!==or?qt:p.wrap<=0?fr:(p.wrap===2?(st(p,l.adler&255),st(p,l.adler>>8&255),st(p,l.adler>>16&255),st(p,l.adler>>24&255),st(p,l.total_in&255),st(p,l.total_in>>8&255),st(p,l.total_in>>16&255),st(p,l.total_in>>24&255)):(Ot(p,l.adler>>>16),Ot(p,l.adler&65535)),Ut(l),p.wrap>0&&(p.wrap=-p.wrap),p.pending!==0?qt:fr)},Ir=l=>{if(Rn(l))return pr;const C=l.state.status;return l.state=null,C===wn?ve(l,Ve):qt},cr=(l,C)=>{let p=C.length;if(Rn(l))return pr;const R=l.state,j=R.wrap;if(j===2||j===1&&R.status!==St||R.lookahead)return pr;if(j===1&&(l.adler=Xt(l.adler,C,p,0)),R.wrap=0,p>=R.w_size){j===0&&(rt(R.head),R.strstart=0,R.block_start=0,R.insert=0);let rn=new Uint8Array(R.w_size);rn.set(C.subarray(p-R.w_size,p),0),C=rn,p=R.w_size}const te=l.avail_in,Ye=l.next_in,Ne=l.input;for(l.avail_in=p,l.next_in=0,l.input=C,en(R);R.lookahead>=Vt;){let rn=R.strstart,Oe=R.lookahead-(Vt-1);do R.ins_h=$t(R,R.ins_h,R.window[rn+Vt-1]),R.prev[rn&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=rn,rn++;while(--Oe);R.strstart=rn,R.lookahead=Vt-1,en(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=Vt-1,R.match_available=0,l.next_in=Ye,l.input=Ne,l.avail_in=te,R.wrap=j,qt};var Fr=Yr,Dr=Rr,Ri=er,Vr=hr,Wr=_r,Lr=kr,Ai=Ir,Hr=cr,Ei="pako deflate (from Nodeca project)",Ii={deflateInit:Fr,deflateInit2:Dr,deflateReset:Ri,deflateResetKeep:Vr,deflateSetHeader:Wr,deflate:Lr,deflateEnd:Ai,deflateSetDictionary:Hr,deflateInfo:Ei};const Yn=(l,C)=>Object.prototype.hasOwnProperty.call(l,C);var ts=function(l){const C=Array.prototype.slice.call(arguments,1);for(;C.length;){const p=C.shift();if(p){if(typeof p!="object")throw new TypeError(p+"must be non-object");for(const R in p)Yn(p,R)&&(l[R]=p[R])}}return l},As=l=>{let C=0;for(let R=0,j=l.length;R<j;R++)C+=l[R].length;const p=new Uint8Array(C);for(let R=0,j=0,te=l.length;R<te;R++){let Ye=l[R];p.set(Ye,j),j+=Ye.length}return p},ki={assign:ts,flattenChunks:As};let Si=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(l){Si=!1}const $i=new Uint8Array(256);for(let l=0;l<256;l++)$i[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;$i[254]=$i[254]=1;var _s=l=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(l);let C,p,R,j,te,Ye=l.length,Ne=0;for(j=0;j<Ye;j++)p=l.charCodeAt(j),(p&64512)===55296&&j+1<Ye&&(R=l.charCodeAt(j+1),(R&64512)===56320&&(p=65536+(p-55296<<10)+(R-56320),j++)),Ne+=p<128?1:p<2048?2:p<65536?3:4;for(C=new Uint8Array(Ne),te=0,j=0;te<Ne;j++)p=l.charCodeAt(j),(p&64512)===55296&&j+1<Ye&&(R=l.charCodeAt(j+1),(R&64512)===56320&&(p=65536+(p-55296<<10)+(R-56320),j++)),p<128?C[te++]=p:p<2048?(C[te++]=192|p>>>6,C[te++]=128|p&63):p<65536?(C[te++]=224|p>>>12,C[te++]=128|p>>>6&63,C[te++]=128|p&63):(C[te++]=240|p>>>18,C[te++]=128|p>>>12&63,C[te++]=128|p>>>6&63,C[te++]=128|p&63);return C};const xs=(l,C)=>{if(C<65534&&l.subarray&&Si)return String.fromCharCode.apply(null,l.length===C?l:l.subarray(0,C));let p="";for(let R=0;R<C;R++)p+=String.fromCharCode(l[R]);return p};var ei=(l,C)=>{const p=C||l.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(l.subarray(0,C));let R,j;const te=new Array(p*2);for(j=0,R=0;R<p;){let Ye=l[R++];if(Ye<128){te[j++]=Ye;continue}let Ne=$i[Ye];if(Ne>4){te[j++]=65533,R+=Ne-1;continue}for(Ye&=Ne===2?31:Ne===3?15:7;Ne>1&&R<p;)Ye=Ye<<6|l[R++]&63,Ne--;if(Ne>1){te[j++]=65533;continue}Ye<65536?te[j++]=Ye:(Ye-=65536,te[j++]=55296|Ye>>10&1023,te[j++]=56320|Ye&1023)}return xs(te,j)},ds=(l,C)=>{C=C||l.length,C>l.length&&(C=l.length);let p=C-1;for(;p>=0&&(l[p]&192)===128;)p--;return p<0||p===0?C:p+$i[l[p]]>C?p:C},ns={string2buf:_s,buf2string:ei,utf8border:ds};function Gi(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var qi=Gi;const Ss=Object.prototype.toString,{Z_NO_FLUSH:Pi,Z_SYNC_FLUSH:hi,Z_FULL_FLUSH:Mi,Z_FINISH:Vi,Z_OK:Wi,Z_STREAM_END:vs,Z_DEFAULT_COMPRESSION:Qs,Z_DEFAULT_STRATEGY:Os,Z_DEFLATED:os}=ue;function Qr(l){this.options=ki.assign({level:Qs,method:os,chunkSize:16384,windowBits:15,memLevel:8,strategy:Os},l||{});let C=this.options;C.raw&&C.windowBits>0?C.windowBits=-C.windowBits:C.gzip&&C.windowBits>0&&C.windowBits<16&&(C.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qi,this.strm.avail_out=0;let p=Ii.deflateInit2(this.strm,C.level,C.method,C.windowBits,C.memLevel,C.strategy);if(p!==Wi)throw new Error(ee[p]);if(C.header&&Ii.deflateSetHeader(this.strm,C.header),C.dictionary){let R;if(typeof C.dictionary=="string"?R=ns.string2buf(C.dictionary):Ss.call(C.dictionary)==="[object ArrayBuffer]"?R=new Uint8Array(C.dictionary):R=C.dictionary,p=Ii.deflateSetDictionary(this.strm,R),p!==Wi)throw new Error(ee[p]);this._dict_set=!0}}Qr.prototype.push=function(l,C){const p=this.strm,R=this.options.chunkSize;let j,te;if(this.ended)return!1;for(C===~~C?te=C:te=C===!0?Vi:Pi,typeof l=="string"?p.input=ns.string2buf(l):Ss.call(l)==="[object ArrayBuffer]"?p.input=new Uint8Array(l):p.input=l,p.next_in=0,p.avail_in=p.input.length;;){if(p.avail_out===0&&(p.output=new Uint8Array(R),p.next_out=0,p.avail_out=R),(te===hi||te===Mi)&&p.avail_out<=6){this.onData(p.output.subarray(0,p.next_out)),p.avail_out=0;continue}if(j=Ii.deflate(p,te),j===vs)return p.next_out>0&&this.onData(p.output.subarray(0,p.next_out)),j=Ii.deflateEnd(this.strm),this.onEnd(j),this.ended=!0,j===Wi;if(p.avail_out===0){this.onData(p.output);continue}if(te>0&&p.next_out>0){this.onData(p.output.subarray(0,p.next_out)),p.avail_out=0;continue}if(p.avail_in===0)break}return!0},Qr.prototype.onData=function(l){this.chunks.push(l)},Qr.prototype.onEnd=function(l){l===Wi&&(this.result=ki.flattenChunks(this.chunks)),this.chunks=[],this.err=l,this.msg=this.strm.msg};function Ln(l,C){const p=new Qr(C);if(p.push(l,!0),p.err)throw p.msg||ee[p.err];return p.result}function Bn(l,C){return C=C||{},C.raw=!0,Ln(l,C)}function vr(l,C){return C=C||{},C.gzip=!0,Ln(l,C)}var ti=Qr,Pr=Ln,ys=Bn,Qi=vr,Bi=ue,Ys={Deflate:ti,deflate:Pr,deflateRaw:ys,gzip:Qi,constants:Bi};const Di=16209,Ga=16191;var ws=function(C,p){let R,j,te,Ye,Ne,rn,Oe,it,Pn,hn,Zt,Wn,si,xr,mr,Kr,gr,An,Tr,bi,Ar,di,Mr,yr;const zr=C.state;R=C.next_in,Mr=C.input,j=R+(C.avail_in-5),te=C.next_out,yr=C.output,Ye=te-(p-C.avail_out),Ne=te+(C.avail_out-257),rn=zr.dmax,Oe=zr.wsize,it=zr.whave,Pn=zr.wnext,hn=zr.window,Zt=zr.hold,Wn=zr.bits,si=zr.lencode,xr=zr.distcode,mr=(1<<zr.lenbits)-1,Kr=(1<<zr.distbits)-1;e:do{Wn<15&&(Zt+=Mr[R++]<<Wn,Wn+=8,Zt+=Mr[R++]<<Wn,Wn+=8),gr=si[Zt&mr];t:for(;;){if(An=gr>>>24,Zt>>>=An,Wn-=An,An=gr>>>16&255,An===0)yr[te++]=gr&65535;else if(An&16){Tr=gr&65535,An&=15,An&&(Wn<An&&(Zt+=Mr[R++]<<Wn,Wn+=8),Tr+=Zt&(1<<An)-1,Zt>>>=An,Wn-=An),Wn<15&&(Zt+=Mr[R++]<<Wn,Wn+=8,Zt+=Mr[R++]<<Wn,Wn+=8),gr=xr[Zt&Kr];n:for(;;){if(An=gr>>>24,Zt>>>=An,Wn-=An,An=gr>>>16&255,An&16){if(bi=gr&65535,An&=15,Wn<An&&(Zt+=Mr[R++]<<Wn,Wn+=8,Wn<An&&(Zt+=Mr[R++]<<Wn,Wn+=8)),bi+=Zt&(1<<An)-1,bi>rn){C.msg="invalid distance too far back",zr.mode=Di;break e}if(Zt>>>=An,Wn-=An,An=te-Ye,bi>An){if(An=bi-An,An>it&&zr.sane){C.msg="invalid distance too far back",zr.mode=Di;break e}if(Ar=0,di=hn,Pn===0){if(Ar+=Oe-An,An<Tr){Tr-=An;do yr[te++]=hn[Ar++];while(--An);Ar=te-bi,di=yr}}else if(Pn<An){if(Ar+=Oe+Pn-An,An-=Pn,An<Tr){Tr-=An;do yr[te++]=hn[Ar++];while(--An);if(Ar=0,Pn<Tr){An=Pn,Tr-=An;do yr[te++]=hn[Ar++];while(--An);Ar=te-bi,di=yr}}}else if(Ar+=Pn-An,An<Tr){Tr-=An;do yr[te++]=hn[Ar++];while(--An);Ar=te-bi,di=yr}for(;Tr>2;)yr[te++]=di[Ar++],yr[te++]=di[Ar++],yr[te++]=di[Ar++],Tr-=3;Tr&&(yr[te++]=di[Ar++],Tr>1&&(yr[te++]=di[Ar++]))}else{Ar=te-bi;do yr[te++]=yr[Ar++],yr[te++]=yr[Ar++],yr[te++]=yr[Ar++],Tr-=3;while(Tr>2);Tr&&(yr[te++]=yr[Ar++],Tr>1&&(yr[te++]=yr[Ar++]))}}else if(An&64){C.msg="invalid distance code",zr.mode=Di;break e}else{gr=xr[(gr&65535)+(Zt&(1<<An)-1)];continue n}break}}else if(An&64)if(An&32){zr.mode=Ga;break e}else{C.msg="invalid literal/length code",zr.mode=Di;break e}else{gr=si[(gr&65535)+(Zt&(1<<An)-1)];continue t}break}}while(R<j&&te<Ne);Tr=Wn>>3,R-=Tr,Wn-=Tr<<3,Zt&=(1<<Wn)-1,C.next_in=R,C.next_out=te,C.avail_in=R<j?5+(j-R):5-(R-j),C.avail_out=te<Ne?257+(Ne-te):257-(te-Ne),zr.hold=Zt,zr.bits=Wn};const rs=15,oi=852,js=592,La=0,ia=1,Es=2,pa=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),gs=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Va=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ls=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var is=(l,C,p,R,j,te,Ye,Ne)=>{const rn=Ne.bits;let Oe=0,it=0,Pn=0,hn=0,Zt=0,Wn=0,si=0,xr=0,mr=0,Kr=0,gr,An,Tr,bi,Ar,di=null,Mr;const yr=new Uint16Array(rs+1),zr=new Uint16Array(rs+1);let ea=null,IA,sA,DA;for(Oe=0;Oe<=rs;Oe++)yr[Oe]=0;for(it=0;it<R;it++)yr[C[p+it]]++;for(Zt=rn,hn=rs;hn>=1&&yr[hn]===0;hn--);if(Zt>hn&&(Zt=hn),hn===0)return j[te++]=1<<24|64<<16|0,j[te++]=1<<24|64<<16|0,Ne.bits=1,0;for(Pn=1;Pn<hn&&yr[Pn]===0;Pn++);for(Zt<Pn&&(Zt=Pn),xr=1,Oe=1;Oe<=rs;Oe++)if(xr<<=1,xr-=yr[Oe],xr<0)return-1;if(xr>0&&(l===La||hn!==1))return-1;for(zr[1]=0,Oe=1;Oe<rs;Oe++)zr[Oe+1]=zr[Oe]+yr[Oe];for(it=0;it<R;it++)C[p+it]!==0&&(Ye[zr[C[p+it]]++]=it);if(l===La?(di=ea=Ye,Mr=20):l===ia?(di=pa,ea=gs,Mr=257):(di=Va,ea=ls,Mr=0),Kr=0,it=0,Oe=Pn,Ar=te,Wn=Zt,si=0,Tr=-1,mr=1<<Zt,bi=mr-1,l===ia&&mr>oi||l===Es&&mr>js)return 1;for(;;){IA=Oe-si,Ye[it]+1<Mr?(sA=0,DA=Ye[it]):Ye[it]>=Mr?(sA=ea[Ye[it]-Mr],DA=di[Ye[it]-Mr]):(sA=96,DA=0),gr=1<<Oe-si,An=1<<Wn,Pn=An;do An-=gr,j[Ar+(Kr>>si)+An]=IA<<24|sA<<16|DA|0;while(An!==0);for(gr=1<<Oe-1;Kr&gr;)gr>>=1;if(gr!==0?(Kr&=gr-1,Kr+=gr):Kr=0,it++,--yr[Oe]===0){if(Oe===hn)break;Oe=C[p+Ye[it]]}if(Oe>Zt&&(Kr&bi)!==Tr){for(si===0&&(si=Zt),Ar+=Pn,Wn=Oe-si,xr=1<<Wn;Wn+si<hn&&(xr-=yr[Wn+si],!(xr<=0));)Wn++,xr<<=1;if(mr+=1<<Wn,l===ia&&mr>oi||l===Es&&mr>js)return 1;Tr=Kr&bi,j[Tr]=Zt<<24|Wn<<16|Ar-te|0}}return Kr!==0&&(j[Ar+Kr]=Oe-si<<24|64<<16|0),Ne.bits=Zt,0};const Ni=0,Fs=1,Wa=2,{Z_FINISH:ma,Z_BLOCK:_a,Z_TREES:Ts,Z_OK:zi,Z_STREAM_END:sa,Z_NEED_DICT:Bs,Z_STREAM_ERROR:us,Z_DATA_ERROR:za,Z_MEM_ERROR:$s,Z_BUF_ERROR:gA,Z_DEFLATED:pA}=ue,va=16180,ss=16181,ya=16182,Za=16183,Ya=16184,aa=16185,ja=16186,mi=16187,ni=16188,ui=16189,Li=16190,Fi=16191,Gs=16192,Aa=16193,Ua=16194,Ra=16195,Ps=16196,Oi=16197,Zi=16198,oa=16199,Nt=16200,Xa=16201,RA=16202,kA=16203,Bo=16204,mA=16205,_A=16206,wa=16207,bo=16208,_i=16209,Xs=16210,Ea=16211,dl=852,gl=592,vA=15,QA=l=>(l>>>24&255)+(l>>>8&65280)+((l&65280)<<8)+((l&255)<<24);function OA(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Vs=l=>{if(!l)return 1;const C=l.state;return!C||C.strm!==l||C.mode<va||C.mode>Ea?1:0},ka=l=>{if(Vs(l))return us;const C=l.state;return l.total_in=l.total_out=C.total=0,l.msg="",C.wrap&&(l.adler=C.wrap&1),C.mode=va,C.last=0,C.havedict=0,C.flags=-1,C.dmax=32768,C.head=null,C.hold=0,C.bits=0,C.lencode=C.lendyn=new Int32Array(dl),C.distcode=C.distdyn=new Int32Array(gl),C.sane=1,C.back=-1,zi},Ja=l=>{if(Vs(l))return us;const C=l.state;return C.wsize=0,C.whave=0,C.wnext=0,ka(l)},PA=(l,C)=>{let p;if(Vs(l))return us;const R=l.state;return C<0?(p=0,C=-C):(p=(C>>4)+5,C<48&&(C&=15)),C&&(C<8||C>15)?us:(R.window!==null&&R.wbits!==C&&(R.window=null),R.wrap=p,R.wbits=C,Ja(l))},MA=(l,C)=>{if(!l)return us;const p=new OA;l.state=p,p.strm=l,p.window=null,p.mode=va;const R=PA(l,C);return R!==zi&&(l.state=null),R},NA=l=>MA(l,vA);let Co=!0,Js,HA;const pl=l=>{if(Co){Js=new Int32Array(512),HA=new Int32Array(32);let C=0;for(;C<144;)l.lens[C++]=8;for(;C<256;)l.lens[C++]=9;for(;C<280;)l.lens[C++]=7;for(;C<288;)l.lens[C++]=8;for(is(Fs,l.lens,0,288,Js,0,l.work,{bits:9}),C=0;C<32;)l.lens[C++]=5;is(Wa,l.lens,0,32,HA,0,l.work,{bits:5}),Co=!1}l.lencode=Js,l.lenbits=9,l.distcode=HA,l.distbits=5},KA=(l,C,p,R)=>{let j;const te=l.state;return te.window===null&&(te.wsize=1<<te.wbits,te.wnext=0,te.whave=0,te.window=new Uint8Array(te.wsize)),R>=te.wsize?(te.window.set(C.subarray(p-te.wsize,p),0),te.wnext=0,te.whave=te.wsize):(j=te.wsize-te.wnext,j>R&&(j=R),te.window.set(C.subarray(p-R,p-R+j),te.wnext),R-=j,R?(te.window.set(C.subarray(p-R,p),0),te.wnext=R,te.whave=te.wsize):(te.wnext+=j,te.wnext===te.wsize&&(te.wnext=0),te.whave<te.wsize&&(te.whave+=j))),0},xo=(l,C)=>{let p,R,j,te,Ye,Ne,rn,Oe,it,Pn,hn,Zt,Wn,si,xr=0,mr,Kr,gr,An,Tr,bi,Ar,di;const Mr=new Uint8Array(4);let yr,zr;const ea=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Vs(l)||!l.output||!l.input&&l.avail_in!==0)return us;p=l.state,p.mode===Fi&&(p.mode=Gs),Ye=l.next_out,j=l.output,rn=l.avail_out,te=l.next_in,R=l.input,Ne=l.avail_in,Oe=p.hold,it=p.bits,Pn=Ne,hn=rn,di=zi;e:for(;;)switch(p.mode){case va:if(p.wrap===0){p.mode=Gs;break}for(;it<16;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if(p.wrap&2&&Oe===35615){p.wbits===0&&(p.wbits=15),p.check=0,Mr[0]=Oe&255,Mr[1]=Oe>>>8&255,p.check=Ie(p.check,Mr,2,0),Oe=0,it=0,p.mode=ss;break}if(p.head&&(p.head.done=!1),!(p.wrap&1)||(((Oe&255)<<8)+(Oe>>8))%31){l.msg="incorrect header check",p.mode=_i;break}if((Oe&15)!==pA){l.msg="unknown compression method",p.mode=_i;break}if(Oe>>>=4,it-=4,Ar=(Oe&15)+8,p.wbits===0&&(p.wbits=Ar),Ar>15||Ar>p.wbits){l.msg="invalid window size",p.mode=_i;break}p.dmax=1<<p.wbits,p.flags=0,l.adler=p.check=1,p.mode=Oe&512?ui:Fi,Oe=0,it=0;break;case ss:for(;it<16;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if(p.flags=Oe,(p.flags&255)!==pA){l.msg="unknown compression method",p.mode=_i;break}if(p.flags&57344){l.msg="unknown header flags set",p.mode=_i;break}p.head&&(p.head.text=Oe>>8&1),p.flags&512&&p.wrap&4&&(Mr[0]=Oe&255,Mr[1]=Oe>>>8&255,p.check=Ie(p.check,Mr,2,0)),Oe=0,it=0,p.mode=ya;case ya:for(;it<32;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}p.head&&(p.head.time=Oe),p.flags&512&&p.wrap&4&&(Mr[0]=Oe&255,Mr[1]=Oe>>>8&255,Mr[2]=Oe>>>16&255,Mr[3]=Oe>>>24&255,p.check=Ie(p.check,Mr,4,0)),Oe=0,it=0,p.mode=Za;case Za:for(;it<16;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}p.head&&(p.head.xflags=Oe&255,p.head.os=Oe>>8),p.flags&512&&p.wrap&4&&(Mr[0]=Oe&255,Mr[1]=Oe>>>8&255,p.check=Ie(p.check,Mr,2,0)),Oe=0,it=0,p.mode=Ya;case Ya:if(p.flags&1024){for(;it<16;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}p.length=Oe,p.head&&(p.head.extra_len=Oe),p.flags&512&&p.wrap&4&&(Mr[0]=Oe&255,Mr[1]=Oe>>>8&255,p.check=Ie(p.check,Mr,2,0)),Oe=0,it=0}else p.head&&(p.head.extra=null);p.mode=aa;case aa:if(p.flags&1024&&(Zt=p.length,Zt>Ne&&(Zt=Ne),Zt&&(p.head&&(Ar=p.head.extra_len-p.length,p.head.extra||(p.head.extra=new Uint8Array(p.head.extra_len)),p.head.extra.set(R.subarray(te,te+Zt),Ar)),p.flags&512&&p.wrap&4&&(p.check=Ie(p.check,R,Zt,te)),Ne-=Zt,te+=Zt,p.length-=Zt),p.length))break e;p.length=0,p.mode=ja;case ja:if(p.flags&2048){if(Ne===0)break e;Zt=0;do Ar=R[te+Zt++],p.head&&Ar&&p.length<65536&&(p.head.name+=String.fromCharCode(Ar));while(Ar&&Zt<Ne);if(p.flags&512&&p.wrap&4&&(p.check=Ie(p.check,R,Zt,te)),Ne-=Zt,te+=Zt,Ar)break e}else p.head&&(p.head.name=null);p.length=0,p.mode=mi;case mi:if(p.flags&4096){if(Ne===0)break e;Zt=0;do Ar=R[te+Zt++],p.head&&Ar&&p.length<65536&&(p.head.comment+=String.fromCharCode(Ar));while(Ar&&Zt<Ne);if(p.flags&512&&p.wrap&4&&(p.check=Ie(p.check,R,Zt,te)),Ne-=Zt,te+=Zt,Ar)break e}else p.head&&(p.head.comment=null);p.mode=ni;case ni:if(p.flags&512){for(;it<16;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if(p.wrap&4&&Oe!==(p.check&65535)){l.msg="header crc mismatch",p.mode=_i;break}Oe=0,it=0}p.head&&(p.head.hcrc=p.flags>>9&1,p.head.done=!0),l.adler=p.check=0,p.mode=Fi;break;case ui:for(;it<32;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}l.adler=p.check=QA(Oe),Oe=0,it=0,p.mode=Li;case Li:if(p.havedict===0)return l.next_out=Ye,l.avail_out=rn,l.next_in=te,l.avail_in=Ne,p.hold=Oe,p.bits=it,Bs;l.adler=p.check=1,p.mode=Fi;case Fi:if(C===_a||C===Ts)break e;case Gs:if(p.last){Oe>>>=it&7,it-=it&7,p.mode=_A;break}for(;it<3;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}switch(p.last=Oe&1,Oe>>>=1,it-=1,Oe&3){case 0:p.mode=Aa;break;case 1:if(pl(p),p.mode=oa,C===Ts){Oe>>>=2,it-=2;break e}break;case 2:p.mode=Ps;break;case 3:l.msg="invalid block type",p.mode=_i}Oe>>>=2,it-=2;break;case Aa:for(Oe>>>=it&7,it-=it&7;it<32;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if((Oe&65535)!==(Oe>>>16^65535)){l.msg="invalid stored block lengths",p.mode=_i;break}if(p.length=Oe&65535,Oe=0,it=0,p.mode=Ua,C===Ts)break e;case Ua:p.mode=Ra;case Ra:if(Zt=p.length,Zt){if(Zt>Ne&&(Zt=Ne),Zt>rn&&(Zt=rn),Zt===0)break e;j.set(R.subarray(te,te+Zt),Ye),Ne-=Zt,te+=Zt,rn-=Zt,Ye+=Zt,p.length-=Zt;break}p.mode=Fi;break;case Ps:for(;it<14;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if(p.nlen=(Oe&31)+257,Oe>>>=5,it-=5,p.ndist=(Oe&31)+1,Oe>>>=5,it-=5,p.ncode=(Oe&15)+4,Oe>>>=4,it-=4,p.nlen>286||p.ndist>30){l.msg="too many length or distance symbols",p.mode=_i;break}p.have=0,p.mode=Oi;case Oi:for(;p.have<p.ncode;){for(;it<3;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}p.lens[ea[p.have++]]=Oe&7,Oe>>>=3,it-=3}for(;p.have<19;)p.lens[ea[p.have++]]=0;if(p.lencode=p.lendyn,p.lenbits=7,yr={bits:p.lenbits},di=is(Ni,p.lens,0,19,p.lencode,0,p.work,yr),p.lenbits=yr.bits,di){l.msg="invalid code lengths set",p.mode=_i;break}p.have=0,p.mode=Zi;case Zi:for(;p.have<p.nlen+p.ndist;){for(;xr=p.lencode[Oe&(1<<p.lenbits)-1],mr=xr>>>24,Kr=xr>>>16&255,gr=xr&65535,!(mr<=it);){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if(gr<16)Oe>>>=mr,it-=mr,p.lens[p.have++]=gr;else{if(gr===16){for(zr=mr+2;it<zr;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if(Oe>>>=mr,it-=mr,p.have===0){l.msg="invalid bit length repeat",p.mode=_i;break}Ar=p.lens[p.have-1],Zt=3+(Oe&3),Oe>>>=2,it-=2}else if(gr===17){for(zr=mr+3;it<zr;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}Oe>>>=mr,it-=mr,Ar=0,Zt=3+(Oe&7),Oe>>>=3,it-=3}else{for(zr=mr+7;it<zr;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}Oe>>>=mr,it-=mr,Ar=0,Zt=11+(Oe&127),Oe>>>=7,it-=7}if(p.have+Zt>p.nlen+p.ndist){l.msg="invalid bit length repeat",p.mode=_i;break}for(;Zt--;)p.lens[p.have++]=Ar}}if(p.mode===_i)break;if(p.lens[256]===0){l.msg="invalid code -- missing end-of-block",p.mode=_i;break}if(p.lenbits=9,yr={bits:p.lenbits},di=is(Fs,p.lens,0,p.nlen,p.lencode,0,p.work,yr),p.lenbits=yr.bits,di){l.msg="invalid literal/lengths set",p.mode=_i;break}if(p.distbits=6,p.distcode=p.distdyn,yr={bits:p.distbits},di=is(Wa,p.lens,p.nlen,p.ndist,p.distcode,0,p.work,yr),p.distbits=yr.bits,di){l.msg="invalid distances set",p.mode=_i;break}if(p.mode=oa,C===Ts)break e;case oa:p.mode=Nt;case Nt:if(Ne>=6&&rn>=258){l.next_out=Ye,l.avail_out=rn,l.next_in=te,l.avail_in=Ne,p.hold=Oe,p.bits=it,ws(l,hn),Ye=l.next_out,j=l.output,rn=l.avail_out,te=l.next_in,R=l.input,Ne=l.avail_in,Oe=p.hold,it=p.bits,p.mode===Fi&&(p.back=-1);break}for(p.back=0;xr=p.lencode[Oe&(1<<p.lenbits)-1],mr=xr>>>24,Kr=xr>>>16&255,gr=xr&65535,!(mr<=it);){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if(Kr&&!(Kr&240)){for(An=mr,Tr=Kr,bi=gr;xr=p.lencode[bi+((Oe&(1<<An+Tr)-1)>>An)],mr=xr>>>24,Kr=xr>>>16&255,gr=xr&65535,!(An+mr<=it);){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}Oe>>>=An,it-=An,p.back+=An}if(Oe>>>=mr,it-=mr,p.back+=mr,p.length=gr,Kr===0){p.mode=mA;break}if(Kr&32){p.back=-1,p.mode=Fi;break}if(Kr&64){l.msg="invalid literal/length code",p.mode=_i;break}p.extra=Kr&15,p.mode=Xa;case Xa:if(p.extra){for(zr=p.extra;it<zr;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}p.length+=Oe&(1<<p.extra)-1,Oe>>>=p.extra,it-=p.extra,p.back+=p.extra}p.was=p.length,p.mode=RA;case RA:for(;xr=p.distcode[Oe&(1<<p.distbits)-1],mr=xr>>>24,Kr=xr>>>16&255,gr=xr&65535,!(mr<=it);){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if(!(Kr&240)){for(An=mr,Tr=Kr,bi=gr;xr=p.distcode[bi+((Oe&(1<<An+Tr)-1)>>An)],mr=xr>>>24,Kr=xr>>>16&255,gr=xr&65535,!(An+mr<=it);){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}Oe>>>=An,it-=An,p.back+=An}if(Oe>>>=mr,it-=mr,p.back+=mr,Kr&64){l.msg="invalid distance code",p.mode=_i;break}p.offset=gr,p.extra=Kr&15,p.mode=kA;case kA:if(p.extra){for(zr=p.extra;it<zr;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}p.offset+=Oe&(1<<p.extra)-1,Oe>>>=p.extra,it-=p.extra,p.back+=p.extra}if(p.offset>p.dmax){l.msg="invalid distance too far back",p.mode=_i;break}p.mode=Bo;case Bo:if(rn===0)break e;if(Zt=hn-rn,p.offset>Zt){if(Zt=p.offset-Zt,Zt>p.whave&&p.sane){l.msg="invalid distance too far back",p.mode=_i;break}Zt>p.wnext?(Zt-=p.wnext,Wn=p.wsize-Zt):Wn=p.wnext-Zt,Zt>p.length&&(Zt=p.length),si=p.window}else si=j,Wn=Ye-p.offset,Zt=p.length;Zt>rn&&(Zt=rn),rn-=Zt,p.length-=Zt;do j[Ye++]=si[Wn++];while(--Zt);p.length===0&&(p.mode=Nt);break;case mA:if(rn===0)break e;j[Ye++]=p.length,rn--,p.mode=Nt;break;case _A:if(p.wrap){for(;it<32;){if(Ne===0)break e;Ne--,Oe|=R[te++]<<it,it+=8}if(hn-=rn,l.total_out+=hn,p.total+=hn,p.wrap&4&&hn&&(l.adler=p.check=p.flags?Ie(p.check,j,hn,Ye-hn):Xt(p.check,j,hn,Ye-hn)),hn=rn,p.wrap&4&&(p.flags?Oe:QA(Oe))!==p.check){l.msg="incorrect data check",p.mode=_i;break}Oe=0,it=0}p.mode=wa;case wa:if(p.wrap&&p.flags){for(;it<32;){if(Ne===0)break e;Ne--,Oe+=R[te++]<<it,it+=8}if(p.wrap&4&&Oe!==(p.total&4294967295)){l.msg="incorrect length check",p.mode=_i;break}Oe=0,it=0}p.mode=bo;case bo:di=sa;break e;case _i:di=za;break e;case Xs:return $s;case Ea:default:return us}return l.next_out=Ye,l.avail_out=rn,l.next_in=te,l.avail_in=Ne,p.hold=Oe,p.bits=it,(p.wsize||hn!==l.avail_out&&p.mode<_i&&(p.mode<_A||C!==ma))&&KA(l,l.output,l.next_out,hn-l.avail_out),Pn-=l.avail_in,hn-=l.avail_out,l.total_in+=Pn,l.total_out+=hn,p.total+=hn,p.wrap&4&&hn&&(l.adler=p.check=p.flags?Ie(p.check,j,hn,l.next_out-hn):Xt(p.check,j,hn,l.next_out-hn)),l.data_type=p.bits+(p.last?64:0)+(p.mode===Fi?128:0)+(p.mode===oa||p.mode===Ua?256:0),(Pn===0&&hn===0||C===ma)&&di===zi&&(di=gA),di},ml=l=>{if(Vs(l))return us;let C=l.state;return C.window&&(C.window=null),l.state=null,zi},So=(l,C)=>{if(Vs(l))return us;const p=l.state;return p.wrap&2?(p.head=C,C.done=!1,zi):us},_l=(l,C)=>{const p=C.length;let R,j,te;return Vs(l)||(R=l.state,R.wrap!==0&&R.mode!==Li)?us:R.mode===Li&&(j=1,j=Xt(j,C,p,0),j!==R.check)?za:(te=KA(l,C,p,p),te?(R.mode=Xs,$s):(R.havedict=1,zi))};var vl=Ja,$A=PA,yl=ka,yA=NA,wl=MA,El=xo,Fo=ml,Bl=So,bl=_l,GA="pako inflate (from Nodeca project)",Is={inflateReset:vl,inflateReset2:$A,inflateResetKeep:yl,inflateInit:yA,inflateInit2:wl,inflate:El,inflateEnd:Fo,inflateGetHeader:Bl,inflateSetDictionary:bl,inflateInfo:GA};function wA(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Cl=wA;const VA=Object.prototype.toString,{Z_NO_FLUSH:To,Z_FINISH:xl,Z_OK:Ba,Z_STREAM_END:ji,Z_NEED_DICT:Ds,Z_STREAM_ERROR:WA,Z_DATA_ERROR:Io,Z_MEM_ERROR:EA}=ue;function qa(l){this.options=ki.assign({chunkSize:1024*64,windowBits:15,to:""},l||{});const C=this.options;C.raw&&C.windowBits>=0&&C.windowBits<16&&(C.windowBits=-C.windowBits,C.windowBits===0&&(C.windowBits=-15)),C.windowBits>=0&&C.windowBits<16&&!(l&&l.windowBits)&&(C.windowBits+=32),C.windowBits>15&&C.windowBits<48&&(C.windowBits&15||(C.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qi,this.strm.avail_out=0;let p=Is.inflateInit2(this.strm,C.windowBits);if(p!==Ba)throw new Error(ee[p]);if(this.header=new Cl,Is.inflateGetHeader(this.strm,this.header),C.dictionary&&(typeof C.dictionary=="string"?C.dictionary=ns.string2buf(C.dictionary):VA.call(C.dictionary)==="[object ArrayBuffer]"&&(C.dictionary=new Uint8Array(C.dictionary)),C.raw&&(p=Is.inflateSetDictionary(this.strm,C.dictionary),p!==Ba)))throw new Error(ee[p])}qa.prototype.push=function(l,C){const p=this.strm,R=this.options.chunkSize,j=this.options.dictionary;let te,Ye,Ne;if(this.ended)return!1;for(C===~~C?Ye=C:Ye=C===!0?xl:To,VA.call(l)==="[object ArrayBuffer]"?p.input=new Uint8Array(l):p.input=l,p.next_in=0,p.avail_in=p.input.length;;){for(p.avail_out===0&&(p.output=new Uint8Array(R),p.next_out=0,p.avail_out=R),te=Is.inflate(p,Ye),te===Ds&&j&&(te=Is.inflateSetDictionary(p,j),te===Ba?te=Is.inflate(p,Ye):te===Io&&(te=Ds));p.avail_in>0&&te===ji&&p.state.wrap>0&&l[p.next_in]!==0;)Is.inflateReset(p),te=Is.inflate(p,Ye);switch(te){case WA:case Io:case Ds:case EA:return this.onEnd(te),this.ended=!0,!1}if(Ne=p.avail_out,p.next_out&&(p.avail_out===0||te===ji))if(this.options.to==="string"){let rn=ns.utf8border(p.output,p.next_out),Oe=p.next_out-rn,it=ns.buf2string(p.output,rn);p.next_out=Oe,p.avail_out=R-Oe,Oe&&p.output.set(p.output.subarray(rn,rn+Oe),0),this.onData(it)}else this.onData(p.output.length===p.next_out?p.output:p.output.subarray(0,p.next_out));if(!(te===Ba&&Ne===0)){if(te===ji)return te=Is.inflateEnd(this.strm),this.onEnd(te),this.ended=!0,!0;if(p.avail_in===0)break}}return!0},qa.prototype.onData=function(l){this.chunks.push(l)},qa.prototype.onEnd=function(l){l===Ba&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ki.flattenChunks(this.chunks)),this.chunks=[],this.err=l,this.msg=this.strm.msg};function zA(l,C){const p=new qa(C);if(p.push(l),p.err)throw p.msg||ee[p.err];return p.result}function Sl(l,C){return C=C||{},C.raw=!0,zA(l,C)}var Fl=qa,Do=zA,Lo=Sl,ZA=zA,Uo=ue,Ro={Inflate:Fl,inflate:Do,inflateRaw:Lo,ungzip:ZA,constants:Uo};const{Deflate:ko,deflate:Tl,deflateRaw:Qo,gzip:eA}=Ys,{Inflate:Oo,inflate:Il,inflateRaw:Po,ungzip:Dl}=Ro;var Mo=ko,Ll=Tl,No=Qo,tA=eA,YA=Oo,Ho=Il,Xi=Po,vi=Dl,jA=ue,fu={Deflate:Mo,deflate:Ll,deflateRaw:No,gzip:tA,Inflate:YA,inflate:Ho,inflateRaw:Xi,ungzip:vi,constants:jA};const Ko=[];for(let l=0;l<256;l++){let C=l;for(let p=0;p<8;p++)C&1?C=3988292384^C>>>1:C=C>>>1;Ko[l]=C}const BA=4294967295;function XA(l,C,p){let R=l;for(let j=0;j<p;j++)R=Ko[(R^C[j])&255]^R>>>8;return R}function la(l,C){return(XA(BA,l,C)^BA)>>>0}function $o(l,C,p){const R=l.readUint32(),j=la(new Uint8Array(l.buffer,l.byteOffset+l.offset-C-4,C),C);if(j!==R)throw new Error(`CRC mismatch for chunk ${p}. Expected ${R}, found ${j}`)}function ba(l,C){l.writeUint32(la(new Uint8Array(l.buffer,l.byteOffset+l.offset-C,C),C))}function ct(l,C,p){for(let R=0;R<p;R++)C[R]=l[R]}function JA(l,C,p,R){let j=0;for(;j<R;j++)C[j]=l[j];for(;j<p;j++)C[j]=l[j]+C[j-R]&255}function bA(l,C,p,R){let j=0;if(p.length===0)for(;j<R;j++)C[j]=l[j];else for(;j<R;j++)C[j]=l[j]+p[j]&255}function Go(l,C,p,R,j){let te=0;if(p.length===0){for(;te<j;te++)C[te]=l[te];for(;te<R;te++)C[te]=l[te]+(C[te-j]>>1)&255}else{for(;te<j;te++)C[te]=l[te]+(p[te]>>1)&255;for(;te<R;te++)C[te]=l[te]+(C[te-j]+p[te]>>1)&255}}function Ca(l,C,p,R,j){let te=0;if(p.length===0){for(;te<j;te++)C[te]=l[te];for(;te<R;te++)C[te]=l[te]+C[te-j]&255}else{for(;te<j;te++)C[te]=l[te]+p[te]&255;for(;te<R;te++)C[te]=l[te]+On(C[te-j],p[te],p[te-j])&255}}function On(l,C,p){const R=l+C-p,j=Math.abs(R-l),te=Math.abs(R-C),Ye=Math.abs(R-p);return j<=te&&j<=Ye?l:te<=Ye?C:p}function Ul(l,C,p,R,j,te){switch(l){case 0:ct(C,p,j);break;case 1:JA(C,p,j,te);break;case 2:bA(C,p,R,j);break;case 3:Go(C,p,R,j,te);break;case 4:Ca(C,p,R,j,te);break;default:throw new Error(`Unsupported filter: ${l}`)}}const Rl=new Uint16Array([255]),Ws=new Uint8Array(Rl.buffer)[0]===255;function Qa(l){const{data:C,width:p,height:R,channels:j,depth:te}=l,Ye=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],Ne=Math.ceil(te/8)*j,rn=new Uint8Array(R*p*Ne);let Oe=0;for(let it=0;it<7;it++){const Pn=Ye[it],hn=Math.ceil((p-Pn.x)/Pn.xStep),Zt=Math.ceil((R-Pn.y)/Pn.yStep);if(hn<=0||Zt<=0)continue;const Wn=hn*Ne,si=new Uint8Array(Wn);for(let xr=0;xr<Zt;xr++){const mr=C[Oe++],Kr=C.subarray(Oe,Oe+Wn);Oe+=Wn;const gr=new Uint8Array(Wn);Ul(mr,Kr,gr,si,Wn,Ne),si.set(gr);for(let An=0;An<hn;An++){const Tr=Pn.x+An*Pn.xStep,bi=Pn.y+xr*Pn.yStep;if(!(Tr>=p||bi>=R))for(let Ar=0;Ar<Ne;Ar++)rn[(bi*p+Tr)*Ne+Ar]=gr[An*Ne+Ar]}}}if(te===16){const it=new Uint16Array(rn.buffer);if(Ws)for(let Pn=0;Pn<it.length;Pn++)it[Pn]=CA(it[Pn]);return it}else return rn}function CA(l){return(l&255)<<8|l>>8&255}const Oa=new Uint16Array([255]),Ls=new Uint8Array(Oa.buffer)[0]===255,kl=new Uint8Array(0);function qA(l){const{data:C,width:p,height:R,channels:j,depth:te}=l,Ye=Math.ceil(te/8)*j,Ne=Math.ceil(te/8*j*p),rn=new Uint8Array(R*Ne);let Oe=kl,it=0,Pn,hn;for(let Zt=0;Zt<R;Zt++){switch(Pn=C.subarray(it+1,it+1+Ne),hn=rn.subarray(Zt*Ne,(Zt+1)*Ne),C[it]){case 0:ct(Pn,hn,Ne);break;case 1:JA(Pn,hn,Ne,Ye);break;case 2:bA(Pn,hn,Oe,Ne);break;case 3:Go(Pn,hn,Oe,Ne,Ye);break;case 4:Ca(Pn,hn,Oe,Ne,Ye);break;default:throw new Error(`Unsupported filter: ${C[it]}`)}Oe=hn,it+=Ne+1}if(te===16){const Zt=new Uint16Array(rn.buffer);if(Ls)for(let Wn=0;Wn<Zt.length;Wn++)Zt[Wn]=ua(Zt[Wn]);return Zt}else return rn}function ua(l){return(l&255)<<8|l>>8&255}const xa=Uint8Array.of(137,80,78,71,13,10,26,10);function nA(l){l.writeBytes(xa)}function Wo(l){if(!eo(l.readBytes(xa.length)))throw new Error("wrong PNG signature")}function eo(l){if(l.length<xa.length)return!1;for(let C=0;C<xa.length;C++)if(l[C]!==xa[C])return!1;return!0}const zs="tEXt",Sa=0,to=new TextDecoder("latin1");function zo(l){if(Ma(l),l.length===0||l.length>79)throw new Error("keyword length must be between 1 and 79")}const no=/^[\u0000-\u00FF]*$/;function Ma(l){if(!no.test(l))throw new Error("invalid latin1 text")}function Ql(l,C,p){const R=ro(C);l[R]=Zo(C,p-R.length-1)}function hu(l,C,p){zo(C),Ma(p);const R=C.length+1+p.length;l.writeUint32(R),l.writeChars(zs),l.writeChars(C),l.writeByte(Sa),l.writeChars(p),writeCrc(l,R+4)}function ro(l){for(l.mark();l.readByte()!==Sa;);const C=l.offset;l.reset();const p=to.decode(l.readBytes(C-l.offset-1));return l.skip(1),zo(p),p}function Zo(l,C){return to.decode(l.readBytes(C))}const cs={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},io={UNKNOWN:-1,DEFLATE:0},xA={UNKNOWN:-1,ADAPTIVE:0},SA={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},qs={NONE:0,BACKGROUND:1,PREVIOUS:2},rA={SOURCE:0,OVER:1};class FA extends Se{constructor(p,R={}){super(p);fi(this,"_checkCrc");fi(this,"_inflator");fi(this,"_png");fi(this,"_apng");fi(this,"_end");fi(this,"_hasPalette");fi(this,"_palette");fi(this,"_hasTransparency");fi(this,"_transparency");fi(this,"_compressionMethod");fi(this,"_filterMethod");fi(this,"_interlaceMethod");fi(this,"_colorType");fi(this,"_isAnimated");fi(this,"_numberOfFrames");fi(this,"_numberOfPlays");fi(this,"_frames");fi(this,"_writingDataChunks");const{checkCrc:j=!1}=R;this._checkCrc=j,this._inflator=new YA,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=io.UNKNOWN,this._filterMethod=xA.UNKNOWN,this._interlaceMethod=SA.UNKNOWN,this._colorType=cs.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Wo(this);!this._end;){const p=this.readUint32(),R=this.readChars(4);this.decodeChunk(p,R)}return this.decodeImage(),this._png}decodeApng(){for(Wo(this);!this._end;){const p=this.readUint32(),R=this.readChars(4);this.decodeApngChunk(p,R)}return this.decodeApngImage(),this._apng}decodeChunk(p,R){const j=this.offset;switch(R){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(p);break;case"IDAT":this.decodeIDAT(p);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(p);break;case"iCCP":this.decodeiCCP(p);break;case zs:Ql(this._png.text,this,p);break;case"pHYs":this.decodepHYs();break;default:this.skip(p);break}if(this.offset-j!==p)throw new Error(`Length mismatch while decoding chunk ${R}`);this._checkCrc?$o(this,p+4,R):this.skip(4)}decodeApngChunk(p,R){const j=this.offset;switch(R!=="fdAT"&&R!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),R){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(p);break;default:this.decodeChunk(p,R),this.offset=j+p;break}if(this.offset-j!==p)throw new Error(`Length mismatch while decoding chunk ${R}`);this._checkCrc?$o(this,p+4,R):this.skip(4)}decodeIHDR(){const p=this._png;p.width=this.readUint32(),p.height=this.readUint32(),p.depth=Ol(this.readUint8());const R=this.readUint8();this._colorType=R;let j;switch(R){case cs.GREYSCALE:j=1;break;case cs.TRUECOLOUR:j=3;break;case cs.INDEXED_COLOUR:j=1;break;case cs.GREYSCALE_ALPHA:j=2;break;case cs.TRUECOLOUR_ALPHA:j=4;break;case cs.UNKNOWN:default:throw new Error(`Unknown color type: ${R}`)}if(this._png.channels=j,this._compressionMethod=this.readUint8(),this._compressionMethod!==io.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const p={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(p)}decodePLTE(p){if(p%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${p}`);const R=p/3;this._hasPalette=!0;const j=[];this._palette=j;for(let te=0;te<R;te++)j.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(p){this._writingDataChunks=!0;const R=p,j=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,j,R)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(p)}decodeFDAT(p){this._writingDataChunks=!0;let R=p,j=this.offset+this.byteOffset;if(j+=4,R-=4,this._inflator.push(new Uint8Array(this.buffer,j,R)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(p)}decodetRNS(p){switch(this._colorType){case cs.GREYSCALE:case cs.TRUECOLOUR:{if(p%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${p}`);if(p/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${p/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(p/2);for(let R=0;R<p/2;R++)this._transparency[R]=this.readUint16();break}case cs.INDEXED_COLOUR:{if(p>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${p} vs ${this._palette.length})`);let R=0;for(;R<p;R++){const j=this.readByte();this._palette[R].push(j)}for(;R<this._palette.length;R++)this._palette[R].push(255);break}case cs.UNKNOWN:case cs.GREYSCALE_ALPHA:case cs.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(p){const R=ro(this),j=this.readUint8();if(j!==io.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${j}`);const te=this.readBytes(p-R.length-2);this._png.iccEmbeddedProfile={name:R,profile:Ho(te)}}decodepHYs(){const p=this.readUint32(),R=this.readUint32(),j=this.readByte();this._png.resolution={x:p,y:R,unit:j}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let p=0;p<this._numberOfFrames;p++){const R={sequenceNumber:this._frames[p].sequenceNumber,delayNumber:this._frames[p].delayNumber,delayDenominator:this._frames[p].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},j=this._frames.at(p);if(j){if(j.data=qA({data:j.data,width:j.width,height:j.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),p===0||j.xOffset===0&&j.yOffset===0&&j.width===this._png.width&&j.height===this._png.height)R.data=j.data;else{const te=this._apng.frames.at(p-1);this.disposeFrame(j,te,R),this.addFrameDataToCanvas(R,j)}this._apng.frames.push(R)}}return this._apng}disposeFrame(p,R,j){switch(p.disposeOp){case qs.NONE:break;case qs.BACKGROUND:for(let te=0;te<this._png.height;te++)for(let Ye=0;Ye<this._png.width;Ye++){const Ne=(te*p.width+Ye)*this._png.channels;for(let rn=0;rn<this._png.channels;rn++)j.data[Ne+rn]=0}break;case qs.PREVIOUS:j.data.set(R.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(p,R){const j=1<<this._png.depth,te=(Ye,Ne)=>{const rn=((Ye+R.yOffset)*this._png.width+R.xOffset+Ne)*this._png.channels,Oe=(Ye*R.width+Ne)*this._png.channels;return{index:rn,frameIndex:Oe}};switch(R.blendOp){case rA.SOURCE:for(let Ye=0;Ye<R.height;Ye++)for(let Ne=0;Ne<R.width;Ne++){const{index:rn,frameIndex:Oe}=te(Ye,Ne);for(let it=0;it<this._png.channels;it++)p.data[rn+it]=R.data[Oe+it]}break;case rA.OVER:for(let Ye=0;Ye<R.height;Ye++)for(let Ne=0;Ne<R.width;Ne++){const{index:rn,frameIndex:Oe}=te(Ye,Ne);for(let it=0;it<this._png.channels;it++){const Pn=R.data[Oe+this._png.channels-1]/j,hn=it%(this._png.channels-1)===0?1:R.data[Oe+it],Zt=Math.floor(Pn*hn+(1-Pn)*p.data[rn+it]);p.data[rn+it]+=Zt}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var R;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const p=this._isAnimated?((R=this._frames)==null?void 0:R.at(0)).data:this._inflator.result;if(this._filterMethod!==xA.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===SA.NO_INTERLACE)this._png.data=qA({data:p,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===SA.ADAM7)this._png.data=Qa({data:p,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const p=this._inflator.result,R=this._frames.at(-1);R?R.data=p:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:qs.NONE,blendOp:rA.SOURCE,data:p}),this._inflator=new YA,this._writingDataChunks=!1}}function Ol(l){if(l!==1&&l!==2&&l!==4&&l!==8&&l!==16)throw new Error(`invalid bit depth: ${l}`);return l}const TA={level:3};class so extends null{constructor(p,R={}){var j;super();fi(this,"_png");fi(this,"_zlibOptions");fi(this,"_colorType");fi(this,"_interlaceMethod");this._colorType=ColorType.UNKNOWN,this._zlibOptions=kc(kc({},TA),R.zlib),this._png=this._checkData(p),this._interlaceMethod=(j=R.interlace==="Adam7"?InterlaceMethod.ADAM7:InterlaceMethod.NO_INTERLACE)!=null?j:InterlaceMethod.NO_INTERLACE,this.setBigEndian()}encode(){if(writeSignature(this),this.encodeIHDR(),this._png.palette&&(this.encodePLTE(),this._png.palette[0].length===4&&this.encodeTRNS()),this.encodeData(),this._png.text)for(const[p,R]of Object.entries(this._png.text))encodetEXt(this,p,R);return this.encodeIEND(),this.toArray()}encodeIHDR(){this.writeUint32(13),this.writeChars("IHDR"),this.writeUint32(this._png.width),this.writeUint32(this._png.height),this.writeByte(this._png.depth),this.writeByte(this._colorType),this.writeByte(CompressionMethod.DEFLATE),this.writeByte(FilterMethod.ADAPTIVE),this.writeByte(this._interlaceMethod),writeCrc(this,17)}encodeIEND(){this.writeUint32(0),this.writeChars("IEND"),writeCrc(this,4)}encodePLTE(){var R;const p=((R=this._png.palette)==null?void 0:R.length)*3;this.writeUint32(p),this.writeChars("PLTE");for(const j of this._png.palette)this.writeByte(j[0]),this.writeByte(j[1]),this.writeByte(j[2]);writeCrc(this,4+p)}encodeTRNS(){const p=this._png.palette.filter(R=>R.at(-1)!==255);this.writeUint32(p.length),this.writeChars("tRNS");for(const R of p)this.writeByte(R.at(-1));writeCrc(this,4+p.length)}encodeIDAT(p){this.writeUint32(p.length),this.writeChars("IDAT"),this.writeBytes(p),writeCrc(this,p.length+4)}encodeData(){const{width:p,height:R,channels:j,depth:te,data:Ye}=this._png,Ne=te<=8?Math.ceil(p*te/8)*j:Math.ceil(p*te/8*j/2),rn=new IOBuffer().setBigEndian();let Oe=0;if(this._interlaceMethod===InterlaceMethod.NO_INTERLACE)for(let hn=0;hn<R;hn++)rn.writeByte(0),te===16?Oe=iA(Ye,rn,Ne,Oe):Oe=jo(Ye,rn,Ne,Oe);else this._interlaceMethod===InterlaceMethod.ADAM7&&(Oe=Xo(this._png,Ye,rn,Oe));const it=rn.toArray(),Pn=deflate(it,this._zlibOptions);this.encodeIDAT(Pn)}_checkData(p){const{colorType:R,channels:j,depth:te}=Yo(p,p.palette),Ye={width:ao(p.width,"width"),height:ao(p.height,"height"),channels:j,data:p.data,depth:te,text:p.text,palette:p.palette};this._colorType=R;const Ne=te<8?Math.ceil(Ye.width*te/8)*Ye.height*j:Ye.width*Ye.height*j;if(Ye.data.length!==Ne)throw new RangeError(`wrong data size. Found ${Ye.data.length}, expected ${Ne}`);return Ye}}function ao(l,C){if(Number.isInteger(l)&&l>0)return l;throw new TypeError(`${C} must be a positive integer`)}function Yo(l,C){const{channels:p=4,depth:R=8}=l;if(p!==4&&p!==3&&p!==2&&p!==1)throw new RangeError(`unsupported number of channels: ${p}`);const j={channels:p,depth:R,colorType:ColorType.UNKNOWN};switch(p){case 4:j.colorType=ColorType.TRUECOLOUR_ALPHA;break;case 3:j.colorType=ColorType.TRUECOLOUR;break;case 1:C?j.colorType=ColorType.INDEXED_COLOUR:j.colorType=ColorType.GREYSCALE;break;case 2:j.colorType=ColorType.GREYSCALE_ALPHA;break;default:throw new Error("unsupported number of channels")}return j}function jo(l,C,p,R){for(let j=0;j<p;j++)C.writeByte(l[R++]);return R}function Xo(l,C,p,R){const j=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],{width:te,height:Ye,channels:Ne,depth:rn}=l;let Oe=0;rn===16?Oe=Ne*rn/8/2:Oe=Ne*rn/8;for(let it=0;it<7;it++){const Pn=j[it],hn=Math.floor((te-Pn.x+Pn.xStep-1)/Pn.xStep),Zt=Math.floor((Ye-Pn.y+Pn.yStep-1)/Pn.yStep);if(hn<=0||Zt<=0)continue;const Wn=hn*Oe;for(let si=0;si<Zt;si++){const xr=Pn.y+si*Pn.yStep,mr=rn<=8?new Uint8Array(Wn):new Uint16Array(Wn);let Kr=0;for(let gr=0;gr<hn;gr++){const An=Pn.x+gr*Pn.xStep;if(An<te&&xr<Ye){const Tr=(xr*te+An)*Oe;for(let bi=0;bi<Oe;bi++)mr[Kr++]=C[Tr+bi]}}if(p.writeByte(0),rn===8)p.writeBytes(mr);else if(rn===16)for(const gr of mr)p.writeByte(gr>>8&255),p.writeByte(gr&255)}}return R}function iA(l,C,p,R){for(let j=0;j<p;j++)C.writeUint16(l[R++]);return R}var Na;(function(l){l[l.UNKNOWN=0]="UNKNOWN",l[l.METRE=1]="METRE"})(Na||(Na={}));function Pl(l,C){return new FA(l,C).decode()}function ps(l,C){return new PngEncoder(l,C).encode()}function du(l,C){return new PngDecoder(l,C).decodeApng()}},6330:function(kn,Ft,Y){"use strict";Y.d(Ft,{iZ:function(){return cn}});var re={},Te=function(M,N,he,ve,Ke){var rt=new Worker(re[N]||(re[N]=URL.createObjectURL(new Blob([M+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return rt.onmessage=function(Bt){var Ct=Bt.data,$t=Ct.$e$;if($t){var Ut=new Error($t[0]);Ut.code=$t[1],Ut.stack=$t[2],Ke(Ut,null)}else Ke(null,Ct)},rt.postMessage(he,ve),rt},He=Uint8Array,xe=Uint16Array,ne=Int32Array,y=new He([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Se=new He([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),V=new He([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=function(M,N){for(var he=new xe(31),ve=0;ve<31;++ve)he[ve]=N+=1<<M[ve-1];for(var Ke=new ne(he[30]),ve=1;ve<30;++ve)for(var rt=he[ve];rt<he[ve+1];++rt)Ke[rt]=rt-he[ve]<<5|ve;return{b:he,r:Ke}},le=o(y,2),O=le.b,B=le.r;O[28]=258,B[258]=28;for(var E=o(Se,0),F=E.b,L=E.r,Ae=new xe(32768),Z=0;Z<32768;++Z){var J=(Z&43690)>>1|(Z&21845)<<1;J=(J&52428)>>2|(J&13107)<<2,J=(J&61680)>>4|(J&3855)<<4,Ae[Z]=((J&65280)>>8|(J&255)<<8)>>1}for(var H=function(M,N,he){for(var ve=M.length,Ke=0,rt=new xe(N);Ke<ve;++Ke)M[Ke]&&++rt[M[Ke]-1];var Bt=new xe(N);for(Ke=1;Ke<N;++Ke)Bt[Ke]=Bt[Ke-1]+rt[Ke-1]<<1;var Ct;if(he){Ct=new xe(1<<N);var $t=15-N;for(Ke=0;Ke<ve;++Ke)if(M[Ke])for(var Ut=Ke<<4|M[Ke],Le=N-M[Ke],st=Bt[M[Ke]-1]++<<Le,Ot=st|(1<<Le)-1;st<=Ot;++st)Ct[Ae[st]>>$t]=Ut}else for(Ct=new xe(ve),Ke=0;Ke<ve;++Ke)M[Ke]&&(Ct[Ke]=Ae[Bt[M[Ke]-1]++]>>15-M[Ke]);return Ct},z=new He(288),Z=0;Z<144;++Z)z[Z]=8;for(var Z=144;Z<256;++Z)z[Z]=9;for(var Z=256;Z<280;++Z)z[Z]=7;for(var Z=280;Z<288;++Z)z[Z]=8;for(var oe=new He(32),Z=0;Z<32;++Z)oe[Z]=5;var be=H(z,9,0),De=null,ke=H(oe,5,0),ge=null,Ue=function(M){for(var N=M[0],he=1;he<M.length;++he)M[he]>N&&(N=M[he]);return N},Je=function(M,N,he){var ve=N/8|0;return(M[ve]|M[ve+1]<<8)>>(N&7)&he},Be=function(M,N){var he=N/8|0;return(M[he]|M[he+1]<<8|M[he+2]<<16)>>(N&7)},nt=function(M){return(M+7)/8|0},ie=function(M,N,he){return(N==null||N<0)&&(N=0),(he==null||he>M.length)&&(he=M.length),new He(M.subarray(N,he))},Q={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},q=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],se=function(M,N,he){var ve=new Error(N||q[M]);if(ve.code=M,Error.captureStackTrace&&Error.captureStackTrace(ve,se),!he)throw ve;return ve},de=function(M,N,he,ve){var Ke=M.length,rt=ve?ve.length:0;if(!Ke||N.f&&!N.l)return he||new He(0);var Bt=!he,Ct=Bt||N.i!=2,$t=N.i;Bt&&(he=new He(Ke*3));var Ut=function(ki){var Si=he.length;if(ki>Si){var $i=new He(Math.max(Si*2,ki));$i.set(he),he=$i}},Le=N.f||0,st=N.p||0,Ot=N.b||0,mn=N.l,pn=N.d,en=N.m,ln=N.n,an=Ke*8;do{if(!mn){Le=Je(M,st,1);var En=Je(M,st+1,3);if(st+=3,En)if(En==1)mn=De,pn=ge,en=9,ln=5;else if(En==2){var $n=Je(M,st,31)+257,ar=Je(M,st+10,15)+4,Kn=$n+Je(M,st+5,31)+1;st+=14;for(var Rn=new He(Kn),hr=new He(19),er=0;er<ar;++er)hr[V[er]]=Je(M,st+er*3,7);st+=ar*3;for(var _r=Ue(hr),Rr=(1<<_r)-1,Yr=H(hr,_r,1),er=0;er<Kn;){var kr=Yr[Je(M,st,Rr)];st+=kr&15;var Qn=kr>>4;if(Qn<16)Rn[er++]=Qn;else{var Ir=0,cr=0;for(Qn==16?(cr=3+Je(M,st,3),st+=2,Ir=Rn[er-1]):Qn==17?(cr=3+Je(M,st,7),st+=3):Qn==18&&(cr=11+Je(M,st,127),st+=7);cr--;)Rn[er++]=Ir}}var Fr=Rn.subarray(0,$n),Dr=Rn.subarray($n);en=Ue(Fr),ln=Ue(Dr),mn=H(Fr,en,1),pn=H(Dr,ln,1)}else se(1);else{var Qn=nt(st)+4,fn=M[Qn-4]|M[Qn-3]<<8,dn=Qn+fn;if(dn>Ke){$t&&se(0);break}Ct&&Ut(Ot+fn),he.set(M.subarray(Qn,dn),Ot),N.b=Ot+=fn,N.p=st=dn*8,N.f=Le;continue}if(st>an){$t&&se(0);break}}Ct&&Ut(Ot+131072);for(var Ri=(1<<en)-1,Vr=(1<<ln)-1,Wr=st;;Wr=st){var Ir=mn[Be(M,st)&Ri],Lr=Ir>>4;if(st+=Ir&15,st>an){$t&&se(0);break}if(Ir||se(2),Lr<256)he[Ot++]=Lr;else if(Lr==256){Wr=st,mn=null;break}else{var Ai=Lr-254;if(Lr>264){var er=Lr-257,Hr=y[er];Ai=Je(M,st,(1<<Hr)-1)+O[er],st+=Hr}var Ei=pn[Be(M,st)&Vr],Ii=Ei>>4;Ei||se(3),st+=Ei&15;var Dr=F[Ii];if(Ii>3){var Hr=Se[Ii];Dr+=Be(M,st)&(1<<Hr)-1,st+=Hr}if(st>an){$t&&se(0);break}Ct&&Ut(Ot+131072);var Yn=Ot+Ai;if(Ot<Dr){var ts=rt-Dr,As=Math.min(Dr,Yn);for(ts+Ot<0&&se(3);Ot<As;++Ot)he[Ot]=ve[ts+Ot]}for(;Ot<Yn;++Ot)he[Ot]=he[Ot-Dr]}}N.l=mn,N.p=Wr,N.b=Ot,N.f=Le,mn&&(Le=1,N.m=en,N.d=pn,N.n=ln)}while(!Le);return Ot!=he.length&&Bt?ie(he,0,Ot):he.subarray(0,Ot)},fe=function(M,N,he){he<<=N&7;var ve=N/8|0;M[ve]|=he,M[ve+1]|=he>>8},b=function(M,N,he){he<<=N&7;var ve=N/8|0;M[ve]|=he,M[ve+1]|=he>>8,M[ve+2]|=he>>16},S=function(M,N){for(var he=[],ve=0;ve<M.length;++ve)M[ve]&&he.push({s:ve,f:M[ve]});var Ke=he.length,rt=he.slice();if(!Ke)return{t:sn,l:0};if(Ke==1){var Bt=new He(he[0].s+1);return Bt[he[0].s]=1,{t:Bt,l:1}}he.sort(function(dn,$n){return dn.f-$n.f}),he.push({s:-1,f:25001});var Ct=he[0],$t=he[1],Ut=0,Le=1,st=2;for(he[0]={s:-1,f:Ct.f+$t.f,l:Ct,r:$t};Le!=Ke-1;)Ct=he[he[Ut].f<he[st].f?Ut++:st++],$t=he[Ut!=Le&&he[Ut].f<he[st].f?Ut++:st++],he[Le++]={s:-1,f:Ct.f+$t.f,l:Ct,r:$t};for(var Ot=rt[0].s,ve=1;ve<Ke;++ve)rt[ve].s>Ot&&(Ot=rt[ve].s);var mn=new xe(Ot+1),pn=W(he[Le-1],mn,0);if(pn>N){var ve=0,en=0,ln=pn-N,an=1<<ln;for(rt.sort(function($n,ar){return mn[ar.s]-mn[$n.s]||$n.f-ar.f});ve<Ke;++ve){var En=rt[ve].s;if(mn[En]>N)en+=an-(1<<pn-mn[En]),mn[En]=N;else break}for(en>>=ln;en>0;){var Qn=rt[ve].s;mn[Qn]<N?en-=1<<N-mn[Qn]++-1:++ve}for(;ve>=0&&en;--ve){var fn=rt[ve].s;mn[fn]==N&&(--mn[fn],++en)}pn=N}return{t:new He(mn),l:pn}},W=function(M,N,he){return M.s==-1?Math.max(W(M.l,N,he+1),W(M.r,N,he+1)):N[M.s]=he},_e=function(M){for(var N=M.length;N&&!M[--N];);for(var he=new xe(++N),ve=0,Ke=M[0],rt=1,Bt=function($t){he[ve++]=$t},Ct=1;Ct<=N;++Ct)if(M[Ct]==Ke&&Ct!=N)++rt;else{if(!Ke&&rt>2){for(;rt>138;rt-=138)Bt(32754);rt>2&&(Bt(rt>10?rt-11<<5|28690:rt-3<<5|12305),rt=0)}else if(rt>3){for(Bt(Ke),--rt;rt>6;rt-=6)Bt(8304);rt>2&&(Bt(rt-3<<5|8208),rt=0)}for(;rt--;)Bt(Ke);rt=1,Ke=M[Ct]}return{c:he.subarray(0,ve),n:N}},qe=function(M,N){for(var he=0,ve=0;ve<N.length;++ve)he+=M[ve]*N[ve];return he},mt=function(M,N,he){var ve=he.length,Ke=nt(N+2);M[Ke]=ve&255,M[Ke+1]=ve>>8,M[Ke+2]=M[Ke]^255,M[Ke+3]=M[Ke+1]^255;for(var rt=0;rt<ve;++rt)M[Ke+rt+4]=he[rt];return(Ke+4+ve)*8},Gt=function(M,N,he,ve,Ke,rt,Bt,Ct,$t,Ut,Le){fe(N,Le++,he),++Ke[256];for(var st=S(Ke,15),Ot=st.t,mn=st.l,pn=S(rt,15),en=pn.t,ln=pn.l,an=_e(Ot),En=an.c,Qn=an.n,fn=_e(en),dn=fn.c,$n=fn.n,ar=new xe(19),Kn=0;Kn<En.length;++Kn)++ar[En[Kn]&31];for(var Kn=0;Kn<dn.length;++Kn)++ar[dn[Kn]&31];for(var Rn=S(ar,7),hr=Rn.t,er=Rn.l,_r=19;_r>4&&!hr[V[_r-1]];--_r);var Rr=Ut+5<<3,Yr=qe(Ke,z)+qe(rt,oe)+Bt,kr=qe(Ke,Ot)+qe(rt,en)+Bt+14+3*_r+qe(ar,hr)+2*ar[16]+3*ar[17]+7*ar[18];if($t>=0&&Rr<=Yr&&Rr<=kr)return mt(N,Le,M.subarray($t,$t+Ut));var Ir,cr,Fr,Dr;if(fe(N,Le,1+(kr<Yr)),Le+=2,kr<Yr){Ir=H(Ot,mn,0),cr=Ot,Fr=H(en,ln,0),Dr=en;var Ri=H(hr,er,0);fe(N,Le,Qn-257),fe(N,Le+5,$n-1),fe(N,Le+10,_r-4),Le+=14;for(var Kn=0;Kn<_r;++Kn)fe(N,Le+3*Kn,hr[V[Kn]]);Le+=3*_r;for(var Vr=[En,dn],Wr=0;Wr<2;++Wr)for(var Lr=Vr[Wr],Kn=0;Kn<Lr.length;++Kn){var Ai=Lr[Kn]&31;fe(N,Le,Ri[Ai]),Le+=hr[Ai],Ai>15&&(fe(N,Le,Lr[Kn]>>5&127),Le+=Lr[Kn]>>12)}}else Ir=be,cr=z,Fr=ke,Dr=oe;for(var Kn=0;Kn<Ct;++Kn){var Hr=ve[Kn];if(Hr>255){var Ai=Hr>>18&31;b(N,Le,Ir[Ai+257]),Le+=cr[Ai+257],Ai>7&&(fe(N,Le,Hr>>23&31),Le+=y[Ai]);var Ei=Hr&31;b(N,Le,Fr[Ei]),Le+=Dr[Ei],Ei>3&&(b(N,Le,Hr>>5&8191),Le+=Se[Ei])}else b(N,Le,Ir[Hr]),Le+=cr[Hr]}return b(N,Le,Ir[256]),Le+cr[256]},Qt=new ne([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sn=new He(0),Wt=function(M,N,he,ve,Ke,rt){var Bt=rt.z||M.length,Ct=new He(ve+Bt+5*(1+Math.ceil(Bt/7e3))+Ke),$t=Ct.subarray(ve,Ct.length-Ke),Ut=rt.l,Le=(rt.r||0)&7;if(N){Le&&($t[0]=rt.r>>3);for(var st=Qt[N-1],Ot=st>>13,mn=st&8191,pn=(1<<he)-1,en=rt.p||new xe(32768),ln=rt.h||new xe(pn+1),an=Math.ceil(he/3),En=2*an,Qn=function(_s){return(M[_s]^M[_s+1]<<an^M[_s+2]<<En)&pn},fn=new ne(25e3),dn=new xe(288),$n=new xe(32),ar=0,Kn=0,Rn=rt.i||0,hr=0,er=rt.w||0,_r=0;Rn+2<Bt;++Rn){var Rr=Qn(Rn),Yr=Rn&32767,kr=ln[Rr];if(en[Yr]=kr,ln[Rr]=Yr,er<=Rn){var Ir=Bt-Rn;if((ar>7e3||hr>24576)&&(Ir>423||!Ut)){Le=Gt(M,$t,0,fn,dn,$n,Kn,hr,_r,Rn-_r,Le),hr=ar=Kn=0,_r=Rn;for(var cr=0;cr<286;++cr)dn[cr]=0;for(var cr=0;cr<30;++cr)$n[cr]=0}var Fr=2,Dr=0,Ri=mn,Vr=Yr-kr&32767;if(Ir>2&&Rr==Qn(Rn-Vr))for(var Wr=Math.min(Ot,Ir)-1,Lr=Math.min(32767,Rn),Ai=Math.min(258,Ir);Vr<=Lr&&--Ri&&Yr!=kr;){if(M[Rn+Fr]==M[Rn+Fr-Vr]){for(var Hr=0;Hr<Ai&&M[Rn+Hr]==M[Rn+Hr-Vr];++Hr);if(Hr>Fr){if(Fr=Hr,Dr=Vr,Hr>Wr)break;for(var Ei=Math.min(Vr,Hr-2),Ii=0,cr=0;cr<Ei;++cr){var Yn=Rn-Vr+cr&32767,ts=en[Yn],As=Yn-ts&32767;As>Ii&&(Ii=As,kr=Yn)}}}Yr=kr,kr=en[Yr],Vr+=Yr-kr&32767}if(Dr){fn[hr++]=268435456|B[Fr]<<18|L[Dr];var ki=B[Fr]&31,Si=L[Dr]&31;Kn+=y[ki]+Se[Si],++dn[257+ki],++$n[Si],er=Rn+Fr,++ar}else fn[hr++]=M[Rn],++dn[M[Rn]]}}for(Rn=Math.max(Rn,er);Rn<Bt;++Rn)fn[hr++]=M[Rn],++dn[M[Rn]];Le=Gt(M,$t,Ut,fn,dn,$n,Kn,hr,_r,Rn-_r,Le),Ut||(rt.r=Le&7|$t[Le/8|0]<<3,Le-=7,rt.h=ln,rt.p=en,rt.i=Rn,rt.w=er)}else{for(var Rn=rt.w||0;Rn<Bt+Ut;Rn+=65535){var $i=Rn+65535;$i>=Bt&&($t[Le/8|0]=Ut,$i=Bt),Le=mt($t,Le+1,M.subarray(Rn,$i))}rt.i=Bt}return ie(Ct,0,ve+nt(Le)+Ke)},kt=null,Xe=function(){var M=-1;return{p:function(N){for(var he=M,ve=0;ve<N.length;++ve)he=kt[he&255^N[ve]]^he>>>8;M=he},d:function(){return~M}}},dt=function(){var M=1,N=0;return{p:function(he){for(var ve=M,Ke=N,rt=he.length|0,Bt=0;Bt!=rt;){for(var Ct=Math.min(Bt+2655,rt);Bt<Ct;++Bt)Ke+=ve+=he[Bt];ve=(ve&65535)+15*(ve>>16),Ke=(Ke&65535)+15*(Ke>>16)}M=ve,N=Ke},d:function(){return M%=65521,N%=65521,(M&255)<<24|(M&65280)<<8|(N&255)<<8|N>>8}}},ot=function(M,N,he,ve,Ke){if(!Ke&&(Ke={l:1},N.dictionary)){var rt=N.dictionary.subarray(-32768),Bt=new He(rt.length+M.length);Bt.set(rt),Bt.set(M,rt.length),M=Bt,Ke.w=rt.length}return Wt(M,N.level==null?6:N.level,N.mem==null?Ke.l?Math.ceil(Math.max(8,Math.min(13,Math.log(M.length)))*1.5):20:12+N.mem,he,ve,Ke)},ft=function(M,N){var he={};for(var ve in M)he[ve]=M[ve];for(var ve in N)he[ve]=N[ve];return he},tn=function(M,N,he){for(var ve=M(),Ke=M.toString(),rt=Ke.slice(Ke.indexOf("[")+1,Ke.lastIndexOf("]")).replace(/\s+/g,"").split(","),Bt=0;Bt<ve.length;++Bt){var Ct=ve[Bt],$t=rt[Bt];if(typeof Ct=="function"){N+=";"+$t+"=";var Ut=Ct.toString();if(Ct.prototype)if(Ut.indexOf("[native code]")!=-1){var Le=Ut.indexOf(" ",8)+1;N+=Ut.slice(Le,Ut.indexOf("(",Le))}else{N+=Ut;for(var st in Ct.prototype)N+=";"+$t+".prototype."+st+"="+Ct.prototype[st].toString()}else N+=Ut}else he[$t]=Ct}return N},Re=null,P=function(M){var N=[];for(var he in M)M[he].buffer&&N.push((M[he]=new M[he].constructor(M[he])).buffer);return N},v=function(M,N,he,ve){if(!Re[he]){for(var Ke="",rt={},Bt=M.length-1,Ct=0;Ct<Bt;++Ct)Ke=tn(M[Ct],Ke,rt);Re[he]={c:tn(M[Bt],Ke,rt),e:rt}}var $t=ft({},Re[he].e);return Te(Re[he].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+N.toString()+"}",he,$t,P($t),ve)},T=function(){return[He,xe,ne,y,Se,V,O,F,De,ge,Ae,q,H,Ue,Je,Be,nt,ie,se,de,Ie,We,lt]},X=function(){return[He,xe,ne,y,Se,V,B,L,be,z,ke,oe,Ae,Qt,sn,H,fe,b,S,W,_e,qe,mt,Gt,nt,ie,Wt,ot,Xt,We]},k=function(){return[gt,un,At,Xe,kt]},K=function(){return[It,Ht]},ce=function(){return[Yt,At,dt]},Me=function(){return[_n]},We=function(M){return postMessage(M,[M.buffer])},lt=function(M){return M&&{out:M.size&&new He(M.size),dictionary:M.dictionary}},ht=function(M,N,he,ve,Ke,rt){var Bt=v(he,ve,Ke,function(Ct,$t){Bt.terminate(),rt(Ct,$t)});return Bt.postMessage([M,N],N.consume?[M.buffer]:[]),function(){Bt.terminate()}},jt=function(M){return M.ondata=function(N,he){return postMessage([N,he],[N.buffer])},function(N){N.data.length?(M.push(N.data[0],N.data[1]),postMessage([N.data[0].length])):M.flush()}},vt=function(M,N,he,ve,Ke,rt,Bt){var Ct,$t=v(M,ve,Ke,function(Ut,Le){Ut?($t.terminate(),N.ondata.call(N,Ut)):Array.isArray(Le)?Le.length==1?(N.queuedSize-=Le[0],N.ondrain&&N.ondrain(Le[0])):(Le[1]&&$t.terminate(),N.ondata.call(N,Ut,Le[0],Le[1])):Bt(Le)});$t.postMessage(he),N.queuedSize=0,N.push=function(Ut,Le){N.ondata||se(5),Ct&&N.ondata(se(4,0,1),null,!!Le),N.queuedSize+=Ut.length,$t.postMessage([Ut,Ct=Le],[Ut.buffer])},N.terminate=function(){$t.terminate()},rt&&(N.flush=function(){$t.postMessage([])})},Rt=function(M,N){return M[N]|M[N+1]<<8},yt=function(M,N){return(M[N]|M[N+1]<<8|M[N+2]<<16|M[N+3]<<24)>>>0},xt=function(M,N){return yt(M,N)+yt(M,N+4)*4294967296},At=function(M,N,he){for(;he;++N)M[N]=he,he>>>=8},gt=function(M,N){var he=N.filename;if(M[0]=31,M[1]=139,M[2]=8,M[8]=N.level<2?4:N.level==9?2:0,M[9]=3,N.mtime!=0&&At(M,4,Math.floor(new Date(N.mtime||Date.now())/1e3)),he){M[3]=8;for(var ve=0;ve<=he.length;++ve)M[ve+10]=he.charCodeAt(ve)}},It=function(M){(M[0]!=31||M[1]!=139||M[2]!=8)&&se(6,"invalid gzip data");var N=M[3],he=10;N&4&&(he+=(M[10]|M[11]<<8)+2);for(var ve=(N>>3&1)+(N>>4&1);ve>0;ve-=!M[he++]);return he+(N&2)},Ht=function(M){var N=M.length;return(M[N-4]|M[N-3]<<8|M[N-2]<<16|M[N-1]<<24)>>>0},un=function(M){return 10+(M.filename?M.filename.length+1:0)},Yt=function(M,N){var he=N.level,ve=he==0?0:he<6?1:he==9?3:2;if(M[0]=120,M[1]=ve<<6|(N.dictionary&&32),M[1]|=31-(M[0]<<8|M[1])%31,N.dictionary){var Ke=dt();Ke.p(N.dictionary),At(M,2,Ke.d())}},_n=function(M,N){return((M[0]&15)!=8||M[0]>>4>7||(M[0]<<8|M[1])%31)&&se(6,"invalid zlib data"),(M[1]>>5&1)==+!N&&se(6,"invalid zlib data: "+(M[1]&32?"need":"unexpected")+" dictionary"),(M[1]>>3&4)+2};function on(M,N){return typeof M=="function"&&(N=M,M={}),this.ondata=N,M}var Un=null,Gn=null;function dr(M,N,he){return he||(he=N,N={}),typeof he!="function"&&se(7),ht(M,N,[X],function(ve){return We(Xt(ve.data[0],ve.data[1]))},0,he)}function Xt(M,N){return ot(M,N||{},0,0)}var Cn=null,Ge=null;function Pe(M,N,he){return he||(he=N,N={}),typeof he!="function"&&se(7),ht(M,N,[T],function(ve){return We(Ie(ve.data[0],lt(ve.data[1])))},1,he)}function Ie(M,N){return de(M,{i:2},N&&N.out,N&&N.dictionary)}var ee=null,ue=null;function me(M,N,he){return he||(he=N,N={}),typeof he!="function"&&se(7),ht(M,N,[X,k,function(){return[Fe]}],function(ve){return We(Fe(ve.data[0],ve.data[1]))},2,he)}function Fe(M,N){N||(N={});var he=Xe(),ve=M.length;he.p(M);var Ke=ot(M,N,un(N),8),rt=Ke.length;return gt(Ke,N),At(Ke,rt-8,he.d()),At(Ke,rt-4,ve),Ke}var Qe=null,Tt=null;function Kt(M,N,he){return he||(he=N,N={}),typeof he!="function"&&se(7),ht(M,N,[T,K,function(){return[Lt]}],function(ve){return We(Lt(ve.data[0],ve.data[1]))},3,he)}function Lt(M,N){var he=It(M);return he+8>M.length&&se(6,"invalid gzip data"),de(M.subarray(he,-8),{i:2},N&&N.out||new He(Ht(M)),N&&N.dictionary)}var yn=null,qn=null;function or(M,N,he){return he||(he=N,N={}),typeof he!="function"&&se(7),ht(M,N,[X,ce,function(){return[cn]}],function(ve){return We(cn(ve.data[0],ve.data[1]))},4,he)}function cn(M,N){N||(N={});var he=dt();he.p(M);var ve=ot(M,N,N.dictionary?6:2,4);return Yt(ve,N),At(ve,ve.length-4,he.d()),ve}var qt=null,fr=null;function pr(M,N,he){return he||(he=N,N={}),typeof he!="function"&&se(7),ht(M,N,[T,Me,function(){return[Ve]}],function(ve){return We(Ve(ve.data[0],lt(ve.data[1])))},5,he)}function Ve(M,N){return de(M.subarray(_n(M,N&&N.dictionary),-4),{i:2},N&&N.out,N&&N.dictionary)}var lr=null,rr=null;function ir(M,N,he){return he||(he=N,N={}),typeof he!="function"&&se(7),M[0]==31&&M[1]==139&&M[2]==8?Kt(M,N,he):(M[0]&15)!=8||M[0]>>4>7||(M[0]<<8|M[1])%31?Pe(M,N,he):pr(M,N,he)}function ri(M,N){return M[0]==31&&M[1]==139&&M[2]==8?Lt(M,N):(M[0]&15)!=8||M[0]>>4>7||(M[0]<<8|M[1])%31?Ie(M,N):Ve(M,N)}var Cr=function(M,N,he,ve){for(var Ke in M){var rt=M[Ke],Bt=N+Ke,Ct=ve;Array.isArray(rt)&&(Ct=ft(ve,rt[1]),rt=rt[0]),rt instanceof He?he[Bt]=[rt,Ct]:(he[Bt+="/"]=[new He(0),Ct],Cr(rt,Bt,he,ve))}},li=typeof TextEncoder!="undefined"&&new TextEncoder,Gr=typeof TextDecoder!="undefined"&&new TextDecoder,Ci=0;try{Gr.decode(sn,{stream:!0}),Ci=1}catch(M){}var ii=function(M){for(var N="",he=0;;){var ve=M[he++],Ke=(ve>127)+(ve>223)+(ve>239);if(he+Ke>M.length)return{s:N,r:ie(M,he-1)};Ke?Ke==3?(ve=((ve&15)<<18|(M[he++]&63)<<12|(M[he++]&63)<<6|M[he++]&63)-65536,N+=String.fromCharCode(55296|ve>>10,56320|ve&1023)):Ke&1?N+=String.fromCharCode((ve&31)<<6|M[he++]&63):N+=String.fromCharCode((ve&15)<<12|(M[he++]&63)<<6|M[he++]&63):N+=String.fromCharCode(ve)}},pi=null,es=null;function br(M,N){if(N){for(var he=new He(M.length),ve=0;ve<M.length;++ve)he[ve]=M.charCodeAt(ve);return he}if(li)return li.encode(M);for(var Ke=M.length,rt=new He(M.length+(M.length>>1)),Bt=0,Ct=function(Le){rt[Bt++]=Le},ve=0;ve<Ke;++ve){if(Bt+5>rt.length){var $t=new He(Bt+8+(Ke-ve<<1));$t.set(rt),rt=$t}var Ut=M.charCodeAt(ve);Ut<128||N?Ct(Ut):Ut<2048?(Ct(192|Ut>>6),Ct(128|Ut&63)):Ut>55295&&Ut<57344?(Ut=65536+(Ut&1047552)|M.charCodeAt(++ve)&1023,Ct(240|Ut>>18),Ct(128|Ut>>12&63),Ct(128|Ut>>6&63),Ct(128|Ut&63)):(Ct(224|Ut>>12),Ct(128|Ut>>6&63),Ct(128|Ut&63))}return ie(rt,0,Bt)}function Sr(M,N){if(N){for(var he="",ve=0;ve<M.length;ve+=16384)he+=String.fromCharCode.apply(null,M.subarray(ve,ve+16384));return he}else{if(Gr)return Gr.decode(M);var Ke=ii(M),rt=Ke.s,he=Ke.r;return he.length&&se(8),rt}}var Nr=function(M){return M==1?3:M<6?2:M==9?1:0},xi=function(M,N){return N+30+Rt(M,N+26)+Rt(M,N+28)},qr=function(M,N,he){var ve=Rt(M,N+28),Ke=Sr(M.subarray(N+46,N+46+ve),!(Rt(M,N+8)&2048)),rt=N+46+ve,Bt=yt(M,N+20),Ct=he&&Bt==4294967295?Ki(M,rt):[Bt,yt(M,N+24),yt(M,N+42)],$t=Ct[0],Ut=Ct[1],Le=Ct[2];return[Rt(M,N+10),$t,Ut,Ke,rt+Rt(M,N+30)+Rt(M,N+32),Le]},Ki=function(M,N){for(;Rt(M,N)!=1;N+=4+Rt(M,N+2));return[xt(M,N+12),xt(M,N+4),xt(M,N+20)]},Ti=function(M){var N=0;if(M)for(var he in M){var ve=M[he].length;ve>65535&&se(9),N+=ve+4}return N},Vn=function(M,N,he,ve,Ke,rt,Bt,Ct){var $t=ve.length,Ut=he.extra,Le=Ct&&Ct.length,st=Ti(Ut);At(M,N,Bt!=null?33639248:67324752),N+=4,Bt!=null&&(M[N++]=20,M[N++]=he.os),M[N]=20,N+=2,M[N++]=he.flag<<1|(rt<0&&8),M[N++]=Ke&&8,M[N++]=he.compression&255,M[N++]=he.compression>>8;var Ot=new Date(he.mtime==null?Date.now():he.mtime),mn=Ot.getFullYear()-1980;if((mn<0||mn>119)&&se(10),At(M,N,mn<<25|Ot.getMonth()+1<<21|Ot.getDate()<<16|Ot.getHours()<<11|Ot.getMinutes()<<5|Ot.getSeconds()>>1),N+=4,rt!=-1&&(At(M,N,he.crc),At(M,N+4,rt<0?-rt-2:rt),At(M,N+8,he.size)),At(M,N+12,$t),At(M,N+14,st),N+=16,Bt!=null&&(At(M,N,Le),At(M,N+6,he.attrs),At(M,N+10,Bt),N+=14),M.set(ve,N),N+=$t,st)for(var pn in Ut){var en=Ut[pn],ln=en.length;At(M,N,+pn),At(M,N+2,ln),M.set(en,N+4),N+=4+ln}return Le&&(M.set(Ct,N),N+=Le),N},Vt=function(M,N,he,ve,Ke){At(M,N,101010256),At(M,N+8,he),At(M,N+10,he),At(M,N+12,ve),At(M,N+16,Ke)},ze=null,ut=null,Pt=null,St=null;function zt(M,N,he){he||(he=N,N={}),typeof he!="function"&&se(7);var ve={};Cr(M,"",ve,N);var Ke=Object.keys(ve),rt=Ke.length,Bt=0,Ct=0,$t=rt,Ut=new Array(rt),Le=[],st=function(){for(var ln=0;ln<Le.length;++ln)Le[ln]()},Ot=function(ln,an){ur(function(){he(ln,an)})};ur(function(){Ot=he});var mn=function(){var ln=new He(Ct+22),an=Bt,En=Ct-Bt;Ct=0;for(var Qn=0;Qn<$t;++Qn){var fn=Ut[Qn];try{var dn=fn.c.length;Vn(ln,Ct,fn,fn.f,fn.u,dn);var $n=30+fn.f.length+Ti(fn.extra),ar=Ct+$n;ln.set(fn.c,ar),Vn(ln,Bt,fn,fn.f,fn.u,dn,Ct,fn.m),Bt+=16+$n+(fn.m?fn.m.length:0),Ct=ar+dn}catch(Kn){return Ot(Kn,null)}}Vt(ln,Bt,Ut.length,En,an),Ot(null,ln)};rt||mn();for(var pn=function(ln){var an=Ke[ln],En=ve[an],Qn=En[0],fn=En[1],dn=Xe(),$n=Qn.length;dn.p(Qn);var ar=br(an),Kn=ar.length,Rn=fn.comment,hr=Rn&&br(Rn),er=hr&&hr.length,_r=Ti(fn.extra),Rr=fn.level==0?0:8,Yr=function(kr,Ir){if(kr)st(),Ot(kr,null);else{var cr=Ir.length;Ut[ln]=ft(fn,{size:$n,crc:dn.d(),c:Ir,f:ar,m:hr,u:Kn!=an.length||hr&&Rn.length!=er,compression:Rr}),Bt+=30+Kn+_r+cr,Ct+=76+2*(Kn+_r)+(er||0)+cr,--rt||mn()}};if(Kn>65535&&Yr(se(11,0,1),null),!Rr)Yr(null,Qn);else if($n<16e4)try{Yr(null,Xt(Qn,fn))}catch(kr){Yr(kr,null)}else Le.push(dr(Qn,fn,Yr))},en=0;en<$t;++en)pn(en);return st}function Et(M,N){N||(N={});var he={},ve=[];Cr(M,"",he,N);var Ke=0,rt=0;for(var Bt in he){var Ct=he[Bt],$t=Ct[0],Ut=Ct[1],Le=Ut.level==0?0:8,st=br(Bt),Ot=st.length,mn=Ut.comment,pn=mn&&br(mn),en=pn&&pn.length,ln=Ti(Ut.extra);Ot>65535&&se(11);var an=Le?Xt($t,Ut):$t,En=an.length,Qn=Xe();Qn.p($t),ve.push(ft(Ut,{size:$t.length,crc:Qn.d(),c:an,f:st,m:pn,u:Ot!=Bt.length||pn&&mn.length!=en,o:Ke,compression:Le})),Ke+=30+Ot+ln+En,rt+=76+2*(Ot+ln)+(en||0)+En}for(var fn=new He(rt+22),dn=Ke,$n=rt-Ke,ar=0;ar<ve.length;++ar){var st=ve[ar];Vn(fn,st.o,st,st.f,st.u,st.c.length);var Kn=30+st.f.length+Ti(st.extra);fn.set(st.c,st.o+Kn),Vn(fn,Ke,st,st.f,st.u,st.c.length,st.o,st.m),Ke+=16+Kn+(st.m?st.m.length:0)}return Vt(fn,Ke,ve.length,$n,dn),fn}var bt=null,nn=null,vn=null,wn=null,ur=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(M){M()};function Dn(M,N,he){he||(he=N,N={}),typeof he!="function"&&se(7);var ve=[],Ke=function(){for(var ln=0;ln<ve.length;++ln)ve[ln]()},rt={},Bt=function(ln,an){ur(function(){he(ln,an)})};ur(function(){Bt=he});for(var Ct=M.length-22;yt(M,Ct)!=101010256;--Ct)if(!Ct||M.length-Ct>65558)return Bt(se(13,0,1),null),Ke;var $t=Rt(M,Ct+8);if($t){var Ut=$t,Le=yt(M,Ct+16),st=Le==4294967295||Ut==65535;if(st){var Ot=yt(M,Ct-12);st=yt(M,Ot)==101075792,st&&(Ut=$t=yt(M,Ot+32),Le=yt(M,Ot+48))}for(var mn=N&&N.filter,pn=function(ln){var an=qr(M,Le,st),En=an[0],Qn=an[1],fn=an[2],dn=an[3],$n=an[4],ar=an[5],Kn=xi(M,ar);Le=$n;var Rn=function(er,_r){er?(Ke(),Bt(er,null)):(_r&&(rt[dn]=_r),--$t||Bt(null,rt))};if(!mn||mn({name:dn,size:Qn,originalSize:fn,compression:En}))if(!En)Rn(null,ie(M,Kn,Kn+Qn));else if(En==8){var hr=M.subarray(Kn,Kn+Qn);if(fn<524288||Qn>.8*fn)try{Rn(null,Ie(hr,{out:new He(fn)}))}catch(er){Rn(er,null)}else ve.push(Pe(hr,{size:fn},Rn))}else Rn(se(14,"unknown compression type "+En,1),null);else Rn(null,null)},en=0;en<Ut;++en)pn(en)}else Bt(null,{});return Ke}function Zn(M,N){for(var he={},ve=M.length-22;yt(M,ve)!=101010256;--ve)(!ve||M.length-ve>65558)&&se(13);var Ke=Rt(M,ve+8);if(!Ke)return{};var rt=yt(M,ve+16),Bt=rt==4294967295||Ke==65535;if(Bt){var Ct=yt(M,ve-12);Bt=yt(M,Ct)==101075792,Bt&&(Ke=yt(M,Ct+32),rt=yt(M,Ct+48))}for(var $t=N&&N.filter,Ut=0;Ut<Ke;++Ut){var Le=qr(M,rt,Bt),st=Le[0],Ot=Le[1],mn=Le[2],pn=Le[3],en=Le[4],ln=Le[5],an=xi(M,ln);rt=en,(!$t||$t({name:pn,size:Ot,originalSize:mn,compression:st}))&&(st?st==8?he[pn]=Ie(M.subarray(an,an+Ot),{out:new He(mn)}):se(14,"unknown compression type "+st):he[pn]=ie(M,an,an+Ot))}return he}},64270:function(kn){(function(Ft,Y){kn.exports=Y()})(this,function(){"use strict";var Ft=function(h,c){return Ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,d){g.__proto__=d}||function(g,d){for(var x in d)Object.prototype.hasOwnProperty.call(d,x)&&(g[x]=d[x])},Ft(h,c)};function Y(h,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");Ft(h,c);function g(){this.constructor=h}h.prototype=c===null?Object.create(c):(g.prototype=c.prototype,new g)}var re=function(){return re=Object.assign||function(c){for(var g,d=1,x=arguments.length;d<x;d++){g=arguments[d];for(var U in g)Object.prototype.hasOwnProperty.call(g,U)&&(c[U]=g[U])}return c},re.apply(this,arguments)};function Te(h,c,g,d){function x(U){return U instanceof g?U:new g(function(ae){ae(U)})}return new(g||(g=Promise))(function(U,ae){function Ee(tt){try{Ze(d.next(tt))}catch(pt){ae(pt)}}function we(tt){try{Ze(d.throw(tt))}catch(pt){ae(pt)}}function Ze(tt){tt.done?U(tt.value):x(tt.value).then(Ee,we)}Ze((d=d.apply(h,c||[])).next())})}function He(h,c){var g={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},d,x,U,ae;return ae={next:Ee(0),throw:Ee(1),return:Ee(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function Ee(Ze){return function(tt){return we([Ze,tt])}}function we(Ze){if(d)throw new TypeError("Generator is already executing.");for(;g;)try{if(d=1,x&&(U=Ze[0]&2?x.return:Ze[0]?x.throw||((U=x.return)&&U.call(x),0):x.next)&&!(U=U.call(x,Ze[1])).done)return U;switch(x=0,U&&(Ze=[Ze[0]&2,U.value]),Ze[0]){case 0:case 1:U=Ze;break;case 4:return g.label++,{value:Ze[1],done:!1};case 5:g.label++,x=Ze[1],Ze=[0];continue;case 7:Ze=g.ops.pop(),g.trys.pop();continue;default:if(U=g.trys,!(U=U.length>0&&U[U.length-1])&&(Ze[0]===6||Ze[0]===2)){g=0;continue}if(Ze[0]===3&&(!U||Ze[1]>U[0]&&Ze[1]<U[3])){g.label=Ze[1];break}if(Ze[0]===6&&g.label<U[1]){g.label=U[1],U=Ze;break}if(U&&g.label<U[2]){g.label=U[2],g.ops.push(Ze);break}U[2]&&g.ops.pop(),g.trys.pop();continue}Ze=c.call(h,g)}catch(tt){Ze=[6,tt],x=0}finally{d=U=0}if(Ze[0]&5)throw Ze[1];return{value:Ze[0]?Ze[1]:void 0,done:!0}}}function xe(h,c,g){if(g||arguments.length===2)for(var d=0,x=c.length,U;d<x;d++)(U||!(d in c))&&(U||(U=Array.prototype.slice.call(c,0,d)),U[d]=c[d]);return h.concat(U||c)}for(var ne=function(){function h(c,g,d,x){this.left=c,this.top=g,this.width=d,this.height=x}return h.prototype.add=function(c,g,d,x){return new h(this.left+c,this.top+g,this.width+d,this.height+x)},h.fromClientRect=function(c,g){return new h(g.left+c.windowBounds.left,g.top+c.windowBounds.top,g.width,g.height)},h.fromDOMRectList=function(c,g){var d=Array.from(g).find(function(x){return x.width!==0});return d?new h(d.left+c.windowBounds.left,d.top+c.windowBounds.top,d.width,d.height):h.EMPTY},h.EMPTY=new h(0,0,0,0),h}(),y=function(h,c){return ne.fromClientRect(h,c.getBoundingClientRect())},Se=function(h){var c=h.body,g=h.documentElement;if(!c||!g)throw new Error("Unable to get document size");var d=Math.max(Math.max(c.scrollWidth,g.scrollWidth),Math.max(c.offsetWidth,g.offsetWidth),Math.max(c.clientWidth,g.clientWidth)),x=Math.max(Math.max(c.scrollHeight,g.scrollHeight),Math.max(c.offsetHeight,g.offsetHeight),Math.max(c.clientHeight,g.clientHeight));return new ne(0,0,d,x)},V=function(h){for(var c=[],g=0,d=h.length;g<d;){var x=h.charCodeAt(g++);if(x>=55296&&x<=56319&&g<d){var U=h.charCodeAt(g++);(U&64512)===56320?c.push(((x&1023)<<10)+(U&1023)+65536):(c.push(x),g--)}else c.push(x)}return c},o=function(){for(var h=[],c=0;c<arguments.length;c++)h[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,h);var g=h.length;if(!g)return"";for(var d=[],x=-1,U="";++x<g;){var ae=h[x];ae<=65535?d.push(ae):(ae-=65536,d.push((ae>>10)+55296,ae%1024+56320)),(x+1===g||d.length>16384)&&(U+=String.fromCharCode.apply(String,d),d.length=0)}return U},le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),B=0;B<le.length;B++)O[le.charCodeAt(B)]=B;for(var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",F=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),L=0;L<E.length;L++)F[E.charCodeAt(L)]=L;for(var Ae=function(h){var c=h.length*.75,g=h.length,d,x=0,U,ae,Ee,we;h[h.length-1]==="="&&(c--,h[h.length-2]==="="&&c--);var Ze=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),tt=Array.isArray(Ze)?Ze:new Uint8Array(Ze);for(d=0;d<g;d+=4)U=F[h.charCodeAt(d)],ae=F[h.charCodeAt(d+1)],Ee=F[h.charCodeAt(d+2)],we=F[h.charCodeAt(d+3)],tt[x++]=U<<2|ae>>4,tt[x++]=(ae&15)<<4|Ee>>2,tt[x++]=(Ee&3)<<6|we&63;return Ze},Z=function(h){for(var c=h.length,g=[],d=0;d<c;d+=2)g.push(h[d+1]<<8|h[d]);return g},J=function(h){for(var c=h.length,g=[],d=0;d<c;d+=4)g.push(h[d+3]<<24|h[d+2]<<16|h[d+1]<<8|h[d]);return g},H=5,z=11,oe=2,be=z-H,De=65536>>H,ke=1<<H,ge=ke-1,Ue=1024>>H,Je=De+Ue,Be=Je,nt=32,ie=Be+nt,Q=65536>>z,q=1<<be,se=q-1,de=function(h,c,g){return h.slice?h.slice(c,g):new Uint16Array(Array.prototype.slice.call(h,c,g))},fe=function(h,c,g){return h.slice?h.slice(c,g):new Uint32Array(Array.prototype.slice.call(h,c,g))},b=function(h,c){var g=Ae(h),d=Array.isArray(g)?J(g):new Uint32Array(g),x=Array.isArray(g)?Z(g):new Uint16Array(g),U=24,ae=de(x,U/2,d[4]/2),Ee=d[5]===2?de(x,(U+d[4])/2):fe(d,Math.ceil((U+d[4])/4));return new S(d[0],d[1],d[2],d[3],ae,Ee)},S=function(){function h(c,g,d,x,U,ae){this.initialValue=c,this.errorValue=g,this.highStart=d,this.highValueIndex=x,this.index=U,this.data=ae}return h.prototype.get=function(c){var g;if(c>=0){if(c<55296||c>56319&&c<=65535)return g=this.index[c>>H],g=(g<<oe)+(c&ge),this.data[g];if(c<=65535)return g=this.index[De+(c-55296>>H)],g=(g<<oe)+(c&ge),this.data[g];if(c<this.highStart)return g=ie-Q+(c>>z),g=this.index[g],g+=c>>H&se,g=this.index[g],g=(g<<oe)+(c&ge),this.data[g];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},h}(),W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_e=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),qe=0;qe<W.length;qe++)_e[W.charCodeAt(qe)]=qe;var mt="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Gt=50,Qt=1,sn=2,Wt=3,kt=4,Xe=5,dt=7,ot=8,ft=9,tn=10,Re=11,P=12,v=13,T=14,X=15,k=16,K=17,ce=18,Me=19,We=20,lt=21,ht=22,jt=23,vt=24,Rt=25,yt=26,xt=27,At=28,gt=29,It=30,Ht=31,un=32,Yt=33,_n=34,on=35,Un=36,Gn=37,dr=38,Xt=39,Cn=40,Ge=41,Pe=42,Ie=43,ee=[9001,65288],ue="!",me="\xD7",Fe="\xF7",Qe=b(mt),Tt=[It,Un],Kt=[Qt,sn,Wt,Xe],Lt=[tn,ot],yn=[xt,yt],qn=Kt.concat(Lt),or=[dr,Xt,Cn,_n,on],cn=[X,v],qt=function(h,c){c===void 0&&(c="strict");var g=[],d=[],x=[];return h.forEach(function(U,ae){var Ee=Qe.get(U);if(Ee>Gt?(x.push(!0),Ee-=Gt):x.push(!1),["normal","auto","loose"].indexOf(c)!==-1&&[8208,8211,12316,12448].indexOf(U)!==-1)return d.push(ae),g.push(k);if(Ee===kt||Ee===Re){if(ae===0)return d.push(ae),g.push(It);var we=g[ae-1];return qn.indexOf(we)===-1?(d.push(d[ae-1]),g.push(we)):(d.push(ae),g.push(It))}if(d.push(ae),Ee===Ht)return g.push(c==="strict"?lt:Gn);if(Ee===Pe||Ee===gt)return g.push(It);if(Ee===Ie)return U>=131072&&U<=196605||U>=196608&&U<=262141?g.push(Gn):g.push(It);g.push(Ee)}),[d,g,x]},fr=function(h,c,g,d){var x=d[g];if(Array.isArray(h)?h.indexOf(x)!==-1:h===x)for(var U=g;U<=d.length;){U++;var ae=d[U];if(ae===c)return!0;if(ae!==tn)break}if(x===tn)for(var U=g;U>0;){U--;var Ee=d[U];if(Array.isArray(h)?h.indexOf(Ee)!==-1:h===Ee)for(var we=g;we<=d.length;){we++;var ae=d[we];if(ae===c)return!0;if(ae!==tn)break}if(Ee!==tn)break}return!1},pr=function(h,c){for(var g=h;g>=0;){var d=c[g];if(d===tn)g--;else return d}return 0},Ve=function(h,c,g,d,x){if(g[d]===0)return me;var U=d-1;if(Array.isArray(x)&&x[U]===!0)return me;var ae=U-1,Ee=U+1,we=c[U],Ze=ae>=0?c[ae]:0,tt=c[Ee];if(we===sn&&tt===Wt)return me;if(Kt.indexOf(we)!==-1)return ue;if(Kt.indexOf(tt)!==-1||Lt.indexOf(tt)!==-1)return me;if(pr(U,c)===ot)return Fe;if(Qe.get(h[U])===Re||(we===un||we===Yt)&&Qe.get(h[Ee])===Re||we===dt||tt===dt||we===ft||[tn,v,X].indexOf(we)===-1&&tt===ft||[K,ce,Me,vt,At].indexOf(tt)!==-1||pr(U,c)===ht||fr(jt,ht,U,c)||fr([K,ce],lt,U,c)||fr(P,P,U,c))return me;if(we===tn)return Fe;if(we===jt||tt===jt)return me;if(tt===k||we===k)return Fe;if([v,X,lt].indexOf(tt)!==-1||we===T||Ze===Un&&cn.indexOf(we)!==-1||we===At&&tt===Un||tt===We||Tt.indexOf(tt)!==-1&&we===Rt||Tt.indexOf(we)!==-1&&tt===Rt||we===xt&&[Gn,un,Yt].indexOf(tt)!==-1||[Gn,un,Yt].indexOf(we)!==-1&&tt===yt||Tt.indexOf(we)!==-1&&yn.indexOf(tt)!==-1||yn.indexOf(we)!==-1&&Tt.indexOf(tt)!==-1||[xt,yt].indexOf(we)!==-1&&(tt===Rt||[ht,X].indexOf(tt)!==-1&&c[Ee+1]===Rt)||[ht,X].indexOf(we)!==-1&&tt===Rt||we===Rt&&[Rt,At,vt].indexOf(tt)!==-1)return me;if([Rt,At,vt,K,ce].indexOf(tt)!==-1)for(var pt=U;pt>=0;){var Mt=c[pt];if(Mt===Rt)return me;if([At,vt].indexOf(Mt)!==-1)pt--;else break}if([xt,yt].indexOf(tt)!==-1)for(var pt=[K,ce].indexOf(we)!==-1?ae:U;pt>=0;){var Mt=c[pt];if(Mt===Rt)return me;if([At,vt].indexOf(Mt)!==-1)pt--;else break}if(dr===we&&[dr,Xt,_n,on].indexOf(tt)!==-1||[Xt,_n].indexOf(we)!==-1&&[Xt,Cn].indexOf(tt)!==-1||[Cn,on].indexOf(we)!==-1&&tt===Cn||or.indexOf(we)!==-1&&[We,yt].indexOf(tt)!==-1||or.indexOf(tt)!==-1&&we===xt||Tt.indexOf(we)!==-1&&Tt.indexOf(tt)!==-1||we===vt&&Tt.indexOf(tt)!==-1||Tt.concat(Rt).indexOf(we)!==-1&&tt===ht&&ee.indexOf(h[Ee])===-1||Tt.concat(Rt).indexOf(tt)!==-1&&we===ce)return me;if(we===Ge&&tt===Ge){for(var Mn=g[U],gn=1;Mn>0&&(Mn--,c[Mn]===Ge);)gn++;if(gn%2!==0)return me}return we===un&&tt===Yt?me:Fe},lr=function(h,c){c||(c={lineBreak:"normal",wordBreak:"normal"});var g=qt(h,c.lineBreak),d=g[0],x=g[1],U=g[2];(c.wordBreak==="break-all"||c.wordBreak==="break-word")&&(x=x.map(function(Ee){return[Rt,It,Pe].indexOf(Ee)!==-1?Gn:Ee}));var ae=c.wordBreak==="keep-all"?U.map(function(Ee,we){return Ee&&h[we]>=19968&&h[we]<=40959}):void 0;return[d,x,ae]},rr=function(){function h(c,g,d,x){this.codePoints=c,this.required=g===ue,this.start=d,this.end=x}return h.prototype.slice=function(){return o.apply(void 0,this.codePoints.slice(this.start,this.end))},h}(),ir=function(h,c){var g=V(h),d=lr(g,c),x=d[0],U=d[1],ae=d[2],Ee=g.length,we=0,Ze=0;return{next:function(){if(Ze>=Ee)return{done:!0,value:null};for(var tt=me;Ze<Ee&&(tt=Ve(g,U,x,++Ze,ae))===me;);if(tt!==me||Ze===Ee){var pt=new rr(g,tt,we,Ze);return we=Ze,{value:pt,done:!1}}return{done:!0,value:null}}}},ri=1,Cr=2,li=4,Gr=8,Ci=10,ii=47,pi=92,es=9,br=32,Sr=34,Nr=61,xi=35,qr=36,Ki=37,Ti=39,Vn=40,Vt=41,ze=95,ut=45,Pt=33,St=60,zt=62,Et=64,bt=91,nn=93,vn=61,wn=123,ur=63,Dn=125,Zn=124,M=126,N=128,he=65533,ve=42,Ke=43,rt=44,Bt=58,Ct=59,$t=46,Ut=0,Le=8,st=11,Ot=14,mn=31,pn=127,en=-1,ln=48,an=97,En=101,Qn=102,fn=117,dn=122,$n=65,ar=69,Kn=70,Rn=85,hr=90,er=function(h){return h>=ln&&h<=57},_r=function(h){return h>=55296&&h<=57343},Rr=function(h){return er(h)||h>=$n&&h<=Kn||h>=an&&h<=Qn},Yr=function(h){return h>=an&&h<=dn},kr=function(h){return h>=$n&&h<=hr},Ir=function(h){return Yr(h)||kr(h)},cr=function(h){return h>=N},Fr=function(h){return h===Ci||h===es||h===br},Dr=function(h){return Ir(h)||cr(h)||h===ze},Ri=function(h){return Dr(h)||er(h)||h===ut},Vr=function(h){return h>=Ut&&h<=Le||h===st||h>=Ot&&h<=mn||h===pn},Wr=function(h,c){return h!==pi?!1:c!==Ci},Lr=function(h,c,g){return h===ut?Dr(c)||Wr(c,g):Dr(h)?!0:!!(h===pi&&Wr(h,c))},Ai=function(h,c,g){return h===Ke||h===ut?er(c)?!0:c===$t&&er(g):er(h===$t?c:h)},Hr=function(h){var c=0,g=1;(h[c]===Ke||h[c]===ut)&&(h[c]===ut&&(g=-1),c++);for(var d=[];er(h[c]);)d.push(h[c++]);var x=d.length?parseInt(o.apply(void 0,d),10):0;h[c]===$t&&c++;for(var U=[];er(h[c]);)U.push(h[c++]);var ae=U.length,Ee=ae?parseInt(o.apply(void 0,U),10):0;(h[c]===ar||h[c]===En)&&c++;var we=1;(h[c]===Ke||h[c]===ut)&&(h[c]===ut&&(we=-1),c++);for(var Ze=[];er(h[c]);)Ze.push(h[c++]);var tt=Ze.length?parseInt(o.apply(void 0,Ze),10):0;return g*(x+Ee*Math.pow(10,-ae))*Math.pow(10,we*tt)},Ei={type:2},Ii={type:3},Yn={type:4},ts={type:13},As={type:8},ki={type:21},Si={type:9},$i={type:10},_s={type:11},xs={type:12},ei={type:14},ds={type:23},ns={type:1},Gi={type:25},qi={type:24},Ss={type:26},Pi={type:27},hi={type:28},Mi={type:29},Vi={type:31},Wi={type:32},vs=function(){function h(){this._value=[]}return h.prototype.write=function(c){this._value=this._value.concat(V(c))},h.prototype.read=function(){for(var c=[],g=this.consumeToken();g!==Wi;)c.push(g),g=this.consumeToken();return c},h.prototype.consumeToken=function(){var c=this.consumeCodePoint();switch(c){case Sr:return this.consumeStringToken(Sr);case xi:var g=this.peekCodePoint(0),d=this.peekCodePoint(1),x=this.peekCodePoint(2);if(Ri(g)||Wr(d,x)){var U=Lr(g,d,x)?Cr:ri,ae=this.consumeName();return{type:5,value:ae,flags:U}}break;case qr:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),ts;break;case Ti:return this.consumeStringToken(Ti);case Vn:return Ei;case Vt:return Ii;case ve:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),ei;break;case Ke:if(Ai(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case rt:return Yn;case ut:var Ee=c,we=this.peekCodePoint(0),Ze=this.peekCodePoint(1);if(Ai(Ee,we,Ze))return this.reconsumeCodePoint(c),this.consumeNumericToken();if(Lr(Ee,we,Ze))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();if(we===ut&&Ze===zt)return this.consumeCodePoint(),this.consumeCodePoint(),qi;break;case $t:if(Ai(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case ii:if(this.peekCodePoint(0)===ve)for(this.consumeCodePoint();;){var tt=this.consumeCodePoint();if(tt===ve&&(tt=this.consumeCodePoint(),tt===ii))return this.consumeToken();if(tt===en)return this.consumeToken()}break;case Bt:return Ss;case Ct:return Pi;case St:if(this.peekCodePoint(0)===Pt&&this.peekCodePoint(1)===ut&&this.peekCodePoint(2)===ut)return this.consumeCodePoint(),this.consumeCodePoint(),Gi;break;case Et:var pt=this.peekCodePoint(0),Mt=this.peekCodePoint(1),Mn=this.peekCodePoint(2);if(Lr(pt,Mt,Mn)){var ae=this.consumeName();return{type:7,value:ae}}break;case bt:return hi;case pi:if(Wr(c,this.peekCodePoint(0)))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();break;case nn:return Mi;case vn:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),As;break;case wn:return _s;case Dn:return xs;case fn:case Rn:var gn=this.peekCodePoint(0),Sn=this.peekCodePoint(1);return gn===Ke&&(Rr(Sn)||Sn===ur)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(c),this.consumeIdentLikeToken();case Zn:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),Si;if(this.peekCodePoint(0)===Zn)return this.consumeCodePoint(),ki;break;case M:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),$i;break;case en:return Wi}return Fr(c)?(this.consumeWhiteSpace(),Vi):er(c)?(this.reconsumeCodePoint(c),this.consumeNumericToken()):Dr(c)?(this.reconsumeCodePoint(c),this.consumeIdentLikeToken()):{type:6,value:o(c)}},h.prototype.consumeCodePoint=function(){var c=this._value.shift();return typeof c=="undefined"?-1:c},h.prototype.reconsumeCodePoint=function(c){this._value.unshift(c)},h.prototype.peekCodePoint=function(c){return c>=this._value.length?-1:this._value[c]},h.prototype.consumeUnicodeRangeToken=function(){for(var c=[],g=this.consumeCodePoint();Rr(g)&&c.length<6;)c.push(g),g=this.consumeCodePoint();for(var d=!1;g===ur&&c.length<6;)c.push(g),g=this.consumeCodePoint(),d=!0;if(d){var x=parseInt(o.apply(void 0,c.map(function(we){return we===ur?ln:we})),16),U=parseInt(o.apply(void 0,c.map(function(we){return we===ur?Kn:we})),16);return{type:30,start:x,end:U}}var ae=parseInt(o.apply(void 0,c),16);if(this.peekCodePoint(0)===ut&&Rr(this.peekCodePoint(1))){this.consumeCodePoint(),g=this.consumeCodePoint();for(var Ee=[];Rr(g)&&Ee.length<6;)Ee.push(g),g=this.consumeCodePoint();var U=parseInt(o.apply(void 0,Ee),16);return{type:30,start:ae,end:U}}else return{type:30,start:ae,end:ae}},h.prototype.consumeIdentLikeToken=function(){var c=this.consumeName();return c.toLowerCase()==="url"&&this.peekCodePoint(0)===Vn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Vn?(this.consumeCodePoint(),{type:19,value:c}):{type:20,value:c}},h.prototype.consumeUrlToken=function(){var c=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===en)return{type:22,value:""};var g=this.peekCodePoint(0);if(g===Ti||g===Sr){var d=this.consumeStringToken(this.consumeCodePoint());return d.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===en||this.peekCodePoint(0)===Vt)?(this.consumeCodePoint(),{type:22,value:d.value}):(this.consumeBadUrlRemnants(),ds)}for(;;){var x=this.consumeCodePoint();if(x===en||x===Vt)return{type:22,value:o.apply(void 0,c)};if(Fr(x))return this.consumeWhiteSpace(),this.peekCodePoint(0)===en||this.peekCodePoint(0)===Vt?(this.consumeCodePoint(),{type:22,value:o.apply(void 0,c)}):(this.consumeBadUrlRemnants(),ds);if(x===Sr||x===Ti||x===Vn||Vr(x))return this.consumeBadUrlRemnants(),ds;if(x===pi)if(Wr(x,this.peekCodePoint(0)))c.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),ds;else c.push(x)}},h.prototype.consumeWhiteSpace=function(){for(;Fr(this.peekCodePoint(0));)this.consumeCodePoint()},h.prototype.consumeBadUrlRemnants=function(){for(;;){var c=this.consumeCodePoint();if(c===Vt||c===en)return;Wr(c,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},h.prototype.consumeStringSlice=function(c){for(var g=5e4,d="";c>0;){var x=Math.min(g,c);d+=o.apply(void 0,this._value.splice(0,x)),c-=x}return this._value.shift(),d},h.prototype.consumeStringToken=function(c){var g="",d=0;do{var x=this._value[d];if(x===en||x===void 0||x===c)return g+=this.consumeStringSlice(d),{type:0,value:g};if(x===Ci)return this._value.splice(0,d),ns;if(x===pi){var U=this._value[d+1];U!==en&&U!==void 0&&(U===Ci?(g+=this.consumeStringSlice(d),d=-1,this._value.shift()):Wr(x,U)&&(g+=this.consumeStringSlice(d),g+=o(this.consumeEscapedCodePoint()),d=-1))}d++}while(!0)},h.prototype.consumeNumber=function(){var c=[],g=li,d=this.peekCodePoint(0);for((d===Ke||d===ut)&&c.push(this.consumeCodePoint());er(this.peekCodePoint(0));)c.push(this.consumeCodePoint());d=this.peekCodePoint(0);var x=this.peekCodePoint(1);if(d===$t&&er(x))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),g=Gr;er(this.peekCodePoint(0));)c.push(this.consumeCodePoint());d=this.peekCodePoint(0),x=this.peekCodePoint(1);var U=this.peekCodePoint(2);if((d===ar||d===En)&&((x===Ke||x===ut)&&er(U)||er(x)))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),g=Gr;er(this.peekCodePoint(0));)c.push(this.consumeCodePoint());return[Hr(c),g]},h.prototype.consumeNumericToken=function(){var c=this.consumeNumber(),g=c[0],d=c[1],x=this.peekCodePoint(0),U=this.peekCodePoint(1),ae=this.peekCodePoint(2);if(Lr(x,U,ae)){var Ee=this.consumeName();return{type:15,number:g,flags:d,unit:Ee}}return x===Ki?(this.consumeCodePoint(),{type:16,number:g,flags:d}):{type:17,number:g,flags:d}},h.prototype.consumeEscapedCodePoint=function(){var c=this.consumeCodePoint();if(Rr(c)){for(var g=o(c);Rr(this.peekCodePoint(0))&&g.length<6;)g+=o(this.consumeCodePoint());Fr(this.peekCodePoint(0))&&this.consumeCodePoint();var d=parseInt(g,16);return d===0||_r(d)||d>1114111?he:d}return c===en?he:c},h.prototype.consumeName=function(){for(var c="";;){var g=this.consumeCodePoint();if(Ri(g))c+=o(g);else if(Wr(g,this.peekCodePoint(0)))c+=o(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(g),c}},h}(),Qs=function(){function h(c){this._tokens=c}return h.create=function(c){var g=new vs;return g.write(c),new h(g.read())},h.parseValue=function(c){return h.create(c).parseComponentValue()},h.parseValues=function(c){return h.create(c).parseComponentValues()},h.prototype.parseComponentValue=function(){for(var c=this.consumeToken();c.type===31;)c=this.consumeToken();if(c.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(c);var g=this.consumeComponentValue();do c=this.consumeToken();while(c.type===31);if(c.type===32)return g;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},h.prototype.parseComponentValues=function(){for(var c=[];;){var g=this.consumeComponentValue();if(g.type===32)return c;c.push(g),c.push()}},h.prototype.consumeComponentValue=function(){var c=this.consumeToken();switch(c.type){case 11:case 28:case 2:return this.consumeSimpleBlock(c.type);case 19:return this.consumeFunction(c)}return c},h.prototype.consumeSimpleBlock=function(c){for(var g={type:c,values:[]},d=this.consumeToken();;){if(d.type===32||ys(d,c))return g;this.reconsumeToken(d),g.values.push(this.consumeComponentValue()),d=this.consumeToken()}},h.prototype.consumeFunction=function(c){for(var g={name:c.value,values:[],type:18};;){var d=this.consumeToken();if(d.type===32||d.type===3)return g;this.reconsumeToken(d),g.values.push(this.consumeComponentValue())}},h.prototype.consumeToken=function(){var c=this._tokens.shift();return typeof c=="undefined"?Wi:c},h.prototype.reconsumeToken=function(c){this._tokens.unshift(c)},h}(),Os=function(h){return h.type===15},os=function(h){return h.type===17},Qr=function(h){return h.type===20},Ln=function(h){return h.type===0},Bn=function(h,c){return Qr(h)&&h.value===c},vr=function(h){return h.type!==31},ti=function(h){return h.type!==31&&h.type!==4},Pr=function(h){var c=[],g=[];return h.forEach(function(d){if(d.type===4){if(g.length===0)throw new Error("Error parsing function args, zero tokens for arg");c.push(g),g=[];return}d.type!==31&&g.push(d)}),g.length&&c.push(g),c},ys=function(h,c){return c===11&&h.type===12||c===28&&h.type===29?!0:c===2&&h.type===3},Qi=function(h){return h.type===17||h.type===15},Bi=function(h){return h.type===16||Qi(h)},Ys=function(h){return h.length>1?[h[0],h[1]]:[h[0]]},Di={type:17,number:0,flags:li},Ga={type:16,number:50,flags:li},ws={type:16,number:100,flags:li},rs=function(h,c,g){var d=h[0],x=h[1];return[oi(d,c),oi(typeof x!="undefined"?x:d,g)]},oi=function(h,c){if(h.type===16)return h.number/100*c;if(Os(h))switch(h.unit){case"rem":case"em":return 16*h.number;case"px":default:return h.number}return h.number},js="deg",La="grad",ia="rad",Es="turn",pa={name:"angle",parse:function(h,c){if(c.type===15)switch(c.unit){case js:return Math.PI*c.number/180;case La:return Math.PI/200*c.number;case ia:return c.number;case Es:return Math.PI*2*c.number}throw new Error("Unsupported angle type")}},gs=function(h){return h.type===15&&(h.unit===js||h.unit===La||h.unit===ia||h.unit===Es)},Va=function(h){var c=h.filter(Qr).map(function(g){return g.value}).join(" ");switch(c){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Di,Di];case"to top":case"bottom":return ls(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Di,ws];case"to right":case"left":return ls(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ws,ws];case"to bottom":case"top":return ls(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ws,Di];case"to left":case"right":return ls(270)}return 0},ls=function(h){return Math.PI*h/180},Ks={name:"color",parse:function(h,c){if(c.type===18){var g=zi[c.name];if(typeof g=="undefined")throw new Error('Attempting to parse an unsupported color function "'+c.name+'"');return g(h,c.values)}if(c.type===5){if(c.value.length===3){var d=c.value.substring(0,1),x=c.value.substring(1,2),U=c.value.substring(2,3);return Fs(parseInt(d+d,16),parseInt(x+x,16),parseInt(U+U,16),1)}if(c.value.length===4){var d=c.value.substring(0,1),x=c.value.substring(1,2),U=c.value.substring(2,3),ae=c.value.substring(3,4);return Fs(parseInt(d+d,16),parseInt(x+x,16),parseInt(U+U,16),parseInt(ae+ae,16)/255)}if(c.value.length===6){var d=c.value.substring(0,2),x=c.value.substring(2,4),U=c.value.substring(4,6);return Fs(parseInt(d,16),parseInt(x,16),parseInt(U,16),1)}if(c.value.length===8){var d=c.value.substring(0,2),x=c.value.substring(2,4),U=c.value.substring(4,6),ae=c.value.substring(6,8);return Fs(parseInt(d,16),parseInt(x,16),parseInt(U,16),parseInt(ae,16)/255)}}if(c.type===20){var Ee=Bs[c.value.toUpperCase()];if(typeof Ee!="undefined")return Ee}return Bs.TRANSPARENT}},is=function(h){return(255&h)===0},Ni=function(h){var c=255&h,g=255&h>>8,d=255&h>>16,x=255&h>>24;return c<255?"rgba("+x+","+d+","+g+","+c/255+")":"rgb("+x+","+d+","+g+")"},Fs=function(h,c,g,d){return(h<<24|c<<16|g<<8|Math.round(d*255)<<0)>>>0},Wa=function(h,c){if(h.type===17)return h.number;if(h.type===16){var g=c===3?1:255;return c===3?h.number/100*g:Math.round(h.number/100*g)}return 0},ma=function(h,c){var g=c.filter(ti);if(g.length===3){var d=g.map(Wa),x=d[0],U=d[1],ae=d[2];return Fs(x,U,ae,1)}if(g.length===4){var Ee=g.map(Wa),x=Ee[0],U=Ee[1],ae=Ee[2],we=Ee[3];return Fs(x,U,ae,we)}return 0};function _a(h,c,g){return g<0&&(g+=1),g>=1&&(g-=1),g<1/6?(c-h)*g*6+h:g<1/2?c:g<2/3?(c-h)*6*(2/3-g)+h:h}var Ts=function(h,c){var g=c.filter(ti),d=g[0],x=g[1],U=g[2],ae=g[3],Ee=(d.type===17?ls(d.number):pa.parse(h,d))/(Math.PI*2),we=Bi(x)?x.number/100:0,Ze=Bi(U)?U.number/100:0,tt=typeof ae!="undefined"&&Bi(ae)?oi(ae,1):1;if(we===0)return Fs(Ze*255,Ze*255,Ze*255,1);var pt=Ze<=.5?Ze*(we+1):Ze+we-Ze*we,Mt=Ze*2-pt,Mn=_a(Mt,pt,Ee+1/3),gn=_a(Mt,pt,Ee),Sn=_a(Mt,pt,Ee-1/3);return Fs(Mn*255,gn*255,Sn*255,tt)},zi={hsl:Ts,hsla:Ts,rgb:ma,rgba:ma},sa=function(h,c){return Ks.parse(h,Qs.create(c).parseComponentValue())},Bs={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},us={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(h,c){return c.map(function(g){if(Qr(g))switch(g.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},za={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},$s=function(h,c){var g=Ks.parse(h,c[0]),d=c[1];return d&&Bi(d)?{color:g,stop:d}:{color:g,stop:null}},gA=function(h,c){var g=h[0],d=h[h.length-1];g.stop===null&&(g.stop=Di),d.stop===null&&(d.stop=ws);for(var x=[],U=0,ae=0;ae<h.length;ae++){var Ee=h[ae].stop;if(Ee!==null){var we=oi(Ee,c);we>U?x.push(we):x.push(U),U=we}else x.push(null)}for(var Ze=null,ae=0;ae<x.length;ae++){var tt=x[ae];if(tt===null)Ze===null&&(Ze=ae);else if(Ze!==null){for(var pt=ae-Ze,Mt=x[Ze-1],Mn=(tt-Mt)/(pt+1),gn=1;gn<=pt;gn++)x[Ze+gn-1]=Mn*gn;Ze=null}}return h.map(function(Sn,Ur){var Jn=Sn.color;return{color:Jn,stop:Math.max(Math.min(1,x[Ur]/c),0)}})},pA=function(h,c,g){var d=c/2,x=g/2,U=oi(h[0],c)-d,ae=x-oi(h[1],g);return(Math.atan2(ae,U)+Math.PI*2)%(Math.PI*2)},va=function(h,c,g){var d=typeof h=="number"?h:pA(h,c,g),x=Math.abs(c*Math.sin(d))+Math.abs(g*Math.cos(d)),U=c/2,ae=g/2,Ee=x/2,we=Math.sin(d-Math.PI/2)*Ee,Ze=Math.cos(d-Math.PI/2)*Ee;return[x,U-Ze,U+Ze,ae-we,ae+we]},ss=function(h,c){return Math.sqrt(h*h+c*c)},ya=function(h,c,g,d,x){var U=[[0,0],[0,c],[h,0],[h,c]];return U.reduce(function(ae,Ee){var we=Ee[0],Ze=Ee[1],tt=ss(g-we,d-Ze);return(x?tt<ae.optimumDistance:tt>ae.optimumDistance)?{optimumCorner:Ee,optimumDistance:tt}:ae},{optimumDistance:x?1/0:-1/0,optimumCorner:null}).optimumCorner},Za=function(h,c,g,d,x){var U=0,ae=0;switch(h.size){case 0:h.shape===0?U=ae=Math.min(Math.abs(c),Math.abs(c-d),Math.abs(g),Math.abs(g-x)):h.shape===1&&(U=Math.min(Math.abs(c),Math.abs(c-d)),ae=Math.min(Math.abs(g),Math.abs(g-x)));break;case 2:if(h.shape===0)U=ae=Math.min(ss(c,g),ss(c,g-x),ss(c-d,g),ss(c-d,g-x));else if(h.shape===1){var Ee=Math.min(Math.abs(g),Math.abs(g-x))/Math.min(Math.abs(c),Math.abs(c-d)),we=ya(d,x,c,g,!0),Ze=we[0],tt=we[1];U=ss(Ze-c,(tt-g)/Ee),ae=Ee*U}break;case 1:h.shape===0?U=ae=Math.max(Math.abs(c),Math.abs(c-d),Math.abs(g),Math.abs(g-x)):h.shape===1&&(U=Math.max(Math.abs(c),Math.abs(c-d)),ae=Math.max(Math.abs(g),Math.abs(g-x)));break;case 3:if(h.shape===0)U=ae=Math.max(ss(c,g),ss(c,g-x),ss(c-d,g),ss(c-d,g-x));else if(h.shape===1){var Ee=Math.max(Math.abs(g),Math.abs(g-x))/Math.max(Math.abs(c),Math.abs(c-d)),pt=ya(d,x,c,g,!1),Ze=pt[0],tt=pt[1];U=ss(Ze-c,(tt-g)/Ee),ae=Ee*U}break}return Array.isArray(h.size)&&(U=oi(h.size[0],d),ae=h.size.length===2?oi(h.size[1],x):U),[U,ae]},Ya=function(h,c){var g=ls(180),d=[];return Pr(c).forEach(function(x,U){if(U===0){var ae=x[0];if(ae.type===20&&ae.value==="to"){g=Va(x);return}else if(gs(ae)){g=pa.parse(h,ae);return}}var Ee=$s(h,x);d.push(Ee)}),{angle:g,stops:d,type:1}},aa=function(h,c){var g=ls(180),d=[];return Pr(c).forEach(function(x,U){if(U===0){var ae=x[0];if(ae.type===20&&["top","left","right","bottom"].indexOf(ae.value)!==-1){g=Va(x);return}else if(gs(ae)){g=(pa.parse(h,ae)+ls(270))%ls(360);return}}var Ee=$s(h,x);d.push(Ee)}),{angle:g,stops:d,type:1}},ja=function(h,c){var g=ls(180),d=[],x=1,U=0,ae=3,Ee=[];return Pr(c).forEach(function(we,Ze){var tt=we[0];if(Ze===0){if(Qr(tt)&&tt.value==="linear"){x=1;return}else if(Qr(tt)&&tt.value==="radial"){x=2;return}}if(tt.type===18){if(tt.name==="from"){var pt=Ks.parse(h,tt.values[0]);d.push({stop:Di,color:pt})}else if(tt.name==="to"){var pt=Ks.parse(h,tt.values[0]);d.push({stop:ws,color:pt})}else if(tt.name==="color-stop"){var Mt=tt.values.filter(ti);if(Mt.length===2){var pt=Ks.parse(h,Mt[1]),Mn=Mt[0];os(Mn)&&d.push({stop:{type:16,number:Mn.number*100,flags:Mn.flags},color:pt})}}}}),x===1?{angle:(g+ls(180))%ls(360),stops:d,type:x}:{size:ae,shape:U,stops:d,position:Ee,type:x}},mi="closest-side",ni="farthest-side",ui="closest-corner",Li="farthest-corner",Fi="circle",Gs="ellipse",Aa="cover",Ua="contain",Ra=function(h,c){var g=0,d=3,x=[],U=[];return Pr(c).forEach(function(ae,Ee){var we=!0;if(Ee===0){var Ze=!1;we=ae.reduce(function(pt,Mt){if(Ze)if(Qr(Mt))switch(Mt.value){case"center":return U.push(Ga),pt;case"top":case"left":return U.push(Di),pt;case"right":case"bottom":return U.push(ws),pt}else(Bi(Mt)||Qi(Mt))&&U.push(Mt);else if(Qr(Mt))switch(Mt.value){case Fi:return g=0,!1;case Gs:return g=1,!1;case"at":return Ze=!0,!1;case mi:return d=0,!1;case Aa:case ni:return d=1,!1;case Ua:case ui:return d=2,!1;case Li:return d=3,!1}else if(Qi(Mt)||Bi(Mt))return Array.isArray(d)||(d=[]),d.push(Mt),!1;return pt},we)}if(we){var tt=$s(h,ae);x.push(tt)}}),{size:d,shape:g,stops:x,position:U,type:2}},Ps=function(h,c){var g=0,d=3,x=[],U=[];return Pr(c).forEach(function(ae,Ee){var we=!0;if(Ee===0?we=ae.reduce(function(tt,pt){if(Qr(pt))switch(pt.value){case"center":return U.push(Ga),!1;case"top":case"left":return U.push(Di),!1;case"right":case"bottom":return U.push(ws),!1}else if(Bi(pt)||Qi(pt))return U.push(pt),!1;return tt},we):Ee===1&&(we=ae.reduce(function(tt,pt){if(Qr(pt))switch(pt.value){case Fi:return g=0,!1;case Gs:return g=1,!1;case Ua:case mi:return d=0,!1;case ni:return d=1,!1;case ui:return d=2,!1;case Aa:case Li:return d=3,!1}else if(Qi(pt)||Bi(pt))return Array.isArray(d)||(d=[]),d.push(pt),!1;return tt},we)),we){var Ze=$s(h,ae);x.push(Ze)}}),{size:d,shape:g,stops:x,position:U,type:2}},Oi=function(h){return h.type===1},Zi=function(h){return h.type===2},oa={name:"image",parse:function(h,c){if(c.type===22){var g={url:c.value,type:0};return h.cache.addImage(c.value),g}if(c.type===18){var d=Xa[c.name];if(typeof d=="undefined")throw new Error('Attempting to parse an unsupported image function "'+c.name+'"');return d(h,c.values)}throw new Error("Unsupported image type "+c.type)}};function Nt(h){return!(h.type===20&&h.value==="none")&&(h.type!==18||!!Xa[h.name])}var Xa={"linear-gradient":Ya,"-moz-linear-gradient":aa,"-ms-linear-gradient":aa,"-o-linear-gradient":aa,"-webkit-linear-gradient":aa,"radial-gradient":Ra,"-moz-radial-gradient":Ps,"-ms-radial-gradient":Ps,"-o-radial-gradient":Ps,"-webkit-radial-gradient":Ps,"-webkit-gradient":ja},RA={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(h,c){if(c.length===0)return[];var g=c[0];return g.type===20&&g.value==="none"?[]:c.filter(function(d){return ti(d)&&Nt(d)}).map(function(d){return oa.parse(h,d)})}},kA={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(h,c){return c.map(function(g){if(Qr(g))switch(g.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Bo={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(h,c){return Pr(c).map(function(g){return g.filter(Bi)}).map(Ys)}},mA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(h,c){return Pr(c).map(function(g){return g.filter(Qr).map(function(d){return d.value}).join(" ")}).map(_A)}},_A=function(h){switch(h){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},wa;(function(h){h.AUTO="auto",h.CONTAIN="contain",h.COVER="cover"})(wa||(wa={}));var bo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(h,c){return Pr(c).map(function(g){return g.filter(_i)})}},_i=function(h){return Qr(h)||Bi(h)},Xs=function(h){return{name:"border-"+h+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Ea=Xs("top"),dl=Xs("right"),gl=Xs("bottom"),cu=Xs("left"),vA=function(h){return{name:"border-radius-"+h,initialValue:"0 0",prefix:!1,type:1,parse:function(c,g){return Ys(g.filter(Bi))}}},QA=vA("top-left"),OA=vA("top-right"),Vs=vA("bottom-right"),ka=vA("bottom-left"),Ja=function(h){return{name:"border-"+h+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(c,g){switch(g){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},PA=Ja("top"),MA=Ja("right"),NA=Ja("bottom"),Co=Ja("left"),Js=function(h){return{name:"border-"+h+"-width",initialValue:"0",type:0,prefix:!1,parse:function(c,g){return Os(g)?g.number:0}}},HA=Js("top"),pl=Js("right"),KA=Js("bottom"),xo=Js("left"),ml={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},So={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(h,c){switch(c){case"rtl":return 1;case"ltr":default:return 0}}},_l={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(h,c){return c.filter(Qr).reduce(function(g,d){return g|vl(d.value)},0)}},vl=function(h){switch(h){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},$A={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(h,c){switch(c){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},yl={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(h,c){return c.type===20&&c.value==="normal"?0:c.type===17||c.type===15?c.number:0}},yA;(function(h){h.NORMAL="normal",h.STRICT="strict"})(yA||(yA={}));var wl={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(h,c){switch(c){case"strict":return yA.STRICT;case"normal":default:return yA.NORMAL}}},El={name:"line-height",initialValue:"normal",prefix:!1,type:4},Fo=function(h,c){return Qr(h)&&h.value==="normal"?1.2*c:h.type===17?c*h.number:Bi(h)?oi(h,c):c},Bl={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(h,c){return c.type===20&&c.value==="none"?null:oa.parse(h,c)}},bl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(h,c){switch(c){case"inside":return 0;case"outside":default:return 1}}},GA={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(h,c){switch(c){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Is=function(h){return{name:"margin-"+h,initialValue:"0",prefix:!1,type:4}},wA=Is("top"),Cl=Is("right"),VA=Is("bottom"),To=Is("left"),xl={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(h,c){return c.filter(Qr).map(function(g){switch(g.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Ba={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(h,c){switch(c){case"break-word":return"break-word";case"normal":default:return"normal"}}},ji=function(h){return{name:"padding-"+h,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ds=ji("top"),WA=ji("right"),Io=ji("bottom"),EA=ji("left"),qa={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(h,c){switch(c){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},zA={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(h,c){switch(c){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Sl={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(h,c){return c.length===1&&Bn(c[0],"none")?[]:Pr(c).map(function(g){for(var d={color:Bs.TRANSPARENT,offsetX:Di,offsetY:Di,blur:Di},x=0,U=0;U<g.length;U++){var ae=g[U];Qi(ae)?(x===0?d.offsetX=ae:x===1?d.offsetY=ae:d.blur=ae,x++):d.color=Ks.parse(h,ae)}return d})}},Fl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(h,c){switch(c){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Do={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(h,c){if(c.type===20&&c.value==="none")return null;if(c.type===18){var g=Uo[c.name];if(typeof g=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+c.name+'"');return g(c.values)}return null}},Lo=function(h){var c=h.filter(function(g){return g.type===17}).map(function(g){return g.number});return c.length===6?c:null},ZA=function(h){var c=h.filter(function(we){return we.type===17}).map(function(we){return we.number}),g=c[0],d=c[1];c[2],c[3];var x=c[4],U=c[5];c[6],c[7],c[8],c[9],c[10],c[11];var ae=c[12],Ee=c[13];return c[14],c[15],c.length===16?[g,d,x,U,ae,Ee]:null},Uo={matrix:Lo,matrix3d:ZA},Ro={type:16,number:50,flags:li},ko=[Ro,Ro],Tl={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(h,c){var g=c.filter(Bi);return g.length!==2?ko:[g[0],g[1]]}},Qo={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(h,c){switch(c){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},eA;(function(h){h.NORMAL="normal",h.BREAK_ALL="break-all",h.KEEP_ALL="keep-all"})(eA||(eA={}));for(var Oo={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(h,c){switch(c){case"break-all":return eA.BREAK_ALL;case"keep-all":return eA.KEEP_ALL;case"normal":default:return eA.NORMAL}}},Il={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(h,c){if(c.type===20)return{auto:!0,order:0};if(os(c))return{auto:!1,order:c.number};throw new Error("Invalid z-index number parsed")}},Po={name:"time",parse:function(h,c){if(c.type===15)switch(c.unit.toLowerCase()){case"s":return 1e3*c.number;case"ms":return c.number}throw new Error("Unsupported time type")}},Dl={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(h,c){return os(c)?c.number:1}},Mo={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ll={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(h,c){return c.filter(Qr).map(function(g){switch(g.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(g){return g!==0})}},No={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(h,c){var g=[],d=[];return c.forEach(function(x){switch(x.type){case 20:case 0:g.push(x.value);break;case 17:g.push(x.number.toString());break;case 4:d.push(g.join(" ")),g.length=0;break}}),g.length&&d.push(g.join(" ")),d.map(function(x){return x.indexOf(" ")===-1?x:"'"+x+"'"})}},tA={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},YA={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(h,c){if(os(c))return c.number;if(Qr(c))switch(c.value){case"bold":return 700;case"normal":default:return 400}return 400}},Ho={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(h,c){return c.filter(Qr).map(function(g){return g.value})}},Xi={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(h,c){switch(c){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},vi=function(h,c){return(h&c)!==0},jA={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(h,c){if(c.length===0)return[];var g=c[0];return g.type===20&&g.value==="none"?[]:c}},fu={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(h,c){if(c.length===0)return null;var g=c[0];if(g.type===20&&g.value==="none")return null;for(var d=[],x=c.filter(vr),U=0;U<x.length;U++){var ae=x[U],Ee=x[U+1];if(ae.type===20){var we=Ee&&os(Ee)?Ee.number:1;d.push({counter:ae.value,increment:we})}}return d}},Ko={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(h,c){if(c.length===0)return[];for(var g=[],d=c.filter(vr),x=0;x<d.length;x++){var U=d[x],ae=d[x+1];if(Qr(U)&&U.value!=="none"){var Ee=ae&&os(ae)?ae.number:0;g.push({counter:U.value,reset:Ee})}}return g}},BA={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(h,c){return c.filter(Os).map(function(g){return Po.parse(h,g)})}},XA={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(h,c){if(c.length===0)return null;var g=c[0];if(g.type===20&&g.value==="none")return null;var d=[],x=c.filter(Ln);if(x.length%2!==0)return null;for(var U=0;U<x.length;U+=2){var ae=x[U].value,Ee=x[U+1].value;d.push({open:ae,close:Ee})}return d}},la=function(h,c,g){if(!h)return"";var d=h[Math.min(c,h.length-1)];return d?g?d.open:d.close:""},$o={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(h,c){return c.length===1&&Bn(c[0],"none")?[]:Pr(c).map(function(g){for(var d={color:255,offsetX:Di,offsetY:Di,blur:Di,spread:Di,inset:!1},x=0,U=0;U<g.length;U++){var ae=g[U];Bn(ae,"inset")?d.inset=!0:Qi(ae)?(x===0?d.offsetX=ae:x===1?d.offsetY=ae:x===2?d.blur=ae:d.spread=ae,x++):d.color=Ks.parse(h,ae)}return d})}},ba={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(h,c){var g=[0,1,2],d=[];return c.filter(Qr).forEach(function(x){switch(x.value){case"stroke":d.push(1);break;case"fill":d.push(0);break;case"markers":d.push(2);break}}),g.forEach(function(x){d.indexOf(x)===-1&&d.push(x)}),d}},ct={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},JA={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(h,c){return Os(c)?c.number:0}},bA=function(){function h(c,g){var d,x;this.animationDuration=On(c,BA,g.animationDuration),this.backgroundClip=On(c,us,g.backgroundClip),this.backgroundColor=On(c,za,g.backgroundColor),this.backgroundImage=On(c,RA,g.backgroundImage),this.backgroundOrigin=On(c,kA,g.backgroundOrigin),this.backgroundPosition=On(c,Bo,g.backgroundPosition),this.backgroundRepeat=On(c,mA,g.backgroundRepeat),this.backgroundSize=On(c,bo,g.backgroundSize),this.borderTopColor=On(c,Ea,g.borderTopColor),this.borderRightColor=On(c,dl,g.borderRightColor),this.borderBottomColor=On(c,gl,g.borderBottomColor),this.borderLeftColor=On(c,cu,g.borderLeftColor),this.borderTopLeftRadius=On(c,QA,g.borderTopLeftRadius),this.borderTopRightRadius=On(c,OA,g.borderTopRightRadius),this.borderBottomRightRadius=On(c,Vs,g.borderBottomRightRadius),this.borderBottomLeftRadius=On(c,ka,g.borderBottomLeftRadius),this.borderTopStyle=On(c,PA,g.borderTopStyle),this.borderRightStyle=On(c,MA,g.borderRightStyle),this.borderBottomStyle=On(c,NA,g.borderBottomStyle),this.borderLeftStyle=On(c,Co,g.borderLeftStyle),this.borderTopWidth=On(c,HA,g.borderTopWidth),this.borderRightWidth=On(c,pl,g.borderRightWidth),this.borderBottomWidth=On(c,KA,g.borderBottomWidth),this.borderLeftWidth=On(c,xo,g.borderLeftWidth),this.boxShadow=On(c,$o,g.boxShadow),this.color=On(c,ml,g.color),this.direction=On(c,So,g.direction),this.display=On(c,_l,g.display),this.float=On(c,$A,g.cssFloat),this.fontFamily=On(c,No,g.fontFamily),this.fontSize=On(c,tA,g.fontSize),this.fontStyle=On(c,Xi,g.fontStyle),this.fontVariant=On(c,Ho,g.fontVariant),this.fontWeight=On(c,YA,g.fontWeight),this.letterSpacing=On(c,yl,g.letterSpacing),this.lineBreak=On(c,wl,g.lineBreak),this.lineHeight=On(c,El,g.lineHeight),this.listStyleImage=On(c,Bl,g.listStyleImage),this.listStylePosition=On(c,bl,g.listStylePosition),this.listStyleType=On(c,GA,g.listStyleType),this.marginTop=On(c,wA,g.marginTop),this.marginRight=On(c,Cl,g.marginRight),this.marginBottom=On(c,VA,g.marginBottom),this.marginLeft=On(c,To,g.marginLeft),this.opacity=On(c,Dl,g.opacity);var U=On(c,xl,g.overflow);this.overflowX=U[0],this.overflowY=U[U.length>1?1:0],this.overflowWrap=On(c,Ba,g.overflowWrap),this.paddingTop=On(c,Ds,g.paddingTop),this.paddingRight=On(c,WA,g.paddingRight),this.paddingBottom=On(c,Io,g.paddingBottom),this.paddingLeft=On(c,EA,g.paddingLeft),this.paintOrder=On(c,ba,g.paintOrder),this.position=On(c,zA,g.position),this.textAlign=On(c,qa,g.textAlign),this.textDecorationColor=On(c,Mo,(d=g.textDecorationColor)!==null&&d!==void 0?d:g.color),this.textDecorationLine=On(c,Ll,(x=g.textDecorationLine)!==null&&x!==void 0?x:g.textDecoration),this.textShadow=On(c,Sl,g.textShadow),this.textTransform=On(c,Fl,g.textTransform),this.transform=On(c,Do,g.transform),this.transformOrigin=On(c,Tl,g.transformOrigin),this.visibility=On(c,Qo,g.visibility),this.webkitTextStrokeColor=On(c,ct,g.webkitTextStrokeColor),this.webkitTextStrokeWidth=On(c,JA,g.webkitTextStrokeWidth),this.wordBreak=On(c,Oo,g.wordBreak),this.zIndex=On(c,Il,g.zIndex)}return h.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},h.prototype.isTransparent=function(){return is(this.backgroundColor)},h.prototype.isTransformed=function(){return this.transform!==null},h.prototype.isPositioned=function(){return this.position!==0},h.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},h.prototype.isFloating=function(){return this.float!==0},h.prototype.isInlineLevel=function(){return vi(this.display,4)||vi(this.display,33554432)||vi(this.display,268435456)||vi(this.display,536870912)||vi(this.display,67108864)||vi(this.display,134217728)},h}(),Go=function(){function h(c,g){this.content=On(c,jA,g.content),this.quotes=On(c,XA,g.quotes)}return h}(),Ca=function(){function h(c,g){this.counterIncrement=On(c,fu,g.counterIncrement),this.counterReset=On(c,Ko,g.counterReset)}return h}(),On=function(h,c,g){var d=new vs,x=g!==null&&typeof g!="undefined"?g.toString():c.initialValue;d.write(x);var U=new Qs(d.read());switch(c.type){case 2:var ae=U.parseComponentValue();return c.parse(h,Qr(ae)?ae.value:c.initialValue);case 0:return c.parse(h,U.parseComponentValue());case 1:return c.parse(h,U.parseComponentValues());case 4:return U.parseComponentValue();case 3:switch(c.format){case"angle":return pa.parse(h,U.parseComponentValue());case"color":return Ks.parse(h,U.parseComponentValue());case"image":return oa.parse(h,U.parseComponentValue());case"length":var Ee=U.parseComponentValue();return Qi(Ee)?Ee:Di;case"length-percentage":var we=U.parseComponentValue();return Bi(we)?we:Di;case"time":return Po.parse(h,U.parseComponentValue())}break}},Ul="data-html2canvas-debug",Rl=function(h){var c=h.getAttribute(Ul);switch(c){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Vo=function(h,c){var g=Rl(h);return g===1||c===g},Ws=function(){function h(c,g){if(this.context=c,this.textNodes=[],this.elements=[],this.flags=0,Vo(g,3))debugger;this.styles=new bA(c,window.getComputedStyle(g,null)),Nl(g)&&(this.styles.animationDuration.some(function(d){return d>0})&&(g.style.animationDuration="0s"),this.styles.transform!==null&&(g.style.transform="none")),this.bounds=y(this.context,g),Vo(g,4)&&(this.flags|=16)}return h}(),Qa="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Oa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Pa=0;Pa<CA.length;Pa++)Oa[CA.charCodeAt(Pa)]=Pa;for(var Ls=function(h){var c=h.length*.75,g=h.length,d,x=0,U,ae,Ee,we;h[h.length-1]==="="&&(c--,h[h.length-2]==="="&&c--);var Ze=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),tt=Array.isArray(Ze)?Ze:new Uint8Array(Ze);for(d=0;d<g;d+=4)U=Oa[h.charCodeAt(d)],ae=Oa[h.charCodeAt(d+1)],Ee=Oa[h.charCodeAt(d+2)],we=Oa[h.charCodeAt(d+3)],tt[x++]=U<<2|ae>>4,tt[x++]=(ae&15)<<4|Ee>>2,tt[x++]=(Ee&3)<<6|we&63;return Ze},kl=function(h){for(var c=h.length,g=[],d=0;d<c;d+=2)g.push(h[d+1]<<8|h[d]);return g},qA=function(h){for(var c=h.length,g=[],d=0;d<c;d+=4)g.push(h[d+3]<<24|h[d+2]<<16|h[d+1]<<8|h[d]);return g},ua=5,xa=11,nA=2,Wo=xa-ua,eo=65536>>ua,zs=1<<ua,Sa=zs-1,to=1024>>ua,zo=eo+to,no=zo,Ma=32,Ql=no+Ma,hu=65536>>xa,ro=1<<Wo,Zo=ro-1,cs=function(h,c,g){return h.slice?h.slice(c,g):new Uint16Array(Array.prototype.slice.call(h,c,g))},io=function(h,c,g){return h.slice?h.slice(c,g):new Uint32Array(Array.prototype.slice.call(h,c,g))},xA=function(h,c){var g=Ls(h),d=Array.isArray(g)?qA(g):new Uint32Array(g),x=Array.isArray(g)?kl(g):new Uint16Array(g),U=24,ae=cs(x,U/2,d[4]/2),Ee=d[5]===2?cs(x,(U+d[4])/2):io(d,Math.ceil((U+d[4])/4));return new SA(d[0],d[1],d[2],d[3],ae,Ee)},SA=function(){function h(c,g,d,x,U,ae){this.initialValue=c,this.errorValue=g,this.highStart=d,this.highValueIndex=x,this.index=U,this.data=ae}return h.prototype.get=function(c){var g;if(c>=0){if(c<55296||c>56319&&c<=65535)return g=this.index[c>>ua],g=(g<<nA)+(c&Sa),this.data[g];if(c<=65535)return g=this.index[eo+(c-55296>>ua)],g=(g<<nA)+(c&Sa),this.data[g];if(c<this.highStart)return g=Ql-hu+(c>>xa),g=this.index[g],g+=c>>ua&Zo,g=this.index[g],g=(g<<nA)+(c&Sa),this.data[g];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},h}(),qs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),FA=0;FA<qs.length;FA++)rA[qs.charCodeAt(FA)]=FA;var Ol=1,TA=2,so=3,ao=4,Yo=5,jo=7,Xo=8,iA=9,Na=10,Pl=11,ps=12,du=13,l=14,C=15,p=function(h){for(var c=[],g=0,d=h.length;g<d;){var x=h.charCodeAt(g++);if(x>=55296&&x<=56319&&g<d){var U=h.charCodeAt(g++);(U&64512)===56320?c.push(((x&1023)<<10)+(U&1023)+65536):(c.push(x),g--)}else c.push(x)}return c},R=function(){for(var h=[],c=0;c<arguments.length;c++)h[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,h);var g=h.length;if(!g)return"";for(var d=[],x=-1,U="";++x<g;){var ae=h[x];ae<=65535?d.push(ae):(ae-=65536,d.push((ae>>10)+55296,ae%1024+56320)),(x+1===g||d.length>16384)&&(U+=String.fromCharCode.apply(String,d),d.length=0)}return U},j=xA(Qa),te="\xD7",Ye="\xF7",Ne=function(h){return j.get(h)},rn=function(h,c,g){var d=g-2,x=c[d],U=c[g-1],ae=c[g];if(U===TA&&ae===so)return te;if(U===TA||U===so||U===ao||ae===TA||ae===so||ae===ao)return Ye;if(U===Xo&&[Xo,iA,Pl,ps].indexOf(ae)!==-1||(U===Pl||U===iA)&&(ae===iA||ae===Na)||(U===ps||U===Na)&&ae===Na||ae===du||ae===Yo||ae===jo||U===Ol)return te;if(U===du&&ae===l){for(;x===Yo;)x=c[--d];if(x===l)return te}if(U===C&&ae===C){for(var Ee=0;x===C;)Ee++,x=c[--d];if(Ee%2===0)return te}return Ye},Oe=function(h){var c=p(h),g=c.length,d=0,x=0,U=c.map(Ne);return{next:function(){if(d>=g)return{done:!0,value:null};for(var ae=te;d<g&&(ae=rn(c,U,++d))===te;);if(ae!==te||d===g){var Ee=R.apply(null,c.slice(x,d));return x=d,{value:Ee,done:!1}}return{done:!0,value:null}}}},it=function(h){for(var c=Oe(h),g=[],d;!(d=c.next()).done;)d.value&&g.push(d.value.slice());return g},Pn=function(h){var c=123;if(h.createRange){var g=h.createRange();if(g.getBoundingClientRect){var d=h.createElement("boundtest");d.style.height=c+"px",d.style.display="block",h.body.appendChild(d),g.selectNode(d);var x=g.getBoundingClientRect(),U=Math.round(x.height);if(h.body.removeChild(d),U===c)return!0}}return!1},hn=function(h){var c=h.createElement("boundtest");c.style.width="50px",c.style.display="block",c.style.fontSize="12px",c.style.letterSpacing="0px",c.style.wordSpacing="0px",h.body.appendChild(c);var g=h.createRange();c.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var d=c.firstChild,x=V(d.data).map(function(we){return o(we)}),U=0,ae={},Ee=x.every(function(we,Ze){g.setStart(d,U),g.setEnd(d,U+we.length);var tt=g.getBoundingClientRect();U+=we.length;var pt=tt.x>ae.x||tt.y>ae.y;return ae=tt,Ze===0?!0:pt});return h.body.removeChild(c),Ee},Zt=function(){return typeof new Image().crossOrigin!="undefined"},Wn=function(){return typeof new XMLHttpRequest().responseType=="string"},si=function(h){var c=new Image,g=h.createElement("canvas"),d=g.getContext("2d");if(!d)return!1;c.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{d.drawImage(c,0,0),g.toDataURL()}catch(x){return!1}return!0},xr=function(h){return h[0]===0&&h[1]===255&&h[2]===0&&h[3]===255},mr=function(h){var c=h.createElement("canvas"),g=100;c.width=g,c.height=g;var d=c.getContext("2d");if(!d)return Promise.reject(!1);d.fillStyle="rgb(0, 255, 0)",d.fillRect(0,0,g,g);var x=new Image,U=c.toDataURL();x.src=U;var ae=Kr(g,g,0,0,x);return d.fillStyle="red",d.fillRect(0,0,g,g),gr(ae).then(function(Ee){d.drawImage(Ee,0,0);var we=d.getImageData(0,0,g,g).data;d.fillStyle="red",d.fillRect(0,0,g,g);var Ze=h.createElement("div");return Ze.style.backgroundImage="url("+U+")",Ze.style.height=g+"px",xr(we)?gr(Kr(g,g,0,0,Ze)):Promise.reject(!1)}).then(function(Ee){return d.drawImage(Ee,0,0),xr(d.getImageData(0,0,g,g).data)}).catch(function(){return!1})},Kr=function(h,c,g,d,x){var U="http://www.w3.org/2000/svg",ae=document.createElementNS(U,"svg"),Ee=document.createElementNS(U,"foreignObject");return ae.setAttributeNS(null,"width",h.toString()),ae.setAttributeNS(null,"height",c.toString()),Ee.setAttributeNS(null,"width","100%"),Ee.setAttributeNS(null,"height","100%"),Ee.setAttributeNS(null,"x",g.toString()),Ee.setAttributeNS(null,"y",d.toString()),Ee.setAttributeNS(null,"externalResourcesRequired","true"),ae.appendChild(Ee),Ee.appendChild(x),ae},gr=function(h){return new Promise(function(c,g){var d=new Image;d.onload=function(){return c(d)},d.onerror=g,d.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(h))})},An={get SUPPORT_RANGE_BOUNDS(){var h=Pn(document);return Object.defineProperty(An,"SUPPORT_RANGE_BOUNDS",{value:h}),h},get SUPPORT_WORD_BREAKING(){var h=An.SUPPORT_RANGE_BOUNDS&&hn(document);return Object.defineProperty(An,"SUPPORT_WORD_BREAKING",{value:h}),h},get SUPPORT_SVG_DRAWING(){var h=si(document);return Object.defineProperty(An,"SUPPORT_SVG_DRAWING",{value:h}),h},get SUPPORT_FOREIGNOBJECT_DRAWING(){var h=typeof Array.from=="function"&&typeof window.fetch=="function"?mr(document):Promise.resolve(!1);return Object.defineProperty(An,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:h}),h},get SUPPORT_CORS_IMAGES(){var h=Zt();return Object.defineProperty(An,"SUPPORT_CORS_IMAGES",{value:h}),h},get SUPPORT_RESPONSE_TYPE(){var h=Wn();return Object.defineProperty(An,"SUPPORT_RESPONSE_TYPE",{value:h}),h},get SUPPORT_CORS_XHR(){var h="withCredentials"in new XMLHttpRequest;return Object.defineProperty(An,"SUPPORT_CORS_XHR",{value:h}),h},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var h=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(An,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:h}),h}},Tr=function(){function h(c,g){this.text=c,this.bounds=g}return h}(),bi=function(h,c,g,d){var x=zr(c,g),U=[],ae=0;return x.forEach(function(Ee){if(g.textDecorationLine.length||Ee.trim().length>0)if(An.SUPPORT_RANGE_BOUNDS){var we=di(d,ae,Ee.length).getClientRects();if(we.length>1){var Ze=Mr(Ee),tt=0;Ze.forEach(function(Mt){U.push(new Tr(Mt,ne.fromDOMRectList(h,di(d,tt+ae,Mt.length).getClientRects()))),tt+=Mt.length})}else U.push(new Tr(Ee,ne.fromDOMRectList(h,we)))}else{var pt=d.splitText(Ee.length);U.push(new Tr(Ee,Ar(h,d))),d=pt}else An.SUPPORT_RANGE_BOUNDS||(d=d.splitText(Ee.length));ae+=Ee.length}),U},Ar=function(h,c){var g=c.ownerDocument;if(g){var d=g.createElement("html2canvaswrapper");d.appendChild(c.cloneNode(!0));var x=c.parentNode;if(x){x.replaceChild(d,c);var U=y(h,d);return d.firstChild&&x.replaceChild(d.firstChild,d),U}}return ne.EMPTY},di=function(h,c,g){var d=h.ownerDocument;if(!d)throw new Error("Node has no owner document");var x=d.createRange();return x.setStart(h,c),x.setEnd(h,c+g),x},Mr=function(h){if(An.SUPPORT_NATIVE_TEXT_SEGMENTATION){var c=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(c.segment(h)).map(function(g){return g.segment})}return it(h)},yr=function(h,c){if(An.SUPPORT_NATIVE_TEXT_SEGMENTATION){var g=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(g.segment(h)).map(function(d){return d.segment})}return IA(h,c)},zr=function(h,c){return c.letterSpacing!==0?Mr(h):yr(h,c)},ea=[32,160,4961,65792,65793,4153,4241],IA=function(h,c){for(var g=ir(h,{lineBreak:c.lineBreak,wordBreak:c.overflowWrap==="break-word"?"break-word":c.wordBreak}),d=[],x,U=function(){if(x.value){var ae=x.value.slice(),Ee=V(ae),we="";Ee.forEach(function(Ze){ea.indexOf(Ze)===-1?we+=o(Ze):(we.length&&d.push(we),d.push(o(Ze)),we="")}),we.length&&d.push(we)}};!(x=g.next()).done;)U();return d},sA=function(){function h(c,g,d){this.text=DA(g.data,d.textTransform),this.textBounds=bi(c,this.text,d,g)}return h}(),DA=function(h,c){switch(c){case 1:return h.toLowerCase();case 3:return h.replace(Wu,gu);case 2:return h.toUpperCase();default:return h}},Wu=/(^|\s|:|-|\(|\))([a-z])/g,gu=function(h,c,g){return h.length>0?c+g.toUpperCase():h},ta=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this;return x.src=d.currentSrc||d.src,x.intrinsicWidth=d.naturalWidth,x.intrinsicHeight=d.naturalHeight,x.context.cache.addImage(x.src),x}return c}(Ws),Hi=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this;return x.canvas=d,x.intrinsicWidth=d.width,x.intrinsicHeight=d.height,x}return c}(Ws),Ha=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this,U=new XMLSerializer,ae=y(g,d);return d.setAttribute("width",ae.width+"px"),d.setAttribute("height",ae.height+"px"),x.svg="data:image/svg+xml,"+encodeURIComponent(U.serializeToString(d)),x.intrinsicWidth=d.width.baseVal.value,x.intrinsicHeight=d.height.baseVal.value,x.context.cache.addImage(x.svg),x}return c}(Ws),Fa=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this;return x.value=d.value,x}return c}(Ws),Ml=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this;return x.start=d.start,x.reversed=typeof d.reversed=="boolean"&&d.reversed===!0,x}return c}(Ws),zu=[{type:15,flags:0,unit:"px",number:3}],Zu=[{type:16,flags:0,number:50}],Yu=function(h){return h.width>h.height?new ne(h.left+(h.width-h.height)/2,h.top,h.height,h.height):h.width<h.height?new ne(h.left,h.top+(h.height-h.width)/2,h.width,h.width):h},ju=function(h){var c=h.type===Xu?new Array(h.value.length+1).join("\u2022"):h.value;return c.length===0?h.placeholder||"":c},Jo="checkbox",Ao="radio",Xu="password",oo=707406591,lo=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this;switch(x.type=d.type.toLowerCase(),x.checked=d.checked,x.value=ju(d),(x.type===Jo||x.type===Ao)&&(x.styles.backgroundColor=3739148031,x.styles.borderTopColor=x.styles.borderRightColor=x.styles.borderBottomColor=x.styles.borderLeftColor=2779096575,x.styles.borderTopWidth=x.styles.borderRightWidth=x.styles.borderBottomWidth=x.styles.borderLeftWidth=1,x.styles.borderTopStyle=x.styles.borderRightStyle=x.styles.borderBottomStyle=x.styles.borderLeftStyle=1,x.styles.backgroundClip=[0],x.styles.backgroundOrigin=[0],x.bounds=Yu(x.bounds)),x.type){case Jo:x.styles.borderTopRightRadius=x.styles.borderTopLeftRadius=x.styles.borderBottomRightRadius=x.styles.borderBottomLeftRadius=zu;break;case Ao:x.styles.borderTopRightRadius=x.styles.borderTopLeftRadius=x.styles.borderBottomRightRadius=x.styles.borderBottomLeftRadius=Zu;break}return x}return c}(Ws),uo=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this,U=d.options[d.selectedIndex||0];return x.value=U&&U.text||"",x}return c}(Ws),Ju=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this;return x.value=d.value,x}return c}(Ws),pu=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this;x.src=d.src,x.width=parseInt(d.width,10)||0,x.height=parseInt(d.height,10)||0,x.backgroundColor=x.styles.backgroundColor;try{if(d.contentWindow&&d.contentWindow.document&&d.contentWindow.document.documentElement){x.tree=_u(g,d.contentWindow.document.documentElement);var U=d.contentWindow.document.documentElement?sa(g,getComputedStyle(d.contentWindow.document.documentElement).backgroundColor):Bs.TRANSPARENT,ae=d.contentWindow.document.body?sa(g,getComputedStyle(d.contentWindow.document.body).backgroundColor):Bs.TRANSPARENT;x.backgroundColor=is(U)?is(ae)?x.styles.backgroundColor:ae:U}}catch(Ee){}return x}return c}(Ws),mu=["OL","UL","MENU"],co=function(h,c,g,d){for(var x=c.firstChild,U=void 0;x;x=U)if(U=x.nextSibling,vu(x)&&x.data.trim().length>0)g.textNodes.push(new sA(h,x,g.styles));else if(aA(x))if(Cu(x)&&x.assignedNodes)x.assignedNodes().forEach(function(Ee){return co(h,Ee,g,d)});else{var ae=qo(h,x);ae.styles.isVisible()&&(qu(x,ae,d)?ae.flags|=4:el(ae.styles)&&(ae.flags|=2),mu.indexOf(x.tagName)!==-1&&(ae.flags|=8),g.elements.push(ae),x.slot,x.shadowRoot?co(h,x.shadowRoot,ae,d):!nl(x)&&!Hl(x)&&!rl(x)&&co(h,x,ae,d))}},qo=function(h,c){return $l(c)?new ta(h,c):yu(c)?new Hi(h,c):Hl(c)?new Ha(h,c):ec(c)?new Fa(h,c):tc(c)?new Ml(h,c):nc(c)?new lo(h,c):rl(c)?new uo(h,c):nl(c)?new Ju(h,c):Eu(c)?new pu(h,c):new Ws(h,c)},_u=function(h,c){var g=qo(h,c);return g.flags|=4,co(h,c,g,g),g},qu=function(h,c,g){return c.styles.isPositionedWithZIndex()||c.styles.opacity<1||c.styles.isTransformed()||Kl(h)&&g.styles.isTransparent()},el=function(h){return h.isPositioned()||h.isFloating()},vu=function(h){return h.nodeType===Node.TEXT_NODE},aA=function(h){return h.nodeType===Node.ELEMENT_NODE},Nl=function(h){return aA(h)&&typeof h.style!="undefined"&&!tl(h)},tl=function(h){return typeof h.className=="object"},ec=function(h){return h.tagName==="LI"},tc=function(h){return h.tagName==="OL"},nc=function(h){return h.tagName==="INPUT"},rc=function(h){return h.tagName==="HTML"},Hl=function(h){return h.tagName==="svg"},Kl=function(h){return h.tagName==="BODY"},yu=function(h){return h.tagName==="CANVAS"},wu=function(h){return h.tagName==="VIDEO"},$l=function(h){return h.tagName==="IMG"},Eu=function(h){return h.tagName==="IFRAME"},Bu=function(h){return h.tagName==="STYLE"},bu=function(h){return h.tagName==="SCRIPT"},nl=function(h){return h.tagName==="TEXTAREA"},rl=function(h){return h.tagName==="SELECT"},Cu=function(h){return h.tagName==="SLOT"},xu=function(h){return h.tagName.indexOf("-")>0},Su=function(){function h(){this.counters={}}return h.prototype.getCounterValue=function(c){var g=this.counters[c];return g&&g.length?g[g.length-1]:1},h.prototype.getCounterValues=function(c){var g=this.counters[c];return g||[]},h.prototype.pop=function(c){var g=this;c.forEach(function(d){return g.counters[d].pop()})},h.prototype.parse=function(c){var g=this,d=c.counterIncrement,x=c.counterReset,U=!0;d!==null&&d.forEach(function(Ee){var we=g.counters[Ee.counter];we&&Ee.increment!==0&&(U=!1,we.length||we.push(1),we[Math.max(0,we.length-1)]+=Ee.increment)});var ae=[];return U&&x.forEach(function(Ee){var we=g.counters[Ee.counter];ae.push(Ee.counter),we||(we=g.counters[Ee.counter]=[]),we.push(Ee.reset)}),ae},h}(),Gl={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},AA={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},il={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},ic={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},as=function(h,c,g,d,x,U){return h<c||h>g?fa(h,x,U.length>0):d.integers.reduce(function(ae,Ee,we){for(;h>=Ee;)h-=Ee,ae+=d.values[we];return ae},"")+U},Vl=function(h,c,g,d){var x="";do g||h--,x=d(h)+x,h/=c;while(h*c>=c);return x},Yi=function(h,c,g,d,x){var U=g-c+1;return(h<0?"-":"")+(Vl(Math.abs(h),U,d,function(ae){return o(Math.floor(ae%U)+c)})+x)},Ka=function(h,c,g){g===void 0&&(g=". ");var d=c.length;return Vl(Math.abs(h),d,!1,function(x){return c[Math.floor(x%d)]})+g},oA=1,Ms=2,ca=4,fo=8,Ta=function(h,c,g,d,x,U){if(h<-9999||h>9999)return fa(h,4,x.length>0);var ae=Math.abs(h),Ee=x;if(ae===0)return c[0]+Ee;for(var we=0;ae>0&&we<=4;we++){var Ze=ae%10;Ze===0&&vi(U,oA)&&Ee!==""?Ee=c[Ze]+Ee:Ze>1||Ze===1&&we===0||Ze===1&&we===1&&vi(U,Ms)||Ze===1&&we===1&&vi(U,ca)&&h>100||Ze===1&&we>1&&vi(U,fo)?Ee=c[Ze]+(we>0?g[we-1]:"")+Ee:Ze===1&&we>0&&(Ee=g[we-1]+Ee),ae=Math.floor(ae/10)}return(h<0?d:"")+Ee},ho="\u5341\u767E\u5343\u842C",Fu="\u62FE\u4F70\u4EDF\u842C",Tu="\u30DE\u30A4\u30CA\u30B9",lA="\uB9C8\uC774\uB108\uC2A4",fa=function(h,c,g){var d=g?". ":"",x=g?"\u3001":"",U=g?", ":"",ae=g?" ":"";switch(c){case 0:return"\u2022"+ae;case 1:return"\u25E6"+ae;case 2:return"\u25FE"+ae;case 5:var Ee=Yi(h,48,57,!0,d);return Ee.length<4?"0"+Ee:Ee;case 4:return Ka(h,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",x);case 6:return as(h,1,3999,Gl,3,d).toLowerCase();case 7:return as(h,1,3999,Gl,3,d);case 8:return Yi(h,945,969,!1,d);case 9:return Yi(h,97,122,!1,d);case 10:return Yi(h,65,90,!1,d);case 11:return Yi(h,1632,1641,!0,d);case 12:case 49:return as(h,1,9999,AA,3,d);case 35:return as(h,1,9999,AA,3,d).toLowerCase();case 13:return Yi(h,2534,2543,!0,d);case 14:case 30:return Yi(h,6112,6121,!0,d);case 15:return Ka(h,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",x);case 16:return Ka(h,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",x);case 17:case 48:return Ta(h,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ho,"\u8CA0",x,Ms|ca|fo);case 47:return Ta(h,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Fu,"\u8CA0",x,oA|Ms|ca|fo);case 42:return Ta(h,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ho,"\u8D1F",x,Ms|ca|fo);case 41:return Ta(h,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Fu,"\u8D1F",x,oA|Ms|ca|fo);case 26:return Ta(h,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Tu,x,0);case 25:return Ta(h,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Tu,x,oA|Ms|ca);case 31:return Ta(h,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",lA,U,oA|Ms|ca);case 33:return Ta(h,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",lA,U,0);case 32:return Ta(h,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",lA,U,oA|Ms|ca);case 18:return Yi(h,2406,2415,!0,d);case 20:return as(h,1,19999,ic,3,d);case 21:return Yi(h,2790,2799,!0,d);case 22:return Yi(h,2662,2671,!0,d);case 22:return as(h,1,10999,il,3,d);case 23:return Ka(h,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Ka(h,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return Yi(h,3302,3311,!0,d);case 28:return Ka(h,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",x);case 29:return Ka(h,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",x);case 34:return Yi(h,3792,3801,!0,d);case 37:return Yi(h,6160,6169,!0,d);case 38:return Yi(h,4160,4169,!0,d);case 39:return Yi(h,2918,2927,!0,d);case 40:return Yi(h,1776,1785,!0,d);case 43:return Yi(h,3046,3055,!0,d);case 44:return Yi(h,3174,3183,!0,d);case 45:return Yi(h,3664,3673,!0,d);case 46:return Yi(h,3872,3881,!0,d);case 3:default:return Yi(h,48,57,!0,d)}},go="data-html2canvas-ignore",Iu=function(){function h(c,g,d){if(this.context=c,this.options=d,this.scrolledElements=[],this.referenceElement=g,this.counters=new Su,this.quoteDepth=0,!g.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(g.ownerDocument.documentElement,!1)}return h.prototype.toIFrame=function(c,g){var d=this,x=Wl(c,g);if(!x.contentWindow)return Promise.reject("Unable to find iframe window");var U=c.defaultView.pageXOffset,ae=c.defaultView.pageYOffset,Ee=x.contentWindow,we=Ee.document,Ze=sc(x).then(function(){return Te(d,void 0,void 0,function(){var tt,pt;return He(this,function(Mt){switch(Mt.label){case 0:return this.scrolledElements.forEach(na),Ee&&(Ee.scrollTo(g.left,g.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ee.scrollY!==g.top||Ee.scrollX!==g.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ee.scrollX-g.left,Ee.scrollY-g.top,0,0))),tt=this.options.onclone,pt=this.clonedReferenceElement,typeof pt=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:we.fonts&&we.fonts.ready?[4,we.fonts.ready]:[3,2];case 1:Mt.sent(),Mt.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,zl(we)]:[3,4];case 3:Mt.sent(),Mt.label=4;case 4:return typeof tt=="function"?[2,Promise.resolve().then(function(){return tt(we,pt)}).then(function(){return x})]:[2,x]}})})});return we.open(),we.write(Lu(document.doctype)+"<html></html>"),ac(this.referenceElement.ownerDocument,U,ae),we.replaceChild(we.adoptNode(this.documentElement),we.documentElement),we.close(),Ze},h.prototype.createElementClone=function(c){if(Vo(c,2))debugger;if(yu(c))return this.createCanvasClone(c);if(wu(c))return this.createVideoClone(c);if(Bu(c))return this.createStyleClone(c);var g=c.cloneNode(!1);return $l(g)&&($l(c)&&c.currentSrc&&c.currentSrc!==c.src&&(g.src=c.currentSrc,g.srcset=""),g.loading==="lazy"&&(g.loading="eager")),xu(g)?this.createCustomElementClone(g):g},h.prototype.createCustomElementClone=function(c){var g=document.createElement("html2canvascustomelement");return Zl(c.style,g),g},h.prototype.createStyleClone=function(c){try{var g=c.sheet;if(g&&g.cssRules){var d=[].slice.call(g.cssRules,0).reduce(function(U,ae){return ae&&typeof ae.cssText=="string"?U+ae.cssText:U},""),x=c.cloneNode(!1);return x.textContent=d,x}}catch(U){if(this.context.logger.error("Unable to access cssRules property",U),U.name!=="SecurityError")throw U}return c.cloneNode(!1)},h.prototype.createCanvasClone=function(c){var g;if(this.options.inlineImages&&c.ownerDocument){var d=c.ownerDocument.createElement("img");try{return d.src=c.toDataURL(),d}catch(Ze){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",c)}}var x=c.cloneNode(!1);try{x.width=c.width,x.height=c.height;var U=c.getContext("2d"),ae=x.getContext("2d");if(ae)if(!this.options.allowTaint&&U)ae.putImageData(U.getImageData(0,0,c.width,c.height),0,0);else{var Ee=(g=c.getContext("webgl2"))!==null&&g!==void 0?g:c.getContext("webgl");if(Ee){var we=Ee.getContextAttributes();(we==null?void 0:we.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",c)}ae.drawImage(c,0,0)}return x}catch(Ze){this.context.logger.info("Unable to clone canvas as it is tainted",c)}return x},h.prototype.createVideoClone=function(c){var g=c.ownerDocument.createElement("canvas");g.width=c.offsetWidth,g.height=c.offsetHeight;var d=g.getContext("2d");try{return d&&(d.drawImage(c,0,0,g.width,g.height),this.options.allowTaint||d.getImageData(0,0,g.width,g.height)),g}catch(U){this.context.logger.info("Unable to clone video as it is tainted",c)}var x=c.ownerDocument.createElement("canvas");return x.width=c.offsetWidth,x.height=c.offsetHeight,x},h.prototype.appendChildNode=function(c,g,d){(!aA(g)||!bu(g)&&!g.hasAttribute(go)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(g)))&&(!this.options.copyStyles||!aA(g)||!Bu(g))&&c.appendChild(this.cloneNode(g,d))},h.prototype.cloneChildNodes=function(c,g,d){for(var x=this,U=c.shadowRoot?c.shadowRoot.firstChild:c.firstChild;U;U=U.nextSibling)if(aA(U)&&Cu(U)&&typeof U.assignedNodes=="function"){var ae=U.assignedNodes();ae.length&&ae.forEach(function(Ee){return x.appendChildNode(g,Ee,d)})}else this.appendChildNode(g,U,d)},h.prototype.cloneNode=function(c,g){if(vu(c))return document.createTextNode(c.data);if(!c.ownerDocument)return c.cloneNode(!1);var d=c.ownerDocument.defaultView;if(d&&aA(c)&&(Nl(c)||tl(c))){var x=this.createElementClone(c);x.style.transitionProperty="none";var U=d.getComputedStyle(c),ae=d.getComputedStyle(c,":before"),Ee=d.getComputedStyle(c,":after");this.referenceElement===c&&Nl(x)&&(this.clonedReferenceElement=x),Kl(x)&&oc(x);var we=this.counters.parse(new Ca(this.context,U)),Ze=this.resolvePseudoContent(c,x,ae,po.BEFORE);xu(c)&&(g=!0),wu(c)||this.cloneChildNodes(c,x,g),Ze&&x.insertBefore(Ze,x.firstChild);var tt=this.resolvePseudoContent(c,x,Ee,po.AFTER);return tt&&x.appendChild(tt),this.counters.pop(we),(U&&(this.options.copyStyles||tl(c))&&!Eu(c)||g)&&Zl(U,x),(c.scrollTop!==0||c.scrollLeft!==0)&&this.scrolledElements.push([x,c.scrollLeft,c.scrollTop]),(nl(c)||rl(c))&&(nl(x)||rl(x))&&(x.value=c.value),x}return c.cloneNode(!1)},h.prototype.resolvePseudoContent=function(c,g,d,x){var U=this;if(d){var ae=d.content,Ee=g.ownerDocument;if(!(!Ee||!ae||ae==="none"||ae==="-moz-alt-content"||d.display==="none")){this.counters.parse(new Ca(this.context,d));var we=new Go(this.context,d),Ze=Ee.createElement("html2canvaspseudoelement");Zl(d,Ze),we.content.forEach(function(pt){if(pt.type===0)Ze.appendChild(Ee.createTextNode(pt.value));else if(pt.type===22){var Mt=Ee.createElement("img");Mt.src=pt.value,Mt.style.opacity="1",Ze.appendChild(Mt)}else if(pt.type===18){if(pt.name==="attr"){var Mn=pt.values.filter(Qr);Mn.length&&Ze.appendChild(Ee.createTextNode(c.getAttribute(Mn[0].value)||""))}else if(pt.name==="counter"){var gn=pt.values.filter(ti),Sn=gn[0],Ur=gn[1];if(Sn&&Qr(Sn)){var Jn=U.counters.getCounterValue(Sn.value),zn=Ur&&Qr(Ur)?GA.parse(U.context,Ur.value):3;Ze.appendChild(Ee.createTextNode(fa(Jn,zn,!1)))}}else if(pt.name==="counters"){var jr=pt.values.filter(ti),Sn=jr[0],Or=jr[1],Ur=jr[2];if(Sn&&Qr(Sn)){var wr=U.counters.getCounterValues(Sn.value),Nn=Ur&&Qr(Ur)?GA.parse(U.context,Ur.value):3,Xr=Or&&Or.type===0?Or.value:"",Jr=wr.map(function(Us){return fa(Us,Nn,!1)}).join(Xr);Ze.appendChild(Ee.createTextNode(Jr))}}}else if(pt.type===20)switch(pt.value){case"open-quote":Ze.appendChild(Ee.createTextNode(la(we.quotes,U.quoteDepth++,!0)));break;case"close-quote":Ze.appendChild(Ee.createTextNode(la(we.quotes,--U.quoteDepth,!1)));break;default:Ze.appendChild(Ee.createTextNode(pt.value))}}),Ze.className=UA+" "+Yl;var tt=x===po.BEFORE?" "+UA:" "+Yl;return tl(g)?g.className.baseValue+=tt:g.className+=tt,Ze}}},h.destroy=function(c){return c.parentNode?(c.parentNode.removeChild(c),!0):!1},h}(),po;(function(h){h[h.BEFORE=0]="BEFORE",h[h.AFTER=1]="AFTER"})(po||(po={}));var Wl=function(h,c){var g=h.createElement("iframe");return g.className="html2canvas-container",g.style.visibility="hidden",g.style.position="fixed",g.style.left="-10000px",g.style.top="0px",g.style.border="0",g.width=c.width.toString(),g.height=c.height.toString(),g.scrolling="no",g.setAttribute(go,"true"),h.body.appendChild(g),g},Du=function(h){return new Promise(function(c){if(h.complete){c();return}if(!h.src){c();return}h.onload=c,h.onerror=c})},zl=function(h){return Promise.all([].slice.call(h.images,0).map(Du))},sc=function(h){return new Promise(function(c,g){var d=h.contentWindow;if(!d)return g("No window assigned for iframe");var x=d.document;d.onload=h.onload=function(){d.onload=h.onload=null;var U=setInterval(function(){x.body.childNodes.length>0&&x.readyState==="complete"&&(clearInterval(U),c(h))},50)}})},LA=["all","d","content"],Zl=function(h,c){for(var g=h.length-1;g>=0;g--){var d=h.item(g);LA.indexOf(d)===-1&&c.style.setProperty(d,h.getPropertyValue(d))}return c},Lu=function(h){var c="";return h&&(c+="<!DOCTYPE ",h.name&&(c+=h.name),h.internalSubset&&(c+=h.internalSubset),h.publicId&&(c+='"'+h.publicId+'"'),h.systemId&&(c+='"'+h.systemId+'"'),c+=">"),c},ac=function(h,c,g){h&&h.defaultView&&(c!==h.defaultView.pageXOffset||g!==h.defaultView.pageYOffset)&&h.defaultView.scrollTo(c,g)},na=function(h){var c=h[0],g=h[1],d=h[2];c.scrollLeft=g,c.scrollTop=d},Ac=":before",Uu=":after",UA="___html2canvas___pseudoelement_before",Yl="___html2canvas___pseudoelement_after",jl=`{
content: "" !important;
display: none !important;
}`,oc=function(h){lc(h,"."+UA+Ac+jl+`
.`+Yl+Uu+jl)},lc=function(h,c){var g=h.ownerDocument;if(g){var d=g.createElement("style");d.textContent=c,h.appendChild(d)}},Ru=function(){function h(){}return h.getOrigin=function(c){var g=h._link;return g?(g.href=c,g.href=g.href,g.protocol+g.hostname+g.port):"about:blank"},h.isSameOrigin=function(c){return h.getOrigin(c)===h._origin},h.setContext=function(c){h._link=c.document.createElement("a"),h._origin=h.getOrigin(c.location.href)},h._origin="about:blank",h}(),ku=function(){function h(c,g){this.context=c,this._options=g,this._cache={}}return h.prototype.addImage=function(c){var g=Promise.resolve();return this.has(c)||(Jl(c)||cc(c))&&(this._cache[c]=this.loadImage(c)).catch(function(){}),g},h.prototype.match=function(c){return this._cache[c]},h.prototype.loadImage=function(c){return Te(this,void 0,void 0,function(){var g,d,x,U,ae=this;return He(this,function(Ee){switch(Ee.label){case 0:return g=Ru.isSameOrigin(c),d=!Xl(c)&&this._options.useCORS===!0&&An.SUPPORT_CORS_IMAGES&&!g,x=!Xl(c)&&!g&&!Jl(c)&&typeof this._options.proxy=="string"&&An.SUPPORT_CORS_XHR&&!d,!g&&this._options.allowTaint===!1&&!Xl(c)&&!Jl(c)&&!x&&!d?[2]:(U=c,x?[4,this.proxy(U)]:[3,2]);case 1:U=Ee.sent(),Ee.label=2;case 2:return this.context.logger.debug("Added image "+c.substring(0,256)),[4,new Promise(function(we,Ze){var tt=new Image;tt.onload=function(){return we(tt)},tt.onerror=Ze,(fc(U)||d)&&(tt.crossOrigin="anonymous"),tt.src=U,tt.complete===!0&&setTimeout(function(){return we(tt)},500),ae._options.imageTimeout>0&&setTimeout(function(){return Ze("Timed out ("+ae._options.imageTimeout+"ms) loading image")},ae._options.imageTimeout)})];case 3:return[2,Ee.sent()]}})})},h.prototype.has=function(c){return typeof this._cache[c]!="undefined"},h.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},h.prototype.proxy=function(c){var g=this,d=this._options.proxy;if(!d)throw new Error("No proxy defined");var x=c.substring(0,256);return new Promise(function(U,ae){var Ee=An.SUPPORT_RESPONSE_TYPE?"blob":"text",we=new XMLHttpRequest;we.onload=function(){if(we.status===200)if(Ee==="text")U(we.response);else{var pt=new FileReader;pt.addEventListener("load",function(){return U(pt.result)},!1),pt.addEventListener("error",function(Mt){return ae(Mt)},!1),pt.readAsDataURL(we.response)}else ae("Failed to proxy resource "+x+" with status code "+we.status)},we.onerror=ae;var Ze=d.indexOf("?")>-1?"&":"?";if(we.open("GET",""+d+Ze+"url="+encodeURIComponent(c)+"&responseType="+Ee),Ee!=="text"&&we instanceof XMLHttpRequest&&(we.responseType=Ee),g._options.imageTimeout){var tt=g._options.imageTimeout;we.timeout=tt,we.ontimeout=function(){return ae("Timed out ("+tt+"ms) proxying "+x)}}we.send()})},h}(),ra=/^data:image\/svg\+xml/i,Ia=/^data:image\/.*;base64,/i,uc=/^data:image\/.*/i,cc=function(h){return An.SUPPORT_SVG_DRAWING||!hc(h)},Xl=function(h){return uc.test(h)},fc=function(h){return Ia.test(h)},Jl=function(h){return h.substr(0,4)==="blob"},hc=function(h){return h.substr(-3).toLowerCase()==="svg"||ra.test(h)},xn=function(){function h(c,g){this.type=0,this.x=c,this.y=g}return h.prototype.add=function(c,g){return new h(this.x+c,this.y+g)},h}(),uA=function(h,c,g){return new xn(h.x+(c.x-h.x)*g,h.y+(c.y-h.y)*g)},sl=function(){function h(c,g,d,x){this.type=1,this.start=c,this.startControl=g,this.endControl=d,this.end=x}return h.prototype.subdivide=function(c,g){var d=uA(this.start,this.startControl,c),x=uA(this.startControl,this.endControl,c),U=uA(this.endControl,this.end,c),ae=uA(d,x,c),Ee=uA(x,U,c),we=uA(ae,Ee,c);return g?new h(this.start,d,ae,we):new h(we,Ee,U,this.end)},h.prototype.add=function(c,g){return new h(this.start.add(c,g),this.startControl.add(c,g),this.endControl.add(c,g),this.end.add(c,g))},h.prototype.reverse=function(){return new h(this.end,this.endControl,this.startControl,this.start)},h}(),Zs=function(h){return h.type===1},ql=function(){function h(c){var g=c.styles,d=c.bounds,x=rs(g.borderTopLeftRadius,d.width,d.height),U=x[0],ae=x[1],Ee=rs(g.borderTopRightRadius,d.width,d.height),we=Ee[0],Ze=Ee[1],tt=rs(g.borderBottomRightRadius,d.width,d.height),pt=tt[0],Mt=tt[1],Mn=rs(g.borderBottomLeftRadius,d.width,d.height),gn=Mn[0],Sn=Mn[1],Ur=[];Ur.push((U+we)/d.width),Ur.push((gn+pt)/d.width),Ur.push((ae+Sn)/d.height),Ur.push((Ze+Mt)/d.height);var Jn=Math.max.apply(Math,Ur);Jn>1&&(U/=Jn,ae/=Jn,we/=Jn,Ze/=Jn,pt/=Jn,Mt/=Jn,gn/=Jn,Sn/=Jn);var zn=d.width-we,jr=d.height-Mt,Or=d.width-pt,wr=d.height-Sn,Nn=g.borderTopWidth,Xr=g.borderRightWidth,Jr=g.borderBottomWidth,Er=g.borderLeftWidth,Ji=oi(g.paddingTop,c.bounds.width),Us=oi(g.paddingRight,c.bounds.width),Hs=oi(g.paddingBottom,c.bounds.width),yi=oi(g.paddingLeft,c.bounds.width);this.topLeftBorderDoubleOuterBox=U>0||ae>0?Ui(d.left+Er/3,d.top+Nn/3,U-Er/3,ae-Nn/3,ci.TOP_LEFT):new xn(d.left+Er/3,d.top+Nn/3),this.topRightBorderDoubleOuterBox=U>0||ae>0?Ui(d.left+zn,d.top+Nn/3,we-Xr/3,Ze-Nn/3,ci.TOP_RIGHT):new xn(d.left+d.width-Xr/3,d.top+Nn/3),this.bottomRightBorderDoubleOuterBox=pt>0||Mt>0?Ui(d.left+Or,d.top+jr,pt-Xr/3,Mt-Jr/3,ci.BOTTOM_RIGHT):new xn(d.left+d.width-Xr/3,d.top+d.height-Jr/3),this.bottomLeftBorderDoubleOuterBox=gn>0||Sn>0?Ui(d.left+Er/3,d.top+wr,gn-Er/3,Sn-Jr/3,ci.BOTTOM_LEFT):new xn(d.left+Er/3,d.top+d.height-Jr/3),this.topLeftBorderDoubleInnerBox=U>0||ae>0?Ui(d.left+Er*2/3,d.top+Nn*2/3,U-Er*2/3,ae-Nn*2/3,ci.TOP_LEFT):new xn(d.left+Er*2/3,d.top+Nn*2/3),this.topRightBorderDoubleInnerBox=U>0||ae>0?Ui(d.left+zn,d.top+Nn*2/3,we-Xr*2/3,Ze-Nn*2/3,ci.TOP_RIGHT):new xn(d.left+d.width-Xr*2/3,d.top+Nn*2/3),this.bottomRightBorderDoubleInnerBox=pt>0||Mt>0?Ui(d.left+Or,d.top+jr,pt-Xr*2/3,Mt-Jr*2/3,ci.BOTTOM_RIGHT):new xn(d.left+d.width-Xr*2/3,d.top+d.height-Jr*2/3),this.bottomLeftBorderDoubleInnerBox=gn>0||Sn>0?Ui(d.left+Er*2/3,d.top+wr,gn-Er*2/3,Sn-Jr*2/3,ci.BOTTOM_LEFT):new xn(d.left+Er*2/3,d.top+d.height-Jr*2/3),this.topLeftBorderStroke=U>0||ae>0?Ui(d.left+Er/2,d.top+Nn/2,U-Er/2,ae-Nn/2,ci.TOP_LEFT):new xn(d.left+Er/2,d.top+Nn/2),this.topRightBorderStroke=U>0||ae>0?Ui(d.left+zn,d.top+Nn/2,we-Xr/2,Ze-Nn/2,ci.TOP_RIGHT):new xn(d.left+d.width-Xr/2,d.top+Nn/2),this.bottomRightBorderStroke=pt>0||Mt>0?Ui(d.left+Or,d.top+jr,pt-Xr/2,Mt-Jr/2,ci.BOTTOM_RIGHT):new xn(d.left+d.width-Xr/2,d.top+d.height-Jr/2),this.bottomLeftBorderStroke=gn>0||Sn>0?Ui(d.left+Er/2,d.top+wr,gn-Er/2,Sn-Jr/2,ci.BOTTOM_LEFT):new xn(d.left+Er/2,d.top+d.height-Jr/2),this.topLeftBorderBox=U>0||ae>0?Ui(d.left,d.top,U,ae,ci.TOP_LEFT):new xn(d.left,d.top),this.topRightBorderBox=we>0||Ze>0?Ui(d.left+zn,d.top,we,Ze,ci.TOP_RIGHT):new xn(d.left+d.width,d.top),this.bottomRightBorderBox=pt>0||Mt>0?Ui(d.left+Or,d.top+jr,pt,Mt,ci.BOTTOM_RIGHT):new xn(d.left+d.width,d.top+d.height),this.bottomLeftBorderBox=gn>0||Sn>0?Ui(d.left,d.top+wr,gn,Sn,ci.BOTTOM_LEFT):new xn(d.left,d.top+d.height),this.topLeftPaddingBox=U>0||ae>0?Ui(d.left+Er,d.top+Nn,Math.max(0,U-Er),Math.max(0,ae-Nn),ci.TOP_LEFT):new xn(d.left+Er,d.top+Nn),this.topRightPaddingBox=we>0||Ze>0?Ui(d.left+Math.min(zn,d.width-Xr),d.top+Nn,zn>d.width+Xr?0:Math.max(0,we-Xr),Math.max(0,Ze-Nn),ci.TOP_RIGHT):new xn(d.left+d.width-Xr,d.top+Nn),this.bottomRightPaddingBox=pt>0||Mt>0?Ui(d.left+Math.min(Or,d.width-Er),d.top+Math.min(jr,d.height-Jr),Math.max(0,pt-Xr),Math.max(0,Mt-Jr),ci.BOTTOM_RIGHT):new xn(d.left+d.width-Xr,d.top+d.height-Jr),this.bottomLeftPaddingBox=gn>0||Sn>0?Ui(d.left+Er,d.top+Math.min(wr,d.height-Jr),Math.max(0,gn-Er),Math.max(0,Sn-Jr),ci.BOTTOM_LEFT):new xn(d.left+Er,d.top+d.height-Jr),this.topLeftContentBox=U>0||ae>0?Ui(d.left+Er+yi,d.top+Nn+Ji,Math.max(0,U-(Er+yi)),Math.max(0,ae-(Nn+Ji)),ci.TOP_LEFT):new xn(d.left+Er+yi,d.top+Nn+Ji),this.topRightContentBox=we>0||Ze>0?Ui(d.left+Math.min(zn,d.width+Er+yi),d.top+Nn+Ji,zn>d.width+Er+yi?0:we-Er+yi,Ze-(Nn+Ji),ci.TOP_RIGHT):new xn(d.left+d.width-(Xr+Us),d.top+Nn+Ji),this.bottomRightContentBox=pt>0||Mt>0?Ui(d.left+Math.min(Or,d.width-(Er+yi)),d.top+Math.min(jr,d.height+Nn+Ji),Math.max(0,pt-(Xr+Us)),Mt-(Jr+Hs),ci.BOTTOM_RIGHT):new xn(d.left+d.width-(Xr+Us),d.top+d.height-(Jr+Hs)),this.bottomLeftContentBox=gn>0||Sn>0?Ui(d.left+Er+yi,d.top+wr,Math.max(0,gn-(Er+yi)),Sn-(Jr+Hs),ci.BOTTOM_LEFT):new xn(d.left+Er+yi,d.top+d.height-(Jr+Hs))}return h}(),ci;(function(h){h[h.TOP_LEFT=0]="TOP_LEFT",h[h.TOP_RIGHT=1]="TOP_RIGHT",h[h.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",h[h.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(ci||(ci={}));var Ui=function(h,c,g,d,x){var U=4*((Math.sqrt(2)-1)/3),ae=g*U,Ee=d*U,we=h+g,Ze=c+d;switch(x){case ci.TOP_LEFT:return new sl(new xn(h,Ze),new xn(h,Ze-Ee),new xn(we-ae,c),new xn(we,c));case ci.TOP_RIGHT:return new sl(new xn(h,c),new xn(h+ae,c),new xn(we,Ze-Ee),new xn(we,Ze));case ci.BOTTOM_RIGHT:return new sl(new xn(we,c),new xn(we,c+Ee),new xn(h+ae,Ze),new xn(h,Ze));case ci.BOTTOM_LEFT:default:return new sl(new xn(we,Ze),new xn(we-ae,Ze),new xn(h,c+Ee),new xn(h,c))}},cA=function(h){return[h.topLeftBorderBox,h.topRightBorderBox,h.bottomRightBorderBox,h.bottomLeftBorderBox]},dc=function(h){return[h.topLeftContentBox,h.topRightContentBox,h.bottomRightContentBox,h.bottomLeftContentBox]},al=function(h){return[h.topLeftPaddingBox,h.topRightPaddingBox,h.bottomRightPaddingBox,h.bottomLeftPaddingBox]},eu=function(){function h(c,g,d){this.offsetX=c,this.offsetY=g,this.matrix=d,this.type=0,this.target=6}return h}(),Al=function(){function h(c,g){this.path=c,this.target=g,this.type=1}return h}(),Qu=function(){function h(c){this.opacity=c,this.type=2,this.target=6}return h}(),gc=function(h){return h.type===0},tu=function(h){return h.type===1},nu=function(h){return h.type===2},mo=function(h,c){return h.length===c.length?h.some(function(g,d){return g===c[d]}):!1},pc=function(h,c,g,d,x){return h.map(function(U,ae){switch(ae){case 0:return U.add(c,g);case 1:return U.add(c+d,g);case 2:return U.add(c+d,g+x);case 3:return U.add(c,g+x)}return U})},ru=function(){function h(c){this.element=c,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return h}(),Ou=function(){function h(c,g){if(this.container=c,this.parent=g,this.effects=[],this.curves=new ql(this.container),this.container.styles.opacity<1&&this.effects.push(new Qu(this.container.styles.opacity)),this.container.styles.transform!==null){var d=this.container.bounds.left+this.container.styles.transformOrigin[0].number,x=this.container.bounds.top+this.container.styles.transformOrigin[1].number,U=this.container.styles.transform;this.effects.push(new eu(d,x,U))}if(this.container.styles.overflowX!==0){var ae=cA(this.curves),Ee=al(this.curves);mo(ae,Ee)?this.effects.push(new Al(ae,6)):(this.effects.push(new Al(ae,2)),this.effects.push(new Al(Ee,4)))}}return h.prototype.getEffects=function(c){for(var g=[2,3].indexOf(this.container.styles.position)===-1,d=this.parent,x=this.effects.slice(0);d;){var U=d.effects.filter(function(we){return!tu(we)});if(g||d.container.styles.position!==0||!d.parent){if(x.unshift.apply(x,U),g=[2,3].indexOf(d.container.styles.position)===-1,d.container.styles.overflowX!==0){var ae=cA(d.curves),Ee=al(d.curves);mo(ae,Ee)||x.unshift(new Al(Ee,6))}}else x.unshift.apply(x,U);d=d.parent}return x.filter(function(we){return vi(we.target,c)})},h}(),iu=function(h,c,g,d){h.container.elements.forEach(function(x){var U=vi(x.flags,4),ae=vi(x.flags,2),Ee=new Ou(x,h);vi(x.styles.display,2048)&&d.push(Ee);var we=vi(x.flags,8)?[]:d;if(U||ae){var Ze=U||x.styles.isPositioned()?g:c,tt=new ru(Ee);if(x.styles.isPositioned()||x.styles.opacity<1||x.styles.isTransformed()){var pt=x.styles.zIndex.order;if(pt<0){var Mt=0;Ze.negativeZIndex.some(function(gn,Sn){return pt>gn.element.container.styles.zIndex.order?(Mt=Sn,!1):Mt>0}),Ze.negativeZIndex.splice(Mt,0,tt)}else if(pt>0){var Mn=0;Ze.positiveZIndex.some(function(gn,Sn){return pt>=gn.element.container.styles.zIndex.order?(Mn=Sn+1,!1):Mn>0}),Ze.positiveZIndex.splice(Mn,0,tt)}else Ze.zeroOrAutoZIndexOrTransformedOrOpacity.push(tt)}else x.styles.isFloating()?Ze.nonPositionedFloats.push(tt):Ze.nonPositionedInlineLevel.push(tt);iu(Ee,tt,U?tt:g,we)}else x.styles.isInlineLevel()?c.inlineLevel.push(Ee):c.nonInlineLevel.push(Ee),iu(Ee,c,g,we);vi(x.flags,8)&&ol(x,we)})},ol=function(h,c){for(var g=h instanceof Ml?h.start:1,d=h instanceof Ml?h.reversed:!1,x=0;x<c.length;x++){var U=c[x];U.container instanceof Fa&&typeof U.container.value=="number"&&U.container.value!==0&&(g=U.container.value),U.listValue=fa(g,U.container.styles.listStyleType,!0),g+=d?-1:1}},mc=function(h){var c=new Ou(h,null),g=new ru(c),d=[];return iu(c,g,g,d),ol(c.container,d),g},ll=function(h,c){switch(c){case 0:return Ns(h.topLeftBorderBox,h.topLeftPaddingBox,h.topRightBorderBox,h.topRightPaddingBox);case 1:return Ns(h.topRightBorderBox,h.topRightPaddingBox,h.bottomRightBorderBox,h.bottomRightPaddingBox);case 2:return Ns(h.bottomRightBorderBox,h.bottomRightPaddingBox,h.bottomLeftBorderBox,h.bottomLeftPaddingBox);case 3:default:return Ns(h.bottomLeftBorderBox,h.bottomLeftPaddingBox,h.topLeftBorderBox,h.topLeftPaddingBox)}},_c=function(h,c){switch(c){case 0:return Ns(h.topLeftBorderBox,h.topLeftBorderDoubleOuterBox,h.topRightBorderBox,h.topRightBorderDoubleOuterBox);case 1:return Ns(h.topRightBorderBox,h.topRightBorderDoubleOuterBox,h.bottomRightBorderBox,h.bottomRightBorderDoubleOuterBox);case 2:return Ns(h.bottomRightBorderBox,h.bottomRightBorderDoubleOuterBox,h.bottomLeftBorderBox,h.bottomLeftBorderDoubleOuterBox);case 3:default:return Ns(h.bottomLeftBorderBox,h.bottomLeftBorderDoubleOuterBox,h.topLeftBorderBox,h.topLeftBorderDoubleOuterBox)}},vc=function(h,c){switch(c){case 0:return Ns(h.topLeftBorderDoubleInnerBox,h.topLeftPaddingBox,h.topRightBorderDoubleInnerBox,h.topRightPaddingBox);case 1:return Ns(h.topRightBorderDoubleInnerBox,h.topRightPaddingBox,h.bottomRightBorderDoubleInnerBox,h.bottomRightPaddingBox);case 2:return Ns(h.bottomRightBorderDoubleInnerBox,h.bottomRightPaddingBox,h.bottomLeftBorderDoubleInnerBox,h.bottomLeftPaddingBox);case 3:default:return Ns(h.bottomLeftBorderDoubleInnerBox,h.bottomLeftPaddingBox,h.topLeftBorderDoubleInnerBox,h.topLeftPaddingBox)}},su=function(h,c){switch(c){case 0:return _o(h.topLeftBorderStroke,h.topRightBorderStroke);case 1:return _o(h.topRightBorderStroke,h.bottomRightBorderStroke);case 2:return _o(h.bottomRightBorderStroke,h.bottomLeftBorderStroke);case 3:default:return _o(h.bottomLeftBorderStroke,h.topLeftBorderStroke)}},_o=function(h,c){var g=[];return Zs(h)?g.push(h.subdivide(.5,!1)):g.push(h),Zs(c)?g.push(c.subdivide(.5,!0)):g.push(c),g},Ns=function(h,c,g,d){var x=[];return Zs(h)?x.push(h.subdivide(.5,!1)):x.push(h),Zs(g)?x.push(g.subdivide(.5,!0)):x.push(g),Zs(d)?x.push(d.subdivide(.5,!0).reverse()):x.push(d),Zs(c)?x.push(c.subdivide(.5,!1).reverse()):x.push(c),x},Pu=function(h){var c=h.bounds,g=h.styles;return c.add(g.borderLeftWidth,g.borderTopWidth,-(g.borderRightWidth+g.borderLeftWidth),-(g.borderTopWidth+g.borderBottomWidth))},vo=function(h){var c=h.styles,g=h.bounds,d=oi(c.paddingLeft,g.width),x=oi(c.paddingRight,g.width),U=oi(c.paddingTop,g.width),ae=oi(c.paddingBottom,g.width);return g.add(d+c.borderLeftWidth,U+c.borderTopWidth,-(c.borderRightWidth+c.borderLeftWidth+d+x),-(c.borderTopWidth+c.borderBottomWidth+U+ae))},yc=function(h,c){return h===0?c.bounds:h===2?vo(c):Pu(c)},au=function(h,c){return h===0?c.bounds:h===2?vo(c):Pu(c)},ul=function(h,c,g){var d=yc(hA(h.styles.backgroundOrigin,c),h),x=au(hA(h.styles.backgroundClip,c),h),U=Au(hA(h.styles.backgroundSize,c),g,d),ae=U[0],Ee=U[1],we=rs(hA(h.styles.backgroundPosition,c),d.width-ae,d.height-Ee),Ze=ou(hA(h.styles.backgroundRepeat,c),we,U,d,x),tt=Math.round(d.left+we[0]),pt=Math.round(d.top+we[1]);return[Ze,tt,pt,ae,Ee]},fA=function(h){return Qr(h)&&h.value===wa.AUTO},cl=function(h){return typeof h=="number"},Au=function(h,c,g){var d=c[0],x=c[1],U=c[2],ae=h[0],Ee=h[1];if(!ae)return[0,0];if(Bi(ae)&&Ee&&Bi(Ee))return[oi(ae,g.width),oi(Ee,g.height)];var we=cl(U);if(Qr(ae)&&(ae.value===wa.CONTAIN||ae.value===wa.COVER)){if(cl(U)){var Ze=g.width/g.height;return Ze<U!=(ae.value===wa.COVER)?[g.width,g.width/U]:[g.height*U,g.height]}return[g.width,g.height]}var tt=cl(d),pt=cl(x),Mt=tt||pt;if(fA(ae)&&(!Ee||fA(Ee))){if(tt&&pt)return[d,x];if(!we&&!Mt)return[g.width,g.height];if(Mt&&we){var Mn=tt?d:x*U,gn=pt?x:d/U;return[Mn,gn]}var Sn=tt?d:g.width,Ur=pt?x:g.height;return[Sn,Ur]}if(we){var Jn=0,zn=0;return Bi(ae)?Jn=oi(ae,g.width):Bi(Ee)&&(zn=oi(Ee,g.height)),fA(ae)?Jn=zn*U:(!Ee||fA(Ee))&&(zn=Jn/U),[Jn,zn]}var jr=null,Or=null;if(Bi(ae)?jr=oi(ae,g.width):Ee&&Bi(Ee)&&(Or=oi(Ee,g.height)),jr!==null&&(!Ee||fA(Ee))&&(Or=tt&&pt?jr/d*x:g.height),Or!==null&&fA(ae)&&(jr=tt&&pt?Or/x*d:g.width),jr!==null&&Or!==null)return[jr,Or];throw new Error("Unable to calculate background-size for element")},hA=function(h,c){var g=h[c];return typeof g=="undefined"?h[0]:g},ou=function(h,c,g,d,x){var U=c[0],ae=c[1],Ee=g[0],we=g[1];switch(h){case 2:return[new xn(Math.round(d.left),Math.round(d.top+ae)),new xn(Math.round(d.left+d.width),Math.round(d.top+ae)),new xn(Math.round(d.left+d.width),Math.round(we+d.top+ae)),new xn(Math.round(d.left),Math.round(we+d.top+ae))];case 3:return[new xn(Math.round(d.left+U),Math.round(d.top)),new xn(Math.round(d.left+U+Ee),Math.round(d.top)),new xn(Math.round(d.left+U+Ee),Math.round(d.height+d.top)),new xn(Math.round(d.left+U),Math.round(d.height+d.top))];case 1:return[new xn(Math.round(d.left+U),Math.round(d.top+ae)),new xn(Math.round(d.left+U+Ee),Math.round(d.top+ae)),new xn(Math.round(d.left+U+Ee),Math.round(d.top+ae+we)),new xn(Math.round(d.left+U),Math.round(d.top+ae+we))];default:return[new xn(Math.round(x.left),Math.round(x.top)),new xn(Math.round(x.left+x.width),Math.round(x.top)),new xn(Math.round(x.left+x.width),Math.round(x.height+x.top)),new xn(Math.round(x.left),Math.round(x.height+x.top))]}},wc="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Mu="Hidden Text",fl=function(){function h(c){this._data={},this._document=c}return h.prototype.parseMetrics=function(c,g){var d=this._document.createElement("div"),x=this._document.createElement("img"),U=this._document.createElement("span"),ae=this._document.body;d.style.visibility="hidden",d.style.fontFamily=c,d.style.fontSize=g,d.style.margin="0",d.style.padding="0",d.style.whiteSpace="nowrap",ae.appendChild(d),x.src=wc,x.width=1,x.height=1,x.style.margin="0",x.style.padding="0",x.style.verticalAlign="baseline",U.style.fontFamily=c,U.style.fontSize=g,U.style.margin="0",U.style.padding="0",U.appendChild(this._document.createTextNode(Mu)),d.appendChild(U),d.appendChild(x);var Ee=x.offsetTop-U.offsetTop+2;d.removeChild(U),d.appendChild(this._document.createTextNode(Mu)),d.style.lineHeight="normal",x.style.verticalAlign="super";var we=x.offsetTop-d.offsetTop+2;return ae.removeChild(d),{baseline:Ee,middle:we}},h.prototype.getMetrics=function(c,g){var d=c+" "+g;return typeof this._data[d]=="undefined"&&(this._data[d]=this.parseMetrics(c,g)),this._data[d]},h}(),Nu=function(){function h(c,g){this.context=c,this.options=g}return h}(),Hu=1e4,Ku=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this;return x._activeEffects=[],x.canvas=d.canvas?d.canvas:document.createElement("canvas"),x.ctx=x.canvas.getContext("2d"),d.canvas||(x.canvas.width=Math.floor(d.width*d.scale),x.canvas.height=Math.floor(d.height*d.scale),x.canvas.style.width=d.width+"px",x.canvas.style.height=d.height+"px"),x.fontMetrics=new fl(document),x.ctx.scale(x.options.scale,x.options.scale),x.ctx.translate(-d.x,-d.y),x.ctx.textBaseline="bottom",x._activeEffects=[],x.context.logger.debug("Canvas renderer initialized ("+d.width+"x"+d.height+") with scale "+d.scale),x}return c.prototype.applyEffects=function(g){for(var d=this;this._activeEffects.length;)this.popEffect();g.forEach(function(x){return d.applyEffect(x)})},c.prototype.applyEffect=function(g){this.ctx.save(),nu(g)&&(this.ctx.globalAlpha=g.opacity),gc(g)&&(this.ctx.translate(g.offsetX,g.offsetY),this.ctx.transform(g.matrix[0],g.matrix[1],g.matrix[2],g.matrix[3],g.matrix[4],g.matrix[5]),this.ctx.translate(-g.offsetX,-g.offsetY)),tu(g)&&(this.path(g.path),this.ctx.clip()),this._activeEffects.push(g)},c.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},c.prototype.renderStack=function(g){return Te(this,void 0,void 0,function(){var d;return He(this,function(x){switch(x.label){case 0:return d=g.element.container.styles,d.isVisible()?[4,this.renderStackContent(g)]:[3,2];case 1:x.sent(),x.label=2;case 2:return[2]}})})},c.prototype.renderNode=function(g){return Te(this,void 0,void 0,function(){return He(this,function(d){switch(d.label){case 0:if(vi(g.container.flags,16))debugger;return g.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(g)]:[3,3];case 1:return d.sent(),[4,this.renderNodeContent(g)];case 2:d.sent(),d.label=3;case 3:return[2]}})})},c.prototype.renderTextWithLetterSpacing=function(g,d,x){var U=this;if(d===0)this.ctx.fillText(g.text,g.bounds.left,g.bounds.top+x);else{var ae=Mr(g.text);ae.reduce(function(Ee,we){return U.ctx.fillText(we,Ee,g.bounds.top+x),Ee+U.ctx.measureText(we).width},g.bounds.left)}},c.prototype.createFontStyle=function(g){var d=g.fontVariant.filter(function(ae){return ae==="normal"||ae==="small-caps"}).join(""),x=Cc(g.fontFamily).join(", "),U=Os(g.fontSize)?""+g.fontSize.number+g.fontSize.unit:g.fontSize.number+"px";return[[g.fontStyle,d,g.fontWeight,U,x].join(" "),x,U]},c.prototype.renderTextNode=function(g,d){return Te(this,void 0,void 0,function(){var x,U,ae,Ee,we,Ze,tt,pt,Mt=this;return He(this,function(Mn){return x=this.createFontStyle(d),U=x[0],ae=x[1],Ee=x[2],this.ctx.font=U,this.ctx.direction=d.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",we=this.fontMetrics.getMetrics(ae,Ee),Ze=we.baseline,tt=we.middle,pt=d.paintOrder,g.textBounds.forEach(function(gn){pt.forEach(function(Sn){switch(Sn){case 0:Mt.ctx.fillStyle=Ni(d.color),Mt.renderTextWithLetterSpacing(gn,d.letterSpacing,Ze);var Ur=d.textShadow;Ur.length&&gn.text.trim().length&&(Ur.slice(0).reverse().forEach(function(Jn){Mt.ctx.shadowColor=Ni(Jn.color),Mt.ctx.shadowOffsetX=Jn.offsetX.number*Mt.options.scale,Mt.ctx.shadowOffsetY=Jn.offsetY.number*Mt.options.scale,Mt.ctx.shadowBlur=Jn.blur.number,Mt.renderTextWithLetterSpacing(gn,d.letterSpacing,Ze)}),Mt.ctx.shadowColor="",Mt.ctx.shadowOffsetX=0,Mt.ctx.shadowOffsetY=0,Mt.ctx.shadowBlur=0),d.textDecorationLine.length&&(Mt.ctx.fillStyle=Ni(d.textDecorationColor||d.color),d.textDecorationLine.forEach(function(Jn){switch(Jn){case 1:Mt.ctx.fillRect(gn.bounds.left,Math.round(gn.bounds.top+Ze),gn.bounds.width,1);break;case 2:Mt.ctx.fillRect(gn.bounds.left,Math.round(gn.bounds.top),gn.bounds.width,1);break;case 3:Mt.ctx.fillRect(gn.bounds.left,Math.ceil(gn.bounds.top+tt),gn.bounds.width,1);break}}));break;case 1:d.webkitTextStrokeWidth&&gn.text.trim().length&&(Mt.ctx.strokeStyle=Ni(d.webkitTextStrokeColor),Mt.ctx.lineWidth=d.webkitTextStrokeWidth,Mt.ctx.lineJoin=window.chrome?"miter":"round",Mt.ctx.strokeText(gn.text,gn.bounds.left,gn.bounds.top+Ze)),Mt.ctx.strokeStyle="",Mt.ctx.lineWidth=0,Mt.ctx.lineJoin="miter";break}})}),[2]})})},c.prototype.renderReplacedElement=function(g,d,x){if(x&&g.intrinsicWidth>0&&g.intrinsicHeight>0){var U=vo(g),ae=al(d);this.path(ae),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(x,0,0,g.intrinsicWidth,g.intrinsicHeight,U.left,U.top,U.width,U.height),this.ctx.restore()}},c.prototype.renderNodeContent=function(g){return Te(this,void 0,void 0,function(){var d,x,U,ae,Ee,we,zn,zn,Ze,tt,pt,Mt,Or,Mn,gn,wr,Sn,Ur,Jn,zn,jr,Or,wr;return He(this,function(Nn){switch(Nn.label){case 0:this.applyEffects(g.getEffects(4)),d=g.container,x=g.curves,U=d.styles,ae=0,Ee=d.textNodes,Nn.label=1;case 1:return ae<Ee.length?(we=Ee[ae],[4,this.renderTextNode(we,U)]):[3,4];case 2:Nn.sent(),Nn.label=3;case 3:return ae++,[3,1];case 4:if(!(d instanceof ta))return[3,8];Nn.label=5;case 5:return Nn.trys.push([5,7,,8]),[4,this.context.cache.match(d.src)];case 6:return zn=Nn.sent(),this.renderReplacedElement(d,x,zn),[3,8];case 7:return Nn.sent(),this.context.logger.error("Error loading image "+d.src),[3,8];case 8:if(d instanceof Hi&&this.renderReplacedElement(d,x,d.canvas),!(d instanceof Ha))return[3,12];Nn.label=9;case 9:return Nn.trys.push([9,11,,12]),[4,this.context.cache.match(d.svg)];case 10:return zn=Nn.sent(),this.renderReplacedElement(d,x,zn),[3,12];case 11:return Nn.sent(),this.context.logger.error("Error loading svg "+d.svg.substring(0,255)),[3,12];case 12:return d instanceof pu&&d.tree?(Ze=new c(this.context,{scale:this.options.scale,backgroundColor:d.backgroundColor,x:0,y:0,width:d.width,height:d.height}),[4,Ze.render(d.tree)]):[3,14];case 13:tt=Nn.sent(),d.width&&d.height&&this.ctx.drawImage(tt,0,0,d.width,d.height,d.bounds.left,d.bounds.top,d.bounds.width,d.bounds.height),Nn.label=14;case 14:if(d instanceof lo&&(pt=Math.min(d.bounds.width,d.bounds.height),d.type===Jo?d.checked&&(this.ctx.save(),this.path([new xn(d.bounds.left+pt*.39363,d.bounds.top+pt*.79),new xn(d.bounds.left+pt*.16,d.bounds.top+pt*.5549),new xn(d.bounds.left+pt*.27347,d.bounds.top+pt*.44071),new xn(d.bounds.left+pt*.39694,d.bounds.top+pt*.5649),new xn(d.bounds.left+pt*.72983,d.bounds.top+pt*.23),new xn(d.bounds.left+pt*.84,d.bounds.top+pt*.34085),new xn(d.bounds.left+pt*.39363,d.bounds.top+pt*.79)]),this.ctx.fillStyle=Ni(oo),this.ctx.fill(),this.ctx.restore()):d.type===Ao&&d.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(d.bounds.left+pt/2,d.bounds.top+pt/2,pt/4,0,Math.PI*2,!0),this.ctx.fillStyle=Ni(oo),this.ctx.fill(),this.ctx.restore())),Ec(d)&&d.value.length){switch(Mt=this.createFontStyle(U),Or=Mt[0],Mn=Mt[1],gn=this.fontMetrics.getMetrics(Or,Mn).baseline,this.ctx.font=Or,this.ctx.fillStyle=Ni(U.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Bc(d.styles.textAlign),wr=vo(d),Sn=0,d.styles.textAlign){case 1:Sn+=wr.width/2;break;case 2:Sn+=wr.width;break}Ur=wr.add(Sn,0,0,-wr.height/2+1),this.ctx.save(),this.path([new xn(wr.left,wr.top),new xn(wr.left+wr.width,wr.top),new xn(wr.left+wr.width,wr.top+wr.height),new xn(wr.left,wr.top+wr.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Tr(d.value,Ur),U.letterSpacing,gn),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!vi(d.styles.display,2048))return[3,20];if(d.styles.listStyleImage===null)return[3,19];if(Jn=d.styles.listStyleImage,Jn.type!==0)return[3,18];zn=void 0,jr=Jn.url,Nn.label=15;case 15:return Nn.trys.push([15,17,,18]),[4,this.context.cache.match(jr)];case 16:return zn=Nn.sent(),this.ctx.drawImage(zn,d.bounds.left-(zn.width+10),d.bounds.top),[3,18];case 17:return Nn.sent(),this.context.logger.error("Error loading list-style-image "+jr),[3,18];case 18:return[3,20];case 19:g.listValue&&d.styles.listStyleType!==-1&&(Or=this.createFontStyle(U)[0],this.ctx.font=Or,this.ctx.fillStyle=Ni(U.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",wr=new ne(d.bounds.left,d.bounds.top+oi(d.styles.paddingTop,d.bounds.width),d.bounds.width,Fo(U.lineHeight,U.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Tr(g.listValue,wr),U.letterSpacing,Fo(U.lineHeight,U.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Nn.label=20;case 20:return[2]}})})},c.prototype.renderStackContent=function(g){return Te(this,void 0,void 0,function(){var d,x,Jn,U,ae,Jn,Ee,we,Jn,Ze,tt,Jn,pt,Mt,Jn,Mn,gn,Jn,Sn,Ur,Jn;return He(this,function(zn){switch(zn.label){case 0:if(vi(g.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(g.element)];case 1:zn.sent(),d=0,x=g.negativeZIndex,zn.label=2;case 2:return d<x.length?(Jn=x[d],[4,this.renderStack(Jn)]):[3,5];case 3:zn.sent(),zn.label=4;case 4:return d++,[3,2];case 5:return[4,this.renderNodeContent(g.element)];case 6:zn.sent(),U=0,ae=g.nonInlineLevel,zn.label=7;case 7:return U<ae.length?(Jn=ae[U],[4,this.renderNode(Jn)]):[3,10];case 8:zn.sent(),zn.label=9;case 9:return U++,[3,7];case 10:Ee=0,we=g.nonPositionedFloats,zn.label=11;case 11:return Ee<we.length?(Jn=we[Ee],[4,this.renderStack(Jn)]):[3,14];case 12:zn.sent(),zn.label=13;case 13:return Ee++,[3,11];case 14:Ze=0,tt=g.nonPositionedInlineLevel,zn.label=15;case 15:return Ze<tt.length?(Jn=tt[Ze],[4,this.renderStack(Jn)]):[3,18];case 16:zn.sent(),zn.label=17;case 17:return Ze++,[3,15];case 18:pt=0,Mt=g.inlineLevel,zn.label=19;case 19:return pt<Mt.length?(Jn=Mt[pt],[4,this.renderNode(Jn)]):[3,22];case 20:zn.sent(),zn.label=21;case 21:return pt++,[3,19];case 22:Mn=0,gn=g.zeroOrAutoZIndexOrTransformedOrOpacity,zn.label=23;case 23:return Mn<gn.length?(Jn=gn[Mn],[4,this.renderStack(Jn)]):[3,26];case 24:zn.sent(),zn.label=25;case 25:return Mn++,[3,23];case 26:Sn=0,Ur=g.positiveZIndex,zn.label=27;case 27:return Sn<Ur.length?(Jn=Ur[Sn],[4,this.renderStack(Jn)]):[3,30];case 28:zn.sent(),zn.label=29;case 29:return Sn++,[3,27];case 30:return[2]}})})},c.prototype.mask=function(g){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(g.slice(0).reverse()),this.ctx.closePath()},c.prototype.path=function(g){this.ctx.beginPath(),this.formatPath(g),this.ctx.closePath()},c.prototype.formatPath=function(g){var d=this;g.forEach(function(x,U){var ae=Zs(x)?x.start:x;U===0?d.ctx.moveTo(ae.x,ae.y):d.ctx.lineTo(ae.x,ae.y),Zs(x)&&d.ctx.bezierCurveTo(x.startControl.x,x.startControl.y,x.endControl.x,x.endControl.y,x.end.x,x.end.y)})},c.prototype.renderRepeat=function(g,d,x,U){this.path(g),this.ctx.fillStyle=d,this.ctx.translate(x,U),this.ctx.fill(),this.ctx.translate(-x,-U)},c.prototype.resizeImage=function(g,d,x){var U;if(g.width===d&&g.height===x)return g;var ae=(U=this.canvas.ownerDocument)!==null&&U!==void 0?U:document,Ee=ae.createElement("canvas");Ee.width=Math.max(1,d),Ee.height=Math.max(1,x);var we=Ee.getContext("2d");return we.drawImage(g,0,0,g.width,g.height,0,0,d,x),Ee},c.prototype.renderBackgroundImage=function(g){return Te(this,void 0,void 0,function(){var d,x,U,ae,Ee,we;return He(this,function(Ze){switch(Ze.label){case 0:d=g.styles.backgroundImage.length-1,x=function(tt){var pt,Mt,Mn,Ji,bs,ms,yi,fs,Jr,gn,Ji,bs,ms,yi,fs,Sn,Ur,Jn,zn,jr,Or,wr,Nn,Xr,Jr,Er,Ji,Us,Hs,yi,fs,ha,bs,ms,dA,hs,a,e,t,n,r,i;return He(this,function(s){switch(s.label){case 0:if(tt.type!==0)return[3,5];pt=void 0,Mt=tt.url,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,U.context.cache.match(Mt)];case 2:return pt=s.sent(),[3,4];case 3:return s.sent(),U.context.logger.error("Error loading background-image "+Mt),[3,4];case 4:return pt&&(Mn=ul(g,d,[pt.width,pt.height,pt.width/pt.height]),Ji=Mn[0],bs=Mn[1],ms=Mn[2],yi=Mn[3],fs=Mn[4],Jr=U.ctx.createPattern(U.resizeImage(pt,yi,fs),"repeat"),U.renderRepeat(Ji,Jr,bs,ms)),[3,6];case 5:Oi(tt)?(gn=ul(g,d,[null,null,null]),Ji=gn[0],bs=gn[1],ms=gn[2],yi=gn[3],fs=gn[4],Sn=va(tt.angle,yi,fs),Ur=Sn[0],Jn=Sn[1],zn=Sn[2],jr=Sn[3],Or=Sn[4],wr=document.createElement("canvas"),wr.width=yi,wr.height=fs,Nn=wr.getContext("2d"),Xr=Nn.createLinearGradient(Jn,jr,zn,Or),gA(tt.stops,Ur).forEach(function(A){return Xr.addColorStop(A.stop,Ni(A.color))}),Nn.fillStyle=Xr,Nn.fillRect(0,0,yi,fs),yi>0&&fs>0&&(Jr=U.ctx.createPattern(wr,"repeat"),U.renderRepeat(Ji,Jr,bs,ms))):Zi(tt)&&(Er=ul(g,d,[null,null,null]),Ji=Er[0],Us=Er[1],Hs=Er[2],yi=Er[3],fs=Er[4],ha=tt.position.length===0?[Ga]:tt.position,bs=oi(ha[0],yi),ms=oi(ha[ha.length-1],fs),dA=Za(tt,bs,ms,yi,fs),hs=dA[0],a=dA[1],hs>0&&a>0&&(e=U.ctx.createRadialGradient(Us+bs,Hs+ms,0,Us+bs,Hs+ms,hs),gA(tt.stops,hs*2).forEach(function(A){return e.addColorStop(A.stop,Ni(A.color))}),U.path(Ji),U.ctx.fillStyle=e,hs!==a?(t=g.bounds.left+.5*g.bounds.width,n=g.bounds.top+.5*g.bounds.height,r=a/hs,i=1/r,U.ctx.save(),U.ctx.translate(t,n),U.ctx.transform(1,0,0,r,0,0),U.ctx.translate(-t,-n),U.ctx.fillRect(Us,i*(Hs-n)+n,yi,fs*i),U.ctx.restore()):U.ctx.fill())),s.label=6;case 6:return d--,[2]}})},U=this,ae=0,Ee=g.styles.backgroundImage.slice(0).reverse(),Ze.label=1;case 1:return ae<Ee.length?(we=Ee[ae],[5,x(we)]):[3,4];case 2:Ze.sent(),Ze.label=3;case 3:return ae++,[3,1];case 4:return[2]}})})},c.prototype.renderSolidBorder=function(g,d,x){return Te(this,void 0,void 0,function(){return He(this,function(U){return this.path(ll(x,d)),this.ctx.fillStyle=Ni(g),this.ctx.fill(),[2]})})},c.prototype.renderDoubleBorder=function(g,d,x,U){return Te(this,void 0,void 0,function(){var ae,Ee;return He(this,function(we){switch(we.label){case 0:return d<3?[4,this.renderSolidBorder(g,x,U)]:[3,2];case 1:return we.sent(),[2];case 2:return ae=_c(U,x),this.path(ae),this.ctx.fillStyle=Ni(g),this.ctx.fill(),Ee=vc(U,x),this.path(Ee),this.ctx.fill(),[2]}})})},c.prototype.renderNodeBackgroundAndBorders=function(g){return Te(this,void 0,void 0,function(){var d,x,U,ae,Ee,we,Ze,tt,pt=this;return He(this,function(Mt){switch(Mt.label){case 0:return this.applyEffects(g.getEffects(2)),d=g.container.styles,x=!is(d.backgroundColor)||d.backgroundImage.length,U=[{style:d.borderTopStyle,color:d.borderTopColor,width:d.borderTopWidth},{style:d.borderRightStyle,color:d.borderRightColor,width:d.borderRightWidth},{style:d.borderBottomStyle,color:d.borderBottomColor,width:d.borderBottomWidth},{style:d.borderLeftStyle,color:d.borderLeftColor,width:d.borderLeftWidth}],ae=$u(hA(d.backgroundClip,0),g.curves),x||d.boxShadow.length?(this.ctx.save(),this.path(ae),this.ctx.clip(),is(d.backgroundColor)||(this.ctx.fillStyle=Ni(d.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(g.container)]):[3,2];case 1:Mt.sent(),this.ctx.restore(),d.boxShadow.slice(0).reverse().forEach(function(Mn){pt.ctx.save();var gn=cA(g.curves),Sn=Mn.inset?0:Hu,Ur=pc(gn,-Sn+(Mn.inset?1:-1)*Mn.spread.number,(Mn.inset?1:-1)*Mn.spread.number,Mn.spread.number*(Mn.inset?-2:2),Mn.spread.number*(Mn.inset?-2:2));Mn.inset?(pt.path(gn),pt.ctx.clip(),pt.mask(Ur)):(pt.mask(gn),pt.ctx.clip(),pt.path(Ur)),pt.ctx.shadowOffsetX=Mn.offsetX.number+Sn,pt.ctx.shadowOffsetY=Mn.offsetY.number,pt.ctx.shadowColor=Ni(Mn.color),pt.ctx.shadowBlur=Mn.blur.number,pt.ctx.fillStyle=Mn.inset?Ni(Mn.color):"rgba(0,0,0,1)",pt.ctx.fill(),pt.ctx.restore()}),Mt.label=2;case 2:Ee=0,we=0,Ze=U,Mt.label=3;case 3:return we<Ze.length?(tt=Ze[we],tt.style!==0&&!is(tt.color)&&tt.width>0?tt.style!==2?[3,5]:[4,this.renderDashedDottedBorder(tt.color,tt.width,Ee,g.curves,2)]:[3,11]):[3,13];case 4:return Mt.sent(),[3,11];case 5:return tt.style!==3?[3,7]:[4,this.renderDashedDottedBorder(tt.color,tt.width,Ee,g.curves,3)];case 6:return Mt.sent(),[3,11];case 7:return tt.style!==4?[3,9]:[4,this.renderDoubleBorder(tt.color,tt.width,Ee,g.curves)];case 8:return Mt.sent(),[3,11];case 9:return[4,this.renderSolidBorder(tt.color,Ee,g.curves)];case 10:Mt.sent(),Mt.label=11;case 11:Ee++,Mt.label=12;case 12:return we++,[3,3];case 13:return[2]}})})},c.prototype.renderDashedDottedBorder=function(g,d,x,U,ae){return Te(this,void 0,void 0,function(){var Ee,we,Ze,tt,pt,Mt,Mn,gn,Sn,Ur,Jn,zn,jr,Or,wr,Nn,wr,Nn;return He(this,function(Xr){return this.ctx.save(),Ee=su(U,x),we=ll(U,x),ae===2&&(this.path(we),this.ctx.clip()),Zs(we[0])?(Ze=we[0].start.x,tt=we[0].start.y):(Ze=we[0].x,tt=we[0].y),Zs(we[1])?(pt=we[1].end.x,Mt=we[1].end.y):(pt=we[1].x,Mt=we[1].y),x===0||x===2?Mn=Math.abs(Ze-pt):Mn=Math.abs(tt-Mt),this.ctx.beginPath(),ae===3?this.formatPath(Ee):this.formatPath(we.slice(0,2)),gn=d<3?d*3:d*2,Sn=d<3?d*2:d,ae===3&&(gn=d,Sn=d),Ur=!0,Mn<=gn*2?Ur=!1:Mn<=gn*2+Sn?(Jn=Mn/(2*gn+Sn),gn*=Jn,Sn*=Jn):(zn=Math.floor((Mn+Sn)/(gn+Sn)),jr=(Mn-zn*gn)/(zn-1),Or=(Mn-(zn+1)*gn)/zn,Sn=Or<=0||Math.abs(Sn-jr)<Math.abs(Sn-Or)?jr:Or),Ur&&(ae===3?this.ctx.setLineDash([0,gn+Sn]):this.ctx.setLineDash([gn,Sn])),ae===3?(this.ctx.lineCap="round",this.ctx.lineWidth=d):this.ctx.lineWidth=d*2+1.1,this.ctx.strokeStyle=Ni(g),this.ctx.stroke(),this.ctx.setLineDash([]),ae===2&&(Zs(we[0])&&(wr=we[3],Nn=we[0],this.ctx.beginPath(),this.formatPath([new xn(wr.end.x,wr.end.y),new xn(Nn.start.x,Nn.start.y)]),this.ctx.stroke()),Zs(we[1])&&(wr=we[1],Nn=we[2],this.ctx.beginPath(),this.formatPath([new xn(wr.end.x,wr.end.y),new xn(Nn.start.x,Nn.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},c.prototype.render=function(g){return Te(this,void 0,void 0,function(){var d;return He(this,function(x){switch(x.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Ni(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),d=mc(g),[4,this.renderStack(d)];case 1:return x.sent(),this.applyEffects([]),[2,this.canvas]}})})},c}(Nu),Ec=function(h){return h instanceof Ju||h instanceof uo?!0:h instanceof lo&&h.type!==Ao&&h.type!==Jo},$u=function(h,c){switch(h){case 0:return cA(c);case 2:return dc(c);case 1:default:return al(c)}},Bc=function(h){switch(h){case 1:return"center";case 2:return"right";case 0:default:return"left"}},bc=["-apple-system","system-ui"],Cc=function(h){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?h.filter(function(c){return bc.indexOf(c)===-1}):h},xc=function(h){Y(c,h);function c(g,d){var x=h.call(this,g,d)||this;return x.canvas=d.canvas?d.canvas:document.createElement("canvas"),x.ctx=x.canvas.getContext("2d"),x.options=d,x.canvas.width=Math.floor(d.width*d.scale),x.canvas.height=Math.floor(d.height*d.scale),x.canvas.style.width=d.width+"px",x.canvas.style.height=d.height+"px",x.ctx.scale(x.options.scale,x.options.scale),x.ctx.translate(-d.x,-d.y),x.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+d.width+"x"+d.height+" at "+d.x+","+d.y+") with scale "+d.scale),x}return c.prototype.render=function(g){return Te(this,void 0,void 0,function(){var d,x;return He(this,function(U){switch(U.label){case 0:return d=Kr(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,g),[4,Gu(d)];case 1:return x=U.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Ni(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(x,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},c}(Nu),Gu=function(h){return new Promise(function(c,g){var d=new Image;d.onload=function(){c(d)},d.onerror=g,d.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(h))})},Sc=function(){function h(c){var g=c.id,d=c.enabled;this.id=g,this.enabled=d,this.start=Date.now()}return h.prototype.debug=function(){for(var c=[],g=0;g<arguments.length;g++)c[g]=arguments[g];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,xe([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},h.prototype.getTime=function(){return Date.now()-this.start},h.prototype.info=function(){for(var c=[],g=0;g<arguments.length;g++)c[g]=arguments[g];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,xe([this.id,this.getTime()+"ms"],c))},h.prototype.warn=function(){for(var c=[],g=0;g<arguments.length;g++)c[g]=arguments[g];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,xe([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},h.prototype.error=function(){for(var c=[],g=0;g<arguments.length;g++)c[g]=arguments[g];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,xe([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},h.instances={},h}(),Fc=function(){function h(c,g){var d;this.windowBounds=g,this.instanceName="#"+h.instanceCount++,this.logger=new Sc({id:this.instanceName,enabled:c.logging}),this.cache=(d=c.cache)!==null&&d!==void 0?d:new ku(this,c)}return h.instanceCount=1,h}(),Tc=function(h,c){return c===void 0&&(c={}),Ic(h,c)};typeof window!="undefined"&&Ru.setContext(window);var Ic=function(h,c){return Te(void 0,void 0,void 0,function(){var g,d,x,U,ae,Ee,we,Ze,tt,pt,Mt,Mn,gn,Sn,Ur,Jn,zn,jr,Or,wr,Xr,Nn,Xr,Jr,Er,Ji,Us,Hs,yi,fs,ha,bs,ms,dA,hs,a,e,t,n,r;return He(this,function(i){switch(i.label){case 0:if(!h||typeof h!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(g=h.ownerDocument,!g)throw new Error("Element is not attached to a Document");if(d=g.defaultView,!d)throw new Error("Document is not attached to a Window");return x={allowTaint:(Jr=c.allowTaint)!==null&&Jr!==void 0?Jr:!1,imageTimeout:(Er=c.imageTimeout)!==null&&Er!==void 0?Er:15e3,proxy:c.proxy,useCORS:(Ji=c.useCORS)!==null&&Ji!==void 0?Ji:!1},U=re({logging:(Us=c.logging)!==null&&Us!==void 0?Us:!0,cache:c.cache},x),ae={windowWidth:(Hs=c.windowWidth)!==null&&Hs!==void 0?Hs:d.innerWidth,windowHeight:(yi=c.windowHeight)!==null&&yi!==void 0?yi:d.innerHeight,scrollX:(fs=c.scrollX)!==null&&fs!==void 0?fs:d.pageXOffset,scrollY:(ha=c.scrollY)!==null&&ha!==void 0?ha:d.pageYOffset},Ee=new ne(ae.scrollX,ae.scrollY,ae.windowWidth,ae.windowHeight),we=new Fc(U,Ee),Ze=(bs=c.foreignObjectRendering)!==null&&bs!==void 0?bs:!1,tt={allowTaint:(ms=c.allowTaint)!==null&&ms!==void 0?ms:!1,onclone:c.onclone,ignoreElements:c.ignoreElements,inlineImages:Ze,copyStyles:Ze},we.logger.debug("Starting document clone with size "+Ee.width+"x"+Ee.height+" scrolled to "+-Ee.left+","+-Ee.top),pt=new Iu(we,h,tt),Mt=pt.clonedReferenceElement,Mt?[4,pt.toIFrame(g,Ee)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Mn=i.sent(),gn=Kl(Mt)||rc(Mt)?Se(Mt.ownerDocument):y(we,Mt),Sn=gn.width,Ur=gn.height,Jn=gn.left,zn=gn.top,jr=Dc(we,Mt,c.backgroundColor),Or={canvas:c.canvas,backgroundColor:jr,scale:(hs=(dA=c.scale)!==null&&dA!==void 0?dA:d.devicePixelRatio)!==null&&hs!==void 0?hs:1,x:((a=c.x)!==null&&a!==void 0?a:0)+Jn,y:((e=c.y)!==null&&e!==void 0?e:0)+zn,width:(t=c.width)!==null&&t!==void 0?t:Math.ceil(Sn),height:(n=c.height)!==null&&n!==void 0?n:Math.ceil(Ur)},Ze?(we.logger.debug("Document cloned, using foreign object rendering"),Xr=new xc(we,Or),[4,Xr.render(Mt)]):[3,3];case 2:return wr=i.sent(),[3,5];case 3:return we.logger.debug("Document cloned, element located at "+Jn+","+zn+" with size "+Sn+"x"+Ur+" using computed rendering"),we.logger.debug("Starting DOM parsing"),Nn=_u(we,Mt),jr===Nn.styles.backgroundColor&&(Nn.styles.backgroundColor=Bs.TRANSPARENT),we.logger.debug("Starting renderer for element at "+Or.x+","+Or.y+" with size "+Or.width+"x"+Or.height),Xr=new Ku(we,Or),[4,Xr.render(Nn)];case 4:wr=i.sent(),i.label=5;case 5:return(!((r=c.removeContainer)!==null&&r!==void 0)||r)&&(Iu.destroy(Mn)||we.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),we.logger.debug("Finished rendering"),[2,wr]}})})},Dc=function(h,c,g){var d=c.ownerDocument,x=d.documentElement?sa(h,getComputedStyle(d.documentElement).backgroundColor):Bs.TRANSPARENT,U=d.body?sa(h,getComputedStyle(d.body).backgroundColor):Bs.TRANSPARENT,ae=typeof g=="string"?sa(h,g):g===null?Bs.TRANSPARENT:4294967295;return c===d.documentElement?is(x)?is(U)?ae:U:x:ae};return Tc})},67467:function(kn,Ft){Ft.read=function(Y,re,Te,He,xe){var ne,y,Se=xe*8-He-1,V=(1<<Se)-1,o=V>>1,le=-7,O=Te?xe-1:0,B=Te?-1:1,E=Y[re+O];for(O+=B,ne=E&(1<<-le)-1,E>>=-le,le+=Se;le>0;ne=ne*256+Y[re+O],O+=B,le-=8);for(y=ne&(1<<-le)-1,ne>>=-le,le+=He;le>0;y=y*256+Y[re+O],O+=B,le-=8);if(ne===0)ne=1-o;else{if(ne===V)return y?NaN:(E?-1:1)*(1/0);y=y+Math.pow(2,He),ne=ne-o}return(E?-1:1)*y*Math.pow(2,ne-He)},Ft.write=function(Y,re,Te,He,xe,ne){var y,Se,V,o=ne*8-xe-1,le=(1<<o)-1,O=le>>1,B=xe===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=He?0:ne-1,F=He?1:-1,L=re<0||re===0&&1/re<0?1:0;for(re=Math.abs(re),isNaN(re)||re===1/0?(Se=isNaN(re)?1:0,y=le):(y=Math.floor(Math.log(re)/Math.LN2),re*(V=Math.pow(2,-y))<1&&(y--,V*=2),y+O>=1?re+=B/V:re+=B*Math.pow(2,1-O),re*V>=2&&(y++,V/=2),y+O>=le?(Se=0,y=le):y+O>=1?(Se=(re*V-1)*Math.pow(2,xe),y=y+O):(Se=re*Math.pow(2,O-1)*Math.pow(2,xe),y=0));xe>=8;Y[Te+E]=Se&255,E+=F,Se/=256,xe-=8);for(y=y<<xe|Se,o+=xe;o>0;Y[Te+E]=y&255,E+=F,y/=256,o-=8);Y[Te+E-F]|=L*128}},53184:function(kn,Ft,Y){"use strict";var re,Te;function He(xe,ne,y){var Se=function(V,o){return xe.js_beautify(V,o)};return Se.js=xe.js_beautify,Se.css=ne.css_beautify,Se.html=y.html_beautify,Se.js_beautify=xe.js_beautify,Se.css_beautify=ne.css_beautify,Se.html_beautify=y.html_beautify,Se}re=[Y(58553),Y(87804),Y(40998)],Te=function(xe,ne,y){return He(xe,ne,y)}.apply(Ft,re),Te!==void 0&&(kn.exports=Te)},87804:function(kn,Ft){var Y,re;(function(){var Te;(function(){"use strict";var xe=[,,function(V){function o(B){this.__parent=B,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 B=new o(this.__parent);return B.set_indent(this.__indent_count,this.__alignment_count),B},o.prototype.item=function(B){return B<0?this.__items[this.__items.length+B]:this.__items[B]},o.prototype.has_match=function(B){for(var E=this.__items.length-1;E>=0;E--)if(this.__items[E].match(B))return!0;return!1},o.prototype.set_indent=function(B,E){this.is_empty()&&(this.__indent_count=B||0,this.__alignment_count=E||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 B=this.__parent.current_line;return B.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),B.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),B.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,B.__items[0]===" "&&(B.__items.splice(0,1),B.__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(B){this.__items.push(B);var E=B.lastIndexOf(`
`);E!==-1?this.__character_count=B.length-E:this.__character_count+=B.length},o.prototype.pop=function(){var B=null;return this.is_empty()||(B=this.__items.pop(),this.__character_count-=B.length),B},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 B="";return this.is_empty()?this.__parent.indent_empty_lines&&(B=this.__parent.get_indent_string(this.__indent_count)):(B=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),B+=this.__items.join("")),B};function le(B,E){this.__cache=[""],this.__indent_size=B.indent_size,this.__indent_string=B.indent_char,B.indent_with_tabs||(this.__indent_string=new Array(B.indent_size+1).join(B.indent_char)),E=E||"",B.indent_level>0&&(E=new Array(B.indent_level+1).join(this.__indent_string)),this.__base_string=E,this.__base_string_length=E.length}le.prototype.get_indent_size=function(B,E){var F=this.__base_string_length;return E=E||0,B<0&&(F=0),F+=B*this.__indent_size,F+=E,F},le.prototype.get_indent_string=function(B,E){var F=this.__base_string;return E=E||0,B<0&&(B=0,F=""),E+=B*this.__indent_size,this.__ensure_cache(E),F+=this.__cache[E],F},le.prototype.__ensure_cache=function(B){for(;B>=this.__cache.length;)this.__add_column()},le.prototype.__add_column=function(){var B=this.__cache.length,E=0,F="";this.__indent_size&&B>=this.__indent_size&&(E=Math.floor(B/this.__indent_size),B-=E*this.__indent_size,F=new Array(E+1).join(this.__indent_string)),B&&(F+=new Array(B+1).join(" ")),this.__cache.push(F)};function O(B,E){this.__indent_cache=new le(B,E),this.raw=!1,this._end_with_newline=B.end_with_newline,this.indent_size=B.indent_size,this.wrap_line_length=B.wrap_line_length,this.indent_empty_lines=B.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()}O.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},O.prototype.get_line_number=function(){return this.__lines.length},O.prototype.get_indent_string=function(B,E){return this.__indent_cache.get_indent_string(B,E)},O.prototype.get_indent_size=function(B,E){return this.__indent_cache.get_indent_size(B,E)},O.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},O.prototype.add_new_line=function(B){return this.is_empty()||!B&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},O.prototype.get_code=function(B){this.trim(!0);var E=this.current_line.pop();E&&(E[E.length-1]===`
`&&(E=E.replace(/\n+$/g,"")),this.current_line.push(E)),this._end_with_newline&&this.__add_outputline();var F=this.__lines.join(`
`);return B!==`
`&&(F=F.replace(/[\n]/g,B)),F},O.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},O.prototype.set_indent=function(B,E){return B=B||0,E=E||0,this.next_line.set_indent(B,E),this.__lines.length>1?(this.current_line.set_indent(B,E),!0):(this.current_line.set_indent(),!1)},O.prototype.add_raw_token=function(B){for(var E=0;E<B.newlines;E++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(B.whitespace_before),this.current_line.push(B.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},O.prototype.add_token=function(B){this.__add_space_before_token(),this.current_line.push(B),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},O.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(" "))},O.prototype.remove_indent=function(B){for(var E=this.__lines.length;B<E;)this.__lines[B]._remove_indent(),B++;this.current_line._remove_wrap_indent()},O.prototype.trim=function(B){for(B=B===void 0?!1:B,this.current_line.trim();B&&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},O.prototype.just_added_newline=function(){return this.current_line.is_empty()},O.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},O.prototype.ensure_empty_line_above=function(B,E){for(var F=this.__lines.length-2;F>=0;){var L=this.__lines[F];if(L.is_empty())break;if(L.item(0).indexOf(B)!==0&&L.item(-1)!==E){this.__lines.splice(F+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}F--}},V.exports.Output=O},,,,function(V){function o(B,E){this.raw_options=le(B,E),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(B,E){var F=this.raw_options[B],L=E||[];return typeof F=="object"?F!==null&&typeof F.concat=="function"&&(L=F.concat()):typeof F=="string"&&(L=F.split(/[^a-zA-Z0-9_\/\-]+/)),L},o.prototype._get_boolean=function(B,E){var F=this.raw_options[B],L=F===void 0?!!E:!!F;return L},o.prototype._get_characters=function(B,E){var F=this.raw_options[B],L=E||"";return typeof F=="string"&&(L=F.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),L},o.prototype._get_number=function(B,E){var F=this.raw_options[B];E=parseInt(E,10),isNaN(E)&&(E=0);var L=parseInt(F,10);return isNaN(L)&&(L=E),L},o.prototype._get_selection=function(B,E,F){var L=this._get_selection_list(B,E,F);if(L.length!==1)throw new Error("Invalid Option Value: The option '"+B+`' can only be one of the following values:
`+E+`
You passed in: '`+this.raw_options[B]+"'");return L[0]},o.prototype._get_selection_list=function(B,E,F){if(!E||E.length===0)throw new Error("Selection list cannot be empty.");if(F=F||[E[0]],!this._is_valid_selection(F,E))throw new Error("Invalid Default Value!");var L=this._get_array(B,F);if(!this._is_valid_selection(L,E))throw new Error("Invalid Option Value: The option '"+B+`' can contain only the following values:
`+E+`
You passed in: '`+this.raw_options[B]+"'");return L},o.prototype._is_valid_selection=function(B,E){return B.length&&E.length&&!B.some(function(F){return E.indexOf(F)===-1})};function le(B,E){var F={};B=O(B);var L;for(L in B)L!==E&&(F[L]=B[L]);if(E&&B[E])for(L in B[E])F[L]=B[E][L];return F}function O(B){var E={},F;for(F in B){var L=F.replace(/-/g,"_");E[L]=B[F]}return E}V.exports.Options=o,V.exports.normalizeOpts=O,V.exports.mergeOpts=le},,function(V){var o=RegExp.prototype.hasOwnProperty("sticky");function le(O){this.__input=O||"",this.__input_length=this.__input.length,this.__position=0}le.prototype.restart=function(){this.__position=0},le.prototype.back=function(){this.__position>0&&(this.__position-=1)},le.prototype.hasNext=function(){return this.__position<this.__input_length},le.prototype.next=function(){var O=null;return this.hasNext()&&(O=this.__input.charAt(this.__position),this.__position+=1),O},le.prototype.peek=function(O){var B=null;return O=O||0,O+=this.__position,O>=0&&O<this.__input_length&&(B=this.__input.charAt(O)),B},le.prototype.__match=function(O,B){O.lastIndex=B;var E=O.exec(this.__input);return E&&!(o&&O.sticky)&&E.index!==B&&(E=null),E},le.prototype.test=function(O,B){return B=B||0,B+=this.__position,B>=0&&B<this.__input_length?!!this.__match(O,B):!1},le.prototype.testChar=function(O,B){var E=this.peek(B);return O.lastIndex=0,E!==null&&O.test(E)},le.prototype.match=function(O){var B=this.__match(O,this.__position);return B?this.__position+=B[0].length:B=null,B},le.prototype.read=function(O,B,E){var F="",L;return O&&(L=this.match(O),L&&(F+=L[0])),B&&(L||!O)&&(F+=this.readUntil(B,E)),F},le.prototype.readUntil=function(O,B){var E="",F=this.__position;O.lastIndex=this.__position;var L=O.exec(this.__input);return L?(F=L.index,B&&(F+=L[0].length)):F=this.__input_length,E=this.__input.substring(this.__position,F),this.__position=F,E},le.prototype.readUntilAfter=function(O){return this.readUntil(O,!0)},le.prototype.get_regexp=function(O,B){var E=null,F="g";return B&&o&&(F="y"),typeof O=="string"&&O!==""?E=new RegExp(O,F):O&&(E=new RegExp(O.source,F)),E},le.prototype.get_literal_regexp=function(O){return RegExp(O.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},le.prototype.peekUntilAfter=function(O){var B=this.__position,E=this.readUntilAfter(O);return this.__position=B,E},le.prototype.lookBack=function(O){var B=this.__position-1;return B>=O.length&&this.__input.substring(B-O.length,B).toLowerCase()===O},V.exports.InputScanner=le},,,,,function(V){function o(le,O){le=typeof le=="string"?le:le.source,O=typeof O=="string"?O:O.source,this.__directives_block_pattern=new RegExp(le+/ beautify( \w+[:]\w+)+ /.source+O,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(le+/\sbeautify\signore:end\s/.source+O,"g")}o.prototype.get_directives=function(le){if(!le.match(this.__directives_block_pattern))return null;var O={};this.__directive_pattern.lastIndex=0;for(var B=this.__directive_pattern.exec(le);B;)O[B[1]]=B[2],B=this.__directive_pattern.exec(le);return O},o.prototype.readIgnored=function(le){return le.readUntilAfter(this.__directives_end_ignore_pattern)},V.exports.Directives=o},,function(V,o,le){var O=le(16).Beautifier,B=le(17).Options;function E(F,L){var Ae=new O(F,L);return Ae.beautify()}V.exports=E,V.exports.defaultOptions=function(){return new B}},function(V,o,le){var O=le(17).Options,B=le(2).Output,E=le(8).InputScanner,F=le(13).Directives,L=new F(/\/\*/,/\*\//),Ae=/\r\n|[\r\n]/,Z=/\r\n|[\r\n]/g,J=/\s/,H=/(?:\s|\n)+/g,z=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,oe=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function be(De,ke){this._source_text=De||"",this._options=new O(ke),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"]}be.prototype.eatString=function(De){var ke="";for(this._ch=this._input.next();this._ch;){if(ke+=this._ch,this._ch==="\\")ke+=this._input.next();else if(De.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return ke},be.prototype.eatWhitespace=function(De){for(var ke=J.test(this._input.peek()),ge=0;J.test(this._input.peek());)this._ch=this._input.next(),De&&this._ch===`
`&&(ge===0||ge<this._options.max_preserve_newlines)&&(ge++,this._output.add_new_line(!0));return ke},be.prototype.foundNestedPseudoClass=function(){for(var De=0,ke=1,ge=this._input.peek(ke);ge;){if(ge==="{")return!0;if(ge==="(")De+=1;else if(ge===")"){if(De===0)return!1;De-=1}else if(ge===";"||ge==="}")return!1;ke++,ge=this._input.peek(ke)}return!1},be.prototype.print_string=function(De){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(De)},be.prototype.preserveSingleSpace=function(De){De&&(this._output.space_before_token=!0)},be.prototype.indent=function(){this._indentLevel++},be.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},be.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var De=this._source_text,ke=this._options.eol;ke==="auto"&&(ke=`
`,De&&Ae.test(De||"")&&(ke=De.match(Ae)[0])),De=De.replace(Z,`
`);var ge=De.match(/^[\t ]*/)[0];this._output=new B(this._options,ge),this._input=new E(De),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Ue=0,Je=!1,Be=!1,nt=!1,ie=!1,Q=!1,q=this._ch,se=!1,de,fe,b;de=this._input.read(H),fe=de!=="",b=q,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),q=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var S=this._input.read(z),W=L.get_directives(S);W&&W.ignore==="start"&&(S+=L.readIgnored(this._input)),this.print_string(S),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(oe)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(fe),this.print_string(this._ch);var _e=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);_e.match(/[ :]$/)&&(_e=this.eatString(": ").replace(/\s+$/,""),this.print_string(_e),this._output.space_before_token=!0),Ue===0&&_e.indexOf(":")!==-1&&(Be=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(fe),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var qe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);qe.match(/[ :]$/)&&(qe=this.eatString(": ").replace(/\s+$/,""),this.print_string(qe),this._output.space_before_token=!0),Ue===0&&qe.indexOf(":")!==-1?(Be=!0,this.indent()):qe in this.NESTED_AT_RULE?(this._nestedLevel+=1,qe in this.CONDITIONAL_GROUP_RULE&&(nt=!0)):Ue===0&&!Be&&(ie=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(fe),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Be&&(Be=!1,this.outdent()),ie=!1,nt?(nt=!1,Je=this._indentLevel>=this._nestedLevel):Je=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Je&&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)):(b==="("?this._output.space_before_token=!1:b!==","&&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(),b==="{"&&this._output.trim(!0),Be&&(this.outdent(),Be=!1),this.print_string(this._ch),Je=!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 mt=0;mt<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;mt++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[mt])){se=!0;break}(Je||nt)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!ie&&Ue===0?(this.print_string(":"),Be||(Be=!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 Gt=b==='"'||b==="'";this.preserveSingleSpace(Gt||fe),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")se=!1,Ue===0?(Be&&(this.outdent(),Be=!1),ie=!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(),Ue++,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(")")),Ue&&(Ue--,this.outdent()));else{var Qt=!1;this._input.lookBack("with")&&(Qt=!0),this.preserveSingleSpace(fe||Qt),this.print_string(this._ch),Be&&b==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),Q=!0):(this.eatWhitespace(),Ue++,this.indent())}else if(this._ch===")")Ue&&(Ue--,this.outdent()),Q&&this._input.peek()===";"&&this._options.selector_separator_newline&&(Q=!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&&(!Be||Q)&&Ue===0&&!ie?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Be&&Ue===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&&J.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(fe),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),J.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 sn=b==='"'||b==="'";this.preserveSingleSpace(sn||fe),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&se&&this._output.add_new_line()}var Wt=this._output.get_code(ke);return Wt},V.exports.Beautifier=be},function(V,o,le){var O=le(6).Options;function B(E){O.call(this,E,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var F=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||F;var L=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var Ae=0;Ae<L.length;Ae++)L[Ae]!=="expand"?this.brace_style="collapse":this.brace_style=L[Ae]}B.prototype=new O,V.exports.Options=B}],ne={};function y(V){var o=ne[V];if(o!==void 0)return o.exports;var le=ne[V]={exports:{}};return xe[V](le,le.exports,y),le.exports}var Se=y(15);Te=Se})();var He=Te;Y=[],re=function(){return{css_beautify:He}}.apply(Ft,Y),re!==void 0&&(kn.exports=re)})()},40998:function(kn,Ft,Y){var re,Te;(function(){var He;(function(){"use strict";var Se=[,,function(O){function B(L){this.__parent=L,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=[]}B.prototype.clone_empty=function(){var L=new B(this.__parent);return L.set_indent(this.__indent_count,this.__alignment_count),L},B.prototype.item=function(L){return L<0?this.__items[this.__items.length+L]:this.__items[L]},B.prototype.has_match=function(L){for(var Ae=this.__items.length-1;Ae>=0;Ae--)if(this.__items[Ae].match(L))return!0;return!1},B.prototype.set_indent=function(L,Ae){this.is_empty()&&(this.__indent_count=L||0,this.__alignment_count=Ae||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},B.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)},B.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},B.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var L=this.__parent.current_line;return L.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),L.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),L.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,L.__items[0]===" "&&(L.__items.splice(0,1),L.__character_count-=1),!0}return!1},B.prototype.is_empty=function(){return this.__items.length===0},B.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},B.prototype.push=function(L){this.__items.push(L);var Ae=L.lastIndexOf(`
`);Ae!==-1?this.__character_count=L.length-Ae:this.__character_count+=L.length},B.prototype.pop=function(){var L=null;return this.is_empty()||(L=this.__items.pop(),this.__character_count-=L.length),L},B.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},B.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},B.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},B.prototype.toString=function(){var L="";return this.is_empty()?this.__parent.indent_empty_lines&&(L=this.__parent.get_indent_string(this.__indent_count)):(L=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),L+=this.__items.join("")),L};function E(L,Ae){this.__cache=[""],this.__indent_size=L.indent_size,this.__indent_string=L.indent_char,L.indent_with_tabs||(this.__indent_string=new Array(L.indent_size+1).join(L.indent_char)),Ae=Ae||"",L.indent_level>0&&(Ae=new Array(L.indent_level+1).join(this.__indent_string)),this.__base_string=Ae,this.__base_string_length=Ae.length}E.prototype.get_indent_size=function(L,Ae){var Z=this.__base_string_length;return Ae=Ae||0,L<0&&(Z=0),Z+=L*this.__indent_size,Z+=Ae,Z},E.prototype.get_indent_string=function(L,Ae){var Z=this.__base_string;return Ae=Ae||0,L<0&&(L=0,Z=""),Ae+=L*this.__indent_size,this.__ensure_cache(Ae),Z+=this.__cache[Ae],Z},E.prototype.__ensure_cache=function(L){for(;L>=this.__cache.length;)this.__add_column()},E.prototype.__add_column=function(){var L=this.__cache.length,Ae=0,Z="";this.__indent_size&&L>=this.__indent_size&&(Ae=Math.floor(L/this.__indent_size),L-=Ae*this.__indent_size,Z=new Array(Ae+1).join(this.__indent_string)),L&&(Z+=new Array(L+1).join(" ")),this.__cache.push(Z)};function F(L,Ae){this.__indent_cache=new E(L,Ae),this.raw=!1,this._end_with_newline=L.end_with_newline,this.indent_size=L.indent_size,this.wrap_line_length=L.wrap_line_length,this.indent_empty_lines=L.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new B(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}F.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},F.prototype.get_line_number=function(){return this.__lines.length},F.prototype.get_indent_string=function(L,Ae){return this.__indent_cache.get_indent_string(L,Ae)},F.prototype.get_indent_size=function(L,Ae){return this.__indent_cache.get_indent_size(L,Ae)},F.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},F.prototype.add_new_line=function(L){return this.is_empty()||!L&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},F.prototype.get_code=function(L){this.trim(!0);var Ae=this.current_line.pop();Ae&&(Ae[Ae.length-1]===`
`&&(Ae=Ae.replace(/\n+$/g,"")),this.current_line.push(Ae)),this._end_with_newline&&this.__add_outputline();var Z=this.__lines.join(`
`);return L!==`
`&&(Z=Z.replace(/[\n]/g,L)),Z},F.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},F.prototype.set_indent=function(L,Ae){return L=L||0,Ae=Ae||0,this.next_line.set_indent(L,Ae),this.__lines.length>1?(this.current_line.set_indent(L,Ae),!0):(this.current_line.set_indent(),!1)},F.prototype.add_raw_token=function(L){for(var Ae=0;Ae<L.newlines;Ae++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(L.whitespace_before),this.current_line.push(L.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},F.prototype.add_token=function(L){this.__add_space_before_token(),this.current_line.push(L),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},F.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(" "))},F.prototype.remove_indent=function(L){for(var Ae=this.__lines.length;L<Ae;)this.__lines[L]._remove_indent(),L++;this.current_line._remove_wrap_indent()},F.prototype.trim=function(L){for(L=L===void 0?!1:L,this.current_line.trim();L&&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},F.prototype.just_added_newline=function(){return this.current_line.is_empty()},F.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},F.prototype.ensure_empty_line_above=function(L,Ae){for(var Z=this.__lines.length-2;Z>=0;){var J=this.__lines[Z];if(J.is_empty())break;if(J.item(0).indexOf(L)!==0&&J.item(-1)!==Ae){this.__lines.splice(Z+1,0,new B(this)),this.previous_line=this.__lines[this.__lines.length-2];break}Z--}},O.exports.Output=F},function(O){function B(E,F,L,Ae){this.type=E,this.text=F,this.comments_before=null,this.newlines=L||0,this.whitespace_before=Ae||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}O.exports.Token=B},,,function(O){function B(L,Ae){this.raw_options=E(L,Ae),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"])}B.prototype._get_array=function(L,Ae){var Z=this.raw_options[L],J=Ae||[];return typeof Z=="object"?Z!==null&&typeof Z.concat=="function"&&(J=Z.concat()):typeof Z=="string"&&(J=Z.split(/[^a-zA-Z0-9_\/\-]+/)),J},B.prototype._get_boolean=function(L,Ae){var Z=this.raw_options[L],J=Z===void 0?!!Ae:!!Z;return J},B.prototype._get_characters=function(L,Ae){var Z=this.raw_options[L],J=Ae||"";return typeof Z=="string"&&(J=Z.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),J},B.prototype._get_number=function(L,Ae){var Z=this.raw_options[L];Ae=parseInt(Ae,10),isNaN(Ae)&&(Ae=0);var J=parseInt(Z,10);return isNaN(J)&&(J=Ae),J},B.prototype._get_selection=function(L,Ae,Z){var J=this._get_selection_list(L,Ae,Z);if(J.length!==1)throw new Error("Invalid Option Value: The option '"+L+`' can only be one of the following values:
`+Ae+`
You passed in: '`+this.raw_options[L]+"'");return J[0]},B.prototype._get_selection_list=function(L,Ae,Z){if(!Ae||Ae.length===0)throw new Error("Selection list cannot be empty.");if(Z=Z||[Ae[0]],!this._is_valid_selection(Z,Ae))throw new Error("Invalid Default Value!");var J=this._get_array(L,Z);if(!this._is_valid_selection(J,Ae))throw new Error("Invalid Option Value: The option '"+L+`' can contain only the following values:
`+Ae+`
You passed in: '`+this.raw_options[L]+"'");return J},B.prototype._is_valid_selection=function(L,Ae){return L.length&&Ae.length&&!L.some(function(Z){return Ae.indexOf(Z)===-1})};function E(L,Ae){var Z={};L=F(L);var J;for(J in L)J!==Ae&&(Z[J]=L[J]);if(Ae&&L[Ae])for(J in L[Ae])Z[J]=L[Ae][J];return Z}function F(L){var Ae={},Z;for(Z in L){var J=Z.replace(/-/g,"_");Ae[J]=L[Z]}return Ae}O.exports.Options=B,O.exports.normalizeOpts=F,O.exports.mergeOpts=E},,function(O){var B=RegExp.prototype.hasOwnProperty("sticky");function E(F){this.__input=F||"",this.__input_length=this.__input.length,this.__position=0}E.prototype.restart=function(){this.__position=0},E.prototype.back=function(){this.__position>0&&(this.__position-=1)},E.prototype.hasNext=function(){return this.__position<this.__input_length},E.prototype.next=function(){var F=null;return this.hasNext()&&(F=this.__input.charAt(this.__position),this.__position+=1),F},E.prototype.peek=function(F){var L=null;return F=F||0,F+=this.__position,F>=0&&F<this.__input_length&&(L=this.__input.charAt(F)),L},E.prototype.__match=function(F,L){F.lastIndex=L;var Ae=F.exec(this.__input);return Ae&&!(B&&F.sticky)&&Ae.index!==L&&(Ae=null),Ae},E.prototype.test=function(F,L){return L=L||0,L+=this.__position,L>=0&&L<this.__input_length?!!this.__match(F,L):!1},E.prototype.testChar=function(F,L){var Ae=this.peek(L);return F.lastIndex=0,Ae!==null&&F.test(Ae)},E.prototype.match=function(F){var L=this.__match(F,this.__position);return L?this.__position+=L[0].length:L=null,L},E.prototype.read=function(F,L,Ae){var Z="",J;return F&&(J=this.match(F),J&&(Z+=J[0])),L&&(J||!F)&&(Z+=this.readUntil(L,Ae)),Z},E.prototype.readUntil=function(F,L){var Ae="",Z=this.__position;F.lastIndex=this.__position;var J=F.exec(this.__input);return J?(Z=J.index,L&&(Z+=J[0].length)):Z=this.__input_length,Ae=this.__input.substring(this.__position,Z),this.__position=Z,Ae},E.prototype.readUntilAfter=function(F){return this.readUntil(F,!0)},E.prototype.get_regexp=function(F,L){var Ae=null,Z="g";return L&&B&&(Z="y"),typeof F=="string"&&F!==""?Ae=new RegExp(F,Z):F&&(Ae=new RegExp(F.source,Z)),Ae},E.prototype.get_literal_regexp=function(F){return RegExp(F.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},E.prototype.peekUntilAfter=function(F){var L=this.__position,Ae=this.readUntilAfter(F);return this.__position=L,Ae},E.prototype.lookBack=function(F){var L=this.__position-1;return L>=F.length&&this.__input.substring(L-F.length,L).toLowerCase()===F},O.exports.InputScanner=E},function(O,B,E){var F=E(8).InputScanner,L=E(3).Token,Ae=E(10).TokenStream,Z=E(11).WhitespacePattern,J={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},H=function(z,oe){this._input=new F(z),this._options=oe||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new Z(this._input)};H.prototype.tokenize=function(){this._input.restart(),this.__tokens=new Ae,this._reset();for(var z,oe=new L(J.START,""),be=null,De=[],ke=new Ae;oe.type!==J.EOF;){for(z=this._get_next_token(oe,be);this._is_comment(z);)ke.add(z),z=this._get_next_token(oe,be);ke.isEmpty()||(z.comments_before=ke,ke=new Ae),z.parent=be,this._is_opening(z)?(De.push(be),be=z):be&&this._is_closing(z,be)&&(z.opened=be,be.closed=z,be=De.pop(),z.parent=be),z.previous=oe,oe.next=z,this.__tokens.add(z),oe=z}return this.__tokens},H.prototype._is_first_token=function(){return this.__tokens.isEmpty()},H.prototype._reset=function(){},H.prototype._get_next_token=function(z,oe){this._readWhitespace();var be=this._input.read(/.+/g);return be?this._create_token(J.RAW,be):this._create_token(J.EOF,"")},H.prototype._is_comment=function(z){return!1},H.prototype._is_opening=function(z){return!1},H.prototype._is_closing=function(z,oe){return!1},H.prototype._create_token=function(z,oe){var be=new L(z,oe,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return be},H.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},O.exports.Tokenizer=H,O.exports.TOKEN=J},function(O){function B(E){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=E}B.prototype.restart=function(){this.__position=0},B.prototype.isEmpty=function(){return this.__tokens_length===0},B.prototype.hasNext=function(){return this.__position<this.__tokens_length},B.prototype.next=function(){var E=null;return this.hasNext()&&(E=this.__tokens[this.__position],this.__position+=1),E},B.prototype.peek=function(E){var F=null;return E=E||0,E+=this.__position,E>=0&&E<this.__tokens_length&&(F=this.__tokens[E]),F},B.prototype.add=function(E){this.__parent_token&&(E.parent=this.__parent_token),this.__tokens.push(E),this.__tokens_length+=1},O.exports.TokenStream=B},function(O,B,E){var F=E(12).Pattern;function L(Ae,Z){F.call(this,Ae,Z),Z?this._line_regexp=this._input.get_regexp(Z._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}L.prototype=new F,L.prototype.__set_whitespace_patterns=function(Ae,Z){Ae+="\\t ",Z+="\\n\\r",this._match_pattern=this._input.get_regexp("["+Ae+Z+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+Z+"]")},L.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var Ae=this._input.read(this._match_pattern);if(Ae===" ")this.whitespace_before_token=" ";else if(Ae){var Z=this.__split(this._newline_regexp,Ae);this.newline_count=Z.length-1,this.whitespace_before_token=Z[this.newline_count]}return Ae},L.prototype.matching=function(Ae,Z){var J=this._create();return J.__set_whitespace_patterns(Ae,Z),J._update(),J},L.prototype._create=function(){return new L(this._input,this)},L.prototype.__split=function(Ae,Z){Ae.lastIndex=0;for(var J=0,H=[],z=Ae.exec(Z);z;)H.push(Z.substring(J,z.index)),J=z.index+z[0].length,z=Ae.exec(Z);return J<Z.length?H.push(Z.substring(J,Z.length)):H.push(""),H},O.exports.WhitespacePattern=L},function(O){function B(E,F){this._input=E,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,F&&(this._starting_pattern=this._input.get_regexp(F._starting_pattern,!0),this._match_pattern=this._input.get_regexp(F._match_pattern,!0),this._until_pattern=this._input.get_regexp(F._until_pattern),this._until_after=F._until_after)}B.prototype.read=function(){var E=this._input.read(this._starting_pattern);return(!this._starting_pattern||E)&&(E+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),E},B.prototype.read_match=function(){return this._input.match(this._match_pattern)},B.prototype.until_after=function(E){var F=this._create();return F._until_after=!0,F._until_pattern=this._input.get_regexp(E),F._update(),F},B.prototype.until=function(E){var F=this._create();return F._until_after=!1,F._until_pattern=this._input.get_regexp(E),F._update(),F},B.prototype.starting_with=function(E){var F=this._create();return F._starting_pattern=this._input.get_regexp(E,!0),F._update(),F},B.prototype.matching=function(E){var F=this._create();return F._match_pattern=this._input.get_regexp(E,!0),F._update(),F},B.prototype._create=function(){return new B(this._input,this)},B.prototype._update=function(){},O.exports.Pattern=B},function(O){function B(E,F){E=typeof E=="string"?E:E.source,F=typeof F=="string"?F:F.source,this.__directives_block_pattern=new RegExp(E+/ beautify( \w+[:]\w+)+ /.source+F,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(E+/\sbeautify\signore:end\s/.source+F,"g")}B.prototype.get_directives=function(E){if(!E.match(this.__directives_block_pattern))return null;var F={};this.__directive_pattern.lastIndex=0;for(var L=this.__directive_pattern.exec(E);L;)F[L[1]]=L[2],L=this.__directive_pattern.exec(E);return F},B.prototype.readIgnored=function(E){return E.readUntilAfter(this.__directives_end_ignore_pattern)},O.exports.Directives=B},function(O,B,E){var F=E(12).Pattern,L={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function Ae(Z,J){F.call(this,Z,J),this.__template_pattern=null,this._disabled=Object.assign({},L),this._excluded=Object.assign({},L),J&&(this.__template_pattern=this._input.get_regexp(J.__template_pattern),this._excluded=Object.assign(this._excluded,J._excluded),this._disabled=Object.assign(this._disabled,J._disabled));var H=new F(Z);this.__patterns={handlebars_comment:H.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:H.starting_with(/{{{/).until_after(/}}}/),handlebars:H.starting_with(/{{/).until_after(/}}/),php:H.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:H.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:H.starting_with(/{%/).until_after(/%}/),django_value:H.starting_with(/{{/).until_after(/}}/),django_comment:H.starting_with(/{#/).until_after(/#}/),smarty:H.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:H.starting_with(/{\*/).until_after(/\*}/),smarty_literal:H.starting_with(/{literal}/).until_after(/{\/literal}/)}}Ae.prototype=new F,Ae.prototype._create=function(){return new Ae(this._input,this)},Ae.prototype._update=function(){this.__set_templated_pattern()},Ae.prototype.disable=function(Z){var J=this._create();return J._disabled[Z]=!0,J._update(),J},Ae.prototype.read_options=function(Z){var J=this._create();for(var H in L)J._disabled[H]=Z.templating.indexOf(H)===-1;return J._update(),J},Ae.prototype.exclude=function(Z){var J=this._create();return J._excluded[Z]=!0,J._update(),J},Ae.prototype.read=function(){var Z="";this._match_pattern?Z=this._input.read(this._starting_pattern):Z=this._input.read(this._starting_pattern,this.__template_pattern);for(var J=this._read_template();J;)this._match_pattern?J+=this._input.read(this._match_pattern):J+=this._input.readUntil(this.__template_pattern),Z+=J,J=this._read_template();return this._until_after&&(Z+=this._input.readUntilAfter(this._until_pattern)),Z},Ae.prototype.__set_templated_pattern=function(){var Z=[];this._disabled.php||Z.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||Z.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||Z.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||Z.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(Z.push(this.__patterns.django._starting_pattern.source),Z.push(this.__patterns.django_value._starting_pattern.source),Z.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||Z.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&Z.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+Z.join("|")+")")},Ae.prototype._read_template=function(){var Z="",J=this._input.peek();if(J==="<"){var H=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&H==="?"&&(Z=Z||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&H==="%"&&(Z=Z||this.__patterns.erb.read())}else J==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(Z=Z||this.__patterns.handlebars_comment.read(),Z=Z||this.__patterns.handlebars_unescaped.read(),Z=Z||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(Z=Z||this.__patterns.django_value.read()),this._excluded.django||(Z=Z||this.__patterns.django_comment.read(),Z=Z||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(Z=Z||this.__patterns.smarty_comment.read(),Z=Z||this.__patterns.smarty_literal.read(),Z=Z||this.__patterns.smarty.read()));return Z},O.exports.TemplatablePattern=Ae},,,,function(O,B,E){var F=E(19).Beautifier,L=E(20).Options;function Ae(Z,J,H,z){var oe=new F(Z,J,H,z);return oe.beautify()}O.exports=Ae,O.exports.defaultOptions=function(){return new L}},function(O,B,E){var F=E(20).Options,L=E(2).Output,Ae=E(21).Tokenizer,Z=E(21).TOKEN,J=/\r\n|[\r\n]/,H=/\r\n|[\r\n]/g,z=function(ie,Q){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=ie.max_preserve_newlines,this.preserve_newlines=ie.preserve_newlines,this._output=new L(ie,Q)};z.prototype.current_line_has_match=function(ie){return this._output.current_line.has_match(ie)},z.prototype.set_space_before_token=function(ie,Q){this._output.space_before_token=ie,this._output.non_breaking_space=Q},z.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},z.prototype.add_raw_token=function(ie){this._output.add_raw_token(ie)},z.prototype.print_preserved_newlines=function(ie){var Q=0;ie.type!==Z.TEXT&&ie.previous.type!==Z.TEXT&&(Q=ie.newlines?1:0),this.preserve_newlines&&(Q=ie.newlines<this.max_preserve_newlines+1?ie.newlines:this.max_preserve_newlines+1);for(var q=0;q<Q;q++)this.print_newline(q>0);return Q!==0},z.prototype.traverse_whitespace=function(ie){return ie.whitespace_before||ie.newlines?(this.print_preserved_newlines(ie)||(this._output.space_before_token=!0),!0):!1},z.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},z.prototype.print_newline=function(ie){this._output.add_new_line(ie)},z.prototype.print_token=function(ie){ie.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(ie.text))},z.prototype.indent=function(){this.indent_level++},z.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},z.prototype.get_full_indent=function(ie){return ie=this.indent_level+(ie||0),ie<1?"":this._output.get_indent_string(ie)};var oe=function(ie){for(var Q=null,q=ie.next;q.type!==Z.EOF&&ie.closed!==q;){if(q.type===Z.ATTRIBUTE&&q.text==="type"){q.next&&q.next.type===Z.EQUALS&&q.next.next&&q.next.next.type===Z.VALUE&&(Q=q.next.next.text);break}q=q.next}return Q},be=function(ie,Q){var q=null,se=null;return Q.closed?(ie==="script"?q="text/javascript":ie==="style"&&(q="text/css"),q=oe(Q)||q,q.search("text/css")>-1?se="css":q.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?se="javascript":q.search(/(text|application|dojo)\/(x-)?(html)/)>-1?se="html":q.search(/test\/null/)>-1&&(se="null"),se):null};function De(ie,Q){return Q.indexOf(ie)!==-1}function ke(ie,Q,q){this.parent=ie||null,this.tag=Q?Q.tag_name:"",this.indent_level=q||0,this.parser_token=Q||null}function ge(ie){this._printer=ie,this._current_frame=null}ge.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ge.prototype.record_tag=function(ie){var Q=new ke(this._current_frame,ie,this._printer.indent_level);this._current_frame=Q},ge.prototype._try_pop_frame=function(ie){var Q=null;return ie&&(Q=ie.parser_token,this._printer.indent_level=ie.indent_level,this._current_frame=ie.parent),Q},ge.prototype._get_frame=function(ie,Q){for(var q=this._current_frame;q&&ie.indexOf(q.tag)===-1;){if(Q&&Q.indexOf(q.tag)!==-1){q=null;break}q=q.parent}return q},ge.prototype.try_pop=function(ie,Q){var q=this._get_frame([ie],Q);return this._try_pop_frame(q)},ge.prototype.indent_to_tag=function(ie){var Q=this._get_frame(ie);Q&&(this._printer.indent_level=Q.indent_level)};function Ue(ie,Q,q,se){this._source_text=ie||"",Q=Q||{},this._js_beautify=q,this._css_beautify=se,this._tag_stack=null;var de=new F(Q,"html");this._options=de,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"}Ue.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var ie=this._source_text,Q=this._options.eol;this._options.eol==="auto"&&(Q=`
`,ie&&J.test(ie)&&(Q=ie.match(J)[0])),ie=ie.replace(H,`
`);var q=ie.match(/^[\t ]*/)[0],se={text:"",type:""},de=new Je(this._options),fe=new z(this._options,q),b=new Ae(ie,this._options).tokenize();this._tag_stack=new ge(fe);for(var S=null,W=b.next();W.type!==Z.EOF;)W.type===Z.TAG_OPEN||W.type===Z.COMMENT?(S=this._handle_tag_open(fe,W,de,se,b),de=S):W.type===Z.ATTRIBUTE||W.type===Z.EQUALS||W.type===Z.VALUE||W.type===Z.TEXT&&!de.tag_complete?S=this._handle_inside_tag(fe,W,de,se):W.type===Z.TAG_CLOSE?S=this._handle_tag_close(fe,W,de):W.type===Z.TEXT?S=this._handle_text(fe,W,de):W.type===Z.CONTROL_FLOW_OPEN?S=this._handle_control_flow_open(fe,W):W.type===Z.CONTROL_FLOW_CLOSE?S=this._handle_control_flow_close(fe,W):fe.add_raw_token(W),se=S,W=b.next();var _e=fe._output.get_code(Q);return _e},Ue.prototype._handle_control_flow_open=function(ie,Q){var q={text:Q.text,type:Q.type};return ie.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),Q.newlines?ie.print_preserved_newlines(Q):ie.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),ie.print_token(Q),ie.indent(),q},Ue.prototype._handle_control_flow_close=function(ie,Q){var q={text:Q.text,type:Q.type};return ie.deindent(),Q.newlines?ie.print_preserved_newlines(Q):ie.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),ie.print_token(Q),q},Ue.prototype._handle_tag_close=function(ie,Q,q){var se={text:Q.text,type:Q.type};return ie.alignment_size=0,q.tag_complete=!0,ie.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),q.is_unformatted?ie.add_raw_token(Q):(q.tag_start_char==="<"&&(ie.set_space_before_token(Q.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&q.has_wrapped_attrs&&ie.print_newline(!1)),ie.print_token(Q)),q.indent_content&&!(q.is_unformatted||q.is_content_unformatted)&&(ie.indent(),q.indent_content=!1),!q.is_inline_element&&!(q.is_unformatted||q.is_content_unformatted)&&ie.set_wrap_point(),se},Ue.prototype._handle_inside_tag=function(ie,Q,q,se){var de=q.has_wrapped_attrs,fe={text:Q.text,type:Q.type};return ie.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),q.is_unformatted?ie.add_raw_token(Q):q.tag_start_char==="{"&&Q.type===Z.TEXT?ie.print_preserved_newlines(Q)?(Q.newlines=0,ie.add_raw_token(Q)):ie.print_token(Q):(Q.type===Z.ATTRIBUTE?ie.set_space_before_token(!0):(Q.type===Z.EQUALS||Q.type===Z.VALUE&&Q.previous.type===Z.EQUALS)&&ie.set_space_before_token(!1),Q.type===Z.ATTRIBUTE&&q.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(ie.traverse_whitespace(Q),de=de||Q.newlines!==0),this._is_wrap_attributes_force&&q.attr_count>=this._options.wrap_attributes_min_attrs&&(se.type!==Z.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(ie.print_newline(!1),de=!0)),ie.print_token(Q),de=de||ie.previous_token_wrapped(),q.has_wrapped_attrs=de),fe},Ue.prototype._handle_text=function(ie,Q,q){var se={text:Q.text,type:"TK_CONTENT"};return q.custom_beautifier_name?this._print_custom_beatifier_text(ie,Q,q):q.is_unformatted||q.is_content_unformatted?ie.add_raw_token(Q):(ie.traverse_whitespace(Q),ie.print_token(Q)),se},Ue.prototype._print_custom_beatifier_text=function(ie,Q,q){var se=this;if(Q.text!==""){var de=Q.text,fe,b=1,S="",W="";q.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?fe=this._js_beautify:q.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?fe=this._css_beautify:q.custom_beautifier_name==="html"&&(fe=function(sn,Wt){var kt=new Ue(sn,Wt,se._js_beautify,se._css_beautify);return kt.beautify()}),this._options.indent_scripts==="keep"?b=0:this._options.indent_scripts==="separate"&&(b=-ie.indent_level);var _e=ie.get_full_indent(b);if(de=de.replace(/\n[ \t]*$/,""),q.custom_beautifier_name!=="html"&&de[0]==="<"&&de.match(/^(<!--|<!\[CDATA\[)/)){var qe=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(de);if(!qe){ie.add_raw_token(Q);return}S=_e+qe[1]+`
`,de=qe[4],qe[5]&&(W=_e+qe[5]),de=de.replace(/\n[ \t]*$/,""),(qe[2]||qe[3].indexOf(`
`)!==-1)&&(qe=qe[3].match(/[ \t]+$/),qe&&(Q.whitespace_before=qe[0]))}if(de)if(fe){var mt=function(){this.eol=`
`};mt.prototype=this._options.raw_options;var Gt=new mt;de=fe(_e+de,Gt)}else{var Qt=Q.whitespace_before;Qt&&(de=de.replace(new RegExp(`
(`+Qt+")?","g"),`
`)),de=_e+de.replace(/\n/g,`
`+_e)}S&&(de?de=S+de+`
`+W:de=S+W),ie.print_newline(!1),de&&(Q.text=de,Q.whitespace_before="",Q.newlines=0,ie.add_raw_token(Q),ie.print_newline(!0))}},Ue.prototype._handle_tag_open=function(ie,Q,q,se,de){var fe=this._get_tag_open_token(Q);if((q.is_unformatted||q.is_content_unformatted)&&!q.is_empty_element&&Q.type===Z.TAG_OPEN&&!fe.is_start_tag?(ie.add_raw_token(Q),fe.start_tag_token=this._tag_stack.try_pop(fe.tag_name)):(ie.traverse_whitespace(Q),this._set_tag_position(ie,Q,fe,q,se),fe.is_inline_element||ie.set_wrap_point(),ie.print_token(Q)),fe.is_start_tag&&this._is_wrap_attributes_force){var b=0,S;do S=de.peek(b),S.type===Z.ATTRIBUTE&&(fe.attr_count+=1),b+=1;while(S.type!==Z.EOF&&S.type!==Z.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(fe.alignment_size=Q.text.length+1),!fe.tag_complete&&!fe.is_unformatted&&(ie.alignment_size=fe.alignment_size),fe};var Je=function(ie,Q,q){if(this.parent=Q||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="",!q)this.tag_complete=!0;else{var se;this.tag_start_char=q.text[0],this.text=q.text,this.tag_start_char==="<"?(se=q.text.match(/^<([^\s>]*)/),this.tag_check=se?se[1]:""):(se=q.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=se?se[1]:"",(q.text.startsWith("{{#>")||q.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&q.next!==null?this.tag_check=q.next.text.split(" ")[0]:this.tag_check=q.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),q.type===Z.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||q.closed&&q.closed.text==="/>";var de=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(de=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!ie.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(de)))}};Ue.prototype._get_tag_open_token=function(ie){var Q=new Je(this._options,this._tag_stack.get_parser_token(),ie);return Q.alignment_size=this._options.wrap_attributes_indent_size,Q.is_end_tag=Q.is_end_tag||De(Q.tag_check,this._options.void_elements),Q.is_empty_element=Q.tag_complete||Q.is_start_tag&&Q.is_end_tag,Q.is_unformatted=!Q.tag_complete&&De(Q.tag_check,this._options.unformatted),Q.is_content_unformatted=!Q.is_empty_element&&De(Q.tag_check,this._options.content_unformatted),Q.is_inline_element=De(Q.tag_name,this._options.inline)||this._options.inline_custom_elements&&Q.tag_name.includes("-")||Q.tag_start_char==="{",Q},Ue.prototype._set_tag_position=function(ie,Q,q,se,de){if(q.is_empty_element||(q.is_end_tag?q.start_tag_token=this._tag_stack.try_pop(q.tag_name):(this._do_optional_end_element(q)&&(q.is_inline_element||ie.print_newline(!1)),this._tag_stack.record_tag(q),(q.tag_name==="script"||q.tag_name==="style")&&!(q.is_unformatted||q.is_content_unformatted)&&(q.custom_beautifier_name=be(q.tag_check,Q)))),De(q.tag_check,this._options.extra_liners)&&(ie.print_newline(!1),ie._output.just_added_blankline()||ie.print_newline(!0)),q.is_empty_element){if(q.tag_start_char==="{"&&q.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),q.indent_content=!0;var fe=ie.current_line_has_match(/{{#if/);fe||ie.print_newline(!1)}q.tag_name==="!--"&&de.type===Z.TAG_CLOSE&&se.is_end_tag&&q.text.indexOf(`
`)===-1||(q.is_inline_element||q.is_unformatted||ie.print_newline(!1),this._calcluate_parent_multiline(ie,q))}else if(q.is_end_tag){var b=!1;b=q.start_tag_token&&q.start_tag_token.multiline_content,b=b||!q.is_inline_element&&!(se.is_inline_element||se.is_unformatted)&&!(de.type===Z.TAG_CLOSE&&q.start_tag_token===se)&&de.type!=="TK_CONTENT",(q.is_content_unformatted||q.is_unformatted)&&(b=!1),b&&ie.print_newline(!1)}else q.indent_content=!q.custom_beautifier_name,q.tag_start_char==="<"&&(q.tag_name==="html"?q.indent_content=this._options.indent_inner_html:q.tag_name==="head"?q.indent_content=this._options.indent_head_inner_html:q.tag_name==="body"&&(q.indent_content=this._options.indent_body_inner_html)),!(q.is_inline_element||q.is_unformatted)&&(de.type!=="TK_CONTENT"||q.is_content_unformatted)&&ie.print_newline(!1),this._calcluate_parent_multiline(ie,q)},Ue.prototype._calcluate_parent_multiline=function(ie,Q){Q.parent&&ie._output.just_added_newline()&&!((Q.is_inline_element||Q.is_unformatted)&&Q.parent.is_inline_element)&&(Q.parent.multiline_content=!0)};var Be=["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"],nt=["a","audio","del","ins","map","noscript","video"];Ue.prototype._do_optional_end_element=function(ie){var Q=null;if(!(ie.is_empty_element||!ie.is_start_tag||!ie.parent)){if(ie.tag_name==="body")Q=Q||this._tag_stack.try_pop("head");else if(ie.tag_name==="li")Q=Q||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(ie.tag_name==="dd"||ie.tag_name==="dt")Q=Q||this._tag_stack.try_pop("dt",["dl"]),Q=Q||this._tag_stack.try_pop("dd",["dl"]);else if(ie.parent.tag_name==="p"&&Be.indexOf(ie.tag_name)!==-1){var q=ie.parent.parent;(!q||nt.indexOf(q.tag_name)===-1)&&(Q=Q||this._tag_stack.try_pop("p"))}else ie.tag_name==="rp"||ie.tag_name==="rt"?(Q=Q||this._tag_stack.try_pop("rt",["ruby","rtc"]),Q=Q||this._tag_stack.try_pop("rp",["ruby","rtc"])):ie.tag_name==="optgroup"?Q=Q||this._tag_stack.try_pop("optgroup",["select"]):ie.tag_name==="option"?Q=Q||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):ie.tag_name==="colgroup"?Q=Q||this._tag_stack.try_pop("caption",["table"]):ie.tag_name==="thead"?(Q=Q||this._tag_stack.try_pop("caption",["table"]),Q=Q||this._tag_stack.try_pop("colgroup",["table"])):ie.tag_name==="tbody"||ie.tag_name==="tfoot"?(Q=Q||this._tag_stack.try_pop("caption",["table"]),Q=Q||this._tag_stack.try_pop("colgroup",["table"]),Q=Q||this._tag_stack.try_pop("thead",["table"]),Q=Q||this._tag_stack.try_pop("tbody",["table"])):ie.tag_name==="tr"?(Q=Q||this._tag_stack.try_pop("caption",["table"]),Q=Q||this._tag_stack.try_pop("colgroup",["table"]),Q=Q||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(ie.tag_name==="th"||ie.tag_name==="td")&&(Q=Q||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),Q=Q||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return ie.parent=this._tag_stack.get_parser_token(),Q}},O.exports.Beautifier=Ue},function(O,B,E){var F=E(6).Options;function L(Ae){F.call(this,Ae,"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"])}L.prototype=new F,O.exports.Options=L},function(O,B,E){var F=E(9).Tokenizer,L=E(9).TOKEN,Ae=E(13).Directives,Z=E(14).TemplatablePattern,J=E(12).Pattern,H={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:L.START,RAW:L.RAW,EOF:L.EOF},z=new Ae(/<\!--/,/-->/),oe=function(be,De){F.call(this,be,De),this._current_tag_name="";var ke=new Z(this._input).read_options(this._options),ge=new J(this._input);if(this.__patterns={word:ke.until(/[\n\r\t <]/),word_control_flow_close_excluded:ke.until(/[\n\r\t <}]/),single_quote:ke.until_after(/'/),double_quote:ke.until_after(/"/),attribute:ke.until(/[\n\r\t =>]|\/>/),element_name:ke.until(/[\n\r\t >\/]/),angular_control_flow_start:ge.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ge.starting_with(/{{!--/).until_after(/--}}/),handlebars:ge.starting_with(/{{/).until_after(/}}/),handlebars_open:ge.until(/[\n\r\t }]/),handlebars_raw_close:ge.until(/}}/),comment:ge.starting_with(/<!--/).until_after(/-->/),cdata:ge.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ge.starting_with(/<!\[/).until_after(/]>/),processing:ge.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 Ue=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ge.matching(Ue).until_after(Ue)}};oe.prototype=new F,oe.prototype._is_comment=function(be){return!1},oe.prototype._is_opening=function(be){return be.type===H.TAG_OPEN||be.type===H.CONTROL_FLOW_OPEN},oe.prototype._is_closing=function(be,De){return be.type===H.TAG_CLOSE&&De&&((be.text===">"||be.text==="/>")&&De.text[0]==="<"||be.text==="}}"&&De.text[0]==="{"&&De.text[1]==="{")||be.type===H.CONTROL_FLOW_CLOSE&&be.text==="}"&&De.text.endsWith("{")},oe.prototype._reset=function(){this._current_tag_name=""},oe.prototype._get_next_token=function(be,De){var ke=null;this._readWhitespace();var ge=this._input.peek();return ge===null?this._create_token(H.EOF,""):(ke=ke||this._read_open_handlebars(ge,De),ke=ke||this._read_attribute(ge,be,De),ke=ke||this._read_close(ge,De),ke=ke||this._read_script_and_style(ge,be),ke=ke||this._read_control_flows(ge,De),ke=ke||this._read_raw_content(ge,be,De),ke=ke||this._read_content_word(ge,De),ke=ke||this._read_comment_or_cdata(ge),ke=ke||this._read_processing(ge),ke=ke||this._read_open(ge,De),ke=ke||this._create_token(H.UNKNOWN,this._input.next()),ke)},oe.prototype._read_comment_or_cdata=function(be){var De=null,ke=null,ge=null;if(be==="<"){var Ue=this._input.peek(1);Ue==="!"&&(ke=this.__patterns.comment.read(),ke?(ge=z.get_directives(ke),ge&&ge.ignore==="start"&&(ke+=z.readIgnored(this._input))):ke=this.__patterns.cdata.read()),ke&&(De=this._create_token(H.COMMENT,ke),De.directives=ge)}return De},oe.prototype._read_processing=function(be){var De=null,ke=null,ge=null;if(be==="<"){var Ue=this._input.peek(1);(Ue==="!"||Ue==="?")&&(ke=this.__patterns.conditional_comment.read(),ke=ke||this.__patterns.processing.read()),ke&&(De=this._create_token(H.COMMENT,ke),De.directives=ge)}return De},oe.prototype._read_open=function(be,De){var ke=null,ge=null;return(!De||De.type===H.CONTROL_FLOW_OPEN)&&be==="<"&&(ke=this._input.next(),this._input.peek()==="/"&&(ke+=this._input.next()),ke+=this.__patterns.element_name.read(),ge=this._create_token(H.TAG_OPEN,ke)),ge},oe.prototype._read_open_handlebars=function(be,De){var ke=null,ge=null;return(!De||De.type===H.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&be==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(ke=this.__patterns.handlebars_comment.read(),ke=ke||this.__patterns.handlebars.read(),ge=this._create_token(H.COMMENT,ke)):(ke=this.__patterns.handlebars_open.read(),ge=this._create_token(H.TAG_OPEN,ke))),ge},oe.prototype._read_control_flows=function(be,De){var ke="",ge=null;if(!this._options.templating.includes("angular"))return ge;if(be==="@"){if(ke=this.__patterns.angular_control_flow_start.read(),ke==="")return ge;for(var Ue=ke.endsWith("(")?1:0,Je=0;!(ke.endsWith("{")&&Ue===Je);){var Be=this._input.next();if(Be===null)break;Be==="("?Ue++:Be===")"&&Je++,ke+=Be}ge=this._create_token(H.CONTROL_FLOW_OPEN,ke)}else be==="}"&&De&&De.type===H.CONTROL_FLOW_OPEN&&(ke=this._input.next(),ge=this._create_token(H.CONTROL_FLOW_CLOSE,ke));return ge},oe.prototype._read_close=function(be,De){var ke=null,ge=null;return De&&De.type===H.TAG_OPEN&&(De.text[0]==="<"&&(be===">"||be==="/"&&this._input.peek(1)===">")?(ke=this._input.next(),be==="/"&&(ke+=this._input.next()),ge=this._create_token(H.TAG_CLOSE,ke)):De.text[0]==="{"&&be==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ge=this._create_token(H.TAG_CLOSE,"}}"))),ge},oe.prototype._read_attribute=function(be,De,ke){var ge=null,Ue="";if(ke&&ke.text[0]==="<")if(be==="=")ge=this._create_token(H.EQUALS,this._input.next());else if(be==='"'||be==="'"){var Je=this._input.next();be==='"'?Je+=this.__patterns.double_quote.read():Je+=this.__patterns.single_quote.read(),ge=this._create_token(H.VALUE,Je)}else Ue=this.__patterns.attribute.read(),Ue&&(De.type===H.EQUALS?ge=this._create_token(H.VALUE,Ue):ge=this._create_token(H.ATTRIBUTE,Ue));return ge},oe.prototype._is_content_unformatted=function(be){return this._options.void_elements.indexOf(be)===-1&&(this._options.content_unformatted.indexOf(be)!==-1||this._options.unformatted.indexOf(be)!==-1)},oe.prototype._read_raw_content=function(be,De,ke){var ge="";if(ke&&ke.text[0]==="{")ge=this.__patterns.handlebars_raw_close.read();else if(De.type===H.TAG_CLOSE&&De.opened.text[0]==="<"&&De.text[0]!=="/"){var Ue=De.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Ue)&&(ge=this._input.readUntil(new RegExp("</"+Ue+"[\\n\\r\\t ]*?>","ig")))}return ge?this._create_token(H.TEXT,ge):null},oe.prototype._read_script_and_style=function(be,De){if(De.type===H.TAG_CLOSE&&De.opened.text[0]==="<"&&De.text[0]!=="/"){var ke=De.opened.text.substr(1).toLowerCase();if(ke==="script"||ke==="style"){var ge=this._read_comment_or_cdata(be);if(ge)return ge.type=H.TEXT,ge;var Ue=this._input.readUntil(new RegExp("</"+ke+"[\\n\\r\\t ]*?>","ig"));if(Ue)return this._create_token(H.TEXT,Ue)}}return null},oe.prototype._read_content_word=function(be,De){var ke="";return this._options.unformatted_content_delimiter&&be===this._options.unformatted_content_delimiter[0]&&(ke=this.__patterns.unformatted_content_delimiter.read()),ke||(ke=De&&De.type===H.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ke?this._create_token(H.TEXT,ke):null},O.exports.Tokenizer=oe,O.exports.TOKEN=H}],V={};function o(O){var B=V[O];if(B!==void 0)return B.exports;var E=V[O]={exports:{}};return Se[O](E,E.exports,o),E.exports}var le=o(18);He=le})();var xe=He;if(1)re=[Y,Y(58553),Y(87804)],Te=function(Se){var V=Y(58553),o=Y(87804);return{html_beautify:function(le,O){return xe(le,O,V.js_beautify,o.css_beautify)}}}.apply(Ft,re),Te!==void 0&&(kn.exports=Te);else var ne,y})()},58553:function(kn,Ft){var Y,re;(function(){var Te;(function(){"use strict";var xe=[function(V,o,le){var O=le(1).Beautifier,B=le(5).Options;function E(F,L){var Ae=new O(F,L);return Ae.beautify()}V.exports=E,V.exports.defaultOptions=function(){return new B}},function(V,o,le){var O=le(2).Output,B=le(3).Token,E=le(4),F=le(5).Options,L=le(7).Tokenizer,Ae=le(7).line_starters,Z=le(7).positionable_operators,J=le(7).TOKEN;function H(S,W){return W.indexOf(S)!==-1}function z(S){return S.replace(/^\s+/g,"")}function oe(S){for(var W={},_e=0;_e<S.length;_e++)W[S[_e].replace(/-/g,"_")]=S[_e];return W}function be(S,W){return S&&S.type===J.RESERVED&&S.text===W}function De(S,W){return S&&S.type===J.RESERVED&&H(S.text,W)}var ke=["case","return","do","if","throw","else","await","break","continue","async"],ge=["before-newline","after-newline","preserve-newline"],Ue=oe(ge),Je=[Ue.before_newline,Ue.preserve_newline],Be={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function nt(S,W){W.multiline_frame||W.mode===Be.ForInitializer||W.mode===Be.Conditional||S.remove_indent(W.start_line_index)}function ie(S){S=S.replace(E.allLineBreaks,`
`);for(var W=[],_e=S.indexOf(`
`);_e!==-1;)W.push(S.substring(0,_e)),S=S.substring(_e+1),_e=S.indexOf(`
`);return S.length&&W.push(S),W}function Q(S){return S===Be.ArrayLiteral}function q(S){return H(S,[Be.Expression,Be.ForInitializer,Be.Conditional])}function se(S,W){for(var _e=0;_e<S.length;_e++){var qe=S[_e].trim();if(qe.charAt(0)!==W)return!1}return!0}function de(S,W){for(var _e=0,qe=S.length,mt;_e<qe;_e++)if(mt=S[_e],mt&&mt.indexOf(W)!==0)return!1;return!0}function fe(S,W){W=W||{},this._source_text=S||"",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 F(W)}fe.prototype.create_flags=function(S,W){var _e=0;S&&(_e=S.indentation_level,!this._output.just_added_newline()&&S.line_indent_level>_e&&(_e=S.line_indent_level));var qe={mode:W,parent:S,last_token:S?S.last_token:new B(J.START_BLOCK,""),last_word:S?S.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:_e,alignment:0,line_indent_level:S?S.line_indent_level:_e,start_line_index:this._output.get_line_number(),ternary_depth:0};return qe},fe.prototype._reset=function(S){var W=S.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new O(this._options,W),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Be.BlockStatement);var _e=new L(S,this._options);return this._tokens=_e.tokenize(),S},fe.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var S,W=this._reset(this._source_text),_e=this._options.eol;this._options.eol==="auto"&&(_e=`
`,W&&E.lineBreak.test(W||"")&&(_e=W.match(E.lineBreak)[0]));for(var qe=this._tokens.next();qe;)this.handle_token(qe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=qe,qe=this._tokens.next();return S=this._output.get_code(_e),S},fe.prototype.handle_token=function(S,W){S.type===J.START_EXPR?this.handle_start_expr(S):S.type===J.END_EXPR?this.handle_end_expr(S):S.type===J.START_BLOCK?this.handle_start_block(S):S.type===J.END_BLOCK?this.handle_end_block(S):S.type===J.WORD?this.handle_word(S):S.type===J.RESERVED?this.handle_word(S):S.type===J.SEMICOLON?this.handle_semicolon(S):S.type===J.STRING?this.handle_string(S):S.type===J.EQUALS?this.handle_equals(S):S.type===J.OPERATOR?this.handle_operator(S):S.type===J.COMMA?this.handle_comma(S):S.type===J.BLOCK_COMMENT?this.handle_block_comment(S,W):S.type===J.COMMENT?this.handle_comment(S,W):S.type===J.DOT?this.handle_dot(S):S.type===J.EOF?this.handle_eof(S):S.type===J.UNKNOWN?this.handle_unknown(S,W):this.handle_unknown(S,W)},fe.prototype.handle_whitespace_and_comments=function(S,W){var _e=S.newlines,qe=this._options.keep_array_indentation&&Q(this._flags.mode);if(S.comments_before)for(var mt=S.comments_before.next();mt;)this.handle_whitespace_and_comments(mt,W),this.handle_token(mt,W),mt=S.comments_before.next();if(qe)for(var Gt=0;Gt<_e;Gt+=1)this.print_newline(Gt>0,W);else if(this._options.max_preserve_newlines&&_e>this._options.max_preserve_newlines&&(_e=this._options.max_preserve_newlines),this._options.preserve_newlines&&_e>1){this.print_newline(!1,W);for(var Qt=1;Qt<_e;Qt+=1)this.print_newline(!0,W)}};var b=["async","break","continue","return","throw","yield"];fe.prototype.allow_wrap_or_preserved_newline=function(S,W){if(W=W===void 0?!1:W,!this._output.just_added_newline()){var _e=this._options.preserve_newlines&&S.newlines||W,qe=H(this._flags.last_token.text,Z)||H(S.text,Z);if(qe){var mt=H(this._flags.last_token.text,Z)&&H(this._options.operator_position,Je)||H(S.text,Z);_e=_e&&mt}if(_e)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(De(this._flags.last_token,b))return;this._output.set_wrap_point()}}},fe.prototype.print_newline=function(S,W){if(!W&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==J.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var _e=this._tokens.peek();this._flags.mode===Be.Statement&&!(this._flags.if_block&&be(_e,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(S)&&(this._flags.multiline_frame=!0)},fe.prototype.print_token_line_indentation=function(S){this._output.just_added_newline()&&(this._options.keep_array_indentation&&S.newlines&&(S.text==="["||Q(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(S.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))},fe.prototype.print_token=function(S){if(this._output.raw){this._output.add_raw_token(S);return}if(this._options.comma_first&&S.previous&&S.previous.type===J.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var W=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(W),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(S),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(S),this._output.non_breaking_space=!0,this._output.add_token(S.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},fe.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},fe.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))},fe.prototype.set_mode=function(S){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,S),this._flags=this.create_flags(this._previous_flags,S),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},fe.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Be.Statement&&nt(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},fe.prototype.start_of_object_property=function(){return this._flags.parent.mode===Be.ObjectLiteral&&this._flags.mode===Be.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||De(this._flags.last_token,["get","set"]))},fe.prototype.start_of_statement=function(S){var W=!1;return W=W||De(this._flags.last_token,["var","let","const"])&&S.type===J.WORD,W=W||be(this._flags.last_token,"do"),W=W||!(this._flags.parent.mode===Be.ObjectLiteral&&this._flags.mode===Be.Statement)&&De(this._flags.last_token,b)&&!S.newlines,W=W||be(this._flags.last_token,"else")&&!(be(S,"if")&&!S.comments_before),W=W||this._flags.last_token.type===J.END_EXPR&&(this._previous_flags.mode===Be.ForInitializer||this._previous_flags.mode===Be.Conditional),W=W||this._flags.last_token.type===J.WORD&&this._flags.mode===Be.BlockStatement&&!this._flags.in_case&&!(S.text==="--"||S.text==="++")&&this._last_last_text!=="function"&&S.type!==J.WORD&&S.type!==J.RESERVED,W=W||this._flags.mode===Be.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||De(this._flags.last_token,["get","set"])),W?(this.set_mode(Be.Statement),this.indent(),this.handle_whitespace_and_comments(S,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(S,De(S,["do","for","if","while"])),!0):!1},fe.prototype.handle_start_expr=function(S){this.start_of_statement(S)||this.handle_whitespace_and_comments(S);var W=Be.Expression;if(S.text==="["){if(this._flags.last_token.type===J.WORD||this._flags.last_token.text===")"){De(this._flags.last_token,Ae)&&(this._output.space_before_token=!0),this.print_token(S),this.set_mode(W),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}W=Be.ArrayLiteral,Q(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()),H(this._flags.last_token.type,[J.START_EXPR,J.END_EXPR,J.WORD,J.OPERATOR,J.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===J.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,W=Be.ForInitializer):H(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,W=Be.Conditional):H(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&S.whitespace_before===""?this._output.space_before_token=!1:(H(this._flags.last_token.text,Ae)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===J.EQUALS||this._flags.last_token.type===J.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(S);else if(this._flags.last_token.type===J.WORD){this._output.space_before_token=!1;var _e=this._tokens.peek(-3);if(this._options.space_after_named_function&&_e){var qe=this._tokens.peek(-4);De(_e,["async","function"])||_e.text==="*"&&De(qe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Be.ObjectLiteral?(_e.text==="{"||_e.text===","||_e.text==="*"&&(qe.text==="{"||qe.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(S);(this._flags.last_token.type===J.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(H(this._last_last_text,["function","yield"])||this._flags.mode===Be.ObjectLiteral&&H(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===J.START_BLOCK?this.print_newline():(this._flags.last_token.type===J.END_EXPR||this._flags.last_token.type===J.START_EXPR||this._flags.last_token.type===J.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===J.COMMA)&&this.allow_wrap_or_preserved_newline(S,S.newlines),this.print_token(S),this.set_mode(W),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},fe.prototype.handle_end_expr=function(S){for(;this._flags.mode===Be.Statement;)this.restore_mode();this.handle_whitespace_and_comments(S),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(S,S.text==="]"&&Q(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===J.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(S),this.restore_mode(),nt(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Be.Conditional&&(this._previous_flags.mode=Be.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},fe.prototype.handle_start_block=function(S){this.handle_whitespace_and_comments(S);var W=this._tokens.peek(),_e=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===J.END_EXPR?(this.set_mode(Be.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Be.BlockStatement):_e&&(H(_e.text,[":",","])&&H(W.type,[J.STRING,J.WORD,J.RESERVED])||H(W.text,["get","set","..."])&&H(_e.type,[J.WORD,J.RESERVED]))?H(this._last_last_text,["class","interface"])&&!H(_e.text,[":",","])?this.set_mode(Be.BlockStatement):this.set_mode(Be.ObjectLiteral):this._flags.last_token.type===J.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Be.BlockStatement):H(this._flags.last_token.type,[J.EQUALS,J.START_EXPR,J.COMMA,J.OPERATOR])||De(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Be.ObjectLiteral):this.set_mode(Be.BlockStatement),this._flags.last_token&&De(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var qe=!W.comments_before&&W.text==="}",mt=qe&&this._flags.last_word==="function"&&this._flags.last_token.type===J.END_EXPR;if(this._options.brace_preserve_inline){var Gt=0,Qt=null;this._flags.inline_frame=!0;do if(Gt+=1,Qt=this._tokens.peek(Gt-1),Qt.newlines){this._flags.inline_frame=!1;break}while(Qt.type!==J.EOF&&!(Qt.type===J.END_BLOCK&&Qt.opened===S))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&S.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==J.OPERATOR&&(mt||this._flags.last_token.type===J.EQUALS||De(this._flags.last_token,ke)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(Q(this._previous_flags.mode)&&(this._flags.last_token.type===J.START_EXPR||this._flags.last_token.type===J.COMMA)&&((this._flags.last_token.type===J.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===J.COMMA||this._flags.last_token.type===J.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(S),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==J.OPERATOR&&this._flags.last_token.type!==J.START_EXPR&&(H(this._flags.last_token.type,[J.START_BLOCK,J.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(S),this.indent(),!qe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},fe.prototype.handle_end_block=function(S){for(this.handle_whitespace_and_comments(S);this._flags.mode===Be.Statement;)this.restore_mode();var W=this._flags.last_token.type===J.START_BLOCK;this._flags.inline_frame&&!W?this._output.space_before_token=!0:this._options.brace_style==="expand"?W||this.print_newline():W||(Q(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(S)},fe.prototype.handle_word=function(S){if(S.type===J.RESERVED){if(H(S.text,["set","get"])&&this._flags.mode!==Be.ObjectLiteral)S.type=J.WORD;else if(S.text==="import"&&H(this._tokens.peek().text,["(","."]))S.type=J.WORD;else if(H(S.text,["as","from"])&&!this._flags.import_block)S.type=J.WORD;else if(this._flags.mode===Be.ObjectLiteral){var W=this._tokens.peek();W.text===":"&&(S.type=J.WORD)}}if(this.start_of_statement(S)?De(this._flags.last_token,["var","let","const"])&&S.type===J.WORD&&(this._flags.declaration_statement=!0):S.newlines&&!q(this._flags.mode)&&(this._flags.last_token.type!==J.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==J.EQUALS&&(this._options.preserve_newlines||!De(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(S),this.print_newline()):this.handle_whitespace_and_comments(S),this._flags.do_block&&!this._flags.do_while)if(be(S,"while")){this._output.space_before_token=!0,this.print_token(S),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&&be(S,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Be.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&De(S,["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(S),this._flags.in_case=!0;return}if((this._flags.last_token.type===J.COMMA||this._flags.last_token.type===J.START_EXPR||this._flags.last_token.type===J.EQUALS||this._flags.last_token.type===J.OPERATOR)&&!this.start_of_object_property()&&!(H(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Be.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(S),be(S,"function")){(H(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(H(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===J.OPERATOR))&&!this._output.just_added_blankline()&&!S.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===J.RESERVED||this._flags.last_token.type===J.WORD?De(this._flags.last_token,["get","set","new","export"])||De(this._flags.last_token,b)?this._output.space_before_token=!0:be(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===J.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(q(this._flags.mode)||Q(this._flags.mode))||this.print_newline(),this.print_token(S),this._flags.last_word=S.text;return}var _e="NONE";if(this._flags.last_token.type===J.END_BLOCK?this._previous_flags.inline_frame?_e="SPACE":De(S,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&S.newlines?_e="NEWLINE":(_e="SPACE",this._output.space_before_token=!0):_e="NEWLINE":this._flags.last_token.type===J.SEMICOLON&&this._flags.mode===Be.BlockStatement?_e="NEWLINE":this._flags.last_token.type===J.SEMICOLON&&q(this._flags.mode)?_e="SPACE":this._flags.last_token.type===J.STRING?_e="NEWLINE":this._flags.last_token.type===J.RESERVED||this._flags.last_token.type===J.WORD||this._flags.last_token.text==="*"&&(H(this._last_last_text,["function","yield"])||this._flags.mode===Be.ObjectLiteral&&H(this._last_last_text,["{",","]))?_e="SPACE":this._flags.last_token.type===J.START_BLOCK?this._flags.inline_frame?_e="SPACE":_e="NEWLINE":this._flags.last_token.type===J.END_EXPR&&(this._output.space_before_token=!0,_e="NEWLINE"),De(S,Ae)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?_e="SPACE":_e="NEWLINE"),De(S,["else","catch","finally"]))if((!(this._flags.last_token.type===J.END_BLOCK&&this._previous_flags.mode===Be.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&S.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var qe=this._output.current_line;qe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else _e==="NEWLINE"?De(this._flags.last_token,ke)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&De(S,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==J.END_EXPR?(this._flags.last_token.type!==J.START_EXPR||!De(S,["var","let","const"]))&&this._flags.last_token.text!==":"&&(be(S,"if")&&be(S.previous,"else")?this._output.space_before_token=!0:this.print_newline()):De(S,Ae)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&Q(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():_e==="SPACE"&&(this._output.space_before_token=!0);S.previous&&(S.previous.type===J.WORD||S.previous.type===J.RESERVED)&&(this._output.space_before_token=!0),this.print_token(S),this._flags.last_word=S.text,S.type===J.RESERVED&&(S.text==="do"?this._flags.do_block=!0:S.text==="if"?this._flags.if_block=!0:S.text==="import"?this._flags.import_block=!0:this._flags.import_block&&be(S,"from")&&(this._flags.import_block=!1))},fe.prototype.handle_semicolon=function(S){this.start_of_statement(S)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(S);for(var W=this._tokens.peek();this._flags.mode===Be.Statement&&!(this._flags.if_block&&be(W,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(S)},fe.prototype.handle_string=function(S){S.text.startsWith("`")&&S.newlines===0&&S.whitespace_before===""&&(S.previous.text===")"||this._flags.last_token.type===J.WORD)||(this.start_of_statement(S)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(S),this._flags.last_token.type===J.RESERVED||this._flags.last_token.type===J.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===J.COMMA||this._flags.last_token.type===J.START_EXPR||this._flags.last_token.type===J.EQUALS||this._flags.last_token.type===J.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(S):S.text.startsWith("`")&&this._flags.last_token.type===J.END_EXPR&&(S.previous.text==="]"||S.previous.text===")")&&S.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(S)},fe.prototype.handle_equals=function(S){this.start_of_statement(S)||this.handle_whitespace_and_comments(S),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(S),this._output.space_before_token=!0},fe.prototype.handle_comma=function(S){this.handle_whitespace_and_comments(S,!0),this.print_token(S),this._output.space_before_token=!0,this._flags.declaration_statement?(q(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(S)):this._flags.mode===Be.ObjectLiteral||this._flags.mode===Be.Statement&&this._flags.parent.mode===Be.ObjectLiteral?(this._flags.mode===Be.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(S)},fe.prototype.handle_operator=function(S){var W=S.text==="*"&&(De(this._flags.last_token,["function","yield"])||H(this._flags.last_token.type,[J.START_BLOCK,J.COMMA,J.END_BLOCK,J.SEMICOLON])),_e=H(S.text,["-","+"])&&(H(this._flags.last_token.type,[J.START_BLOCK,J.START_EXPR,J.EQUALS,J.OPERATOR])||H(this._flags.last_token.text,Ae)||this._flags.last_token.text===",");if(!this.start_of_statement(S)){var qe=!W;this.handle_whitespace_and_comments(S,qe)}if(S.text==="*"&&this._flags.last_token.type===J.DOT){this.print_token(S);return}if(S.text==="::"){this.print_token(S);return}if(H(S.text,["-","+"])&&this.start_of_object_property()){this.print_token(S);return}if(this._flags.last_token.type===J.OPERATOR&&H(this._options.operator_position,Je)&&this.allow_wrap_or_preserved_newline(S),S.text===":"&&this._flags.in_case){this.print_token(S),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==J.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 mt=!0,Gt=!0,Qt=!1;if(S.text===":"?this._flags.ternary_depth===0?mt=!1:(this._flags.ternary_depth-=1,Qt=!0):S.text==="?"&&(this._flags.ternary_depth+=1),!_e&&!W&&this._options.preserve_newlines&&H(S.text,Z)){var sn=S.text===":",Wt=sn&&Qt,kt=sn&&!Qt;switch(this._options.operator_position){case Ue.before_newline:this._output.space_before_token=!kt,this.print_token(S),(!sn||Wt)&&this.allow_wrap_or_preserved_newline(S),this._output.space_before_token=!0;return;case Ue.after_newline:this._output.space_before_token=!0,!sn||Wt?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(S):this._output.space_before_token=!1,this.print_token(S),this._output.space_before_token=!0;return;case Ue.preserve_newline:kt||this.allow_wrap_or_preserved_newline(S),mt=!(this._output.just_added_newline()||kt),this._output.space_before_token=mt,this.print_token(S),this._output.space_before_token=!0;return}}if(W){this.allow_wrap_or_preserved_newline(S),mt=!1;var Xe=this._tokens.peek();Gt=Xe&&H(Xe.type,[J.WORD,J.RESERVED])}else if(S.text==="...")this.allow_wrap_or_preserved_newline(S),mt=this._flags.last_token.type===J.START_BLOCK,Gt=!1;else if(H(S.text,["--","++","!","~"])||_e){if((this._flags.last_token.type===J.COMMA||this._flags.last_token.type===J.START_EXPR)&&this.allow_wrap_or_preserved_newline(S),mt=!1,Gt=!1,S.newlines&&(S.text==="--"||S.text==="++"||S.text==="~")){var dt=De(this._flags.last_token,ke)&&S.newlines;dt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(dt,!0)}this._flags.last_token.text===";"&&q(this._flags.mode)&&(mt=!0),this._flags.last_token.type===J.RESERVED?mt=!0:this._flags.last_token.type===J.END_EXPR?mt=!(this._flags.last_token.text==="]"&&(S.text==="--"||S.text==="++")):this._flags.last_token.type===J.OPERATOR&&(mt=H(S.text,["--","-","++","+"])&&H(this._flags.last_token.text,["--","-","++","+"]),H(S.text,["+","-"])&&H(this._flags.last_token.text,["--","++"])&&(Gt=!0)),(this._flags.mode===Be.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Be.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||mt,this.print_token(S),this._output.space_before_token=Gt},fe.prototype.handle_block_comment=function(S,W){if(this._output.raw){this._output.add_raw_token(S),S.directives&&S.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(S.directives){this.print_newline(!1,W),this.print_token(S),S.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!E.newline.test(S.text)&&!S.newlines){this._output.space_before_token=!0,this.print_token(S),this._output.space_before_token=!0;return}else this.print_block_commment(S,W)},fe.prototype.print_block_commment=function(S,W){var _e=ie(S.text),qe,mt=!1,Gt=!1,Qt=S.whitespace_before,sn=Qt.length;if(this.print_newline(!1,W),this.print_token_line_indentation(S),this._output.add_token(_e[0]),this.print_newline(!1,W),_e.length>1){for(_e=_e.slice(1),mt=se(_e,"*"),Gt=de(_e,Qt),mt&&(this._flags.alignment=1),qe=0;qe<_e.length;qe++)mt?(this.print_token_line_indentation(S),this._output.add_token(z(_e[qe]))):Gt&&_e[qe]?(this.print_token_line_indentation(S),this._output.add_token(_e[qe].substring(sn))):(this._output.current_line.set_indent(-1),this._output.add_token(_e[qe])),this.print_newline(!1,W);this._flags.alignment=0}},fe.prototype.handle_comment=function(S,W){S.newlines?this.print_newline(!1,W):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(S),this.print_newline(!1,W)},fe.prototype.handle_dot=function(S){this.start_of_statement(S)||this.handle_whitespace_and_comments(S,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),De(this._flags.last_token,ke)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(S,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(S)},fe.prototype.handle_unknown=function(S,W){this.print_token(S),S.text[S.text.length-1]===`
`&&this.print_newline(!1,W)},fe.prototype.handle_eof=function(S){for(;this._flags.mode===Be.Statement;)this.restore_mode();this.handle_whitespace_and_comments(S)},V.exports.Beautifier=fe},function(V){function o(B){this.__parent=B,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 B=new o(this.__parent);return B.set_indent(this.__indent_count,this.__alignment_count),B},o.prototype.item=function(B){return B<0?this.__items[this.__items.length+B]:this.__items[B]},o.prototype.has_match=function(B){for(var E=this.__items.length-1;E>=0;E--)if(this.__items[E].match(B))return!0;return!1},o.prototype.set_indent=function(B,E){this.is_empty()&&(this.__indent_count=B||0,this.__alignment_count=E||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 B=this.__parent.current_line;return B.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),B.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),B.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,B.__items[0]===" "&&(B.__items.splice(0,1),B.__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(B){this.__items.push(B);var E=B.lastIndexOf(`
`);E!==-1?this.__character_count=B.length-E:this.__character_count+=B.length},o.prototype.pop=function(){var B=null;return this.is_empty()||(B=this.__items.pop(),this.__character_count-=B.length),B},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 B="";return this.is_empty()?this.__parent.indent_empty_lines&&(B=this.__parent.get_indent_string(this.__indent_count)):(B=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),B+=this.__items.join("")),B};function le(B,E){this.__cache=[""],this.__indent_size=B.indent_size,this.__indent_string=B.indent_char,B.indent_with_tabs||(this.__indent_string=new Array(B.indent_size+1).join(B.indent_char)),E=E||"",B.indent_level>0&&(E=new Array(B.indent_level+1).join(this.__indent_string)),this.__base_string=E,this.__base_string_length=E.length}le.prototype.get_indent_size=function(B,E){var F=this.__base_string_length;return E=E||0,B<0&&(F=0),F+=B*this.__indent_size,F+=E,F},le.prototype.get_indent_string=function(B,E){var F=this.__base_string;return E=E||0,B<0&&(B=0,F=""),E+=B*this.__indent_size,this.__ensure_cache(E),F+=this.__cache[E],F},le.prototype.__ensure_cache=function(B){for(;B>=this.__cache.length;)this.__add_column()},le.prototype.__add_column=function(){var B=this.__cache.length,E=0,F="";this.__indent_size&&B>=this.__indent_size&&(E=Math.floor(B/this.__indent_size),B-=E*this.__indent_size,F=new Array(E+1).join(this.__indent_string)),B&&(F+=new Array(B+1).join(" ")),this.__cache.push(F)};function O(B,E){this.__indent_cache=new le(B,E),this.raw=!1,this._end_with_newline=B.end_with_newline,this.indent_size=B.indent_size,this.wrap_line_length=B.wrap_line_length,this.indent_empty_lines=B.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()}O.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},O.prototype.get_line_number=function(){return this.__lines.length},O.prototype.get_indent_string=function(B,E){return this.__indent_cache.get_indent_string(B,E)},O.prototype.get_indent_size=function(B,E){return this.__indent_cache.get_indent_size(B,E)},O.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},O.prototype.add_new_line=function(B){return this.is_empty()||!B&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},O.prototype.get_code=function(B){this.trim(!0);var E=this.current_line.pop();E&&(E[E.length-1]===`
`&&(E=E.replace(/\n+$/g,"")),this.current_line.push(E)),this._end_with_newline&&this.__add_outputline();var F=this.__lines.join(`
`);return B!==`
`&&(F=F.replace(/[\n]/g,B)),F},O.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},O.prototype.set_indent=function(B,E){return B=B||0,E=E||0,this.next_line.set_indent(B,E),this.__lines.length>1?(this.current_line.set_indent(B,E),!0):(this.current_line.set_indent(),!1)},O.prototype.add_raw_token=function(B){for(var E=0;E<B.newlines;E++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(B.whitespace_before),this.current_line.push(B.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},O.prototype.add_token=function(B){this.__add_space_before_token(),this.current_line.push(B),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},O.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(" "))},O.prototype.remove_indent=function(B){for(var E=this.__lines.length;B<E;)this.__lines[B]._remove_indent(),B++;this.current_line._remove_wrap_indent()},O.prototype.trim=function(B){for(B=B===void 0?!1:B,this.current_line.trim();B&&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},O.prototype.just_added_newline=function(){return this.current_line.is_empty()},O.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},O.prototype.ensure_empty_line_above=function(B,E){for(var F=this.__lines.length-2;F>=0;){var L=this.__lines[F];if(L.is_empty())break;if(L.item(0).indexOf(B)!==0&&L.item(-1)!==E){this.__lines.splice(F+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}F--}},V.exports.Output=O},function(V){function o(le,O,B,E){this.type=le,this.text=O,this.comments_before=null,this.newlines=B||0,this.whitespace_before=E||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}V.exports.Token=o},function(V,o){var le="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",O="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",B="\\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",E="\\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",F="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",L="(?:"+F+"|["+le+B+"])",Ae="(?:"+F+"|["+O+B+E+"])*";o.identifier=new RegExp(L+Ae,"g"),o.identifierStart=new RegExp(L),o.identifierMatch=new RegExp("(?:"+F+"|["+O+B+E+"])+");var Z=/[\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(V,o,le){var O=le(6).Options,B=["before-newline","after-newline","preserve-newline"];function E(F){O.call(this,F,"js");var L=this.raw_options.brace_style||null;L==="expand-strict"?this.raw_options.brace_style="expand":L==="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 Ae=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var Z=0;Z<Ae.length;Z++)Ae[Z]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=Ae[Z];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",B),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}E.prototype=new O,V.exports.Options=E},function(V){function o(B,E){this.raw_options=le(B,E),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(B,E){var F=this.raw_options[B],L=E||[];return typeof F=="object"?F!==null&&typeof F.concat=="function"&&(L=F.concat()):typeof F=="string"&&(L=F.split(/[^a-zA-Z0-9_\/\-]+/)),L},o.prototype._get_boolean=function(B,E){var F=this.raw_options[B],L=F===void 0?!!E:!!F;return L},o.prototype._get_characters=function(B,E){var F=this.raw_options[B],L=E||"";return typeof F=="string"&&(L=F.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),L},o.prototype._get_number=function(B,E){var F=this.raw_options[B];E=parseInt(E,10),isNaN(E)&&(E=0);var L=parseInt(F,10);return isNaN(L)&&(L=E),L},o.prototype._get_selection=function(B,E,F){var L=this._get_selection_list(B,E,F);if(L.length!==1)throw new Error("Invalid Option Value: The option '"+B+`' can only be one of the following values:
`+E+`
You passed in: '`+this.raw_options[B]+"'");return L[0]},o.prototype._get_selection_list=function(B,E,F){if(!E||E.length===0)throw new Error("Selection list cannot be empty.");if(F=F||[E[0]],!this._is_valid_selection(F,E))throw new Error("Invalid Default Value!");var L=this._get_array(B,F);if(!this._is_valid_selection(L,E))throw new Error("Invalid Option Value: The option '"+B+`' can contain only the following values:
`+E+`
You passed in: '`+this.raw_options[B]+"'");return L},o.prototype._is_valid_selection=function(B,E){return B.length&&E.length&&!B.some(function(F){return E.indexOf(F)===-1})};function le(B,E){var F={};B=O(B);var L;for(L in B)L!==E&&(F[L]=B[L]);if(E&&B[E])for(L in B[E])F[L]=B[E][L];return F}function O(B){var E={},F;for(F in B){var L=F.replace(/-/g,"_");E[L]=B[F]}return E}V.exports.Options=o,V.exports.normalizeOpts=O,V.exports.mergeOpts=le},function(V,o,le){var O=le(8).InputScanner,B=le(9).Tokenizer,E=le(9).TOKEN,F=le(13).Directives,L=le(4),Ae=le(12).Pattern,Z=le(14).TemplatablePattern;function J(se,de){return de.indexOf(se)!==-1}var H={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:E.START,RAW:E.RAW,EOF:E.EOF},z=new F(/\/\*/,/\*\//),oe=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,be=/[0-9]/,De=/[^\d\.]/,ke=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ge=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ge=ge.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ge="\\?\\.(?!\\d) "+ge,ge=ge.replace(/ /g,"|");var Ue=new RegExp(ge),Je="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Be=Je.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),nt=new RegExp("^(?:"+Be.join("|")+")$"),ie,Q=function(se,de){B.call(this,se,de),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var fe=new Ae(this._input),b=new Z(this._input).read_options(this._options);this.__patterns={template:b,identifier:b.starting_with(L.identifier).matching(L.identifierMatch),number:fe.matching(oe),punct:fe.matching(Ue),comment:fe.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:fe.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:fe.matching(/<!--/),html_comment_end:fe.matching(/-->/),include:fe.starting_with(/#include/).until_after(L.lineBreak),shebang:fe.starting_with(/#!/).until_after(L.lineBreak),xml:fe.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:b.until(/['\\\n\r\u2028\u2029]/),double_quote:b.until(/["\\\n\r\u2028\u2029]/),template_text:b.until(/[`\\$]/),template_expression:b.until(/[`}\\]/)}};Q.prototype=new B,Q.prototype._is_comment=function(se){return se.type===H.COMMENT||se.type===H.BLOCK_COMMENT||se.type===H.UNKNOWN},Q.prototype._is_opening=function(se){return se.type===H.START_BLOCK||se.type===H.START_EXPR},Q.prototype._is_closing=function(se,de){return(se.type===H.END_BLOCK||se.type===H.END_EXPR)&&de&&(se.text==="]"&&de.text==="["||se.text===")"&&de.text==="("||se.text==="}"&&de.text==="{")},Q.prototype._reset=function(){ie=!1},Q.prototype._get_next_token=function(se,de){var fe=null;this._readWhitespace();var b=this._input.peek();return b===null?this._create_token(H.EOF,""):(fe=fe||this._read_non_javascript(b),fe=fe||this._read_string(b),fe=fe||this._read_pair(b,this._input.peek(1)),fe=fe||this._read_word(se),fe=fe||this._read_singles(b),fe=fe||this._read_comment(b),fe=fe||this._read_regexp(b,se),fe=fe||this._read_xml(b,se),fe=fe||this._read_punctuation(),fe=fe||this._create_token(H.UNKNOWN,this._input.next()),fe)},Q.prototype._read_word=function(se){var de;if(de=this.__patterns.identifier.read(),de!=="")return de=de.replace(L.allLineBreaks,`
`),!(se.type===H.DOT||se.type===H.RESERVED&&(se.text==="set"||se.text==="get"))&&nt.test(de)?(de==="in"||de==="of")&&(se.type===H.WORD||se.type===H.STRING)?this._create_token(H.OPERATOR,de):this._create_token(H.RESERVED,de):this._create_token(H.WORD,de);if(de=this.__patterns.number.read(),de!=="")return this._create_token(H.WORD,de)},Q.prototype._read_singles=function(se){var de=null;return se==="("||se==="["?de=this._create_token(H.START_EXPR,se):se===")"||se==="]"?de=this._create_token(H.END_EXPR,se):se==="{"?de=this._create_token(H.START_BLOCK,se):se==="}"?de=this._create_token(H.END_BLOCK,se):se===";"?de=this._create_token(H.SEMICOLON,se):se==="."&&De.test(this._input.peek(1))?de=this._create_token(H.DOT,se):se===","&&(de=this._create_token(H.COMMA,se)),de&&this._input.next(),de},Q.prototype._read_pair=function(se,de){var fe=null;return se==="#"&&de==="{"&&(fe=this._create_token(H.START_BLOCK,se+de)),fe&&(this._input.next(),this._input.next()),fe},Q.prototype._read_punctuation=function(){var se=this.__patterns.punct.read();if(se!=="")return se==="="?this._create_token(H.EQUALS,se):se==="?."?this._create_token(H.DOT,se):this._create_token(H.OPERATOR,se)},Q.prototype._read_non_javascript=function(se){var de="";if(se==="#"){if(this._is_first_token()&&(de=this.__patterns.shebang.read(),de))return this._create_token(H.UNKNOWN,de.trim()+`
`);if(de=this.__patterns.include.read(),de)return this._create_token(H.UNKNOWN,de.trim()+`
`);se=this._input.next();var fe="#";if(this._input.hasNext()&&this._input.testChar(be)){do se=this._input.next(),fe+=se;while(this._input.hasNext()&&se!=="#"&&se!=="=");return se==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(fe+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(fe+="{}",this._input.next(),this._input.next())),this._create_token(H.WORD,fe)}this._input.back()}else if(se==="<"&&this._is_first_token()){if(de=this.__patterns.html_comment_start.read(),de){for(;this._input.hasNext()&&!this._input.testChar(L.newline);)de+=this._input.next();return ie=!0,this._create_token(H.COMMENT,de)}}else if(ie&&se==="-"&&(de=this.__patterns.html_comment_end.read(),de))return ie=!1,this._create_token(H.COMMENT,de);return null},Q.prototype._read_comment=function(se){var de=null;if(se==="/"){var fe="";if(this._input.peek(1)==="*"){fe=this.__patterns.block_comment.read();var b=z.get_directives(fe);b&&b.ignore==="start"&&(fe+=z.readIgnored(this._input)),fe=fe.replace(L.allLineBreaks,`
`),de=this._create_token(H.BLOCK_COMMENT,fe),de.directives=b}else this._input.peek(1)==="/"&&(fe=this.__patterns.comment.read(),de=this._create_token(H.COMMENT,fe))}return de},Q.prototype._read_string=function(se){if(se==="`"||se==="'"||se==='"'){var de=this._input.next();return this.has_char_escapes=!1,se==="`"?de+=this._read_string_recursive("`",!0,"${"):de+=this._read_string_recursive(se),this.has_char_escapes&&this._options.unescape_strings&&(de=q(de)),this._input.peek()===se&&(de+=this._input.next()),de=de.replace(L.allLineBreaks,`
`),this._create_token(H.STRING,de)}return null},Q.prototype._allow_regexp_or_xml=function(se){return se.type===H.RESERVED&&J(se.text,["return","case","throw","else","do","typeof","yield"])||se.type===H.END_EXPR&&se.text===")"&&se.opened.previous.type===H.RESERVED&&J(se.opened.previous.text,["if","while","for"])||J(se.type,[H.COMMENT,H.START_EXPR,H.START_BLOCK,H.START,H.END_BLOCK,H.OPERATOR,H.EQUALS,H.EOF,H.SEMICOLON,H.COMMA])},Q.prototype._read_regexp=function(se,de){if(se==="/"&&this._allow_regexp_or_xml(de)){for(var fe=this._input.next(),b=!1,S=!1;this._input.hasNext()&&(b||S||this._input.peek()!==se)&&!this._input.testChar(L.newline);)fe+=this._input.peek(),b?b=!1:(b=this._input.peek()==="\\",this._input.peek()==="["?S=!0:this._input.peek()==="]"&&(S=!1)),this._input.next();return this._input.peek()===se&&(fe+=this._input.next(),fe+=this._input.read(L.identifier)),this._create_token(H.STRING,fe)}return null},Q.prototype._read_xml=function(se,de){if(this._options.e4x&&se==="<"&&this._allow_regexp_or_xml(de)){var fe="",b=this.__patterns.xml.read_match();if(b){for(var S=b[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=S.indexOf("{")===0,_e=0;b;){var qe=!!b[1],mt=b[2],Gt=!!b[b.length-1]||mt.slice(0,8)==="![CDATA[";if(!Gt&&(mt===S||W&&mt.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(qe?--_e:++_e),fe+=b[0],_e<=0)break;b=this.__patterns.xml.read_match()}return b||(fe+=this._input.match(/[\s\S]*/g)[0]),fe=fe.replace(L.allLineBreaks,`
`),this._create_token(H.STRING,fe)}}return null};function q(se){for(var de="",fe=0,b=new O(se),S=null;b.hasNext();)if(S=b.match(/([\s]|[^\\]|\\\\)+/g),S&&(de+=S[0]),b.peek()==="\\"){if(b.next(),b.peek()==="x")S=b.match(/x([0-9A-Fa-f]{2})/g);else if(b.peek()==="u")S=b.match(/u([0-9A-Fa-f]{4})/g),S||(S=b.match(/u\{([0-9A-Fa-f]+)\}/g));else{de+="\\",b.hasNext()&&(de+=b.next());continue}if(!S||(fe=parseInt(S[1],16),fe>126&&fe<=255&&S[0].indexOf("x")===0))return se;fe>=0&&fe<32||fe>1114111?de+="\\"+S[0]:fe===34||fe===39||fe===92?de+="\\"+String.fromCharCode(fe):de+=String.fromCharCode(fe)}return de}Q.prototype._read_string_recursive=function(se,de,fe){var b,S;se==="'"?S=this.__patterns.single_quote:se==='"'?S=this.__patterns.double_quote:se==="`"?S=this.__patterns.template_text:se==="}"&&(S=this.__patterns.template_expression);for(var W=S.read(),_e="";this._input.hasNext();){if(_e=this._input.next(),_e===se||!de&&L.newline.test(_e)){this._input.back();break}else _e==="\\"&&this._input.hasNext()?(b=this._input.peek(),b==="x"||b==="u"?this.has_char_escapes=!0:b==="\r"&&this._input.peek(1)===`
`&&this._input.next(),_e+=this._input.next()):fe&&(fe==="${"&&_e==="$"&&this._input.peek()==="{"&&(_e+=this._input.next()),fe===_e&&(se==="`"?_e+=this._read_string_recursive("}",de,"`"):_e+=this._read_string_recursive("`",de,"${"),this._input.hasNext()&&(_e+=this._input.next())));_e+=S.read(),W+=_e}return W},V.exports.Tokenizer=Q,V.exports.TOKEN=H,V.exports.positionable_operators=ke.slice(),V.exports.line_starters=Je.slice()},function(V){var o=RegExp.prototype.hasOwnProperty("sticky");function le(O){this.__input=O||"",this.__input_length=this.__input.length,this.__position=0}le.prototype.restart=function(){this.__position=0},le.prototype.back=function(){this.__position>0&&(this.__position-=1)},le.prototype.hasNext=function(){return this.__position<this.__input_length},le.prototype.next=function(){var O=null;return this.hasNext()&&(O=this.__input.charAt(this.__position),this.__position+=1),O},le.prototype.peek=function(O){var B=null;return O=O||0,O+=this.__position,O>=0&&O<this.__input_length&&(B=this.__input.charAt(O)),B},le.prototype.__match=function(O,B){O.lastIndex=B;var E=O.exec(this.__input);return E&&!(o&&O.sticky)&&E.index!==B&&(E=null),E},le.prototype.test=function(O,B){return B=B||0,B+=this.__position,B>=0&&B<this.__input_length?!!this.__match(O,B):!1},le.prototype.testChar=function(O,B){var E=this.peek(B);return O.lastIndex=0,E!==null&&O.test(E)},le.prototype.match=function(O){var B=this.__match(O,this.__position);return B?this.__position+=B[0].length:B=null,B},le.prototype.read=function(O,B,E){var F="",L;return O&&(L=this.match(O),L&&(F+=L[0])),B&&(L||!O)&&(F+=this.readUntil(B,E)),F},le.prototype.readUntil=function(O,B){var E="",F=this.__position;O.lastIndex=this.__position;var L=O.exec(this.__input);return L?(F=L.index,B&&(F+=L[0].length)):F=this.__input_length,E=this.__input.substring(this.__position,F),this.__position=F,E},le.prototype.readUntilAfter=function(O){return this.readUntil(O,!0)},le.prototype.get_regexp=function(O,B){var E=null,F="g";return B&&o&&(F="y"),typeof O=="string"&&O!==""?E=new RegExp(O,F):O&&(E=new RegExp(O.source,F)),E},le.prototype.get_literal_regexp=function(O){return RegExp(O.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},le.prototype.peekUntilAfter=function(O){var B=this.__position,E=this.readUntilAfter(O);return this.__position=B,E},le.prototype.lookBack=function(O){var B=this.__position-1;return B>=O.length&&this.__input.substring(B-O.length,B).toLowerCase()===O},V.exports.InputScanner=le},function(V,o,le){var O=le(8).InputScanner,B=le(3).Token,E=le(10).TokenStream,F=le(11).WhitespacePattern,L={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},Ae=function(Z,J){this._input=new O(Z),this._options=J||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new F(this._input)};Ae.prototype.tokenize=function(){this._input.restart(),this.__tokens=new E,this._reset();for(var Z,J=new B(L.START,""),H=null,z=[],oe=new E;J.type!==L.EOF;){for(Z=this._get_next_token(J,H);this._is_comment(Z);)oe.add(Z),Z=this._get_next_token(J,H);oe.isEmpty()||(Z.comments_before=oe,oe=new E),Z.parent=H,this._is_opening(Z)?(z.push(H),H=Z):H&&this._is_closing(Z,H)&&(Z.opened=H,H.closed=Z,H=z.pop(),Z.parent=H),Z.previous=J,J.next=Z,this.__tokens.add(Z),J=Z}return this.__tokens},Ae.prototype._is_first_token=function(){return this.__tokens.isEmpty()},Ae.prototype._reset=function(){},Ae.prototype._get_next_token=function(Z,J){this._readWhitespace();var H=this._input.read(/.+/g);return H?this._create_token(L.RAW,H):this._create_token(L.EOF,"")},Ae.prototype._is_comment=function(Z){return!1},Ae.prototype._is_opening=function(Z){return!1},Ae.prototype._is_closing=function(Z,J){return!1},Ae.prototype._create_token=function(Z,J){var H=new B(Z,J,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return H},Ae.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},V.exports.Tokenizer=Ae,V.exports.TOKEN=L},function(V){function o(le){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=le}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 le=null;return this.hasNext()&&(le=this.__tokens[this.__position],this.__position+=1),le},o.prototype.peek=function(le){var O=null;return le=le||0,le+=this.__position,le>=0&&le<this.__tokens_length&&(O=this.__tokens[le]),O},o.prototype.add=function(le){this.__parent_token&&(le.parent=this.__parent_token),this.__tokens.push(le),this.__tokens_length+=1},V.exports.TokenStream=o},function(V,o,le){var O=le(12).Pattern;function B(E,F){O.call(this,E,F),F?this._line_regexp=this._input.get_regexp(F._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}B.prototype=new O,B.prototype.__set_whitespace_patterns=function(E,F){E+="\\t ",F+="\\n\\r",this._match_pattern=this._input.get_regexp("["+E+F+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+F+"]")},B.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var E=this._input.read(this._match_pattern);if(E===" ")this.whitespace_before_token=" ";else if(E){var F=this.__split(this._newline_regexp,E);this.newline_count=F.length-1,this.whitespace_before_token=F[this.newline_count]}return E},B.prototype.matching=function(E,F){var L=this._create();return L.__set_whitespace_patterns(E,F),L._update(),L},B.prototype._create=function(){return new B(this._input,this)},B.prototype.__split=function(E,F){E.lastIndex=0;for(var L=0,Ae=[],Z=E.exec(F);Z;)Ae.push(F.substring(L,Z.index)),L=Z.index+Z[0].length,Z=E.exec(F);return L<F.length?Ae.push(F.substring(L,F.length)):Ae.push(""),Ae},V.exports.WhitespacePattern=B},function(V){function o(le,O){this._input=le,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,O&&(this._starting_pattern=this._input.get_regexp(O._starting_pattern,!0),this._match_pattern=this._input.get_regexp(O._match_pattern,!0),this._until_pattern=this._input.get_regexp(O._until_pattern),this._until_after=O._until_after)}o.prototype.read=function(){var le=this._input.read(this._starting_pattern);return(!this._starting_pattern||le)&&(le+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),le},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(le){var O=this._create();return O._until_after=!0,O._until_pattern=this._input.get_regexp(le),O._update(),O},o.prototype.until=function(le){var O=this._create();return O._until_after=!1,O._until_pattern=this._input.get_regexp(le),O._update(),O},o.prototype.starting_with=function(le){var O=this._create();return O._starting_pattern=this._input.get_regexp(le,!0),O._update(),O},o.prototype.matching=function(le){var O=this._create();return O._match_pattern=this._input.get_regexp(le,!0),O._update(),O},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},V.exports.Pattern=o},function(V){function o(le,O){le=typeof le=="string"?le:le.source,O=typeof O=="string"?O:O.source,this.__directives_block_pattern=new RegExp(le+/ beautify( \w+[:]\w+)+ /.source+O,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(le+/\sbeautify\signore:end\s/.source+O,"g")}o.prototype.get_directives=function(le){if(!le.match(this.__directives_block_pattern))return null;var O={};this.__directive_pattern.lastIndex=0;for(var B=this.__directive_pattern.exec(le);B;)O[B[1]]=B[2],B=this.__directive_pattern.exec(le);return O},o.prototype.readIgnored=function(le){return le.readUntilAfter(this.__directives_end_ignore_pattern)},V.exports.Directives=o},function(V,o,le){var O=le(12).Pattern,B={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function E(F,L){O.call(this,F,L),this.__template_pattern=null,this._disabled=Object.assign({},B),this._excluded=Object.assign({},B),L&&(this.__template_pattern=this._input.get_regexp(L.__template_pattern),this._excluded=Object.assign(this._excluded,L._excluded),this._disabled=Object.assign(this._disabled,L._disabled));var Ae=new O(F);this.__patterns={handlebars_comment:Ae.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:Ae.starting_with(/{{{/).until_after(/}}}/),handlebars:Ae.starting_with(/{{/).until_after(/}}/),php:Ae.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:Ae.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:Ae.starting_with(/{%/).until_after(/%}/),django_value:Ae.starting_with(/{{/).until_after(/}}/),django_comment:Ae.starting_with(/{#/).until_after(/#}/),smarty:Ae.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:Ae.starting_with(/{\*/).until_after(/\*}/),smarty_literal:Ae.starting_with(/{literal}/).until_after(/{\/literal}/)}}E.prototype=new O,E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){this.__set_templated_pattern()},E.prototype.disable=function(F){var L=this._create();return L._disabled[F]=!0,L._update(),L},E.prototype.read_options=function(F){var L=this._create();for(var Ae in B)L._disabled[Ae]=F.templating.indexOf(Ae)===-1;return L._update(),L},E.prototype.exclude=function(F){var L=this._create();return L._excluded[F]=!0,L._update(),L},E.prototype.read=function(){var F="";this._match_pattern?F=this._input.read(this._starting_pattern):F=this._input.read(this._starting_pattern,this.__template_pattern);for(var L=this._read_template();L;)this._match_pattern?L+=this._input.read(this._match_pattern):L+=this._input.readUntil(this.__template_pattern),F+=L,L=this._read_template();return this._until_after&&(F+=this._input.readUntilAfter(this._until_pattern)),F},E.prototype.__set_templated_pattern=function(){var F=[];this._disabled.php||F.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||F.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||F.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||F.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(F.push(this.__patterns.django._starting_pattern.source),F.push(this.__patterns.django_value._starting_pattern.source),F.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||F.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&F.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+F.join("|")+")")},E.prototype._read_template=function(){var F="",L=this._input.peek();if(L==="<"){var Ae=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&Ae==="?"&&(F=F||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&Ae==="%"&&(F=F||this.__patterns.erb.read())}else L==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(F=F||this.__patterns.handlebars_comment.read(),F=F||this.__patterns.handlebars_unescaped.read(),F=F||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(F=F||this.__patterns.django_value.read()),this._excluded.django||(F=F||this.__patterns.django_comment.read(),F=F||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(F=F||this.__patterns.smarty_comment.read(),F=F||this.__patterns.smarty_literal.read(),F=F||this.__patterns.smarty.read()));return F},V.exports.TemplatablePattern=E}],ne={};function y(V){var o=ne[V];if(o!==void 0)return o.exports;var le=ne[V]={exports:{}};return xe[V](le,le.exports,y),le.exports}var Se=y(0);Te=Se})();var He=Te;Y=[],re=function(){return{js_beautify:He}}.apply(Ft,Y),re!==void 0&&(kn.exports=re)})()},32834:function(kn){(function(Ft,Y){kn.exports=Y()})(this,function(){"use strict";function Ft(Ge,Pe){for(var Ie=0;Ie<Pe.length;Ie++){var ee=Pe[Ie];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(Ge,ee.key,ee)}}function Y(Ge,Pe,Ie){return Pe&&Ft(Ge.prototype,Pe),Ie&&Ft(Ge,Ie),Ge}function re(Ge,Pe){if(Ge){if(typeof Ge=="string")return Te(Ge,Pe);var Ie=Object.prototype.toString.call(Ge).slice(8,-1);if(Ie==="Object"&&Ge.constructor&&(Ie=Ge.constructor.name),Ie==="Map"||Ie==="Set")return Array.from(Ge);if(Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie))return Te(Ge,Pe)}}function Te(Ge,Pe){(Pe==null||Pe>Ge.length)&&(Pe=Ge.length);for(var Ie=0,ee=new Array(Pe);Ie<Pe;Ie++)ee[Ie]=Ge[Ie];return ee}function He(Ge,Pe){var Ie=typeof Symbol!="undefined"&&Ge[Symbol.iterator]||Ge["@@iterator"];if(Ie)return(Ie=Ie.call(Ge)).next.bind(Ie);if(Array.isArray(Ge)||(Ie=re(Ge))||Pe&&Ge&&typeof Ge.length=="number"){Ie&&(Ge=Ie);var ee=0;return function(){return ee>=Ge.length?{done:!0}:{done:!1,value:Ge[ee++]}}}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 xe={exports:{}};function ne(){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 y(Ge){xe.exports.defaults=Ge}xe.exports={defaults:ne(),getDefaults:ne,changeDefaults:y};var Se=/[&<>"']/,V=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,le=/[<>"']|&(?!#?\w+;)/g,O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},B=function(Pe){return O[Pe]};function E(Ge,Pe){if(Pe){if(Se.test(Ge))return Ge.replace(V,B)}else if(o.test(Ge))return Ge.replace(le,B);return Ge}var F=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function L(Ge){return Ge.replace(F,function(Pe,Ie){return Ie=Ie.toLowerCase(),Ie==="colon"?":":Ie.charAt(0)==="#"?Ie.charAt(1)==="x"?String.fromCharCode(parseInt(Ie.substring(2),16)):String.fromCharCode(+Ie.substring(1)):""})}var Ae=/(^|[^\[])\^/g;function Z(Ge,Pe){Ge=Ge.source||Ge,Pe=Pe||"";var Ie={replace:function(ue,me){return me=me.source||me,me=me.replace(Ae,"$1"),Ge=Ge.replace(ue,me),Ie},getRegex:function(){return new RegExp(Ge,Pe)}};return Ie}var J=/[^\w:]/g,H=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function z(Ge,Pe,Ie){if(Ge){var ee;try{ee=decodeURIComponent(L(Ie)).replace(J,"").toLowerCase()}catch(ue){return null}if(ee.indexOf("javascript:")===0||ee.indexOf("vbscript:")===0||ee.indexOf("data:")===0)return null}Pe&&!H.test(Ie)&&(Ie=ge(Pe,Ie));try{Ie=encodeURI(Ie).replace(/%25/g,"%")}catch(ue){return null}return Ie}var oe={},be=/^[^:]+:\/*[^/]*$/,De=/^([^:]+:)[\s\S]*$/,ke=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ge(Ge,Pe){oe[" "+Ge]||(be.test(Ge)?oe[" "+Ge]=Ge+"/":oe[" "+Ge]=nt(Ge,"/",!0)),Ge=oe[" "+Ge];var Ie=Ge.indexOf(":")===-1;return Pe.substring(0,2)==="//"?Ie?Pe:Ge.replace(De,"$1")+Pe:Pe.charAt(0)==="/"?Ie?Pe:Ge.replace(ke,"$1")+Pe:Ge+Pe}var Ue={exec:function(){}};function Je(Ge){for(var Pe=1,Ie,ee;Pe<arguments.length;Pe++){Ie=arguments[Pe];for(ee in Ie)Object.prototype.hasOwnProperty.call(Ie,ee)&&(Ge[ee]=Ie[ee])}return Ge}function Be(Ge,Pe){var Ie=Ge.replace(/\|/g,function(me,Fe,Qe){for(var Tt=!1,Kt=Fe;--Kt>=0&&Qe[Kt]==="\\";)Tt=!Tt;return Tt?"|":" |"}),ee=Ie.split(/ \|/),ue=0;if(ee.length>Pe)ee.splice(Pe);else for(;ee.length<Pe;)ee.push("");for(;ue<ee.length;ue++)ee[ue]=ee[ue].trim().replace(/\\\|/g,"|");return ee}function nt(Ge,Pe,Ie){var ee=Ge.length;if(ee===0)return"";for(var ue=0;ue<ee;){var me=Ge.charAt(ee-ue-1);if(me===Pe&&!Ie)ue++;else if(me!==Pe&&Ie)ue++;else break}return Ge.substr(0,ee-ue)}function ie(Ge,Pe){if(Ge.indexOf(Pe[1])===-1)return-1;for(var Ie=Ge.length,ee=0,ue=0;ue<Ie;ue++)if(Ge[ue]==="\\")ue++;else if(Ge[ue]===Pe[0])ee++;else if(Ge[ue]===Pe[1]&&(ee--,ee<0))return ue;return-1}function Q(Ge){Ge&&Ge.sanitize&&!Ge.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 q(Ge,Pe){if(Pe<1)return"";for(var Ie="";Pe>1;)Pe&1&&(Ie+=Ge),Pe>>=1,Ge+=Ge;return Ie+Ge}var se={escape:E,unescape:L,edit:Z,cleanUrl:z,resolveUrl:ge,noopTest:Ue,merge:Je,splitCells:Be,rtrim:nt,findClosingBracket:ie,checkSanitizeDeprecation:Q,repeatString:q},de=xe.exports.defaults,fe=se.rtrim,b=se.splitCells,S=se.escape,W=se.findClosingBracket;function _e(Ge,Pe,Ie){var ee=Pe.href,ue=Pe.title?S(Pe.title):null,me=Ge[1].replace(/\\([\[\]])/g,"$1");return Ge[0].charAt(0)!=="!"?{type:"link",raw:Ie,href:ee,title:ue,text:me}:{type:"image",raw:Ie,href:ee,title:ue,text:S(me)}}function qe(Ge,Pe){var Ie=Ge.match(/^(\s+)(?:```)/);if(Ie===null)return Pe;var ee=Ie[1];return Pe.split(`
`).map(function(ue){var me=ue.match(/^\s+/);if(me===null)return ue;var Fe=me[0];return Fe.length>=ee.length?ue.slice(ee.length):ue}).join(`
`)}var mt=function(){function Ge(Ie){this.options=Ie||de}var Pe=Ge.prototype;return Pe.space=function(ee){var ue=this.rules.block.newline.exec(ee);if(ue)return ue[0].length>1?{type:"space",raw:ue[0]}:{raw:`
`}},Pe.code=function(ee){var ue=this.rules.block.code.exec(ee);if(ue){var me=ue[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ue[0],codeBlockStyle:"indented",text:this.options.pedantic?me:fe(me,`
`)}}},Pe.fences=function(ee){var ue=this.rules.block.fences.exec(ee);if(ue){var me=ue[0],Fe=qe(me,ue[3]||"");return{type:"code",raw:me,lang:ue[2]?ue[2].trim():ue[2],text:Fe}}},Pe.heading=function(ee){var ue=this.rules.block.heading.exec(ee);if(ue){var me=ue[2].trim();if(/#$/.test(me)){var Fe=fe(me,"#");(this.options.pedantic||!Fe||/ $/.test(Fe))&&(me=Fe.trim())}return{type:"heading",raw:ue[0],depth:ue[1].length,text:me}}},Pe.nptable=function(ee){var ue=this.rules.block.nptable.exec(ee);if(ue){var me={type:"table",header:b(ue[1].replace(/^ *| *\| *$/g,"")),align:ue[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ue[3]?ue[3].replace(/\n$/,"").split(`
`):[],raw:ue[0]};if(me.header.length===me.align.length){var Fe=me.align.length,Qe;for(Qe=0;Qe<Fe;Qe++)/^ *-+: *$/.test(me.align[Qe])?me.align[Qe]="right":/^ *:-+: *$/.test(me.align[Qe])?me.align[Qe]="center":/^ *:-+ *$/.test(me.align[Qe])?me.align[Qe]="left":me.align[Qe]=null;for(Fe=me.cells.length,Qe=0;Qe<Fe;Qe++)me.cells[Qe]=b(me.cells[Qe],me.header.length);return me}}},Pe.hr=function(ee){var ue=this.rules.block.hr.exec(ee);if(ue)return{type:"hr",raw:ue[0]}},Pe.blockquote=function(ee){var ue=this.rules.block.blockquote.exec(ee);if(ue){var me=ue[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ue[0],text:me}}},Pe.list=function(ee){var ue=this.rules.block.list.exec(ee);if(ue){var me=ue[0],Fe=ue[2],Qe=Fe.length>1,Tt={type:"list",raw:me,ordered:Qe,start:Qe?+Fe.slice(0,-1):"",loose:!1,items:[]},Kt=ue[0].match(this.rules.block.item),Lt=!1,yn,qn,or,cn,qt,fr,pr,Ve,lr,rr=Kt.length;or=this.rules.block.listItemStart.exec(Kt[0]);for(var ir=0;ir<rr;ir++){if(yn=Kt[ir],me=yn,this.options.pedantic||(lr=yn.match(new RegExp("\\n\\s*\\n {0,"+(or[0].length-1)+"}\\S")),lr&&(qt=yn.length-lr.index+Kt.slice(ir+1).join(`
`).length,Tt.raw=Tt.raw.substring(0,Tt.raw.length-qt),yn=yn.substring(0,lr.index),me=yn,rr=ir+1)),ir!==rr-1){if(cn=this.rules.block.listItemStart.exec(Kt[ir+1]),this.options.pedantic?cn[1].length>or[1].length:cn[1].length>=or[0].length||cn[1].length>3){Kt.splice(ir,2,Kt[ir]+(!this.options.pedantic&&cn[1].length<or[0].length&&!Kt[ir].match(/\n$/)?"":`
`)+Kt[ir+1]),ir--,rr--;continue}else(!this.options.pedantic||this.options.smartLists?cn[2][cn[2].length-1]!==Fe[Fe.length-1]:Qe===(cn[2].length===1))&&(qt=Kt.slice(ir+1).join(`
`).length,Tt.raw=Tt.raw.substring(0,Tt.raw.length-qt),ir=rr-1);or=cn}qn=yn.length,yn=yn.replace(/^ *([*+-]|\d+[.)]) ?/,""),~yn.indexOf(`
`)&&(qn-=yn.length,yn=this.options.pedantic?yn.replace(/^ {1,4}/gm,""):yn.replace(new RegExp("^ {1,"+qn+"}","gm"),"")),yn=fe(yn,`
`),ir!==rr-1&&(me=me+`
`),fr=Lt||/\n\n(?!\s*$)/.test(me),ir!==rr-1&&(Lt=me.slice(-2)===`
`,fr||(fr=Lt)),fr&&(Tt.loose=!0),this.options.gfm&&(pr=/^\[[ xX]\] /.test(yn),Ve=void 0,pr&&(Ve=yn[1]!==" ",yn=yn.replace(/^\[[ xX]\] +/,""))),Tt.items.push({type:"list_item",raw:me,task:pr,checked:Ve,loose:fr,text:yn})}return Tt}},Pe.html=function(ee){var ue=this.rules.block.html.exec(ee);if(ue)return{type:this.options.sanitize?"paragraph":"html",raw:ue[0],pre:!this.options.sanitizer&&(ue[1]==="pre"||ue[1]==="script"||ue[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ue[0]):S(ue[0]):ue[0]}},Pe.def=function(ee){var ue=this.rules.block.def.exec(ee);if(ue){ue[3]&&(ue[3]=ue[3].substring(1,ue[3].length-1));var me=ue[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:me,raw:ue[0],href:ue[2],title:ue[3]}}},Pe.table=function(ee){var ue=this.rules.block.table.exec(ee);if(ue){var me={type:"table",header:b(ue[1].replace(/^ *| *\| *$/g,"")),align:ue[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ue[3]?ue[3].replace(/\n$/,"").split(`
`):[]};if(me.header.length===me.align.length){me.raw=ue[0];var Fe=me.align.length,Qe;for(Qe=0;Qe<Fe;Qe++)/^ *-+: *$/.test(me.align[Qe])?me.align[Qe]="right":/^ *:-+: *$/.test(me.align[Qe])?me.align[Qe]="center":/^ *:-+ *$/.test(me.align[Qe])?me.align[Qe]="left":me.align[Qe]=null;for(Fe=me.cells.length,Qe=0;Qe<Fe;Qe++)me.cells[Qe]=b(me.cells[Qe].replace(/^ *\| *| *\| *$/g,""),me.header.length);return me}}},Pe.lheading=function(ee){var ue=this.rules.block.lheading.exec(ee);if(ue)return{type:"heading",raw:ue[0],depth:ue[2].charAt(0)==="="?1:2,text:ue[1]}},Pe.paragraph=function(ee){var ue=this.rules.block.paragraph.exec(ee);if(ue)return{type:"paragraph",raw:ue[0],text:ue[1].charAt(ue[1].length-1)===`
`?ue[1].slice(0,-1):ue[1]}},Pe.text=function(ee){var ue=this.rules.block.text.exec(ee);if(ue)return{type:"text",raw:ue[0],text:ue[0]}},Pe.escape=function(ee){var ue=this.rules.inline.escape.exec(ee);if(ue)return{type:"escape",raw:ue[0],text:S(ue[1])}},Pe.tag=function(ee,ue,me){var Fe=this.rules.inline.tag.exec(ee);if(Fe)return!ue&&/^<a /i.test(Fe[0])?ue=!0:ue&&/^<\/a>/i.test(Fe[0])&&(ue=!1),!me&&/^<(pre|code|kbd|script)(\s|>)/i.test(Fe[0])?me=!0:me&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Fe[0])&&(me=!1),{type:this.options.sanitize?"text":"html",raw:Fe[0],inLink:ue,inRawBlock:me,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Fe[0]):S(Fe[0]):Fe[0]}},Pe.link=function(ee){var ue=this.rules.inline.link.exec(ee);if(ue){var me=ue[2].trim();if(!this.options.pedantic&&/^</.test(me)){if(!/>$/.test(me))return;var Fe=fe(me.slice(0,-1),"\\");if((me.length-Fe.length)%2===0)return}else{var Qe=W(ue[2],"()");if(Qe>-1){var Tt=ue[0].indexOf("!")===0?5:4,Kt=Tt+ue[1].length+Qe;ue[2]=ue[2].substring(0,Qe),ue[0]=ue[0].substring(0,Kt).trim(),ue[3]=""}}var Lt=ue[2],yn="";if(this.options.pedantic){var qn=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Lt);qn&&(Lt=qn[1],yn=qn[3])}else yn=ue[3]?ue[3].slice(1,-1):"";return Lt=Lt.trim(),/^</.test(Lt)&&(this.options.pedantic&&!/>$/.test(me)?Lt=Lt.slice(1):Lt=Lt.slice(1,-1)),_e(ue,{href:Lt&&Lt.replace(this.rules.inline._escapes,"$1"),title:yn&&yn.replace(this.rules.inline._escapes,"$1")},ue[0])}},Pe.reflink=function(ee,ue){var me;if((me=this.rules.inline.reflink.exec(ee))||(me=this.rules.inline.nolink.exec(ee))){var Fe=(me[2]||me[1]).replace(/\s+/g," ");if(Fe=ue[Fe.toLowerCase()],!Fe||!Fe.href){var Qe=me[0].charAt(0);return{type:"text",raw:Qe,text:Qe}}return _e(me,Fe,me[0])}},Pe.emStrong=function(ee,ue,me){me===void 0&&(me="");var Fe=this.rules.inline.emStrong.lDelim.exec(ee);if(Fe&&!(Fe[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 Qe=Fe[1]||Fe[2]||"";if(!Qe||Qe&&(me===""||this.rules.inline.punctuation.exec(me))){var Tt=Fe[0].length-1,Kt,Lt,yn=Tt,qn=0,or=Fe[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(or.lastIndex=0,ue=ue.slice(-1*ee.length+Tt);(Fe=or.exec(ue))!=null;)if(Kt=Fe[1]||Fe[2]||Fe[3]||Fe[4]||Fe[5]||Fe[6],!!Kt){if(Lt=Kt.length,Fe[3]||Fe[4]){yn+=Lt;continue}else if((Fe[5]||Fe[6])&&Tt%3&&!((Tt+Lt)%3)){qn+=Lt;continue}if(yn-=Lt,!(yn>0))return Lt=Math.min(Lt,Lt+yn+qn),Math.min(Tt,Lt)%2?{type:"em",raw:ee.slice(0,Tt+Fe.index+Lt+1),text:ee.slice(1,Tt+Fe.index+Lt)}:{type:"strong",raw:ee.slice(0,Tt+Fe.index+Lt+1),text:ee.slice(2,Tt+Fe.index+Lt-1)}}}}},Pe.codespan=function(ee){var ue=this.rules.inline.code.exec(ee);if(ue){var me=ue[2].replace(/\n/g," "),Fe=/[^ ]/.test(me),Qe=/^ /.test(me)&&/ $/.test(me);return Fe&&Qe&&(me=me.substring(1,me.length-1)),me=S(me,!0),{type:"codespan",raw:ue[0],text:me}}},Pe.br=function(ee){var ue=this.rules.inline.br.exec(ee);if(ue)return{type:"br",raw:ue[0]}},Pe.del=function(ee){var ue=this.rules.inline.del.exec(ee);if(ue)return{type:"del",raw:ue[0],text:ue[2]}},Pe.autolink=function(ee,ue){var me=this.rules.inline.autolink.exec(ee);if(me){var Fe,Qe;return me[2]==="@"?(Fe=S(this.options.mangle?ue(me[1]):me[1]),Qe="mailto:"+Fe):(Fe=S(me[1]),Qe=Fe),{type:"link",raw:me[0],text:Fe,href:Qe,tokens:[{type:"text",raw:Fe,text:Fe}]}}},Pe.url=function(ee,ue){var me;if(me=this.rules.inline.url.exec(ee)){var Fe,Qe;if(me[2]==="@")Fe=S(this.options.mangle?ue(me[0]):me[0]),Qe="mailto:"+Fe;else{var Tt;do Tt=me[0],me[0]=this.rules.inline._backpedal.exec(me[0])[0];while(Tt!==me[0]);Fe=S(me[0]),me[1]==="www."?Qe="http://"+Fe:Qe=Fe}return{type:"link",raw:me[0],text:Fe,href:Qe,tokens:[{type:"text",raw:Fe,text:Fe}]}}},Pe.inlineText=function(ee,ue,me){var Fe=this.rules.inline.text.exec(ee);if(Fe){var Qe;return ue?Qe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Fe[0]):S(Fe[0]):Fe[0]:Qe=S(this.options.smartypants?me(Fe[0]):Fe[0]),{type:"text",raw:Fe[0],text:Qe}}},Ge}(),Gt=se.noopTest,Qt=se.edit,sn=se.merge,Wt={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:Gt,table:Gt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Wt._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Wt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Wt.def=Qt(Wt.def).replace("label",Wt._label).replace("title",Wt._title).getRegex(),Wt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Wt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Wt.item=Qt(Wt.item,"gm").replace(/bull/g,Wt.bullet).getRegex(),Wt.listItemStart=Qt(/^( *)(bull) */).replace("bull",Wt.bullet).getRegex(),Wt.list=Qt(Wt.list).replace(/bull/g,Wt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Wt.def.source+")").getRegex(),Wt._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",Wt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Wt.html=Qt(Wt.html,"i").replace("comment",Wt._comment).replace("tag",Wt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Wt.paragraph=Qt(Wt._paragraph).replace("hr",Wt.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",Wt._tag).getRegex(),Wt.blockquote=Qt(Wt.blockquote).replace("paragraph",Wt.paragraph).getRegex(),Wt.normal=sn({},Wt),Wt.gfm=sn({},Wt.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*|$)"}),Wt.gfm.nptable=Qt(Wt.gfm.nptable).replace("hr",Wt.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",Wt._tag).getRegex(),Wt.gfm.table=Qt(Wt.gfm.table).replace("hr",Wt.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",Wt._tag).getRegex(),Wt.pedantic=sn({},Wt.normal,{html:Qt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Wt._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:Gt,paragraph:Qt(Wt.normal._paragraph).replace("hr",Wt.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Wt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var kt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Gt,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:Gt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};kt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",kt.punctuation=Qt(kt.punctuation).replace(/punctuation/g,kt._punctuation).getRegex(),kt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,kt.escapedEmSt=/\\\*|\\_/g,kt._comment=Qt(Wt._comment).replace("(?:-->|$)","-->").getRegex(),kt.emStrong.lDelim=Qt(kt.emStrong.lDelim).replace(/punct/g,kt._punctuation).getRegex(),kt.emStrong.rDelimAst=Qt(kt.emStrong.rDelimAst,"g").replace(/punct/g,kt._punctuation).getRegex(),kt.emStrong.rDelimUnd=Qt(kt.emStrong.rDelimUnd,"g").replace(/punct/g,kt._punctuation).getRegex(),kt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,kt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,kt._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])?)+(?![-_])/,kt.autolink=Qt(kt.autolink).replace("scheme",kt._scheme).replace("email",kt._email).getRegex(),kt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,kt.tag=Qt(kt.tag).replace("comment",kt._comment).replace("attribute",kt._attribute).getRegex(),kt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,kt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,kt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,kt.link=Qt(kt.link).replace("label",kt._label).replace("href",kt._href).replace("title",kt._title).getRegex(),kt.reflink=Qt(kt.reflink).replace("label",kt._label).getRegex(),kt.reflinkSearch=Qt(kt.reflinkSearch,"g").replace("reflink",kt.reflink).replace("nolink",kt.nolink).getRegex(),kt.normal=sn({},kt),kt.pedantic=sn({},kt.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:Qt(/^!?\[(label)\]\((.*?)\)/).replace("label",kt._label).getRegex(),reflink:Qt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kt._label).getRegex()}),kt.gfm=sn({},kt.normal,{escape:Qt(kt.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),kt.gfm.url=Qt(kt.gfm.url,"i").replace("email",kt.gfm._extended_email).getRegex(),kt.breaks=sn({},kt.gfm,{br:Qt(kt.br).replace("{2,}","*").getRegex(),text:Qt(kt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Xe={block:Wt,inline:kt},dt=mt,ot=xe.exports.defaults,ft=Xe.block,tn=Xe.inline,Re=se.repeatString;function P(Ge){return Ge.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 v(Ge){var Pe="",Ie,ee,ue=Ge.length;for(Ie=0;Ie<ue;Ie++)ee=Ge.charCodeAt(Ie),Math.random()>.5&&(ee="x"+ee.toString(16)),Pe+="&#"+ee+";";return Pe}var T=function(){function Ge(Ie){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ie||ot,this.options.tokenizer=this.options.tokenizer||new dt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ee={block:ft.normal,inline:tn.normal};this.options.pedantic?(ee.block=ft.pedantic,ee.inline=tn.pedantic):this.options.gfm&&(ee.block=ft.gfm,this.options.breaks?ee.inline=tn.breaks:ee.inline=tn.gfm),this.tokenizer.rules=ee}Ge.lex=function(ee,ue){var me=new Ge(ue);return me.lex(ee)},Ge.lexInline=function(ee,ue){var me=new Ge(ue);return me.inlineTokens(ee)};var Pe=Ge.prototype;return Pe.lex=function(ee){return ee=ee.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ee,this.tokens,!0),this.inline(this.tokens),this.tokens},Pe.blockTokens=function(ee,ue,me){ue===void 0&&(ue=[]),me===void 0&&(me=!0),this.options.pedantic&&(ee=ee.replace(/^ +$/gm,""));for(var Fe,Qe,Tt,Kt;ee;){if(Fe=this.tokenizer.space(ee)){ee=ee.substring(Fe.raw.length),Fe.type&&ue.push(Fe);continue}if(Fe=this.tokenizer.code(ee)){ee=ee.substring(Fe.raw.length),Kt=ue[ue.length-1],Kt&&Kt.type==="paragraph"?(Kt.raw+=`
`+Fe.raw,Kt.text+=`
`+Fe.text):ue.push(Fe);continue}if(Fe=this.tokenizer.fences(ee)){ee=ee.substring(Fe.raw.length),ue.push(Fe);continue}if(Fe=this.tokenizer.heading(ee)){ee=ee.substring(Fe.raw.length),ue.push(Fe);continue}if(Fe=this.tokenizer.nptable(ee)){ee=ee.substring(Fe.raw.length),ue.push(Fe);continue}if(Fe=this.tokenizer.hr(ee)){ee=ee.substring(Fe.raw.length),ue.push(Fe);continue}if(Fe=this.tokenizer.blockquote(ee)){ee=ee.substring(Fe.raw.length),Fe.tokens=this.blockTokens(Fe.text,[],me),ue.push(Fe);continue}if(Fe=this.tokenizer.list(ee)){for(ee=ee.substring(Fe.raw.length),Tt=Fe.items.length,Qe=0;Qe<Tt;Qe++)Fe.items[Qe].tokens=this.blockTokens(Fe.items[Qe].text,[],!1);ue.push(Fe);continue}if(Fe=this.tokenizer.html(ee)){ee=ee.substring(Fe.raw.length),ue.push(Fe);continue}if(me&&(Fe=this.tokenizer.def(ee))){ee=ee.substring(Fe.raw.length),this.tokens.links[Fe.tag]||(this.tokens.links[Fe.tag]={href:Fe.href,title:Fe.title});continue}if(Fe=this.tokenizer.table(ee)){ee=ee.substring(Fe.raw.length),ue.push(Fe);continue}if(Fe=this.tokenizer.lheading(ee)){ee=ee.substring(Fe.raw.length),ue.push(Fe);continue}if(me&&(Fe=this.tokenizer.paragraph(ee))){ee=ee.substring(Fe.raw.length),ue.push(Fe);continue}if(Fe=this.tokenizer.text(ee)){ee=ee.substring(Fe.raw.length),Kt=ue[ue.length-1],Kt&&Kt.type==="text"?(Kt.raw+=`
`+Fe.raw,Kt.text+=`
`+Fe.text):ue.push(Fe);continue}if(ee){var Lt="Infinite loop on byte: "+ee.charCodeAt(0);if(this.options.silent){console.error(Lt);break}else throw new Error(Lt)}}return ue},Pe.inline=function(ee){var ue,me,Fe,Qe,Tt,Kt,Lt=ee.length;for(ue=0;ue<Lt;ue++)switch(Kt=ee[ue],Kt.type){case"paragraph":case"text":case"heading":{Kt.tokens=[],this.inlineTokens(Kt.text,Kt.tokens);break}case"table":{for(Kt.tokens={header:[],cells:[]},Qe=Kt.header.length,me=0;me<Qe;me++)Kt.tokens.header[me]=[],this.inlineTokens(Kt.header[me],Kt.tokens.header[me]);for(Qe=Kt.cells.length,me=0;me<Qe;me++)for(Tt=Kt.cells[me],Kt.tokens.cells[me]=[],Fe=0;Fe<Tt.length;Fe++)Kt.tokens.cells[me][Fe]=[],this.inlineTokens(Tt[Fe],Kt.tokens.cells[me][Fe]);break}case"blockquote":{this.inline(Kt.tokens);break}case"list":{for(Qe=Kt.items.length,me=0;me<Qe;me++)this.inline(Kt.items[me].tokens);break}}return ee},Pe.inlineTokens=function(ee,ue,me,Fe){ue===void 0&&(ue=[]),me===void 0&&(me=!1),Fe===void 0&&(Fe=!1);var Qe,Tt,Kt=ee,Lt,yn,qn;if(this.tokens.links){var or=Object.keys(this.tokens.links);if(or.length>0)for(;(Lt=this.tokenizer.rules.inline.reflinkSearch.exec(Kt))!=null;)or.includes(Lt[0].slice(Lt[0].lastIndexOf("[")+1,-1))&&(Kt=Kt.slice(0,Lt.index)+"["+Re("a",Lt[0].length-2)+"]"+Kt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Lt=this.tokenizer.rules.inline.blockSkip.exec(Kt))!=null;)Kt=Kt.slice(0,Lt.index)+"["+Re("a",Lt[0].length-2)+"]"+Kt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Lt=this.tokenizer.rules.inline.escapedEmSt.exec(Kt))!=null;)Kt=Kt.slice(0,Lt.index)+"++"+Kt.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;ee;){if(yn||(qn=""),yn=!1,Qe=this.tokenizer.escape(ee)){ee=ee.substring(Qe.raw.length),ue.push(Qe);continue}if(Qe=this.tokenizer.tag(ee,me,Fe)){ee=ee.substring(Qe.raw.length),me=Qe.inLink,Fe=Qe.inRawBlock;var cn=ue[ue.length-1];cn&&Qe.type==="text"&&cn.type==="text"?(cn.raw+=Qe.raw,cn.text+=Qe.text):ue.push(Qe);continue}if(Qe=this.tokenizer.link(ee)){ee=ee.substring(Qe.raw.length),Qe.type==="link"&&(Qe.tokens=this.inlineTokens(Qe.text,[],!0,Fe)),ue.push(Qe);continue}if(Qe=this.tokenizer.reflink(ee,this.tokens.links)){ee=ee.substring(Qe.raw.length);var qt=ue[ue.length-1];Qe.type==="link"?(Qe.tokens=this.inlineTokens(Qe.text,[],!0,Fe),ue.push(Qe)):qt&&Qe.type==="text"&&qt.type==="text"?(qt.raw+=Qe.raw,qt.text+=Qe.text):ue.push(Qe);continue}if(Qe=this.tokenizer.emStrong(ee,Kt,qn)){ee=ee.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],me,Fe),ue.push(Qe);continue}if(Qe=this.tokenizer.codespan(ee)){ee=ee.substring(Qe.raw.length),ue.push(Qe);continue}if(Qe=this.tokenizer.br(ee)){ee=ee.substring(Qe.raw.length),ue.push(Qe);continue}if(Qe=this.tokenizer.del(ee)){ee=ee.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],me,Fe),ue.push(Qe);continue}if(Qe=this.tokenizer.autolink(ee,v)){ee=ee.substring(Qe.raw.length),ue.push(Qe);continue}if(!me&&(Qe=this.tokenizer.url(ee,v))){ee=ee.substring(Qe.raw.length),ue.push(Qe);continue}if(Qe=this.tokenizer.inlineText(ee,Fe,P)){ee=ee.substring(Qe.raw.length),Qe.raw.slice(-1)!=="_"&&(qn=Qe.raw.slice(-1)),yn=!0,Tt=ue[ue.length-1],Tt&&Tt.type==="text"?(Tt.raw+=Qe.raw,Tt.text+=Qe.text):ue.push(Qe);continue}if(ee){var fr="Infinite loop on byte: "+ee.charCodeAt(0);if(this.options.silent){console.error(fr);break}else throw new Error(fr)}}return ue},Y(Ge,null,[{key:"rules",get:function(){return{block:ft,inline:tn}}}]),Ge}(),X=xe.exports.defaults,k=se.cleanUrl,K=se.escape,ce=function(){function Ge(Ie){this.options=Ie||X}var Pe=Ge.prototype;return Pe.code=function(ee,ue,me){var Fe=(ue||"").match(/\S*/)[0];if(this.options.highlight){var Qe=this.options.highlight(ee,Fe);Qe!=null&&Qe!==ee&&(me=!0,ee=Qe)}return ee=ee.replace(/\n$/,"")+`
`,Fe?'<pre><code class="'+this.options.langPrefix+K(Fe,!0)+'">'+(me?ee:K(ee,!0))+`</code></pre>
`:"<pre><code>"+(me?ee:K(ee,!0))+`</code></pre>
`},Pe.blockquote=function(ee){return`<blockquote>
`+ee+`</blockquote>
`},Pe.html=function(ee){return ee},Pe.heading=function(ee,ue,me,Fe){return this.options.headerIds?"<h"+ue+' id="'+this.options.headerPrefix+Fe.slug(me)+'">'+ee+"</h"+ue+`>
`:"<h"+ue+">"+ee+"</h"+ue+`>
`},Pe.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Pe.list=function(ee,ue,me){var Fe=ue?"ol":"ul",Qe=ue&&me!==1?' start="'+me+'"':"";return"<"+Fe+Qe+`>
`+ee+"</"+Fe+`>
`},Pe.listitem=function(ee){return"<li>"+ee+`</li>
`},Pe.checkbox=function(ee){return"<input "+(ee?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Pe.paragraph=function(ee){return"<p>"+ee+`</p>
`},Pe.table=function(ee,ue){return ue&&(ue="<tbody>"+ue+"</tbody>"),`<table>
<thead>
`+ee+`</thead>
`+ue+`</table>
`},Pe.tablerow=function(ee){return`<tr>
`+ee+`</tr>
`},Pe.tablecell=function(ee,ue){var me=ue.header?"th":"td",Fe=ue.align?"<"+me+' align="'+ue.align+'">':"<"+me+">";return Fe+ee+"</"+me+`>
`},Pe.strong=function(ee){return"<strong>"+ee+"</strong>"},Pe.em=function(ee){return"<em>"+ee+"</em>"},Pe.codespan=function(ee){return"<code>"+ee+"</code>"},Pe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Pe.del=function(ee){return"<del>"+ee+"</del>"},Pe.link=function(ee,ue,me){if(ee=k(this.options.sanitize,this.options.baseUrl,ee),ee===null)return me;var Fe='<a href="'+K(ee)+'"';return ue&&(Fe+=' title="'+ue+'"'),Fe+=">"+me+"</a>",Fe},Pe.image=function(ee,ue,me){if(ee=k(this.options.sanitize,this.options.baseUrl,ee),ee===null)return me;var Fe='<img src="'+ee+'" alt="'+me+'"';return ue&&(Fe+=' title="'+ue+'"'),Fe+=this.options.xhtml?"/>":">",Fe},Pe.text=function(ee){return ee},Ge}(),Me=function(){function Ge(){}var Pe=Ge.prototype;return Pe.strong=function(ee){return ee},Pe.em=function(ee){return ee},Pe.codespan=function(ee){return ee},Pe.del=function(ee){return ee},Pe.html=function(ee){return ee},Pe.text=function(ee){return ee},Pe.link=function(ee,ue,me){return""+me},Pe.image=function(ee,ue,me){return""+me},Pe.br=function(){return""},Ge}(),We=function(){function Ge(){this.seen={}}var Pe=Ge.prototype;return Pe.serialize=function(ee){return ee.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Pe.getNextSafeSlug=function(ee,ue){var me=ee,Fe=0;if(this.seen.hasOwnProperty(me)){Fe=this.seen[ee];do Fe++,me=ee+"-"+Fe;while(this.seen.hasOwnProperty(me))}return ue||(this.seen[ee]=Fe,this.seen[me]=0),me},Pe.slug=function(ee,ue){ue===void 0&&(ue={});var me=this.serialize(ee);return this.getNextSafeSlug(me,ue.dryrun)},Ge}(),lt=ce,ht=Me,jt=We,vt=xe.exports.defaults,Rt=se.unescape,yt=function(){function Ge(Ie){this.options=Ie||vt,this.options.renderer=this.options.renderer||new lt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ht,this.slugger=new jt}Ge.parse=function(ee,ue){var me=new Ge(ue);return me.parse(ee)},Ge.parseInline=function(ee,ue){var me=new Ge(ue);return me.parseInline(ee)};var Pe=Ge.prototype;return Pe.parse=function(ee,ue){ue===void 0&&(ue=!0);var me="",Fe,Qe,Tt,Kt,Lt,yn,qn,or,cn,qt,fr,pr,Ve,lr,rr,ir,ri,Cr,li=ee.length;for(Fe=0;Fe<li;Fe++)switch(qt=ee[Fe],qt.type){case"space":continue;case"hr":{me+=this.renderer.hr();continue}case"heading":{me+=this.renderer.heading(this.parseInline(qt.tokens),qt.depth,Rt(this.parseInline(qt.tokens,this.textRenderer)),this.slugger);continue}case"code":{me+=this.renderer.code(qt.text,qt.lang,qt.escaped);continue}case"table":{for(or="",qn="",Kt=qt.header.length,Qe=0;Qe<Kt;Qe++)qn+=this.renderer.tablecell(this.parseInline(qt.tokens.header[Qe]),{header:!0,align:qt.align[Qe]});for(or+=this.renderer.tablerow(qn),cn="",Kt=qt.cells.length,Qe=0;Qe<Kt;Qe++){for(yn=qt.tokens.cells[Qe],qn="",Lt=yn.length,Tt=0;Tt<Lt;Tt++)qn+=this.renderer.tablecell(this.parseInline(yn[Tt]),{header:!1,align:qt.align[Tt]});cn+=this.renderer.tablerow(qn)}me+=this.renderer.table(or,cn);continue}case"blockquote":{cn=this.parse(qt.tokens),me+=this.renderer.blockquote(cn);continue}case"list":{for(fr=qt.ordered,pr=qt.start,Ve=qt.loose,Kt=qt.items.length,cn="",Qe=0;Qe<Kt;Qe++)rr=qt.items[Qe],ir=rr.checked,ri=rr.task,lr="",rr.task&&(Cr=this.renderer.checkbox(ir),Ve?rr.tokens.length>0&&rr.tokens[0].type==="text"?(rr.tokens[0].text=Cr+" "+rr.tokens[0].text,rr.tokens[0].tokens&&rr.tokens[0].tokens.length>0&&rr.tokens[0].tokens[0].type==="text"&&(rr.tokens[0].tokens[0].text=Cr+" "+rr.tokens[0].tokens[0].text)):rr.tokens.unshift({type:"text",text:Cr}):lr+=Cr),lr+=this.parse(rr.tokens,Ve),cn+=this.renderer.listitem(lr,ri,ir);me+=this.renderer.list(cn,fr,pr);continue}case"html":{me+=this.renderer.html(qt.text);continue}case"paragraph":{me+=this.renderer.paragraph(this.parseInline(qt.tokens));continue}case"text":{for(cn=qt.tokens?this.parseInline(qt.tokens):qt.text;Fe+1<li&&ee[Fe+1].type==="text";)qt=ee[++Fe],cn+=`
`+(qt.tokens?this.parseInline(qt.tokens):qt.text);me+=ue?this.renderer.paragraph(cn):cn;continue}default:{var Gr='Token with "'+qt.type+'" type was not found.';if(this.options.silent){console.error(Gr);return}else throw new Error(Gr)}}return me},Pe.parseInline=function(ee,ue){ue=ue||this.renderer;var me="",Fe,Qe,Tt=ee.length;for(Fe=0;Fe<Tt;Fe++)switch(Qe=ee[Fe],Qe.type){case"escape":{me+=ue.text(Qe.text);break}case"html":{me+=ue.html(Qe.text);break}case"link":{me+=ue.link(Qe.href,Qe.title,this.parseInline(Qe.tokens,ue));break}case"image":{me+=ue.image(Qe.href,Qe.title,Qe.text);break}case"strong":{me+=ue.strong(this.parseInline(Qe.tokens,ue));break}case"em":{me+=ue.em(this.parseInline(Qe.tokens,ue));break}case"codespan":{me+=ue.codespan(Qe.text);break}case"br":{me+=ue.br();break}case"del":{me+=ue.del(this.parseInline(Qe.tokens,ue));break}case"text":{me+=ue.text(Qe.text);break}default:{var Kt='Token with "'+Qe.type+'" type was not found.';if(this.options.silent){console.error(Kt);return}else throw new Error(Kt)}}return me},Ge}(),xt=T,At=yt,gt=mt,It=ce,Ht=Me,un=We,Yt=se.merge,_n=se.checkSanitizeDeprecation,on=se.escape,Un=xe.exports.getDefaults,Gn=xe.exports.changeDefaults,dr=xe.exports.defaults;function Xt(Ge,Pe,Ie){if(typeof Ge=="undefined"||Ge===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ge!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ge)+", string expected");if(typeof Pe=="function"&&(Ie=Pe,Pe=null),Pe=Yt({},Xt.defaults,Pe||{}),_n(Pe),Ie){var ee=Pe.highlight,ue;try{ue=xt.lex(Ge,Pe)}catch(Tt){return Ie(Tt)}var me=function(Kt){var Lt;if(!Kt)try{Pe.walkTokens&&Xt.walkTokens(ue,Pe.walkTokens),Lt=At.parse(ue,Pe)}catch(yn){Kt=yn}return Pe.highlight=ee,Kt?Ie(Kt):Ie(null,Lt)};if(!ee||ee.length<3||(delete Pe.highlight,!ue.length))return me();var Fe=0;Xt.walkTokens(ue,function(Tt){Tt.type==="code"&&(Fe++,setTimeout(function(){ee(Tt.text,Tt.lang,function(Kt,Lt){if(Kt)return me(Kt);Lt!=null&&Lt!==Tt.text&&(Tt.text=Lt,Tt.escaped=!0),Fe--,Fe===0&&me()})},0))}),Fe===0&&me();return}try{var Qe=xt.lex(Ge,Pe);return Pe.walkTokens&&Xt.walkTokens(Qe,Pe.walkTokens),At.parse(Qe,Pe)}catch(Tt){if(Tt.message+=`
Please report this to https://github.com/markedjs/marked.`,Pe.silent)return"<p>An error occurred:</p><pre>"+on(Tt.message+"",!0)+"</pre>";throw Tt}}Xt.options=Xt.setOptions=function(Ge){return Yt(Xt.defaults,Ge),Gn(Xt.defaults),Xt},Xt.getDefaults=Un,Xt.defaults=dr,Xt.use=function(Ge){var Pe=Yt({},Ge);if(Ge.renderer&&function(){var ee=Xt.defaults.renderer||new It,ue=function(Qe){var Tt=ee[Qe];ee[Qe]=function(){for(var Kt=arguments.length,Lt=new Array(Kt),yn=0;yn<Kt;yn++)Lt[yn]=arguments[yn];var qn=Ge.renderer[Qe].apply(ee,Lt);return qn===!1&&(qn=Tt.apply(ee,Lt)),qn}};for(var me in Ge.renderer)ue(me);Pe.renderer=ee}(),Ge.tokenizer&&function(){var ee=Xt.defaults.tokenizer||new gt,ue=function(Qe){var Tt=ee[Qe];ee[Qe]=function(){for(var Kt=arguments.length,Lt=new Array(Kt),yn=0;yn<Kt;yn++)Lt[yn]=arguments[yn];var qn=Ge.tokenizer[Qe].apply(ee,Lt);return qn===!1&&(qn=Tt.apply(ee,Lt)),qn}};for(var me in Ge.tokenizer)ue(me);Pe.tokenizer=ee}(),Ge.walkTokens){var Ie=Xt.defaults.walkTokens;Pe.walkTokens=function(ee){Ge.walkTokens(ee),Ie&&Ie(ee)}}Xt.setOptions(Pe)},Xt.walkTokens=function(Ge,Pe){for(var Ie=He(Ge),ee;!(ee=Ie()).done;){var ue=ee.value;switch(Pe(ue),ue.type){case"table":{for(var me=He(ue.tokens.header),Fe;!(Fe=me()).done;){var Qe=Fe.value;Xt.walkTokens(Qe,Pe)}for(var Tt=He(ue.tokens.cells),Kt;!(Kt=Tt()).done;)for(var Lt=Kt.value,yn=He(Lt),qn;!(qn=yn()).done;){var or=qn.value;Xt.walkTokens(or,Pe)}break}case"list":{Xt.walkTokens(ue.items,Pe);break}default:ue.tokens&&Xt.walkTokens(ue.tokens,Pe)}}},Xt.parseInline=function(Ge,Pe){if(typeof Ge=="undefined"||Ge===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Ge!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Ge)+", string expected");Pe=Yt({},Xt.defaults,Pe||{}),_n(Pe);try{var Ie=xt.lexInline(Ge,Pe);return Pe.walkTokens&&Xt.walkTokens(Ie,Pe.walkTokens),At.parseInline(Ie,Pe)}catch(ee){if(ee.message+=`
Please report this to https://github.com/markedjs/marked.`,Pe.silent)return"<p>An error occurred:</p><pre>"+on(ee.message+"",!0)+"</pre>";throw ee}},Xt.Parser=At,Xt.parser=At.parse,Xt.Renderer=It,Xt.TextRenderer=Ht,Xt.Lexer=xt,Xt.lexer=xt.lex,Xt.Tokenizer=gt,Xt.Slugger=un,Xt.parse=Xt;var Cn=Xt;return Cn})},11690:function(kn){const Ft=/[&<>"']/,Y=/[&<>"']/g,re=/[<>"']|&(?!#?\w+;)/,Te=/[<>"']|&(?!#?\w+;)/g,He={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xe=ge=>He[ge];function ne(ge,Ue){if(Ue){if(Ft.test(ge))return ge.replace(Y,xe)}else if(re.test(ge))return ge.replace(Te,xe);return ge}const y=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Se(ge){return ge.replace(y,(Ue,Je)=>(Je=Je.toLowerCase(),Je==="colon"?":":Je.charAt(0)==="#"?Je.charAt(1)==="x"?String.fromCharCode(parseInt(Je.substring(2),16)):String.fromCharCode(+Je.substring(1)):""))}const V=/(^|[^\[])\^/g;function o(ge,Ue){ge=ge.source||ge,Ue=Ue||"";const Je={replace:(Be,nt)=>(nt=nt.source||nt,nt=nt.replace(V,"$1"),ge=ge.replace(Be,nt),Je),getRegex:()=>new RegExp(ge,Ue)};return Je}const le=/[^\w:]/g,O=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function B(ge,Ue,Je){if(ge){let Be;try{Be=decodeURIComponent(Se(Je)).replace(le,"").toLowerCase()}catch(nt){return null}if(Be.indexOf("javascript:")===0||Be.indexOf("vbscript:")===0||Be.indexOf("data:")===0)return null}Ue&&!O.test(Je)&&(Je=Z(Ue,Je));try{Je=encodeURI(Je).replace(/%25/g,"%")}catch(Be){return null}return Je}const E={},F=/^[^:]+:\/*[^/]*$/,L=/^([^:]+:)[\s\S]*$/,Ae=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Z(ge,Ue){E[" "+ge]||(F.test(ge)?E[" "+ge]=ge+"/":E[" "+ge]=oe(ge,"/",!0)),ge=E[" "+ge];const Je=ge.indexOf(":")===-1;return Ue.substring(0,2)==="//"?Je?Ue:ge.replace(L,"$1")+Ue:Ue.charAt(0)==="/"?Je?Ue:ge.replace(Ae,"$1")+Ue:ge+Ue}const J={exec:function(){}};function H(ge){let Ue=1,Je,Be;for(;Ue<arguments.length;Ue++){Je=arguments[Ue];for(Be in Je)Object.prototype.hasOwnProperty.call(Je,Be)&&(ge[Be]=Je[Be])}return ge}function z(ge,Ue){const Je=ge.replace(/\|/g,(ie,Q,q)=>{let se=!1,de=Q;for(;--de>=0&&q[de]==="\\";)se=!se;return se?"|":" |"}),Be=Je.split(/ \|/);let nt=0;if(Be.length>Ue)Be.splice(Ue);else for(;Be.length<Ue;)Be.push("");for(;nt<Be.length;nt++)Be[nt]=Be[nt].trim().replace(/\\\|/g,"|");return Be}function oe(ge,Ue,Je){const Be=ge.length;if(Be===0)return"";let nt=0;for(;nt<Be;){const ie=ge.charAt(Be-nt-1);if(ie===Ue&&!Je)nt++;else if(ie!==Ue&&Je)nt++;else break}return ge.substr(0,Be-nt)}function be(ge,Ue){if(ge.indexOf(Ue[1])===-1)return-1;const Je=ge.length;let Be=0,nt=0;for(;nt<Je;nt++)if(ge[nt]==="\\")nt++;else if(ge[nt]===Ue[0])Be++;else if(ge[nt]===Ue[1]&&(Be--,Be<0))return nt;return-1}function De(ge){ge&&ge.sanitize&&!ge.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 ke(ge,Ue){if(Ue<1)return"";let Je="";for(;Ue>1;)Ue&1&&(Je+=ge),Ue>>=1,ge+=ge;return Je+ge}kn.exports={escape:ne,unescape:Se,edit:o,cleanUrl:B,resolveUrl:Z,noopTest:J,merge:H,splitCells:z,rtrim:oe,findClosingBracket:be,checkSanitizeDeprecation:De,repeatString:ke}},75918:function(kn,Ft,Y){"use strict";Y.d(Ft,{Wi:function(){return y},Z0:function(){return Se},aU:function(){return ne},eZ:function(){return o},wY:function(){return V}});var re=Y(4348),Te=Y(69323),He=Y(13268),xe=function(le,O,B,E){function F(L){return L instanceof B?L:new B(function(Ae){Ae(L)})}return new(B||(B=Promise))(function(L,Ae){function Z(z){try{H(E.next(z))}catch(oe){Ae(oe)}}function J(z){try{H(E.throw(z))}catch(oe){Ae(oe)}}function H(z){z.done?L(z.value):F(z.value).then(Z,J)}H((E=E.apply(le,O||[])).next())})};class ne extends Te.JT{constructor(O,B="",E="",F=!0,L){super(),this._onDidChange=this._register(new re.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=O,this._label=B,this._cssClass=E,this._enabled=F,this._actionCallback=L}get id(){return this._id}get label(){return this._label}set label(O){this._setLabel(O)}_setLabel(O){this._label!==O&&(this._label=O,this._onDidChange.fire({label:O}))}get tooltip(){return this._tooltip||""}set tooltip(O){this._setTooltip(O)}_setTooltip(O){this._tooltip!==O&&(this._tooltip=O,this._onDidChange.fire({tooltip:O}))}get class(){return this._cssClass}set class(O){this._setClass(O)}_setClass(O){this._cssClass!==O&&(this._cssClass=O,this._onDidChange.fire({class:O}))}get enabled(){return this._enabled}set enabled(O){this._setEnabled(O)}_setEnabled(O){this._enabled!==O&&(this._enabled=O,this._onDidChange.fire({enabled:O}))}get checked(){return this._checked}set checked(O){this._setChecked(O)}_setChecked(O){this._checked!==O&&(this._checked=O,this._onDidChange.fire({checked:O}))}run(O,B){return xe(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(O))})}}class y extends Te.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new re.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new re.Q5),this.onDidRun=this._onDidRun.event}run(O,B){return xe(this,void 0,void 0,function*(){if(!O.enabled)return;this._onBeforeRun.fire({action:O});let E;try{yield this.runAction(O,B)}catch(F){E=F}this._onDidRun.fire({action:O,error:E})})}runAction(O,B){return xe(this,void 0,void 0,function*(){yield O.run(B)})}}class Se extends ne{constructor(O){super(Se.ID,O,O?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Se.ID="vs.actions.separator";class V{constructor(O,B,E,F){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=O,this.label=B,this.class=F,this._actions=E}get actions(){return this._actions}dispose(){}run(){return xe(this,void 0,void 0,function*(){})}}class o extends ne{constructor(){super(o.ID,He.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(kn,Ft,Y){"use strict";Y.d(Ft,{ok:function(){return re}});function re(Te,He){if(!Te)throw new Error(He?`Assertion failed (${He})`:"Assertion Failed")}},52615:function(kn,Ft,Y){"use strict";Y.d(Ft,{CM:function(){return ne},JL:function(){return y},dT:function(){return V},fK:function(){return xe},lA:function(){return Se}});var re=Y(4348);class Te{constructor(){this._icons=new Map,this._onDidRegister=new re.Q5}add(le){const O=this._icons.get(le.id);O?le.description?O.description=le.description:console.error(`Duplicate registration of codicon ${le.id}`):(this._icons.set(le.id,le),this._onDidRegister.fire(le))}get(le){return this._icons.get(le)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const He=new Te,xe=He;function ne(o,le){return new Se(o,le)}function y(o){return o?o.replace(/\$\((.*?)\)/g,(le,O)=>` ${O} `).trim():""}class Se{constructor(le,O,B){this.id=le,this.definition=O,this.description=B,He.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var V;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const le=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function O(F){if(F instanceof Se)return["codicon","codicon-"+F.id];const L=le.exec(F.id);if(!L)return O(Se.error);let[,Ae,Z]=L;const J=["codicon","codicon-"+Ae];return Z&&J.push("codicon-modifier-"+Z.substr(1)),J}o.asClassNameArray=O;function B(F){return O(F).join(" ")}o.asClassName=B;function E(F){return"."+O(F).join(".")}o.asCSSSelector=E})(V||(V={})),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"})}(Se||(Se={}))},79881:function(kn,Ft,Y){"use strict";Y.d(Ft,{B8:function(){return O},Cp:function(){return xe},F0:function(){return V},L6:function(){return le},VV:function(){return Se},b1:function(){return o},dL:function(){return He},ri:function(){return ne}});class re{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(E){setTimeout(()=>{throw E.stack?new Error(E.message+`
`+E.stack):E},0)}}emit(E){this.listeners.forEach(F=>{F(E)})}onUnexpectedError(E){this.unexpectedErrorHandler(E),this.emit(E)}onUnexpectedExternalError(E){this.unexpectedErrorHandler(E)}}const Te=new re;function He(B){Se(B)||Te.onUnexpectedError(B)}function xe(B){Se(B)||Te.onUnexpectedExternalError(B)}function ne(B){if(B instanceof Error){let{name:E,message:F}=B;const L=B.stacktrace||B.stack;return{$isError:!0,name:E,message:F,stack:L}}return B}const y="Canceled";function Se(B){return B instanceof Error&&B.name===y&&B.message===y}function V(){const B=new Error(y);return B.name=B.message,B}function o(B){return B?new Error(`Illegal argument: ${B}`):new Error("Illegal argument")}function le(B){return B?new Error(`Illegal state: ${B}`):new Error("Illegal state")}class O extends Error{constructor(E){super("NotSupported"),E&&(this.message=E)}}},4348:function(kn,Ft,Y){"use strict";Y.d(Ft,{D0:function(){return O},E7:function(){return B},K3:function(){return le},Q5:function(){return o},ZD:function(){return E},ju:function(){return ne}});var re=Y(79881),Te=Y(69323),He=Y(34502),xe=Y(95830),ne;(function(F){F.None=()=>Te.JT.None;function L(q){return(se,de=null,fe)=>{let b=!1,S;return S=q(W=>{if(!b)return S?S.dispose():b=!0,se.call(de,W)},null,fe),b&&S.dispose(),S}}F.once=L;function Ae(q,se){return be((de,fe=null,b)=>q(S=>de.call(fe,se(S)),null,b))}F.map=Ae;function Z(q,se){return be((de,fe=null,b)=>q(S=>{se(S),de.call(fe,S)},null,b))}F.forEach=Z;function J(q,se){return be((de,fe=null,b)=>q(S=>se(S)&&de.call(fe,S),null,b))}F.filter=J;function H(q){return q}F.signal=H;function z(...q){return(se,de=null,fe)=>(0,Te.F8)(...q.map(b=>b(S=>se.call(de,S),null,fe)))}F.any=z;function oe(q,se,de){let fe=de;return Ae(q,b=>(fe=se(fe,b),fe))}F.reduce=oe;function be(q){let se;const de=new o({onFirstListenerAdd(){se=q(de.fire,de)},onLastListenerRemove(){se.dispose()}});return de.event}function De(q,se,de=100,fe=!1,b){let S,W,_e,qe=0;const mt=new o({leakWarningThreshold:b,onFirstListenerAdd(){S=q(Gt=>{qe++,W=se(W,Gt),fe&&!_e&&(mt.fire(W),W=void 0),clearTimeout(_e),_e=setTimeout(()=>{const Qt=W;W=void 0,_e=void 0,(!fe||qe>1)&&mt.fire(Qt),qe=0},de)})},onLastListenerRemove(){S.dispose()}});return mt.event}F.debounce=De;function ke(q,se=(de,fe)=>de===fe){let de=!0,fe;return J(q,b=>{const S=de||!se(b,fe);return de=!1,fe=b,S})}F.latch=ke;function ge(q,se){return[F.filter(q,se),F.filter(q,de=>!se(de))]}F.split=ge;function Ue(q,se=!1,de=[]){let fe=de.slice(),b=q(_e=>{fe?fe.push(_e):W.fire(_e)});const S=()=>{fe&&fe.forEach(_e=>W.fire(_e)),fe=null},W=new o({onFirstListenerAdd(){b||(b=q(_e=>W.fire(_e)))},onFirstListenerDidAdd(){fe&&(se?setTimeout(S):S())},onLastListenerRemove(){b&&b.dispose(),b=null}});return W.event}F.buffer=Ue;class Je{constructor(se){this.event=se}map(se){return new Je(Ae(this.event,se))}forEach(se){return new Je(Z(this.event,se))}filter(se){return new Je(J(this.event,se))}reduce(se,de){return new Je(oe(this.event,se,de))}latch(){return new Je(ke(this.event))}debounce(se,de=100,fe=!1,b){return new Je(De(this.event,se,de,fe,b))}on(se,de,fe){return this.event(se,de,fe)}once(se,de,fe){return L(this.event)(se,de,fe)}}function Be(q){return new Je(q)}F.chain=Be;function nt(q,se,de=fe=>fe){const fe=(..._e)=>W.fire(de(..._e)),b=()=>q.on(se,fe),S=()=>q.removeListener(se,fe),W=new o({onFirstListenerAdd:b,onLastListenerRemove:S});return W.event}F.fromNodeEventEmitter=nt;function ie(q,se,de=fe=>fe){const fe=(..._e)=>W.fire(de(..._e)),b=()=>q.addEventListener(se,fe),S=()=>q.removeEventListener(se,fe),W=new o({onFirstListenerAdd:b,onLastListenerRemove:S});return W.event}F.fromDOMEventEmitter=ie;function Q(q){return new Promise(se=>L(q)(se))}F.toPromise=Q})(ne||(ne={}));class y{constructor(L){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${L}_${y._idPool++}`}start(L){this._stopWatch=new xe.G(!0),this._listenerCount=L}stop(){if(this._stopWatch){const L=this._stopWatch.elapsed();this._elapsedOverall+=L,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${L.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}y._idPool=0;let Se=-1;class V{constructor(L,Ae=Math.random().toString(18).slice(2,5)){this.customThreshold=L,this.name=Ae,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(L){let Ae=Se;if(typeof this.customThreshold=="number"&&(Ae=this.customThreshold),Ae<=0||L<Ae)return;this._stacks||(this._stacks=new Map);const Z=new Error().stack.split(`
`).slice(3).join(`
`),J=this._stacks.get(Z)||0;if(this._stacks.set(Z,J+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=Ae*.5;let H,z=0;for(const[oe,be]of this._stacks)(!H||z<be)&&(H=oe,z=be);console.warn(`[${this.name}] potential listener LEAK detected, having ${L} listeners already. MOST frequent listener (${z}):`),console.warn(H)}return()=>{const H=this._stacks.get(Z)||0;this._stacks.set(Z,H-1)}}}class o{constructor(L){var Ae;this._disposed=!1,this._options=L,this._leakageMon=Se>0?new V(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((Ae=this._options)===null||Ae===void 0)&&Ae._profName?new y(this._options._profName):void 0}get event(){return this._event||(this._event=(L,Ae,Z)=>{var J;this._listeners||(this._listeners=new He.S);const H=this._listeners.isEmpty();H&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const z=this._listeners.push(Ae?[L,Ae]:L);H&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,L,Ae);const oe=(J=this._leakageMon)===null||J===void 0?void 0:J.check(this._listeners.size),be=(0,Te.OF)(()=>{oe&&oe(),this._disposed||(z(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return Z instanceof Te.SL?Z.add(be):Array.isArray(Z)&&Z.push(be),be}),this._event}fire(L){var Ae,Z;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new He.S);for(let J of this._listeners)this._deliveryQueue.push([J,L]);for((Ae=this._perfMon)===null||Ae===void 0||Ae.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[J,H]=this._deliveryQueue.shift();try{typeof J=="function"?J.call(void 0,H):J[0].call(J[1],H)}catch(z){(0,re.dL)(z)}}(Z=this._perfMon)===null||Z===void 0||Z.stop()}}dispose(){var L,Ae,Z,J,H;this._disposed||(this._disposed=!0,(L=this._listeners)===null||L===void 0||L.clear(),(Ae=this._deliveryQueue)===null||Ae===void 0||Ae.clear(),(J=(Z=this._options)===null||Z===void 0?void 0:Z.onLastListenerRemove)===null||J===void 0||J.call(Z),(H=this._leakageMon)===null||H===void 0||H.dispose())}}class le extends o{constructor(L){super(L),this._isPaused=0,this._eventQueue=new He.S,this._mergeFn=L==null?void 0:L.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const L=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(L))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(L){this._listeners&&(this._isPaused!==0?this._eventQueue.push(L):super.fire(L))}}class O extends le{constructor(L){var Ae;super(L),this._delay=(Ae=L.delay)!==null&&Ae!==void 0?Ae:100}fire(L){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(L)}}class B{constructor(){this.buffers=[]}wrapEvent(L){return(Ae,Z,J)=>L(H=>{const z=this.buffers[this.buffers.length-1];z?z.push(()=>Ae.call(Z,H)):Ae.call(Z,H)},void 0,J)}bufferEvents(L){const Ae=[];this.buffers.push(Ae);const Z=L();return this.buffers.pop(),Ae.forEach(J=>J()),Z}}class E{constructor(){this.listening=!1,this.inputEvent=ne.None,this.inputEventListener=Te.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(L){this.inputEvent=L,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=L(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(kn,Ft,Y){"use strict";Y.d(Ft,{I:function(){return re}});function re(Te){const He=this;let xe=!1,ne;return function(){return xe||(xe=!0,ne=Te.apply(He,arguments)),ne}}},88226:function(kn,Ft,Y){"use strict";Y.d(Ft,{$:function(){return re}});var re;(function(Te){function He(z){return z&&typeof z=="object"&&typeof z[Symbol.iterator]=="function"}Te.is=He;const xe=Object.freeze([]);function ne(){return xe}Te.empty=ne;function*y(z){yield z}Te.single=y;function Se(z){return z||xe}Te.from=Se;function V(z){return!z||z[Symbol.iterator]().next().done===!0}Te.isEmpty=V;function o(z){return z[Symbol.iterator]().next().value}Te.first=o;function le(z,oe){for(const be of z)if(oe(be))return!0;return!1}Te.some=le;function O(z,oe){for(const be of z)if(oe(be))return be}Te.find=O;function*B(z,oe){for(const be of z)oe(be)&&(yield be)}Te.filter=B;function*E(z,oe){let be=0;for(const De of z)yield oe(De,be++)}Te.map=E;function*F(...z){for(const oe of z)for(const be of oe)yield be}Te.concat=F;function*L(z){for(const oe of z)for(const be of oe)yield be}Te.concatNested=L;function Ae(z,oe,be){let De=be;for(const ke of z)De=oe(De,ke);return De}Te.reduce=Ae;function*Z(z,oe,be=z.length){for(oe<0&&(oe+=z.length),be<0?be+=z.length:be>z.length&&(be=z.length);oe<be;oe++)yield z[oe]}Te.slice=Z;function J(z,oe=Number.POSITIVE_INFINITY){const be=[];if(oe===0)return[be,z];const De=z[Symbol.iterator]();for(let ke=0;ke<oe;ke++){const ge=De.next();if(ge.done)return[be,Te.empty()];be.push(ge.value)}return[be,{[Symbol.iterator](){return De}}]}Te.consume=J;function H(z,oe,be=(De,ke)=>De===ke){const De=z[Symbol.iterator](),ke=oe[Symbol.iterator]();for(;;){const ge=De.next(),Ue=ke.next();if(ge.done!==Ue.done)return!1;if(ge.done)return!0;if(!be(ge.value,Ue.value))return!1}}Te.equals=H})(re||(re={}))},69323:function(kn,Ft,Y){"use strict";Y.d(Ft,{B9:function(){return E},F8:function(){return F},JT:function(){return Z},Jz:function(){return H},OF:function(){return L},SL:function(){return Ae},Wf:function(){return B},XK:function(){return J},dk:function(){return le}});var re=Y(17845),Te=Y(88226);const He=!1;let xe=null;function ne(z){xe=z}if(He){const z="__is_disposable_tracked__";ne(new class{trackDisposable(oe){const be=new Error("Potentially leaked disposable").stack;setTimeout(()=>{oe[z]||console.log(be)},3e3)}setParent(oe,be){if(oe&&oe!==Z.None)try{oe[z]=!0}catch(De){}}markAsDisposed(oe){if(oe&&oe!==Z.None)try{oe[z]=!0}catch(be){}}markAsSingleton(oe){}})}function y(z){return xe==null||xe.trackDisposable(z),z}function Se(z){xe==null||xe.markAsDisposed(z)}function V(z,oe){xe==null||xe.setParent(z,oe)}function o(z,oe){if(xe)for(const be of z)xe.setParent(be,oe)}function le(z){return xe==null||xe.markAsSingleton(z),z}class O extends Error{constructor(oe){super(`Encountered errors while disposing of store. Errors: [${oe.join(", ")}]`),this.errors=oe}}function B(z){return typeof z.dispose=="function"&&z.dispose.length===0}function E(z){if(Te.$.is(z)){let oe=[];for(const be of z)if(be)try{be.dispose()}catch(De){oe.push(De)}if(oe.length===1)throw oe[0];if(oe.length>1)throw new O(oe);return Array.isArray(z)?[]:z}else if(z)return z.dispose(),z}function F(...z){const oe=L(()=>E(z));return o(z,oe),oe}function L(z){const oe=y({dispose:(0,re.I)(()=>{Se(oe),z()})});return oe}class Ae{constructor(){this._toDispose=new Set,this._isDisposed=!1,y(this)}dispose(){this._isDisposed||(Se(this),this._isDisposed=!0,this.clear())}clear(){try{E(this._toDispose.values())}finally{this._toDispose.clear()}}add(oe){if(!oe)return oe;if(oe===this)throw new Error("Cannot register a disposable on itself!");return V(oe,this),this._isDisposed?Ae.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(oe),oe}}Ae.DISABLE_DISPOSED_WARNING=!1;class Z{constructor(){this._store=new Ae,y(this),V(this._store,this)}dispose(){Se(this),this._store.dispose()}_register(oe){if(oe===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(oe)}}Z.None=Object.freeze({dispose(){}});class J{constructor(){this._isDisposed=!1,y(this)}get value(){return this._isDisposed?void 0:this._value}set value(oe){var be;this._isDisposed||oe===this._value||((be=this._value)===null||be===void 0||be.dispose(),oe&&V(oe,this),this._value=oe)}clear(){this.value=void 0}dispose(){var oe;this._isDisposed=!0,Se(this),(oe=this._value)===null||oe===void 0||oe.dispose(),this._value=void 0}clearAndLeak(){const oe=this._value;return this._value=void 0,oe&&V(oe,null),oe}}class H{constructor(oe){this.object=oe}dispose(){}}},34502:function(kn,Ft,Y){"use strict";Y.d(Ft,{S:function(){return Te}});class re{constructor(xe){this.element=xe,this.next=re.Undefined,this.prev=re.Undefined}}re.Undefined=new re(void 0);class Te{constructor(){this._first=re.Undefined,this._last=re.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===re.Undefined}clear(){let xe=this._first;for(;xe!==re.Undefined;){const ne=xe.next;xe.prev=re.Undefined,xe.next=re.Undefined,xe=ne}this._first=re.Undefined,this._last=re.Undefined,this._size=0}unshift(xe){return this._insert(xe,!1)}push(xe){return this._insert(xe,!0)}_insert(xe,ne){const y=new re(xe);if(this._first===re.Undefined)this._first=y,this._last=y;else if(ne){const V=this._last;this._last=y,y.prev=V,V.next=y}else{const V=this._first;this._first=y,y.next=V,V.prev=y}this._size+=1;let Se=!1;return()=>{Se||(Se=!0,this._remove(y))}}shift(){if(this._first!==re.Undefined){const xe=this._first.element;return this._remove(this._first),xe}}pop(){if(this._last!==re.Undefined){const xe=this._last.element;return this._remove(this._last),xe}}_remove(xe){if(xe.prev!==re.Undefined&&xe.next!==re.Undefined){const ne=xe.prev;ne.next=xe.next,xe.next.prev=ne}else xe.prev===re.Undefined&&xe.next===re.Undefined?(this._first=re.Undefined,this._last=re.Undefined):xe.next===re.Undefined?(this._last=this._last.prev,this._last.next=re.Undefined):xe.prev===re.Undefined&&(this._first=this._first.next,this._first.prev=re.Undefined);this._size-=1}*[Symbol.iterator](){let xe=this._first;for(;xe!==re.Undefined;)yield xe.element,xe=xe.next}}},23345:function(kn,Ft,Y){"use strict";Y.d(Ft,{$L:function(){return De},ED:function(){return H},IJ:function(){return oe},OS:function(){return Je},WE:function(){return ge},dz:function(){return z},gn:function(){return ke},li:function(){return L},r:function(){return ie},tY:function(){return be},xS:function(){return Ue}});var re=Y(97671),Te;const He="en";let xe=!1,ne=!1,y=!1,Se=!1,V=!1,o=!1,le=!1,O,B=null,E=null,F;const L=typeof self=="object"?self:typeof Y.g=="object"?Y.g:{};let Ae;typeof L.vscode!="undefined"&&typeof L.vscode.process!="undefined"?Ae=L.vscode.process:typeof re!="undefined"&&(Ae=re);const Z=typeof((Te=Ae==null?void 0:Ae.versions)===null||Te===void 0?void 0:Te.electron)=="string"&&Ae.type==="renderer";if(typeof navigator=="object"&&!Z)F=navigator.userAgent,xe=F.indexOf("Windows")>=0,ne=F.indexOf("Macintosh")>=0,le=(F.indexOf("Macintosh")>=0||F.indexOf("iPad")>=0||F.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,y=F.indexOf("Linux")>=0,o=!0,O=navigator.language,B=O;else if(typeof Ae=="object"){xe=Ae.platform==="win32",ne=Ae.platform==="darwin",y=Ae.platform==="linux",Se=y&&!!Ae.env.SNAP&&!!Ae.env.SNAP_REVISION,O=He,B=He;const Q=Ae.env.VSCODE_NLS_CONFIG;if(Q)try{const q=JSON.parse(Q),se=q.availableLanguages["*"];O=q.locale,B=se||He,E=q._translationsConfigFile}catch(q){}V=!0}else console.error("Unable to resolve platform.");let J=0;ne?J=1:xe?J=3:y&&(J=2);const H=xe,z=ne,oe=y,be=V,De=o,ke=le,ge=F,Ue=function(){if(L.setImmediate)return L.setImmediate.bind(L);if(typeof L.postMessage=="function"&&!L.importScripts){let se=[];L.addEventListener("message",fe=>{if(fe.data&&fe.data.vscodeSetImmediateId)for(let b=0,S=se.length;b<S;b++){const W=se[b];if(W.id===fe.data.vscodeSetImmediateId){se.splice(b,1),W.callback();return}}});let de=0;return fe=>{const b=++de;se.push({id:b,callback:fe}),L.postMessage({vscodeSetImmediateId:b},"*")}}if(typeof(Ae==null?void 0:Ae.nextTick)=="function")return Ae.nextTick.bind(Ae);const q=Promise.resolve();return se=>q.then(se)}(),Je=ne||le?2:xe?1:3;let Be=!0,nt=!1;function ie(){if(!nt){nt=!0;const Q=new Uint8Array(2);Q[0]=1,Q[1]=2,Be=new Uint16Array(Q.buffer)[0]===513}return Be}},95830:function(kn,Ft,Y){"use strict";Y.d(Ft,{G:function(){return He}});var re=Y(23345);const Te=re.li.performance&&typeof re.li.performance.now=="function";class He{constructor(ne){this._highResolution=Te&&ne,this._startTime=this._now(),this._stopTime=-1}static create(ne=!0){return new He(ne)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?re.li.performance.now():Date.now()}}},82983:function(kn,Ft,Y){"use strict";Y.d(Ft,{$i:function(){return qe},C8:function(){return Wt},GF:function(){return O},HO:function(){return de},IO:function(){return B},K7:function(){return sn},Kw:function(){return dt},LC:function(){return L},Mh:function(){return Ue},P1:function(){return Je},PJ:function(){return ot},Qe:function(){return mt},R1:function(){return le},RP:function(){return W},S6:function(){return ft},TT:function(){return H},Ut:function(){return b},V8:function(){return Ae},WU:function(){return He},YK:function(){return nt},YU:function(){return xe},ZG:function(){return Be},ZH:function(){return Q},ab:function(){return Gt},c1:function(){return kt},df:function(){return De},ec:function(){return ne},fi:function(){return tn},fy:function(){return y},j3:function(){return Se},j_:function(){return oe},m5:function(){return re},mK:function(){return be},mr:function(){return E},oH:function(){return v},oL:function(){return V},ok:function(){return ge},ow:function(){return Z},qq:function(){return ke},qu:function(){return J},rL:function(){return ie},uS:function(){return Xe},un:function(){return o},uq:function(){return F},vH:function(){return se},xe:function(){return Qt},zY:function(){return z}});function re(K){return!K||typeof K!="string"?!0:K.trim().length===0}const Te=/{(\d+)}/g;function He(K,...ce){return ce.length===0?K:K.replace(Te,function(Me,We){const lt=parseInt(We,10);return isNaN(lt)||lt<0||lt>=ce.length?Me:ce[lt]})}function xe(K){return K.replace(/[<>&]/g,function(ce){switch(ce){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ce}})}function ne(K){return K.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function y(K,ce=" "){const Me=Se(K,ce);return V(Me,ce)}function Se(K,ce){if(!K||!ce)return K;const Me=ce.length;if(Me===0||K.length===0)return K;let We=0;for(;K.indexOf(ce,We)===We;)We=We+Me;return K.substring(We)}function V(K,ce){if(!K||!ce)return K;const Me=ce.length,We=K.length;if(Me===0||We===0)return K;let lt=We,ht=-1;for(;ht=K.lastIndexOf(ce,lt-1),!(ht===-1||ht+Me!==lt);){if(ht===0)return"";lt=ht}return K.substring(0,lt)}function o(K){return K.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function le(K){return K.replace(/\*/g,"")}function O(K,ce,Me={}){if(!K)throw new Error("Cannot create regex from empty string");ce||(K=ne(K)),Me.wholeWord&&(/\B/.test(K.charAt(0))||(K="\\b"+K),/\B/.test(K.charAt(K.length-1))||(K=K+"\\b"));let We="";return Me.global&&(We+="g"),Me.matchCase||(We+="i"),Me.multiline&&(We+="m"),Me.unicode&&(We+="u"),new RegExp(K,We)}function B(K){return K.source==="^"||K.source==="^$"||K.source==="$"||K.source==="^\\s*$"?!1:!!(K.exec("")&&K.lastIndex===0)}function E(K){return(K.global?"g":"")+(K.ignoreCase?"i":"")+(K.multiline?"m":"")+(K.unicode?"u":"")}function F(K){return K.split(/\r\n|\r|\n/)}function L(K){for(let ce=0,Me=K.length;ce<Me;ce++){const We=K.charCodeAt(ce);if(We!==32&&We!==9)return ce}return-1}function Ae(K,ce=0,Me=K.length){for(let We=ce;We<Me;We++){const lt=K.charCodeAt(We);if(lt!==32&&lt!==9)return K.substring(ce,We)}return K.substring(ce,Me)}function Z(K,ce=K.length-1){for(let Me=ce;Me>=0;Me--){const We=K.charCodeAt(Me);if(We!==32&&We!==9)return Me}return-1}function J(K,ce){return K<ce?-1:K>ce?1:0}function H(K,ce,Me=0,We=K.length,lt=0,ht=ce.length){for(;Me<We&&lt<ht;Me++,lt++){let Rt=K.charCodeAt(Me),yt=ce.charCodeAt(lt);if(Rt<yt)return-1;if(Rt>yt)return 1}const jt=We-Me,vt=ht-lt;return jt<vt?-1:jt>vt?1:0}function z(K,ce){return oe(K,ce,0,K.length,0,ce.length)}function oe(K,ce,Me=0,We=K.length,lt=0,ht=ce.length){for(;Me<We&&lt<ht;Me++,lt++){let Rt=K.charCodeAt(Me),yt=ce.charCodeAt(lt);if(Rt===yt)continue;if(Rt>=128||yt>=128)return H(K.toLowerCase(),ce.toLowerCase(),Me,We,lt,ht);be(Rt)&&(Rt-=32),be(yt)&&(yt-=32);const xt=Rt-yt;if(xt!==0)return xt}const jt=We-Me,vt=ht-lt;return jt<vt?-1:jt>vt?1:0}function be(K){return K>=97&&K<=122}function De(K){return K>=65&&K<=90}function ke(K,ce){return K.length===ce.length&&oe(K,ce)===0}function ge(K,ce){const Me=ce.length;return ce.length>K.length?!1:oe(K,ce,0,Me)===0}function Ue(K,ce){let Me,We=Math.min(K.length,ce.length);for(Me=0;Me<We;Me++)if(K.charCodeAt(Me)!==ce.charCodeAt(Me))return Me;return We}function Je(K,ce){let Me,We=Math.min(K.length,ce.length);const lt=K.length-1,ht=ce.length-1;for(Me=0;Me<We;Me++)if(K.charCodeAt(lt-Me)!==ce.charCodeAt(ht-Me))return Me;return We}function Be(K){return 55296<=K&&K<=56319}function nt(K){return 56320<=K&&K<=57343}function ie(K,ce){return(K-55296<<10)+(ce-56320)+65536}function Q(K,ce,Me){const We=K.charCodeAt(Me);if(Be(We)&&Me+1<ce){const lt=K.charCodeAt(Me+1);if(nt(lt))return ie(We,lt)}return We}function q(K,ce){const Me=K.charCodeAt(ce-1);if(nt(Me)&&ce>1){const We=K.charCodeAt(ce-2);if(Be(We))return ie(We,Me)}return Me}function se(K,ce){const Me=Re.getInstance(),We=ce,lt=K.length,ht=Q(K,lt,ce);ce+=ht>=65536?2:1;let jt=Me.getGraphemeBreakType(ht);for(;ce<lt;){const vt=Q(K,lt,ce),Rt=Me.getGraphemeBreakType(vt);if(tn(jt,Rt))break;ce+=vt>=65536?2:1,jt=Rt}return ce-We}function de(K,ce){const Me=Re.getInstance(),We=ce,lt=q(K,ce);ce-=lt>=65536?2:1;let ht=Me.getGraphemeBreakType(lt);for(;ce>0;){const jt=q(K,ce),vt=Me.getGraphemeBreakType(jt);if(tn(vt,ht))break;ce-=jt>=65536?2:1,ht=vt}return We-ce}const fe=/(?:[\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 b(K){return fe.test(K)}const S=/(?:[\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 W(K){return S.test(K)}const _e=/^[\t\n\r\x20-\x7E]*$/;function qe(K){return _e.test(K)}const mt=/[\u2028\u2029]/;function Gt(K){return mt.test(K)}function Qt(K){for(let ce=0,Me=K.length;ce<Me;ce++)if(sn(K.charCodeAt(ce)))return!0;return!1}function sn(K){return K=+K,K>=11904&&K<=55215||K>=63744&&K<=64255||K>=65281&&K<=65374}function Wt(K){return K>=127462&&K<=127487||K===8986||K===8987||K===9200||K===9203||K>=9728&&K<=10175||K===11088||K===11093||K>=127744&&K<=128591||K>=128640&&K<=128764||K>=128992&&K<=129003||K>=129280&&K<=129535||K>=129648&&K<=129750}const kt="\uFEFF";function Xe(K){return!!(K&&K.length>0&&K.charCodeAt(0)===65279)}function dt(K,ce=!1){return K?(ce&&(K=K.replace(/\\./g,"")),K.toLowerCase()!==K):!1}function ot(K){return K=K%(2*26),K<26?String.fromCharCode(97+K):String.fromCharCode(65+K-26)}function ft(K){return Re.getInstance().getGraphemeBreakType(K)}function tn(K,ce){return K===0?ce!==5&&ce!==7:K===2&&ce===3?!1:K===4||K===2||K===3||ce===4||ce===2||ce===3?!0:!(K===8&&(ce===8||ce===9||ce===11||ce===12)||(K===11||K===9)&&(ce===9||ce===10)||(K===12||K===10)&&ce===10||ce===5||ce===13||ce===7||K===1||K===13&&ce===14||K===6&&ce===6)}class Re{constructor(){this._data=P()}static getInstance(){return Re._INSTANCE||(Re._INSTANCE=new Re),Re._INSTANCE}getGraphemeBreakType(ce){if(ce<32)return ce===10?3:ce===13?2:4;if(ce<127)return 0;const Me=this._data,We=Me.length/3;let lt=1;for(;lt<=We;)if(ce<Me[3*lt])lt=2*lt;else if(ce>Me[3*lt+1])lt=2*lt+1;else return Me[3*lt+2];return 0}}Re._INSTANCE=null;function P(){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 v(K,ce){if(K===0)return 0;const Me=T(K,ce);if(Me!==void 0)return Me;const We=q(ce,K);return K-=X(We),K}function T(K,ce){let Me=q(ce,K);for(K-=X(Me);k(Me)||Me===65039||Me===8419;){if(K===0)return;Me=q(ce,K),K-=X(Me)}if(Wt(Me)){if(K>=0){const We=q(ce,K);We===8205&&(K-=X(We))}return K}}function X(K){return K>=65536?2:1}function k(K){return 127995<=K&&K<=127999}},72999:function(kn,Ft,Y){"use strict";Y.d(Ft,{$E:function(){return L},$K:function(){return Se},D8:function(){return B},HD:function(){return Te},IU:function(){return Ae},Jp:function(){return V},Kn:function(){return He},cW:function(){return le},f6:function(){return Z},hj:function(){return xe},jn:function(){return ne},kJ:function(){return re},mf:function(){return O},o8:function(){return y},p_:function(){return o},vE:function(){return J}});function re(H){return Array.isArray(H)}function Te(H){return typeof H=="string"}function He(H){return typeof H=="object"&&H!==null&&!Array.isArray(H)&&!(H instanceof RegExp)&&!(H instanceof Date)}function xe(H){return typeof H=="number"&&!isNaN(H)}function ne(H){return H===!0||H===!1}function y(H){return typeof H=="undefined"}function Se(H){return!V(H)}function V(H){return y(H)||H===null}function o(H,z){if(!H)throw new Error(z?`Unexpected type, expected '${z}'`:"Unexpected type")}function le(H){if(V(H))throw new Error("Assertion Failed: argument is undefined or null");return H}function O(H){return typeof H=="function"}function B(H,z){const oe=Math.min(H.length,z.length);for(let be=0;be<oe;be++)E(H[be],z[be])}function E(H,z){if(Te(z)){if(typeof H!==z)throw new Error(`argument does not match constraint: typeof ${z}`)}else if(O(z)){try{if(H instanceof z)return}catch(oe){}if(!V(H)&&H.constructor===z||z.length===1&&z.call(void 0,H)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function F(H){let z=[],oe=Object.getPrototypeOf(H);for(;Object.prototype!==oe;)z=z.concat(Object.getOwnPropertyNames(oe)),oe=Object.getPrototypeOf(oe);return z}function L(H){const z=[];for(const oe of F(H))typeof H[oe]=="function"&&z.push(oe);return z}function Ae(H,z){const oe=De=>function(){const ke=Array.prototype.slice.call(arguments,0);return z(De,ke)};let be={};for(const De of H)be[De]=oe(De);return be}function Z(H){return H===null?void 0:H}function J(H,z="Unreachable"){throw new Error(z)}},13268:function(kn,Ft,Y){"use strict";Y.d(Ft,{N:function(){return Te}});function re(He,xe){let ne;return xe.length===0?ne=He:ne=He.replace(/\{(\d+)\}/g,function(y,Se){const V=Se[0];return typeof xe[V]!="undefined"?xe[V]:y}),ne}function Te(He,xe,...ne){return re(xe,ne)}},96236:function(kn,Ft,Y){"use strict";Y.d(Ft,{BH:function(){return Ae},NZ:function(){return Z},U8:function(){return J},co:function(){return L},eH:function(){return F},vr:function(){return E}});var re=Y(75918),Te=Y(52615),He=Y(4348),xe=Y(88226),ne=Y(69323),y=Y(34502),Se=Y(35884),V=Y(90689),o=Y(16925),le=Y(49055),O=function(H,z,oe,be){var De=arguments.length,ke=De<3?z:be===null?be=Object.getOwnPropertyDescriptor(z,oe):be,ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(H,z,oe,be);else for(var Ue=H.length-1;Ue>=0;Ue--)(ge=H[Ue])&&(ke=(De<3?ge(ke):De>3?ge(z,oe,ke):ge(z,oe))||ke);return De>3&&ke&&Object.defineProperty(z,oe,ke),ke},B=function(H,z){return function(oe,be){z(oe,be,H)}};function E(H){return H.command!==void 0}class F{constructor(z){this.id=F._idPool++,this._debugName=z}}F._idPool=0,F.CommandPalette=new F("CommandPalette"),F.EditorContext=new F("EditorContext"),F.SimpleEditorContext=new F("SimpleEditorContext"),F.EditorContextCopy=new F("EditorContextCopy"),F.EditorContextPeek=new F("EditorContextPeek"),F.MenubarEditMenu=new F("MenubarEditMenu"),F.MenubarCopy=new F("MenubarCopy"),F.MenubarGoMenu=new F("MenubarGoMenu"),F.MenubarSelectionMenu=new F("MenubarSelectionMenu"),F.InlineCompletionsActions=new F("InlineCompletionsActions");const L=(0,o.yh)("menuService"),Ae=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new He.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:H=>H===F.CommandPalette}}addCommand(H){return this.addCommands(xe.$.single(H))}addCommands(H){for(const z of H)this._commands.set(z.id,z);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,ne.OF)(()=>{let z=!1;for(const oe of H)z=this._commands.delete(oe.id)||z;z&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(H){return this._commands.get(H)}getCommands(){const H=new Map;return this._commands.forEach((z,oe)=>H.set(oe,z)),H}appendMenuItem(H,z){return this.appendMenuItems(xe.$.single({id:H,item:z}))}appendMenuItems(H){const z=new Set,oe=new y.S;for(const{id:be,item:De}of H){let ke=this._menuItems.get(be);ke||(ke=new y.S,this._menuItems.set(be,ke)),oe.push(ke.push(De)),z.add(be)}return this._onDidChangeMenu.fire(z),(0,ne.OF)(()=>{if(oe.size>0){for(let be of oe)be();this._onDidChangeMenu.fire(z),oe.clear()}})}getMenuItems(H){let z;return this._menuItems.has(H)?z=[...this._menuItems.get(H)]:z=[],H===F.CommandPalette&&this._appendImplicitItems(z),z}_appendImplicitItems(H){const z=new Set;for(const oe of H)E(oe)&&(z.add(oe.command.id),oe.alt&&z.add(oe.alt.id));this._commands.forEach((oe,be)=>{z.has(be)||H.push({command:oe})})}};class Z extends re.wY{constructor(z,oe,be,De){super(`submenuitem.${z.submenu.id}`,typeof z.title=="string"?z.title:z.title.value,[],"submenu"),this.item=z,this._menuService=oe,this._contextKeyService=be,this._options=De}get actions(){const z=[],oe=this._menuService.createMenu(this.item.submenu,this._contextKeyService),be=oe.getActions(this._options);oe.dispose();for(const[,De]of be)De.length>0&&(z.push(...De),z.push(new re.Z0));return z.length&&z.pop(),z}}let J=class $c{constructor(z,oe,be,De,ke){var ge,Ue;if(this._commandService=ke,this.id=z.id,this.label=be!=null&&be.renderShortTitle&&z.shortTitle?typeof z.shortTitle=="string"?z.shortTitle:z.shortTitle.value:typeof z.title=="string"?z.title:z.title.value,this.tooltip=(Ue=typeof z.tooltip=="string"?z.tooltip:(ge=z.tooltip)===null||ge===void 0?void 0:ge.value)!==null&&Ue!==void 0?Ue:"",this.enabled=!z.precondition||De.contextMatchesRules(z.precondition),this.checked=void 0,z.toggled){const Je=z.toggled.condition?z.toggled:{condition:z.toggled};this.checked=De.contextMatchesRules(Je.condition),this.checked&&Je.tooltip&&(this.tooltip=typeof Je.tooltip=="string"?Je.tooltip:Je.tooltip.value),Je.title&&(this.label=typeof Je.title=="string"?Je.title:Je.title.value)}this.item=z,this.alt=oe?new $c(oe,void 0,be,De,ke):void 0,this._options=be,le.kS.isThemeIcon(z.icon)&&(this.class=Te.dT.asClassName(z.icon))}dispose(){}run(...z){var oe,be;let De=[];return!((oe=this._options)===null||oe===void 0)&&oe.arg&&(De=[...De,this._options.arg]),!((be=this._options)===null||be===void 0)&&be.shouldForwardArgs&&(De=[...De,...z]),this._commandService.executeCommand(this.id,...De)}};J=O([B(3,V.i6),B(4,Se.H)],J)},35884:function(kn,Ft,Y){"use strict";Y.d(Ft,{H:function(){return Se},P:function(){return V}});var re=Y(4348),Te=Y(88226),He=Y(69323),xe=Y(34502),ne=Y(72999),y=Y(16925);const Se=(0,y.yh)("commandService"),V=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new re.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,le){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!le)throw new Error("invalid command");return this.registerCommand({id:o,handler:le})}if(o.description){const L=[];for(let Z of o.description.args)L.push(Z.constraint);const Ae=o.handler;o.handler=function(Z,...J){return(0,ne.D8)(J,L),Ae(Z,...J)}}const{id:O}=o;let B=this._commands.get(O);B||(B=new xe.S,this._commands.set(O,B));let E=B.unshift(o),F=(0,He.OF)(()=>{E();const L=this._commands.get(O);L!=null&&L.isEmpty()&&this._commands.delete(O)});return this._onDidRegisterCommand.fire(O),F}registerCommandAlias(o,le){return V.registerCommand(o,(O,...B)=>O.get(Se).executeCommand(le,...B))}getCommand(o){const le=this._commands.get(o);if(!(!le||le.isEmpty()))return Te.$.first(le)}getCommands(){const o=new Map;for(const le of this._commands.keys()){const O=this.getCommand(le);O&&o.set(le,O)}return o}};V.registerCommand("noop",()=>{})},90689:function(kn,Ft,Y){"use strict";Y.d(Ft,{Ao:function(){return Se},Eq:function(){return ie},Fb:function(){return V},K8:function(){return se},i6:function(){return nt},uy:function(){return Be}});var re=Y(23345),Te=Y(82983),He=Y(16925);let xe=re.WE||"";const ne=new Map;ne.set("false",!1),ne.set("true",!0),ne.set("isMac",re.dz),ne.set("isLinux",re.IJ),ne.set("isWindows",re.ED),ne.set("isWeb",re.$L),ne.set("isMacNative",re.dz&&!re.$L),ne.set("isEdge",xe.indexOf("Edg/")>=0),ne.set("isFirefox",xe.indexOf("Firefox")>=0),ne.set("isChrome",xe.indexOf("Chrome")>=0),ne.set("isSafari",xe.indexOf("Safari")>=0);const y=Object.prototype.hasOwnProperty;class Se{static has(b){return B.create(b)}static equals(b,S){return E.create(b,S)}static regex(b,S){return De.create(b,S)}static not(b){return Z.create(b)}static and(...b){return Ue.create(b,null)}static or(...b){return Je.create(b,null,!0)}static deserialize(b,S=!1){if(b)return this._deserializeOrExpression(b,S)}static _deserializeOrExpression(b,S){let W=b.split("||");return Je.create(W.map(_e=>this._deserializeAndExpression(_e,S)),null,!0)}static _deserializeAndExpression(b,S){let W=b.split("&&");return Ue.create(W.map(_e=>this._deserializeOne(_e,S)),null)}static _deserializeOne(b,S){if(b=b.trim(),b.indexOf("!=")>=0){let W=b.split("!=");return Ae.create(W[0].trim(),this._deserializeValue(W[1],S))}if(b.indexOf("==")>=0){let W=b.split("==");return E.create(W[0].trim(),this._deserializeValue(W[1],S))}if(b.indexOf("=~")>=0){let W=b.split("=~");return De.create(W[0].trim(),this._deserializeRegexValue(W[1],S))}if(b.indexOf(" in ")>=0){let W=b.split(" in ");return F.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(b)){const W=b.split(">=");return z.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(b)){const W=b.split(">");return H.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(b)){const W=b.split("<=");return be.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(b)){const W=b.split("<");return oe.create(W[0].trim(),W[1].trim())}return/^\!\s*/.test(b)?Z.create(b.substr(1).trim()):B.create(b)}static _deserializeValue(b,S){if(b=b.trim(),b==="true")return!0;if(b==="false")return!1;let W=/^'([^']*)'$/.exec(b);return W?W[1].trim():b}static _deserializeRegexValue(b,S){if((0,Te.m5)(b)){if(S)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let W=b.indexOf("/"),_e=b.lastIndexOf("/");if(W===_e||W<0){if(S)throw new Error(`bad regexp-value '${b}', missing /-enclosure`);return console.warn(`bad regexp-value '${b}', missing /-enclosure`),null}let qe=b.slice(W+1,_e),mt=b[_e+1]==="i"?"i":"";try{return new RegExp(qe,mt)}catch(Gt){if(S)throw new Error(`bad regexp-value '${b}', parse error: ${Gt}`);return console.warn(`bad regexp-value '${b}', parse error: ${Gt}`),null}}}function V(fe,b){const S=fe?fe.substituteConstants():void 0,W=b?b.substituteConstants():void 0;return!S&&!W?!0:!S||!W?!1:S.equals(W)}function o(fe,b){return fe.cmp(b)}class le{constructor(){this.type=0}cmp(b){return this.type-b.type}equals(b){return b.type===this.type}substituteConstants(){return this}evaluate(b){return!1}serialize(){return"false"}keys(){return[]}negate(){return O.INSTANCE}}le.INSTANCE=new le;class O{constructor(){this.type=1}cmp(b){return this.type-b.type}equals(b){return b.type===this.type}substituteConstants(){return this}evaluate(b){return!0}serialize(){return"true"}keys(){return[]}negate(){return le.INSTANCE}}O.INSTANCE=new O;class B{constructor(b,S){this.key=b,this.negated=S,this.type=2}static create(b,S=null){const W=ne.get(b);return typeof W=="boolean"?W?O.INSTANCE:le.INSTANCE:new B(b,S)}cmp(b){return b.type!==this.type?this.type-b.type:Q(this.key,b.key)}equals(b){return b.type===this.type?this.key===b.key:!1}substituteConstants(){const b=ne.get(this.key);return typeof b=="boolean"?b?O.INSTANCE:le.INSTANCE:this}evaluate(b){return!!b.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Z.create(this.key,this)),this.negated}}class E{constructor(b,S,W){this.key=b,this.value=S,this.negated=W,this.type=4}static create(b,S,W=null){if(typeof S=="boolean")return S?B.create(b,W):Z.create(b,W);const _e=ne.get(b);return typeof _e=="boolean"?S===(_e?"true":"false")?O.INSTANCE:le.INSTANCE:new E(b,S,W)}cmp(b){return b.type!==this.type?this.type-b.type:q(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){const b=ne.get(this.key);if(typeof b=="boolean"){const S=b?"true":"false";return this.value===S?O.INSTANCE:le.INSTANCE}return this}evaluate(b){return b.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ae.create(this.key,this.value,this)),this.negated}}class F{constructor(b,S){this.key=b,this.valueKey=S,this.type=10,this.negated=null}static create(b,S){return new F(b,S)}cmp(b){return b.type!==this.type?this.type-b.type:q(this.key,this.valueKey,b.key,b.valueKey)}equals(b){return b.type===this.type?this.key===b.key&&this.valueKey===b.valueKey:!1}substituteConstants(){return this}evaluate(b){const S=b.getValue(this.valueKey),W=b.getValue(this.key);return Array.isArray(S)?S.indexOf(W)>=0:typeof W=="string"&&typeof S=="object"&&S!==null?y.call(S,W):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=L.create(this)),this.negated}}class L{constructor(b){this._actual=b,this.type=11}static create(b){return new L(b)}cmp(b){return b.type!==this.type?this.type-b.type:this._actual.cmp(b._actual)}equals(b){return b.type===this.type?this._actual.equals(b._actual):!1}substituteConstants(){return this}evaluate(b){return!this._actual.evaluate(b)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class Ae{constructor(b,S,W){this.key=b,this.value=S,this.negated=W,this.type=5}static create(b,S,W=null){if(typeof S=="boolean")return S?Z.create(b,W):B.create(b,W);const _e=ne.get(b);return typeof _e=="boolean"?S===(_e?"true":"false")?le.INSTANCE:O.INSTANCE:new Ae(b,S,W)}cmp(b){return b.type!==this.type?this.type-b.type:q(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){const b=ne.get(this.key);if(typeof b=="boolean"){const S=b?"true":"false";return this.value===S?le.INSTANCE:O.INSTANCE}return this}evaluate(b){return b.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class Z{constructor(b,S){this.key=b,this.negated=S,this.type=3}static create(b,S=null){const W=ne.get(b);return typeof W=="boolean"?W?le.INSTANCE:O.INSTANCE:new Z(b,S)}cmp(b){return b.type!==this.type?this.type-b.type:Q(this.key,b.key)}equals(b){return b.type===this.type?this.key===b.key:!1}substituteConstants(){const b=ne.get(this.key);return typeof b=="boolean"?b?le.INSTANCE:O.INSTANCE:this}evaluate(b){return!b.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this)),this.negated}}function J(fe,b){if(typeof fe=="string"){const S=parseFloat(fe);isNaN(S)||(fe=S)}return typeof fe=="string"||typeof fe=="number"?b(fe):le.INSTANCE}class H{constructor(b,S,W){this.key=b,this.value=S,this.negated=W,this.type=12}static create(b,S,W=null){return J(S,_e=>new H(b,_e,W))}cmp(b){return b.type!==this.type?this.type-b.type:q(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=be.create(this.key,this.value,this)),this.negated}}class z{constructor(b,S,W){this.key=b,this.value=S,this.negated=W,this.type=13}static create(b,S,W=null){return J(S,_e=>new z(b,_e,W))}cmp(b){return b.type!==this.type?this.type-b.type:q(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=oe.create(this.key,this.value,this)),this.negated}}class oe{constructor(b,S,W){this.key=b,this.value=S,this.negated=W,this.type=14}static create(b,S,W=null){return J(S,_e=>new oe(b,_e,W))}cmp(b){return b.type!==this.type?this.type-b.type:q(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class be{constructor(b,S,W){this.key=b,this.value=S,this.negated=W,this.type=15}static create(b,S,W=null){return J(S,_e=>new be(b,_e,W))}cmp(b){return b.type!==this.type?this.type-b.type:q(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=H.create(this.key,this.value,this)),this.negated}}class De{constructor(b,S){this.key=b,this.regexp=S,this.type=7,this.negated=null}static create(b,S){return new De(b,S)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.key<b.key)return-1;if(this.key>b.key)return 1;const S=this.regexp?this.regexp.source:"",W=b.regexp?b.regexp.source:"";return S<W?-1:S>W?1:0}equals(b){if(b.type===this.type){const S=this.regexp?this.regexp.source:"",W=b.regexp?b.regexp.source:"";return this.key===b.key&&S===W}return!1}substituteConstants(){return this}evaluate(b){let S=b.getValue(this.key);return this.regexp?this.regexp.test(S):!1}serialize(){const b=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${b}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ke.create(this)),this.negated}}class ke{constructor(b){this._actual=b,this.type=8}static create(b){return new ke(b)}cmp(b){return b.type!==this.type?this.type-b.type:this._actual.cmp(b._actual)}equals(b){return b.type===this.type?this._actual.equals(b._actual):!1}substituteConstants(){return this}evaluate(b){return!this._actual.evaluate(b)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ge(fe){let b=null;for(let S=0,W=fe.length;S<W;S++){const _e=fe[S].substituteConstants();if(fe[S]!==_e&&b===null){b=[];for(let qe=0;qe<S;qe++)b[qe]=fe[qe]}b!==null&&(b[S]=_e)}return b===null?fe:b}class Ue{constructor(b,S){this.expr=b,this.negated=S,this.type=6}static create(b,S){return Ue._normalizeArr(b,S)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.expr.length<b.expr.length)return-1;if(this.expr.length>b.expr.length)return 1;for(let S=0,W=this.expr.length;S<W;S++){const _e=o(this.expr[S],b.expr[S]);if(_e!==0)return _e}return 0}equals(b){if(b.type===this.type){if(this.expr.length!==b.expr.length)return!1;for(let S=0,W=this.expr.length;S<W;S++)if(!this.expr[S].equals(b.expr[S]))return!1;return!0}return!1}substituteConstants(){const b=ge(this.expr);return b===this.expr?this:Ue.create(b,this.negated)}evaluate(b){for(let S=0,W=this.expr.length;S<W;S++)if(!this.expr[S].evaluate(b))return!1;return!0}static _normalizeArr(b,S){const W=[];let _e=!1;for(const qe of b)if(qe){if(qe.type===1){_e=!0;continue}if(qe.type===0)return le.INSTANCE;if(qe.type===6){W.push(...qe.expr);continue}W.push(qe)}if(W.length===0&&_e)return O.INSTANCE;if(W.length!==0){if(W.length===1)return W[0];W.sort(o);for(let qe=1;qe<W.length;qe++)W[qe-1].equals(W[qe])&&(W.splice(qe,1),qe--);if(W.length===1)return W[0];for(;W.length>1;){const qe=W[W.length-1];if(qe.type!==9)break;W.pop();const mt=W.pop(),Gt=W.length===0,Qt=Je.create(qe.expr.map(sn=>Ue.create([sn,mt],null)),null,Gt);Qt&&(W.push(Qt),W.sort(o))}return W.length===1?W[0]:new Ue(W,S)}}serialize(){return this.expr.map(b=>b.serialize()).join(" && ")}keys(){const b=[];for(let S of this.expr)b.push(...S.keys());return b}negate(){if(!this.negated){const b=[];for(let S of this.expr)b.push(S.negate());this.negated=Je.create(b,this,!0)}return this.negated}}class Je{constructor(b,S){this.expr=b,this.negated=S,this.type=9}static create(b,S,W){return Je._normalizeArr(b,S,W)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.expr.length<b.expr.length)return-1;if(this.expr.length>b.expr.length)return 1;for(let S=0,W=this.expr.length;S<W;S++){const _e=o(this.expr[S],b.expr[S]);if(_e!==0)return _e}return 0}equals(b){if(b.type===this.type){if(this.expr.length!==b.expr.length)return!1;for(let S=0,W=this.expr.length;S<W;S++)if(!this.expr[S].equals(b.expr[S]))return!1;return!0}return!1}substituteConstants(){const b=ge(this.expr);return b===this.expr?this:Je.create(b,this.negated,!1)}evaluate(b){for(let S=0,W=this.expr.length;S<W;S++)if(this.expr[S].evaluate(b))return!0;return!1}static _normalizeArr(b,S,W){let _e=[],qe=!1;if(b){for(let mt=0,Gt=b.length;mt<Gt;mt++){const Qt=b[mt];if(Qt){if(Qt.type===0){qe=!0;continue}if(Qt.type===1)return O.INSTANCE;if(Qt.type===9){_e=_e.concat(Qt.expr);continue}_e.push(Qt)}}if(_e.length===0&&qe)return le.INSTANCE;_e.sort(o)}if(_e.length!==0){if(_e.length===1)return _e[0];for(let mt=1;mt<_e.length;mt++)_e[mt-1].equals(_e[mt])&&(_e.splice(mt,1),mt--);if(_e.length===1)return _e[0];if(W){for(let mt=0;mt<_e.length;mt++)for(let Gt=mt+1;Gt<_e.length;Gt++)se(_e[mt],_e[Gt])&&(_e.splice(Gt,1),Gt--);if(_e.length===1)return _e[0]}return new Je(_e,S)}}serialize(){return this.expr.map(b=>b.serialize()).join(" || ")}keys(){const b=[];for(let S of this.expr)b.push(...S.keys());return b}negate(){if(!this.negated){let b=[];for(let S of this.expr)b.push(S.negate());for(;b.length>1;){const S=b.shift(),W=b.shift(),_e=[];for(const mt of de(S))for(const Gt of de(W))_e.push(Ue.create([mt,Gt],null));const qe=b.length===0;b.unshift(Je.create(_e,null,qe))}this.negated=b[0]}return this.negated}}class Be extends B{constructor(b,S,W){super(b,null),this._defaultValue=S,typeof W=="object"?Be._info.push(Object.assign(Object.assign({},W),{key:b})):W!==!0&&Be._info.push({key:b,description:W,type:S!=null?typeof S:void 0})}static all(){return Be._info.values()}bindTo(b){return b.createKey(this.key,this._defaultValue)}getValue(b){return b.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(b){return E.create(this.key,b)}}Be._info=[];const nt=(0,He.yh)("contextKeyService"),ie="setContext";function Q(fe,b){return fe<b?-1:fe>b?1:0}function q(fe,b,S,W){return fe<S?-1:fe>S?1:b<W?-1:b>W?1:0}function se(fe,b){if(b.type===6&&fe.type!==9&&fe.type!==6){for(const _e of b.expr)if(fe.equals(_e))return!0}const S=fe.negate(),W=de(S).concat(de(b));W.sort(o);for(let _e=0;_e<W.length;_e++){const mt=W[_e].negate();for(let Gt=_e+1;Gt<W.length;Gt++){const Qt=W[Gt];if(mt.equals(Qt))return!0}}return!1}function de(fe){return fe.type===9?fe.expr:[fe]}},16925:function(kn,Ft,Y){"use strict";Y.d(Ft,{I8:function(){return re},TG:function(){return Te},jt:function(){return ne},yh:function(){return xe}});var re;(function(y){y.serviceIds=new Map,y.DI_TARGET="$di$target",y.DI_DEPENDENCIES="$di$dependencies";function Se(V){return V[y.DI_DEPENDENCIES]||[]}y.getServiceDependencies=Se})(re||(re={}));const Te=xe("instantiationService");function He(y,Se,V,o){Se[re.DI_TARGET]===Se?Se[re.DI_DEPENDENCIES].push({id:y,index:V,optional:o}):(Se[re.DI_DEPENDENCIES]=[{id:y,index:V,optional:o}],Se[re.DI_TARGET]=Se)}function xe(y){if(re.serviceIds.has(y))return re.serviceIds.get(y);const Se=function(V,o,le){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");He(Se,V,le,!1)};return Se.toString=()=>y,re.serviceIds.set(y,Se),Se}function ne(y){return function(Se,V,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");He(y,Se,o,!0)}}},44650:function(kn,Ft,Y){"use strict";Y.d(Ft,{B:function(){return xe}});var re=Y(76068),Te=Y(72999);class He{constructor(){this.data=new Map}add(y,Se){re.ok(Te.HD(y)),re.ok(Te.Kn(Se)),re.ok(!this.data.has(y),"There is already an extension with this id"),this.data.set(y,Se)}as(y){return this.data.get(y)||null}}const xe=new He},66213:function(kn,Ft,Y){"use strict";Y.d(Ft,{e:function(){return re}});var re;(function(Te){Te.DARK="dark",Te.LIGHT="light",Te.HIGH_CONTRAST="hc"})(re||(re={}))},49055:function(kn,Ft,Y){"use strict";Y.d(Ft,{EN:function(){return o},IP:function(){return B},Ic:function(){return L},XE:function(){return Se},bB:function(){return Ae},kS:function(){return le},m6:function(){return O}});var re=Y(52615),Te=Y(4348),He=Y(69323),xe=Y(16925),ne=Y(44650),y=Y(66213);const Se=(0,xe.yh)("themeService");var V;(function(Z){function J(H){return H&&typeof H=="object"&&typeof H.id=="string"}Z.isThemeColor=J})(V||(V={}));function o(Z){return{id:Z}}var le;(function(Z){function J(ke){return ke&&typeof ke=="object"&&typeof ke.id=="string"&&(typeof ke.color=="undefined"||V.isThemeColor(ke.color))}Z.isThemeIcon=J;const H=new RegExp(`^\\$\\((${re.dT.iconNameExpression}(?:${re.dT.iconModifierExpression})?)\\)$`);function z(ke){const ge=H.exec(ke);if(!ge)return;let[,Ue]=ge;return{id:Ue}}Z.fromString=z;function oe(ke,ge){let Ue=ke.id;const Je=Ue.lastIndexOf("~");return Je!==-1&&(Ue=Ue.substring(0,Je)),ge&&(Ue=`${Ue}~${ge}`),{id:Ue}}Z.modify=oe;function be(ke,ge){var Ue,Je;return ke.id===ge.id&&((Ue=ke.color)===null||Ue===void 0?void 0:Ue.id)===((Je=ge.color)===null||Je===void 0?void 0:Je.id)}Z.isEqual=be;function De(ke,ge){return{id:ke.id,color:ge?o(ge):void 0}}Z.asThemeIcon=De,Z.asClassNameArray=re.dT.asClassNameArray,Z.asClassName=re.dT.asClassName,Z.asCSSSelector=re.dT.asCSSSelector})(le||(le={}));function O(Z){switch(Z){case y.e.DARK:return"vs-dark";case y.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const B={ThemingContribution:"base.contributions.theming"};class E{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Te.Q5}onColorThemeChange(J){return this.themingParticipants.push(J),this.onThemingParticipantAddedEmitter.fire(J),(0,He.OF)(()=>{const H=this.themingParticipants.indexOf(J);this.themingParticipants.splice(H,1)})}getThemingParticipants(){return this.themingParticipants}}let F=new E;ne.B.add(B.ThemingContribution,F);function L(Z){return F.onColorThemeChange(Z)}class Ae extends He.JT{constructor(J){super(),this.themeService=J,this.theme=J.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(H=>this.onThemeChange(H)))}onThemeChange(J){this.theme=J,this.updateStyles()}updateStyles(){}}},16632:function(kn,Ft,Y){"use strict";var re=Y(54476),Te=Y(33885),He=Y(20068),xe=Y(42978),ne=Y(75931),y=Y(92310),Se=Y.n(y),V=Y(18929),o=Y(59301),le=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],O=(0,o.forwardRef)(function(B,E){var F=B.prefixCls,L=F===void 0?"rc-checkbox":F,Ae=B.className,Z=B.style,J=B.checked,H=B.disabled,z=B.defaultChecked,oe=z===void 0?!1:z,be=B.type,De=be===void 0?"checkbox":be,ke=B.title,ge=B.onChange,Ue=(0,ne.Z)(B,le),Je=(0,o.useRef)(null),Be=(0,o.useRef)(null),nt=(0,V.Z)(oe,{value:J}),ie=(0,xe.Z)(nt,2),Q=ie[0],q=ie[1];(0,o.useImperativeHandle)(E,function(){return{focus:function(b){var S;(S=Je.current)===null||S===void 0||S.focus(b)},blur:function(){var b;(b=Je.current)===null||b===void 0||b.blur()},input:Je.current,nativeElement:Be.current}});var se=Se()(L,Ae,(0,He.Z)((0,He.Z)({},"".concat(L,"-checked"),Q),"".concat(L,"-disabled"),H)),de=function(b){H||("checked"in B||q(b.target.checked),ge==null||ge({target:(0,Te.Z)((0,Te.Z)({},B),{},{type:De,checked:b.target.checked}),stopPropagation:function(){b.stopPropagation()},preventDefault:function(){b.preventDefault()},nativeEvent:b.nativeEvent}))};return o.createElement("span",{className:se,title:ke,style:Z,ref:Be},o.createElement("input",(0,re.Z)({},Ue,{className:"".concat(L,"-input"),ref:Je,onChange:de,disabled:H,checked:!!Q,type:De})),o.createElement("span",{className:"".concat(L,"-inner")}))});Ft.Z=O},96478:function(kn,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return ke}});var re=Y(54476),Te=Y(20068),He=Y(42978),xe=Y(75931),ne=Y(65030),y=Y(92310),Se=Y.n(y),V=Y(8654),o=Y(59301),le=Y(10228),O=Y(16089),B=le.Z.ESC,E=le.Z.TAB;function F(ge){var Ue=ge.visible,Je=ge.triggerRef,Be=ge.onVisibleChange,nt=ge.autoFocus,ie=ge.overlayRef,Q=o.useRef(!1),q=function(){if(Ue){var b,S;(b=Je.current)===null||b===void 0||(S=b.focus)===null||S===void 0||S.call(b),Be==null||Be(!1)}},se=function(){var b;return(b=ie.current)!==null&&b!==void 0&&b.focus?(ie.current.focus(),Q.current=!0,!0):!1},de=function(b){switch(b.keyCode){case B:q();break;case E:{var S=!1;Q.current||(S=se()),S?b.preventDefault():q();break}}};o.useEffect(function(){return Ue?(window.addEventListener("keydown",de),nt&&(0,O.Z)(se,3),function(){window.removeEventListener("keydown",de),Q.current=!1}):function(){Q.current=!1}},[Ue])}var L=(0,o.forwardRef)(function(ge,Ue){var Je=ge.overlay,Be=ge.arrow,nt=ge.prefixCls,ie=(0,o.useMemo)(function(){var q;return typeof Je=="function"?q=Je():q=Je,q},[Je]),Q=(0,V.sQ)(Ue,(0,V.C4)(ie));return o.createElement(o.Fragment,null,Be&&o.createElement("div",{className:"".concat(nt,"-arrow")}),o.cloneElement(ie,{ref:(0,V.Yr)(ie)?Q:void 0}))}),Ae=L,Z={adjustX:1,adjustY:1},J=[0,0],H={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:J},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:J},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:J},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:J},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:J},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:J}},z=H,oe=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function be(ge,Ue){var Je,Be=ge.arrow,nt=Be===void 0?!1:Be,ie=ge.prefixCls,Q=ie===void 0?"rc-dropdown":ie,q=ge.transitionName,se=ge.animation,de=ge.align,fe=ge.placement,b=fe===void 0?"bottomLeft":fe,S=ge.placements,W=S===void 0?z:S,_e=ge.getPopupContainer,qe=ge.showAction,mt=ge.hideAction,Gt=ge.overlayClassName,Qt=ge.overlayStyle,sn=ge.visible,Wt=ge.trigger,kt=Wt===void 0?["hover"]:Wt,Xe=ge.autoFocus,dt=ge.overlay,ot=ge.children,ft=ge.onVisibleChange,tn=(0,xe.Z)(ge,oe),Re=o.useState(),P=(0,He.Z)(Re,2),v=P[0],T=P[1],X="visible"in ge?sn:v,k=o.useRef(null),K=o.useRef(null),ce=o.useRef(null);o.useImperativeHandle(Ue,function(){return k.current});var Me=function(At){T(At),ft==null||ft(At)};F({visible:X,triggerRef:ce,onVisibleChange:Me,autoFocus:Xe,overlayRef:K});var We=function(At){var gt=ge.onOverlayClick;T(!1),gt&&gt(At)},lt=function(){return o.createElement(Ae,{ref:K,overlay:dt,prefixCls:Q,arrow:nt})},ht=function(){return typeof dt=="function"?lt:lt()},jt=function(){var At=ge.minOverlayWidthMatchTrigger,gt=ge.alignPoint;return"minOverlayWidthMatchTrigger"in ge?At:!gt},vt=function(){var At=ge.openClassName;return At!==void 0?At:"".concat(Q,"-open")},Rt=o.cloneElement(ot,{className:Se()((Je=ot.props)===null||Je===void 0?void 0:Je.className,X&&vt()),ref:(0,V.Yr)(ot)?(0,V.sQ)(ce,(0,V.C4)(ot)):void 0}),yt=mt;return!yt&&kt.indexOf("contextMenu")!==-1&&(yt=["click"]),o.createElement(ne.Z,(0,re.Z)({builtinPlacements:W},tn,{prefixCls:Q,ref:k,popupClassName:Se()(Gt,(0,Te.Z)({},"".concat(Q,"-show-arrow"),nt)),popupStyle:Qt,action:kt,showAction:qe,hideAction:yt,popupPlacement:b,popupAlign:de,popupTransitionName:q,popupAnimation:se,popupVisible:X,stretch:jt()?"minWidth":"",popup:ht(),onPopupVisibleChange:Me,onPopupClick:We,getPopupContainer:_e}),Rt)}var De=o.forwardRef(be),ke=De},20922:function(kn,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return kt}});var re=Y(54476),Te=Y(20068),He=Y(76190),xe=Y(42978),ne=Y(75931),y=Y(67732),Se=Y(83652);function V(){return typeof BigInt=="function"}function o(Xe){return!Xe&&Xe!==0&&!Number.isNaN(Xe)||!String(Xe).trim()}function le(Xe){var dt=Xe.trim(),ot=dt.startsWith("-");ot&&(dt=dt.slice(1)),dt=dt.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),dt.startsWith(".")&&(dt="0".concat(dt));var ft=dt||"0",tn=ft.split("."),Re=tn[0]||"0",P=tn[1]||"0";Re==="0"&&P==="0"&&(ot=!1);var v=ot?"-":"";return{negative:ot,negativeStr:v,trimStr:ft,integerStr:Re,decimalStr:P,fullStr:"".concat(v).concat(ft)}}function O(Xe){var dt=String(Xe);return!Number.isNaN(Number(dt))&&dt.includes("e")}function B(Xe){var dt=String(Xe);if(O(Xe)){var ot=Number(dt.slice(dt.indexOf("e-")+2)),ft=dt.match(/\.(\d+)/);return ft!=null&&ft[1]&&(ot+=ft[1].length),ot}return dt.includes(".")&&F(dt)?dt.length-dt.indexOf(".")-1:0}function E(Xe){var dt=String(Xe);if(O(Xe)){if(Xe>Number.MAX_SAFE_INTEGER)return String(V()?BigInt(Xe).toString():Number.MAX_SAFE_INTEGER);if(Xe<Number.MIN_SAFE_INTEGER)return String(V()?BigInt(Xe).toString():Number.MIN_SAFE_INTEGER);dt=Xe.toFixed(B(dt))}return le(dt).fullStr}function F(Xe){return typeof Xe=="number"?!Number.isNaN(Xe):Xe?/^\s*-?\d+(\.\d+)?\s*$/.test(Xe)||/^\s*-?\d+\.\s*$/.test(Xe)||/^\s*-?\.\d+\s*$/.test(Xe):!1}var L=function(){function Xe(dt){if((0,y.Z)(this,Xe),(0,Te.Z)(this,"origin",""),(0,Te.Z)(this,"negative",void 0),(0,Te.Z)(this,"integer",void 0),(0,Te.Z)(this,"decimal",void 0),(0,Te.Z)(this,"decimalLen",void 0),(0,Te.Z)(this,"empty",void 0),(0,Te.Z)(this,"nan",void 0),o(dt)){this.empty=!0;return}if(this.origin=String(dt),dt==="-"||Number.isNaN(dt)){this.nan=!0;return}var ot=dt;if(O(ot)&&(ot=Number(ot)),ot=typeof ot=="string"?ot:E(ot),F(ot)){var ft=le(ot);this.negative=ft.negative;var tn=ft.trimStr.split(".");this.integer=BigInt(tn[0]);var Re=tn[1]||"0";this.decimal=BigInt(Re),this.decimalLen=Re.length}else this.nan=!0}return(0,Se.Z)(Xe,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(ot){var ft="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(ot,"0"));return BigInt(ft)}},{key:"negate",value:function(){var ot=new Xe(this.toString());return ot.negative=!ot.negative,ot}},{key:"cal",value:function(ot,ft,tn){var Re=Math.max(this.getDecimalStr().length,ot.getDecimalStr().length),P=this.alignDecimal(Re),v=ot.alignDecimal(Re),T=ft(P,v).toString(),X=tn(Re),k=le(T),K=k.negativeStr,ce=k.trimStr,Me="".concat(K).concat(ce.padStart(X+1,"0"));return new Xe("".concat(Me.slice(0,-X),".").concat(Me.slice(-X)))}},{key:"add",value:function(ot){if(this.isInvalidate())return new Xe(ot);var ft=new Xe(ot);return ft.isInvalidate()?this:this.cal(ft,function(tn,Re){return tn+Re},function(tn){return tn})}},{key:"multi",value:function(ot){var ft=new Xe(ot);return this.isInvalidate()||ft.isInvalidate()?new Xe(NaN):this.cal(ft,function(tn,Re){return tn*Re},function(tn){return tn*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(ot){return this.toString()===(ot==null?void 0:ot.toString())}},{key:"lessEquals",value:function(ot){return this.add(ot.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ot?this.isInvalidate()?"":le("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Xe}(),Ae=function(){function Xe(dt){if((0,y.Z)(this,Xe),(0,Te.Z)(this,"origin",""),(0,Te.Z)(this,"number",void 0),(0,Te.Z)(this,"empty",void 0),o(dt)){this.empty=!0;return}this.origin=String(dt),this.number=Number(dt)}return(0,Se.Z)(Xe,[{key:"negate",value:function(){return new Xe(-this.toNumber())}},{key:"add",value:function(ot){if(this.isInvalidate())return new Xe(ot);var ft=Number(ot);if(Number.isNaN(ft))return this;var tn=this.number+ft;if(tn>Number.MAX_SAFE_INTEGER)return new Xe(Number.MAX_SAFE_INTEGER);if(tn<Number.MIN_SAFE_INTEGER)return new Xe(Number.MIN_SAFE_INTEGER);var Re=Math.max(B(this.number),B(ft));return new Xe(tn.toFixed(Re))}},{key:"multi",value:function(ot){var ft=Number(ot);if(this.isInvalidate()||Number.isNaN(ft))return new Xe(NaN);var tn=this.number*ft;if(tn>Number.MAX_SAFE_INTEGER)return new Xe(Number.MAX_SAFE_INTEGER);if(tn<Number.MIN_SAFE_INTEGER)return new Xe(Number.MIN_SAFE_INTEGER);var Re=Math.max(B(this.number),B(ft));return new Xe(tn.toFixed(Re))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(ot){return this.toNumber()===(ot==null?void 0:ot.toNumber())}},{key:"lessEquals",value:function(ot){return this.add(ot.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ot?this.isInvalidate()?"":E(this.number):this.origin}}]),Xe}();function Z(Xe){return V()?new L(Xe):new Ae(Xe)}function J(Xe,dt,ot){var ft=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Xe==="")return"";var tn=le(Xe),Re=tn.negativeStr,P=tn.integerStr,v=tn.decimalStr,T="".concat(dt).concat(v),X="".concat(Re).concat(P);if(ot>=0){var k=Number(v[ot]);if(k>=5&&!ft){var K=Z(Xe).add("".concat(Re,"0.").concat("0".repeat(ot)).concat(10-k));return J(K.toString(),dt,ot,ft)}return ot===0?X:"".concat(X).concat(dt).concat(v.padEnd(ot,"0").slice(0,ot))}return T===".0"?X:"".concat(X).concat(T)}var H=Z,z=Y(92310),oe=Y.n(z),be=Y(36901),De=Y(34280);function ke(Xe,dt){return typeof Proxy!="undefined"&&Xe?new Proxy(Xe,{get:function(ft,tn){if(dt[tn])return dt[tn];var Re=ft[tn];return typeof Re=="function"?Re.bind(ft):Re}}):Xe}var ge=Y(8654),Ue=Y(59301),Je=Y(48736);function Be(Xe,dt){var ot=(0,Ue.useRef)(null);function ft(){try{var Re=Xe.selectionStart,P=Xe.selectionEnd,v=Xe.value,T=v.substring(0,Re),X=v.substring(P);ot.current={start:Re,end:P,value:v,beforeTxt:T,afterTxt:X}}catch(k){}}function tn(){if(Xe&&ot.current&&dt)try{var Re=Xe.value,P=ot.current,v=P.beforeTxt,T=P.afterTxt,X=P.start,k=Re.length;if(Re.startsWith(v))k=v.length;else if(Re.endsWith(T))k=Re.length-ot.current.afterTxt.length;else{var K=v[X-1],ce=Re.indexOf(K,X-1);ce!==-1&&(k=ce+1)}Xe.setSelectionRange(k,k)}catch(Me){(0,Je.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Me.message))}}return[ft,tn]}var nt=Y(49658),ie=function(){var dt=(0,Ue.useState)(!1),ot=(0,xe.Z)(dt,2),ft=ot[0],tn=ot[1];return(0,De.Z)(function(){tn((0,nt.Z)())},[]),ft},Q=ie,q=Y(16089),se=200,de=600;function fe(Xe){var dt=Xe.prefixCls,ot=Xe.upNode,ft=Xe.downNode,tn=Xe.upDisabled,Re=Xe.downDisabled,P=Xe.onStep,v=Ue.useRef(),T=Ue.useRef([]),X=Ue.useRef();X.current=P;var k=function(){clearTimeout(v.current)},K=function(Rt,yt){Rt.preventDefault(),k(),X.current(yt);function xt(){X.current(yt),v.current=setTimeout(xt,se)}v.current=setTimeout(xt,de)};Ue.useEffect(function(){return function(){k(),T.current.forEach(function(vt){return q.Z.cancel(vt)})}},[]);var ce=Q();if(ce)return null;var Me="".concat(dt,"-handler"),We=oe()(Me,"".concat(Me,"-up"),(0,Te.Z)({},"".concat(Me,"-up-disabled"),tn)),lt=oe()(Me,"".concat(Me,"-down"),(0,Te.Z)({},"".concat(Me,"-down-disabled"),Re)),ht=function(){return T.current.push((0,q.Z)(k))},jt={unselectable:"on",role:"button",onMouseUp:ht,onMouseLeave:ht};return Ue.createElement("div",{className:"".concat(Me,"-wrap")},Ue.createElement("span",(0,re.Z)({},jt,{onMouseDown:function(Rt){K(Rt,!0)},"aria-label":"Increase Value","aria-disabled":tn,className:We}),ot||Ue.createElement("span",{unselectable:"on",className:"".concat(dt,"-handler-up-inner")})),Ue.createElement("span",(0,re.Z)({},jt,{onMouseDown:function(Rt){K(Rt,!1)},"aria-label":"Decrease Value","aria-disabled":Re,className:lt}),ft||Ue.createElement("span",{unselectable:"on",className:"".concat(dt,"-handler-down-inner")})))}function b(Xe){var dt=typeof Xe=="number"?E(Xe):le(Xe).fullStr,ot=dt.includes(".");return ot?le(dt.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Xe+"0"}var S=Y(30292),W=function(){var Xe=(0,Ue.useRef)(0),dt=function(){q.Z.cancel(Xe.current)};return(0,Ue.useEffect)(function(){return dt},[]),function(ot){dt(),Xe.current=(0,q.Z)(function(){ot()})}},_e=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],qe=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],mt=function(dt,ot){return dt||ot.isEmpty()?ot.toString():ot.toNumber()},Gt=function(dt){var ot=H(dt);return ot.isInvalidate()?null:ot},Qt=Ue.forwardRef(function(Xe,dt){var ot=Xe.prefixCls,ft=Xe.className,tn=Xe.style,Re=Xe.min,P=Xe.max,v=Xe.step,T=v===void 0?1:v,X=Xe.defaultValue,k=Xe.value,K=Xe.disabled,ce=Xe.readOnly,Me=Xe.upHandler,We=Xe.downHandler,lt=Xe.keyboard,ht=Xe.changeOnWheel,jt=ht===void 0?!1:ht,vt=Xe.controls,Rt=vt===void 0?!0:vt,yt=Xe.classNames,xt=Xe.stringMode,At=Xe.parser,gt=Xe.formatter,It=Xe.precision,Ht=Xe.decimalSeparator,un=Xe.onChange,Yt=Xe.onInput,_n=Xe.onPressEnter,on=Xe.onStep,Un=Xe.changeOnBlur,Gn=Un===void 0?!0:Un,dr=Xe.domRef,Xt=(0,ne.Z)(Xe,_e),Cn="".concat(ot,"-input"),Ge=Ue.useRef(null),Pe=Ue.useState(!1),Ie=(0,xe.Z)(Pe,2),ee=Ie[0],ue=Ie[1],me=Ue.useRef(!1),Fe=Ue.useRef(!1),Qe=Ue.useRef(!1),Tt=Ue.useState(function(){return H(k!=null?k:X)}),Kt=(0,xe.Z)(Tt,2),Lt=Kt[0],yn=Kt[1];function qn(Et){k===void 0&&yn(Et)}var or=Ue.useCallback(function(Et,bt){if(!bt)return It>=0?It:Math.max(B(Et),B(T))},[It,T]),cn=Ue.useCallback(function(Et){var bt=String(Et);if(At)return At(bt);var nn=bt;return Ht&&(nn=nn.replace(Ht,".")),nn.replace(/[^\w.-]+/g,"")},[At,Ht]),qt=Ue.useRef(""),fr=Ue.useCallback(function(Et,bt){if(gt)return gt(Et,{userTyping:bt,input:String(qt.current)});var nn=typeof Et=="number"?E(Et):Et;if(!bt){var vn=or(nn,bt);if(F(nn)&&(Ht||vn>=0)){var wn=Ht||".";nn=J(nn,wn,vn)}}return nn},[gt,or,Ht]),pr=Ue.useState(function(){var Et=X!=null?X:k;return Lt.isInvalidate()&&["string","number"].includes((0,He.Z)(Et))?Number.isNaN(Et)?"":Et:fr(Lt.toString(),!1)}),Ve=(0,xe.Z)(pr,2),lr=Ve[0],rr=Ve[1];qt.current=lr;function ir(Et,bt){rr(fr(Et.isInvalidate()?Et.toString(!1):Et.toString(!bt),bt))}var ri=Ue.useMemo(function(){return Gt(P)},[P,It]),Cr=Ue.useMemo(function(){return Gt(Re)},[Re,It]),li=Ue.useMemo(function(){return!ri||!Lt||Lt.isInvalidate()?!1:ri.lessEquals(Lt)},[ri,Lt]),Gr=Ue.useMemo(function(){return!Cr||!Lt||Lt.isInvalidate()?!1:Lt.lessEquals(Cr)},[Cr,Lt]),Ci=Be(Ge.current,ee),ii=(0,xe.Z)(Ci,2),pi=ii[0],es=ii[1],br=function(bt){return ri&&!bt.lessEquals(ri)?ri:Cr&&!Cr.lessEquals(bt)?Cr:null},Sr=function(bt){return!br(bt)},Nr=function(bt,nn){var vn=bt,wn=Sr(vn)||vn.isEmpty();if(!vn.isEmpty()&&!nn&&(vn=br(vn)||vn,wn=!0),!ce&&!K&&wn){var ur=vn.toString(),Dn=or(ur,nn);return Dn>=0&&(vn=H(J(ur,".",Dn)),Sr(vn)||(vn=H(J(ur,".",Dn,!0)))),vn.equals(Lt)||(qn(vn),un==null||un(vn.isEmpty()?null:mt(xt,vn)),k===void 0&&ir(vn,nn)),vn}return Lt},xi=W(),qr=function Et(bt){if(pi(),qt.current=bt,rr(bt),!Fe.current){var nn=cn(bt),vn=H(nn);vn.isNaN()||Nr(vn,!0)}Yt==null||Yt(bt),xi(function(){var wn=bt;At||(wn=bt.replace(/。/g,".")),wn!==bt&&Et(wn)})},Ki=function(){Fe.current=!0},Ti=function(){Fe.current=!1,qr(Ge.current.value)},Vn=function(bt){qr(bt.target.value)},Vt=function(bt){var nn;if(!(bt&&li||!bt&&Gr)){me.current=!1;var vn=H(Qe.current?b(T):T);bt||(vn=vn.negate());var wn=(Lt||H(0)).add(vn.toString()),ur=Nr(wn,!1);on==null||on(mt(xt,ur),{offset:Qe.current?b(T):T,type:bt?"up":"down"}),(nn=Ge.current)===null||nn===void 0||nn.focus()}},ze=function(bt){var nn=H(cn(lr)),vn;nn.isNaN()?vn=Nr(Lt,bt):vn=Nr(nn,bt),k!==void 0?ir(Lt,!1):vn.isNaN()||ir(vn,!1)},ut=function(){me.current=!0},Pt=function(bt){var nn=bt.key,vn=bt.shiftKey;me.current=!0,Qe.current=vn,nn==="Enter"&&(Fe.current||(me.current=!1),ze(!1),_n==null||_n(bt)),lt!==!1&&!Fe.current&&["Up","ArrowUp","Down","ArrowDown"].includes(nn)&&(Vt(nn==="Up"||nn==="ArrowUp"),bt.preventDefault())},St=function(){me.current=!1,Qe.current=!1};Ue.useEffect(function(){if(jt&&ee){var Et=function(vn){Vt(vn.deltaY<0),vn.preventDefault()},bt=Ge.current;if(bt)return bt.addEventListener("wheel",Et,{passive:!1}),function(){return bt.removeEventListener("wheel",Et)}}});var zt=function(){Gn&&ze(!1),ue(!1),me.current=!1};return(0,De.o)(function(){Lt.isInvalidate()||ir(Lt,!1)},[It,gt]),(0,De.o)(function(){var Et=H(k);yn(Et);var bt=H(cn(lr));(!Et.equals(bt)||!me.current||gt)&&ir(Et,me.current)},[k]),(0,De.o)(function(){gt&&es()},[lr]),Ue.createElement("div",{ref:dr,className:oe()(ot,ft,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(ot,"-focused"),ee),"".concat(ot,"-disabled"),K),"".concat(ot,"-readonly"),ce),"".concat(ot,"-not-a-number"),Lt.isNaN()),"".concat(ot,"-out-of-range"),!Lt.isInvalidate()&&!Sr(Lt))),style:tn,onFocus:function(){ue(!0)},onBlur:zt,onKeyDown:Pt,onKeyUp:St,onCompositionStart:Ki,onCompositionEnd:Ti,onBeforeInput:ut},Rt&&Ue.createElement(fe,{prefixCls:ot,upNode:Me,downNode:We,upDisabled:li,downDisabled:Gr,onStep:Vt}),Ue.createElement("div",{className:"".concat(Cn,"-wrap")},Ue.createElement("input",(0,re.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Re,"aria-valuemax":P,"aria-valuenow":Lt.isInvalidate()?null:Lt.toString(),step:T},Xt,{ref:(0,ge.sQ)(Ge,dt),className:Cn,value:lr,onChange:Vn,disabled:K,readOnly:ce}))))}),sn=Ue.forwardRef(function(Xe,dt){var ot=Xe.disabled,ft=Xe.style,tn=Xe.prefixCls,Re=tn===void 0?"rc-input-number":tn,P=Xe.value,v=Xe.prefix,T=Xe.suffix,X=Xe.addonBefore,k=Xe.addonAfter,K=Xe.className,ce=Xe.classNames,Me=(0,ne.Z)(Xe,qe),We=Ue.useRef(null),lt=Ue.useRef(null),ht=Ue.useRef(null),jt=function(Rt){ht.current&&(0,S.nH)(ht.current,Rt)};return Ue.useImperativeHandle(dt,function(){return ke(ht.current,{focus:jt,nativeElement:We.current.nativeElement||lt.current})}),Ue.createElement(be.BaseInput,{className:K,triggerFocus:jt,prefixCls:Re,value:P,disabled:ot,style:ft,prefix:v,suffix:T,addonAfter:k,addonBefore:X,classNames:ce,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:We},Ue.createElement(Qt,(0,re.Z)({prefixCls:Re,disabled:ot,ref:ht,domRef:lt,className:ce==null?void 0:ce.input},Me)))}),Wt=sn,kt=Wt},66003:function(kn,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return Se}});var re=Y(75931),Te=Y(33885),He=Y(76190),xe=Y(59301),ne=["show"];function y(V,o){if(!o.max)return!0;var le=o.strategy(V);return le<=o.max}function Se(V,o){return xe.useMemo(function(){var le={};o&&(le.show=(0,He.Z)(o)==="object"&&o.formatter?o.formatter:!!o),le=(0,Te.Z)((0,Te.Z)({},le),V);var O=le,B=O.show,E=(0,re.Z)(O,ne);return(0,Te.Z)((0,Te.Z)({},E),{},{show:!!B,showFormatter:typeof B=="function"?B:void 0,strategy:E.strategy||function(F){return F.length}})},[V,o])}},36901:function(kn,Ft,Y){"use strict";Y.r(Ft),Y.d(Ft,{BaseInput:function(){return le},default:function(){return z}});var re=Y(33885),Te=Y(54476),He=Y(20068),xe=Y(76190),ne=Y(92310),y=Y.n(ne),Se=Y(59301),V=Y(30292),o=Se.forwardRef(function(oe,be){var De,ke,ge,Ue=oe.inputElement,Je=oe.children,Be=oe.prefixCls,nt=oe.prefix,ie=oe.suffix,Q=oe.addonBefore,q=oe.addonAfter,se=oe.className,de=oe.style,fe=oe.disabled,b=oe.readOnly,S=oe.focused,W=oe.triggerFocus,_e=oe.allowClear,qe=oe.value,mt=oe.handleReset,Gt=oe.hidden,Qt=oe.classes,sn=oe.classNames,Wt=oe.dataAttrs,kt=oe.styles,Xe=oe.components,dt=oe.onClear,ot=Je!=null?Je:Ue,ft=(Xe==null?void 0:Xe.affixWrapper)||"span",tn=(Xe==null?void 0:Xe.groupWrapper)||"span",Re=(Xe==null?void 0:Xe.wrapper)||"span",P=(Xe==null?void 0:Xe.groupAddon)||"span",v=(0,Se.useRef)(null),T=function(Ht){var un;(un=v.current)!==null&&un!==void 0&&un.contains(Ht.target)&&(W==null||W())},X=(0,V.X3)(oe),k=(0,Se.cloneElement)(ot,{value:qe,className:y()((De=ot.props)===null||De===void 0?void 0:De.className,!X&&(sn==null?void 0:sn.variant))||null}),K=(0,Se.useRef)(null);if(Se.useImperativeHandle(be,function(){return{nativeElement:K.current||v.current}}),X){var ce=null;if(_e){var Me=!fe&&!b&&qe,We="".concat(Be,"-clear-icon"),lt=(0,xe.Z)(_e)==="object"&&_e!==null&&_e!==void 0&&_e.clearIcon?_e.clearIcon:"\u2716";ce=Se.createElement("button",{type:"button",tabIndex:-1,onClick:function(Ht){mt==null||mt(Ht),dt==null||dt()},onMouseDown:function(Ht){return Ht.preventDefault()},className:y()(We,(0,He.Z)((0,He.Z)({},"".concat(We,"-hidden"),!Me),"".concat(We,"-has-suffix"),!!ie))},lt)}var ht="".concat(Be,"-affix-wrapper"),jt=y()(ht,(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Be,"-disabled"),fe),"".concat(ht,"-disabled"),fe),"".concat(ht,"-focused"),S),"".concat(ht,"-readonly"),b),"".concat(ht,"-input-with-clear-btn"),ie&&_e&&qe),Qt==null?void 0:Qt.affixWrapper,sn==null?void 0:sn.affixWrapper,sn==null?void 0:sn.variant),vt=(ie||_e)&&Se.createElement("span",{className:y()("".concat(Be,"-suffix"),sn==null?void 0:sn.suffix),style:kt==null?void 0:kt.suffix},ce,ie);k=Se.createElement(ft,(0,Te.Z)({className:jt,style:kt==null?void 0:kt.affixWrapper,onClick:T},Wt==null?void 0:Wt.affixWrapper,{ref:v}),nt&&Se.createElement("span",{className:y()("".concat(Be,"-prefix"),sn==null?void 0:sn.prefix),style:kt==null?void 0:kt.prefix},nt),k,vt)}if((0,V.He)(oe)){var Rt="".concat(Be,"-group"),yt="".concat(Rt,"-addon"),xt="".concat(Rt,"-wrapper"),At=y()("".concat(Be,"-wrapper"),Rt,Qt==null?void 0:Qt.wrapper,sn==null?void 0:sn.wrapper),gt=y()(xt,(0,He.Z)({},"".concat(xt,"-disabled"),fe),Qt==null?void 0:Qt.group,sn==null?void 0:sn.groupWrapper);k=Se.createElement(tn,{className:gt,ref:K},Se.createElement(Re,{className:At},Q&&Se.createElement(P,{className:yt},Q),k,q&&Se.createElement(P,{className:yt},q)))}return Se.cloneElement(k,{className:y()((ke=k.props)===null||ke===void 0?void 0:ke.className,se)||null,style:(0,re.Z)((0,re.Z)({},(ge=k.props)===null||ge===void 0?void 0:ge.style),de),hidden:Gt})}),le=o,O=Y(94480),B=Y(42978),E=Y(75931),F=Y(18929),L=Y(2738),Ae=Y(66003),Z=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],J=(0,Se.forwardRef)(function(oe,be){var De=oe.autoComplete,ke=oe.onChange,ge=oe.onFocus,Ue=oe.onBlur,Je=oe.onPressEnter,Be=oe.onKeyDown,nt=oe.onKeyUp,ie=oe.prefixCls,Q=ie===void 0?"rc-input":ie,q=oe.disabled,se=oe.htmlSize,de=oe.className,fe=oe.maxLength,b=oe.suffix,S=oe.showCount,W=oe.count,_e=oe.type,qe=_e===void 0?"text":_e,mt=oe.classes,Gt=oe.classNames,Qt=oe.styles,sn=oe.onCompositionStart,Wt=oe.onCompositionEnd,kt=(0,E.Z)(oe,Z),Xe=(0,Se.useState)(!1),dt=(0,B.Z)(Xe,2),ot=dt[0],ft=dt[1],tn=(0,Se.useRef)(!1),Re=(0,Se.useRef)(!1),P=(0,Se.useRef)(null),v=(0,Se.useRef)(null),T=function(Cn){P.current&&(0,V.nH)(P.current,Cn)},X=(0,F.Z)(oe.defaultValue,{value:oe.value}),k=(0,B.Z)(X,2),K=k[0],ce=k[1],Me=K==null?"":String(K),We=(0,Se.useState)(null),lt=(0,B.Z)(We,2),ht=lt[0],jt=lt[1],vt=(0,Ae.Z)(W,S),Rt=vt.max||fe,yt=vt.strategy(Me),xt=!!Rt&&yt>Rt;(0,Se.useImperativeHandle)(be,function(){var Xt;return{focus:T,blur:function(){var Ge;(Ge=P.current)===null||Ge===void 0||Ge.blur()},setSelectionRange:function(Ge,Pe,Ie){var ee;(ee=P.current)===null||ee===void 0||ee.setSelectionRange(Ge,Pe,Ie)},select:function(){var Ge;(Ge=P.current)===null||Ge===void 0||Ge.select()},input:P.current,nativeElement:((Xt=v.current)===null||Xt===void 0?void 0:Xt.nativeElement)||P.current}}),(0,Se.useEffect)(function(){Re.current&&(Re.current=!1),ft(function(Xt){return Xt&&q?!1:Xt})},[q]);var At=function(Cn,Ge,Pe){var Ie=Ge;if(!tn.current&&vt.exceedFormatter&&vt.max&&vt.strategy(Ge)>vt.max){if(Ie=vt.exceedFormatter(Ge,{max:vt.max}),Ge!==Ie){var ee,ue;jt([((ee=P.current)===null||ee===void 0?void 0:ee.selectionStart)||0,((ue=P.current)===null||ue===void 0?void 0:ue.selectionEnd)||0])}}else if(Pe.source==="compositionEnd")return;ce(Ie),P.current&&(0,V.rJ)(P.current,Cn,ke,Ie)};(0,Se.useEffect)(function(){if(ht){var Xt;(Xt=P.current)===null||Xt===void 0||Xt.setSelectionRange.apply(Xt,(0,O.Z)(ht))}},[ht]);var gt=function(Cn){At(Cn,Cn.target.value,{source:"change"})},It=function(Cn){tn.current=!1,At(Cn,Cn.currentTarget.value,{source:"compositionEnd"}),Wt==null||Wt(Cn)},Ht=function(Cn){Je&&Cn.key==="Enter"&&!Re.current&&(Re.current=!0,Je(Cn)),Be==null||Be(Cn)},un=function(Cn){Cn.key==="Enter"&&(Re.current=!1),nt==null||nt(Cn)},Yt=function(Cn){ft(!0),ge==null||ge(Cn)},_n=function(Cn){Re.current&&(Re.current=!1),ft(!1),Ue==null||Ue(Cn)},on=function(Cn){ce(""),T(),P.current&&(0,V.rJ)(P.current,Cn,ke)},Un=xt&&"".concat(Q,"-out-of-range"),Gn=function(){var Cn=(0,L.Z)(oe,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Se.createElement("input",(0,Te.Z)({autoComplete:De},Cn,{onChange:gt,onFocus:Yt,onBlur:_n,onKeyDown:Ht,onKeyUp:un,className:y()(Q,(0,He.Z)({},"".concat(Q,"-disabled"),q),Gt==null?void 0:Gt.input),style:Qt==null?void 0:Qt.input,ref:P,size:se,type:qe,onCompositionStart:function(Pe){tn.current=!0,sn==null||sn(Pe)},onCompositionEnd:It}))},dr=function(){var Cn=Number(Rt)>0;if(b||vt.show){var Ge=vt.showFormatter?vt.showFormatter({value:Me,count:yt,maxLength:Rt}):"".concat(yt).concat(Cn?" / ".concat(Rt):"");return Se.createElement(Se.Fragment,null,vt.show&&Se.createElement("span",{className:y()("".concat(Q,"-show-count-suffix"),(0,He.Z)({},"".concat(Q,"-show-count-has-suffix"),!!b),Gt==null?void 0:Gt.count),style:(0,re.Z)({},Qt==null?void 0:Qt.count)},Ge),b)}return null};return Se.createElement(le,(0,Te.Z)({},kt,{prefixCls:Q,className:y()(de,Un),handleReset:on,value:Me,focused:ot,triggerFocus:T,suffix:dr(),disabled:q,classes:mt,classNames:Gt,styles:Qt}),Gn())}),H=J,z=H},30292:function(kn,Ft,Y){"use strict";Y.d(Ft,{He:function(){return re},X3:function(){return Te},nH:function(){return ne},rJ:function(){return xe}});function re(y){return!!(y.addonBefore||y.addonAfter)}function Te(y){return!!(y.prefix||y.suffix||y.allowClear)}function He(y,Se,V){var o=Se.cloneNode(!0),le=Object.create(y,{target:{value:o},currentTarget:{value:o}});return o.value=V,typeof Se.selectionStart=="number"&&typeof Se.selectionEnd=="number"&&(o.selectionStart=Se.selectionStart,o.selectionEnd=Se.selectionEnd),o.setSelectionRange=function(){Se.setSelectionRange.apply(Se,arguments)},le}function xe(y,Se,V,o){if(V){var le=Se;if(Se.type==="click"){le=He(Se,y,""),V(le);return}if(y.type!=="file"&&o!==void 0){le=He(Se,y,o),V(le);return}V(le)}}function ne(y,Se){if(y){y.focus(Se);var V=Se||{},o=V.cursor;if(o){var le=y.value.length;switch(o){case"start":y.setSelectionRange(0,0);break;case"end":y.setSelectionRange(le,le);break;default:y.setSelectionRange(0,le)}}}}},28321:function(kn,Ft,Y){"use strict";Y.d(Ft,{iz:function(){return Gr},ck:function(){return Ie},BW:function(){return es},sN:function(){return Ie},Wd:function(){return Cr},ZP:function(){return Vt},Xl:function(){return Je}});var re=Y(54476),Te=Y(20068),He=Y(33885),xe=Y(94480),ne=Y(42978),y=Y(75931),Se=Y(92310),V=Y.n(Se),o=Y(11780),le=Y(18929),O=Y(13697),B=Y(48736),E=Y(59301),F=Y(4676),L=E.createContext(null);function Ae(ze,ut){return ze===void 0?null:"".concat(ze,"-").concat(ut)}function Z(ze){var ut=E.useContext(L);return Ae(ut,ze)}var J=Y(80547),H=["children","locked"],z=E.createContext(null);function oe(ze,ut){var Pt=(0,He.Z)({},ze);return Object.keys(ut).forEach(function(St){var zt=ut[St];zt!==void 0&&(Pt[St]=zt)}),Pt}function be(ze){var ut=ze.children,Pt=ze.locked,St=(0,y.Z)(ze,H),zt=E.useContext(z),Et=(0,J.Z)(function(){return oe(zt,St)},[zt,St],function(bt,nn){return!Pt&&(bt[0]!==nn[0]||!(0,O.Z)(bt[1],nn[1],!0))});return E.createElement(z.Provider,{value:Et},ut)}var De=[],ke=E.createContext(null);function ge(){return E.useContext(ke)}var Ue=E.createContext(De);function Je(ze){var ut=E.useContext(Ue);return E.useMemo(function(){return ze!==void 0?[].concat((0,xe.Z)(ut),[ze]):ut},[ut,ze])}var Be=E.createContext(null),nt=E.createContext({}),ie=nt,Q=Y(29194);function q(ze){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,Q.Z)(ze)){var Pt=ze.nodeName.toLowerCase(),St=["input","select","textarea","button"].includes(Pt)||ze.isContentEditable||Pt==="a"&&!!ze.getAttribute("href"),zt=ze.getAttribute("tabindex"),Et=Number(zt),bt=null;return zt&&!Number.isNaN(Et)?bt=Et:St&&bt===null&&(bt=0),St&&ze.disabled&&(bt=null),bt!==null&&(bt>=0||ut&&bt<0)}return!1}function se(ze){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pt=(0,xe.Z)(ze.querySelectorAll("*")).filter(function(St){return q(St,ut)});return q(ze,ut)&&Pt.unshift(ze),Pt}var de=null;function fe(){de=document.activeElement}function b(){de=null}function S(){if(de)try{de.focus()}catch(ze){}}function W(ze,ut){if(ut.keyCode===9){var Pt=se(ze),St=Pt[ut.shiftKey?0:Pt.length-1],zt=St===document.activeElement||ze===document.activeElement;if(zt){var Et=Pt[ut.shiftKey?Pt.length-1:0];Et.focus(),ut.preventDefault()}}}var _e=Y(10228),qe=Y(16089),mt=_e.Z.LEFT,Gt=_e.Z.RIGHT,Qt=_e.Z.UP,sn=_e.Z.DOWN,Wt=_e.Z.ENTER,kt=_e.Z.ESC,Xe=_e.Z.HOME,dt=_e.Z.END,ot=[Qt,sn,mt,Gt];function ft(ze,ut,Pt,St){var zt,Et="prev",bt="next",nn="children",vn="parent";if(ze==="inline"&&St===Wt)return{inlineTrigger:!0};var wn=(0,Te.Z)((0,Te.Z)({},Qt,Et),sn,bt),ur=(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},mt,Pt?bt:Et),Gt,Pt?Et:bt),sn,nn),Wt,nn),Dn=(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},Qt,Et),sn,bt),Wt,nn),kt,vn),mt,Pt?nn:vn),Gt,Pt?vn:nn),Zn={inline:wn,horizontal:ur,vertical:Dn,inlineSub:wn,horizontalSub:Dn,verticalSub:Dn},M=(zt=Zn["".concat(ze).concat(ut?"":"Sub")])===null||zt===void 0?void 0:zt[St];switch(M){case Et:return{offset:-1,sibling:!0};case bt:return{offset:1,sibling:!0};case vn:return{offset:-1,sibling:!1};case nn:return{offset:1,sibling:!1};default:return null}}function tn(ze){for(var ut=ze;ut;){if(ut.getAttribute("data-menu-list"))return ut;ut=ut.parentElement}return null}function Re(ze,ut){for(var Pt=ze||document.activeElement;Pt;){if(ut.has(Pt))return Pt;Pt=Pt.parentElement}return null}function P(ze,ut){var Pt=se(ze,!0);return Pt.filter(function(St){return ut.has(St)})}function v(ze,ut,Pt){var St=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!ze)return null;var zt=P(ze,ut),Et=zt.length,bt=zt.findIndex(function(nn){return Pt===nn});return St<0?bt===-1?bt=Et-1:bt-=1:St>0&&(bt+=1),bt=(bt+Et)%Et,zt[bt]}var T=function(ut,Pt){var St=new Set,zt=new Map,Et=new Map;return ut.forEach(function(bt){var nn=document.querySelector("[data-menu-id='".concat(Ae(Pt,bt),"']"));nn&&(St.add(nn),Et.set(nn,bt),zt.set(bt,nn))}),{elements:St,key2element:zt,element2key:Et}};function X(ze,ut,Pt,St,zt,Et,bt,nn,vn,wn){var ur=E.useRef(),Dn=E.useRef();Dn.current=ut;var Zn=function(){qe.Z.cancel(ur.current)};return E.useEffect(function(){return function(){Zn()}},[]),function(M){var N=M.which;if([].concat(ot,[Wt,kt,Xe,dt]).includes(N)){var he=Et(),ve=T(he,St),Ke=ve,rt=Ke.elements,Bt=Ke.key2element,Ct=Ke.element2key,$t=Bt.get(ut),Ut=Re($t,rt),Le=Ct.get(Ut),st=ft(ze,bt(Le,!0).length===1,Pt,N);if(!st&&N!==Xe&&N!==dt)return;(ot.includes(N)||[Xe,dt].includes(N))&&M.preventDefault();var Ot=function(fn){if(fn){var dn=fn,$n=fn.querySelector("a");$n!=null&&$n.getAttribute("href")&&(dn=$n);var ar=Ct.get(fn);nn(ar),Zn(),ur.current=(0,qe.Z)(function(){Dn.current===ar&&dn.focus()})}};if([Xe,dt].includes(N)||st.sibling||!Ut){var mn;!Ut||ze==="inline"?mn=zt.current:mn=tn(Ut);var pn,en=P(mn,rt);N===Xe?pn=en[0]:N===dt?pn=en[en.length-1]:pn=v(mn,rt,Ut,st.offset),Ot(pn)}else if(st.inlineTrigger)vn(Le);else if(st.offset>0)vn(Le,!0),Zn(),ur.current=(0,qe.Z)(function(){ve=T(he,St);var Qn=Ut.getAttribute("aria-controls"),fn=document.getElementById(Qn),dn=v(fn,ve.elements);Ot(dn)},5);else if(st.offset<0){var ln=bt(Le,!0),an=ln[ln.length-2],En=Bt.get(an);vn(an,!1),Ot(En)}}wn==null||wn(M)}}function k(ze){Promise.resolve().then(ze)}var K="__RC_UTIL_PATH_SPLIT__",ce=function(ut){return ut.join(K)},Me=function(ut){return ut.split(K)},We="rc-menu-more";function lt(){var ze=E.useState({}),ut=(0,ne.Z)(ze,2),Pt=ut[1],St=(0,E.useRef)(new Map),zt=(0,E.useRef)(new Map),Et=E.useState([]),bt=(0,ne.Z)(Et,2),nn=bt[0],vn=bt[1],wn=(0,E.useRef)(0),ur=(0,E.useRef)(!1),Dn=function(){ur.current||Pt({})},Zn=(0,E.useCallback)(function(Bt,Ct){var $t=ce(Ct);zt.current.set($t,Bt),St.current.set(Bt,$t),wn.current+=1;var Ut=wn.current;k(function(){Ut===wn.current&&Dn()})},[]),M=(0,E.useCallback)(function(Bt,Ct){var $t=ce(Ct);zt.current.delete($t),St.current.delete(Bt)},[]),N=(0,E.useCallback)(function(Bt){vn(Bt)},[]),he=(0,E.useCallback)(function(Bt,Ct){var $t=St.current.get(Bt)||"",Ut=Me($t);return Ct&&nn.includes(Ut[0])&&Ut.unshift(We),Ut},[nn]),ve=(0,E.useCallback)(function(Bt,Ct){return Bt.filter(function($t){return $t!==void 0}).some(function($t){var Ut=he($t,!0);return Ut.includes(Ct)})},[he]),Ke=function(){var Ct=(0,xe.Z)(St.current.keys());return nn.length&&Ct.push(We),Ct},rt=(0,E.useCallback)(function(Bt){var Ct="".concat(St.current.get(Bt)).concat(K),$t=new Set;return(0,xe.Z)(zt.current.keys()).forEach(function(Ut){Ut.startsWith(Ct)&&$t.add(zt.current.get(Ut))}),$t},[]);return E.useEffect(function(){return function(){ur.current=!0}},[]),{registerPath:Zn,unregisterPath:M,refreshOverflowKeys:N,isSubPathKey:ve,getKeyPath:he,getKeys:Ke,getSubPathKeys:rt}}function ht(ze){var ut=E.useRef(ze);ut.current=ze;var Pt=E.useCallback(function(){for(var St,zt=arguments.length,Et=new Array(zt),bt=0;bt<zt;bt++)Et[bt]=arguments[bt];return(St=ut.current)===null||St===void 0?void 0:St.call.apply(St,[ut].concat(Et))},[]);return ze?Pt:void 0}var jt=Math.random().toFixed(5).toString().slice(2),vt=0;function Rt(ze){var ut=(0,le.Z)(ze,{value:ze}),Pt=(0,ne.Z)(ut,2),St=Pt[0],zt=Pt[1];return E.useEffect(function(){vt+=1;var Et="".concat(jt,"-").concat(vt);zt("rc-menu-uuid-".concat(Et))},[]),St}var yt=Y(67732),xt=Y(83652),At=Y(42403),gt=Y(158),It=Y(2738),Ht=Y(8654);function un(ze,ut,Pt,St){var zt=E.useContext(z),Et=zt.activeKey,bt=zt.onActive,nn=zt.onInactive,vn={active:Et===ze};return ut||(vn.onMouseEnter=function(wn){Pt==null||Pt({key:ze,domEvent:wn}),bt(ze)},vn.onMouseLeave=function(wn){St==null||St({key:ze,domEvent:wn}),nn(ze)}),vn}function Yt(ze){var ut=E.useContext(z),Pt=ut.mode,St=ut.rtl,zt=ut.inlineIndent;if(Pt!=="inline")return null;var Et=ze;return St?{paddingRight:Et*zt}:{paddingLeft:Et*zt}}function _n(ze){var ut=ze.icon,Pt=ze.props,St=ze.children,zt;return ut===null||ut===!1?null:(typeof ut=="function"?zt=E.createElement(ut,(0,He.Z)({},Pt)):typeof ut!="boolean"&&(zt=ut),zt||St||null)}var on=["item"];function Un(ze){var ut=ze.item,Pt=(0,y.Z)(ze,on);return Object.defineProperty(Pt,"item",{get:function(){return(0,B.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),ut}}),Pt}var Gn=["title","attribute","elementRef"],dr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Xt=["active"],Cn=function(ze){(0,At.Z)(Pt,ze);var ut=(0,gt.Z)(Pt);function Pt(){return(0,yt.Z)(this,Pt),ut.apply(this,arguments)}return(0,xt.Z)(Pt,[{key:"render",value:function(){var zt=this.props,Et=zt.title,bt=zt.attribute,nn=zt.elementRef,vn=(0,y.Z)(zt,Gn),wn=(0,It.Z)(vn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,B.ZP)(!bt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),E.createElement(o.Z.Item,(0,re.Z)({},bt,{title:typeof Et=="string"?Et:void 0},wn,{ref:nn}))}}]),Pt}(E.Component),Ge=E.forwardRef(function(ze,ut){var Pt=ze.style,St=ze.className,zt=ze.eventKey,Et=ze.warnKey,bt=ze.disabled,nn=ze.itemIcon,vn=ze.children,wn=ze.role,ur=ze.onMouseEnter,Dn=ze.onMouseLeave,Zn=ze.onClick,M=ze.onKeyDown,N=ze.onFocus,he=(0,y.Z)(ze,dr),ve=Z(zt),Ke=E.useContext(z),rt=Ke.prefixCls,Bt=Ke.onItemClick,Ct=Ke.disabled,$t=Ke.overflowDisabled,Ut=Ke.itemIcon,Le=Ke.selectedKeys,st=Ke.onActive,Ot=E.useContext(ie),mn=Ot._internalRenderMenuItem,pn="".concat(rt,"-item"),en=E.useRef(),ln=E.useRef(),an=Ct||bt,En=(0,Ht.x1)(ut,ln),Qn=Je(zt),fn=function(cr){return{key:zt,keyPath:(0,xe.Z)(Qn).reverse(),item:en.current,domEvent:cr}},dn=nn||Ut,$n=un(zt,an,ur,Dn),ar=$n.active,Kn=(0,y.Z)($n,Xt),Rn=Le.includes(zt),hr=Yt(Qn.length),er=function(cr){if(!an){var Fr=fn(cr);Zn==null||Zn(Un(Fr)),Bt(Fr)}},_r=function(cr){if(M==null||M(cr),cr.which===_e.Z.ENTER){var Fr=fn(cr);Zn==null||Zn(Un(Fr)),Bt(Fr)}},Rr=function(cr){st(zt),N==null||N(cr)},Yr={};ze.role==="option"&&(Yr["aria-selected"]=Rn);var kr=E.createElement(Cn,(0,re.Z)({ref:en,elementRef:En,role:wn===null?"none":wn||"menuitem",tabIndex:bt?null:-1,"data-menu-id":$t&&ve?null:ve},(0,It.Z)(he,["extra"]),Kn,Yr,{component:"li","aria-disabled":bt,style:(0,He.Z)((0,He.Z)({},hr),Pt),className:V()(pn,(0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(pn,"-active"),ar),"".concat(pn,"-selected"),Rn),"".concat(pn,"-disabled"),an),St),onClick:er,onKeyDown:_r,onFocus:Rr}),vn,E.createElement(_n,{props:(0,He.Z)((0,He.Z)({},ze),{},{isSelected:Rn}),icon:dn}));return mn&&(kr=mn(kr,ze,{selected:Rn})),kr});function Pe(ze,ut){var Pt=ze.eventKey,St=ge(),zt=Je(Pt);return E.useEffect(function(){if(St)return St.registerPath(Pt,zt),function(){St.unregisterPath(Pt,zt)}},[zt]),St?null:E.createElement(Ge,(0,re.Z)({},ze,{ref:ut}))}var Ie=E.forwardRef(Pe),ee=["className","children"],ue=function(ut,Pt){var St=ut.className,zt=ut.children,Et=(0,y.Z)(ut,ee),bt=E.useContext(z),nn=bt.prefixCls,vn=bt.mode,wn=bt.rtl;return E.createElement("ul",(0,re.Z)({className:V()(nn,wn&&"".concat(nn,"-rtl"),"".concat(nn,"-sub"),"".concat(nn,"-").concat(vn==="inline"?"inline":"vertical"),St),role:"menu"},Et,{"data-menu-list":!0,ref:Pt}),zt)},me=E.forwardRef(ue);me.displayName="SubMenuList";var Fe=me,Qe=Y(11592);function Tt(ze,ut){return(0,Qe.Z)(ze).map(function(Pt,St){if(E.isValidElement(Pt)){var zt,Et,bt=Pt.key,nn=(zt=(Et=Pt.props)===null||Et===void 0?void 0:Et.eventKey)!==null&&zt!==void 0?zt:bt,vn=nn==null;vn&&(nn="tmp_key-".concat([].concat((0,xe.Z)(ut),[St]).join("-")));var wn={key:nn,eventKey:nn};return E.cloneElement(Pt,wn)}return Pt})}var Kt=Y(65030),Lt={adjustX:1,adjustY:1},yn={topLeft:{points:["bl","tl"],overflow:Lt},topRight:{points:["br","tr"],overflow:Lt},bottomLeft:{points:["tl","bl"],overflow:Lt},bottomRight:{points:["tr","br"],overflow:Lt},leftTop:{points:["tr","tl"],overflow:Lt},leftBottom:{points:["br","bl"],overflow:Lt},rightTop:{points:["tl","tr"],overflow:Lt},rightBottom:{points:["bl","br"],overflow:Lt}},qn={topLeft:{points:["bl","tl"],overflow:Lt},topRight:{points:["br","tr"],overflow:Lt},bottomLeft:{points:["tl","bl"],overflow:Lt},bottomRight:{points:["tr","br"],overflow:Lt},rightTop:{points:["tr","tl"],overflow:Lt},rightBottom:{points:["br","bl"],overflow:Lt},leftTop:{points:["tl","tr"],overflow:Lt},leftBottom:{points:["bl","br"],overflow:Lt}},or=null;function cn(ze,ut,Pt){if(ut)return ut;if(Pt)return Pt[ze]||Pt.other}var qt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function fr(ze){var ut=ze.prefixCls,Pt=ze.visible,St=ze.children,zt=ze.popup,Et=ze.popupStyle,bt=ze.popupClassName,nn=ze.popupOffset,vn=ze.disabled,wn=ze.mode,ur=ze.onVisibleChange,Dn=E.useContext(z),Zn=Dn.getPopupContainer,M=Dn.rtl,N=Dn.subMenuOpenDelay,he=Dn.subMenuCloseDelay,ve=Dn.builtinPlacements,Ke=Dn.triggerSubMenuAction,rt=Dn.forceSubMenuRender,Bt=Dn.rootClassName,Ct=Dn.motion,$t=Dn.defaultMotions,Ut=E.useState(!1),Le=(0,ne.Z)(Ut,2),st=Le[0],Ot=Le[1],mn=M?(0,He.Z)((0,He.Z)({},qn),ve):(0,He.Z)((0,He.Z)({},yn),ve),pn=qt[wn],en=cn(wn,Ct,$t),ln=E.useRef(en);wn!=="inline"&&(ln.current=en);var an=(0,He.Z)((0,He.Z)({},ln.current),{},{leavedClassName:"".concat(ut,"-hidden"),removeOnLeave:!1,motionAppear:!0}),En=E.useRef();return E.useEffect(function(){return En.current=(0,qe.Z)(function(){Ot(Pt)}),function(){qe.Z.cancel(En.current)}},[Pt]),E.createElement(Kt.Z,{prefixCls:ut,popupClassName:V()("".concat(ut,"-popup"),(0,Te.Z)({},"".concat(ut,"-rtl"),M),bt,Bt),stretch:wn==="horizontal"?"minWidth":null,getPopupContainer:Zn,builtinPlacements:mn,popupPlacement:pn,popupVisible:st,popup:zt,popupStyle:Et,popupAlign:nn&&{offset:nn},action:vn?[]:[Ke],mouseEnterDelay:N,mouseLeaveDelay:he,onPopupVisibleChange:ur,forceRender:rt,popupMotion:an,fresh:!0},St)}var pr=Y(77900);function Ve(ze){var ut=ze.id,Pt=ze.open,St=ze.keyPath,zt=ze.children,Et="inline",bt=E.useContext(z),nn=bt.prefixCls,vn=bt.forceSubMenuRender,wn=bt.motion,ur=bt.defaultMotions,Dn=bt.mode,Zn=E.useRef(!1);Zn.current=Dn===Et;var M=E.useState(!Zn.current),N=(0,ne.Z)(M,2),he=N[0],ve=N[1],Ke=Zn.current?Pt:!1;E.useEffect(function(){Zn.current&&ve(!1)},[Dn]);var rt=(0,He.Z)({},cn(Et,wn,ur));St.length>1&&(rt.motionAppear=!1);var Bt=rt.onVisibleChanged;return rt.onVisibleChanged=function(Ct){return!Zn.current&&!Ct&&ve(!0),Bt==null?void 0:Bt(Ct)},he?null:E.createElement(be,{mode:Et,locked:!Zn.current},E.createElement(pr.default,(0,re.Z)({visible:Ke},rt,{forceRender:vn,removeOnLeave:!1,leavedClassName:"".concat(nn,"-hidden")}),function(Ct){var $t=Ct.className,Ut=Ct.style;return E.createElement(Fe,{id:ut,className:$t,style:Ut},zt)}))}var lr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],rr=["active"],ir=E.forwardRef(function(ze,ut){var Pt=ze.style,St=ze.className,zt=ze.title,Et=ze.eventKey,bt=ze.warnKey,nn=ze.disabled,vn=ze.internalPopupClose,wn=ze.children,ur=ze.itemIcon,Dn=ze.expandIcon,Zn=ze.popupClassName,M=ze.popupOffset,N=ze.popupStyle,he=ze.onClick,ve=ze.onMouseEnter,Ke=ze.onMouseLeave,rt=ze.onTitleClick,Bt=ze.onTitleMouseEnter,Ct=ze.onTitleMouseLeave,$t=(0,y.Z)(ze,lr),Ut=Z(Et),Le=E.useContext(z),st=Le.prefixCls,Ot=Le.mode,mn=Le.openKeys,pn=Le.disabled,en=Le.overflowDisabled,ln=Le.activeKey,an=Le.selectedKeys,En=Le.itemIcon,Qn=Le.expandIcon,fn=Le.onItemClick,dn=Le.onOpenChange,$n=Le.onActive,ar=E.useContext(ie),Kn=ar._internalRenderSubMenuItem,Rn=E.useContext(Be),hr=Rn.isSubPathKey,er=Je(),_r="".concat(st,"-submenu"),Rr=pn||nn,Yr=E.useRef(),kr=E.useRef(),Ir=ur!=null?ur:En,cr=Dn!=null?Dn:Qn,Fr=mn.includes(Et),Dr=!en&&Fr,Ri=hr(an,Et),Vr=un(Et,Rr,Bt,Ct),Wr=Vr.active,Lr=(0,y.Z)(Vr,rr),Ai=E.useState(!1),Hr=(0,ne.Z)(Ai,2),Ei=Hr[0],Ii=Hr[1],Yn=function(Mi){Rr||Ii(Mi)},ts=function(Mi){Yn(!0),ve==null||ve({key:Et,domEvent:Mi})},As=function(Mi){Yn(!1),Ke==null||Ke({key:Et,domEvent:Mi})},ki=E.useMemo(function(){return Wr||(Ot!=="inline"?Ei||hr([ln],Et):!1)},[Ot,Wr,ln,Ei,Et,hr]),Si=Yt(er.length),$i=function(Mi){Rr||(rt==null||rt({key:Et,domEvent:Mi}),Ot==="inline"&&dn(Et,!Fr))},_s=ht(function(hi){he==null||he(Un(hi)),fn(hi)}),xs=function(Mi){Ot!=="inline"&&dn(Et,Mi)},ei=function(){$n(Et)},ds=Ut&&"".concat(Ut,"-popup"),ns=E.useMemo(function(){return E.createElement(_n,{icon:Ot!=="horizontal"?cr:void 0,props:(0,He.Z)((0,He.Z)({},ze),{},{isOpen:Dr,isSubMenu:!0})},E.createElement("i",{className:"".concat(_r,"-arrow")}))},[Ot,cr,ze,Dr,_r]),Gi=E.createElement("div",(0,re.Z)({role:"menuitem",style:Si,className:"".concat(_r,"-title"),tabIndex:Rr?null:-1,ref:Yr,title:typeof zt=="string"?zt:null,"data-menu-id":en&&Ut?null:Ut,"aria-expanded":Dr,"aria-haspopup":!0,"aria-controls":ds,"aria-disabled":Rr,onClick:$i,onFocus:ei},Lr),zt,ns),qi=E.useRef(Ot);if(Ot!=="inline"&&er.length>1?qi.current="vertical":qi.current=Ot,!en){var Ss=qi.current;Gi=E.createElement(fr,{mode:Ss,prefixCls:_r,visible:!vn&&Dr&&Ot!=="inline",popupClassName:Zn,popupOffset:M,popupStyle:N,popup:E.createElement(be,{mode:Ss==="horizontal"?"vertical":Ss},E.createElement(Fe,{id:ds,ref:kr},wn)),disabled:Rr,onVisibleChange:xs},Gi)}var Pi=E.createElement(o.Z.Item,(0,re.Z)({ref:ut,role:"none"},$t,{component:"li",style:Pt,className:V()(_r,"".concat(_r,"-").concat(Ot),St,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(_r,"-open"),Dr),"".concat(_r,"-active"),ki),"".concat(_r,"-selected"),Ri),"".concat(_r,"-disabled"),Rr)),onMouseEnter:ts,onMouseLeave:As}),Gi,!en&&E.createElement(Ve,{id:ds,open:Dr,keyPath:er},wn));return Kn&&(Pi=Kn(Pi,ze,{selected:Ri,active:ki,open:Dr,disabled:Rr})),E.createElement(be,{onItemClick:_s,mode:Ot==="horizontal"?"vertical":Ot,itemIcon:Ir,expandIcon:cr},Pi)}),ri=E.forwardRef(function(ze,ut){var Pt=ze.eventKey,St=ze.children,zt=Je(Pt),Et=Tt(St,zt),bt=ge();E.useEffect(function(){if(bt)return bt.registerPath(Pt,zt),function(){bt.unregisterPath(Pt,zt)}},[zt]);var nn;return bt?nn=Et:nn=E.createElement(ir,(0,re.Z)({ref:ut},ze),Et),E.createElement(Ue.Provider,{value:zt},nn)}),Cr=ri,li=Y(76190);function Gr(ze){var ut=ze.className,Pt=ze.style,St=E.useContext(z),zt=St.prefixCls,Et=ge();return Et?null:E.createElement("li",{role:"separator",className:V()("".concat(zt,"-item-divider"),ut),style:Pt})}var Ci=["className","title","eventKey","children"],ii=E.forwardRef(function(ze,ut){var Pt=ze.className,St=ze.title,zt=ze.eventKey,Et=ze.children,bt=(0,y.Z)(ze,Ci),nn=E.useContext(z),vn=nn.prefixCls,wn="".concat(vn,"-item-group");return E.createElement("li",(0,re.Z)({ref:ut,role:"presentation"},bt,{onClick:function(Dn){return Dn.stopPropagation()},className:V()(wn,Pt)}),E.createElement("div",{role:"presentation",className:"".concat(wn,"-title"),title:typeof St=="string"?St:void 0},St),E.createElement("ul",{role:"group",className:"".concat(wn,"-list")},Et))}),pi=E.forwardRef(function(ze,ut){var Pt=ze.eventKey,St=ze.children,zt=Je(Pt),Et=Tt(St,zt),bt=ge();return bt?Et:E.createElement(ii,(0,re.Z)({ref:ut},(0,It.Z)(ze,["warnKey"])),Et)}),es=pi,br=["label","children","key","type","extra"];function Sr(ze,ut,Pt){var St=ut.item,zt=ut.group,Et=ut.submenu,bt=ut.divider;return(ze||[]).map(function(nn,vn){if(nn&&(0,li.Z)(nn)==="object"){var wn=nn,ur=wn.label,Dn=wn.children,Zn=wn.key,M=wn.type,N=wn.extra,he=(0,y.Z)(wn,br),ve=Zn!=null?Zn:"tmp-".concat(vn);return Dn||M==="group"?M==="group"?E.createElement(zt,(0,re.Z)({key:ve},he,{title:ur}),Sr(Dn,ut,Pt)):E.createElement(Et,(0,re.Z)({key:ve},he,{title:ur}),Sr(Dn,ut,Pt)):M==="divider"?E.createElement(bt,(0,re.Z)({key:ve},he)):E.createElement(St,(0,re.Z)({key:ve},he,{extra:N}),ur,(!!N||N===0)&&E.createElement("span",{className:"".concat(Pt,"-item-extra")},N))}return null}).filter(function(nn){return nn})}function Nr(ze,ut,Pt,St,zt){var Et=ze,bt=(0,He.Z)({divider:Gr,item:Ie,group:es,submenu:Cr},St);return ut&&(Et=Sr(ut,bt,zt)),Tt(Et,Pt)}var xi=["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"],qr=[],Ki=E.forwardRef(function(ze,ut){var Pt,St=ze,zt=St.prefixCls,Et=zt===void 0?"rc-menu":zt,bt=St.rootClassName,nn=St.style,vn=St.className,wn=St.tabIndex,ur=wn===void 0?0:wn,Dn=St.items,Zn=St.children,M=St.direction,N=St.id,he=St.mode,ve=he===void 0?"vertical":he,Ke=St.inlineCollapsed,rt=St.disabled,Bt=St.disabledOverflow,Ct=St.subMenuOpenDelay,$t=Ct===void 0?.1:Ct,Ut=St.subMenuCloseDelay,Le=Ut===void 0?.1:Ut,st=St.forceSubMenuRender,Ot=St.defaultOpenKeys,mn=St.openKeys,pn=St.activeKey,en=St.defaultActiveFirst,ln=St.selectable,an=ln===void 0?!0:ln,En=St.multiple,Qn=En===void 0?!1:En,fn=St.defaultSelectedKeys,dn=St.selectedKeys,$n=St.onSelect,ar=St.onDeselect,Kn=St.inlineIndent,Rn=Kn===void 0?24:Kn,hr=St.motion,er=St.defaultMotions,_r=St.triggerSubMenuAction,Rr=_r===void 0?"hover":_r,Yr=St.builtinPlacements,kr=St.itemIcon,Ir=St.expandIcon,cr=St.overflowedIndicator,Fr=cr===void 0?"...":cr,Dr=St.overflowedIndicatorPopupClassName,Ri=St.getPopupContainer,Vr=St.onClick,Wr=St.onOpenChange,Lr=St.onKeyDown,Ai=St.openAnimation,Hr=St.openTransitionName,Ei=St._internalRenderMenuItem,Ii=St._internalRenderSubMenuItem,Yn=St._internalComponents,ts=(0,y.Z)(St,xi),As=E.useMemo(function(){return[Nr(Zn,Dn,qr,Yn,Et),Nr(Zn,Dn,qr,{},Et)]},[Zn,Dn,Yn]),ki=(0,ne.Z)(As,2),Si=ki[0],$i=ki[1],_s=E.useState(!1),xs=(0,ne.Z)(_s,2),ei=xs[0],ds=xs[1],ns=E.useRef(),Gi=Rt(N),qi=M==="rtl",Ss=(0,le.Z)(Ot,{value:mn,postState:function(ni){return ni||qr}}),Pi=(0,ne.Z)(Ss,2),hi=Pi[0],Mi=Pi[1],Vi=function(ni){var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Li(){Mi(ni),Wr==null||Wr(ni)}ui?(0,F.flushSync)(Li):Li()},Wi=E.useState(hi),vs=(0,ne.Z)(Wi,2),Qs=vs[0],Os=vs[1],os=E.useRef(!1),Qr=E.useMemo(function(){return(ve==="inline"||ve==="vertical")&&Ke?["vertical",Ke]:[ve,!1]},[ve,Ke]),Ln=(0,ne.Z)(Qr,2),Bn=Ln[0],vr=Ln[1],ti=Bn==="inline",Pr=E.useState(Bn),ys=(0,ne.Z)(Pr,2),Qi=ys[0],Bi=ys[1],Ys=E.useState(vr),Di=(0,ne.Z)(Ys,2),Ga=Di[0],ws=Di[1];E.useEffect(function(){Bi(Bn),ws(vr),os.current&&(ti?Mi(Qs):Vi(qr))},[Bn,vr]);var rs=E.useState(0),oi=(0,ne.Z)(rs,2),js=oi[0],La=oi[1],ia=js>=Si.length-1||Qi!=="horizontal"||Bt;E.useEffect(function(){ti&&Os(hi)},[hi]),E.useEffect(function(){return os.current=!0,function(){os.current=!1}},[]);var Es=lt(),pa=Es.registerPath,gs=Es.unregisterPath,Va=Es.refreshOverflowKeys,ls=Es.isSubPathKey,Ks=Es.getKeyPath,is=Es.getKeys,Ni=Es.getSubPathKeys,Fs=E.useMemo(function(){return{registerPath:pa,unregisterPath:gs}},[pa,gs]),Wa=E.useMemo(function(){return{isSubPathKey:ls}},[ls]);E.useEffect(function(){Va(ia?qr:Si.slice(js+1).map(function(mi){return mi.key}))},[js,ia]);var ma=(0,le.Z)(pn||en&&((Pt=Si[0])===null||Pt===void 0?void 0:Pt.key),{value:pn}),_a=(0,ne.Z)(ma,2),Ts=_a[0],zi=_a[1],sa=ht(function(mi){zi(mi)}),Bs=ht(function(){zi(void 0)});(0,E.useImperativeHandle)(ut,function(){return{list:ns.current,focus:function(ni){var ui,Li=is(),Fi=T(Li,Gi),Gs=Fi.elements,Aa=Fi.key2element,Ua=Fi.element2key,Ra=P(ns.current,Gs),Ps=Ts!=null?Ts:Ra[0]?Ua.get(Ra[0]):(ui=Si.find(function(oa){return!oa.props.disabled}))===null||ui===void 0?void 0:ui.key,Oi=Aa.get(Ps);if(Ps&&Oi){var Zi;Oi==null||(Zi=Oi.focus)===null||Zi===void 0||Zi.call(Oi,ni)}}}});var us=(0,le.Z)(fn||[],{value:dn,postState:function(ni){return Array.isArray(ni)?ni:ni==null?qr:[ni]}}),za=(0,ne.Z)(us,2),$s=za[0],gA=za[1],pA=function(ni){if(an){var ui=ni.key,Li=$s.includes(ui),Fi;Qn?Li?Fi=$s.filter(function(Aa){return Aa!==ui}):Fi=[].concat((0,xe.Z)($s),[ui]):Fi=[ui],gA(Fi);var Gs=(0,He.Z)((0,He.Z)({},ni),{},{selectedKeys:Fi});Li?ar==null||ar(Gs):$n==null||$n(Gs)}!Qn&&hi.length&&Qi!=="inline"&&Vi(qr)},va=ht(function(mi){Vr==null||Vr(Un(mi)),pA(mi)}),ss=ht(function(mi,ni){var ui=hi.filter(function(Fi){return Fi!==mi});if(ni)ui.push(mi);else if(Qi!=="inline"){var Li=Ni(mi);ui=ui.filter(function(Fi){return!Li.has(Fi)})}(0,O.Z)(hi,ui,!0)||Vi(ui,!0)}),ya=function(ni,ui){var Li=ui!=null?ui:!hi.includes(ni);ss(ni,Li)},Za=X(Qi,Ts,qi,Gi,ns,is,Ks,zi,ya,Lr);E.useEffect(function(){ds(!0)},[]);var Ya=E.useMemo(function(){return{_internalRenderMenuItem:Ei,_internalRenderSubMenuItem:Ii}},[Ei,Ii]),aa=Qi!=="horizontal"||Bt?Si:Si.map(function(mi,ni){return E.createElement(be,{key:mi.key,overflowDisabled:ni>js},mi)}),ja=E.createElement(o.Z,(0,re.Z)({id:N,ref:ns,prefixCls:"".concat(Et,"-overflow"),component:"ul",itemComponent:Ie,className:V()(Et,"".concat(Et,"-root"),"".concat(Et,"-").concat(Qi),vn,(0,Te.Z)((0,Te.Z)({},"".concat(Et,"-inline-collapsed"),Ga),"".concat(Et,"-rtl"),qi),bt),dir:M,style:nn,role:"menu",tabIndex:ur,data:aa,renderRawItem:function(ni){return ni},renderRawRest:function(ni){var ui=ni.length,Li=ui?Si.slice(-ui):null;return E.createElement(Cr,{eventKey:We,title:Fr,disabled:ia,internalPopupClose:ui===0,popupClassName:Dr},Li)},maxCount:Qi!=="horizontal"||Bt?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ni){La(ni)},onKeyDown:Za},ts));return E.createElement(ie.Provider,{value:Ya},E.createElement(L.Provider,{value:Gi},E.createElement(be,{prefixCls:Et,rootClassName:bt,mode:Qi,openKeys:hi,rtl:qi,disabled:rt,motion:ei?hr:null,defaultMotions:ei?er:null,activeKey:Ts,onActive:sa,onInactive:Bs,selectedKeys:$s,inlineIndent:Rn,subMenuOpenDelay:$t,subMenuCloseDelay:Le,forceSubMenuRender:st,builtinPlacements:Yr,triggerSubMenuAction:Rr,getPopupContainer:Ri,itemIcon:kr,expandIcon:Ir,onItemClick:va,onOpenChange:ss},E.createElement(Be.Provider,{value:Wa},ja),E.createElement("div",{style:{display:"none"},"aria-hidden":!0},E.createElement(ke.Provider,{value:Fs},$i)))))}),Ti=Ki,Vn=Ti;Vn.Item=Ie,Vn.SubMenu=Cr,Vn.ItemGroup=es,Vn.Divider=Gr;var Vt=Vn},11780:function(kn,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return fe}});var re=Y(54476),Te=Y(33885),He=Y(42978),xe=Y(75931),ne=Y(59301),y=Y(92310),Se=Y.n(y),V=Y(29301),o=Y(34280),le=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],O=void 0;function B(b,S){var W=b.prefixCls,_e=b.invalidate,qe=b.item,mt=b.renderItem,Gt=b.responsive,Qt=b.responsiveDisabled,sn=b.registerSize,Wt=b.itemKey,kt=b.className,Xe=b.style,dt=b.children,ot=b.display,ft=b.order,tn=b.component,Re=tn===void 0?"div":tn,P=(0,xe.Z)(b,le),v=Gt&&!ot;function T(Me){sn(Wt,Me)}ne.useEffect(function(){return function(){T(null)}},[]);var X=mt&&qe!==O?mt(qe,{index:ft}):dt,k;_e||(k={opacity:v?0:1,height:v?0:O,overflowY:v?"hidden":O,order:Gt?ft:O,pointerEvents:v?"none":O,position:v?"absolute":O});var K={};v&&(K["aria-hidden"]=!0);var ce=ne.createElement(Re,(0,re.Z)({className:Se()(!_e&&W,kt),style:(0,Te.Z)((0,Te.Z)({},k),Xe)},K,P,{ref:S}),X);return Gt&&(ce=ne.createElement(V.Z,{onResize:function(We){var lt=We.offsetWidth;T(lt)},disabled:Qt},ce)),ce}var E=ne.forwardRef(B);E.displayName="Item";var F=E,L=Y(6089),Ae=Y(4676),Z=Y(16089);function J(b){if(typeof MessageChannel=="undefined")(0,Z.Z)(b);else{var S=new MessageChannel;S.port1.onmessage=function(){return b()},S.port2.postMessage(void 0)}}function H(){var b=ne.useRef(null),S=function(_e){b.current||(b.current=[],J(function(){(0,Ae.unstable_batchedUpdates)(function(){b.current.forEach(function(qe){qe()}),b.current=null})})),b.current.push(_e)};return S}function z(b,S){var W=ne.useState(S),_e=(0,He.Z)(W,2),qe=_e[0],mt=_e[1],Gt=(0,L.Z)(function(Qt){b(function(){mt(Qt)})});return[qe,Gt]}var oe=ne.createContext(null),be=["component"],De=["className"],ke=["className"],ge=function(S,W){var _e=ne.useContext(oe);if(!_e){var qe=S.component,mt=qe===void 0?"div":qe,Gt=(0,xe.Z)(S,be);return ne.createElement(mt,(0,re.Z)({},Gt,{ref:W}))}var Qt=_e.className,sn=(0,xe.Z)(_e,De),Wt=S.className,kt=(0,xe.Z)(S,ke);return ne.createElement(oe.Provider,{value:null},ne.createElement(F,(0,re.Z)({ref:W,className:Se()(Qt,Wt)},sn,kt)))},Ue=ne.forwardRef(ge);Ue.displayName="RawItem";var Je=Ue,Be=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],nt="responsive",ie="invalidate";function Q(b){return"+ ".concat(b.length," ...")}function q(b,S){var W=b.prefixCls,_e=W===void 0?"rc-overflow":W,qe=b.data,mt=qe===void 0?[]:qe,Gt=b.renderItem,Qt=b.renderRawItem,sn=b.itemKey,Wt=b.itemWidth,kt=Wt===void 0?10:Wt,Xe=b.ssr,dt=b.style,ot=b.className,ft=b.maxCount,tn=b.renderRest,Re=b.renderRawRest,P=b.suffix,v=b.component,T=v===void 0?"div":v,X=b.itemComponent,k=b.onVisibleChange,K=(0,xe.Z)(b,Be),ce=Xe==="full",Me=H(),We=z(Me,null),lt=(0,He.Z)(We,2),ht=lt[0],jt=lt[1],vt=ht||0,Rt=z(Me,new Map),yt=(0,He.Z)(Rt,2),xt=yt[0],At=yt[1],gt=z(Me,0),It=(0,He.Z)(gt,2),Ht=It[0],un=It[1],Yt=z(Me,0),_n=(0,He.Z)(Yt,2),on=_n[0],Un=_n[1],Gn=z(Me,0),dr=(0,He.Z)(Gn,2),Xt=dr[0],Cn=dr[1],Ge=(0,ne.useState)(null),Pe=(0,He.Z)(Ge,2),Ie=Pe[0],ee=Pe[1],ue=(0,ne.useState)(null),me=(0,He.Z)(ue,2),Fe=me[0],Qe=me[1],Tt=ne.useMemo(function(){return Fe===null&&ce?Number.MAX_SAFE_INTEGER:Fe||0},[Fe,ht]),Kt=(0,ne.useState)(!1),Lt=(0,He.Z)(Kt,2),yn=Lt[0],qn=Lt[1],or="".concat(_e,"-item"),cn=Math.max(Ht,on),qt=ft===nt,fr=mt.length&&qt,pr=ft===ie,Ve=fr||typeof ft=="number"&&mt.length>ft,lr=(0,ne.useMemo)(function(){var Vn=mt;return fr?ht===null&&ce?Vn=mt:Vn=mt.slice(0,Math.min(mt.length,vt/kt)):typeof ft=="number"&&(Vn=mt.slice(0,ft)),Vn},[mt,kt,ht,ft,fr]),rr=(0,ne.useMemo)(function(){return fr?mt.slice(Tt+1):mt.slice(lr.length)},[mt,lr,fr,Tt]),ir=(0,ne.useCallback)(function(Vn,Vt){var ze;return typeof sn=="function"?sn(Vn):(ze=sn&&(Vn==null?void 0:Vn[sn]))!==null&&ze!==void 0?ze:Vt},[sn]),ri=(0,ne.useCallback)(Gt||function(Vn){return Vn},[Gt]);function Cr(Vn,Vt,ze){Fe===Vn&&(Vt===void 0||Vt===Ie)||(Qe(Vn),ze||(qn(Vn<mt.length-1),k==null||k(Vn)),Vt!==void 0&&ee(Vt))}function li(Vn,Vt){jt(Vt.clientWidth)}function Gr(Vn,Vt){At(function(ze){var ut=new Map(ze);return Vt===null?ut.delete(Vn):ut.set(Vn,Vt),ut})}function Ci(Vn,Vt){Un(Vt),un(on)}function ii(Vn,Vt){Cn(Vt)}function pi(Vn){return xt.get(ir(lr[Vn],Vn))}(0,o.Z)(function(){if(vt&&typeof cn=="number"&&lr){var Vn=Xt,Vt=lr.length,ze=Vt-1;if(!Vt){Cr(0,null);return}for(var ut=0;ut<Vt;ut+=1){var Pt=pi(ut);if(ce&&(Pt=Pt||0),Pt===void 0){Cr(ut-1,void 0,!0);break}if(Vn+=Pt,ze===0&&Vn<=vt||ut===ze-1&&Vn+pi(ze)<=vt){Cr(ze,null);break}else if(Vn+cn>vt){Cr(ut-1,Vn-Pt-Xt+on);break}}P&&pi(0)+Xt>vt&&ee(null)}},[vt,xt,on,Xt,ir,lr]);var es=yn&&!!rr.length,br={};Ie!==null&&fr&&(br={position:"absolute",left:Ie,top:0});var Sr={prefixCls:or,responsive:fr,component:X,invalidate:pr},Nr=Qt?function(Vn,Vt){var ze=ir(Vn,Vt);return ne.createElement(oe.Provider,{key:ze,value:(0,Te.Z)((0,Te.Z)({},Sr),{},{order:Vt,item:Vn,itemKey:ze,registerSize:Gr,display:Vt<=Tt})},Qt(Vn,Vt))}:function(Vn,Vt){var ze=ir(Vn,Vt);return ne.createElement(F,(0,re.Z)({},Sr,{order:Vt,key:ze,item:Vn,renderItem:ri,itemKey:ze,registerSize:Gr,display:Vt<=Tt}))},xi={order:es?Tt:Number.MAX_SAFE_INTEGER,className:"".concat(or,"-rest"),registerSize:Ci,display:es},qr=tn||Q,Ki=Re?ne.createElement(oe.Provider,{value:(0,Te.Z)((0,Te.Z)({},Sr),xi)},Re(rr)):ne.createElement(F,(0,re.Z)({},Sr,xi),typeof qr=="function"?qr(rr):qr),Ti=ne.createElement(T,(0,re.Z)({className:Se()(!pr&&_e,ot),style:dt,ref:S},K),lr.map(Nr),Ve?Ki:null,P&&ne.createElement(F,(0,re.Z)({},Sr,{responsive:qt,responsiveDisabled:!fr,order:Tt,className:"".concat(or,"-suffix"),registerSize:ii,display:!0,style:br}),P));return qt?ne.createElement(V.Z,{onResize:li,disabled:!fr},Ti):Ti}var se=ne.forwardRef(q);se.displayName="Overflow",se.Item=Je,se.RESPONSIVE=nt,se.INVALIDATE=ie;var de=se,fe=de},29301:function(kn,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return ie}});var re=Y(54476),Te=Y(59301),He=Y(11592),xe=Y(48736),ne=Y(33885),y=Y(76190),Se=Y(76846),V=Y(8654),o=Te.createContext(null);function le(Q){var q=Q.children,se=Q.onBatchResize,de=Te.useRef(0),fe=Te.useRef([]),b=Te.useContext(o),S=Te.useCallback(function(W,_e,qe){de.current+=1;var mt=de.current;fe.current.push({size:W,element:_e,data:qe}),Promise.resolve().then(function(){mt===de.current&&(se==null||se(fe.current),fe.current=[])}),b==null||b(W,_e,qe)},[se,b]);return Te.createElement(o.Provider,{value:S},q)}var O=Y(76374),B=new Map;function E(Q){Q.forEach(function(q){var se,de=q.target;(se=B.get(de))===null||se===void 0||se.forEach(function(fe){return fe(de)})})}var F=new O.Z(E),L=null,Ae=null;function Z(Q,q){B.has(Q)||(B.set(Q,new Set),F.observe(Q)),B.get(Q).add(q)}function J(Q,q){B.has(Q)&&(B.get(Q).delete(q),B.get(Q).size||(F.unobserve(Q),B.delete(Q)))}var H=Y(67732),z=Y(83652),oe=Y(42403),be=Y(158),De=function(Q){(0,oe.Z)(se,Q);var q=(0,be.Z)(se);function se(){return(0,H.Z)(this,se),q.apply(this,arguments)}return(0,z.Z)(se,[{key:"render",value:function(){return this.props.children}}]),se}(Te.Component);function ke(Q,q){var se=Q.children,de=Q.disabled,fe=Te.useRef(null),b=Te.useRef(null),S=Te.useContext(o),W=typeof se=="function",_e=W?se(fe):se,qe=Te.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),mt=!W&&Te.isValidElement(_e)&&(0,V.Yr)(_e),Gt=mt?(0,V.C4)(_e):null,Qt=(0,V.x1)(Gt,fe),sn=function(){var dt;return(0,Se.ZP)(fe.current)||(fe.current&&(0,y.Z)(fe.current)==="object"?(0,Se.ZP)((dt=fe.current)===null||dt===void 0?void 0:dt.nativeElement):null)||(0,Se.ZP)(b.current)};Te.useImperativeHandle(q,function(){return sn()});var Wt=Te.useRef(Q);Wt.current=Q;var kt=Te.useCallback(function(Xe){var dt=Wt.current,ot=dt.onResize,ft=dt.data,tn=Xe.getBoundingClientRect(),Re=tn.width,P=tn.height,v=Xe.offsetWidth,T=Xe.offsetHeight,X=Math.floor(Re),k=Math.floor(P);if(qe.current.width!==X||qe.current.height!==k||qe.current.offsetWidth!==v||qe.current.offsetHeight!==T){var K={width:X,height:k,offsetWidth:v,offsetHeight:T};qe.current=K;var ce=v===Math.round(Re)?Re:v,Me=T===Math.round(P)?P:T,We=(0,ne.Z)((0,ne.Z)({},K),{},{offsetWidth:ce,offsetHeight:Me});S==null||S(We,Xe,ft),ot&&Promise.resolve().then(function(){ot(We,Xe)})}},[]);return Te.useEffect(function(){var Xe=sn();return Xe&&!de&&Z(Xe,kt),function(){return J(Xe,kt)}},[fe.current,de]),Te.createElement(De,{ref:b},mt?Te.cloneElement(_e,{ref:Qt}):_e)}var ge=Te.forwardRef(ke),Ue=ge,Je="rc-observer-key";function Be(Q,q){var se=Q.children,de=typeof se=="function"?[se]:(0,He.Z)(se);return de.map(function(fe,b){var S=(fe==null?void 0:fe.key)||"".concat(Je,"-").concat(b);return Te.createElement(Ue,(0,re.Z)({},Q,{key:S,ref:b===0?q:void 0}),fe)})}var nt=Te.forwardRef(Be);nt.Collection=le;var ie=nt},29125:function(kn,Ft,Y){"use strict";Y.d(Ft,{G:function(){return xe},Z:function(){return J}});var re=Y(92310),Te=Y.n(re),He=Y(59301);function xe(H){var z=H.children,oe=H.prefixCls,be=H.id,De=H.overlayInnerStyle,ke=H.bodyClassName,ge=H.className,Ue=H.style;return He.createElement("div",{className:Te()("".concat(oe,"-content"),ge),style:Ue},He.createElement("div",{className:Te()("".concat(oe,"-inner"),ke),id:be,role:"tooltip",style:De},typeof z=="function"?z():z))}var ne=Y(54476),y=Y(33885),Se=Y(75931),V=Y(65030),o={shiftX:64,adjustY:1},le={adjustX:1,shiftY:!0},O=[0,0],B={left:{points:["cr","cl"],overflow:le,offset:[-4,0],targetOffset:O},right:{points:["cl","cr"],overflow:le,offset:[4,0],targetOffset:O},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:O},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:O},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:O},leftTop:{points:["tr","tl"],overflow:le,offset:[-4,0],targetOffset:O},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:O},rightTop:{points:["tl","tr"],overflow:le,offset:[4,0],targetOffset:O},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:O},rightBottom:{points:["bl","br"],overflow:le,offset:[4,0],targetOffset:O},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:O},leftBottom:{points:["br","bl"],overflow:le,offset:[-4,0],targetOffset:O}},E=null,F=Y(80402),L=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],Ae=function(z,oe){var be=z.overlayClassName,De=z.trigger,ke=De===void 0?["hover"]:De,ge=z.mouseEnterDelay,Ue=ge===void 0?0:ge,Je=z.mouseLeaveDelay,Be=Je===void 0?.1:Je,nt=z.overlayStyle,ie=z.prefixCls,Q=ie===void 0?"rc-tooltip":ie,q=z.children,se=z.onVisibleChange,de=z.afterVisibleChange,fe=z.transitionName,b=z.animation,S=z.motion,W=z.placement,_e=W===void 0?"right":W,qe=z.align,mt=qe===void 0?{}:qe,Gt=z.destroyTooltipOnHide,Qt=Gt===void 0?!1:Gt,sn=z.defaultVisible,Wt=z.getTooltipContainer,kt=z.overlayInnerStyle,Xe=z.arrowContent,dt=z.overlay,ot=z.id,ft=z.showArrow,tn=ft===void 0?!0:ft,Re=z.classNames,P=z.styles,v=(0,Se.Z)(z,L),T=(0,F.Z)(ot),X=(0,He.useRef)(null);(0,He.useImperativeHandle)(oe,function(){return X.current});var k=(0,y.Z)({},v);"visible"in z&&(k.popupVisible=z.visible);var K=function(){return He.createElement(xe,{key:"content",prefixCls:Q,id:T,bodyClassName:Re==null?void 0:Re.body,overlayInnerStyle:(0,y.Z)((0,y.Z)({},kt),P==null?void 0:P.body)},dt)},ce=function(){var We=He.Children.only(q),lt=(We==null?void 0:We.props)||{},ht=(0,y.Z)((0,y.Z)({},lt),{},{"aria-describedby":dt?T:null});return He.cloneElement(q,ht)};return He.createElement(V.Z,(0,ne.Z)({popupClassName:Te()(be,Re==null?void 0:Re.root),prefixCls:Q,popup:K,action:ke,builtinPlacements:B,popupPlacement:_e,ref:X,popupAlign:mt,getPopupContainer:Wt,onPopupVisibleChange:se,afterPopupVisibleChange:de,popupTransitionName:fe,popupAnimation:b,popupMotion:S,defaultPopupVisible:sn,autoDestroy:Qt,mouseLeaveDelay:Be,popupStyle:(0,y.Z)((0,y.Z)({},nt),P==null?void 0:P.root),mouseEnterDelay:Ue,arrow:tn},k),ce())},Z=(0,He.forwardRef)(Ae),J=Z},49658:function(kn,Ft){"use strict";Ft.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Y=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(Y)||/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(Y==null?void 0:Y.substr(0,4))}},83145:function(kn,Ft,Y){"use strict";Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.CopyToClipboard=void 0;var re=He(Y(59301)),Te=He(Y(25769));function He(H){return H&&H.__esModule?H:{default:H}}function xe(H){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xe=function(oe){return typeof oe}:xe=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},xe(H)}function ne(H,z){var oe=Object.keys(H);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(H);z&&(be=be.filter(function(De){return Object.getOwnPropertyDescriptor(H,De).enumerable})),oe.push.apply(oe,be)}return oe}function y(H){for(var z=1;z<arguments.length;z++){var oe=arguments[z]!=null?arguments[z]:{};z%2?ne(oe,!0).forEach(function(be){Z(H,be,oe[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(oe)):ne(oe).forEach(function(be){Object.defineProperty(H,be,Object.getOwnPropertyDescriptor(oe,be))})}return H}function Se(H,z){if(H==null)return{};var oe=V(H,z),be,De;if(Object.getOwnPropertySymbols){var ke=Object.getOwnPropertySymbols(H);for(De=0;De<ke.length;De++)be=ke[De],!(z.indexOf(be)>=0)&&Object.prototype.propertyIsEnumerable.call(H,be)&&(oe[be]=H[be])}return oe}function V(H,z){if(H==null)return{};var oe={},be=Object.keys(H),De,ke;for(ke=0;ke<be.length;ke++)De=be[ke],!(z.indexOf(De)>=0)&&(oe[De]=H[De]);return oe}function o(H,z){if(!(H instanceof z))throw new TypeError("Cannot call a class as a function")}function le(H,z){for(var oe=0;oe<z.length;oe++){var be=z[oe];be.enumerable=be.enumerable||!1,be.configurable=!0,"value"in be&&(be.writable=!0),Object.defineProperty(H,be.key,be)}}function O(H,z,oe){return z&&le(H.prototype,z),oe&&le(H,oe),H}function B(H,z){return z&&(xe(z)==="object"||typeof z=="function")?z:F(H)}function E(H){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(oe){return oe.__proto__||Object.getPrototypeOf(oe)},E(H)}function F(H){if(H===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H}function L(H,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(z&&z.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),z&&Ae(H,z)}function Ae(H,z){return Ae=Object.setPrototypeOf||function(be,De){return be.__proto__=De,be},Ae(H,z)}function Z(H,z,oe){return z in H?Object.defineProperty(H,z,{value:oe,enumerable:!0,configurable:!0,writable:!0}):H[z]=oe,H}var J=function(H){L(z,H);function z(){var oe,be;o(this,z);for(var De=arguments.length,ke=new Array(De),ge=0;ge<De;ge++)ke[ge]=arguments[ge];return be=B(this,(oe=E(z)).call.apply(oe,[this].concat(ke))),Z(F(be),"onClick",function(Ue){var Je=be.props,Be=Je.text,nt=Je.onCopy,ie=Je.children,Q=Je.options,q=re.default.Children.only(ie),se=(0,Te.default)(Be,Q);nt&&nt(Be,se),q&&q.props&&typeof q.props.onClick=="function"&&q.props.onClick(Ue)}),be}return O(z,[{key:"render",value:function(){var be=this.props,De=be.text,ke=be.onCopy,ge=be.options,Ue=be.children,Je=Se(be,["text","onCopy","options","children"]),Be=re.default.Children.only(Ue);return re.default.cloneElement(Be,y({},Je,{onClick:this.onClick}))}}]),z}(re.default.PureComponent);Ft.CopyToClipboard=J,Z(J,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(kn,Ft,Y){"use strict";var re=Y(83145),Te=re.CopyToClipboard;Te.CopyToClipboard=Te,kn.exports=Te},76374:function(kn,Ft,Y){"use strict";var re=function(){if(typeof Map!="undefined")return Map;function ie(Q,q){var se=-1;return Q.some(function(de,fe){return de[0]===q?(se=fe,!0):!1}),se}return function(){function Q(){this.__entries__=[]}return Object.defineProperty(Q.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),Q.prototype.get=function(q){var se=ie(this.__entries__,q),de=this.__entries__[se];return de&&de[1]},Q.prototype.set=function(q,se){var de=ie(this.__entries__,q);~de?this.__entries__[de][1]=se:this.__entries__.push([q,se])},Q.prototype.delete=function(q){var se=this.__entries__,de=ie(se,q);~de&&se.splice(de,1)},Q.prototype.has=function(q){return!!~ie(this.__entries__,q)},Q.prototype.clear=function(){this.__entries__.splice(0)},Q.prototype.forEach=function(q,se){se===void 0&&(se=null);for(var de=0,fe=this.__entries__;de<fe.length;de++){var b=fe[de];q.call(se,b[1],b[0])}},Q}()}(),Te=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,He=function(){return typeof Y.g!="undefined"&&Y.g.Math===Math?Y.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),xe=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(He):function(ie){return setTimeout(function(){return ie(Date.now())},1e3/60)}}(),ne=2;function y(ie,Q){var q=!1,se=!1,de=0;function fe(){q&&(q=!1,ie()),se&&S()}function b(){xe(fe)}function S(){var W=Date.now();if(q){if(W-de<ne)return;se=!0}else q=!0,se=!1,setTimeout(b,Q);de=W}return S}var Se=20,V=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",le=function(){function ie(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=y(this.refresh.bind(this),Se)}return ie.prototype.addObserver=function(Q){~this.observers_.indexOf(Q)||this.observers_.push(Q),this.connected_||this.connect_()},ie.prototype.removeObserver=function(Q){var q=this.observers_,se=q.indexOf(Q);~se&&q.splice(se,1),!q.length&&this.connected_&&this.disconnect_()},ie.prototype.refresh=function(){var Q=this.updateObservers_();Q&&this.refresh()},ie.prototype.updateObservers_=function(){var Q=this.observers_.filter(function(q){return q.gatherActive(),q.hasActive()});return Q.forEach(function(q){return q.broadcastActive()}),Q.length>0},ie.prototype.connect_=function(){!Te||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)},ie.prototype.disconnect_=function(){!Te||!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)},ie.prototype.onTransitionEnd_=function(Q){var q=Q.propertyName,se=q===void 0?"":q,de=V.some(function(fe){return!!~se.indexOf(fe)});de&&this.refresh()},ie.getInstance=function(){return this.instance_||(this.instance_=new ie),this.instance_},ie.instance_=null,ie}(),O=function(ie,Q){for(var q=0,se=Object.keys(Q);q<se.length;q++){var de=se[q];Object.defineProperty(ie,de,{value:Q[de],enumerable:!1,writable:!1,configurable:!0})}return ie},B=function(ie){var Q=ie&&ie.ownerDocument&&ie.ownerDocument.defaultView;return Q||He},E=De(0,0,0,0);function F(ie){return parseFloat(ie)||0}function L(ie){for(var Q=[],q=1;q<arguments.length;q++)Q[q-1]=arguments[q];return Q.reduce(function(se,de){var fe=ie["border-"+de+"-width"];return se+F(fe)},0)}function Ae(ie){for(var Q=["top","right","bottom","left"],q={},se=0,de=Q;se<de.length;se++){var fe=de[se],b=ie["padding-"+fe];q[fe]=F(b)}return q}function Z(ie){var Q=ie.getBBox();return De(0,0,Q.width,Q.height)}function J(ie){var Q=ie.clientWidth,q=ie.clientHeight;if(!Q&&!q)return E;var se=B(ie).getComputedStyle(ie),de=Ae(se),fe=de.left+de.right,b=de.top+de.bottom,S=F(se.width),W=F(se.height);if(se.boxSizing==="border-box"&&(Math.round(S+fe)!==Q&&(S-=L(se,"left","right")+fe),Math.round(W+b)!==q&&(W-=L(se,"top","bottom")+b)),!z(ie)){var _e=Math.round(S+fe)-Q,qe=Math.round(W+b)-q;Math.abs(_e)!==1&&(S-=_e),Math.abs(qe)!==1&&(W-=qe)}return De(de.left,de.top,S,W)}var H=function(){return typeof SVGGraphicsElement!="undefined"?function(ie){return ie instanceof B(ie).SVGGraphicsElement}:function(ie){return ie instanceof B(ie).SVGElement&&typeof ie.getBBox=="function"}}();function z(ie){return ie===B(ie).document.documentElement}function oe(ie){return Te?H(ie)?Z(ie):J(ie):E}function be(ie){var Q=ie.x,q=ie.y,se=ie.width,de=ie.height,fe=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,b=Object.create(fe.prototype);return O(b,{x:Q,y:q,width:se,height:de,top:q,right:Q+se,bottom:de+q,left:Q}),b}function De(ie,Q,q,se){return{x:ie,y:Q,width:q,height:se}}var ke=function(){function ie(Q){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=De(0,0,0,0),this.target=Q}return ie.prototype.isActive=function(){var Q=oe(this.target);return this.contentRect_=Q,Q.width!==this.broadcastWidth||Q.height!==this.broadcastHeight},ie.prototype.broadcastRect=function(){var Q=this.contentRect_;return this.broadcastWidth=Q.width,this.broadcastHeight=Q.height,Q},ie}(),ge=function(){function ie(Q,q){var se=be(q);O(this,{target:Q,contentRect:se})}return ie}(),Ue=function(){function ie(Q,q,se){if(this.activeObservations_=[],this.observations_=new re,typeof Q!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=Q,this.controller_=q,this.callbackCtx_=se}return ie.prototype.observe=function(Q){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(Q instanceof B(Q).Element))throw new TypeError('parameter 1 is not of type "Element".');var q=this.observations_;q.has(Q)||(q.set(Q,new ke(Q)),this.controller_.addObserver(this),this.controller_.refresh())}},ie.prototype.unobserve=function(Q){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(Q instanceof B(Q).Element))throw new TypeError('parameter 1 is not of type "Element".');var q=this.observations_;q.has(Q)&&(q.delete(Q),q.size||this.controller_.removeObserver(this))}},ie.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ie.prototype.gatherActive=function(){var Q=this;this.clearActive(),this.observations_.forEach(function(q){q.isActive()&&Q.activeObservations_.push(q)})},ie.prototype.broadcastActive=function(){if(this.hasActive()){var Q=this.callbackCtx_,q=this.activeObservations_.map(function(se){return new ge(se.target,se.broadcastRect())});this.callback_.call(Q,q,Q),this.clearActive()}},ie.prototype.clearActive=function(){this.activeObservations_.splice(0)},ie.prototype.hasActive=function(){return this.activeObservations_.length>0},ie}(),Je=typeof WeakMap!="undefined"?new WeakMap:new re,Be=function(){function ie(Q){if(!(this instanceof ie))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var q=le.getInstance(),se=new Ue(Q,q,this);Je.set(this,se)}return ie}();["observe","unobserve","disconnect"].forEach(function(ie){Be.prototype[ie]=function(){var Q;return(Q=Je.get(this))[ie].apply(Q,arguments)}});var nt=function(){return typeof He.ResizeObserver!="undefined"?He.ResizeObserver:Be}();Ft.Z=nt},98040:function(kn){kn.exports=function(){var Ft=document.getSelection();if(!Ft.rangeCount)return function(){};for(var Y=document.activeElement,re=[],Te=0;Te<Ft.rangeCount;Te++)re.push(Ft.getRangeAt(Te));switch(Y.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":Y.blur();break;default:Y=null;break}return Ft.removeAllRanges(),function(){Ft.type==="Caret"&&Ft.removeAllRanges(),Ft.rangeCount||re.forEach(function(He){Ft.addRange(He)}),Y&&Y.focus()}}},44523:function(kn,Ft,Y){"use strict";Y.d(Ft,{ZP:function(){return hs}});const re=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},Te=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=He},He=Number.MAX_SAFE_INTEGER||9007199254740991;let xe=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}({}),ne=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}({}),y=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 Se={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},V={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 le{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 O(a,e,t){return(e=Ae(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function B(){return B=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},B.apply(null,arguments)}function E(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 F(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?E(Object(t),!0).forEach(function(n){O(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function L(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 Ae(a){var e=L(a,"string");return typeof e=="symbol"?e:e+""}class Z{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=J,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 J=function(){},H={trace:J,debug:J,log:J,warn:J,info:J,error:J};function z(){return B({},H)}function oe(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):J}function be(a,e,t){return e[a]?e[a].bind(e):oe(a,t)}const De=z();function ke(a,e,t){const n=z();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=be(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.12`)}catch(i){return z()}r.forEach(i=>{De[i]=be(i,a)})}else B(De,n);return n}const ge=De;function Ue(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Je(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Be(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 nt(a,e=!1){if(typeof TextDecoder!="undefined"){const u=new TextDecoder("utf-8").decode(a);if(e){const m=u.indexOf("\0");return m!==-1?u.substring(0,m):u}return u.replace(/\0/g,"")}const t=a.length;let n,r,i,s="",A=0;for(;A<t;){if(n=a[A++],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[A++],s+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=a[A++],i=a[A++],s+=String.fromCharCode((n&15)<<12|(r&63)<<6|(i&63)<<0);break}}return s}function ie(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 Q(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function q(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var se={exports:{}},de;function fe(){return de||(de=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,A={buildAbsoluteURL:function(f,u,m){if(m=m||{},f=f.trim(),u=u.trim(),!u){if(!m.alwaysNormalize)return f;var _=A.parseURL(f);if(!_)throw new Error("Error trying to parse base URL.");return _.path=A.normalizePath(_.path),A.buildURLFromParts(_)}var w=A.parseURL(u);if(!w)throw new Error("Error trying to parse relative URL.");if(w.scheme)return m.alwaysNormalize?(w.path=A.normalizePath(w.path),A.buildURLFromParts(w)):u;var I=A.parseURL(f);if(!I)throw new Error("Error trying to parse base URL.");if(!I.netLoc&&I.path&&I.path[0]!=="/"){var D=r.exec(I.path);I.netLoc=D[1],I.path=D[2]}I.netLoc&&!I.path&&(I.path="/");var G={scheme:I.scheme,netLoc:w.netLoc,path:null,params:w.params,query:w.query,fragment:w.fragment};if(!w.netLoc&&(G.netLoc=I.netLoc,w.path[0]!=="/"))if(!w.path)G.path=I.path,w.params||(G.params=I.params,w.query||(G.query=I.query));else{var $=I.path,pe=$.substring(0,$.lastIndexOf("/")+1)+w.path;G.path=A.normalizePath(pe)}return G.path===null&&(G.path=m.alwaysNormalize?A.normalizePath(w.path):w.path),A.buildURLFromParts(G)},parseURL:function(f){var u=n.exec(f);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(f){for(f=f.split("").reverse().join("").replace(i,"");f.length!==(f=f.replace(s,"")).length;);return f.split("").reverse().join("")},buildURLFromParts:function(f){return f.scheme+f.netLoc+f.path+f.params+f.query+f.fragment}};a.exports=A})()}(se)),se.exports}var b=fe();class S{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 W={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class _e{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,sn(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={[W.AUDIO]:null,[W.VIDEO]:null,[W.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 S),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=b.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[W.AUDIO]=null,e[W.VIDEO]=null,e[W.AUDIOVIDEO]=null}}function qe(a){return a.sn!=="initSegment"}class mt extends _e{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(re(e)&&re(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=re(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(!re(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return qe(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:A}=this,f=A[e];if(!f){A[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}f.startPTS=Math.min(f.startPTS,t),f.endPTS=Math.max(f.endPTS,n),f.startDTS=Math.min(f.startDTS,r),f.endDTS=Math.max(f.endDTS,i)}}class Gt extends _e{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 Qt(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||Qt(t,e)}}function sn(a,e){const t=Qt(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const Wt=Math.pow(2,32)-1,kt=[].push,Xe={video:1,audio:2,id3:3,text:4};function dt(a){return String.fromCharCode.apply(null,a)}function ot(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function ft(a,e){const t=Re(a,e);return t<0?4294967296+t:t}function tn(a,e){let t=ft(a,e);return t*=Math.pow(2,32),t+=ft(a,e+4),t}function Re(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function P(a){const e=a.byteLength;for(let t=0;t<e;){const n=ft(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 v(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=ft(a,r),s=dt(a.subarray(r+4,r+8)),A=i>1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,A));else{const f=v(a.subarray(r+8,A),e.slice(1));f.length&&kt.apply(t,f)}r=A}return t}function T(a){const e=[],t=a[0];let n=8;const r=ft(a,n);n+=4;let i=0,s=0;t===0?(i=ft(a,n),s=ft(a,n+4),n+=8):(i=tn(a,n),s=tn(a,n+8),n+=16),n+=2;let A=a.length+s;const f=ot(a,n);n+=2;for(let u=0;u<f;u++){let m=n;const _=ft(a,m);m+=4;const w=_&2147483647;if((_&2147483648)>>>31===1)return ge.warn("SIDX has hierarchical references (not supported)"),null;const D=ft(a,m);m+=4,e.push({referenceSize:w,subsegmentDuration:D,info:{duration:D/r,start:A,end:A+w-1}}),A+=w,m+=4,n=m}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:f,references:e}}function X(a){const e=[],t=v(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=v(i,["tkhd"])[0];if(s){let A=s[0];const f=ft(s,A===0?12:20),u=v(i,["mdia","mdhd"])[0];if(u){A=u[0];const m=ft(u,A===0?12:20),_=v(i,["mdia","hdlr"])[0];if(_){const w=dt(_.subarray(8,12)),I={soun:W.AUDIO,vide:W.VIDEO}[w],D=v(i,["mdia","minf","stbl","stsd"])[0],G=k(D);I?(e[f]={timescale:m,type:I,stsd:G},e[I]=F({timescale:m,id:f},G)):e[f]={timescale:m,type:w,stsd:G}}}}}return v(a,["moov","mvex","trex"]).forEach(r=>{const i=ft(r,4),s=e[i];s&&(s.default={duration:ft(r,12),flags:ft(r,20)})}),e}function k(a){const e=a.subarray(8),t=e.subarray(86),n=dt(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const u=v(e,[n])[0].subarray(n==="enca"?28:78);v(u,["sinf"]).forEach(_=>{const w=v(_,["schm"])[0];if(w){const I=dt(w.subarray(4,8));if(I==="cbcs"||I==="cenc"){const D=v(_,["frma"])[0];D&&(r=dt(D))}}})}const A=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const f=v(t,["avcC"])[0];f&&f.length>3&&(r+="."+We(f[1])+We(f[2])+We(f[3]),i=K(A==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const f=v(e,[n])[0],u=v(f.subarray(28),["esds"])[0];if(u&&u.length>7){let m=4;if(u[m++]!==3)break;m=Me(u,m),m+=2;const _=u[m++];if(_&128&&(m+=2),_&64&&(m+=u[m++]),u[m++]!==4)break;m=Me(u,m);const w=u[m++];if(w===64)r+="."+We(w);else break;if(m+=12,u[m++]!==5)break;m=Me(u,m);const I=u[m++];let D=(I&248)>>3;D===31&&(D+=1+((I&7)<<3)+((u[m]&224)>>5)),r+="."+D}break}case"hvc1":case"hev1":{const f=v(t,["hvcC"])[0];if(f&&f.length>12){const u=f[1],m=["","A","B","C"][u>>6],_=u&31,w=ft(f,2),I=(u&32)>>5?"H":"L",D=f[12],G=f.subarray(6,12);r+="."+m+_,r+="."+ce(w).toString(16).toUpperCase(),r+="."+I+D;let $="";for(let pe=G.length;pe--;){const ye=G[pe];(ye||$)&&($="."+ye.toString(16).toUpperCase()+$)}r+=$}i=K(A=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=K(r,t)||r;break}case"vp09":{const f=v(t,["vpcC"])[0];if(f&&f.length>6){const u=f[4],m=f[5],_=f[6]>>4&15;r+="."+lt(u)+"."+lt(m)+"."+lt(_)}break}case"av01":{const f=v(t,["av1C"])[0];if(f&&f.length>2){const u=f[1]>>>5,m=f[1]&31,_=f[2]>>>7?"H":"M",w=(f[2]&64)>>6,I=(f[2]&32)>>5,D=u===2&&w?I?12:10:w?10:8,G=(f[2]&16)>>4,$=(f[2]&8)>>3,pe=(f[2]&4)>>2,ye=f[2]&3;r+="."+u+"."+lt(m)+_+"."+lt(D)+"."+G+"."+$+pe+ye+"."+lt(1)+"."+lt(1)+"."+lt(1)+"."+0,i=K("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function K(a,e){const t=v(e,["dvvC"]),n=t.length?t[0]:v(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+lt(r)+"."+lt(i)}}function ce(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function Me(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function We(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function lt(a){return(a<10?"0":"")+a}function ht(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&v(a,["moov","trak"]).forEach(r=>{const s=v(r,["mdia","minf","stbl","stsd"])[0].subarray(8);let A=v(s,["enca"]);const f=A.length>0;f||(A=v(s,["encv"])),A.forEach(u=>{const m=f?u.subarray(28):u.subarray(78);v(m,["sinf"]).forEach(w=>{const I=jt(w);if(I){const D=I.subarray(8,24);D.some(G=>G!==0)||(ge.log(`[eme] Patching keyId in 'enc${f?"a":"v"}>sinf>>tenc' box: ${ie(D)} -> ${ie(t)}`),I.set(t,8))}})})})}function jt(a){const e=v(a,["schm"])[0];if(e){const t=dt(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return v(a,["schi","tenc"])[0]}return null}function vt(a,e,t){const n={},r=v(a,["moof","traf"]);for(let i=0;i<r.length;i++){const s=r[i],A=v(s,["tfhd"])[0],f=ft(A,4),u=e[f];if(!u)continue;n[f]||(n[f]={start:NaN,duration:0,sampleCount:0,timescale:u.timescale,type:u.type});const m=n[f],_=v(s,["tfdt"])[0];if(_){const Ce=_[0];let $e=ft(_,4);Ce===1&&($e===Wt?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):($e*=Wt+1,$e+=ft(_,8))),re($e)&&(!re(m.start)||$e<m.start)&&(m.start=$e)}const w=u.default,I=ft(A,0)|(w==null?void 0:w.flags);let D=(w==null?void 0:w.duration)||0;I&8&&(I&2?D=ft(A,12):D=ft(A,8));const G=v(s,["trun"]);let $=m.start||0,pe=0,ye=D;for(let Ce=0;Ce<G.length;Ce++){const $e=G[Ce],je=ft($e,4),Dt=m.sampleCount;m.sampleCount+=je;const et=$e[3]&1,wt=$e[3]&4,_t=$e[2]&1,at=$e[2]&2,Jt=$e[2]&4,In=$e[2]&8;let jn=8,sr=je;for(et&&(jn+=4),wt&&je&&(!($e[jn+1]&1)&&m.keyFrameIndex===void 0&&(m.keyFrameIndex=Dt),jn+=4,_t?(ye=ft($e,jn),jn+=4):ye=D,at&&(jn+=4),In&&(jn+=4),$+=ye,pe+=ye,sr--);sr--;)_t?(ye=ft($e,jn),jn+=4):ye=D,at&&(jn+=4),Jt&&($e[jn+1]&1||m.keyFrameIndex===void 0&&(m.keyFrameIndex=m.sampleCount-(sr+1),m.keyFrameStart=$),jn+=4),In&&(jn+=4),$+=ye,pe+=ye;!pe&&D&&(pe+=D*je)}m.duration+=pe}if(!Object.keys(n).some(i=>n[i].duration)){let i=1/0,s=0;const A=v(a,["sidx"]);for(let f=0;f<A.length;f++){const u=T(A[f]);if(u!=null&&u.references){i=Math.min(i,u.earliestPresentationTime/u.timescale);const m=u.references.reduce((_,w)=>_+w.info.duration||0,0);s=Math.max(s,m+u.earliestPresentationTime/u.timescale)}}s&&re(s)&&Object.keys(n).forEach(f=>{n[f].duration||(n[f].duration=s*n[f].timescale-n[f].start)})}return n}function Rt(a){const e={valid:null,remainder:null},t=v(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 yt(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function xt(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return v(n,["moof"]).map(f=>{const u=f.byteOffset-8;v(f,["traf"]).map(_=>{const w=v(_,["tfdt"]).map(I=>{const D=I[0];let G=ft(I,4);return D===1&&(G*=Math.pow(2,32),G+=ft(I,8)),G/r})[0];return w!==void 0&&(a=w),v(_,["tfhd"]).map(I=>{const D=ft(I,4),G=ft(I,0)&16777215,$=(G&1)!==0,pe=(G&2)!==0,ye=(G&8)!==0;let Ce=0;const $e=(G&16)!==0;let je=0;const Dt=(G&32)!==0;let et=8;D===i&&($&&(et+=8),pe&&(et+=4),ye&&(Ce=ft(I,et),et+=4),$e&&(je=ft(I,et),et+=4),Dt&&(et+=4),e.type==="video"&&(s=At(e.codec)),v(_,["trun"]).map(wt=>{const _t=wt[0],at=ft(wt,0)&16777215,Jt=(at&1)!==0;let In=0;const jn=(at&4)!==0,sr=(at&256)!==0;let Xn=0;const bn=(at&512)!==0;let tr=0;const Hn=(at&1024)!==0,nr=(at&2048)!==0;let Br=0;const Fn=ft(wt,4);let Tn=8;Jt&&(In=ft(wt,Tn),Tn+=4),jn&&(Tn+=4);let $r=In+u;for(let wi=0;wi<Fn;wi++){if(sr?(Xn=ft(wt,Tn),Tn+=4):Xn=Ce,bn?(tr=ft(wt,Tn),Tn+=4):tr=je,Hn&&(Tn+=4),nr&&(_t===0?Br=ft(wt,Tn):Br=Re(wt,Tn),Tn+=4),e.type===W.VIDEO){let Zr=0;for(;Zr<tr;){const ai=ft(n,$r);if($r+=4,gt(s,n[$r])){const Rs=n.subarray($r,$r+ai);It(Rs,s?2:1,a+Br/r,t)}$r+=ai,Zr+=ai+4}}a+=Xn/r}}))})})}),t}function At(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function gt(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function It(a,e,t,n){const r=Ht(a);let i=0;i+=e;let s=0,A=0,f=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;f=r[i++],s+=f}while(f===255);A=0;do{if(i>=r.length)break;f=r[i++],A+=f}while(f===255);const u=r.length-i;let m=i;if(A<u)i+=A;else if(A>u){ge.error(`Malformed SEI payload. ${A} is too small, only ${u} bytes left to parse.`);break}if(s===4){if(r[m++]===181){const w=ot(r,m);if(m+=2,w===49){const I=ft(r,m);if(m+=4,I===1195456820){const D=r[m++];if(D===3){const G=r[m++],$=31&G,pe=64&G,ye=pe?2+$*3:0,Ce=new Uint8Array(ye);if(pe){Ce[0]=G;for(let $e=1;$e<ye;$e++)Ce[$e]=r[m++]}n.push({type:D,payloadType:s,pts:t,bytes:Ce})}}}}}else if(s===5&&A>16){const _=[];for(let D=0;D<16;D++){const G=r[m++].toString(16);_.push(G.length==1?"0"+G:G),(D===3||D===5||D===7||D===9)&&_.push("-")}const w=A-16,I=new Uint8Array(w);for(let D=0;D<w;D++)I[D]=r[m++];n.push({payloadType:s,pts:t,uuid:_.join(""),userData:nt(I),userDataBytes:I})}}}function Ht(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 un(a){const e=a[0];let t="",n="",r=0,i=0,s=0,A=0,f=0,u=0;if(e===0){for(;dt(a.subarray(u,u+1))!=="\0";)t+=dt(a.subarray(u,u+1)),u+=1;for(t+=dt(a.subarray(u,u+1)),u+=1;dt(a.subarray(u,u+1))!=="\0";)n+=dt(a.subarray(u,u+1)),u+=1;n+=dt(a.subarray(u,u+1)),u+=1,r=ft(a,12),i=ft(a,16),A=ft(a,20),f=ft(a,24),u=28}else if(e===1){u+=4,r=ft(a,u),u+=4;const _=ft(a,u);u+=4;const w=ft(a,u);for(u+=4,s=Kc(2,32)*_+w,Te(s)||(s=Number.MAX_SAFE_INTEGER,ge.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),A=ft(a,u),u+=4,f=ft(a,u),u+=4;dt(a.subarray(u,u+1))!=="\0";)t+=dt(a.subarray(u,u+1)),u+=1;for(t+=dt(a.subarray(u,u+1)),u+=1;dt(a.subarray(u,u+1))!=="\0";)n+=dt(a.subarray(u,u+1)),u+=1;n+=dt(a.subarray(u,u+1)),u+=1}const m=a.subarray(u,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:A,id:f,payload:m}}function Yt(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 _n(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),Yt([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t)}function on(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let n=0;for(;n+32<t;){const r=new DataView(a,n),i=Un(r);e.push(i),n+=i.size}}return e}function Un(a){const e=a.getUint32(0),t=a.byteOffset,n=a.byteLength;if(n<e)return{offset:t,size:n};if(a.getUint32(4)!==1886614376)return{offset:t,size:e};const i=a.getUint32(8)>>>24;if(i!==0&&i!==1)return{offset:t,size:e};const s=a.buffer,A=ie(new Uint8Array(s,t+12,16));let f=null,u=null,m=0;if(i===0)m=28;else{const w=a.getUint32(28);if(!w||n<32+w*16)return{offset:t,size:e};f=[];for(let I=0;I<w;I++)f.push(new Uint8Array(s,t+32+I*16,16));m=32+w*16}if(!m)return{offset:t,size:e};const _=a.getUint32(m);return e-32<_?{offset:t,size:e}:(u=new Uint8Array(s,t+m+4,_),{version:i,systemId:A,kids:f,data:u,offset:t,size:e})}const Gn=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),dr={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 Xt(a,e){const t=dr[e];return!!t&&!!t[a.slice(0,4)]}function Cn(a,e,t=!0){return!a.split(",").some(n=>!Ge(n,e,t))}function Ge(a,e,t=!0){var n;const r=Ue(t);return(n=r==null?void 0:r.isTypeSupported(Pe(a,e)))!=null?n:!1}function Pe(a,e){return`${e}/mp4;codecs=${a}`}function Ie(a){if(a){const e=a.substring(0,4);return dr.video[e]}return 2}function ee(a){const e=Gn();return a.split(",").reduce((t,n)=>{const i=e&&At(n)?9:dr.video[n];return i?(i*2+t)/(t?3:2):(dr.audio[n]+t)/(t?2:1)},0)}const ue={};function me(a,e=!0){if(ue[a])return ue[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(Ge(t[r],"audio",e))return ue[a]=t[r],t[r];if(t[r]==="mp3"&&(n=Ue(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const Fe=/flac|opus|mp4a\.40\.34/i;function Qe(a,e=!0){return a.replace(Fe,t=>me(t.toLowerCase(),e))}function Tt(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)Xt(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function Kt(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Lt(a,"audio")||Lt(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 Lt(a,e){return Xt(a,e)&&Ge(a,e)}function yn(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 qn(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 or(a){const e=Ue(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 cn(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const qt={supported:!0,powerEfficient:!0,smooth:!0},fr={supported:!1,smooth:!1,powerEfficient:!1},pr={supported:!0,configurations:[],decodingInfoResults:[qt]};function Ve(a,e){return{supported:!1,configurations:e,decodingInfoResults:[fr],error:a}}function lr(a,e,t,n,r,i){const s=a.videoCodec,A=a.audioCodec?a.audioGroups:null,f=i==null?void 0:i.audioCodec,u=i==null?void 0:i.channels,m=u?parseInt(u):f?1/0:2;let _=null;if(A!=null&&A.length)try{A.length===1&&A[0]?_=e.groups[A[0]].channels:_=A.reduce((w,I)=>{if(I){const D=e.groups[I];if(!D)throw new Error(`Audio track group ${I} not found`);Object.keys(D.channels).forEach(G=>{w[G]=(w[G]||0)+D.channels[G]})}return w},{2:0})}catch(w){return!0}return s!==void 0&&(s.split(",").some(w=>At(w))||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))||!!_&&re(m)&&Object.keys(_).some(w=>parseInt(w)>m)}function rr(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(pr);const i=[],s=ir(a),A=s.length,f=ri(a,e,A>0),u=f.length;for(let m=A||1*u||1;m--;){const _={type:"media-source"};if(A&&(_.video=s[m%A]),u){_.audio=f[m%u];const w=_.audio.bitrate;_.video&&w&&(_.video.bitrate-=w)}i.push(_)}if(r){const m=navigator.userAgent;if(r.split(",").some(_=>At(_))&&Gn())return Promise.resolve(Ve(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${m})`),i))}return Promise.all(i.map(m=>{const _=Gr(m);return n[_]||(n[_]=t.decodingInfo(m))})).then(m=>({supported:!m.some(_=>!_.supported),configurations:i,decodingInfoResults:m})).catch(m=>({supported:!1,configurations:i,decodingInfoResults:[],error:m}))}function ir(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=li(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,A=a.videoRange.toLowerCase();return t?t.map(f=>{const u={contentType:Pe(qn(f),"video"),width:r,height:i,bitrate:n,framerate:s};return A!=="sdr"&&(u.transferFunction=A),u}):[]}function ri(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=li(a);return r&&a.audioGroups?a.audioGroups.reduce((s,A)=>{var f;const u=A?(f=e.groups[A])==null?void 0:f.tracks:null;return u?u.reduce((m,_)=>{if(_.groupId===A){const w=parseFloat(_.channels||"");r.forEach(I=>{const D={contentType:Pe(I,"audio"),bitrate:t?Cr(I,i):i};w&&(D.channels=""+w),m.push(D)})}return m},s):s},[]):[]}function Cr(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 li(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function Gr(a){let e="";const{audio:t,video:n}=a;if(n){const r=cn(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=cn(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const Ci=["NONE","TYPE-0","TYPE-1",null];function ii(a){return Ci.indexOf(a)>-1}const pi=["SDR","PQ","HLG"];function es(a){return!!a&&pi.indexOf(a)>-1}var br={No:"",Yes:"YES",v2:"v2"};function Sr(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?br.v2:br.Yes:br.No}class Nr{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 xi{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 qr(this._audioGroups,e)}hasSubtitleGroup(e){return qr(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 qr(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Ki(){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 Ti(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||pi.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Ki(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const Vn=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,Vn(e));function ze(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,A=n==null?void 0:n.audioCodec,f=r==null?void 0:r.videoCodec,u=s&&parseInt(s)===2;let m=!1,_=!1,w=1/0,I=1/0,D=1/0,G=1/0,$=0,pe=[];const{preferHDR:ye,allowedVideoRanges:Ce}=Ti(e,r);for(let wt=i.length;wt--;){const _t=a[i[wt]];m||(m=_t.channels[2]>0),w=Math.min(w,_t.minHeight),I=Math.min(I,_t.minFramerate),D=Math.min(D,_t.minBitrate),Ce.filter(Jt=>_t.videoRanges[Jt]>0).length>0&&(_=!0)}w=re(w)?w:0,I=re(I)?I:0;const $e=Math.max(1080,w),je=Math.max(30,I);D=re(D)?D:t,t=Math.max(D,t),_||(e=void 0);const Dt=i.length>1;return{codecSet:i.reduce((wt,_t)=>{const at=a[_t];if(_t===wt)return wt;if(pe=_?Ce.filter(Jt=>at.videoRanges[Jt]>0):[],Dt){if(at.minBitrate>t)return ut(_t,`min bitrate of ${at.minBitrate} > current estimate of ${t}`),wt;if(!at.hasDefaultAudio)return ut(_t,"no renditions with default or auto-select sound found"),wt;if(A&&_t.indexOf(A.substring(0,4))%5!==0)return ut(_t,`audio codec preference "${A}" not found`),wt;if(s&&!u){if(!at.channels[s])return ut(_t,`no renditions with ${s} channel sound found (channels options: ${Object.keys(at.channels)})`),wt}else if((!A||u)&&m&&at.channels[2]===0)return ut(_t,"no renditions with stereo sound found"),wt;if(at.minHeight>$e)return ut(_t,`min resolution of ${at.minHeight} > maximum of ${$e}`),wt;if(at.minFramerate>je)return ut(_t,`min framerate of ${at.minFramerate} > maximum of ${je}`),wt;if(!pe.some(Jt=>at.videoRanges[Jt]>0))return ut(_t,`no variants with VIDEO-RANGE of ${Vt(pe)} found`),wt;if(f&&_t.indexOf(f.substring(0,4))%5!==0)return ut(_t,`video codec preference "${f}" not found`),wt;if(at.maxScore<$)return ut(_t,`max score of ${at.maxScore} < selected max of ${$}`),wt}return wt&&(ee(_t)>=ee(wt)||at.fragmentError>a[wt].fragmentError)?wt:(G=at.minIndex,$=at.maxScore,_t)},void 0),videoRanges:pe,preferHDR:ye,minFramerate:I,minBitrate:D,minIndex:G}}function ut(a,e){ge.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function Pt(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 St(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const A=i.audioGroups;let f=r[i.codecSet];f||(r[i.codecSet]=f={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!A,fragmentError:0}),f.minBitrate=Math.min(f.minBitrate,i.bitrate);const u=Math.min(i.height,i.width);return f.minHeight=Math.min(f.minHeight,u),f.minFramerate=Math.min(f.minFramerate,i.frameRate),f.minIndex=Math.min(f.minIndex,s),f.maxScore=Math.max(f.maxScore,i.score),f.fragmentError+=i.fragmentError,f.videoRanges[i.videoRange]=(f.videoRanges[i.videoRange]||0)+1,A&&A.forEach(m=>{if(!m)return;const _=e.groups[m];_&&(f.hasDefaultAudio=f.hasDefaultAudio||e.hasDefaultAudio?_.hasDefault:_.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(_.channels).forEach(w=>{f.channels[w]=(f.channels[w]||0)+_.channels[w]}))}),r},{})}function zt(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 Et(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(bt(a,r,t))return n}return-1}function bt(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:A}=a,f=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||nn(i,e.lang))&&(i===void 0||e.assocLang===s)&&(A===void 0||e.default===A)&&(f===void 0||e.forced===f)&&(!("characteristics"in a)||vn(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function nn(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function vn(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function wn(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 ur(a,e,t,n,r){const i=e[n],A=e.reduce((w,I,D)=>{const G=I.uri;return(w[G]||(w[G]=[])).push(D),w},{})[i.uri];A.length>1&&(n=Math.max.apply(Math,A));const f=i.videoRange,u=i.frameRate,m=i.codecSet.substring(0,4),_=Dn(e,n,w=>{if(w.videoRange!==f||w.frameRate!==u||w.codecSet.substring(0,4)!==m)return!1;const I=w.audioGroups,D=t.filter(G=>!I||I.indexOf(G.groupId)!==-1);return Et(a,D,r)>-1});return _>-1?_:Dn(e,n,w=>{const I=w.audioGroups,D=t.filter(G=>!I||I.indexOf(G.groupId)!==-1);return Et(a,D,r)>-1})}function Dn(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 Zn(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class M extends Z{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:A,media:f}=s;if(!r||!f)return;const u=performance.now(),m=i?i.stats:r.stats,_=i?i.duration:r.duration,w=u-m.loading.start,I=s.minAutoLevel,D=r.level,G=this._nextAutoLevel;if(m.aborted||m.loaded&&m.loaded===m.total||D<=I){this.clearTimer(),this._nextAutoLevel=-1;return}if(!A)return;const $=G>-1&&G!==D,pe=!!t||$;if(!pe&&(f.paused||!f.playbackRate||!f.readyState))return;const ye=s.mainForwardBufferInfo;if(!pe&&ye===null)return;const Ce=this.bwEstimator.getEstimateTTFB(),$e=Math.abs(f.playbackRate);if(w<=Math.max(Ce,1e3*(_/($e*2))))return;const je=ye?ye.len/$e:0,Dt=m.loading.first?m.loading.first-m.loading.start:-1,et=m.loaded&&Dt>-1,wt=this.getBwEstimate(),_t=s.levels,at=_t[D],Jt=Math.max(m.loaded,Math.round(_*(r.bitrate||at.averageBitrate)/8));let In=et?w-Dt:w;In<1&&et&&(In=Math.min(w,m.loaded*8/wt));const jn=et?m.loaded*1e3/In:0,sr=Ce/1e3,Xn=jn?(Jt-m.loaded)/jn:Jt*8/wt+sr;if(Xn<=je)return;const bn=jn?jn*8:wt,tr=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,Hn=this.hls.config.abrBandWidthUpFactor;let nr=Number.POSITIVE_INFINITY,Br;for(Br=D-1;Br>I;Br--){const wi=_t[Br].maxBitrate,Zr=!_t[Br].details||tr;if(nr=this.getTimeToLoadFrag(sr,bn,_*wi,Zr),nr<Math.min(je,_+sr))break}if(nr>=Xn||nr>_*10)return;et?this.bwEstimator.sample(w-Math.min(Ce,Dt),m.loaded):this.bwEstimator.sampleTTFB(w);const Fn=_t[Br].maxBitrate;this.getBwEstimate()*Hn>Fn&&this.resetEstimator(Fn);const Tn=this.findBestLevel(Fn,I,Br,0,je,1,1);Tn>-1&&(Br=Tn),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${D} is loading too slowly;
Fragment duration: ${r.duration.toFixed(3)}
Time to underbuffer: ${je.toFixed(3)} s
Estimated load time for current fragment: ${Xn.toFixed(3)} s
Estimated load time for down switch fragment: ${nr.toFixed(3)} s
TTFB estimate: ${Dt|0} ms
Current BW estimate: ${re(wt)?wt|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${Br} @ ${Fn|0} bps`),s.nextLoadLevel=s.nextAutoLevel=Br,this.clearTimer();const $r=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===Br&&Br>0){const wi=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Br>0?"and switching down":""}
Fragment duration: ${r.duration.toFixed(3)} s
Time to underbuffer: ${wi.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,Br>I){let Zr=this.findBestLevel(this.hls.levels[I].bitrate,I,Br,0,wi,1,1);Zr===-1&&(Zr=I),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Zr,this.resetEstimator(this.hls.levels[Zr].bitrate)}}};$||Xn>nr*2?$r():this.timer=self.setInterval($r,nr*1e3),s.trigger(y.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:m})},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 le(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(y.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 ne.BUFFER_ADD_CODEC_ERROR:case ne.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case ne.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(),A=i?i.stats:n.stats,f=s-A.loading.start,u=A.loading.first?A.loading.first-A.loading.start:-1;if(A.loaded&&u>-1){const _=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(f-Math.min(_,u),A.loaded)}else this.bwEstimator.sampleTTFB(f)}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;re(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===V.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],A=(s.loaded?s.loaded.bytes:0)+r.loaded,f=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:A,duration:f},s.realBitrate=Math.round(8*A/f)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(y.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!==V.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,A=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 ${A}`),A}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,A=t?t.duration:e?e.duration:0,f=this.getBwEstimate(),u=this.getStarvationDelay();let m=i.abrBandWidthFactor,_=i.abrBandWidthUpFactor;if(u){const $=this.findBestLevel(f,s,r,u,0,m,_);if($>=0)return this.rebufferNotice=-1,$}let w=A?Math.min(A,i.maxStarvationDelay):i.maxStarvationDelay;if(!u){const $=this.bitrateTestDelay;$&&(w=(A?Math.min(A,i.maxLoadingDelay):i.maxLoadingDelay)-$,this.info(`bitrate test took ${Math.round(1e3*$)}ms, set first fragment max fetchDuration to ${Math.round(1e3*w)} ms`),m=_=1)}const I=this.findBestLevel(f,s,r,u,w,m,_);if(this.rebufferNotice!==I&&(this.rebufferNotice=I,this.info(`${u?"rebuffering expected":"buffer is empty"}, optimal quality level ${I}`)),I>-1)return I;const D=n.levels[s],G=n.loadLevelObj;return G&&(D==null?void 0:D.bitrate)<G.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,A){var f;const u=r+i,m=this.lastLoadedFragLevel,_=m===-1?this.hls.firstLevel:m,{fragCurrent:w,partCurrent:I}=this,{levels:D,allAudioTracks:G,loadLevel:$,config:pe}=this.hls;if(D.length===1)return 0;const ye=D[_],Ce=!!((f=this.hls.latestLevelDetails)!=null&&f.live),$e=$===-1||m===-1;let je,Dt="SDR",et=(ye==null?void 0:ye.frameRate)||0;const{audioPreference:wt,videoPreference:_t}=pe,at=this.audioTracksByGroup||(this.audioTracksByGroup=Pt(G));let Jt=-1;if($e){if(this.firstSelection!==-1)return this.firstSelection;const bn=this.codecTiers||(this.codecTiers=St(D,at,t,n)),tr=ze(bn,Dt,e,wt,_t),{codecSet:Hn,videoRanges:nr,minFramerate:Br,minBitrate:Fn,minIndex:Tn,preferHDR:$r}=tr;Jt=Tn,je=Hn,Dt=$r?nr[nr.length-1]:nr[0],et=Br,e=Math.max(e,Fn),this.log(`picked start tier ${Vt(tr)}`)}else je=ye==null?void 0:ye.codecSet,Dt=ye==null?void 0:ye.videoRange;const In=I?I.duration:w?w.duration:0,jn=this.bwEstimator.getEstimateTTFB()/1e3,sr=[];for(let bn=n;bn>=t;bn--){var Xn;const tr=D[bn],Hn=bn>_;if(!tr)continue;if(pe.useMediaCapabilities&&!tr.supportedResult&&!tr.supportedPromise){const Zr=navigator.mediaCapabilities;typeof(Zr==null?void 0:Zr.decodingInfo)=="function"&&lr(tr,at,Dt,et,e,wt)?(tr.supportedPromise=rr(tr,at,Zr,this.supportedCache),tr.supportedPromise.then(ai=>{if(!this.hls)return;tr.supportedResult=ai;const Rs=this.hls.levels,Cs=Rs.indexOf(tr);ai.error?this.warn(`MediaCapabilities decodingInfo error: "${ai.error}" for level ${Cs} ${Vt(ai)}`):ai.supported?ai.decodingInfoResults.some(da=>da.smooth===!1||da.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${Cs} not smooth or powerEfficient: ${Vt(ai)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Cs} ${Vt(ai)}`),Cs>-1&&Rs.length>1&&(this.log(`Removing unsupported level ${Cs}`),this.hls.removeLevel(Cs),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(ai=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${ai}`)})):tr.supportedResult=pr}if((je&&tr.codecSet!==je||Dt&&tr.videoRange!==Dt||Hn&&et>tr.frameRate||!Hn&&et>0&&et<tr.frameRate||(Xn=tr.supportedResult)!=null&&(Xn=Xn.decodingInfoResults)!=null&&Xn.some(Zr=>Zr.smooth===!1))&&(!$e||bn!==Jt)){sr.push(bn);continue}const nr=tr.details,Br=(I?nr==null?void 0:nr.partTarget:nr==null?void 0:nr.averagetargetduration)||In;let Fn;Hn?Fn=A*e:Fn=s*e;const Tn=In&&r>=In*2&&i===0?tr.averageBitrate:tr.maxBitrate,$r=this.getTimeToLoadFrag(jn,Fn,Tn*Br,nr===void 0);if(Fn>=Tn&&(bn===m||tr.loadError===0&&tr.fragmentError===0)&&($r<=jn||!re($r)||Ce&&!this.bitrateTestDelay||$r<u)){const Zr=this.forcedAutoLevel;return bn!==$&&(Zr===-1||Zr!==$)&&(sr.length&&this.trace(`Skipped level(s) ${sr.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${D[sr[0]].codecs}" ${D[sr[0]].videoRange}; not compatible with "${je}" ${Dt}`),this.info(`switch candidate:${_}->${bn} adjustedbw(${Math.round(Fn)})-bitrate=${Math.round(Fn-Tn)} ttfb:${jn.toFixed(1)} avgDuration:${Br.toFixed(1)} maxFetchDuration:${u.toFixed(1)} fetchDuration:${$r.toFixed(1)} firstSelection:${$e} codecSet:${tr.codecSet} videoRange:${tr.videoRange} hls.loadLevel:${$}`)),$e&&(this.firstSelection=bn),bn}}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 N={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 he(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!re(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(Bt(e,t,s))return s}return null}function ve(a,e,t=0,n=0,r=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const A=a.endDTS-t;A>0&&A<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)&&rt(t,n,i)===0||Ke(i,a,Math.min(r,n))))return i;const s=N.search(e,rt.bind(null,t,n));return s&&(s!==a||!i)?s:i}function Ke(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 rt(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 Bt(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function Ct(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 N.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 $t(a){switch(a.details){case ne.FRAG_LOAD_TIMEOUT:case ne.KEY_LOAD_TIMEOUT:case ne.LEVEL_LOAD_TIMEOUT:case ne.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Ut(a){return a.details.startsWith("key")}function Le(a){return Ut(a)&&!!a.frag&&!a.frag.decryptdata}function st(a,e){const t=$t(e);return a.default[`${t?"timeout":"error"}Retry`]}function Ot(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function mn(a){return F(F({},a),{errorRetry:null,timeoutRetry:null})}function pn(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(en(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function en(a){return ln(a)||!!a&&(a<400||a>499)}function ln(a){return a===0&&navigator.onLine===!1}var an={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},En={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class Qn extends Z{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(y.ERROR,this.onError,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(y.ERROR,this.onError,this),e.off(y.ERROR,this.onErrorOut,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.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)===V.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 A;return(A=s.details)==null?void 0:A.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 ne.FRAG_LOAD_ERROR:case ne.FRAG_LOAD_TIMEOUT:case ne.KEY_LOAD_ERROR:case ne.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case ne.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=fn();return}case ne.FRAG_GAP:case ne.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=an.SendAlternateToPenaltyBox;return}case ne.LEVEL_EMPTY_ERROR:case ne.LEVEL_PARSING_ERROR:{var s;const f=t.parent===V.MAIN?t.level:r.loadLevel;t.details===ne.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,f):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,f))}return;case ne.LEVEL_LOAD_ERROR:case ne.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case ne.AUDIO_TRACK_LOAD_ERROR:case ne.AUDIO_TRACK_LOAD_TIMEOUT:case ne.SUBTITLE_LOAD_ERROR:case ne.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const f=r.loadLevelObj;if(f&&(i.type===Se.AUDIO_TRACK&&f.hasAudioGroup(i.groupId)||i.type===Se.SUBTITLE_TRACK&&f.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=an.SendAlternateToPenaltyBox,t.errorAction.flags=En.MoveAllAlternatesMatchingHost;return}}return;case ne.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:an.SendAlternateToPenaltyBox,flags:En.MoveAllAlternatesMatchingHDCP};return;case ne.KEY_SYSTEM_SESSION_UPDATE_FAILED:case ne.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case ne.KEY_SYSTEM_NO_SESSION:t.errorAction={action:an.SendAlternateToPenaltyBox,flags:En.MoveAllAlternatesMatchingKey};return;case ne.BUFFER_ADD_CODEC_ERROR:case ne.REMUX_ALLOC_ERROR:case ne.BUFFER_APPEND_ERROR:if(!t.errorAction){var A;t.errorAction=this.getLevelSwitchAction(t,(A=t.level)!=null?A:r.loadLevel)}return;case ne.INTERNAL_EXCEPTION:case ne.BUFFER_APPENDING_ERROR:case ne.BUFFER_FULL_ERROR:case ne.LEVEL_SWITCH_ERROR:case ne.BUFFER_STALLED_ERROR:case ne.BUFFER_SEEK_OVER_HOLE:case ne.BUFFER_NUDGE_ON_STALL:t.errorAction=fn();return}t.type===xe.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=fn())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=st(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(pn(r,i,$t(e),e.response))return{action:an.RetryRequest,flags:En.None,retryConfig:r,retryCount:i};const A=this.getLevelSwitchAction(e,t);return r&&(A.retryConfig=r,A.retryCount=i),A}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,A=st(Ut(e)?s:i,e),f=t.levels.reduce((m,_)=>m+_.fragmentError,0);if(r&&(e.details!==ne.FRAG_GAP&&r.fragmentError++,!Le(e)&&pn(A,f,$t(e),e.response)))return{action:an.RetryRequest,flags:En.None,retryConfig:A,retryCount:f};const u=this.getLevelSwitchAction(e,n);return A&&(u.retryConfig=A,u.retryCount=f),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===ne.BUFFER_APPEND_ERROR&&r.fragmentError++;let m=-1;const{levels:_,loadLevel:w,minAutoLevel:I,maxAutoLevel:D}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const G=(i=e.frag)==null?void 0:i.type,pe=(G===V.AUDIO&&u===ne.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(u===ne.BUFFER_ADD_CODEC_ERROR||u===ne.BUFFER_APPEND_ERROR))&&_.some(({audioCodec:Dt})=>r.audioCodec!==Dt),Ce=e.sourceBufferName==="video"&&(u===ne.BUFFER_ADD_CODEC_ERROR||u===ne.BUFFER_APPEND_ERROR)&&_.some(({codecSet:Dt,audioCodec:et})=>r.codecSet!==Dt&&r.audioCodec===et),{type:$e,groupId:je}=(s=e.context)!=null?s:{};for(let Dt=_.length;Dt--;){const et=(Dt+w)%_.length;if(et!==w&&et>=I&&et<=D&&_[et].loadError===0){var A,f;const wt=_[et];if(u===ne.FRAG_GAP&&G===V.MAIN&&e.frag){const _t=_[et].details;if(_t){const at=ve(e.frag,_t.fragments,e.frag.start);if(at!=null&&at.gap)continue}}else{if($e===Se.AUDIO_TRACK&&wt.hasAudioGroup(je)||$e===Se.SUBTITLE_TRACK&&wt.hasSubtitleGroup(je))continue;if(G===V.AUDIO&&(A=r.audioGroups)!=null&&A.some(_t=>wt.hasAudioGroup(_t))||G===V.SUBTITLE&&(f=r.subtitleGroups)!=null&&f.some(_t=>wt.hasSubtitleGroup(_t))||pe&&r.audioCodec===wt.audioCodec||Ce&&r.codecSet===wt.codecSet||!pe&&r.codecSet!==wt.codecSet)continue}m=et;break}}if(m>-1&&n.loadLevel!==m)return e.levelRetry=!0,this.playlistError=0,{action:an.SendAlternateToPenaltyBox,flags:En.None,nextAutoLevel:m}}return{action:an.SendAlternateToPenaltyBox,flags:En.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case an.DoNothing:break;case an.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==ne.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 an.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 En.None:this.switchLevel(e,i);break;case En.MoveAllAlternatesMatchingHDCP:{const f=this.getVariantLevelIndex(e.frag),u=t.levels[f],m=u==null?void 0:u.attrs["HDCP-LEVEL"];if(n.hdcpLevel=m,m==="NONE")this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(m){t.maxHdcpLevel=Ci[Ci.indexOf(m)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case En.MoveAllAlternatesMatchingKey:{const f=e.decryptdata;if(f){const u=this.hls.levels,m=u.length;for(let w=m;w--;)if(this.variantHasKey(u[w],f)){var s,A;this.log(`Banned key found in level ${w} (${u[w].bitrate}bps) or audio group "${(s=u[w].audioGroups)==null?void 0:s.join(",")}" (${(A=e.frag)==null?void 0:A.type} fragment) ${ie(f.keyId||[])}`),u[w].fragmentError++,u[w].loadError++,this.log(`Removing level ${w} with key error (${e.error})`),this.hls.removeLevel(w)}const _=e.frag;if(this.hls.levels.length<m)n.resolved=!0;else if(_&&_.type!==V.MAIN){const w=_.decryptdata;w&&!f.matches(w)&&(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===ne.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=cn(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 fn(a){const e={action:an.DoNothing,flags:En.None};return a&&(e.resolved=!0),e}var dn={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class $n{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(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.BUFFER_APPENDED,this.onBufferAppended,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.BUFFER_APPENDED,this.onBufferAppended,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(y.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 A=r[i[s]];if((A==null?void 0:A.body.type)===t&&(!n||A.buffered)){const f=A.body;if(f.start<=e&&e<=f.end)return f}}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(A=>{const f=this.fragments[A];if(!f||s>=f.body.sn)return;if(!f.buffered&&(!f.loaded||i)){f.body.type===n&&this.removeFragment(f.body);return}const u=f.range[e];if(u){if(u.time.length===0){this.removeFragment(f.body);return}u.time.some(m=>{const _=!this.isTimeBuffered(m.startPTS,m.endPTS,t);return _&&this.removeFragment(f.body),_})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=Kn(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(A=>{const f=n.elementaryStreams[A];if(!f)return;const u=t[A],m=s||f.partial===!0;i.range[A]=this.getBufferedTimes(n,e.part,m,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),ar(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=Rn(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=Kn(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,A=e.end,f=e.minEndPTS||A,u=e.maxStartPTS||s;for(let m=0;m<r.length;m++){const _=r.start(m)-this.bufferPadding,w=r.end(m)+this.bufferPadding;if(u>=_&&f<=w){i.time.push({startPTS:Math.max(s,r.start(m)),endPTS:Math.min(A,r.end(m))});break}else if(s<w&&A>_){const I=Math.max(s,r.start(m)),D=Math.min(A,r.end(m));D>I&&(i.partial=!0,i.time.push({startPTS:I,endPTS:D}))}else if(A<=_)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:A,fragments:f}=this;return Object.keys(f).forEach(u=>{const m=f[u];m&&ar(m)&&(r=m.body.start-A,i=m.body.end+A,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=m.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||ar(t))}getState(e){const t=Kn(e),n=this.fragments[t];return n?n.buffered?ar(n)?dn.PARTIAL:dn.OK:dn.APPENDING:dn.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=Kn(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 A=n.type;if(r){let u=this.activePartLists[A];u||(this.activePartLists[A]=u=[]),u.push(r)}this.timeRanges=i;const f=i[s];this.detectEvictedFragments(s,f,A,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Kn(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 A=this.fragments[s];if(!A)return;const f=A.body;f.type!==n||r&&!f.gap||f.start<t&&f.end>e&&(A.buffered||i)&&this.removeFragment(f)})}removeFragment(e){const t=Kn(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=Rn(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 ar(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 Kn(a){return`${a.type}_${a.level}_${a.sn}`}function Rn(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var hr={cbc:0,ctr:1};class er{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 hr.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case hr.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 _r(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class Rr{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],A=n[3],f=this.invSubMix,u=f[0],m=f[1],_=f[2],w=f[3],I=new Uint32Array(256);let D=0,G=0,$=0;for($=0;$<256;$++)$<128?I[$]=$<<1:I[$]=$<<1^283;for($=0;$<256;$++){let pe=G^G<<1^G<<2^G<<3^G<<4;pe=pe>>>8^pe&255^99,e[D]=pe,t[pe]=D;const ye=I[D],Ce=I[ye],$e=I[Ce];let je=I[pe]*257^pe*16843008;r[D]=je<<24|je>>>8,i[D]=je<<16|je>>>16,s[D]=je<<8|je>>>24,A[D]=je,je=$e*16843009^Ce*65537^ye*257^D*16843008,u[pe]=je<<24|je>>>8,m[pe]=je<<16|je>>>16,_[pe]=je<<8|je>>>24,w[pe]=je,D?(D=ye^I[I[I[$e^ye]]],G^=I[I[G]]):D=G=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 A,f;const u=this.keySchedule=new Uint32Array(s),m=this.invKeySchedule=new Uint32Array(s),_=this.sBox,w=this.rcon,I=this.invSubMix,D=I[0],G=I[1],$=I[2],pe=I[3];let ye,Ce;for(A=0;A<s;A++){if(A<i){ye=u[A]=t[A];continue}Ce=ye,A%i===0?(Ce=Ce<<8|Ce>>>24,Ce=_[Ce>>>24]<<24|_[Ce>>>16&255]<<16|_[Ce>>>8&255]<<8|_[Ce&255],Ce^=w[A/i|0]<<24):i>6&&A%i===4&&(Ce=_[Ce>>>24]<<24|_[Ce>>>16&255]<<16|_[Ce>>>8&255]<<8|_[Ce&255]),u[A]=ye=(u[A-i]^Ce)>>>0}for(f=0;f<s;f++)A=s-f,f&3?Ce=u[A]:Ce=u[A-4],f<4||A<=4?m[f]=Ce:m[f]=D[_[Ce>>>24]]^G[_[Ce>>>16&255]]^$[_[Ce>>>8&255]]^pe[_[Ce&255]],m[f]=m[f]>>>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,A=this.invSubMix,f=A[0],u=A[1],m=A[2],_=A[3],w=this.uint8ArrayToUint32Array_(n);let I=w[0],D=w[1],G=w[2],$=w[3];const pe=new Int32Array(e),ye=new Int32Array(pe.length);let Ce,$e,je,Dt,et,wt,_t,at,Jt,In,jn,sr,Xn,bn;const tr=this.networkToHostOrderSwap;for(;t<pe.length;){for(Jt=tr(pe[t]),In=tr(pe[t+1]),jn=tr(pe[t+2]),sr=tr(pe[t+3]),et=Jt^i[0],wt=sr^i[1],_t=jn^i[2],at=In^i[3],Xn=4,bn=1;bn<r;bn++)Ce=f[et>>>24]^u[wt>>16&255]^m[_t>>8&255]^_[at&255]^i[Xn],$e=f[wt>>>24]^u[_t>>16&255]^m[at>>8&255]^_[et&255]^i[Xn+1],je=f[_t>>>24]^u[at>>16&255]^m[et>>8&255]^_[wt&255]^i[Xn+2],Dt=f[at>>>24]^u[et>>16&255]^m[wt>>8&255]^_[_t&255]^i[Xn+3],et=Ce,wt=$e,_t=je,at=Dt,Xn=Xn+4;Ce=s[et>>>24]<<24^s[wt>>16&255]<<16^s[_t>>8&255]<<8^s[at&255]^i[Xn],$e=s[wt>>>24]<<24^s[_t>>16&255]<<16^s[at>>8&255]<<8^s[et&255]^i[Xn+1],je=s[_t>>>24]<<24^s[at>>16&255]<<16^s[et>>8&255]<<8^s[wt&255]^i[Xn+2],Dt=s[at>>>24]<<24^s[et>>16&255]<<16^s[wt>>8&255]<<8^s[_t&255]^i[Xn+3],ye[t]=tr(Ce^I),ye[t+1]=tr(Dt^D),ye[t+2]=tr(je^G),ye[t+3]=tr($e^$),I=Jt,D=In,G=jn,$=sr,t=t+4}return ye.buffer}}class Yr{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=kr(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function kr(a){switch(a){case hr.cbc:return"AES-CBC";case hr.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Ir=16;class cr{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?_r(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 A=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(A,t,n,r);const f=this.flush();f?i(f.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:A}=this;if(r!==hr.cbc||t.byteLength!==16)return ge.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),A&&(e=yt(A,e),this.remainderData=null);const f=this.getValidChunk(e);if(!f.length)return null;i&&(n=i);let u=this.softwareDecrypter;u||(u=this.softwareDecrypter=new Rr),u.expandKey(t);const m=s;return this.currentResult=u.decrypt(f.buffer,0,n),this.currentIV=f.slice(-16).buffer,m||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 Yr(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new er(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(ge.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%Ir;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(ge.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Fr=Math.pow(2,17);class Dr{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 Lr({type:xe.NETWORK_ERROR,details:ne.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((A,f)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(D=>D[0]==="GAP")){f(Vr(e));return}else e.gap=!1;const u=this.loader=i?new i(r):new s(r),m=Ri(e);e.loader=u;const _=mn(r.fragLoadPolicy.default),w={loadPolicy:_,timeout:_.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Fr};e.stats=u.stats;const I={onSuccess:(D,G,$,pe)=>{this.resetLoader(e,u);let ye=D.data;$.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(ye.slice(0,16)),ye=ye.slice(16)),A({frag:e,part:null,payload:ye,networkDetails:pe})},onError:(D,G,$,pe)=>{this.resetLoader(e,u),f(new Lr({type:xe.NETWORK_ERROR,details:ne.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:F({url:n,data:void 0},D),error:new Error(`HTTP Error ${D.code} ${D.text}`),networkDetails:$,stats:pe}))},onAbort:(D,G,$)=>{this.resetLoader(e,u),f(new Lr({type:xe.NETWORK_ERROR,details:ne.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:$,stats:D}))},onTimeout:(D,G,$)=>{this.resetLoader(e,u),f(new Lr({type:xe.NETWORK_ERROR,details:ne.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${w.timeout}ms`),networkDetails:$,stats:D}))}};t&&(I.onProgress=(D,G,$,pe)=>t({frag:e,part:null,payload:$,networkDetails:pe})),u.load(m,w,I)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((A,f)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){f(Vr(e,t));return}const u=this.loader=i?new i(r):new s(r),m=Ri(e,t);e.loader=u;const _=mn(r.fragLoadPolicy.default),w={loadPolicy:_,timeout:_.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Fr};t.stats=u.stats,u.load(m,w,{onSuccess:(I,D,G,$)=>{this.resetLoader(e,u),this.updateStatsFromPart(e,t);const pe={frag:e,part:t,payload:I.data,networkDetails:$};n(pe),A(pe)},onError:(I,D,G,$)=>{this.resetLoader(e,u),f(new Lr({type:xe.NETWORK_ERROR,details:ne.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:F({url:m.url,data:void 0},I),error:new Error(`HTTP Error ${I.code} ${I.text}`),networkDetails:G,stats:$}))},onAbort:(I,D,G)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,u),f(new Lr({type:xe.NETWORK_ERROR,details:ne.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:G,stats:I}))},onTimeout:(I,D,G)=>{this.resetLoader(e,u),f(new Lr({type:xe.NETWORK_ERROR,details:ne.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${w.timeout}ms`),networkDetails:G,stats:I}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const f=Math.round(e.duration/t.duration),u=Math.min(Math.round(n.loaded/i),f),_=(f-u)*Math.round(n.loaded/u);n.total=n.loaded+_}else n.total=Math.max(n.loaded,n.total);const s=n.loading,A=r.loading;s.start?s.first+=A.first-A.start:(s.start=A.start,s.first=A.first),s.end=A.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Ri(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(re(r)&&re(i)){var s;let A=r,f=i;if(a.sn==="initSegment"&&Wr((s=a.decryptdata)==null?void 0:s.method)){const u=i-r;u%16&&(f=i+(16-u%16)),r!==0&&(n.resetIV=!0,A=r-16)}n.rangeStart=A,n.rangeEnd=f}return n}function Vr(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:xe.MEDIA_ERROR,details:ne.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new Lr(n)}function Wr(a){return a==="AES-128"||a==="AES-256"}class Lr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Ai extends Z{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 Hr{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=Ei(),this.buffering={audio:Ei(),video:Ei(),audiovideo:Ei()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function Ei(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Ii={length:0,start:()=>0,end:()=>0};class Yn{static isBuffered(e,t){if(e){const n=Yn.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=Yn.getBuffered(e);return Yn.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=Yn.bufferedRanges(e);if(r.length)return Yn.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((m,_)=>m.start-_.start||_.end-m.end);let r=-1,i=[];if(n)for(let m=0;m<e.length;m++){t>=e[m].start&&t<=e[m].end&&(r=m);const _=i.length;if(_){const w=i[_-1].end;e[m].start-w<n?e[m].end>w&&(i[_-1].end=e[m].end):i.push(e[m])}else i.push(e[m])}else i=e;let s=0,A,f=t,u=t;for(let m=0;m<i.length;m++){const _=i[m].start,w=i[m].end;if(r===-1&&t>=_&&t<=w&&(r=m),t+n>=_&&t<w)f=_,u=w,s=u-t;else if(t+n<_){A=_;break}}return{len:s,start:f||0,end:u||0,nextStart:A,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Ii}catch(t){return ge.log("failed to get media.buffered",t),Ii}}}const ts=/\{\$([a-zA-Z0-9-_]+)\}/g;function As(a){return ts.test(a)}function ki(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(ts,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 Si(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 $i(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 _s=/^(\d+)x(\d+)$/,xs=/(.+?)=(".*?"|.*?)(?:,|$)/g;class ei{constructor(e,t){typeof e=="string"&&(e=ei.parseAttrList(e,t)),B(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=_s.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(xs.lastIndex=0;(n=xs.exec(e))!==null;){const s=n[1].trim();let A=n[2];const f=A.indexOf(i)===0&&A.lastIndexOf(i)===A.length-1;let u=!1;if(f)A=A.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":u=!0}if(t&&(f||u))A=ki(t,A);else if(!u&&!f)switch(s){case"CLOSED-CAPTIONS":if(A==="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":ge.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=A}return r}}const ds="com.apple.hls.interstitial";function ns(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Gi(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class qi{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]){ge.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=B(new ei({}),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"]);re(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?(ge.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(re(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===ds}get isValid(){return!!this.id&&!this._badValueForSameId&&re(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 Ss=10;class Pi{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?re(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Ss}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 hi(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function Mi(a,e){return!a&&!e?!0:!a||!e?!1:hi(a,e)}function Vi(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function Wi(a){switch(a){case"AES-128":case"AES-256":return hr.cbc;case"AES-256-CTR":return hr.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function vs(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Qs(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function Os(a){const e=Qs(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function os(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 Qr(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=vs(s)):t=Os(s)}}return t}const Ln=typeof self!="undefined"?self:void 0;var Bn={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 ti(a){switch(a){case vr.FAIRPLAY:return Bn.FAIRPLAY;case vr.PLAYREADY:return Bn.PLAYREADY;case vr.WIDEVINE:return Bn.WIDEVINE;case vr.CLEARKEY:return Bn.CLEARKEY}}function Pr(a){switch(a){case Bn.FAIRPLAY:return vr.FAIRPLAY;case Bn.PLAYREADY:return vr.PLAYREADY;case Bn.WIDEVINE:return vr.WIDEVINE;case Bn.CLEARKEY:return vr.CLEARKEY}}function ys(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[Bn.FAIRPLAY,Bn.WIDEVINE,Bn.PLAYREADY,Bn.CLEARKEY].filter(r=>!!e[r]):[];return!n[Bn.WIDEVINE]&&t&&n.push(Bn.WIDEVINE),n}const Qi=function(a){return Ln!=null&&(a=Ln.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Bi(a,e,t,n){let r;switch(a){case Bn.FAIRPLAY:r=["cenc","sinf"];break;case Bn.WIDEVINE:case Bn.PLAYREADY:r=["cenc"];break;case Bn.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Ys(r,e,t,n)}function Ys(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 Di(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Ga(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 A=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(A){const f=vs(A).subarray(0,16);return os(f),f}}return null}let ws={};class rs{static clearKeyUriToKeyIdMap(){ws={}}static setKeyIdForUri(e,t){ws[e]=t}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&&!Vi(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(Q(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&hi(e.keyFormatVersions,this.keyFormatVersions)&&Mi(e.iv,this.iv)&&Mi(e.keyId,this.keyId)}isSupported(){if(this.method){if(Vi(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(Vi(this.method)){let r=this.iv;return r||(typeof e!="number"&&(ge.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),r=oi(e)),new rs(this.method,this.uri,"identity",this.keyFormatVersions,r)}if(this.pssh&&this.keyId)return this;const t=Qr(this.uri);if(t)switch(this.keyFormat){case vr.WIDEVINE:if(this.pssh=t,!this.keyId){const r=on(t.buffer);if(r.length){var n;const i=r[0];this.keyId=(n=i.kids)!=null&&n.length?i.kids[0]:null}}if(!this.keyId){const r=t.length-22;this.keyId=t.subarray(r,r+16)}break;case vr.PLAYREADY:{const r=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=_n(r,null,t),this.keyId=Ga(t);break}default:{let r=t.subarray(0,16);if(r.length!==16){const i=new Uint8Array(16);i.set(r,16-r.length),r=i}this.keyId=r;break}}if(!this.keyId||this.keyId.byteLength!==16){let r=ws[this.uri];if(!r){const i=Object.keys(ws).length%Number.MAX_SAFE_INTEGER;r=new Uint8Array(16),new DataView(r.buffer,12,4).setUint32(0,i),rs.setKeyIdForUri(this.uri,r)}this.keyId=r}return this}}function oi(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const js=/#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,La=/#EXT-X-MEDIA:(.*)/g,ia=/^#EXT(?:INF|-X-TARGETDURATION):/m,Es=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),pa=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 gs{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 b.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return ia.test(e)}static parseMasterPlaylist(e,t){const n=As(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];if(js.lastIndex=0,!e.startsWith("#EXTM3U"))return r.playlistParsingError=new Error("no EXTM3U delimiter"),r;let s;for(;(s=js.exec(e))!=null;)if(s[1]){var A;const u=new ei(s[1],r),m=ki(r,s[2]),_={attrs:u,bitrate:u.decimalInteger("BANDWIDTH")||u.decimalInteger("AVERAGE-BANDWIDTH"),name:u.NAME,url:gs.resolve(m,t)},w=u.decimalResolution("RESOLUTION");w&&(_.width=w.width,_.height=w.height),Ni(u.CODECS,_);const I=u["SUPPLEMENTAL-CODECS"];I&&(_.supplemental={},Ni(I,_.supplemental)),(A=_.unknownCodecs)!=null&&A.length||i.push(_),r.levels.push(_)}else if(s[3]){const u=s[3],m=s[4];switch(u){case"SESSION-DATA":{const _=new ei(m,r),w=_["DATA-ID"];w&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[w]=_);break}case"SESSION-KEY":{const _=Ks(m,t,r);_.encrypted&&_.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(_)):ge.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${m}"`);break}case"DEFINE":{{const _=new ei(m,r);Si(r,_,t)}break}case"CONTENT-STEERING":{const _=new ei(m,r);r.contentSteering={uri:gs.resolve(_["SERVER-URI"],t),pathwayId:_["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=is(m);break}}}const f=i.length>0&&i.length<r.levels.length;return r.levels=f?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,A={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 f=0;for(La.lastIndex=0;(r=La.exec(e))!==null;){const u=new ei(r[1],n),m=u.TYPE;if(m){const _=A[m],w=i[m]||[];i[m]=w;const I=u.LANGUAGE,D=u["ASSOC-LANGUAGE"],G=u.CHANNELS,$=u.CHARACTERISTICS,pe=u["INSTREAM-ID"],ye={attrs:u,bitrate:0,id:f++,groupId:u["GROUP-ID"]||"",name:u.NAME||I||"",type:m,default:u.bool("DEFAULT"),autoselect:u.bool("AUTOSELECT"),forced:u.bool("FORCED"),lang:I,url:u.URI?gs.resolve(u.URI,t):""};if(D&&(ye.assocLang=D),G&&(ye.channels=G),$&&(ye.characteristics=$),pe&&(ye.instreamId=pe),_!=null&&_.length){const Ce=gs.findGroup(_,ye.groupId)||_[0];Fs(ye,Ce,"audioCodec"),Fs(ye,Ce,"textCodec")}w.push(ye)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var A;const f={url:t},u=new Pi(t),m=u.fragments,_=[];let w=null,I=0,D=0,G=0,$=0,pe=0,ye=null,Ce=new mt(r,f),$e,je,Dt,et=-1,wt=!1,_t=null,at;if(Es.lastIndex=0,u.m3u8=e,u.hasVariableRefs=As(e),((A=Es.exec(e))==null?void 0:A[0])!=="#EXTM3U")return u.playlistParsingError=new Error("Missing format identifier #EXTM3U"),u;for(;($e=Es.exec(e))!==null;){wt&&(wt=!1,Ce=new mt(r,f),Ce.playlistOffset=G,Ce.setStart(G),Ce.sn=I,Ce.cc=$,pe&&(Ce.bitrate=pe),Ce.level=n,w&&(Ce.initSegment=w,w.rawProgramDateTime&&(Ce.rawProgramDateTime=w.rawProgramDateTime,w.rawProgramDateTime=null),_t&&(Ce.setByteRange(_t),_t=null)));const sr=$e[1];if(sr){Ce.duration=parseFloat(sr);const Xn=(" "+$e[2]).slice(1);Ce.title=Xn||null,Ce.tagList.push(Xn?["INF",sr,Xn]:["INF",sr])}else if($e[3]){if(re(Ce.duration)){Ce.playlistOffset=G,Ce.setStart(G),Dt&&Ts(Ce,Dt,u),Ce.sn=I,Ce.level=n,Ce.cc=$,m.push(Ce);const Xn=(" "+$e[3]).slice(1);Ce.relurl=ki(u,Xn),ma(Ce,ye,_),ye=Ce,G+=Ce.duration,I++,D=0,wt=!0}}else{if($e=$e[0].match(pa),!$e){ge.warn("No matches on slow regex match for level playlist!");continue}for(je=1;je<$e.length&&$e[je]===void 0;je++);const Xn=(" "+$e[je]).slice(1),bn=(" "+$e[je+1]).slice(1),tr=$e[je+2]?(" "+$e[je+2]).slice(1):null;switch(Xn){case"BYTERANGE":ye?Ce.setByteRange(bn,ye):Ce.setByteRange(bn);break;case"PROGRAM-DATE-TIME":Ce.rawProgramDateTime=bn,Ce.tagList.push(["PROGRAM-DATE-TIME",bn]),et===-1&&(et=m.length);break;case"PLAYLIST-TYPE":u.type&&zi(u,Xn,$e),u.type=bn.toUpperCase();break;case"MEDIA-SEQUENCE":u.startSN!==0?zi(u,Xn,$e):m.length>0&&sa(u,Xn,$e),I=u.startSN=parseInt(bn);break;case"SKIP":{u.skippedSegments&&zi(u,Xn,$e);const Hn=new ei(bn,u),nr=Hn.decimalInteger("SKIPPED-SEGMENTS");if(re(nr)){u.skippedSegments+=nr;for(let Fn=nr;Fn--;)m.push(null);I+=nr}const Br=Hn.enumeratedString("RECENTLY-REMOVED-DATERANGES");Br&&(u.recentlyRemovedDateranges=(u.recentlyRemovedDateranges||[]).concat(Br.split(" ")));break}case"TARGETDURATION":u.targetduration!==0&&zi(u,Xn,$e),u.targetduration=Math.max(parseInt(bn),1);break;case"VERSION":u.version!==null&&zi(u,Xn,$e),u.version=parseInt(bn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":u.live||zi(u,Xn,$e),u.live=!1;break;case"#":(bn||tr)&&Ce.tagList.push(tr?[bn,tr]:[bn]);break;case"DISCONTINUITY":$++,Ce.tagList.push(["DIS"]);break;case"GAP":Ce.gap=!0,Ce.tagList.push([Xn]);break;case"BITRATE":Ce.tagList.push([Xn,bn]),pe=parseInt(bn)*1e3,re(pe)?Ce.bitrate=pe:pe=0;break;case"DATERANGE":{const Hn=new ei(bn,u),nr=new qi(Hn,u.dateRanges[Hn.ID],u.dateRangeTagCount);u.dateRangeTagCount++,nr.isValid||u.skippedSegments?u.dateRanges[nr.id]=nr:ge.warn(`Ignoring invalid DATERANGE tag: "${bn}"`),Ce.tagList.push(["EXT-X-DATERANGE",bn]);break}case"DEFINE":{{const Hn=new ei(bn,u);"IMPORT"in Hn?$i(u,Hn,s):Si(u,Hn,t)}break}case"DISCONTINUITY-SEQUENCE":u.startCC!==0?zi(u,Xn,$e):m.length>0&&sa(u,Xn,$e),u.startCC=$=parseInt(bn);break;case"KEY":{const Hn=Ks(bn,t,u);if(Hn.isSupported()){if(Hn.method==="NONE"){Dt=void 0;break}Dt||(Dt={});const nr=Dt[Hn.keyFormat];nr!=null&&nr.matches(Hn)||(nr&&(Dt=B({},Dt)),Dt[Hn.keyFormat]=Hn)}else ge.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${bn}"`);break}case"START":u.startTimeOffset=is(bn);break;case"MAP":{const Hn=new ei(bn,u);if(Ce.duration){const nr=new mt(r,f);_a(nr,Hn,n,Dt),w=nr,Ce.initSegment=w,w.rawProgramDateTime&&!Ce.rawProgramDateTime&&(Ce.rawProgramDateTime=w.rawProgramDateTime)}else{const nr=Ce.byteRangeEndOffset;if(nr){const Br=Ce.byteRangeStartOffset;_t=`${nr-Br}@${Br}`}else _t=null;_a(Ce,Hn,n,Dt),w=Ce,wt=!0}w.cc=$;break}case"SERVER-CONTROL":{at&&zi(u,Xn,$e),at=new ei(bn),u.canBlockReload=at.bool("CAN-BLOCK-RELOAD"),u.canSkipUntil=at.optionalFloat("CAN-SKIP-UNTIL",0),u.canSkipDateRanges=u.canSkipUntil>0&&at.bool("CAN-SKIP-DATERANGES"),u.partHoldBack=at.optionalFloat("PART-HOLD-BACK",0),u.holdBack=at.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{u.partTarget&&zi(u,Xn,$e);const Hn=new ei(bn);u.partTarget=Hn.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Hn=u.partList;Hn||(Hn=u.partList=[]);const nr=D>0?Hn[Hn.length-1]:void 0,Br=D++,Fn=new ei(bn,u),Tn=new Gt(Fn,Ce,f,Br,nr);Hn.push(Tn),Ce.duration+=Tn.duration;break}case"PRELOAD-HINT":{const Hn=new ei(bn,u);u.preloadHint=Hn;break}case"RENDITION-REPORT":{const Hn=new ei(bn,u);u.renditionReports=u.renditionReports||[],u.renditionReports.push(Hn);break}default:ge.warn(`line parsed but not handled: ${$e}`);break}}}ye&&!ye.relurl?(m.pop(),G-=ye.duration,u.partList&&(u.fragmentHint=ye)):u.partList&&(ma(Ce,ye,_),Ce.cc=$,u.fragmentHint=Ce,Dt&&Ts(Ce,Dt,u)),u.targetduration||(u.playlistParsingError=new Error("Missing Target Duration"));const Jt=m.length,In=m[0],jn=m[Jt-1];if(G+=u.skippedSegments*u.targetduration,G>0&&Jt&&jn){u.averagetargetduration=G/Jt;const sr=jn.sn;u.endSN=sr!=="initSegment"?sr:0,u.live||(jn.endList=!0),et>0&&(Wa(m,et),In&&_.unshift(In))}return u.fragmentHint&&(G+=u.fragmentHint.duration),u.totalduration=G,_.length&&u.dateRangeTagCount&&In&&Va(_,u),u.endCC=$,u}}function Va(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const A=e.fragments[e.fragments.length-1];a.push(A),t++}else return;const n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let A=i.length;A--;){const f=e.dateRanges[i[A]],u=f.startDate.getTime();f.tagAnchor=n.ref;for(let m=t;m--;){var s;if(((s=a[m])==null?void 0:s.sn)<e.startSN)break;const _=ls(e,u,a,m,r);if(_!==-1){f.tagAnchor=e.fragments[_].ref;break}}}}function ls(a,e,t,n,r){const i=t[n];if(i){const A=i.programDateTime;if(e>=A||n===0){var s;const f=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=A+f*1e3){const u=t[n].sn-a.startSN;if(u<0)return-1;const m=a.fragments;if(m.length>t.length){const w=(t[n+1]||m[m.length-1]).sn-a.startSN;for(let I=w;I>u;I--){const D=m[I].programDateTime;if(e>=D&&e<D+m[I].duration*1e3)return I}}return u}}}return-1}function Ks(a,e,t){var n,r;const i=new ei(a,t),s=(n=i.METHOD)!=null?n:"",A=i.URI,f=i.hexadecimalInteger("IV"),u=i.KEYFORMATVERSIONS,m=(r=i.KEYFORMAT)!=null?r:"identity";A&&i.IV&&!f&&ge.error(`Invalid IV: ${i.IV}`);const _=A?gs.resolve(A,e):"",w=(u||"1").split("/").map(Number).filter(Number.isFinite);return new rs(s,_,m,w,f,i.KEYID)}function is(a){const t=new ei(a).decimalFloatingPoint("TIME-OFFSET");return re(t)?t:null}function Ni(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>Xt(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 Fs(a,e,t){const n=e[t];n&&(a[t]=n)}function Wa(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 ma(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function _a(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 zi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function sa(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function Bs(a,e){const t=e.startPTS;if(re(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 us(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 f=t,u=n;const m=e.startPTS,_=e.endPTS;if(re(m)){const pe=Math.abs(m-t);a&&pe>a.totalduration?s.warn(`media timestamps and playlist times differ by ${pe}s for level ${e.level} ${a.url}`):re(e.deltaPTS)?e.deltaPTS=Math.max(pe,e.deltaPTS):e.deltaPTS=pe,f=Math.max(t,m),t=Math.min(t,m),r=e.startDTS!==void 0?Math.min(r,e.startDTS):r,u=Math.min(n,_),n=Math.max(n,_),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const w=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=f,e.startDTS=r,e.endPTS=n,e.minEndPTS=u,e.endDTS=i;const I=e.sn;if(!a||I<a.startSN||I>a.endSN)return 0;let D;const G=I-a.startSN,$=a.fragments;for($[G]=e,D=G;D>0;D--)Bs($[D],$[D-1]);for(D=G;D<$.length-1;D++)Bs($[D],$[D+1]);return a.fragmentHint&&Bs($[$.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,w}function za(a,e,t){if(a===e)return;let n=null;const r=a.fragments;for(let m=r.length-1;m>=0;m--){const _=r[m].initSegment;if(_){n=_;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;pA(a,e,(m,_,w,I)=>{if((!e.startCC||e.skippedSegments)&&_.cc!==m.cc){const D=m.cc-_.cc;for(let G=w;G<I.length;G++)I[G].cc+=D;e.endCC=I[I.length-1].cc}re(m.startPTS)&&re(m.endPTS)&&(_.setStart(_.startPTS=m.startPTS),_.startDTS=m.startDTS,_.maxStartPTS=m.maxStartPTS,_.endPTS=m.endPTS,_.endDTS=m.endDTS,_.minEndPTS=m.minEndPTS,_.setDuration(m.endPTS-m.startPTS),_.duration&&(i=_),e.PTSKnown=e.alignedSliding=!0),m.hasStreams&&(_.elementaryStreams=m.elementaryStreams),_.loader=m.loader,m.hasStats&&(_.stats=m.stats),m.initSegment&&(_.initSegment=m.initSegment,n=m.initSegment)});const s=e.fragments,A=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&A.forEach(m=>{var _;m&&(!m.initSegment||m.initSegment.relurl===((_=n)==null?void 0:_.relurl))&&(m.initSegment=n)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(m=>!m),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let m=e.skippedSegments;m--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=$s(a.dateRanges,e,t));const m=a.fragments.filter(_=>_.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let _=1;_<A.length;_++)A[_].programDateTime===null&&ma(A[_],A[_-1],m);Va(m,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var f;const m=Ya(a,e.startSN-1);e.startCC=(f=m==null?void 0:m.cc)!=null?f:s[0].cc}gA(a.partList,e.partList,(m,_)=>{_.elementaryStreams=m.elementaryStreams,_.stats=m.stats}),i?us(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):ss(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 m=e.edge;e.driftStart||(e.driftStartTime=u,e.driftStart=m),e.driftEndTime=u,e.driftEnd=m}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function $s(a,e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=e,i=B({},a);r&&r.forEach(f=>{delete i[f]});const A=Object.keys(i).length;return A?(Object.keys(n).forEach(f=>{const u=i[f],m=new qi(n[f].attr,u);m.isValid?(i[f]=m,u||(m.tagOrder+=A)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Vt(n[f].attr)}"`)}),i):n}function gA(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],A=e[r+n];s&&A&&s.index===A.index&&s.fragment.sn===A.fragment.sn?t(s,A):n--}}}function pA(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,A=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,f=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let u=r;u<=i;u++){const m=f[s+u];let _=A[u];if(n&&!_&&m&&(_=e.fragments[u]=m),m&&_){t(m,_,u,A);const w=m.relurl,I=_.relurl;if(w&&ni(w,I)){e.playlistParsingError=va(`media sequence mismatch ${_.sn}:`,a,e,m,_);return}else if(m.cc!==_.cc){e.playlistParsingError=va(`discontinuity sequence mismatch (${m.cc}!=${_.cc})`,a,e,m,_);return}}}}function va(a,e,t,n,r){return new Error(`${a} ${r.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function ss(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;ya(e,s)}function ya(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 Za(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 Ya(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 aa(a,e,t){return a?ja(a.partList,e,t):null}function ja(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 mi(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 ni(a,e){return a!==e&&e?ui(a)!==ui(e):!1}function ui(a){return a.replace(/\?[^?]*$/,"")}function Li(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 Fi(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Gs(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function Aa(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)Gs(t[n],a);e.fragmentHint&&Gs(e.fragmentHint,a),e.alignedSliding=!0}function Ua(a,e){a&&(Ra(e,a),e.alignedSliding||Ps(e,a),!e.alignedSliding&&!e.skippedSegments&&ss(a,e,!1))}function Ra(a,e){if(!Fi(e,a))return;const t=Math.min(e.endCC,a.endCC),n=Li(e.fragments,t),r=Li(a.fragments,t);if(!n||!r)return;ge.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;Aa(i,a)}function Ps(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=Li(n,s),i=Li(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=Li(t,r.cc)||t[Math.floor(t.length/2)]);const A=r.programDateTime,f=i.programDateTime;if(!A||!f)return;const u=(f-A)/1e3-(i.start-r.start);Aa(u,a)}function Oi(a,e,t){Zi(a,e,t),a.addEventListener(e,t)}function Zi(a,e,t){a.removeEventListener(e,t)}const oa={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}},Nt={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 Xa extends Ai{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=Nt.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:A,media:f,mediaBuffer:u,state:m}=this,_=f?f.currentTime:0,w=Yn.bufferInfo(u||f,_,s.maxBufferHole),I=!w.len;if(this.log(`Media seeking to ${re(_)?_.toFixed(3):_}, state: ${m}, ${I?"out of":"in"} buffer`),this.state===Nt.ENDED)this.resetLoadingState();else if(A){const D=s.maxFragLookUpTolerance,G=A.start-D,$=A.start+A.duration+D;if(I||$<w.start||G>w.end){const pe=_>$;(_<G||pe)&&(pe&&A.loader&&(this.log(`Cancelling fragment load for seek (sn: ${A.sn})`),A.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(f){this.fragmentTracker.removeFragmentsInRange(_,1/0,this.playlistType,!0);const D=this.lastCurrentTime;if(_>D&&(this.lastCurrentTime=_),!this.loadingParts){const G=Math.max(w.end,_),$=this.shouldLoadParts(this.getLevelDetails(),G);$&&(this.log(`LL-Part loading ON after seeking to ${_.toFixed(2)} with buffer @${G.toFixed(2)}`),this.loadingParts=$)}}this.hls.hasEnoughToStart||(this.log(`Setting ${I?"startPosition":"nextLoadPosition"} to ${_} for seek without enough to start`),this.nextLoadPosition=_,I&&(this.startPosition=_)),I&&this.state===Nt.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 Dr(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new cr(e.config)}registerListeners(){const{hls:e}=this;e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Nt.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=Nt.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=Yn.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>r&&s<t.edge||this.media.currentTime<e.start)return!1;const f=t.partList;if(f!=null&&f.length){const m=f[f.length-1];return Yn.isBuffered(this.media,m.start+m.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;Oi(n,"seeking",this.onMediaSeeking),Oi(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===Nt.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),Zi(r,"seeking",this.onMediaSeeking),Zi(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=Nt.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,A=i.frag;if(this.fragContextChanged(A)){(s===Nt.FRAG_LOADING||!this.fragCurrent&&s===Nt.PARSING)&&(this.fragmentTracker.removeFragment(A),this.state=Nt.IDLE);return}"payload"in i&&(this.log(`Loaded ${A.type} sn: ${A.sn} of ${this.playlistLabel()} ${A.level}`),this.hls.trigger(y.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Nt.STOPPED||this.state===Nt.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)===dn.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),A=Math.max(e.duration,s?s.len:this.config.maxBufferLength),f=this.backtrackFragment;((f?e.sn-f.sn:0)===1||this.reduceMaxBufferLength(A,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)===dn.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(y.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,A=i.decryptdata;if(s&&s.byteLength>0&&A!=null&&A.key&&A.iv&&Vi(A.method)){const f=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),A.key.buffer,A.iv.buffer,Wi(A.method)).catch(u=>{throw r.trigger(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.FRAG_DECRYPT_ERROR,fatal:!1,error:u,reason:u.message,frag:i}),u}).then(u=>{const m=self.performance.now();return r.trigger(y.FRAG_DECRYPTED,{frag:i,payload:u,stats:{tstart:f,tdecrypt:m}}),n.payload=u,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Nt.STOPPED||this.state===Nt.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!==Nt.STOPPED&&(this.state=Nt.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,A=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(A.message),!s||s.mediaKeys?!1:(this.hls.trigger(y.ERROR,{type:xe.KEY_SYSTEM_ERROR,details:ne.KEY_SYSTEM_NO_KEYS,fatal:!1,error:A,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?oa.toString(Yn.getBuffered(n)):"(detached)"})`),qe(e)){var r;if(e.type!==V.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(A=>!!s[A])){this.state=Nt.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=Nt.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(f=>!f),A=new Hr(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(A)}_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 A=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=Nt.KEY_LOADING,this.fragCurrent=e,A=this.keyLoader.load(e).then(w=>{if(!this.fragContextChanged(w.frag))return this.hls.trigger(y.KEY_LOADED,w),this.state===Nt.KEY_LOADING&&(this.state=Nt.IDLE),w}),this.hls.trigger(y.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(A=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),A&&this.log("[eme] blocking frag load until media-keys acquired"));const f=this.fragPrevious;if(qe(e)&&(!f||e.sn!==f.sn)){const w=this.shouldLoadParts(t.details,e.end);w!==this.loadingParts&&(this.log(`LL-Part loading ${w?"ON":"OFF"} loading sn ${f==null?void 0:f.sn}->${e.sn}`),this.loadingParts=w)}if(n=Math.max(e.start,n||0),this.loadingParts&&qe(e)){const w=s.partList;if(w&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const I=this.getNextPart(w,e,n);if(I>-1){const D=w[I];e=this.fragCurrent=D.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${D.index} (${I}/${w.length-1}) of ${this.fragInfo(e,!1,D)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=D.start+D.duration,this.state=Nt.FRAG_LOADING;let G;return A?G=A.then($=>!$||this.fragContextChanged($.frag)?null:this.doFragPartsLoad(e,D,t,r)).catch($=>this.handleFragLoadError($)):G=this.doFragPartsLoad(e,D,t,r).catch($=>this.handleFragLoadError($)),this.hls.trigger(y.FRAG_LOADING,{frag:e,part:D,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):G}else if(!e.url||this.loadedEndOfParts(w,n))return Promise.resolve(null)}}if(qe(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(w=>w.loaded).map(w=>`[${w.start}-${w.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))}`),re(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Nt.FRAG_LOADING;const m=this.config.progressive;let _;return m&&A?_=A.then(w=>!w||this.fragContextChanged(w.frag)?null:this.fragmentLoader.load(e,r)).catch(w=>this.handleFragLoadError(w)):_=Promise.all([this.fragmentLoader.load(e,m?r:void 0),A]).then(([w])=>(!m&&r&&r(w),w)).catch(w=>this.handleFragLoadError(w)),this.hls.trigger(y.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):_}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var A;const f=[],u=(A=n.details)==null?void 0:A.partList,m=_=>{this.fragmentLoader.loadPart(e,_,r).then(w=>{f[_.index]=w;const I=w.part;this.hls.trigger(y.FRAG_LOADED,w);const D=aa(n.details,e.sn,_.index+1)||ja(u,e.sn,_.index+1);if(D)m(D);else return i({frag:e,part:I,partsLoaded:f})}).catch(s)};m(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===ne.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===xe.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(y.ERROR,t)}else this.hls.trigger(y.ERROR,{type:xe.OTHER_ERROR,details:ne.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Nt.PARSING){!this.fragCurrent&&this.state!==Nt.STOPPED&&this.state!==Nt.ERROR&&(this.state=Nt.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 A=this.getLevelDetails(),u=A&&n.sn>A.endSN||this.shouldLoadParts(A,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===V.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 A=t[r],f=A.details,u=s>-1?aa(f,i,s):null,m=u?u.fragment:Ya(f,i,n);return m?(n&&n!==m&&(m.stats=n.stats),{frag:m,part:u,level:A}):null}bufferFragmentData(e,t,n,r,i){if(this.state!==Nt.PARSING)return;const{data1:s,data2:A}=e;let f=s;if(A&&(f=yt(s,A)),!f.length)return;const u=this.initPTS[t.cc],m=u?-u.baseTime/u.timescale:void 0,_={type:e.type,frag:t,part:n,chunkMeta:r,offset:m,parent:t.type,data:f};if(this.hls.trigger(y.BUFFER_APPENDING,_),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Yn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=Yn.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),A=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-A>s&&this.flushMainBuffer(A,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!re(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=Yn.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 A=Math.max(Math.min(i.nextStart,s.end)-t,r);return Yn.bufferInfo(e,t,A)}}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=V.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,A=i.lowLatencyMode&&!!t.partList;let f=null;if(t.live){const _=i.initialLiveManifestSize;if(r<_)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${_})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var u;A&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),f=this.getInitialLiveFragment(t);const w=this.hls.startPosition,I=this.hls.liveSyncPosition,D=f?(w!==-1&&w>=s?w:I)||f.start:e;this.log(`Setting startPosition to ${D} to match start frag at live edge. mainStart: ${w} liveSyncPosition: ${I} frag.start: ${(u=f)==null?void 0:u.start}`),this.startPosition=this.nextLoadPosition=D}}else e<=s&&(f=n[0]);if(!f){const _=this.loadingParts?t.partEnd:t.fragmentEnd;f=this.getFragmentAtPosition(e,_,t)}let m=this.filterReplacedPrimary(f,t);if(!m&&f){const _=f.sn-t.startSN;m=this.filterReplacedPrimary(n[_+1]||null,t)}return this.mapToInitFragWhenRequired(m)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===dn.OK||n===dn.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 A=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(A!==null&&n.len+A.len>=i){const f=s.sn;return this.loopSn!==f&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${f}`),this.loopSn=f),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(RA(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(RA(this.config)&&e.type!==V.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 A=i[s].interstitial;if(A.appendInPlace&&e.start>=A.startTime&&e.end<=A.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 A=0,f=e.length;A<f;A++){const u=e[A];if(s=s&&!u.independent,r>-1&&n<u.start)break;const m=u.loaded;m?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=A),i=m}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=he(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=Ct(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:A}=n;const{fragmentHint:f}=n,{maxFragLookUpTolerance:u}=r,m=n.partList,_=!!(this.loadingParts&&m!=null&&m.length&&f);_&&!this.bitrateTest&&m[m.length-1].fragment.sn===f.sn&&(s=s.concat(f),A=f.sn);let w;if(e<t){var I;const G=e<this.lastCurrentTime||e>t-u||(I=this.media)!=null&&I.paused||!this.startFragRequested?0:u;w=ve(i,s,e,G)}else w=s[s.length-1];if(w){const D=w.sn-n.startSN,G=this.fragmentTracker.getState(w);if((G===dn.OK||G===dn.PARTIAL&&w.gap)&&(i=w),i&&w.sn===i.sn&&(!_||m[0].fragment.sn>w.sn||!n.live)&&w.level===i.level){const pe=s[D+1];w.sn<A&&this.fragmentTracker.getState(pe)!==dn.OK?w=pe:w=null}}return w}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,A=e.alignedSliding&&re(i);if(s||!A&&!i){Ua(n,e);const f=e.fragmentStart;return this.log(`Live playlist sliding: ${f.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),f}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&&re(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&&qe(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!==Nt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Nt.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const pe=this.getCurrentContext(t.chunkMeta);pe&&(t.frag=pe.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===ne.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const A=t.errorAction;if(!A){this.state=Nt.ERROR;return}const{action:f,flags:u,retryCount:m=0,retryConfig:_}=A,w=!!_,I=w&&f===an.RetryRequest,D=w&&!A.resolved&&u===En.MoveAllAlternatesMatchingHost,G=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!I&&D&&qe(r)&&!r.endList&&G&&!Le(t))this.resetFragmentErrors(e),this.treatAsGap(r),A.resolved=!0;else if((I||D)&&m<_.maxNumRetry){var $;const pe=ln(($=t.response)==null?void 0:$.code),ye=Ot(_,m);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+ye,this.state=Nt.FRAG_LOADING_WAITING_RETRY,A.resolved=!0,pe){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 ${m+1}/${_.maxNumRetry} in ${ye}ms`)}else if(_)if(this.resetFragmentErrors(e),m<_.maxNumRetry)!s&&f!==an.RemoveAlternatePermanently&&(A.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${m})`);return}else f===an.SendAlternateToPenaltyBox?this.state=Nt.WAITING_LEVEL:this.state=Nt.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!ln(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Nt.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===Nt.PARSING||this.state===Nt.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===V.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Nt.STOPPED&&(this.state=Nt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=Yn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Nt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Nt.STOPPED&&(this.state=Nt.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((f,u)=>{const m=e.elementaryStreams[u];if(m){const _=m.endPTS-m.startPTS;if(_<=0)return this.warn(`Could not parse fragment ${e.sn} ${u} duration reliably (${_})`),f||!1;const w=r?0:us(i,e,m.startPTS,m.endPTS,m.startDTS,m.endDTS,this);return this.hls.trigger(y.LEVEL_PTS_UPDATED,{details:i,level:n,drift:w,type:u,frag:e,start:m.startPTS,end:m.endPTS}),!0}return f},!1)){var A;if(n.fragmentError===0&&this.treatAsGap(e,n),((A=this.transmuxer)==null?void 0:A.error)===null){const f=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(f.message),this.hls.trigger(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.FRAG_PARSING_ERROR,fatal:!1,error:f,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Nt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(y.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===V.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 RA(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class kA{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=Bo(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function Bo(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 mA={exports:{}},_A;function wa(){return _A||(_A=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(f,u,m){this.fn=f,this.context=u,this.once=m||!1}function i(f,u,m,_,w){if(typeof m!="function")throw new TypeError("The listener must be a function");var I=new r(m,_||f,w),D=t?t+u:u;return f._events[D]?f._events[D].fn?f._events[D]=[f._events[D],I]:f._events[D].push(I):(f._events[D]=I,f._eventsCount++),f}function s(f,u){--f._eventsCount===0?f._events=new n:delete f._events[u]}function A(){this._events=new n,this._eventsCount=0}A.prototype.eventNames=function(){var u=[],m,_;if(this._eventsCount===0)return u;for(_ in m=this._events)e.call(m,_)&&u.push(t?_.slice(1):_);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(m)):u},A.prototype.listeners=function(u){var m=t?t+u:u,_=this._events[m];if(!_)return[];if(_.fn)return[_.fn];for(var w=0,I=_.length,D=new Array(I);w<I;w++)D[w]=_[w].fn;return D},A.prototype.listenerCount=function(u){var m=t?t+u:u,_=this._events[m];return _?_.fn?1:_.length:0},A.prototype.emit=function(u,m,_,w,I,D){var G=t?t+u:u;if(!this._events[G])return!1;var $=this._events[G],pe=arguments.length,ye,Ce;if($.fn){switch($.once&&this.removeListener(u,$.fn,void 0,!0),pe){case 1:return $.fn.call($.context),!0;case 2:return $.fn.call($.context,m),!0;case 3:return $.fn.call($.context,m,_),!0;case 4:return $.fn.call($.context,m,_,w),!0;case 5:return $.fn.call($.context,m,_,w,I),!0;case 6:return $.fn.call($.context,m,_,w,I,D),!0}for(Ce=1,ye=new Array(pe-1);Ce<pe;Ce++)ye[Ce-1]=arguments[Ce];$.fn.apply($.context,ye)}else{var $e=$.length,je;for(Ce=0;Ce<$e;Ce++)switch($[Ce].once&&this.removeListener(u,$[Ce].fn,void 0,!0),pe){case 1:$[Ce].fn.call($[Ce].context);break;case 2:$[Ce].fn.call($[Ce].context,m);break;case 3:$[Ce].fn.call($[Ce].context,m,_);break;case 4:$[Ce].fn.call($[Ce].context,m,_,w);break;default:if(!ye)for(je=1,ye=new Array(pe-1);je<pe;je++)ye[je-1]=arguments[je];$[Ce].fn.apply($[Ce].context,ye)}}return!0},A.prototype.on=function(u,m,_){return i(this,u,m,_,!1)},A.prototype.once=function(u,m,_){return i(this,u,m,_,!0)},A.prototype.removeListener=function(u,m,_,w){var I=t?t+u:u;if(!this._events[I])return this;if(!m)return s(this,I),this;var D=this._events[I];if(D.fn)D.fn===m&&(!w||D.once)&&(!_||D.context===_)&&s(this,I);else{for(var G=0,$=[],pe=D.length;G<pe;G++)(D[G].fn!==m||w&&!D[G].once||_&&D[G].context!==_)&&$.push(D[G]);$.length?this._events[I]=$.length===1?$[0]:$:s(this,I)}return this},A.prototype.removeAllListeners=function(u){var m;return u?(m=t?t+u:u,this._events[m]&&s(this,m)):(this._events=new n,this._eventsCount=0),this},A.prototype.off=A.prototype.removeListener,A.prototype.addListener=A.prototype.on,A.prefixed=t,A.EventEmitter=A,a.exports=A}(mA)),mA.exports}var bo=wa(),_i=q(bo);const Xs="1.6.12",Ea={};function dl(){return typeof __HLS_WORKER_BUNDLE__=="function"}function gl(){const a=Ea[Xs];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 Ea[Xs]=r,r}function cu(a){const e=Ea[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 Ea[a]=r,r}function vA(a){const e=Ea[a||Xs];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete Ea[a||Xs],r&&self.URL.revokeObjectURL(r),n.terminate()}}function QA(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 OA(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 Vs(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 ka(a,e){const t=e;let n=0;for(;OA(a,e);){n+=10;const r=Vs(a,e+6);n+=r,QA(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function Ja(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 I=new Error(`invalid ADTS sampling index:${s}`);a.emit(y.ERROR,y.ERROR,{type:xe.MEDIA_ERROR,details:ne.FRAG_PARSING_ERROR,fatal:!0,error:I,reason:I.message});return}const A=(i>>6&3)+1,f=e[t+3]>>6&3|(i&1)<<2,u="mp4a.40."+A,m=r[s];let _=s;(A===5||A===29)&&(_-=3);const w=[A<<3|(_&14)>>1,(_&1)<<7|f<<3];return ge.log(`manifest codec:${n}, parsed codec:${u}, channels:${f}, rate:${m} (ADTS object type:${A} sampling index:${s})`),{config:w,samplerate:m,channelCount:f,codec:u,parsedCodec:u,manifestCodec:n}}function PA(a,e){return a[e]===255&&(a[e+1]&246)===240}function MA(a,e){return a[e+1]&1?7:9}function NA(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Co(a,e){return e+5<a.length}function Js(a,e){return e+1<a.length&&PA(a,e)}function HA(a,e){return Co(a,e)&&PA(a,e)&&NA(a,e)<=a.length-e}function pl(a,e){if(Js(a,e)){const t=MA(a,e);if(e+t>=a.length)return!1;const n=NA(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||Js(a,r)}return!1}function KA(a,e,t,n,r){if(!a.samplerate){const i=Ja(e,t,n,r);if(!i)return;B(a,i)}}function xo(a){return 1024*9e4/a}function ml(a,e){const t=MA(a,e);if(e+t<=a.length){const n=NA(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function So(a,e,t,n,r){const i=xo(a.samplerate),s=n+r*i,A=ml(e,t);let f;if(A){const{frameLength:_,headerLength:w}=A,I=w+_,D=Math.max(0,t+I-e.length);D?(f=new Uint8Array(I-w),f.set(e.subarray(t+w,e.length),0)):f=e.subarray(t+w,t+I);const G={unit:f,pts:s};return D||a.samples.push(G),{sample:G,length:I,missing:D}}const u=e.length-t;return f=new Uint8Array(u),f.set(e.subarray(t,e.length),0),{sample:{unit:f,pts:s},length:u,missing:-1}}function _l(a,e){return OA(a,e)&&Vs(a,e+6)+10<=a.length-e}function vl(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function $A(a,e=0,t=1/0){return yl(a,e,t,Uint8Array)}function yl(a,e,t,n){const r=yA(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=wl(a)?a.byteOffset:0,A=(s+a.byteLength)/i,f=(s+e)/i,u=Math.floor(Math.max(0,Math.min(f,A))),m=Math.floor(Math.min(u+Math.max(t,0),A));return new n(r,u,m-u)}function yA(a){return a instanceof ArrayBuffer?a:a.buffer}function wl(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function El(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=nt($A(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const A=nt($A(a.data,3+n,s));let f;return r==="-->"?f=nt($A(a.data,4+n+s)):f=vl(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=A,e.data=f,e}function Fo(a){if(a.size<2)return;const e=nt(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function Bl(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=nt(a.data.subarray(t),!0);t+=n.length+1;const r=nt(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=nt(a.data.subarray(1));return{key:a.type,info:"",data:e}}function bl(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=nt(a.data.subarray(t),!0);t+=n.length+1;const r=nt(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=nt(a.data);return{key:a.type,info:"",data:e}}function GA(a){return a.type==="PRIV"?Fo(a):a.type[0]==="W"?bl(a):a.type==="APIC"?El(a):Bl(a)}function Is(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=Vs(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const wA=10,Cl=10;function VA(a){let e=0;const t=[];for(;OA(a,e);){const n=Vs(a,e+6);a[e+5]>>6&1&&(e+=wA),e+=wA;const r=e+n;for(;e+Cl<r;){const i=Is(a.subarray(e)),s=GA(i);s&&t.push(s),e+=i.size+wA}QA(a,e)&&(e+=wA)}return t}function To(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function xl(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 Ba(a){const e=VA(a);for(let t=0;t<e.length;t++){const n=e[t];if(To(n))return xl(n)}}let ji=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 Ds(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class WA{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=yt(this.cachedData,e),this.cachedData=null);let n=ka(e,0),r=n?n.length:0,i;const s=this._audioTrack,A=this._id3Track,f=n?Ba(n):void 0,u=e.length;for((this.basePTS===null||this.frameIndex===0&&re(f))&&(this.basePTS=Io(f,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&A.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:ji.audioId3,duration:Number.POSITIVE_INFINITY});r<u;){if(this.canParse(e,r)){const m=this.appendFrame(s,e,r);m?(this.frameIndex++,this.lastPTS=m.sample.pts,r+=m.length,i=r):r=u}else _l(e,r)?(n=ka(e,r),A.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:ji.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===u&&i!==u){const m=e.slice(i);this.cachedData?this.cachedData=yt(this.cachedData,m):this.cachedData=m}}return{audioTrack:s,videoTrack:Ds(),id3Track:A,textTrack:Ds()}}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:Ds(),id3Track:this._id3Track,textTrack:Ds()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const Io=(a,e,t)=>{if(re(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let EA=null;const qa=[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],zA=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Sl=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Fl=[0,1,1,4];function Do(a,e,t,n,r){if(t+24>e.length)return;const i=Lo(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,A=n+r*s,f={unit:e.subarray(t,t+i.frameLength),pts:A,dts:A};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(f),{sample:f,length:i.frameLength,missing:0}}}function Lo(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,A=a[e+3]>>6,f=t===3?3-n:n===3?3:4,u=qa[f*14+r-1]*1e3,_=zA[(t===3?0:t===2?1:2)*3+i],w=A===3?1:2,I=Sl[t][n],D=Fl[n],G=I*8*D,$=Math.floor(I*u/_+s)*D;if(EA===null){const Ce=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);EA=Ce?parseInt(Ce[1]):0}return!!EA&&EA<=87&&n===2&&u>=224e3&&A===0&&(a[e+3]=a[e+3]|128),{sampleRate:_,channelCount:w,frameLength:$,samplesPerFrame:G}}}function ZA(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function Uo(a,e){return e+1<a.length&&ZA(a,e)}function Ro(a,e){return ZA(a,e)&&4<=a.length-e}function ko(a,e){if(e+1<a.length&&ZA(a,e)){const n=Lo(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||Uo(a,i)}return!1}class Tl extends WA{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=ka(e,0);let r=(n==null?void 0:n.length)||0;if(ko(e,r))return!1;for(let i=e.length;r<i;r++)if(pl(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return HA(e,t)}appendFrame(e,t,n){KA(e,this.observer,t,n,e.manifestCodec);const r=So(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const Qo=(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 A=Math.min(n,8),f=8-A;i[0]=4278190080>>>24+f<<f,r[0]=(s[0]&i[0])>>f,t=t?t<<A|r[0]:r[0],e+=1,n-=A}return t};class eA extends WA{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=Oo(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=ka(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&Ba(t)!==void 0&&Qo(e,n)<16}}function Oo(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 A=[48e3,44100,32e3][i],f=e[t+4]&63,m=[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][f*3+i]*2;if(t+m>e.length)return-1;const _=e[t+6]>>5;let w=0;_===2?w+=2:(_&1&&_!==1&&(w+=2),_&4&&(w+=2));const I=(e[t+6]<<8|e[t+7])>>12-w&1,G=[2,1,2,3,3,4,4,5][_]+I,$=e[t+5]>>3,pe=e[t+5]&7,ye=new Uint8Array([i<<6|$<<1|pe>>2,(pe&3)<<6|_<<3|I<<2|f>>4,f<<4&224]),Ce=1536/A*9e4,$e=n+r*Ce,je=e.subarray(t,t+m);return a.config=ye,a.channelCount=G,a.samplerate=A,a.samples.push({unit:je,pts:$e}),m}class Il extends WA{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=ka(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&Ba(t)!==void 0&&Qo(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(ko(e,n))return ge.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return Ro(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return Do(e,t,n,this.basePTS,this.frameIndex)}}const Po=/\/emsg[-/]ID3/i;class Dl{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=Ds("video",1),s=this.audioTrack=Ds("audio",1),A=this.txtTrack=Ds("text",1);if(this.id3Track=Ds("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const f=X(e);if(f.video){const{id:u,timescale:m,codec:_,supplemental:w}=f.video;i.id=u,i.timescale=A.timescale=m,i.codec=_,i.supplemental=w}if(f.audio){const{id:u,timescale:m,codec:_}=f.audio;s.id=u,s.timescale=m,s.codec=_}A.id=Xe.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return P(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=yt(this.remainderData,e));const A=Rt(n);this.remainderData=A.remainder,r.samples=A.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=xt(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=xt(e,t),{videoTrack:t,audioTrack:Ds(),id3Track:r,textTrack:Ds()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=v(e.samples,["emsg"]);r&&r.forEach(i=>{const s=un(i);if(Po.test(s.schemeIdUri)){const A=Mo(s,t);let f=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;f<=.001&&(f=Number.POSITIVE_INFINITY);const u=s.payload;n.samples.push({data:u,len:u.byteLength,dts:A,pts:A,type:ji.emsg,duration:f})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const A=Mo(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:A,pts:A,type:ji.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 Mo(a,e){return re(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class Ll{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new cr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,hr.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(A=>{const f=new Uint8Array(A);r.set(f,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=Ht(i.data),A=this.getAvcEncryptedData(s);this.decryptBuffer(A.buffer).then(f=>{i.data=this.getAvcDecryptedUnit(s,f),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 No{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,A=[];let f=0,u,m,_,w=-1,I=0;for(i===-1&&(w=0,I=this.getNALuType(t,0),i=0,f=1);f<r;){if(u=t[f++],!i){i=u?0:1;continue}if(i===1){i=u?0:2;continue}if(!u)i=3;else if(u===1){if(m=f-i-1,w>=0){const D={data:t.subarray(w,m),type:I};A.push(D)}else{const D=this.getLastNalUnit(e.samples);D&&(s&&f<=4-s&&D.state&&(D.data=D.data.subarray(0,D.data.byteLength-s)),m>0&&(D.data=yt(D.data,t.subarray(0,m)),D.state=0))}f<r?(_=this.getNALuType(t,f),w=f,I=_,i=0):i=-1}else i=0}if(w>=0&&i>=0){const D={data:t.subarray(w,r),type:I,state:i};A.push(D)}if(A.length===0){const D=this.getLastNalUnit(e.samples);D&&(D.data=yt(D.data,t))}return e.naluState=i,A}}class tA{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&&ge.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 YA extends No{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,A,f=!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 m,_;switch(u.type){case 1:{let G=!1;A=!0;const $=u.data;if(f&&$.length>4){const pe=this.readSliceType($);(pe===2||pe===4||pe===7||pe===9)&&(G=!0)}if(G){var w;(w=s)!=null&&w.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=G;break}case 5:A=!0,(m=s)!=null&&m.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:{A=!0,It(u.data,1,n.pts,t.samples);break}case 7:{var I,D;A=!0,f=!0;const G=u.data,$=this.readSPS(G);if(!e.sps||e.width!==$.width||e.height!==$.height||((I=e.pixelRatio)==null?void 0:I[0])!==$.pixelRatio[0]||((D=e.pixelRatio)==null?void 0:D[1])!==$.pixelRatio[1]){e.width=$.width,e.height=$.height,e.pixelRatio=$.pixelRatio,e.sps=[G];const pe=G.subarray(1,4);let ye="avc1.";for(let Ce=0;Ce<3;Ce++){let $e=pe[Ce].toString(16);$e.length<2&&($e="0"+$e),ye+=$e}e.codec=ye}break}case 8:A=!0,e.pps=[u.data];break;case 9:A=!0,e.audFound=!0,(_=s)!=null&&_.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:A=!0;break;default:A=!1;break}s&&A&&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 tA(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 tA(e);let n=0,r=0,i=0,s=0,A,f,u;const m=t.readUByte.bind(t),_=t.readBits.bind(t),w=t.readUEG.bind(t),I=t.readBoolean.bind(t),D=t.skipBits.bind(t),G=t.skipEG.bind(t),$=t.skipUEG.bind(t),pe=this.skipScalingList.bind(this);m();const ye=m();if(_(5),D(3),m(),$(),ye===100||ye===110||ye===122||ye===244||ye===44||ye===83||ye===86||ye===118||ye===128){const wt=w();if(wt===3&&D(1),$(),$(),D(1),I())for(f=wt!==3?8:12,u=0;u<f;u++)I()&&(u<6?pe(16,t):pe(64,t))}$();const Ce=w();if(Ce===0)w();else if(Ce===1)for(D(1),G(),G(),A=w(),u=0;u<A;u++)G();$(),D(1);const $e=w(),je=w(),Dt=_(1);Dt===0&&D(1),D(1),I()&&(n=w(),r=w(),i=w(),s=w());let et=[1,1];if(I()&&I())switch(m()){case 1:et=[1,1];break;case 2:et=[12,11];break;case 3:et=[10,11];break;case 4:et=[16,11];break;case 5:et=[40,33];break;case 6:et=[24,11];break;case 7:et=[20,11];break;case 8:et=[32,11];break;case 9:et=[80,33];break;case 10:et=[18,11];break;case 11:et=[15,11];break;case 12:et=[64,33];break;case 13:et=[160,99];break;case 14:et=[4,3];break;case 15:et=[3,2];break;case 16:et=[2,1];break;case 255:{et=[m()<<8|m(),m()<<8|m()];break}}return{width:Math.ceil(($e+1)*16-n*2-r*2),height:(2-Dt)*(je+1)*16-(Dt?2:4)*(i+s),pixelRatio:et}}}class Ho extends No{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,A,f=!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 m,_;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,A=!0;break;case 16:case 17:case 18:case 21:if(A=!0,f){var w;(w=s)!=null&&w.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:A=!0,(m=s)!=null&&m.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:A=!0,It(u.data,2,n.pts,t.samples);break;case 32:A=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=B(e.params,this.readVPS(u.data)),this.initVPS=u.data),e.vps=[u.data];break;case 33:if(A=!0,f=!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 I=this.readSPS(u.data);e.width=I.width,e.height=I.height,e.pixelRatio=I.pixelRatio,e.codec=I.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const D in I.params)e.params[D]=I.params[D]}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(A=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const I=this.readPPS(u.data);for(const D in I)e.params[D]=I[D]}this.pushParameterSet(e.pps,u.data,e.vps)}break;case 35:A=!0,e.audFound=!0,(_=s)!=null&&_.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:A=!1;break}s&&A&&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 tA(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 tA(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),A=t.readUByte(),f=t.readUByte(),u=t.readUByte(),m=t.readUByte(),_=t.readUByte(),w=t.readUByte(),I=t.readUByte(),D=t.readUByte(),G=t.readUByte(),$=t.readUByte(),pe=t.readUByte(),ye=[],Ce=[];for(let gi=0;gi<n;gi++)ye.push(t.readBoolean()),Ce.push(t.readBoolean());if(n>0)for(let gi=n;gi<8;gi++)t.readBits(2);for(let gi=0;gi<n;gi++)ye[gi]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),Ce[gi]&&t.readUByte();t.readUEG();const $e=t.readUEG();$e==3&&t.skipBits(1);const je=t.readUEG(),Dt=t.readUEG(),et=t.readBoolean();let wt=0,_t=0,at=0,Jt=0;et&&(wt+=t.readUEG(),_t+=t.readUEG(),at+=t.readUEG(),Jt+=t.readUEG());const In=t.readUEG(),jn=t.readUEG(),sr=t.readUEG(),Xn=t.readBoolean();for(let gi=Xn?0:n;gi<=n;gi++)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 ks=0;ks<4;ks++)for(let ga=0;ga<(ks===3?2:6);ga++)if(!t.readBoolean())t.readUEG();else{const Da=Math.min(64,1<<4+(ks<<1));ks>1&&t.readEG();for(let hl=0;hl<Da;hl++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const Hn=t.readUEG();let nr=0;for(let gi=0;gi<Hn;gi++){let ks=!1;if(gi!==0&&(ks=t.readBoolean()),ks){gi===Hn&&t.readUEG(),t.readBoolean(),t.readUEG();let ga=0;for(let wo=0;wo<=nr;wo++){const Da=t.readBoolean();let hl=!1;Da||(hl=t.readBoolean()),(Da||hl)&&ga++}nr=ga}else{const ga=t.readUEG(),wo=t.readUEG();nr=ga+wo;for(let Da=0;Da<ga;Da++)t.readUEG(),t.readBoolean();for(let Da=0;Da<wo;Da++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const gi=t.readUEG();for(let ks=0;ks<gi;ks++){for(let ga=0;ga<sr+4;ga++)t.readBits(1);t.readBits(1)}}let Fn=0,Tn=1,$r=1,wi=!0,Zr=1,ai=0;t.readBoolean(),t.readBoolean();let Rs=!1;if(t.readBoolean()){if(t.readBoolean()){const Eo=t.readUByte(),Qc=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Vu=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Eo>0&&Eo<16?(Tn=Qc[Eo-1],$r=Vu[Eo-1]):Eo===255&&(Tn=t.readBits(16),$r=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(),Rs=t.readBoolean(),Rs&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(Zr=t.readBits(32),ai=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const Vu=t.readBoolean(),Oc=t.readBoolean();let lu=!1;(Vu||Oc)&&(lu=t.readBoolean(),lu&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),lu&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let Pc=0;Pc<=n;Pc++){wi=t.readBoolean();const Vc=wi||t.readBoolean();let Mc=!1;Vc?t.readEG():Mc=t.readBoolean();const Nc=Mc?1:t.readUEG()+1;if(Vu)for(let uu=0;uu<Nc;uu++)t.readUEG(),t.readUEG(),lu&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(Oc)for(let uu=0;uu<Nc;uu++)t.readUEG(),t.readUEG(),lu&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Fn=t.readUEG())}let da=je,$a=Dt;if(et){let gi=1,ks=1;$e===1?gi=ks=2:$e==2&&(gi=2),da=je-gi*_t-gi*wt,$a=Dt-ks*Jt-ks*at}const yo=r?["A","B","C"][r]:"",Gc=A<<24|f<<16|u<<8|m;let Lc=0;for(let gi=0;gi<32;gi++)Lc=(Lc|(Gc>>gi&1)<<31-gi)>>>0;let Uc=Lc.toString(16);return s===1&&Uc==="2"&&(Uc="6"),{codecString:`hvc1.${yo}${s}.${Uc}.${i?"H":"L"}${pe}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[A,f,u,m],general_constraint_indicator_flags:[_,w,I,D,G,$],general_level_idc:pe,bit_depth:In+8,bit_depth_luma_minus8:In,bit_depth_chroma_minus8:jn,min_spatial_segmentation_idc:Fn,chroma_format_idc:$e,frame_rate:{fixed:wi,fps:ai/Zr}},width:da,height:$a,pixelRatio:[Tn,$r]}}readPPS(e){const t=new tA(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 Xi=188;class vi{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=vi.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(Xi*5,t-Xi)+1,r=0;for(;r<n;){let i=!1,s=-1,A=0;for(let f=r;f<t;f+=Xi)if(e[f]===71&&(t-f===Xi||e[f+Xi]===71)){if(A++,s===-1&&(s=f,s!==0&&(n=Math.min(s+Xi*99,e.length-Xi)+1)),i||(i=jA(e,f)===0),i&&A>1&&(s===0&&A>2||f+Xi>n))return s}else{if(A)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:Xe[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=vi.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=vi.createTrack("audio",r),this._id3Track=vi.createTrack("id3"),this._txtTrack=vi.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,A=this._audioTrack,f=this._id3Track,u=this._txtTrack;let m=s.pid,_=s.pesData,w=A.pid,I=f.pid,D=A.pesData,G=f.pesData,$=null,pe=this.pmtParsed,ye=this._pmtId,Ce=e.length;if(this.remainderData&&(e=yt(this.remainderData,e),Ce=e.length,this.remainderData=null),Ce<Xi&&!r)return this.remainderData=e,{audioTrack:A,videoTrack:s,id3Track:f,textTrack:u};const $e=Math.max(0,vi.syncOffset(e));Ce-=(Ce-$e)%Xi,Ce<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,Ce,e.buffer.byteLength-Ce));let je=0;for(let et=$e;et<Ce;et+=Xi)if(e[et]===71){const wt=!!(e[et+1]&64),_t=jA(e,et),at=(e[et+3]&48)>>4;let Jt;if(at>1){if(Jt=et+5+e[et+4],Jt===et+Xi)continue}else Jt=et+4;switch(_t){case m:wt&&(_&&(i=la(_,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,u,i,!1)),_={data:[],size:0}),_&&(_.data.push(e.subarray(Jt,et+Xi)),_.size+=et+Xi-Jt);break;case w:if(wt){if(D&&(i=la(D,this.logger)))switch(A.segmentCodec){case"aac":this.parseAACPES(A,i);break;case"mp3":this.parseMPEGPES(A,i);break;case"ac3":this.parseAC3PES(A,i);break}D={data:[],size:0}}D&&(D.data.push(e.subarray(Jt,et+Xi)),D.size+=et+Xi-Jt);break;case I:wt&&(G&&(i=la(G,this.logger))&&this.parseID3PES(f,i),G={data:[],size:0}),G&&(G.data.push(e.subarray(Jt,et+Xi)),G.size+=et+Xi-Jt);break;case 0:wt&&(Jt+=e[Jt]+1),ye=this._pmtId=fu(e,Jt);break;case ye:{wt&&(Jt+=e[Jt]+1);const In=Ko(e,Jt,this.typeSupported,n,this.observer,this.logger);m=In.videoPid,m>0&&(s.pid=m,s.segmentCodec=In.segmentVideoCodec),w=In.audioPid,w>0&&(A.pid=w,A.segmentCodec=In.segmentAudioCodec),I=In.id3Pid,I>0&&(f.pid=I),$!==null&&!pe&&(this.logger.warn(`MPEG-TS PMT found at ${et} after unknown PID '${$}'. Backtracking to sync byte @${$e} to parse all TS packets.`),$=null,et=$e-188),pe=this.pmtParsed=!0;break}case 17:case 8191:break;default:$=_t;break}}else je++;je>0&&BA(this.observer,new Error(`Found ${je} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=_,A.pesData=D,f.pesData=G;const Dt={audioTrack:A,videoTrack:s,id3Track:f,textTrack:u};return r&&this.extractRemainingSamples(Dt),Dt}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,A=t.pesData,f=r.pesData;let u;if(s&&(u=la(s,this.logger))?(this.readyVideoParser(n.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(n,i,u,!0),n.pesData=null)):n.pesData=s,A&&(u=la(A,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 A!=null&&A.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=A;f&&(u=la(f,this.logger))?(this.parseID3PES(r,u),r.pesData=null):r.pesData=f}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new Ll(this.observer,this.config,t);return this.decrypt(r,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new YA:e==="hevc"&&(this.videoParser=new Ho))}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 _=r.missing,w=r.sample.unit.byteLength;if(_===-1)i=yt(r.sample.unit,i);else{const I=w-_;r.sample.unit.set(i.subarray(0,_),I),e.samples.push(r.sample),n=r.missing}}let s,A;for(s=n,A=i.length;s<A-1&&!Js(i,s);s++);if(s!==n){let _;const w=s<A-1;if(w?_=`AAC PES did not start with ADTS header,offset:${s}`:_="No ADTS header found in AAC PES",BA(this.observer,new Error(_),w,this.logger),!w)return}KA(e,this.observer,i,s,this.audioCodec);let f;if(t.pts!==void 0)f=t.pts;else if(r){const _=xo(e.samplerate);f=r.sample.pts+_}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let u=0,m;for(;s<A;)if(m=So(e,i,s,f,u),s+=m.length,m.missing){this.aacOverFlow=m;break}else for(u++;s<A-1&&!Js(i,s);s++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let i=0,s=0;const A=t.pts;if(A===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<r;)if(Uo(n,s)){const f=Do(e,n,s,A,i);if(f)s+=f.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,A=0,f;for(;A<i&&(f=Oo(e,n,A,r,s++))>0;)A+=f}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=B({},t,{type:this._videoTrack?ji.emsg:ji.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function jA(a,e){return((a[e+1]&31)<<8)+a[e+2]}function fu(a,e){return(a[e+10]&31)<<8|a[e+11]}function Ko(a,e,t,n,r,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},A=(a[e+1]&15)<<8|a[e+2],f=e+3+A-4,u=(a[e+10]&15)<<8|a[e+11];for(e+=12+u;e<f;){const m=jA(a,e),_=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){XA("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=m);break;case 21:s.id3Pid===-1&&(s.id3Pid=m);break;case 219:if(!n){XA("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=m);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=m,s.segmentAudioCodec="mp3");break;case 193:if(!n){XA("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=m,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&_>0){let w=e+5,I=_;for(;I>2;){switch(a[w]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=m,s.segmentAudioCodec="ac3");break}const G=a[w+1]+2;w+=G,I-=G}}break;case 194:case 135:return BA(r,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=m,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=_+5}return s}function BA(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(y.ERROR,y.ERROR,{type:xe.MEDIA_ERROR,details:ne.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function XA(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function la(a,e){let t=0,n,r,i,s,A;const f=a.data;if(!a||a.size===0)return null;for(;f[0].length<19&&f.length>1;)f[0]=yt(f[0],f[1]),f.splice(1,1);if(n=f[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 m=n[7];m&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,m&64?(A=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,s-A>60*9e4&&(e.warn(`${Math.round((s-A)/9e4)}s delta between PTS and DTS, align them`),s=A)):A=s),i=n[8];let _=i+9;if(a.size<=_)return null;a.size-=_;const w=new Uint8Array(a.size);for(let I=0,D=f.length;I<D;I++){n=f[I];let G=n.byteLength;if(_)if(_>G){_-=G;continue}else n=n.subarray(_),G-=_,_=0;w.set(n,t),t+=G}return r&&(r-=i+3),{data:w,pts:s,dts:A,len:r}}return null}class $o{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 ba=Math.pow(2,32)-1;class ct{static init(){ct.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 ct.types)ct.types.hasOwnProperty(e)&&(ct.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]);ct.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]);ct.STTS=ct.STSC=ct.STCO=i,ct.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ct.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ct.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),ct.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),A=new Uint8Array([97,118,99,49]),f=new Uint8Array([0,0,0,1]);ct.FTYP=ct.box(ct.types.ftyp,s,f,s,A),ct.DINF=ct.box(ct.types.dinf,ct.box(ct.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 ct.box(ct.types.hdlr,ct.HDLR_TYPES[e])}static mdat(e){return ct.box(ct.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(ba+1)),r=Math.floor(t%(ba+1));return ct.box(ct.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 ct.box(ct.types.mdia,ct.mdhd(e.timescale||0,e.duration||0),ct.hdlr(e.type),ct.minf(e))}static mfhd(e){return ct.box(ct.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"?ct.box(ct.types.minf,ct.box(ct.types.smhd,ct.SMHD),ct.DINF,ct.stbl(e)):ct.box(ct.types.minf,ct.box(ct.types.vmhd,ct.VMHD),ct.DINF,ct.stbl(e))}static moof(e,t,n){return ct.box(ct.types.moof,ct.mfhd(e),ct.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=ct.trak(e[t]);return ct.box.apply(null,[ct.types.moov,ct.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(ct.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=ct.trex(e[t]);return ct.box.apply(null,[ct.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(ba+1)),r=Math.floor(t%(ba+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 ct.box(ct.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 ct.box(ct.types.sdtp,n)}static stbl(e){return ct.box(ct.types.stbl,ct.stsd(e),ct.box(ct.types.stts,ct.STTS),ct.box(ct.types.stsc,ct.STSC),ct.box(ct.types.stsz,ct.STSZ),ct.box(ct.types.stco,ct.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 A=ct.box(ct.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),f=e.width,u=e.height,m=e.pixelRatio[0],_=e.pixelRatio[1];return ct.box(ct.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,f>>8&255,f&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]),A,ct.box(ct.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ct.box(ct.types.pasp,new Uint8Array([m>>24,m>>16&255,m>>8&255,m&255,_>>24,_>>16&255,_>>8&255,_&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 ct.box(ct.types.mp4a,ct.audioStsd(e),ct.box(ct.types.esds,ct.esds(e)))}static mp3(e){return ct.box(ct.types[".mp3"],ct.audioStsd(e))}static ac3(e){return ct.box(ct.types["ac-3"],ct.audioStsd(e),ct.box(ct.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return ct.box(ct.types.stsd,ct.STSD,ct.mp4a(e));if(t==="ac3"&&e.config)return ct.box(ct.types.stsd,ct.STSD,ct.ac3(e));if(t==="mp3"&&e.codec==="mp3")return ct.box(ct.types.stsd,ct.STSD,ct.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return ct.box(ct.types.stsd,ct.STSD,ct.avc1(e));if(t==="hevc"&&e.vps)return ct.box(ct.types.stsd,ct.STSD,ct.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/(ba+1)),A=Math.floor(n%(ba+1));return ct.box(ct.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,A>>24,A>>16&255,A>>8&255,A&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=ct.sdtp(e),r=e.id,i=Math.floor(t/(ba+1)),s=Math.floor(t%(ba+1));return ct.box(ct.types.traf,ct.box(ct.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),ct.box(ct.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])),ct.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,ct.box(ct.types.trak,ct.tkhd(e),ct.mdia(e))}static trex(e){const t=e.id;return ct.box(ct.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 A,f,u,m,_,w;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),A=0;A<r;A++)f=n[A],u=f.duration,m=f.size,_=f.flags,w=f.cts,s.set([u>>>24&255,u>>>16&255,u>>>8&255,u&255,m>>>24&255,m>>>16&255,m>>>8&255,m&255,_.isLeading<<2|_.dependsOn,_.isDependedOn<<6|_.hasRedundancy<<4|_.paddingValue<<1|_.isNonSync,_.degradPrio&61440,_.degradPrio&15,w>>>24&255,w>>>16&255,w>>>8&255,w&255],12+16*A);return ct.box(ct.types.trun,s)}static initSegment(e){ct.types||ct.init();const t=ct.moov(e);return yt(ct.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 D=0;D<n.length;D+=1){s+=3;for(let G=0;G<n[D].length;G+=1)s+=2+n[D][G].length}const A=new Uint8Array(s);A.set(i,0),s=i.length;const f=n.length-1;for(let D=0;D<n.length;D+=1){A.set(new Uint8Array([32+D|(D===f?128:0),0,n[D].length]),s),s+=3;for(let G=0;G<n[D].length;G+=1)A.set(new Uint8Array([n[D][G].length>>8,n[D][G].length&255]),s),s+=2,A.set(n[D][G],s),s+=n[D][G].length}const u=ct.box(ct.types.hvcC,A),m=e.width,_=e.height,w=e.pixelRatio[0],I=e.pixelRatio[1];return ct.box(ct.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,m>>8&255,m&255,_>>8&255,_&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,ct.box(ct.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ct.box(ct.types.pasp,new Uint8Array([w>>24,w>>16&255,w>>8&255,w&255,I>>24,I>>16&255,I>>8&255,I&255])))}}ct.types=void 0,ct.HDLR_TYPES=void 0,ct.STTS=void 0,ct.STSC=void 0,ct.STCO=void 0,ct.STSZ=void 0,ct.VMHD=void 0,ct.SMHD=void 0,ct.STSD=void 0,ct.FTYP=void 0,ct.DINF=void 0;const JA=9e4;function bA(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function Go(a,e,t=1,n=!1){return bA(a,e,1/t,n)}function Ca(a,e=!1){return bA(a,1e3,1/JA,e)}function On(a,e=1){return bA(a,JA,1/e)}const Ul=10*1e3,Rl=1024,Vo=1152,Ws=1536;let Qa=null,CA=null;function Oa(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 Pa extends Z{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,Qa===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Qa=s?parseInt(s[1]):0}if(CA===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);CA=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 A=s.pts,f=A-i;return f<-4294967296&&(t=!0,A=Ls(A,n),f=A-i),f>0?i:A},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,A,f){let u,m,_,w,I,D,G=i,$=i;const pe=e.pid>-1,ye=t.pid>-1,Ce=t.samples.length,$e=e.samples.length>0,je=A&&Ce>0||Ce>1;if((!pe||$e)&&(!ye||je)||this.ISGenerated||A){if(this.ISGenerated){var et,wt,_t,at;const sr=this.videoTrackConfig;(sr&&(t.width!==sr.width||t.height!==sr.height||((et=t.pixelRatio)==null?void 0:et[0])!==((wt=sr.pixelRatio)==null?void 0:wt[0])||((_t=t.pixelRatio)==null?void 0:_t[1])!==((at=sr.pixelRatio)==null?void 0:at[1]))||!sr&&je||this.nextAudioTs===null&&$e)&&this.resetInitSegment()}this.ISGenerated||(_=this.generateIS(e,t,i,s));const Jt=this.isVideoContiguous;let In=-1,jn;if(je&&(In=kl(t.samples),!Jt&&this.config.forceKeyFrameOnDiscontinuity))if(D=!0,In>0){this.warn(`Dropped ${In} out of ${Ce} video samples due to a missing keyframe`);const sr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(In),t.dropped+=In,$+=(t.samples[0].pts-sr)/t.inputTimeScale,jn=$}else In===-1&&(this.warn(`No keyframe found out of ${Ce} video samples`),D=!1);if(this.ISGenerated){if($e&&je){const sr=this.getVideoStartPts(t.samples),bn=(Ls(e.samples[0].pts,sr)-sr)/t.inputTimeScale;G+=Math.max(0,bn),$+=Math.max(0,-bn)}if($e){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),_=this.generateIS(e,t,i,s)),m=this.remuxAudio(e,G,this.isAudioContiguous,s,ye||je||f===V.AUDIO?$:void 0),je){const sr=m?m.endPTS-m.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),_=this.generateIS(e,t,i,s)),u=this.remuxVideo(t,$,Jt,sr)}}else je&&(u=this.remuxVideo(t,$,Jt,0));u&&(u.firstKeyFrame=In,u.independent=In!==-1,u.firstKeyFramePTS=jn)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(I=qA(n,i,this._initPTS,this._initDTS)),r.samples.length&&(w=ua(r,i,this._initPTS))),{audio:m,video:u,initSegment:_,independent:D,text:w,id3:I}}generateIS(e,t,n,r){const i=e.samples,s=t.samples,A=this.typeSupported,f={},u=this._initPTS;let m=!u||r,_="audio/mp4",w,I,D,G=-1;if(m&&(w=I=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":A.mpeg?(_="audio/mpeg",e.codec=""):A.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}f.audio={id:"audio",container:_,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&A.mpeg?new Uint8Array(0):ct.initSegment([e]),metadata:{channelCount:e.channelCount}},m&&(G=e.id,D=e.inputTimeScale,!u||D!==u.timescale?w=I=i[0].pts-Math.round(D*n):m=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,f.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:ct.initSegment([t]),metadata:{width:t.width,height:t.height}},m)if(G=t.id,D=t.inputTimeScale,!u||D!==u.timescale){const $=this.getVideoStartPts(s),pe=Math.round(D*n);I=Math.min(I,Ls(s[0].dts,$)-pe),w=Math.min(w,$-pe)}else m=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(f).length)return this.ISGenerated=!0,m?(u&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${w/D} != initPTS: ${u.baseTime/u.timescale} (${u.baseTime}/${u.timescale}) trackId: ${u.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${w/D} (${w}/${D}) trackId: ${G}`),this._initPTS={baseTime:w,timescale:D,trackId:G},this._initDTS={baseTime:I,timescale:D,trackId:G}):w=D=void 0,{tracks:f,initPTS:w,timescale:D,trackId:G}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,A=[],f=s.length,u=this._initPTS,m=u.baseTime*i/u.timescale;let _=this.nextVideoTs,w=8,I=this.videoSampleDuration,D,G,$=Number.POSITIVE_INFINITY,pe=Number.NEGATIVE_INFINITY,ye=!1;if(!n||_===null){const Fn=m+t*i,Tn=s[0].pts-Ls(s[0].dts,s[0].pts);Qa&&_!==null&&Math.abs(Fn-Tn-(_+m))<15e3?n=!0:_=Fn-Tn-m}const Ce=_+m;for(let Fn=0;Fn<f;Fn++){const Tn=s[Fn];Tn.pts=Ls(Tn.pts,Ce),Tn.dts=Ls(Tn.dts,Ce),Tn.dts<s[Fn>0?Fn-1:Fn].dts&&(ye=!0)}ye&&s.sort(function(Fn,Tn){const $r=Fn.dts-Tn.dts,wi=Fn.pts-Tn.pts;return $r||wi}),D=s[0].dts,G=s[s.length-1].dts;const $e=G-D,je=$e?Math.round($e/(f-1)):I||e.inputTimeScale/30;if(n){const Fn=D-Ce,Tn=Fn>je,$r=Fn<-1;if((Tn||$r)&&(Tn?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Ca(Fn,!0)} ms (${Fn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Ca(-Fn,!0)} ms (${Fn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!$r||Ce>=s[0].pts||Qa)){D=Ce;const wi=s[0].pts-Fn;if(Tn)s[0].dts=D,s[0].pts=wi;else{let Zr=!0;for(let ai=0;ai<s.length&&!(s[ai].dts>wi&&Zr);ai++){const Rs=s[ai].pts;if(s[ai].dts-=Fn,s[ai].pts-=Fn,ai<s.length-1){const Cs=s[ai+1].pts,da=s[ai].pts,$a=Cs<=da,yo=Cs<=Rs;Zr=$a==yo}}}this.log(`Video: Initial PTS/DTS adjusted: ${Ca(wi,!0)}/${Ca(D,!0)}, delta: ${Ca(Fn,!0)} ms`)}}D=Math.max(0,D);let Dt=0,et=0,wt=D;for(let Fn=0;Fn<f;Fn++){const Tn=s[Fn],$r=Tn.units,wi=$r.length;let Zr=0;for(let ai=0;ai<wi;ai++)Zr+=$r[ai].data.length;et+=Zr,Dt+=wi,Tn.length=Zr,Tn.dts<wt?(Tn.dts=wt,wt+=je/4|0||1):wt=Tn.dts,$=Math.min(Tn.pts,$),pe=Math.max(Tn.pts,pe)}G=s[f-1].dts;const _t=et+4*Dt+8;let at;try{at=new Uint8Array(_t)}catch(Fn){this.observer.emit(y.ERROR,y.ERROR,{type:xe.MUX_ERROR,details:ne.REMUX_ALLOC_ERROR,fatal:!1,error:Fn,bytes:_t,reason:`fail allocating video mdat ${_t}`});return}const Jt=new DataView(at.buffer);Jt.setUint32(0,_t),at.set(ct.types.mdat,4);let In=!1,jn=Number.POSITIVE_INFINITY,sr=Number.POSITIVE_INFINITY,Xn=Number.NEGATIVE_INFINITY,bn=Number.NEGATIVE_INFINITY;for(let Fn=0;Fn<f;Fn++){const Tn=s[Fn],$r=Tn.units;let wi=0;for(let Rs=0,Cs=$r.length;Rs<Cs;Rs++){const da=$r[Rs],$a=da.data,yo=da.data.byteLength;Jt.setUint32(w,yo),w+=4,at.set($a,w),w+=yo,wi+=4+yo}let Zr;if(Fn<f-1)I=s[Fn+1].dts-Tn.dts,Zr=s[Fn+1].pts-Tn.pts;else{const Rs=this.config,Cs=Fn>0?Tn.dts-s[Fn-1].dts:je;if(Zr=Fn>0?Tn.pts-s[Fn-1].pts:je,Rs.stretchShortVideoTrack&&this.nextAudioTs!==null){const da=Math.floor(Rs.maxBufferHole*i),$a=(r?$+r*i:this.nextAudioTs+m)-Tn.pts;$a>da?(I=$a-Cs,I<0?I=Cs:In=!0,this.log(`It is approximately ${$a/90} ms to the next segment; using duration ${I/90} ms for the last video frame.`)):I=Cs}else I=Cs}const ai=Math.round(Tn.pts-Tn.dts);jn=Math.min(jn,I),Xn=Math.max(Xn,I),sr=Math.min(sr,Zr),bn=Math.max(bn,Zr),A.push(Oa(Tn.key,I,wi,ai))}if(A.length){if(Qa){if(Qa<70){const Fn=A[0].flags;Fn.dependsOn=2,Fn.isNonSync=0}}else if(CA&&bn-sr<Xn-jn&&je/Xn<.025&&A[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Fn=D;for(let Tn=0,$r=A.length;Tn<$r;Tn++){const wi=Fn+A[Tn].duration,Zr=Fn+A[Tn].cts;if(Tn<$r-1){const ai=wi+A[Tn+1].cts;A[Tn].duration=ai-Zr}else A[Tn].duration=Tn?A[Tn-1].duration:je;A[Tn].cts=0,Fn=wi}}}I=In||!I?je:I;const tr=G+I;this.nextVideoTs=_=tr-m,this.videoSampleDuration=I,this.isVideoContiguous=!0;const Br={data1:ct.moof(e.sequenceNumber++,D,B(e,{samples:A})),data2:at,startPTS:($-m)/i,endPTS:(pe+I-m)/i,startDTS:(D-m)/i,endDTS:_/i,type:"video",hasAudio:!1,hasVideo:!0,nb:A.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Br}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Vo;case"ac3":return Ws;default:return Rl}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,A=e.samplerate?e.samplerate:s,f=s/A,u=this.getSamplesPerFrame(e),m=u*f,_=this._initPTS,w=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,I=[],D=i!==void 0;let G=e.samples,$=w?0:8,pe=this.nextAudioTs||-1;const ye=_.baseTime*s/_.timescale,Ce=ye+t*s;if(this.isAudioContiguous=n=n||G.length&&pe>0&&(r&&Math.abs(Ce-(pe+ye))<9e3||Math.abs(Ls(G[0].pts,Ce)-(pe+ye))<20*m),G.forEach(function(bn){bn.pts=Ls(bn.pts,Ce)}),!n||pe<0){if(G=G.filter(bn=>bn.pts>=0),!G.length)return;i===0?pe=0:r&&!D?pe=Math.max(0,Ce-ye):pe=G[0].pts-ye}if(e.segmentCodec==="aac"){const bn=this.config.maxAudioFramesDrift;for(let tr=0,Hn=pe+ye;tr<G.length;tr++){const nr=G[tr],Br=nr.pts,Fn=Br-Hn,Tn=Math.abs(1e3*Fn/s);if(Fn<=-bn*m&&D)tr===0&&(this.warn(`Audio frame @ ${(Br/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*Fn/s)} ms.`),this.nextAudioTs=pe=Br-ye,Hn=Br);else if(Fn>=bn*m&&Tn<Ul&&D){let $r=Math.round(Fn/m);for(Hn=Br-$r*m;Hn<0&&$r&&m;)$r--,Hn+=m;tr===0&&(this.nextAudioTs=pe=Hn-ye),this.warn(`Injecting ${$r} audio frames @ ${((Hn-ye)/s).toFixed(3)}s due to ${Math.round(1e3*Fn/s)} ms gap.`);for(let wi=0;wi<$r;wi++){let Zr=$o.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Zr||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Zr=nr.unit.subarray()),G.splice(tr,0,{unit:Zr,pts:Hn}),Hn+=m,tr++}}nr.pts=Hn,Hn+=m}}let $e=null,je=null,Dt,et=0,wt=G.length;for(;wt--;)et+=G[wt].unit.byteLength;for(let bn=0,tr=G.length;bn<tr;bn++){const Hn=G[bn],nr=Hn.unit;let Br=Hn.pts;if(je!==null){const Tn=I[bn-1];Tn.duration=Math.round((Br-je)/f)}else if(n&&e.segmentCodec==="aac"&&(Br=pe+ye),$e=Br,et>0){et+=$;try{Dt=new Uint8Array(et)}catch(Tn){this.observer.emit(y.ERROR,y.ERROR,{type:xe.MUX_ERROR,details:ne.REMUX_ALLOC_ERROR,fatal:!1,error:Tn,bytes:et,reason:`fail allocating audio mdat ${et}`});return}w||(new DataView(Dt.buffer).setUint32(0,et),Dt.set(ct.types.mdat,4))}else return;Dt.set(nr,$);const Fn=nr.byteLength;$+=Fn,I.push(Oa(!0,u,Fn,0)),je=Br}const _t=I.length;if(!_t)return;const at=I[I.length-1];pe=je-ye,this.nextAudioTs=pe+f*at.duration;const Jt=w?new Uint8Array(0):ct.moof(e.sequenceNumber++,$e/f,B({},e,{samples:I}));e.samples=[];const In=($e-ye)/s,jn=pe/s,Xn={data1:Jt,data2:Dt,startPTS:In,endPTS:jn,startDTS:In,endDTS:jn,type:"audio",hasAudio:!0,hasVideo:!1,nb:_t};return this.isAudioContiguous=!0,Xn}}function Ls(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 kl(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function qA(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let A=0;A<r;A++){const f=a.samples[A];f.pts=Ls(f.pts-t.baseTime*i/t.timescale,e*i)/i,f.dts=Ls(f.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function ua(a,e,t){const n=a.samples.length;if(!n)return;const r=a.inputTimeScale;for(let s=0;s<n;s++){const A=a.samples[s];A.pts=Ls(A.pts-t.baseTime*r/t.timescale,e*r)/r}a.samples.sort((s,A)=>s.pts-A.pts);const i=a.samples;return a.samples=[],{samples:i}}class xa extends Z{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=X(e);if(t)ht(e,t);else{const f=i||s;f!=null&&f.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${f.codec}")!`)}i&&(n=eo(i,W.AUDIO,this)),s&&(r=eo(s,W.VIDEO,this));const A={};i&&s?A.audiovideo={container:"video/mp4",codec:n+","+r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?A.audio={container:"audio/mp4",codec:n,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?A.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=A}remux(e,t,n,r,i,s){var A,f;let{initPTS:u,lastEndTime:m}=this;const _={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};re(m)||(m=this.lastEndTime=i||0);const w=t.samples;if(!w.length)return _;const I={initPTS:void 0,timescale:void 0,trackId:void 0};let D=this.initData;if((A=D)!=null&&A.length||(this.generateInitSegment(w),D=this.initData),!((f=D)!=null&&f.length))return this.warn("Failed to generate initSegment."),_;this.emitInitSegment&&(I.tracks=this.initTracks,this.emitInitSegment=!1);const G=vt(w,D,this),$=D.audio?G[D.audio.id]:null,pe=D.video?G[D.video.id]:null,ye=nA(pe,1/0),Ce=nA($,1/0),$e=nA(pe,0,!0),je=nA($,0,!0);let Dt=i,et=0;const wt=$&&(!pe||!u&&Ce<ye||u&&u.trackId===D.audio.id),_t=wt?$:pe;if(_t){const Hn=_t.timescale,nr=_t.start-i*Hn,Br=wt?D.audio.id:D.video.id;Dt=_t.start/Hn,et=wt?je-Ce:$e-ye,(s||!u)&&(Wo(u,Dt,i,et)||Hn!==u.timescale)&&(u&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${nr/Hn} != initPTS: ${u.baseTime/u.timescale} (${u.baseTime}/${u.timescale}) trackId: ${u.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${Dt-i} (${nr}/${Hn}) trackId: ${Br}`),u=null,I.initPTS=nr,I.timescale=Hn,I.trackId=Br)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);u?(I.initPTS=u.baseTime,I.timescale=u.timescale,I.trackId=u.trackId):((!I.timescale||I.trackId===void 0||I.initPTS===void 0)&&(this.warn("Could not set initPTS"),I.initPTS=Dt,I.timescale=1,I.trackId=-1),this.initPTS=u={baseTime:I.initPTS,timescale:I.timescale,trackId:I.trackId});const at=Dt-u.baseTime/u.timescale,Jt=at+et;et>0?this.lastEndTime=Jt:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const In=!!D.audio,jn=!!D.video;let sr="";In&&(sr+="audio"),jn&&(sr+="video");const Xn=(D.audio?D.audio.encrypted:!1)||(D.video?D.video.encrypted:!1),bn={data1:w,startPTS:at,startDTS:at,endPTS:Jt,endDTS:Jt,type:sr,hasAudio:In,hasVideo:jn,nb:1,dropped:0,encrypted:Xn};_.audio=In&&!jn?bn:void 0,_.video=jn?bn:void 0;const tr=pe==null?void 0:pe.sampleCount;if(tr){const Hn=pe.keyFrameIndex,nr=Hn!==-1;bn.nb=tr,bn.dropped=Hn===0||this.isVideoContiguous?0:nr?Hn:tr,bn.independent=nr,bn.firstKeyFrame=Hn,nr&&pe.keyFrameStart&&(bn.firstKeyFramePTS=(pe.keyFrameStart-u.baseTime)/u.timescale),this.isVideoContiguous||(_.independent=nr),this.isVideoContiguous||(this.isVideoContiguous=nr),bn.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${Hn}/${tr} dropped: ${bn.dropped} start: ${bn.firstKeyFramePTS||"NA"}`)}return _.initSegment=I,_.id3=qA(n,i,u,u),r.samples.length&&(_.text=ua(r,i,u)),_}}function nA(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function Wo(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 eo(a,e,t){const n=a.codec;return n&&n.length>4?n:e===W.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?Qe(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 zs;try{zs=self.performance.now.bind(self.performance)}catch(a){zs=Date.now}const Sa=[{demux:Dl,remux:xa},{demux:vi,remux:Pa},{demux:Tl,remux:Pa},{demux:Il,remux:Pa}];Sa.splice(2,0,{demux:eA,remux:Pa});class to{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=zs();let s=new Uint8Array(e);const{currentTransmuxState:A,transmuxConfig:f}=this;r&&(this.currentTransmuxState=r);const{contiguous:u,discontinuity:m,trackSwitch:_,accurateTimeOffset:w,timeOffset:I,initSegmentChange:D}=r||A,{audioCodec:G,videoCodec:$,defaultInitPts:pe,duration:ye,initSegmentData:Ce}=f,$e=zo(s,t);if($e&&Vi($e.method)){const wt=this.getDecrypter(),_t=Wi($e.method);if(wt.isSync()){let at=wt.softwareDecrypt(s,$e.key.buffer,$e.iv.buffer,_t);if(n.part>-1){const In=wt.flush();at=In&&In.buffer}if(!at)return i.executeEnd=zs(),no(n);s=new Uint8Array(at)}else return this.asyncResult=!0,this.decryptionPromise=wt.webCryptoDecrypt(s,$e.key.buffer,$e.iv.buffer,_t).then(at=>{const Jt=this.push(at,null,n);return this.decryptionPromise=null,Jt}),this.decryptionPromise}const je=this.needsProbing(m,_);if(je){const wt=this.configureTransmuxer(s);if(wt)return this.logger.warn(`[transmuxer] ${wt.message}`),this.observer.emit(y.ERROR,y.ERROR,{type:xe.MEDIA_ERROR,details:ne.FRAG_PARSING_ERROR,fatal:!1,error:wt,reason:wt.message}),i.executeEnd=zs(),no(n)}(m||_||D||je)&&this.resetInitSegment(Ce,G,$,ye,t),(m||D||je)&&this.resetInitialTimestamp(pe),u||this.resetContiguity();const Dt=this.transmux(s,$e,I,w,n);this.asyncResult=Ma(Dt);const et=this.currentTransmuxState;return et.contiguous=!0,et.discontinuity=!1,et.trackSwitch=!1,i.executeEnd=zs(),Dt}flush(e){const t=e.transmuxing;t.executeStart=zs();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:A}=r;if(n){const _=n.flush();_&&s.push(this.push(_.buffer,null,e))}const{demuxer:f,remuxer:u}=this;if(!f||!u){t.executeEnd=zs();const _=[no(e)];return this.asyncResult?Promise.resolve(_):_}const m=f.flush(A);return Ma(m)?(this.asyncResult=!0,m.then(_=>(this.flushRemux(s,_,e),s))):(this.flushRemux(s,m,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:A}=t,{accurateTimeOffset:f,timeOffset:u}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===V.MAIN?"level":"track"} ${n.level}`);const m=this.remuxer.remux(r,i,s,A,u,f,!0,this.id);e.push({remuxResult:m,chunkMeta:n}),n.transmuxing.executeEnd=zs()}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:A}=this;!s||!A||(s.resetInitSegment(e,t,n,r),A.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:A,textTrack:f}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,A,f,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 _=0,w=Sa.length;_<w;_++){var s;if((s=Sa[_].demux)!=null&&s.probe(e,this.logger)){i=Sa[_];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const A=this.demuxer,f=this.remuxer,u=i.remux,m=i.demux;(!f||!(f instanceof u))&&(this.remuxer=new u(n,t,r,this.logger)),(!A||!(A instanceof m))&&(this.demuxer=new m(n,t,r,this.logger),this.probe=m.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new cr(this.config)),e}}function zo(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 no=a=>({remuxResult:{},chunkMeta:a});function Ma(a){return"then"in a&&a.then instanceof Function}class Ql{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 hu{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 ro=0;class Zo{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=ro++,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=f=>{const u=f.data,m=this.hls;if(!(!m||!(u!=null&&u.event)||u.instanceNo!==this.instanceNo))switch(u.event){case"init":{var _;const w=(_=this.workerContext)==null?void 0:_.objectURL;w&&self.URL.revokeObjectURL(w);break}case"transmuxComplete":{this.handleTransmuxComplete(u.data);break}case"flush":{this.onFlush(u.data);break}case"workerLog":{m.logger[u.data.logType]&&m.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,m.trigger(u.event,u.data);break}}},this.onWorkerError=f=>{if(!this.hls)return;const u=new Error(`${f.message} (${f.filename}:${f.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(y.ERROR,{type:xe.OTHER_ERROR,details:ne.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=(f,u)=>{u=u||{},u.frag=this.frag||void 0,f===y.ERROR&&(u=u,u.parent=this.id,u.part=this.part,this.error=u.error),this.hls.trigger(f,u)};this.observer=new _i,this.observer.on(y.FRAG_DECRYPTED,s),this.observer.on(y.ERROR,s);const A=or(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const f=this.hls.logger;if(i.workerPath||dl()){try{i.workerPath?(f.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=cu(i.workerPath)):(f.log(`injecting Web Worker for "${t}"`),this.workerContext=gl());const{worker:m}=this.workerContext;m.addEventListener("message",this.onWorkerMessage),m.addEventListener("error",this.onWorkerError),m.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:A,id:t,config:Vt(i)})}catch(m){f.warn(`Error setting up "${t}" Web Worker, fallback to inline`,m),this.terminateWorker(),this.error=null,this.transmuxer=new to(this.observer,A,i,"",t,e.logger)}return}}this.transmuxer=new to(this.observer,A,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=ro++;const t=this.hls.config,n=or(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),vA(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,A,f,u,m){var _,w;u.transmuxing.start=self.performance.now();const{instanceNo:I,transmuxer:D}=this,G=s?s.start:i.start,$=i.decryptdata,pe=this.frag,ye=!(pe&&i.cc===pe.cc),Ce=!(pe&&u.level===pe.level),$e=pe?u.sn-pe.sn:-1,je=this.part?u.part-this.part.index:-1,Dt=$e===0&&u.id>1&&u.id===(pe==null?void 0:pe.stats.chunkCount),et=!Ce&&($e===1||$e===0&&(je===1||Dt&&je<=0)),wt=self.performance.now();(Ce||$e||i.stats.parsing.start===0)&&(i.stats.parsing.start=wt),s&&(je||!et)&&(s.stats.parsing.start=wt);const _t=!(pe&&((_=i.initSegment)==null?void 0:_.url)===((w=pe.initSegment)==null?void 0:w.url)),at=new hu(ye,et,f,Ce,G,_t);if(!et||ye||_t){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${u.sn}${u.part>-1?" part: "+u.part:""} ${this.id===V.MAIN?"level":"track"}: ${u.level} id: ${u.id}
discontinuity: ${ye}
trackSwitch: ${Ce}
contiguous: ${et}
accurateTimeOffset: ${f}
timeOffset: ${G}
initSegmentChange: ${_t}`);const Jt=new Ql(n,r,t,A,m);this.configureTransmuxer(Jt)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:I,cmd:"demux",data:e,decryptdata:$,chunkMeta:u,state:at},e instanceof ArrayBuffer?[e]:[]);else if(D){const Jt=D.push(e,$,u,at);Ma(Jt)?Jt.then(In=>{this.handleTransmuxComplete(In)}).catch(In=>{this.transmuxerError(In,u,"transmuxer-interface push error")}):this.handleTransmuxComplete(Jt)}}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);Ma(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(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.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 cs=100;class io extends Xa{constructor(e,t,n){super(e,t,n,"audio-stream-controller",V.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(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(y.BUFFER_RESET,this.onBufferReset,this),e.on(y.BUFFER_CREATED,this.onBufferCreated,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(y.BUFFER_RESET,this.onBufferReset,this),e.off(y.BUFFER_CREATED,this.onBufferCreated,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){if(n===V.MAIN){const A=t.cc,f=this.fragCurrent;if(this.initPTS[A]={baseTime:r,timescale:i,trackId:s},this.log(`InitPTS for cc: ${A} found from main: ${r/i} (${r}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===Nt.WAITING_INIT_PTS){const u=this.waitingData;(!u&&!this.loadingParts||u&&u.frag.cc!==A)&&this.syncWithAnchor(t,u==null?void 0:u.frag)}else!this.hls.hasEnoughToStart&&f&&f.cc!==A?(f.abortRequests(),this.syncWithAnchor(t,f)):this.state===Nt.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(),A=this.getLoadPosition(),f=Ct(s,i,A);f&&(this.log(`Syncing with main frag at ${f.start} cc ${f.cc}`),this.startFragRequested=!1,this.nextLoadPosition=f.start,this.resetLoadingState(),this.state===Nt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Nt.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(cs),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=Nt.IDLE):this.state=Nt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Nt.IDLE:this.doTickIdle();break;case Nt.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=Nt.WAITING_INIT_PTS}break}case Nt.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case Nt.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=Nt.FRAG_LOADING;const A=r.flush().buffer,f={frag:t,part:n,payload:A,networkDetails:null};this._handleFragmentLoadProgress(f),i&&super._handleFragmentLoadComplete(f)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=Nt.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 A=n[i],f=A.details;if(!f||this.waitForLive(A)||this.waitForCdnTuneIn(f)){this.state=Nt.WAITING_TRACK,this.startFragRequested=!1;return}const u=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&u&&(this.bufferFlushed=!1,this.afterBufferFlushed(u,W.AUDIO,V.AUDIO));const m=this.getFwdBufferInfo(u,V.AUDIO);if(m===null)return;if(!this.switchingTrack&&this._streamEnded(m,f)){t.trigger(y.BUFFER_EOS,{type:"audio"}),this.state=Nt.ENDED;return}const _=m.len,w=t.maxBufferLength,I=f.fragments,D=I[0].start,G=this.getLoadPosition(),$=this.flushing?G:m.end;if(this.switchingTrack&&r){const Ce=G;f.PTSKnown&&Ce<D&&(m.end>D||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=D+.05)}if(_>=w&&!this.switchingTrack&&$<I[I.length-1].start)return;let pe=this.getNextFragment($,f);if(pe&&this.isLoopLoading(pe,$)&&(pe=this.getNextFragmentLoopLoading(pe,f,m,V.MAIN,w)),!pe){this.bufferFlushed=!0;return}let ye=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&ye&&qe(pe)&&!pe.endList&&(!f.live||!this.loadingParts&&$<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(ye)===dn.OK&&(this.mainFragLoading=ye=null),ye&&qe(ye))){if(pe.start>ye.end){const $e=this.fragmentTracker.getFragAtPos($,V.MAIN);$e&&$e.end>ye.end&&(ye=$e,this.mainFragLoading={frag:$e,targetBufferTime:null})}if(pe.start>ye.end)return}this.loadFragment(pe,A,$)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new xi(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!==Nt.STOPPED&&(this.setInterval(cs),this.state=Nt.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(y.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:A,track:f}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${f.name}" of "${A}"`);return}const u=this.mainDetails;if(!u||i.endCC>u.endCC||u.expired){this.cachedTrackLoadedData=t,this.state!==Nt.STOPPED&&(this.state=Nt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${f.name}" of "${A}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const m=r[s];let _=0;if(i.live||(n=m.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(m.details){var w;_=this.alignPlaylists(i,m.details,(w=this.levelLastLoaded)==null?void 0:w.details)}i.alignedSliding||(Ra(i,u),i.alignedSliding||Ps(i,u),_=i.fragmentStart)}m.details=i,this.levelLastLoaded=m,this.startFragRequested||this.setStartPosition(u,_),this.hls.trigger(y.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===Nt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Nt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:A,levels:f}=this;if(!f){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=f[A];if(!u){this.warn("Audio track is undefined on fragment load progress");return}const m=u.details;if(!m){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const _=s.defaultAudioCodec||u.audioCodec||"mp4a.40.2";let w=this.transmuxer;w||(w=this.transmuxer=new Zo(this.hls,V.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const I=this.initPTS[n.cc],D=(t=n.initSegment)==null?void 0:t.data;if(I!==void 0){const $=r?r.index:-1,pe=$!==-1,ye=new Hr(n.level,n.sn,n.stats.chunkCount,i.byteLength,$,pe);w.push(i,D,_,"",n,r,m.totalduration,!1,ye,I)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${m.startSN} ,${m.endSN}],track ${A}`);const{cache:G}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new kA,complete:!1};G.push(new Uint8Array(i)),this.state!==Nt.STOPPED&&(this.state=Nt.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===V.MAIN&&qe(t.frag)&&(this.mainFragLoading=t,this.state===Nt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==V.AUDIO){!this.audioOnly&&n.type===V.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(qe(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(y.AUDIO_TRACK_SWITCHED,F({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=Nt.ERROR;return}switch(t.details){case ne.FRAG_GAP:case ne.FRAG_PARSING_ERROR:case ne.FRAG_DECRYPT_ERROR:case ne.FRAG_LOAD_ERROR:case ne.FRAG_LOAD_TIMEOUT:case ne.KEY_LOAD_ERROR:case ne.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(V.AUDIO,t);break;case ne.AUDIO_TRACK_LOAD_ERROR:case ne.AUDIO_TRACK_LOAD_TIMEOUT:case ne.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Nt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===Se.AUDIO_TRACK&&(this.state=Nt.IDLE);break;case ne.BUFFER_ADD_CODEC_ERROR:case ne.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case ne.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case ne.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==W.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==W.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Nt.ENDED&&(this.state=Nt.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,V.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,A=this.getCurrentContext(s);if(!A){this.resetWhenMissingContext(s);return}const{frag:f,part:u,level:m}=A,{details:_}=m,{audio:w,text:I,id3:D,initSegment:G}=i;if(this.fragContextChanged(f)||!_){this.fragmentTracker.removeFragment(f);return}if(this.state=Nt.PARSING,this.switchingTrack&&w&&this.completeAudioSwitch(this.switchingTrack),G!=null&&G.tracks){const $=f.initSegment||f;if(this.unhandledEncryptionError(G,f))return;this._bufferInitSegment(m,G.tracks,$,s),r.trigger(y.FRAG_PARSING_INIT_SEGMENT,{frag:$,id:n,tracks:G.tracks})}if(w){const{startPTS:$,endPTS:pe,startDTS:ye,endDTS:Ce}=w;u&&(u.elementaryStreams[W.AUDIO]={startPTS:$,endPTS:pe,startDTS:ye,endDTS:Ce}),f.setElementaryStreamInfo(W.AUDIO,$,pe,ye,Ce),this.bufferFragmentData(w,f,u,s)}if(D!=null&&(t=D.samples)!=null&&t.length){const $=B({id:n,frag:f,details:_},D);r.trigger(y.FRAG_PARSING_METADATA,$)}if(I){const $=B({id:n,frag:f,details:_},I);r.trigger(y.FRAG_PARSING_USERDATA,$)}}_bufferInitSegment(e,t,n,r){if(this.state!==Nt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=V.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(y.BUFFER_CODECS,t);const A=i.initSegment;if(A!=null&&A.byteLength){const f={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:A};this.hls.trigger(y.BUFFER_APPENDING,f)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===dn.NOT_LOADED||r===dn.PARTIAL){var i;if(!qe(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=Nt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&Ps(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:A}=this.bufferedTrack;bt({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:A},e,wn)||(Zn(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(y.AUDIO_TRACK_SWITCHED,F({},e))}}class xA extends Z{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 A=r[s];let f;try{f=new self.URL(A.URI,t.url).href}catch(u){this.warn(`Could not construct new URL for Rendition Report: ${u}`),f=A.URI||""}if(f===e){i=s;break}else f===e.substring(0,f.length)&&(i=s)}if(i!==-1){const s=r[i],A=parseInt(s["LAST-MSN"])||t.lastPartSn;let f=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const m=Math.min(t.age-t.partTarget,t.targetduration);f>=0&&m>t.partTarget&&(f+=1)}const u=n&&Sr(n);return new Nr(A,f>=0?f: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(),A=i.loading.first?Math.max(0,s-i.loading.first):0;r.advancedDateTime=Date.now()-A;const f=this.hls.config.timelineOffset;if(f!==r.appliedTimelineOffset){const m=Math.max(f||0,0);r.appliedTimelineOffset=m,r.fragments.forEach(_=>{_.setStart(_.playlistOffset+m)})}if(r.live||n!=null&&n.live){const m="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){za(n,r,this);const ye=r.playlistParsingError;if(ye){this.warn(ye);const Ce=this.hls;if(!Ce.config.ignorePlaylistParsingErrors){var u;const{networkDetails:$e}=t;Ce.trigger(y.ERROR,{type:xe.NETWORK_ERROR,details:ne.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:ye,reason:ye.message,level:t.level||void 0,parent:(u=r.fragments[0])==null?void 0:u.type,networkDetails:$e,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const _=this.hls.mainForwardBufferInfo,w=_?_.end-_.len:0,I=(r.edge-w)*1e3,D=Za(r,I);if(r.requestScheduled+D<s?r.requestScheduled=s:r.requestScheduled+=D,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let G,$,pe;if(r.canBlockReload&&r.endSN&&r.advanced){const ye=this.hls.config.lowLatencyMode,Ce=r.lastPartSn,$e=r.endSN,je=r.lastPartIndex,Dt=je!==-1,et=Ce===$e;Dt?et?($=$e+1,pe=ye?0:je):($=Ce,pe=ye?je+1:r.maxPartIndex):$=$e+1;const wt=r.age,_t=wt+r.ageHeader;let at=Math.min(_t-r.partTarget,r.targetduration*1.5);if(at>0){if(_t>r.targetduration*3)this.log(`Playlist last advanced ${wt.toFixed(2)}s ago. Omitting segment and part directives.`),$=void 0,pe=void 0;else if(n!=null&&n.tuneInGoal&&_t-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${at} with playlist age: ${r.age}`),at=0;else{const Jt=Math.floor(at/r.targetduration);if($+=Jt,pe!==void 0){const In=Math.round(at%r.targetduration/r.partTarget);pe+=In}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${wt.toFixed(2)}s goal: ${at} skip sn ${Jt} to part ${pe}`)}r.tuneInGoal=at}if(G=this.getDeliveryDirectives(r,t.deliveryDirectives,$,pe),ye||!et){r.requestScheduled=s,this.loadingPlaylist(m,G);return}}else(r.canBlockReload||r.canSkipUntil)&&(G=this.getDeliveryDirectives(r,t.deliveryDirectives,$,pe));G&&$!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(D-A*2,D/2)),this.scheduleLoading(m,G,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 A=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(A)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),A)}getDeliveryDirectives(e,t,n,r){let i=Sr(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=br.No),new Nr(n,r,i)}checkRetry(e){const t=e.details,n=$t(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:A}=r||{},f=!!r&&!!A&&(i===an.RetryRequest||!r.resolved&&i===an.SendAlternateToPenaltyBox);if(f){var u;if(s>=A.maxNumRetry)return!1;if(n&&(u=e.context)!=null&&u.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${A.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const m=Ot(A,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),m),this.warn(`Retrying playlist loading ${s+1}/${A.maxNumRetry} after "${t}" in ${m}ms`)}e.levelRetry=!0,r.resolved=!0}return f}}function SA(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!qs(a[t].attrs,e[t].attrs))return!1;return!0}function qs(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 rA(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class FA extends xA{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(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.LEVEL_LOADING,this.onLevelLoading,this),e.on(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.LEVEL_LOADING,this.onLevelLoading,this),e.off(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(y.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 A=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,A)}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(A=>(r==null?void 0:r.indexOf(A))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const A=this.tracks.filter(w=>!n||n.indexOf(w.groupId)!==-1);if(A.length)this.selectDefaultTrack&&!A.some(w=>w.default)&&(this.selectDefaultTrack=!1),A.forEach((w,I)=>{w.id=I});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=A;const f=this.hls.config.audioPreference;if(!i&&f){const w=Et(f,A,wn);if(w>-1)i=A[w];else{const I=Et(f,this.tracks);i=this.tracks[I]}}let u=this.findTrackId(i);u===-1&&i&&(u=this.findTrackId(null));const m={audioTracks:A};this.log(`Updating audio tracks, ${A.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(y.AUDIO_TRACKS_UPDATED,m);const _=this.trackId;if(u!==-1&&_===-1)this.setAudioTrack(u);else if(A.length&&_===-1){var s;const w=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${A.length}`);this.warn(w.message),this.hls.trigger(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:w})}}}onError(e,t){t.fatal||!t.context||t.context.type===Se.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&&bt(e,r,wn))return r;const i=Et(e,this.tracksInGroup,wn);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 A=ur(e,t.levels,n,s,wn);if(A===-1)return null;t.nextLoadLevel=A}if(e.channels||e.audioCodec){const s=Et(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(y.AUDIO_TRACK_SWITCHING,F({},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||bt(e,r,wn)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:A,channels:f}=e;for(let u=0;u<t.length;u++){const m=t[u];if(bt({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:A,channels:f},m,wn))return u}for(let u=0;u<t.length;u++){const m=t[u];if(qs(e.attrs,m.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return u}for(let u=0;u<t.length;u++){const m=t[u];if(qs(e.attrs,m.attrs,["LANGUAGE"]))return u}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&Zn(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,A=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:""}${A&&s.live?" age "+A.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(y.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class Ol{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 TA=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,so="HlsJsTrackRemovedError";class ao extends Error{constructor(e){super(e),this.name=so}}class Yo extends Z{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(y.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=Je(Ue(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(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.BUFFER_RESET,this.onBufferReset,this),e.on(y.BUFFER_APPENDING,this.onBufferAppending,this),e.on(y.BUFFER_CODECS,this.onBufferCodecs,this),e.on(y.BUFFER_EOS,this.onBufferEos,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(y.FRAG_PARSED,this.onFragParsed,this),e.on(y.FRAG_CHANGED,this.onFragChanged,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.BUFFER_RESET,this.onBufferReset,this),e.off(y.BUFFER_APPENDING,this.onBufferAppending,this),e.off(y.BUFFER_CODECS,this.onBufferCodecs,this),e.off(y.BUFFER_EOS,this.onBufferEos,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(y.FRAG_PARSED,this.onFragParsed,this),e.off(y.FRAG_CHANGED,this.onFragChanged,this),e.off(y.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?B(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=B({},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=Ue(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 A=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{n.removeAttribute("src");const f=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||f&&s instanceof f,jo(n),Xo(n,A),n.load()}catch(f){n.src=A}else n.src=A}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,A=()=>{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,(f,u)=>f==="initSegment"?void 0:u)};
transfer tracks: ${Vt(r,(f,u)=>f==="initSegment"?void 0:u)}}`),!Be(r,n)){t.mediaSource=null,t.tracks=void 0;const f=e.currentTime,u=this.details,m=Math.max(f,(u==null?void 0:u.fragments[0].start)||0);if(m-f>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${f} -> ${m}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${m} currentTime: ${f}`),this.onMediaDetaching(y.MEDIA_DETACHING,{}),this.onMediaAttaching(y.MEDIA_ATTACHING,t),e.currentTime=m;return}this.transferData=void 0,i.forEach(f=>{const u=f,m=r[u];if(m){const _=m.buffer;if(_){const w=this.fragmentTracker,I=m.id;if(w.hasFragments(I)||w.hasParts(I)){const $=Yn.getBuffered(_);w.detectEvictedFragments(u,$,I,null,!0)}const D=iA(u),G=[u,_];this.sourceBuffers[D]=G,_.updating&&this.operationQueue&&this.operationQueue.prependBlocker(u),this.trackSourceBuffer(u,m)}}}),A(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),A()}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(([A])=>{A&&this.removeBuffer(A)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const A=i.readyState==="open";try{const f=i.sourceBuffers;for(let u=f.length;u--;)A&&f[u].abort(),i.removeSourceBuffer(f[u]);A&&i.endOfStream()}catch(f){this.warn(`onMediaDetaching: ${f.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&&jo(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(y.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[iA(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Ol(this.tracks)}onBufferCodecs(e,t){var n;const r=this.tracks,i=Object.keys(t);this.log(`BUFFER_CODECS: "${i}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),A=!s&&this.sourceBufferCount&&this.media&&i.some(f=>!r[f]);if(s||A){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${i}" SourceBuffers`);return}i.forEach(f=>{var u,m;const _=t[f],{id:w,codec:I,levelCodec:D,container:G,metadata:$,supplemental:pe}=_;let ye=r[f];const Ce=(u=this.transferData)==null||(u=u.tracks)==null?void 0:u[f],$e=Ce!=null&&Ce.buffer?Ce:ye,je=($e==null?void 0:$e.pendingCodec)||($e==null?void 0:$e.codec),Dt=$e==null?void 0:$e.levelCodec;ye||(ye=r[f]={buffer:void 0,listeners:[],codec:I,supplemental:pe,container:G,levelCodec:D,metadata:$,id:w});const et=Kt(je,Dt),wt=et==null?void 0:et.replace(TA,"$1");let _t=Kt(I,D);const at=(m=_t)==null?void 0:m.replace(TA,"$1");_t&&et&&wt!==at&&(f.slice(0,5)==="audio"&&(_t=Qe(_t,this.appendSource)),this.log(`switching codec ${je} to ${_t}`),_t!==(ye.pendingCodec||ye.codec)&&(ye.pendingCodec=_t),ye.container=G,this.appendChangeType(f,G,_t))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!t.video&&((n=t.audio)==null?void 0:n.id)==="main"&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),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 A=s.buffer;A!=null&&A.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),A.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,V.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var A;const f=this.tracks.video;(this.lastVideoAppendEnd>r||f!=null&&f.buffer&&Yn.isBuffered(f.buffer,r)||((A=this.fragmentTracker.getAppendedFrag(r,V.MAIN))==null?void 0:A.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:A=>{this.warn("Error executing block-audio operation",A)}};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:A,part:f,chunkMeta:u,offset:m}=t,_=u.buffering[i],{sn:w,cc:I}=A,D=self.performance.now();_.start=D;const G=A.stats.buffering,$=f?f.stats.buffering:null;G.start===0&&(G.start=D),$&&$.start===0&&($.start=D);const pe=n.audio;let ye=!1;i==="audio"&&(pe==null?void 0:pe.container)==="audio/mpeg"&&(ye=!this.lastMpegAudioChunk||u.id===1||this.lastMpegAudioChunk.sn!==u.sn,this.lastMpegAudioChunk=u);const Ce=n.video,$e=Ce==null?void 0:Ce.buffer;if($e&&w!=="initSegment"){const et=f||A,wt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(Ce.ending||Ce.ended)){const at=et.start+et.duration*.05,Jt=$e.buffered,In=this.currentOp("video");!Jt.length&&!In?this.blockAudio(et):!In&&!Yn.isBuffered($e,at)&&this.lastVideoAppendEnd<at&&this.blockAudio(et)}else if(i==="video"){const _t=et.end;if(wt){const at=wt.frag.start;(_t>at||_t<this.lastVideoAppendEnd||Yn.isBuffered($e,at))&&this.unblockAudio()}this.lastVideoAppendEnd=_t}}const je=(f||A).start,Dt={label:`append-${i}`,execute:()=>{var et;_.executeStart=self.performance.now();const wt=(et=this.tracks[i])==null?void 0:et.buffer;wt&&(ye?this.updateTimestampOffset(wt,je,.1,i,w,I):m!==void 0&&re(m)&&this.updateTimestampOffset(wt,m,1e-6,i,w,I)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const et=self.performance.now();_.executeEnd=_.end=et,G.first===0&&(G.first=et),$&&$.first===0&&($.first=et);const wt={};this.sourceBuffers.forEach(([_t,at])=>{_t&&(wt[_t]=Yn.getBuffered(at))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(y.BUFFER_APPENDED,{type:i,frag:A,part:f,chunkMeta:u,parent:A.type,timeRanges:wt})},onError:et=>{var wt;const _t={type:xe.MEDIA_ERROR,parent:A.type,details:ne.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:A,part:f,chunkMeta:u,error:et,err:et,fatal:!1},at=(wt=this.media)==null?void 0:wt.error;if(et.code===DOMException.QUOTA_EXCEEDED_ERR||et.name=="QuotaExceededError"||"quota"in et)_t.details=ne.BUFFER_FULL_ERROR;else if(et.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!at)_t.errorAction=fn(!0);else if(et.name===so&&this.sourceBufferCount===0)_t.errorAction=fn(!0);else{const Jt=++this.appendErrors[i];this.warn(`Failed ${Jt}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${at||"no media error"})`),(Jt>=this.hls.config.appendErrorMaxRetry||at)&&(_t.fatal=!0)}this.hls.trigger(y.ERROR,_t)}};this.log(`queuing "${i}" append sn: ${w}${f?" p: "+f.index:""} of ${A.type===V.MAIN?"level":"track"} ${A.level} cc: ${I}`),this.append(Dt,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(y.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[W.AUDIOVIDEO]?i.push("audiovideo"):(s[W.AUDIO]&&i.push("audio"),s[W.VIDEO]&&i.push("video"));const A=()=>{const f=self.performance.now();n.stats.buffering.end=f,r&&(r.stats.buffering.end=f);const u=r?r.stats:n.stats;this.hls.trigger(y.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(A,i).catch(f=>{this.warn(`Fragment buffered callback ${f}`),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 A=this.tracks[s];(!t.type||t.type===s)&&(A.ending=!0,A.ended||(A.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 A;return s&&!((A=this.tracks[s])!=null&&A.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(y.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(y.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===ne.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;re(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,A=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(re(A)&&A>=0){const u=Math.max(A,s),m=Math.floor(i/s)*s-u;this.flushBackBuffer(i,s,m)}const f=r.frontBufferFlushThreshold;if(re(f)&&f>0){const u=Math.max(r.maxBufferLength,f),m=Math.max(u,s),_=Math.floor(i/s)*s+m;this.flushFrontBuffer(i,s,_)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const A=Yn.getBuffered(i);if(A.length>0&&n>A.start(0)){var s;this.hls.trigger(y.BACK_BUFFER_REACHED,{bufferEnd:n});const f=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(y.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(f!=null&&f.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(y.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=Yn.getBuffered(i),A=s.length;if(A<2)return;const f=s.start(A-1),u=s.end(A-1);if(n>f||e>=f&&e<=u)return;this.hls.trigger(y.BUFFER_FLUSHING,{startOffset:f,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),m=Math.max(u,r);return{duration:1/0,start:u,end:m}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return re(i)?{duration:i}:null;const s=this.media.duration,A=re(n.duration)?n.duration:0;return r>A&&r>s||!re(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(re(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(y.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(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.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,A=e[s];if(this.isPending(A)){const f=this.getTrackCodec(A,s),u=`${A.container};codecs=${f}`;A.codec=f,this.log(`creating sourceBuffer(${u})${this.currentOp(s)?" Queued":""} ${Vt(A)}`);try{const m=n.addSourceBuffer(u),_=iA(s),w=[s,m];t[_]=w,A.buffer=m}catch(m){var r;this.error(`error while trying to add sourceBuffer: ${m.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:m,sourceBufferName:s,mimeType:u,parent:A.id});return}this.trackSourceBuffer(s,A)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&Cn(n,"video")&&(r=Tt(r,n));const i=Kt(r,e.levelCodec);return i?t.slice(0,5)==="audio"?Qe(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 A=s.removedRanges;A!=null&&A.length&&this.hls.trigger(y.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(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.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 A=t-e.timestampOffset;Math.abs(A)>=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],A=s==null?void 0:s.buffer;if(!r||!i||!A){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const f=re(r.duration)?r.duration:1/0,u=re(i.duration)?i.duration:1/0,m=Math.max(0,t),_=Math.min(n,f,u);_>m&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${m},${_}] from the ${e} SourceBuffer`),A.remove(m,_)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new ao(`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 jo(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function Xo(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function iA(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(y.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.BUFFER_CODECS,this.onBufferCodecs,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(y.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.BUFFER_CODECS,this.onBufferCodecs,this),e.off(y.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&&re(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=(A,f)=>f?A.width!==f.width||A.height!==f.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let A=0;A<e.length;A+=1){const f=e[A];if((f.width>=s||f.height>=s)&&r(f,e[A+1])){i=A;break}}return i}}const ps={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},l={HLS:"h"};class C{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof C?n:new C(n))),this.value=e,this.params=t}}const p="Dict";function R(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 j(a,e,t,n){return new Error(`failed to ${a} "${R(e)}" as ${t}`,{cause:n})}function te(a,e,t){return j("serialize",a,e,t)}class Ye{constructor(e){this.description=e}}const Ne="Bare Item",rn="Boolean";function Oe(a){if(typeof a!="boolean")throw te(a,rn);return a?"?1":"?0"}function it(a){return btoa(String.fromCharCode(...a))}const Pn="Byte Sequence";function hn(a){if(ArrayBuffer.isView(a)===!1)throw te(a,Pn);return`:${it(a)}:`}const Zt="Integer";function Wn(a){return a<-999999999999999||999999999999999<a}function si(a){if(Wn(a))throw te(a,Zt);return a.toString()}function xr(a){return`@${si(a.getTime()/1e3)}`}function mr(a,e){if(a<0)return-mr(-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 Kr="Decimal";function gr(a){const e=mr(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw te(a,Kr);const t=e.toString();return t.includes(".")?t:`${t}.0`}const An="String",Tr=/[\x00-\x1f\x7f]+/;function bi(a){if(Tr.test(a))throw te(a,An);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Ar(a){return a.description||a.toString().slice(7,-1)}const di="Token";function Mr(a){const e=Ar(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw te(e,di);return e}function yr(a){switch(typeof a){case"number":if(!re(a))throw te(a,Ne);return Number.isInteger(a)?si(a):gr(a);case"string":return bi(a);case"symbol":return Mr(a);case"boolean":return Oe(a);case"object":if(a instanceof Date)return xr(a);if(a instanceof Uint8Array)return hn(a);if(a instanceof Ye)return Mr(a);default:throw te(a,Ne)}}const zr="Key";function ea(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw te(a,zr);return a}function IA(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${ea(e)}`:`;${ea(e)}=${yr(t)}`).join("")}function sA(a){return a instanceof C?`${yr(a.value)}${IA(a.params)}`:yr(a)}function DA(a){return`(${a.value.map(sA).join(" ")})${IA(a.params)}`}function Wu(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw te(a,p);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof C||(i=new C(i));let s=ea(r);return i.value===!0?s+=IA(i.params):(s+="=",Array.isArray(i.value)?s+=DA(i):s+=sA(i)),s}).join(`,${n}`)}function gu(a,e){return Wu(a,e)}const ta="CMCD-Object",Hi="CMCD-Request",Ha="CMCD-Session",Fa="CMCD-Status",Ml={br:ta,ab:ta,d:ta,ot:ta,tb:ta,tpb:ta,lb:ta,tab:ta,lab:ta,url:ta,pb:Hi,bl:Hi,tbl:Hi,dl:Hi,ltc:Hi,mtp:Hi,nor:Hi,nrr:Hi,rc:Hi,sn:Hi,sta:Hi,su:Hi,ttfb:Hi,ttfbb:Hi,ttlb:Hi,cmsdd:Hi,cmsds:Hi,smrt:Hi,df:Hi,cs:Hi,ts:Hi,cid:Ha,pr:Ha,sf:Ha,sid:Ha,st:Ha,v:Ha,msd:Ha,bs:Fa,bsd:Fa,cdn:Fa,rtp:Fa,bg:Fa,pt:Fa,ec:Fa,e:Fa},zu={REQUEST:Hi};function Zu(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 Yu(a,e){const t={};if(!a)return t;const n=Object.keys(a),r=e?Zu(e):{};return n.reduce((i,s)=>{var A;const f=Ml[s]||r[s]||zu.REQUEST,u=(A=i[f])!==null&&A!==void 0?A:i[f]={};return u[s]=a[s],i},t)}function ju(a){return["ot","sf","st","e","sta"].includes(a)}function Jo(a){return typeof a=="number"?re(a):a!=null&&a!==""&&a!==!1}const Ao="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 oo=a=>Math.round(a),lo=(a,e)=>Array.isArray(a)?a.map(t=>lo(t,e)):a instanceof C&&typeof a.value=="string"?new C(lo(a.value,e),a.params):(e.baseUrl&&(a=Xu(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),uo=a=>oo(a/100)*100,pu={br:oo,d:oo,bl:uo,dl:uo,mtp:uo,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof C&&typeof a.value=="string"?t=new C([a]):typeof a=="string"&&(t=[a])),lo(t,e)},rtp:uo,tb:oo},mu="request",co="response",qo=["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"],_u=["e"],qu=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function el(a){return qu.test(a)}function vu(a){return qo.includes(a)||_u.includes(a)||el(a)}const aA=["d","dl","nor","ot","rtp","su"];function Nl(a){return qo.includes(a)||aA.includes(a)||el(a)}const tl=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function ec(a){return qo.includes(a)||aA.includes(a)||tl.includes(a)||el(a)}const tc=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function nc(a){return tc.includes(a)||el(a)}const rc={[co]:ec,[Ao]:vu,[mu]:Nl};function Hl(a,e={}){const t={};if(a==null||typeof a!="object")return t;const n=e.version||a.v||1,r=e.reportingMode||mu,i=n===1?nc:rc[r];let s=Object.keys(a).filter(i);const A=e.filter;typeof A=="function"&&(s=s.filter(A));const f=r===co||r===Ao;f&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const u=B({},pu,e.formatters),m={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(_=>{let w=a[_];const I=u[_];if(typeof I=="function"&&(w=I(w,m)),_==="v"){if(n===1)return;w=n}_=="pr"&&w===1||(f&&_==="ts"&&!re(w)&&(w=Date.now()),Jo(w)&&(ju(_)&&typeof w=="string"&&(w=new Ye(w)),t[_]=w))}),t}function Kl(a,e={}){const t={};if(!a)return t;const n=Hl(a,e),r=Yu(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,A])=>{const f=gu(A,{whitespace:!1});return f&&(i[s]=f),i},t)}function yu(a,e,t){return B(a,Kl(e,t))}const wu="CMCD";function $l(a,e={}){return a?gu(Hl(a,e),{whitespace:!1}):""}function Eu(a,e={}){if(!a)return"";const t=$l(a,e);return encodeURIComponent(t)}function Bu(a,e={}){if(!a)return"";const t=Eu(a,e);return`${wu}=${t}`}const bu=/CMCD=[^&#]+/;function nl(a,e,t){const n=Bu(e,t);if(!n)return a;if(bu.test(a))return a.replace(bu,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class rl{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:ps.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,A=this.hls.levels[i.level],f=this.getObjectType(i),u={d:(s||i).duration*1e3,ot:f};(f===ps.VIDEO||f===ps.AUDIO||f==ps.MUXED)&&(u.br=A.bitrate/1e3,u.tb=this.getTopBandwidth(f)/1e3,u.bl=this.getBufferLength(f));const m=s?this.getNextPart(s):this.getNextFrag(i);m!=null&&m.url&&m.url!==i.url&&(u.nor=m.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(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHED,this.onMediaDetached,this),e.on(y.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHED,this.onMediaDetached,this),e.off(y.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:l.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){B(t,this.createData());const n=t.ot===ps.INIT||t.ot===ps.VIDEO||t.ot===ps.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,A)=>(r.includes(A)&&(s[A]=t[A]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),yu(e.headers,t,i)):e.url=nl(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 A=i.length-1;A>=0;A--){const f=i[A];if(f.index===n&&f.fragment.sn===s)return i[A+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return ps.TIMED_TEXT;if(e.sn==="initSegment")return ps.INIT;if(t==="audio")return ps.AUDIO;if(t==="main")return this.hls.audioTracks.length?ps.VIDEO:ps.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===ps.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===ps.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:Yn.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,A){t(i),this.loader.load(i,s,A)}}}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,A){t(i),this.loader.load(i,s,A)}}}}const Cu=3e5;class xu extends Z{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(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.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)===an.SendAlternateToPenaltyBox&&n.flags===En.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:A,pathwayId:f,type:u}=t.context;A&&r?s=this.getPathwayForGroupId(A,u,s):f&&(s=f)}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===ne.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]>Cu&&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 A=this.hls.nextLoadLevel,f=this.hls.levels[A];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,mi(t),this.hls.trigger(y.LEVELS_UPDATED,{levels:t});const u=this.hls.levels[A];f&&u&&this.levels&&(u.attrs["STABLE-VARIANT-ID"]!==f.attrs["STABLE-VARIANT-ID"]&&u.bitrate!==f.bitrate&&this.log(`Unstable Pathways change from bitrate ${f.bitrate} to ${u.bitrate}`),this.hls.nextLoadLevel=A);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===Se.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===Se.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":A,"URI-REPLACEMENT":f}=i;if(t.some(m=>m.pathwayId===s))return;const u=this.getLevelsForPathway(A).map(m=>{const _=new ei(m.attrs);_["PATHWAY-ID"]=s;const w=_.AUDIO&&`${_.AUDIO}_clone_${s}`,I=_.SUBTITLES&&`${_.SUBTITLES}_clone_${s}`;w&&(n[_.AUDIO]=w,_.AUDIO=w),I&&(r[_.SUBTITLES]=I,_.SUBTITLES=I);const D=Gl(m.uri,_["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",f),G=new xi({attrs:_,audioCodec:m.audioCodec,bitrate:m.bitrate,height:m.height,name:m.name,url:D,videoCodec:m.videoCodec,width:m.width});if(m.audioGroups)for(let $=1;$<m.audioGroups.length;$++)G.addGroupId("audio",`${m.audioGroups[$]}_clone_${s}`);if(m.subtitleGroups)for(let $=1;$<m.subtitleGroups.length;$++)G.addGroupId("text",`${m.subtitleGroups[$]}_clone_${s}`);return G});t.push(...u),Su(this.audioTracks,n,f,s),Su(this.subtitleTracks,r,f,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(m){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const m=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+m)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,A=s.errorRetry||s.timeoutRetry||{},f={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:A.maxNumRetry||0,retryDelay:A.retryDelayMs||0,maxRetryDelay:A.maxRetryDelayMs||0},u={onSuccess:(m,_,w,I)=>{this.log(`Loaded steering manifest: "${r}"`);const D=m.data;if((D==null?void 0:D.VERSION)!==1){this.log(`Steering VERSION ${D.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=D.TTL;const{"RELOAD-URI":G,"PATHWAY-CLONES":$,"PATHWAY-PRIORITY":pe}=D;if(G)try{this.uri=new self.URL(G,r).href}catch(Ce){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${G}`);return}this.scheduleRefresh(this.uri||w.url),$&&this.clonePathways($);const ye={steeringManifest:D,url:r.toString()};this.hls.trigger(y.STEERING_MANIFEST_LOADED,ye),pe&&this.updatePathwayPriority(pe)},onError:(m,_,w,I)=>{if(this.log(`Error loading steering manifest: ${m.code} ${m.text} (${_.url})`),this.stopLoad(),m.code===410){this.enabled=!1,this.log(`Steering manifest ${_.url} no longer available`);return}let D=this.timeToLoad*1e3;if(m.code===429){const G=this.loader;if(typeof(G==null?void 0:G.getResponseHeader)=="function"){const $=G.getResponseHeader("Retry-After");$&&(D=parseFloat($)*1e3)}this.log(`Steering manifest ${_.url} rate limited`);return}this.scheduleRefresh(this.uri||_.url,D)},onTimeout:(m,_,w)=>{this.log(`Timeout loading steering manifest (${_.url})`),this.scheduleRefresh(this.uri||_.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,f,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 Su(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const A=B({},s);return A.details=void 0,A.attrs=new ei(A.attrs),A.url=A.attrs.URI=Gl(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),A.groupId=A.attrs["GROUP-ID"]=e[r],A.attrs["PATHWAY-ID"]=n,A});a.push(...i)})}function Gl(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let A;e&&(A=s==null?void 0:s[e],A&&(a=A));const f=new self.URL(a);return r&&!A&&(f.host=r),i&&Object.keys(i).sort().forEach(u=>{u&&f.searchParams.set(u,i[u])}),f.href}class AA extends Z{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=AA.CDMCleanupPromise?[AA.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=ys(this.config));const A=s.map(Pr).filter(f=>!!f);this.keyFormatPromise=this.getKeyFormatPromise(A)}this.keyFormatPromise.then(s=>{const A=ti(s);if(n!=="sinf"||A!==Bn.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${A}`);return}let f;try{const I=dt(new Uint8Array(r)),D=vs(JSON.parse(I).sinf),G=jt(D);if(!G)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");f=new Uint8Array(G.subarray(8,24))}catch(I){this.warn(`${i} Failed to parse sinf: ${I}`);return}const u=ie(f),{keyIdToKeySessionPromise:m,mediaKeySessions:_}=this;let w=m[u];for(let I=0;I<_.length;I++){const D=_[I],G=D.decryptdata;if(!G.keyId)continue;const $=ie(G.keyId);if(hi(f,G.keyId)||G.uri.replace(/-/g,"").indexOf(u)!==-1){if(w=m[$],!w)continue;if(G.pssh)break;delete m[$],G.pssh=new Uint8Array(r),G.keyId=f,w=m[u]=w.then(()=>this.generateRequestWithPreferredKeySession(D,n,r,"encrypted-event-key-match")),w.catch(pe=>this.handleError(pe));break}}w||this.handleError(new Error(`Key ID ${u} not encountered in playlist. Key-system sessions ${_.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(y.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(y.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(y.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(y.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(y.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(y.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(y.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===Bn.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,A,f)=>!!s&&f.indexOf(s)===A,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,A)=>{const f=u=>{const m=u.shift();this.getMediaKeysPromise(m,r,i).then(_=>s({keySystem:m,mediaKeys:_})).catch(_=>{u.length?f(u):_ instanceof as?A(_):A(new as({type:xe.KEY_SYSTEM_ERROR,details:ne.KEY_SYSTEM_NO_ACCESS,error:_,fatal:!0},_.message))})};f(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return Qi===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=Bi(e,t,n,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],A=(r=s)==null?void 0:r.keySystemAccess;if(!A){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Vt(i)}`),A=this.requestMediaKeySystemAccess(e,i);const f=s=this.keySystemAccessPromises[e]={keySystemAccess:A};return A.catch(u=>{this.log(`Failed to obtain access to key-system "${e}": ${u}`)}),A.then(u=>{this.log(`Access for key-system "${u.keySystem}" obtained`);const m=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const _=f.mediaKeys=u.createMediaKeys().then(w=>(this.log(`Media-keys created for "${e}"`),f.hasMediaKeys=!0,m.then(I=>I?this.setMediaKeysServerCertificate(w,e,I):w)));return _.catch(w=>{this.error(`Failed to create media-keys for "${e}"}: ${w}`)}),_})}return A.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${ie(e.keyId||[])} keyUri: ${e.uri}`);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=il(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)}updateKeySession(e,t){const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyId ${ie(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})=>Pr(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=Pr(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=ys(this.config),n=e.map(ti).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(n)}getKeyStatus(e){const{mediaKeySessions:t}=this;for(let n=0;n<t.length;n++){const r=ic(e,t[n]);if(r)return r}}loadKey(e){const t=e.keyInfo.decryptdata,n=il(t),r=this.bannedKeyIds[n];if(r||this.getKeyStatus(t)==="internal-error"){const A=Vl(r||"internal-error",t);return this.handleError(A,e.frag),Promise.reject(A)}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 A=this.getKeySystemForKeyPromise(t).then(({keySystem:f,mediaKeys:u})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(f,u).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:f,mediaKeys:u,decryptdata:t}))))).then(f=>{const u="cenc",m=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(f,u,m,"playlist-key")});return A.catch(f=>this.handleError(f,e.frag)),this.keyIdToKeySessionPromise[n]=A,A}return s.catch(A=>{if(A instanceof as){const f=F({},A.data);this.getKeyStatus(t)==="internal-error"&&(f.decryptdata=t);const u=new as(f,A.message);this.handleError(u,e.frag)}}),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){if(this.hls)if(e instanceof as){t&&(e.data.frag=t);const n=e.data.decryptdata;this.error(`${e.message}${n?` (${ie(n.keyId||[])})`:""}`),this.hls.trigger(y.ERROR,e.data)}else this.error(e.message),this.hls.trigger(y.ERROR,{type:xe.KEY_SYSTEM_ERROR,details:ne.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=il(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=ti(e.keyFormat),i=r?[r]:ys(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=ys(this.config)),e.length===0)throw new as({type:xe.KEY_SYSTEM_ERROR,details:ne.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 D=s.call(this.hls,t,n,e);if(!D)throw new Error("Invalid response from configured generateRequest filter");t=D.initDataType,n=D.initData?D.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(D){if(this.warn(D.message),this.hls&&this.hls.config.debug)throw D}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const A=il(e.decryptdata),f=e.decryptdata.uri;this.log(`Generating key-session request for "${r}" keyId: ${A} URI: ${f} (init data type: ${t} length: ${n.byteLength})`);const u=new _i,m=e._onmessage=D=>{const G=e.mediaKeysSession;if(!G){u.emit("error",new Error("invalid state"));return}const{messageType:$,message:pe}=D;this.log(`"${$}" message event for session "${G.sessionId}" message size: ${pe.byteLength}`),$==="license-request"||$==="license-renewal"?this.renewLicense(e,pe).catch(ye=>{u.eventNames().length?u.emit("error",ye):this.handleError(ye)}):$==="license-release"?e.keySystem===Bn.FAIRPLAY&&this.updateKeySession(e,Qs("acknowledged")).then(()=>this.removeSession(e)).catch(ye=>this.handleError(ye)):this.warn(`unhandled media key message type "${$}"`)},_=(D,G)=>{G.keyStatus=D;let $;D.startsWith("usable")?u.emit("resolved"):D==="internal-error"||D==="output-restricted"||D==="output-downscaled"?$=Vl(D,G.decryptdata):D==="expired"?$=new Error(`key expired (keyId: ${A})`):D==="released"?$=new Error("key released"):D==="status-pending"||this.warn(`unhandled key status change "${D}" (keyId: ${A})`),$&&(u.eventNames().length?u.emit("error",$):this.handleError($))},w=e._onkeystatuseschange=D=>{if(!e.mediaKeysSession){u.emit("error",new Error("invalid state"));return}const $=this.getKeyStatuses(e);if(!Object.keys($).some($e=>$[$e]!=="status-pending"))return;if($[A]==="expired"){this.log(`Expired key ${Vt($)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let ye=$[A];if(ye)_(ye,e);else{var Ce;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(Ce=e.keyStatusTimeouts)[A]||(Ce[A]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const je=this.getKeyStatus(e.decryptdata);if(je&&je!=="status-pending")return this.log(`No status for keyId ${A} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${je} from other session.`),_(je,e);this.log(`key status for ${A} in key-session "${e.mediaKeysSession.sessionId}" timed out after 0ms`),ye="internal-error",_(ye,e)},0)),this.log(`No status for keyId ${A} (${Vt($)}).`)}};Oi(e.mediaKeysSession,"message",m),Oi(e.mediaKeysSession,"keystatuseschange",w);const I=new Promise((D,G)=>{u.on("error",G),u.on("resolved",D)});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${A} URI: ${f}`)}).catch(D=>{throw new as({type:xe.KEY_SYSTEM_ERROR,details:ne.KEY_SYSTEM_NO_SESSION,error:D,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${D}`)}).then(()=>I).catch(D=>(u.removeAllListeners(),this.removeSession(e).then(()=>{throw D}))).then(()=>(u.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((n,r)=>{if(typeof r=="string"&&typeof n=="object"){const A=r;r=n,n=A}const i="buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r);e.keySystem===Bn.PLAYREADY&&i.length===16&&os(i);const s=ie(i);n==="internal-error"&&(this.bannedKeyIds[s]=n),this.log(`key status change "${n}" for keyStatuses keyId: ${s} key-session "${e.mediaKeysSession.sessionId}"`),t[s]=n}),t}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,A)=>{const f={responseType:"arraybuffer",url:i},u=t.certLoadPolicy.default,m={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(w,I,D,G)=>{s(w.data)},onError:(w,I,D,G)=>{A(new as({type:xe.KEY_SYSTEM_ERROR,details:ne.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:D,response:F({url:f.url,data:void 0},w)},`"${e}" certificate request failed (${i}). Status: ${w.code} (${w.text})`))},onTimeout:(w,I,D)=>{A(new as({type:xe.KEY_SYSTEM_ERROR,details:ne.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:D,response:{url:f.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(w,I,D)=>{A(new Error("aborted"))}};r.load(f,m,_)})):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 as({type:xe.KEY_SYSTEM_ERROR,details:ne.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 as({type:xe.KEY_SYSTEM_ERROR,details:ne.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 m;for(let _=0,w=i.length;_<w;_++){var s,A;m=i[_];const I=(s=m.querySelector("name"))==null?void 0:s.textContent,D=(A=m.querySelector("value"))==null?void 0:A.textContent;I&&D&&e.setRequestHeader(I,D)}}const f=r.querySelector("Challenge"),u=f==null?void 0:f.textContent;if(!u)throw new Error("Cannot find <Challenge> in key message");return Qs(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 A=new XMLHttpRequest;A.responseType="arraybuffer",A.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(A.readyState===4)if(A.status===200){this._requestLicenseFailureCount=0;let f=A.response;this.log(`License received ${f instanceof ArrayBuffer?f.byteLength:f}`);const u=this.config.licenseResponseCallback;if(u)try{f=u.call(this.hls,A,s,e)}catch(m){this.error(m)}r(f)}else{const f=n.errorRetry,u=f?f.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>u||A.status>=400&&A.status<500)i(new as({type:xe.KEY_SYSTEM_ERROR,details:ne.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:A,response:{url:s,data:void 0,code:A.status,text:A.statusText}},`License Request XHR failed (${s}). Status: ${A.status} (${A.statusText})`));else{const m=u-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${m} attempts left`),this.requestLicense(e,t).then(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=A,this.setupLicenseXHR(A,s,e,t).then(({xhr:f,licenseChallenge:u})=>{e.keySystem==Bn.PLAYREADY&&(u=this.unpackPlayReadyKeyMessage(f,u)),f.send(u)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,Oi(n,"encrypted",this.onMediaEncrypted),Oi(n,"waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(Zi(e,"encrypted",this.onMediaEncrypted),Zi(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,rs.clearKeyUriToKeyIdMap();const r=n.length;AA.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(y.ERROR,{type:xe.OTHER_ERROR,details:ne.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${i}`)})}))||Promise.resolve())).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}`),this.hls&&this.hls.trigger(y.ERROR,{type:xe.OTHER_ERROR,details:ne.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: ${ie((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{keyStatusTimeouts:s}=e;s&&Object.keys(s).forEach(u=>self.clearTimeout(s[u]));const{drmSystemOptions:A}=this.config;return(Di(A)?new Promise((u,m)=>{self.setTimeout(()=>m(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(u).catch(m)}):Promise.resolve()).catch(u=>{this.log(`Could not remove session: ${u}`),this.hls&&this.hls.trigger(y.ERROR,{type:xe.OTHER_ERROR,details:ne.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${u}`)})}).then(()=>t.close()).catch(u=>{this.log(`Could not close session: ${u}`),this.hls&&this.hls.trigger(y.ERROR,{type:xe.OTHER_ERROR,details:ne.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${u}`)})})}return Promise.resolve()}}AA.CDMCleanupPromise=void 0;function il(a){if(!a)throw new Error("Could not read keyId of undefined decryptdata");if(a.keyId===null)throw new Error("keyId is null");return ie(a.keyId)}function ic(a,e){if(a.keyId&&e.mediaKeysSession.keyStatuses.has(a.keyId))return e.mediaKeysSession.keyStatuses.get(a.keyId);if(a.matches(e.decryptdata))return e.keyStatus}class as 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 Vl(a,e){const t=a==="output-restricted",n=t?ne.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:ne.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new as({type:xe.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class Yi{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(y.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(y.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(y.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,A=t-this.lastDecodedFrames,f=1e3*s/i,u=this.hls;if(u.trigger(y.FPS_DROP,{currentDropped:s,currentDecoded:A,totalDroppedFrames:n}),f>0&&s>u.config.fpsDroppedMonitoringThreshold*A){let m=u.currentLevel;u.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+m),m>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=m)&&(m=m-1,u.trigger(y.FPS_DROP_LEVEL_CAPPING,{level:m,droppedLevel:u.currentLevel}),u.autoLevelCapping=m,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 Ka(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 oA(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){ge.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){ge.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function Ms(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 ca(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=Ta(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 fo(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 Ta(a,e,t){const n=[],r=fo(a,e);if(r>-1)for(let i=r,s=a.length;i<s;i++){const A=a[i];if(A.startTime>=e&&A.endTime<=t)n.push(A);else if(A.startTime>t)return n}return n}function ho(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 Fu extends xA{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=ho(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(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.LEVEL_LOADING,this.onLevelLoading,this),e.on(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.LEVEL_LOADING,this.onLevelLoading,this),e.off(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(y.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;ho(n.textTracks).forEach(s=>{Ms(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 A=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,A)}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(m=>!n||n.indexOf(m.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(m=>m.default)&&(this.selectDefaultTrack=!1),s.forEach((m,_)=>{m.id=_});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const A=this.hls.config.subtitlePreference;if(!i&&A){this.selectDefaultTrack=!1;const m=Et(A,s);if(m>-1)i=s[m];else{const _=Et(A,this.tracks);i=this.tracks[_]}}let f=this.findTrackId(i);f===-1&&i&&(f=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(y.SUBTITLE_TRACKS_UPDATED,u),f!==-1&&this.trackId===-1&&this.setSubtitleTrack(f)}}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||bt(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if(qs(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if(qs(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(rA(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===Se.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&&bt(e,n))return n;const r=Et(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=Et(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,A=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:""}${A&&s.live?" age "+A.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(y.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=ho(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>rA(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||!re(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(y.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:A="",name:f,type:u,url:m}=r;this.hls.trigger(y.SUBTITLE_TRACK_SWITCH,{id:s,groupId:A,name:f,type:u,url:m});const _=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(_)}}function Tu(){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 lA(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const fa=.025;let go=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function Iu(a,e,t){return`${a.identifier}-${t+1}-${lA(e)}`}class po{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 Wl(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=Wl(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=re(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 Wl(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)<fa))}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"?go.Range:go.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 sc(this)}}function Wl(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<fa)?e.start:e.start+e.duration}function Du(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function zl(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function sc(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function LA(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class Zl{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(y.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;const s=()=>{this.hasDetails=!0};i.once(y.LEVEL_LOADED,s),i.once(y.AUDIO_TRACK_LOADED,s),i.once(y.SUBTITLE_TRACK_LOADED,s),i.on(y.MEDIA_ATTACHING,(A,{media:f})=>{this.removeMediaListeners(),this.mediaAttached=f,this.interstitial.playoutLimit&&(f.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(y.BUFFER_APPENDED,()=>{const m=this.bufferedEnd;this.reachedPlayout(m)&&(this._bufferedEosTime=m,i.trigger(y.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=Du(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=Yn.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=Yn.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: ${LA(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const Lu=.033;class ac extends Z{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 A=s.timelineStart;if(t===A||t>A&&(t<A+(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),A=Object.keys(r),f=i?i.filter(u=>!A.includes(u.identifier)):[];s.length&&s.sort((u,m)=>{const _=u.cue.pre,w=u.cue.post,I=m.cue.pre,D=m.cue.post;if(_&&!I)return-1;if(I&&!_||w&&!D)return 1;if(D&&!w)return-1;if(!_&&!I&&!w&&!D){const G=u.startTime,$=m.startTime;if(G!==$)return G-$}return u.dateRange.tagOrder-m.dateRange.tagOrder}),this.events=s,f.forEach(u=>{this.removeEvent(u)}),this.updateSchedule(e,f)}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((f,u)=>Math.abs(f.playout.start-i[u].playout.start)>.005||Math.abs(f.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 A=i[s],f=e[A];if(f.isInterstitial){let u=this.eventMap[A];u?u.setDateRange(f):(u=new po(f,t),this.eventMap[A]=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(f=>!f.error&&!(f.cue.once&&f.hasPlayed)),e.length){this.resolveOffsets(e,t);let f=0,u=0;if(e.forEach((m,_)=>{const w=m.cue.pre,I=m.cue.post,D=e[_-1]||null,G=m.appendInPlace,$=I?i:m.startOffset,pe=m.duration,ye=m.timelineOccupancy===go.Range?pe:0,Ce=m.resumptionOffset,$e=(D==null?void 0:D.startTime)===$,je=$+m.cumulativeDuration;let Dt=G?je+pe:$+Ce;if(w||!I&&$<=0){const wt=u;u+=ye,m.timelineStart=je;const _t=s;s+=pe,n.push({event:m,start:je,end:Dt,playout:{start:_t,end:s},integrated:{start:wt,end:u}})}else if($<=i){if(!$e){const at=$-f;if(at>Lu){const Jt=f,In=u;u+=at;const jn=s;s+=at;const sr={previousEvent:e[_-1]||null,nextEvent:m,start:Jt,end:Jt+at,playout:{start:jn,end:s},integrated:{start:In,end:u}};n.push(sr)}else at>0&&D&&(D.cumulativeDuration+=at,n[n.length-1].end=$)}I&&(Dt=je),m.timelineStart=je;const wt=u;u+=ye;const _t=s;s+=pe,n.push({event:m,start:je,end:Dt,playout:{start:_t,end:s},integrated:{start:wt,end:u}})}else return;const et=m.resumeTime;I||et>i?f=i:f=et}),f<i){var A;const m=f,_=u,w=i-f;u+=w;const I=s;s+=w,n.push({previousEvent:((A=n[n.length-1])==null?void 0:A.event)||null,nextEvent:null,start:f,end:m+w,playout:{start:I,end:s},integrated:{start:_,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((A,f)=>{const u=A.cue.pre,m=A.cue.post,_=u?0:m?r:A.startTime;this.updateAssetDurations(A),s===_?A.cumulativeDuration=i:(i=0,s=_),!m&&A.snapOptions.in&&(A.resumeAnchor=ve(null,n.fragments,A.startOffset+A.resumptionOffset,0,0)||void 0),A.appendInPlace&&!A.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(A,t)||(A.appendInPlace=!1)),!A.appendInPlace&&f+1<e.length&&e[f+1].startTime-e[f].resumeTime<Lu&&(e[f+1].appendInPlace=!1,e[f+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${A}`));const I=re(A.resumeOffset)?A.resumeOffset:A.duration;i+=I})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>fa?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):!Object.keys(t).some(s=>{const A=t[s].details,f=A.edge;if(n>=f)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${f}`),!1;const u=ve(null,A.fragments,n);if(!u)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${s} playlist (${A.fragStart}-${A.fragmentEnd})`),!0;const m=s==="audio"?.175:0;return Math.abs(u.start-n)<fa+m||Math.abs(u.end-n)<fa+m?!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 A=e.assetList[s],f=t+n;A.startOffset=n,A.timelineStart=f,r||(r=A.duration===null),i||(i=!!A.error);const u=A.error?0:A.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 na(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class Ac{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=Du(n,this.hls.sessionId,e.baseUrl)}catch(w){const I=this.assignAssetListError(e,ne.ASSET_LIST_LOAD_ERROR,w,n);this.hls.trigger(y.ERROR,I);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,A=new s(i),f={responseType:"json",url:r.href},u=i.interstitialAssetListLoadPolicy.default,m={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(w,I,D,G)=>{const $=w.data,pe=$==null?void 0:$.ASSETS;if(!Array.isArray(pe)){const ye=this.assignAssetListError(e,ne.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),D.url,I,G);this.hls.trigger(y.ERROR,ye);return}e.assetListResponse=$,this.hls.trigger(y.ASSET_LIST_LOADED,{event:e,assetListResponse:$,networkDetails:G})},onError:(w,I,D,G)=>{const $=this.assignAssetListError(e,ne.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${w.code} ${w.text} (${I.url})`),I.url,G,D);this.hls.trigger(y.ERROR,$)},onTimeout:(w,I,D)=>{const G=this.assignAssetListError(e,ne.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${I.url})`),I.url,w,D);this.hls.trigger(y.ERROR,G)}};return A.load(f,m,_),this.hls.trigger(y.ASSET_LIST_LOADING,{event:e}),A}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:xe.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function Uu(a){a==null||a.play().catch(()=>{})}function UA(a,e){return`[${a}] Advancing timeline position to ${e}`}class Yl extends Z{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 A=this.playingItem;if(!A){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(!0),this.checkBuffer(),s&&n<A.start||n>=A.end){var f;const I=this.findItemIndex(A);let D=this.schedule.findItemIndexAtTime(n);if(D===-1&&(D=I+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${I} to ${D})`)),!this.isInterstitial(A)&&(f=this.media)!=null&&f.paused&&(this.shouldPlay=!1),!s&&D>I){const G=this.schedule.findJumpRestrictedIndex(I+1,D);if(G>I){this.setSchedulePosition(G);return}}this.setSchedulePosition(D);return}const u=this.playingAsset;if(!u){if(this.playingLastItem&&this.isInterstitial(A)){const I=A.event.assetList[0];I&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,I))}return}const m=u.timelineStart,_=u.duration||0;if(s&&n<m||n>=m+_){var w;(w=A.event)!=null&&w.appendInPlace&&(this.clearInterstitial(A.event,A),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 A=this.findItemIndex(r);this.setSchedulePosition(A+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,A=i.events||[],f=i.items||[],u=i.durations,m=n.map(G=>G.identifier),_=!!(A.length||m.length);(_||r)&&this.log(`INTERSTITIALS_UPDATED (${A.length}): ${A}
Schedule: ${f.map(G=>na(G))} pos: ${this.timelinePos}`),m.length&&this.log(`Removed events ${m}`);let w=null,I=null;s&&(w=this.updateItem(s,this.timelinePos),this.itemsMatch(s,w)?this.playingItem=w:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const D=this.bufferingItem;if(D&&(I=this.updateItem(D,this.bufferedPos),this.itemsMatch(D,I)?this.bufferingItem=I:D.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(D.event,null))),n.forEach(G=>{G.assetList.forEach($=>{this.clearAssetPlayer($.identifier,null)})}),this.playerQueue.forEach(G=>{if(G.interstitial.appendInPlace){const $=G.assetItem.timelineStart,pe=G.timelineOffset-$;if(pe)try{G.timelineOffset=$}catch(ye){Math.abs(pe)>fa&&this.warn(`${ye} ("${G.assetId}" ${G.timelineOffset}->${$})`)}}}),_||r){if(this.hls.trigger(y.INTERSTITIALS_UPDATED,{events:A.slice(0),schedule:f.slice(0),durations:u,removedIds:m}),this.isInterstitial(s)&&m.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}s&&this.trimInPlace(w,s),D&&I!==w&&this.trimInPlace(I,D),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Ac(e),this.schedule=new ac(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(y.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(y.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(y.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(y.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(y.BUFFER_APPENDED,this.onBufferAppended,this),e.on(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(y.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(y.MEDIA_ENDED,this.onMediaEnded,this),e.on(y.ERROR,this.onError,this),e.on(y.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(y.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(y.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(y.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(y.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(y.BUFFER_CODECS,this.onBufferCodecs,this),e.off(y.BUFFER_APPENDED,this.onBufferAppended,this),e.off(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(y.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(y.MEDIA_ENDED,this.onMediaEnded,this),e.off(y.ERROR,this.onError,this),e.off(y.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){Zi(e,"play",this.onPlay),Zi(e,"pause",this.onPause),Zi(e,"seeking",this.onSeeking),Zi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Oi(n,"seeking",this.onSeeking),Oi(n,"timeupdate",this.onTimeupdate),Oi(n,"play",this.onPlay),Oi(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=_=>_&&e.getAssetPlayer(_.identifier),r=(_,w,I,D,G)=>{if(_){let $=_[w].start;const pe=_.event;if(pe){if(w==="playout"||pe.timelineOccupancy!==go.Point){const ye=n(I);(ye==null?void 0:ye.interstitial)===pe&&($+=ye.assetItem.startOffset+ye[G])}}else{const ye=D==="bufferedPos"?s():e[D];$+=ye-_.start}return $}return 0},i=(_,w)=>{var I;if(_!==0&&w!=="primary"&&(I=e.schedule)!=null&&I.length){var D;const G=e.schedule.findItemIndexAtTime(_),$=(D=e.schedule.items)==null?void 0:D[G];if($){const pe=$[w].start-$.start;return _+pe}}return _},s=()=>{const _=e.bufferedPos;return _===Number.MAX_VALUE?A("primary"):Math.max(_,0)},A=_=>{var w,I;return(w=e.primaryDetails)!=null&&w.live?e.primaryDetails.edge:((I=e.schedule)==null?void 0:I.durations[_])||0},f=(_,w)=>{var I,D;const G=e.effectivePlayingItem;if(G!=null&&(I=G.event)!=null&&I.restrictions.skip||!e.schedule)return;e.log(`seek to ${_} "${w}"`);const $=e.effectivePlayingItem,pe=e.schedule.findItemIndexAtTime(_,w),ye=(D=e.schedule.items)==null?void 0:D[pe],Ce=e.getBufferingPlayer(),$e=Ce==null?void 0:Ce.interstitial,je=$e==null?void 0:$e.appendInPlace,Dt=$&&e.itemsMatch($,ye);if($&&(je||Dt)){const et=n(e.playingAsset),wt=(et==null?void 0:et.media)||e.primaryMedia;if(wt){const _t=w==="primary"?wt.currentTime:r($,w,e.playingAsset,"timelinePos","currentTime"),at=_-_t,Jt=(je?_t:wt.currentTime)+at;if(Jt>=0&&(!et||je||Jt<=et.duration)){wt.currentTime=Jt;return}}}if(ye){let et=_;if(w!=="primary"){const _t=ye[w].start,at=_-_t;et=ye.start+at}const wt=!e.isInterstitial(ye);if((!e.isInterstitial($)||$.event.appendInPlace)&&(wt||ye.event.appendInPlace)){const _t=e.media||(je?Ce==null?void 0:Ce.media:null);_t&&(_t.currentTime=et)}else if($){const _t=e.findItemIndex($);if(pe>_t){const Jt=e.schedule.findJumpRestrictedIndex(_t+1,pe);if(Jt>_t){e.setSchedulePosition(Jt);return}}let at=0;if(wt)e.timelinePos=et,e.checkBuffer();else{const Jt=ye.event.assetList,In=_-(ye[w]||ye).start;for(let jn=Jt.length;jn--;){const sr=Jt[jn];if(sr.duration&&In>=sr.startOffset&&In<sr.startOffset+sr.duration){at=jn;break}}}e.setSchedulePosition(pe,at)}}},u=()=>{const _=e.effectivePlayingItem;if(e.isInterstitial(_))return _;const w=t();return e.isInterstitial(w)?w:null},m={get bufferedEnd(){const _=t(),w=e.bufferingItem;if(w&&w===_){var I;return r(w,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-w.playout.start||((I=e.bufferingAsset)==null?void 0:I.startOffset)||0}return 0},get currentTime(){const _=u(),w=e.effectivePlayingItem;return w&&w===_?r(w,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-w.playout.start:0},set currentTime(_){const w=u(),I=e.effectivePlayingItem;I&&I===w&&f(_+I.playout.start,"playout")},get duration(){const _=u();return _?_.playout.end-_.playout.start:0},get assetPlayers(){var _;const w=(_=u())==null?void 0:_.event.assetList;return w?w.map(I=>e.getAssetPlayer(I.identifier)):[]},get playingIndex(){var _;const w=(_=u())==null?void 0:_.event;return w&&e.effectivePlayingAsset?w.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return u()}};return this.manager={get events(){var _;return((_=e.schedule)==null||(_=_.events)==null?void 0:_.slice(0))||[]},get schedule(){var _;return((_=e.schedule)==null||(_=_.items)==null?void 0:_.slice(0))||[]},get interstitialPlayer(){return u()?m:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const _=t();return e.findItemIndex(_)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const _=e.effectivePlayingItem;return e.findItemIndex(_)},primary:{get bufferedEnd(){return s()},get currentTime(){const _=e.timelinePos;return _>0?_:0},set currentTime(_){f(_,"primary")},get duration(){return A("primary")},get seekableStart(){var _;return((_=e.primaryDetails)==null?void 0:_.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(_){f(_,"integrated")},get duration(){return A("integrated")},get seekableStart(){var _;return i(((_=e.primaryDetails)==null?void 0:_.fragmentStart)||0,"integrated")}},skip:()=>{const _=e.effectivePlayingItem,w=_==null?void 0:_.event;if(w&&!w.restrictions.skip){const I=e.findItemIndex(_);if(w.appendInPlace){const D=_.playout.start+_.event.duration;f(D+.001,"playout")}else e.advanceAfterAssetEnded(w,I,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||!re(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,A=e!==s,f=A&&e.interstitial.appendInPlace,u=(n=this.detachedData)==null?void 0:n.mediaSource;let m;if(s.media)f&&(i=s.transferMedia(),this.detachedData=i),m="Primary";else if(u){const D=this.getBufferingPlayer();D?(i=D.transferMedia(),m=`${D}`):m="detached MediaSource"}else m="detached media";if(!i){if(u)i=this.detachedData,this.log(`using detachedData: MediaSource ${Vt(i)}`);else if(!this.detachedData||s.media===t){const D=this.playerQueue;D.length>1&&D.forEach(G=>{if(A&&G.interstitial.appendInPlace!==f){const $=G.interstitial;this.clearInterstitial(G.interstitial,null),$.appendInPlace=!1,$.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${$}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const _=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",w=_&&i?i:t;this.log(`${_?"transfering MediaSource":"attaching media"} to ${A?e:"Primary"} from ${m} (media.currentTime: ${t.currentTime})`);const I=this.schedule;if(w===i&&I){const D=A&&e.assetId===I.assetIdAtEnd;w.overrides={duration:I.duration,endOfStream:!A||D,cueRemoval:!A}}e.attachMedia(w)}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(UA("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,A=e.findItemIndexAtTime(s);this.setSchedulePosition(A)}}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=zl(n,r);if(!n.isAssetPastPlayoutLimit(i))this.bufferedToEvent(e,i);else if(this.schedule){var s;const A=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];A&&this.bufferedToItem(A)}}advanceAfterAssetEnded(e,t,n){const r=zl(e,n);if(e.isAssetPastPlayoutLimit(r)){if(this.schedule){const i=this.schedule.items;if(i){const s=t+1,A=i.length;if(s>=A){this.setSchedulePosition(-1);return}const f=e.resumeTime;this.timelinePos<f&&(this.log(UA("advanceAfterAssetEnded",f)),this.timelinePos=f,e.appendInPlace&&this.advanceInPlace(f),this.checkBuffer(this.bufferedPos<f)),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),A=n.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,A-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&&na(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,A=this.playingLastItem;if(this.isInterstitial(s)){const m=s.event,_=this.playingAsset,w=_==null?void 0:_.identifier,I=w?this.getAssetPlayer(w):null;if(I&&w&&(!this.eventItemsMatch(s,i)||t!==void 0&&w!==m.assetList[t].identifier)){var f;const D=m.findAssetIndex(_);if(this.log(`INTERSTITIAL_ASSET_ENDED ${D+1}/${m.assetList.length} ${LA(_)}`),this.endedAsset=_,this.playingAsset=null,this.hls.trigger(y.INTERSTITIAL_ASSET_ENDED,{asset:_,assetListIndex:D,event:m,schedule:r.slice(0),scheduleIndex:e,player:I}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(m,this.findItemIndex(this.playingItem),D);return}this.retreiveMediaSource(w,i),I.media&&!((f=this.detachedData)!=null&&f.mediaSource)&&I.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${m} ${na(s)}`),m.hasPlayed=!0,this.hls.trigger(y.INTERSTITIAL_ENDED,{event:m,schedule:r.slice(0),scheduleIndex:e}),m.cue.once)){var u;this.updateSchedule();const D=(u=this.schedule)==null?void 0:u.items;if(i&&D){const G=this.findItemIndex(i);this.advanceSchedule(G,D,t,s,A)}return}}this.advanceSchedule(e,r,t,s,A)}advanceSchedule(e,t,n,r,i){const s=this.schedule;if(!s)return;const A=t[e]||null,f=this.primaryMedia,u=this.playerQueue;if(u.length&&u.forEach(m=>{const _=m.interstitial,w=s.findEventIndex(_.identifier);(w<e||w>e+1)&&this.clearInterstitial(_,A)}),this.isInterstitial(A)){this.timelinePos=Math.min(Math.max(this.timelinePos,A.start),A.end);const m=A.event;if(n===void 0){n=s.findAssetIndex(m,this.timelinePos);const D=zl(m,n-1);if(m.isAssetPastPlayoutLimit(D)||m.appendInPlace&&this.timelinePos===A.end){this.advanceAfterAssetEnded(m,e,n);return}n=D}const _=this.waitingItem;this.assetsBuffered(A,f)||this.setBufferingItem(A);let w=this.preloadAssets(m,n);if(this.eventItemsMatch(A,_||r)||(this.waitingItem=A,this.log(`INTERSTITIAL_STARTED ${na(A)} ${m.appendInPlace?"append in place":""}`),this.hls.trigger(y.INTERSTITIAL_STARTED,{event:m,schedule:t.slice(0),scheduleIndex:e})),!m.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${m}`);return}if(m.assetListLoader&&(m.assetListLoader.destroy(),m.assetListLoader=void 0),!f){this.log(`Waiting for attachMedia to start Interstitial ${m}`);return}this.waitingItem=this.endedItem=null,this.playingItem=A;const I=m.assetList[n];if(!I){this.advanceAfterAssetEnded(m,e,n||0);return}if(w||(w=this.getAssetPlayer(I.identifier)),w===null||w.destroyed){const D=m.assetList.length;this.warn(`asset ${n+1}/${D} player destroyed ${m}`),w=this.createAssetPlayer(m,I,n),w.loadSource()}if(!this.eventItemsMatch(A,this.bufferingItem)&&m.appendInPlace&&this.isAssetBuffered(I))return;this.startAssetPlayer(w,n,t,e,f),this.shouldPlay&&Uu(w.media)}else A?(this.resumePrimary(A,e,r),this.shouldPlay&&Uu(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 ${na(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let A=this.timelinePos;(A<e.start||A>=e.end)&&(A=this.getPrimaryResumption(e,t),this.log(UA("resumePrimary",A)),this.timelinePos=A),this.attachPrimary(A,e)}if(!n)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${na(e)}`),this.hls.trigger(y.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:Yn.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(UA("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(y.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(y.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1||!this.schedule)return;const n=this.hls.levels[t.level];if(!n.details)return;const r=F(F({},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=F(F({},this.altSelection),{},{audio:n});return}const i=F(F({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=F(F({},this.altSelection),{},{subtitles:n});return}const i=F(F({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=zt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=zt(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),A=(n=this.schedule.items)==null?void 0:n[s];this.isInterstitial(A)&&this.eventItemsMatch(A,this.bufferingItem)&&this.bufferedToItem(A,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=Yn.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${na(e)} (was ${na(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=Yn.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,A=this.findItemIndex(s);let f=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var u;const m=this.findItemIndex(i),_=Math.min(m+1,t.length-1),w=t[_];if((f===-1&&i&&e>=i.end||(u=w.event)!=null&&u.appendInPlace&&e+.01>=w.start)&&(f=_),this.isInterstitial(i)){const I=i.event;if(_-A>1&&I.appendInPlace===!1||I.assetList.length===0&&I.assetListLoader)return}if(this.bufferedPos=e,f>m&&f>A)this.bufferedToItem(w);else{const I=this.primaryDetails;this.primaryLive&&I&&e>I.edge-I.targetduration&&w.start<I.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(w)&&this.preloadAssets(w.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(f===A?this.bufferedToItem(s):f===A+1&&this.bufferedToItem(t[f]))}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),A=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const f=A?A.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${na(e)}`+(t?` (${f.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const u=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((m,_)=>{const w=this.getAssetPlayer(m.identifier);w&&(_===u&&w.loadSource(),w.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(u=>u.pauseBuffering());this.hls.trigger(y.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 A=this.primaryMedia;A&&this.bufferAssetPlayer(s,A)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,i=r===0&&!e.assetListLoader,s=e.cue.once;if(i){const f=e.timelineStart;if(e.appendInPlace){var A;const w=this.playingItem;!this.isInterstitial(w)&&(w==null||(A=w.nextEvent)==null?void 0:A.identifier)===e.identifier&&this.flushFrontBuffer(f+.25)}let u,m=0;if(!this.playingItem&&this.primaryLive&&(m=this.hls.startPosition,m===-1&&(m=this.hls.liveSyncPosition||0)),m&&!(e.cue.pre||e.cue.post)){const w=m-f;w>0&&(u=Math.round(w*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${u?` live-start: ${m} start-offset: ${u}`:""}`),n)return this.createAsset(e,0,0,f,e.duration,n);const _=this.assetListLoader.loadAssetList(e,u);_&&(e.assetListLoader=_)}else if(!s&&r){for(let u=t;u<r;u++){const m=e.assetList[u],_=this.getAssetPlayerQueueIndex(m.identifier);(_===-1||this.playerQueue[_].destroyed)&&!m.error&&this.createAssetPlayer(e,m,u)}const f=e.assetList[t];if(f){const u=this.getAssetPlayer(f.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(y.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 A={parentIdentifier:e.identifier,identifier:Iu(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,A,t)}createAssetPlayer(e,t,n){const r=this.hls,i=r.userConfig;let s=i.videoPreference;const A=r.loadLevelObj||r.levels[r.currentLevel];(s||A)&&(s=B({},s),A.videoCodec&&(s.videoCodec=A.videoCodec),A.videoRange&&(s.allowedVideoRanges=[A.videoRange]));const f=r.audioTracks[r.audioTrack],u=r.subtitleTracks[r.subtitleTrack];let m=0;if(this.primaryLive||e.appendInPlace){const $e=this.timelinePos-t.timelineStart;if($e>1){const je=t.duration;je&&$e<je&&(m=$e)}}const _=t.identifier,w=F(F({},i),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:_,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:m,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:f||i.audioPreference,subtitlePreference:u||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(w.timelineOffset=t.timelineStart));const I=w.cmcd;I!=null&&I.sessionId&&I.contentId&&(w.cmcd=B({},I,{contentId:lA(t.uri)})),this.getAssetPlayer(_)&&this.warn(`Duplicate date range identifier ${e} and asset ${_}`);const D=new Zl(this.HlsPlayerClass,w,e,t);this.playerQueue.push(D),e.assetList[n]=t;let G=!0;const $=$e=>{if($e.live){var je;const wt=new Error(`Interstitials MUST be VOD assets ${e}`),_t={fatal:!0,type:xe.OTHER_ERROR,details:ne.INTERSTITIAL_ASSET_ITEM_ERROR,error:wt},at=((je=this.schedule)==null?void 0:je.findEventIndex(e.identifier))||-1;this.handleAssetItemError(_t,e,at,n,wt.message);return}const Dt=$e.edge-$e.fragmentStart,et=t.duration;(G||et===null||Dt>et)&&(G=!1,this.log(`Interstitial asset "${_}" duration change ${et} > ${Dt}`),t.duration=Dt,this.updateSchedule())};D.on(y.LEVEL_UPDATED,($e,{details:je})=>$(je)),D.on(y.LEVEL_PTS_UPDATED,($e,{details:je})=>$(je)),D.on(y.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const pe=($e,je)=>{const Dt=this.getAssetPlayer(_);if(Dt&&je.tracks){Dt.off(y.BUFFER_CODECS,pe),Dt.tracks=je.tracks;const et=this.primaryMedia;this.bufferingAsset===Dt.assetItem&&et&&!Dt.media&&this.bufferAssetPlayer(Dt,et)}};D.on(y.BUFFER_CODECS,pe);const ye=()=>{var $e;const je=this.getAssetPlayer(_);if(this.log(`buffered to end of asset ${je}`),!je||!this.schedule)return;const Dt=this.schedule.findEventIndex(e.identifier),et=($e=this.schedule.items)==null?void 0:$e[Dt];this.isInterstitial(et)&&this.advanceAssetBuffering(et,t)};D.on(y.BUFFERED_TO_END,ye);const Ce=$e=>()=>{if(!this.getAssetPlayer(_)||!this.schedule)return;this.shouldPlay=!0;const Dt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Dt,$e)};return D.once(y.MEDIA_ENDED,Ce(n)),D.once(y.PLAYOUT_LIMIT_REACHED,Ce(1/0)),D.on(y.ERROR,($e,je)=>{if(!this.schedule)return;const Dt=this.getAssetPlayer(_);if(je.details===ne.BUFFER_STALLED_ERROR){if(Dt!=null&&Dt.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(je,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${je.error} ${e}`)}),D.on(y.DESTROYING,()=>{if(!this.getAssetPlayer(_)||!this.schedule)return;const je=new Error(`Asset player destroyed unexpectedly ${_}`),Dt={fatal:!0,type:xe.OTHER_ERROR,details:ne.INTERSTITIAL_ASSET_ITEM_ERROR,error:je};this.handleAssetItemError(Dt,e,this.schedule.findEventIndex(e.identifier),n,je.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${LA(t)}`),this.hls.trigger(y.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:D}),D}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&&na(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:A,assetId:f}=e,u=s.assetList.length,m=this.playingAsset;this.endedAsset=null,this.playingAsset=A,(!m||m.identifier!==f)&&(m&&(this.clearAssetPlayer(m.identifier,n[r]),delete m.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${u} ${LA(A)}`),this.hls.trigger(y.INTERSTITIAL_ASSET_STARTED,{asset:A,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,A=this.schedule.findEventIndex(i.identifier),f=(n=this.schedule.items)==null?void 0:n[A];if(!f)return;e.loadSource(),this.setBufferingItem(f),this.bufferingAsset=s;const u=this.getBufferingPlayer();if(u===e)return;const m=i.appendInPlace;if(m&&(u==null?void 0:u.interstitial.appendInPlace)===!1)return;const _=(u==null?void 0:u.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(m&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(_&&!Be(_,e.tracks)){const w=new Error(`Asset ${LA(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(_)}')`),I={fatal:!0,type:xe.OTHER_ERROR,details:ne.INTERSTITIAL_ASSET_ITEM_ERROR,error:w},D=i.findAssetIndex(s);this.handleAssetItemError(I,i,A,D,w.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 A=this.getAssetPlayer(s.identifier);if(A){const f=A.currentTime||r-s.timelineStart,u=A.duration-f;if(this.warn(`Stalled at ${f} of ${f+u} in ${A} ${e} (media.currentTime: ${r})`),f&&(u/n.playbackRate<.5||A.bufferedInPlaceToEnd(n))&&A.hls){const m=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,m,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,n,r,i){if(e.details===ne.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&LA(s)} ${e.error}`),!this.schedule)return;const A=(s==null?void 0:s.identifier)||"",f=this.getAssetPlayerQueueIndex(A),u=this.playerQueue[f]||null,m=this.schedule.items,_=B({},e,{fatal:!1,errorAction:fn(!0),asset:s,assetListIndex:r,event:t,schedule:m,scheduleIndex:n,player:u});if(this.hls.trigger(y.INTERSTITIAL_ASSET_ERROR,_),!e.fatal)return;const w=this.playingAsset,I=this.bufferingAsset,D=new Error(i);if(s&&(this.clearAssetPlayer(A,null),s.error=D),!t.assetList.some(G=>!G.error))t.error=D;else for(let G=r;G<t.assetList.length;G++)this.resetAssetPlayer(t.assetList[G].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):w&&w.identifier===A?this.advanceAfterAssetEnded(t,n,r):I&&I.identifier===A&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,I)}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: ${na(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,A=t.assetListResponse.ASSETS;if(!((n=this.schedule)!=null&&n.hasEvent(s)))return;const f=i.timelineStart,u=i.duration;let m=0;A.forEach((G,$)=>{const pe=parseFloat(G.DURATION);this.createAsset(i,$,m,f+m,pe,G.URI),m+=pe}),i.duration=m,this.log(`Loaded asset-list with duration: ${m} (was: ${u}) ${i}`);const _=this.waitingItem,w=(_==null?void 0:_.event.identifier)===s;this.updateSchedule();const I=(r=this.bufferingItem)==null?void 0:r.event;if(w){var D;const G=this.schedule.findEventIndex(s),$=(D=this.schedule.items)==null?void 0:D[G];if($){if(!this.playingItem&&this.timelinePos>$.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==G){i.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${i}`),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem($)}this.setSchedulePosition(G)}else if((I==null?void 0:I.identifier)===s){const G=i.assetList[0];if(G){const $=this.getAssetPlayer(G.identifier);if(I.appendInPlace){const pe=this.primaryMedia;$&&pe&&this.bufferAssetPlayer($,pe)}else $&&$.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case ne.ASSET_LIST_PARSING_ERROR:case ne.ASSET_LIST_LOAD_ERROR:case ne.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case ne.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 jl=500;class oc extends Xa{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",V.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(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(y.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(y.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Nt.IDLE,this.setInterval(jl),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)||(qe(n)&&(this.fragPrevious=n),this.state=Nt.IDLE),!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const A=n.start;for(let u=0;u<i.length;u++)if(A>=i[u].start&&A<=i[u].end){s=i[u];break}const f=n.start+n.duration;s?s.end=f:(s={start:A,end:f},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 A=0;A<s.length;){if(s[A].end<=i){s.shift();continue}else if(s[A].start<i)s[A].start=i;else break;A++}}),this.fragmentTracker.removeFragmentsInRange(n,i,V.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===V.SUBTITLE&&(t.details===ne.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Nt.STOPPED&&(this.state=Nt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&SA(this.levels,t)){this.levels=t.map(n=>new xi(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new xi(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,V.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!==Nt.STOPPED&&this.setInterval(jl)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:A}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${A}`);return}const f=i[A];if(A>=i.length||!f)return;this.log(`Subtitle track ${A} 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=f.details)!=null&&n.live){if(s.deltaUpdateFailed)return;const _=this.mainDetails;if(!_){this.startFragRequested=!1;return}const w=_.fragments[0];if(!f.details)s.hasProgramDateTime&&_.hasProgramDateTime?(Ps(s,_),u=s.fragmentStart):w&&(u=w.start,ya(s,u));else{var m;u=this.alignPlaylists(s,f.details,(m=this.levelLastLoaded)==null?void 0:m.details),u===0&&w&&(u=w.start,ya(s,u))}_&&!this.startFragRequested&&this.setStartPosition(_,u)}f.details=s,this.levelLastLoaded=f,A===r&&(this.hls.trigger(y.SUBTITLE_TRACK_UPDATED,{details:s,id:A,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Nt.IDLE&&(ve(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),f.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&&Vi(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Wi(r.method)).catch(A=>{throw i.trigger(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.FRAG_DECRYPT_ERROR,fatal:!1,error:A,reason:A.message,frag:t}),A}).then(A=>{const f=performance.now();i.trigger(y.FRAG_DECRYPTED,{frag:t,payload:A,stats:{tstart:s,tdecrypt:f}})}).catch(A=>{this.warn(`${A.name}: ${A.message}`),this.state=Nt.IDLE})}}doTick(){if(!this.media){this.state=Nt.IDLE;return}if(this.state===Nt.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=Yn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:A,len:f}=s,u=n.details,m=this.hls.maxBufferLength+u.levelTargetDuration;if(f>m)return;const _=u.fragments,w=_.length,I=u.edge;let D=null;const G=this.fragPrevious;if(A<I){const ye=r.maxFragLookUpTolerance,Ce=A>I-ye?0:ye;D=ve(G,_,Math.max(_[0].start,A),Ce),!D&&G&&G.start<_[0].start&&(D=_[0])}else D=_[w-1];if(D=this.filterReplacedPrimary(D,n.details),!D)return;const $=D.sn-u.startSN,pe=_[$-1];if(pe&&pe.cc===D.cc&&this.fragmentTracker.getState(pe)===dn.NOT_LOADED&&(D=pe),this.fragmentTracker.getState(D)===dn.NOT_LOADED){const ye=this.mapToInitFragWhenRequired(D);ye&&this.loadFragment(ye,n,A)}}}loadFragment(e,t,n){qe(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new lc(this.tracksBuffered[this.currentTrackId]||[])}}class lc{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 Ru={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},ku=a=>String.fromCharCode(Ru[a]||a),ra=15,Ia=100,uc={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},cc={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Xl={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},Jl=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class hc{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;ge.log(`${this.time} [${e}] ${n}`)}}}const xn=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class uA{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 sl{constructor(){this.uchar=" ",this.penState=new uA}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 Zs{constructor(e){this.chars=[],this.pos=0,this.currPenState=new uA,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<Ia;t++)this.chars.push(new sl);this.logger=e}equals(e){for(let t=0;t<Ia;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Ia;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Ia;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>Ia&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Ia)}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=ku(e);if(this.pos>=Ia){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<Ia;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<Ia;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 ql{constructor(e){this.rows=[],this.currRow=ra-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<ra;t++)this.rows.push(new Zs(e));this.logger=e}reset(){for(let e=0;e<ra;e++)this.rows[e].clear();this.currRow=ra-1}equals(e){let t=!0;for(let n=0;n<ra;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<ra;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ra;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 A=0;A<ra;A++)this.rows[A].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const A=s.rows[i].cueStartTime,f=this.logger.time;if(A!==null&&f!==null&&A<f)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<ra;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 ci{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 ql(n),this.nonDisplayedMemory=new ql(n),this.lastOutputScreen=new ql(n),this.currRollUpRow=this.displayedMemory.rows[ra-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[ra-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 Ui{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=al(),this.logger=void 0;const r=this.logger=new hc;this.channels=[null,new ci(e,t,r),new ci(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,A=null;if(r===0&&i===0)continue;this.logger.log(3,()=>"["+xn([t[n],t[n+1]])+"] -> ("+xn([r,i])+")");const f=this.cmdHistory;if(r>=16&&r<=31){if(dc(r,i,f)){cA(null,null,f),this.logger.log(3,()=>"Repeated command ("+xn([r,i])+") is dropped");continue}cA(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 cA(null,null,f);if(!s&&(A=this.parseChars(r,i),A)){const m=this.currentChannel;m&&m>0?this.channels[m].insertChars(A):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!A&&this.logger.log(2,()=>"Couldn't parse cleaned data "+xn([r,i])+" orig: "+xn([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 ("+xn([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?uc[e]:Xl[e]:n=s===1?cc[e]:fc[e];const A=this.channels[s];return A?(A.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 '"+ku(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 = "+xn(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=Jl[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const A=e<=23?1:2;return this.channels[A].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}cA(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 cA(a,e,t){t.a=a,t.b=e}function dc(a,e,t){return t.a===a&&t.b===e}function al(){return{a:null,b:null}}var eu=function(){if(Ln!=null&&Ln.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(A,f){if(typeof f!="string"||!Array.isArray(A))return!1;const u=f.toLowerCase();return~A.indexOf(u)?u:!1}function n(A){return t(a,A)}function r(A){return t(e,A)}function i(A,...f){let u=1;for(;u<arguments.length;u++){const m=arguments[u];for(const _ in m)A[_]=m[_]}return A}function s(A,f,u){const m=this,_={enumerable:!0};m.hasBeenReset=!1;let w="",I=!1,D=A,G=f,$=u,pe=null,ye="",Ce=!0,$e="auto",je="start",Dt=50,et="middle",wt=50,_t="middle";Object.defineProperty(m,"id",i({},_,{get:function(){return w},set:function(at){w=""+at}})),Object.defineProperty(m,"pauseOnExit",i({},_,{get:function(){return I},set:function(at){I=!!at}})),Object.defineProperty(m,"startTime",i({},_,{get:function(){return D},set:function(at){if(typeof at!="number")throw new TypeError("Start time must be set to a number.");D=at,this.hasBeenReset=!0}})),Object.defineProperty(m,"endTime",i({},_,{get:function(){return G},set:function(at){if(typeof at!="number")throw new TypeError("End time must be set to a number.");G=at,this.hasBeenReset=!0}})),Object.defineProperty(m,"text",i({},_,{get:function(){return $},set:function(at){$=""+at,this.hasBeenReset=!0}})),Object.defineProperty(m,"region",i({},_,{get:function(){return pe},set:function(at){pe=at,this.hasBeenReset=!0}})),Object.defineProperty(m,"vertical",i({},_,{get:function(){return ye},set:function(at){const Jt=n(at);if(Jt===!1)throw new SyntaxError("An invalid or illegal string was specified.");ye=Jt,this.hasBeenReset=!0}})),Object.defineProperty(m,"snapToLines",i({},_,{get:function(){return Ce},set:function(at){Ce=!!at,this.hasBeenReset=!0}})),Object.defineProperty(m,"line",i({},_,{get:function(){return $e},set:function(at){if(typeof at!="number"&&at!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");$e=at,this.hasBeenReset=!0}})),Object.defineProperty(m,"lineAlign",i({},_,{get:function(){return je},set:function(at){const Jt=r(at);if(!Jt)throw new SyntaxError("An invalid or illegal string was specified.");je=Jt,this.hasBeenReset=!0}})),Object.defineProperty(m,"position",i({},_,{get:function(){return Dt},set:function(at){if(at<0||at>100)throw new Error("Position must be between 0 and 100.");Dt=at,this.hasBeenReset=!0}})),Object.defineProperty(m,"positionAlign",i({},_,{get:function(){return et},set:function(at){const Jt=r(at);if(!Jt)throw new SyntaxError("An invalid or illegal string was specified.");et=Jt,this.hasBeenReset=!0}})),Object.defineProperty(m,"size",i({},_,{get:function(){return wt},set:function(at){if(at<0||at>100)throw new Error("Size must be between 0 and 100.");wt=at,this.hasBeenReset=!0}})),Object.defineProperty(m,"align",i({},_,{get:function(){return _t},set:function(at){const Jt=r(at);if(!Jt)throw new SyntaxError("An invalid or illegal string was specified.");_t=Jt,this.hasBeenReset=!0}})),m.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class Al{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Qu(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 gc{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 tu(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 A=s[0],f=s[1];e(A,f)}}const nu=new eu(0,0,""),mo=nu.align==="middle"?"middle":"center";function pc(a,e,t){const n=a;function r(){const A=Qu(a);if(A===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),A}function i(A,f){const u=new gc;tu(A,function(w,I){let D;switch(w){case"region":for(let G=t.length-1;G>=0;G--)if(t[G].id===I){u.set(w,t[G].region);break}break;case"vertical":u.alt(w,I,["rl","lr"]);break;case"line":D=I.split(","),u.integer(w,D[0]),u.percent(w,D[0])&&u.set("snapToLines",!1),u.alt(w,D[0],["auto"]),D.length===2&&u.alt("lineAlign",D[1],["start",mo,"end"]);break;case"position":D=I.split(","),u.percent(w,D[0]),D.length===2&&u.alt("positionAlign",D[1],["start",mo,"end","line-left","line-right","auto"]);break;case"size":u.percent(w,I);break;case"align":u.alt(w,I,["start",mo,"end","left","right"]);break}},/:/,/\s/),f.region=u.get("region",null),f.vertical=u.get("vertical","");let m=u.get("line","auto");m==="auto"&&nu.line===-1&&(m=-1),f.line=m,f.lineAlign=u.get("lineAlign","start"),f.snapToLines=u.get("snapToLines",!0),f.size=u.get("size",100),f.align=u.get("align",mo);let _=u.get("position","auto");_==="auto"&&nu.position===50&&(_=f.align==="start"||f.align==="left"?0:f.align==="end"||f.align==="right"?100:50),f.position=_}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 ru(a){return a.replace(/<br(?: \/)?>/gi,`
`)}class Ou{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Al,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=ru(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
`;)++s;const A=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
`&&++s,t.buffer=i.slice(s),A}function r(i){tu(i,function(s,A){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=n();const A=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(A!=null&&A[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 eu(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{pc(i,t.cue,t.regionList)}catch(A){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const A=i.indexOf("-->")!==-1;if(!i||A&&(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 iu=/\r\n|\n\r|\n|\r/g,ol=function(e,t,n=0){return e.slice(n,n+t.length)===t},mc=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(!re(t)||!re(n)||!re(r)||!re(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function ll(a,e,t){return lA(a.toString())+lA(e.toString())+lA(t)}const _c=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 vc(a,e,t,n,r,i,s){const A=new Ou,f=nt(new Uint8Array(a)).trim().replace(iu,`
`).split(`
`),u=[],m=e?On(e.baseTime,e.timescale):0;let _="00:00.000",w=0,I=0,D,G=!0;A.oncue=function($){const pe=t[n];let ye=t.ccOffset;const Ce=(w-m)/9e4;if(pe!=null&&pe.new&&(I!==void 0?ye=t.ccOffset=pe.start:_c(t,n,Ce)),Ce){if(!e){D=new Error("Missing initPTS for VTT MPEGTS");return}ye=Ce-t.presentationOffset}const $e=$.endTime-$.startTime,je=Ls(($.startTime+ye-I)*9e4,r*9e4)/9e4;$.startTime=Math.max(je,0),$.endTime=Math.max(je+$e,0);const Dt=$.text.trim();$.text=decodeURIComponent(encodeURIComponent(Dt)),$.id||($.id=ll($.startTime,$.endTime,Dt)),$.endTime>0&&u.push($)},A.onparsingerror=function($){D=$},A.onflush=function(){if(D){s(D);return}i(u)},f.forEach($=>{if(G)if(ol($,"X-TIMESTAMP-MAP=")){G=!1,$.slice(16).split(",").forEach(pe=>{ol(pe,"LOCAL:")?_=pe.slice(6):ol(pe,"MPEGTS:")&&(w=parseInt(pe.slice(7)))});try{I=mc(_)/1e3}catch(pe){D=pe}return}else $===""&&(G=!1);A.parse($+`
`)}),A.flush()}const su="stpp.ttml.im1t",_o=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ns=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Pu={left:"start",center:"center",right:"end",start:"start",end:"end"};function vo(a,e,t,n){const r=v(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(A=>nt(A)),s=Go(e.baseTime,1,e.timescale);try{i.forEach(A=>t(yc(A,s)))}catch(A){n(A)}}function yc(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((_,w)=>(_[w]=r.getAttribute(`ttp:${w}`)||i[w],_),{}),A=r.getAttribute("xml:space")!=="preserve",f=ul(au(r,"styling","style")),u=ul(au(r,"layout","region")),m=au(r,"body","[begin]");return[].map.call(m,_=>{const w=fA(_,A);if(!w||!_.hasAttribute("begin"))return null;const I=ou(_.getAttribute("begin"),s),D=ou(_.getAttribute("dur"),s);let G=ou(_.getAttribute("end"),s);if(I===null)throw hA(_);if(G===null){if(D===null)throw hA(_);G=I+D}const $=new eu(I-e,G-e,w);$.id=ll($.startTime,$.endTime,$.text);const pe=u[_.getAttribute("region")],ye=f[_.getAttribute("style")],Ce=cl(pe,ye,f),{textAlign:$e}=Ce;if($e){const je=Pu[$e];je&&($.lineAlign=je),$.align=$e}return B($,Ce),$}).filter(_=>_!==null)}function au(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 fA(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?fA(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function cl(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((A,f)=>{const u=Au(e,n,f)||Au(a,n,f)||Au(r,n,f);return u&&(A[f]=u),A},{})}function Au(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function hA(a){return new Error(`Could not parse ttml timestamp ${a}`)}function ou(a,e){if(!a)return null;let t=Qu(a);return t===null&&(_o.test(a)?t=wc(a,e):Ns.test(a)&&(t=Mu(a,e))),t}function wc(a,e){const t=_o.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 Mu(a,e){const t=Ns.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 fl{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 Nu{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=$u(),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(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this),e.on(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this),e.off(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new fl(this,"textTrack1"),t=new fl(this,"textTrack2"),n=new fl(this,"textTrack3"),r=new fl(this,"textTrack4");this.cea608Parser1=new Ui(1,e,t),this.cea608Parser2=new Ui(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let A=i.length;A--;){const f=i[A],u=Ec(f[0],f[1],t,n);if(u>=0&&(f[0]=Math.min(f[0],t),f[1]=Math.max(f[1],n),s=!0,u/(n-t)>.5))return}if(s||i.push([t,n]),this.config.renderTextTracksNatively){const A=this.captionsTracks[e];this.Cues.newCue(A,t,n,r)}else{const A=this.Cues.newCue(null,t,n,r);this.hls.trigger(y.CUES_PARSED,{type:"captions",cues:A,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){const{unparsedVttFrags:A}=this;n===V.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i,trackId:s}),A.length&&(this.unparsedVttFrags=[],A.forEach(f=>{this.initPTS[f.frag.cc]?this.onFragLoaded(y.FRAG_LOADED,f):this.hls.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f.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(Ku(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],A=this.getExistingTrack(i,s);if(A)n[e]=A,Ms(n[e]),Ka(n[e],r);else{const f=this.createTextTrack("captions",i,s);f&&(f[e]=!0,n[e]=f)}}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(y.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=>{Ms(r[i]),delete r[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=$u(),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++)Ms(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===su);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(SA(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,A=s?ho(s.textTracks):null;if(this.tracks.forEach((f,u)=>{let m;if(A){let _=null;for(let w=0;w<A.length;w++)if(A[w]&&Ku(A[w],f)){_=A[w],A[w]=null;break}_&&(m=_)}if(m)Ms(m);else{const _=Hu(f);m=this.createTextTrack(_,f.name,f.lang),m&&(m.mode="disabled")}m&&this.textTracks.push(m)}),A!=null&&A.length){const f=A.filter(u=>u!==null).map(u=>u.label);f.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${f.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(A=>({label:A.name,kind:A.type.toLowerCase(),default:A.default,subtitleTrack:A}));this.hls.trigger(y.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===V.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:A}=this,{cc:f,sn:u}=t.frag,m=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(u!==A+1||u===A&&m!==this.lastPartIndex+1||f!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=f,this.lastSn=u,this.lastPartIndex=m}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===V.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const A=this.tracks[n.level],f=this.vttCCs;f[n.cc]||(f[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),A&&A.textCodec===su?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;vo(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,A=i.length-1;if(!i[n.cc]&&A===-1){s.push(e);return}const f=this.hls,u=(t=n.initSegment)!=null&&t.data?yt(n.initSegment.data,new Uint8Array(r)).buffer:r;vc(u,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,m=>{this._appendCues(m,n.level),f.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},m=>{const _=m.message==="Missing initPTS for VTT MPEGTS";_?s.push(e):this._fallbackToIMSC1(n,r),f.logger.log(`Failed to parse VTT cue: ${m}`),!(_&&A>n.cc)&&f.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:m})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||vo(t,this.initPTS[e.cc],()=>{n.textCodec=su,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=>oA(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(y.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===V.SUBTITLE&&this.onFragLoaded(y.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===V.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 A=this.extractCea608Data(s);this.cea608Parser1.addData(r[i].pts,A[0]),this.cea608Parser2.addData(r[i].pts,A[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:A}=this;Object.keys(A).forEach(f=>ca(A[f],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:A}=this;Object.keys(A).forEach(f=>ca(A[f],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let i=0;i<n;i++){const s=e[r++],A=127&e[r++],f=127&e[r++];if(A===0&&f===0)continue;if((4&s)!==0){const m=3&s;(m===0||m===1)&&(t[m].push(A),t[m].push(f))}}return t}}function Hu(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function Ku(a,e){return!!a&&a.kind===Hu(e)&&rA(e,a)}function Ec(a,e,t,n){return Math.min(e,n)-Math.max(a,t)}function $u(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const Bc=/\s/,bc={newCue(a,e,t,n){const r=[];let i,s,A,f,u;const m=self.VTTCue||self.TextTrackCue;for(let w=0;w<n.rows.length;w++)if(i=n.rows[w],A=!0,f=0,u="",!i.isEmpty()){var _;for(let G=0;G<i.chars.length;G++)Bc.test(i.chars[G].uchar)&&A?f++:(u+=i.chars[G].uchar,A=!1);i.cueStartTime=e,e===t&&(t+=1e-4),f>=16?f--:f++;const I=ru(u.trim()),D=ll(e,t,I);a!=null&&(_=a.cues)!=null&&_.getCueById(D)||(s=new m(e,t,I),s.id=D,s.line=w+1,s.align="left",s.position=10+Math.min(80,Math.floor(f*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((w,I)=>w.line==="auto"||I.line==="auto"?0:w.line>8&&I.line>8?I.line-w.line:w.line-I.line),r.forEach(w=>oA(a,w))),r}};function Cc(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const xc=/(\d+)-(\d+)\/(\d+)/;class Gu{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||Ic,this.controller=new self.AbortController,this.stats=new S}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=Sc(e,this.controller.signal),s=e.responseType==="arraybuffer",A=s?"byteLength":"length",{maxTimeToFirstByteMs:f,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=f&&re(f)?f:u,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Ma(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(_=>{var w;this.response=this.loader=_;const I=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-(I-r.loading.start)),!_.ok){const{status:G,statusText:$}=_;throw new Dc($||"fetch, bad network response",G,_)}r.loading.first=I,r.total=Tc(_.headers)||r.total;const D=(w=this.callbacks)==null?void 0:w.onProgress;return D&&re(t.highWaterMark)?this.loadProgressively(_,r,e,t.highWaterMark,D):s?_.arrayBuffer():e.responseType==="json"?_.json():_.text()}).then(_=>{var w,I;const D=this.response;if(!D)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const G=_[A];G&&(r.loaded=r.total=G);const $={url:D.url,data:_,code:D.status},pe=(w=this.callbacks)==null?void 0:w.onProgress;pe&&!re(t.highWaterMark)&&pe(r,e,_,D),(I=this.callbacks)==null||I.onSuccess($,r,e,D)}).catch(_=>{var w;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const I=_&&_.code||0,D=_?_.message:null;(w=this.callbacks)==null||w.onError({code:I,text:D},e,_?_.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 kA,A=e.body.getReader(),f=()=>A.read().then(u=>{if(u.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const m=u.value,_=m.length;return t.loaded+=_,_<r||s.dataLength?(s.push(m),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,m.buffer,e),f()}).catch(()=>Promise.reject());return f()}}function Sc(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(B({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function Fc(a){const e=xc.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function Tc(a){const e=a.get("Content-Range");if(e){const n=Fc(e);if(re(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function Ic(a,e){return new self.Request(a.url,e)}class Dc extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const h=/^age:\s*[\d.]+\s*$/im;class c{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 S,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 A;(A=this.callbacks)==null||A.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 A in r)e.setRequestHeader(A,r[A]);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&&re(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,m=t.responseType==="text"?t.responseText:null;if(u>=200&&u<300){const D=m!=null?m:t.response;if(D!=null){var s,A;n.loading.end=Math.max(self.performance.now(),n.loading.first);const G=t.responseType==="arraybuffer"?D.byteLength:D.length;n.loaded=n.total=G,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const $=(s=this.callbacks)==null?void 0:s.onProgress;$&&$(n,e,D,t);const pe={url:t.responseURL,data:D,code:u};(A=this.callbacks)==null||A.onSuccess(pe,n,e,t);return}}const _=i.loadPolicy.errorRetry,w=n.retry,I={url:e.url,data:void 0,code:u};if(pn(_,w,!1,I))this.retry(_);else{var f;ge.error(`${u} while loading ${e.url}`),(f=this.callbacks)==null||f.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(pn(e,t,!0))this.retry(e);else{var n;ge.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=Ot(e,n.retry),n.retry++,ge.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&&h.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 g={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},d=F(F({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:c,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:M,bufferController:Yo,capLevelController:Na,errorController:Qn,fpsController:Yi,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:Qi,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:g},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},x()),{},{subtitleStreamController:oc,subtitleTrackController:Fu,timelineController:Nu,audioStreamController:io,audioTrackController:FA,emeController:AA,cmcdController:rl,contentSteeringController:xu,interstitialsController:Yl});function x(){return{cueHandler:bc,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 U(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=ae(a),r=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(s=>{const A=`${s==="level"?"playlist":s}LoadPolicy`,f=e[A]===void 0,u=[];i.forEach(m=>{const _=`${s}Loading${m}`,w=e[_];if(w!==void 0&&f){u.push(_);const I=n[A].default;switch(e[A]={default:I},m){case"TimeOut":I.maxLoadTimeMs=w,I.maxTimeToFirstByteMs=w;break;case"MaxRetry":I.errorRetry.maxNumRetry=w,I.timeoutRetry.maxNumRetry=w;break;case"RetryDelay":I.errorRetry.retryDelayMs=w,I.timeoutRetry.retryDelayMs=w;break;case"MaxRetryTimeout":I.errorRetry.maxRetryDelayMs=w,I.timeoutRetry.maxRetryDelayMs=w;break}}}),u.length&&t.warn(`hls.js config: "${u.join('", "')}" setting(s) are deprecated, use "${A}": ${Vt(e[A])}`)}),F(F({},n),e)}function ae(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(ae):Object.keys(a).reduce((e,t)=>(e[t]=ae(a[t]),e),{}):a}function Ee(a,e){const t=a.loader;t!==Gu&&t!==c?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):Cc()&&(a.loader=Gu,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const we=2,Ze=.1,tt=.05,pt=100;class Mt extends Ai{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(y.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.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(pt),this.mediaSource=t.mediaSource;const n=this.media=t.media;Oi(n,"playing",this.onMediaPlaying),Oi(n,"waiting",this.onMediaWaiting),Oi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(Zi(n,"playing",this.onMediaPlaying),Zi(n,"waiting",this.onMediaWaiting),Zi(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:A}=s,f=this.seeking&&!A,u=!this.seeking&&A,m=s.paused&&!A||s.ended||s.playbackRate===0;if(this.seeking=A,e!==t){t&&(this.ended=0),this.moved=!0,A||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!m&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(u||f){f&&this.stallResolved(e);return}if(m){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(y.MEDIA_ENDED,{stalled:!1}));return}if(!Yn.getBuffered(s).length){this.nudgeRetry=0;return}const _=Yn.bufferInfo(s,e,0),w=_.nextStart||0,I=this.fragmentTracker;if(A&&I&&this.hls){const Dt=Mn(this.hls.inFlightFragments,e),et=_.len>we,wt=!w||Dt||w-e>we&&!I.getPartialFragment(e);if(et||wt)return;this.moved=!1}const D=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&I){if(!(_.len>0)&&!w)return;const et=Math.max(w,_.start||0)-e,_t=!!(D!=null&&D.live)?D.targetduration*2:we,at=Sn(e,I);if(et>0&&(et<=_t||at)){s.paused||this._trySkipBufferHole(at);return}}const G=i.detectStallWithCurrentTimeMs,$=self.performance.now(),pe=this.waiting;let ye=this.stalled;if(ye===null)if(pe>0&&$-pe<G)ye=this.stalled=pe;else{this.stalled=$;return}const Ce=$-ye;if(!A&&(Ce>=G||pe)&&this.hls){var $e;if((($e=this.mediaSource)==null?void 0:$e.readyState)==="ended"&&!(D!=null&&D.live)&&Math.abs(e-((D==null?void 0:D.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(y.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(_),!this.media||!this.hls)return}const je=Yn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(je,Ce,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(y.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=Yn.bufferedInfo(Yn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=Yn.timeRangesToArray(r),A=Yn.bufferedInfo(s,t,0).bufferedIndex;if(A>-1&&A<s.length-1){const f=Yn.bufferedInfo(s,e,0).bufferedIndex,u=s[A].end,m=s[A+1].start;if((f===-1||f>A)&&m-u<1&&e-u<2){const _=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${u} -> ${m} buffered index: ${f}`);this.warn(_.message),this.media.currentTime+=1e-6;let w=Sn(e,this.fragmentTracker);w&&"fragment"in w?w=w.fragment:w||(w=void 0);const I=Yn.bufferInfo(this.media,e,0);this.hls.trigger(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:_,reason:_.message,frag:w,buffer:I.len,bufferInfo:I})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:A}=this,f=(r=this.hls)==null?void 0:r.config;if(!A||!s||!f)return;const u=(i=this.hls)==null?void 0:i.latestLevelDetails,m=Sn(n,s);if((m||u!=null&&u.live&&n<u.fragmentStart)&&(this._trySkipBufferHole(m)||!this.media))return;const _=e.buffered,w=this.adjacentTraversal(e,n);(_&&_.length>1&&e.len>f.maxBufferHole||e.nextStart&&(e.nextStart-n<f.maxBufferHole||w))&&(t>f.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,V.MAIN),s=n.getFragAtPos(r,V.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(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.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,A=Yn.bufferInfo(r,s,0),f=s<A.start?A.start:A.nextStart;if(f&&this.hls){const m=A.len<=i.maxBufferHole,_=A.len>0&&A.len<1&&r.readyState<3,w=f-s;if(w>0&&(m||_)){if(w>i.maxBufferHole){let D=!1;if(s===0){const G=n.getAppendedFrag(0,V.MAIN);G&&f<G.end&&(D=!0)}if(!D&&e){var u;if(!((u=this.hls.loadLevelObj)!=null&&u.details)||Mn(this.hls.inFlightFragments,f))return 0;let $=!1,pe=e.end;for(;pe<f;){const ye=Sn(pe,n);if(ye)pe+=ye.duration;else{$=!0;break}}if($)return 0}}const I=Math.max(f+tt,s+Ze);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${I}`),this.moved=!0,r.currentTime=I,!(e!=null&&e.gap)){const D=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${I}`),G={type:xe.MEDIA_ERROR,details:ne.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:D,reason:D.message,buffer:A.len,bufferInfo:A};e&&("fragment"in e?G.part=e:G.frag=e),this.hls.trigger(y.ERROR,G)}return I}}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 A=s+(r+1)*i.nudgeOffset,f=new Error(`Nudging 'currentTime' from ${s} to ${A}`);this.warn(f.message),n.currentTime=A,t.trigger(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.BUFFER_NUDGE_ON_STALL,error:f,fatal:!1,buffer:e.len,bufferInfo:e})}else{const A=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(A.message),t.trigger(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.BUFFER_STALLED_ERROR,error:A,fatal:!0,buffer:e.len,bufferInfo:e})}}}function Mn(a,e){const t=gn(a.main);if(t&&t.start<=e)return t;const n=gn(a.audio);return n&&n.start<=e?n:null}function gn(a){if(!a)return null;switch(a.state){case Nt.IDLE:case Nt.STOPPED:case Nt.ENDED:case Nt.ERROR:return null}return a.frag}function Sn(a,e){return e.getAppendedFrag(a,V.MAIN)||e.getPartialFragment(a)}const Ur=.25;function Jn(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function zn(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?F({type:r},n):n))}return i}const jr=(()=>{const a=Jn();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class Or{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(y.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(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(y.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(y.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&&Ms(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 Ka(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=Jn();if(s)for(let A=0;A<i.length;A++){const f=i[A].type;if(f===ji.emsg&&!n||!r)continue;const u=VA(i[A].data),m=i[A].pts;let _=m+i[A].duration;_>jr&&(_=jr),_-m<=0&&(_=m+Ur);for(let I=0;I<u.length;I++){const D=u[I];if(!To(D)){this.updateId3CueEnds(m,f);const G=zn(s,m,_,D,f);G&&this.id3Track.addCue(G)}}}}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===jr&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:A,enableID3MetadataCues:f}}=s;if(i&&(A||f)){let u;r==="audio"?u=m=>m.type===ji.audioId3&&f:r==="video"?u=m=>m.type===ji.emsg&&A:u=m=>m.type===ji.audioId3&&f||m.type===ji.emsg&&A,ca(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 A=Jn();if(n&&r&&!s){const{fragmentStart:G,fragmentEnd:$}=e;let pe=this.assetCue;pe?(pe.startTime=G,pe.endTime=$):A&&(pe=this.assetCue=zn(A,G,$,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),pe&&(pe.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(pe),pe.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:f}=this,{dateRanges:u}=e,m=Object.keys(u);let _=this.dateRangeCuesAppended;if(f&&t){var w;if((w=f.cues)!=null&&w.length){const G=Object.keys(_).filter($=>!m.includes($));for(let $=G.length;$--;){var I;const pe=G[$],ye=(I=_[pe])==null?void 0:I.cues;delete _[pe],ye&&Object.keys(ye).forEach(Ce=>{const $e=ye[Ce];if($e){$e.removeEventListener("enter",this.onEventCueEnter);try{f.removeCue($e)}catch(je){}}})}}else _=this.dateRangeCuesAppended={}}const D=e.fragments[e.fragments.length-1];if(!(m.length===0||!re(D==null?void 0:D.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let G=0;G<m.length;G++){const $=m[G],pe=u[$],ye=pe.startTime,Ce=_[$],$e=(Ce==null?void 0:Ce.cues)||{};let je=(Ce==null?void 0:Ce.durationKnown)||!1,Dt=jr;const{duration:et,endDate:wt}=pe;if(wt&&et!==null)Dt=ye+et,je=!0;else if(pe.endOnNext&&!je){const at=m.reduce((Jt,In)=>{if(In!==pe.id){const jn=u[In];if(jn.class===pe.class&&jn.startDate>pe.startDate&&(!Jt||pe.startDate<Jt.startDate))return jn}return Jt},null);at&&(Dt=at.startTime,je=!0)}const _t=Object.keys(pe.attr);for(let at=0;at<_t.length;at++){const Jt=_t[at];if(!ns(Jt))continue;const In=$e[Jt];if(In)je&&!(Ce!=null&&Ce.durationKnown)?In.endTime=Dt:Math.abs(In.startTime-ye)>.01&&(In.startTime=ye,In.endTime=Dt);else if(A){let jn=pe.attr[Jt];Gi(Jt)&&(jn=Q(jn));const Xn=zn(A,ye,Dt,{key:Jt,data:jn},ji.dateRange);Xn&&(Xn.id=$,this.id3Track.addCue(Xn),$e[Jt]=Xn,s&&(Jt==="X-ASSET-LIST"||Jt==="X-ASSET-URL")&&Xn.addEventListener("enter",this.onEventCueEnter))}}_[$]={cues:$e,dateRange:pe,durationKnown:je}}}}}class wr{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 A=this.targetLatency;if(A===null)return;const f=r-A,u=Math.min(this.maxLatency,A+n.targetduration);if(f<u&&f>.05&&this.forwardBufferLength>1){const _=Math.min(2,Math.max(1,s)),w=Math.round(2/(1+Math.exp(-.75*f-this.edgeStalled))*20)/20,I=Math.min(_,Math.max(1,w));this.changeMediaPlaybackRate(t,I)}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:A}=this.config,f=this.hls.userConfig;let u=A&&n||t;(this._targetLatencyUpdated||f.liveSyncDuration||f.liveSyncDurationCount||u===0)&&(u=i!==void 0?i:s*r);const m=r;return u+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,m)}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,A=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),A)}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(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(y.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(y.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===ne.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 Nn extends xA{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(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(y.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(y.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 A=!1,f=!1,u=!1;t.levels.forEach(m=>{const _=m.attrs;let{audioCodec:w,videoCodec:I}=m;w&&(m.audioCodec=w=Qe(w,n)||void 0),I&&(I=m.videoCodec=yn(I));const{width:D,height:G,unknownCodecs:$}=m,pe=($==null?void 0:$.length)||0;if(A||(A=!!(D&&G)),f||(f=!!I),u||(u=!!w),pe||w&&!this.isAudioSupported(w)||I&&!this.isVideoSupported(I)){this.log(`Some or all CODECS not supported "${_.CODECS}"`);return}const{CODECS:ye,"FRAME-RATE":Ce,"HDCP-LEVEL":$e,"PATHWAY-ID":je,RESOLUTION:Dt,"VIDEO-RANGE":et}=_,_t=`${`${je||"."}-`}${m.bitrate}-${Dt}-${Ce}-${ye}-${et}-${$e}`;if(i[_t])if(i[_t].uri!==m.url&&!m.attrs["PATHWAY-ID"]){const at=s[_t]+=1;m.attrs["PATHWAY-ID"]=new Array(at+1).join(".");const Jt=this.createLevel(m);i[_t]=Jt,r.push(Jt)}else i[_t].addGroupId("audio",_.AUDIO),i[_t].addGroupId("text",_.SUBTITLES);else{const at=this.createLevel(m);i[_t]=at,s[_t]=1,r.push(at)}}),this.filterAndSortMediaOptions(r,t,A,f,u)}createLevel(e){const t=new xi(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=Ve(r,[])}return t}isAudioSupported(e){return Cn(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Cn(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){var s;let A=[],f=[],u=e;const m=((s=t.stats)==null?void 0:s.parsing)||{};if((n||r)&&i&&(u=u.filter(({videoCodec:ye,videoRange:Ce,width:$e,height:je})=>(!!ye||!!($e&&je))&&es(Ce))),u.length===0){Promise.resolve().then(()=>{if(this.hls){let ye="no level with compatible codecs found in manifest",Ce=ye;t.levels.length&&(Ce=`one or more CODECS in variant not supported: ${Vt(t.levels.map(je=>je.attrs.CODECS).filter((je,Dt,et)=>et.indexOf(je)===Dt))}`,this.warn(Ce),ye+=` (${Ce})`);const $e=new Error(ye);this.hls.trigger(y.ERROR,{type:xe.MEDIA_ERROR,details:ne.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:$e,reason:Ce})}}),m.end=performance.now();return}t.audioTracks&&(A=t.audioTracks.filter(ye=>!ye.audioCodec||this.isAudioSupported(ye.audioCodec)),Xr(A)),t.subtitles&&(f=t.subtitles,Xr(f));const _=u.slice(0);u.sort((ye,Ce)=>{if(ye.attrs["HDCP-LEVEL"]!==Ce.attrs["HDCP-LEVEL"])return(ye.attrs["HDCP-LEVEL"]||"")>(Ce.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&ye.height!==Ce.height)return ye.height-Ce.height;if(ye.frameRate!==Ce.frameRate)return ye.frameRate-Ce.frameRate;if(ye.videoRange!==Ce.videoRange)return pi.indexOf(ye.videoRange)-pi.indexOf(Ce.videoRange);if(ye.videoCodec!==Ce.videoCodec){const $e=Ie(ye.videoCodec),je=Ie(Ce.videoCodec);if($e!==je)return je-$e}if(ye.uri===Ce.uri&&ye.codecSet!==Ce.codecSet){const $e=ee(ye.codecSet),je=ee(Ce.codecSet);if($e!==je)return je-$e}return ye.averageBitrate!==Ce.averageBitrate?ye.averageBitrate-Ce.averageBitrate:0});let w=_[0];if(this.steering&&(u=this.steering.filterParsedLevels(u),u.length!==_.length)){for(let ye=0;ye<_.length;ye++)if(_[ye].pathwayId===u[0].pathwayId){w=_[ye];break}}this._levels=u;for(let ye=0;ye<u.length;ye++)if(u[ye]===w){var I;this._firstLevel=ye;const Ce=w.bitrate,$e=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${u.length} level(s) found, first bitrate: ${Ce}`),((I=this.hls.userConfig)==null?void 0:I.abrEwmaDefaultEstimate)===void 0){const je=Math.min(Ce,this.hls.config.abrEwmaDefaultEstimateMax);je>$e&&$e===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=je)}break}const D=i&&!r,G=this.hls.config,$=!!(G.audioStreamController&&G.audioTrackController),pe={levels:u,audioTracks:A,subtitleTracks:f,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:$&&!D&&A.some(ye=>!!ye.url)};m.end=performance.now(),this.hls.trigger(y.MANIFEST_PARSED,pe)}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 m=new Error("invalid level idx"),_=e<0;if(this.hls.trigger(y.ERROR,{type:xe.OTHER_ERROR,details:ne.LEVEL_SWITCH_ERROR,level:e,fatal:_,error:m,reason:m.message}),_)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],A=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&i===A)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${A?" with Pathway "+A:""} from level ${n}${i?" with Pathway "+i:""}`);const f={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(y.LEVEL_SWITCHING,f);const u=s.details;if(!u||u.live){const m=this.switchParams(s.uri,r==null?void 0:r.details,u);this.loadPlaylist(m)}}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===Se.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===V.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 A;this.warn(`Invalid level index ${r}`),(A=t.deliveryDirectives)!=null&&A.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let f=s.details;f===t.details&&f.advanced&&(f=void 0),this.playlistLoaded(r,t,f)}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,A=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:""}${A&&s.live?" age "+A.toFixed(1)+(s.type?" "+s.type||0:""):""} ${n}`),this.hls.trigger(y.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(A=>A.level=-1)),!1));mi(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(y.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(y.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function Xr(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function Jr(){return self.SourceBuffer||self.WebKitSourceBuffer}function Er(){if(!Ue())return!1;const e=Jr();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Ji(){if(!Er())return!1;const a=Ue();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(Pe(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(Pe(e,"audio"))))}function Us(){var a;const e=Jr();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const Hs=100;class yi extends Xa{constructor(e,t,n){super(e,t,n,"stream-controller",V.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||!re(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,V.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(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.LEVEL_LOADING,this.onLevelLoading,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(y.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(y.BUFFER_CREATED,this.onBufferCreated,this),e.on(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(y.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(y.BUFFER_CREATED,this.onBufferCreated,this),e.off(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.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(Hs),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=Nt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Nt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Nt.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=Nt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Nt.IDLE;break}break}case Nt.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===Nt.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],A=this.getMainFwdBufferInfo();if(A===null)return;const f=this.getLevelDetails();if(f&&this._streamEnded(A,f)){const G={};this.altAudio===2&&(G.type="video"),this.hls.trigger(y.BUFFER_EOS,G),this.state=Nt.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===Nt.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Nt.WAITING_LEVEL,this.startFragRequested=!1;return}const m=A.len,_=this.getMaxBufferLength(s.maxBitrate);if(m>=_)return;this.backtrackFragment&&this.backtrackFragment.start>A.end&&(this.backtrackFragment=null);const w=this.backtrackFragment?this.backtrackFragment.start:A.end;let I=this.getNextFragment(w,u);if(this.couldBacktrack&&!this.fragPrevious&&I&&qe(I)&&this.fragmentTracker.getState(I)!==dn.OK){var D;const $=((D=this.backtrackFragment)!=null?D:I).sn-u.startSN,pe=u.fragments[$-1];pe&&I.cc===pe.cc&&(I=pe,this.fragmentTracker.removeFragment(pe))}else this.backtrackFragment&&A.len&&(this.backtrackFragment=null);if(I&&this.isLoopLoading(I,w)){if(!I.gap){const $=this.audioOnly&&!this.altAudio?W.AUDIO:W.VIDEO,pe=($===W.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;pe&&this.afterBufferFlushed(pe,$,V.MAIN)}I=this.getNextFragmentLoopLoading(I,u,A,V.MAIN,_)}I&&(I.initSegment&&!I.initSegment.data&&!this.bitrateTest&&(I=I.initSegment),this.loadFragment(I,s,w))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===dn.NOT_LOADED||r===dn.PARTIAL?qe(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,V.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 A=this.getMainFwdBufferInfo();if(!A||A.len<i.targetduration*2)return}if(!t.paused&&e){const A=this.hls.nextLoadLevel,f=e[A],u=this.fragLastKbps;u&&this.fragCurrent?n=this.fragCurrent.duration*f.maxBitrate/(1e3*u)+1:n=0}else n=0;const s=this.getBufferedFrag(t.currentTime+n);if(s){const A=this.followingBufferedFrag(s);if(A){this.abortCurrentFrag();const f=A.maxStartPTS?A.maxStartPTS:A.start,u=A.duration,m=Math.max(s.end,f+Math.min(Math.max(u-this.config.maxFragLookUpTolerance,u*(this.couldBacktrack?.5:.125)),u*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(m,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 Nt.KEY_LOADING:case Nt.FRAG_LOADING:case Nt.FRAG_LOADING_WAITING_RETRY:case Nt.PARSING:case Nt.PARSED:this.state=Nt.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;Oi(n,"playing",this.onMediaPlaying),Oi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(Zi(n,"playing",this.onMediaPlaying),Zi(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(y.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&&!Us(),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!==Nt.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=Nt.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,A=t.details,f=A.totalduration;if(!r){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${A.startSN},${A.endSN}]${A.lastPartSn?`[part-${A.lastPartSn}-${A.lastPartIndex}]`:""}, cc [${A.startCC}, ${A.endCC}] duration:${f}`);const u=t.levelInfo,m=this.fragCurrent;m&&(this.state===Nt.FRAG_LOADING||this.state===Nt.FRAG_LOADING_WAITING_RETRY)&&m.level!==t.level&&m.loader&&this.abortCurrentFrag();let _=0;if(A.live||(n=u.details)!=null&&n.live){var w;if(this.checkLiveUpdate(A),A.deltaUpdateFailed)return;_=this.alignPlaylists(A,u.details,(w=this.levelLastLoaded)==null?void 0:w.details)}if(u.details=A,this.levelLastLoaded=u,i||this.setStartPosition(A,_),this.hls.trigger(y.LEVEL_UPDATED,{details:A,level:s}),this.state===Nt.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=Nt.IDLE}i&&A.live&&this.synchronizeToLiveEdge(A),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,A=e.edge,f=i>=s-t.maxFragLookUpTolerance&&i<=A;if(r!==null&&n.duration>r&&(i<r||!f)){const m=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!f&&n.readyState<4||i<A-m)&&(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: ${A}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var u;const _=Yn.bufferInfo(n,r,0);if(!((u=_.buffered)!=null&&u.length)){n.currentTime=r;return}if(_.start<=i){n.currentTime=r;return}const{nextStart:I}=Yn.bufferedInfo(_.buffered,i,0);I&&(n.currentTime=I)}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 A=s[n.level];if(!A){this.warn(`Level ${n.level} not found on progress`);return}const f=A.details;if(!f){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const u=A.videoCodec,m=f.PTSKnown||!f.live,_=(t=n.initSegment)==null?void 0:t.data,w=this._getAudioCodec(A),I=this.transmuxer=this.transmuxer||new Zo(this.hls,V.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),D=r?r.index:-1,G=D!==-1,$=new Hr(n.level,n.sn,n.stats.chunkCount,i.byteLength,D,G),pe=this.initPTS[n.cc];I.push(i,_,w,u,n,r,f.totalduration,m,$,pe)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio===2;if(Zn(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(y.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(y.AUDIO_TRACK_SWITCHED,t)}),n.trigger(y.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(y.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=Zn(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 A in n){const f=n[A];if(f.id==="main"){if(i=A,r=f,A==="video"){const u=n[A];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===V.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===Nt.PARSED&&(this.state=Nt.IDLE);return}const A=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*A.total/(A.buffering.end-A.loading.first)),qe(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&Yn.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=Nt.ERROR;return}switch(t.details){case ne.FRAG_GAP:case ne.FRAG_PARSING_ERROR:case ne.FRAG_DECRYPT_ERROR:case ne.FRAG_LOAD_ERROR:case ne.FRAG_LOAD_TIMEOUT:case ne.KEY_LOAD_ERROR:case ne.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(V.MAIN,t);break;case ne.LEVEL_LOAD_ERROR:case ne.LEVEL_LOAD_TIMEOUT:case ne.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Nt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===Se.LEVEL&&(this.state=Nt.IDLE);break;case ne.BUFFER_ADD_CODEC_ERROR:case ne.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case ne.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 ne.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Nt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==W.AUDIO||!this.altAudio){const n=(t===W.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,V.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=Yn.getBuffered(e),A=s.length?s.start(0):0,f=A-n,u=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||f>0&&(f<u||this.loadingParts&&f<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${f} to match buffer start`),n+=f,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${A}`),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=Nt.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(y.FRAG_LOADED,n),i.bitrateTest=!1}).catch(n=>{this.state===Nt.STOPPED||this.state===Nt.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:A,part:f,level:u}=s,{video:m,text:_,id3:w,initSegment:I}=r,{details:D}=u,G=this.altAudio?void 0:r.audio;if(this.fragContextChanged(A)){this.fragmentTracker.removeFragment(A);return}if(this.state=Nt.PARSING,I){const $=I.tracks;if($){const $e=A.initSegment||A;if(this.unhandledEncryptionError(I,A))return;this._bufferInitSegment(u,$,$e,i),n.trigger(y.FRAG_PARSING_INIT_SEGMENT,{frag:$e,id:t,tracks:$})}const pe=I.initPTS,ye=I.timescale,Ce=this.initPTS[A.cc];if(re(pe)&&(!Ce||Ce.baseTime!==pe||Ce.timescale!==ye)){const $e=I.trackId;this.initPTS[A.cc]={baseTime:pe,timescale:ye,trackId:$e},n.trigger(y.INIT_PTS_FOUND,{frag:A,id:t,initPTS:pe,timescale:ye,trackId:$e})}}if(m&&D){G&&m.type==="audiovideo"&&this.logMuxedErr(A);const $=D.fragments[A.sn-1-D.startSN],pe=A.sn===D.startSN,ye=!$||A.cc>$.cc;if(r.independent!==!1){const{startPTS:Ce,endPTS:$e,startDTS:je,endDTS:Dt}=m;if(f)f.elementaryStreams[m.type]={startPTS:Ce,endPTS:$e,startDTS:je,endDTS:Dt};else if(m.firstKeyFrame&&m.independent&&i.id===1&&!ye&&(this.couldBacktrack=!0),m.dropped&&m.independent){const et=this.getMainFwdBufferInfo(),wt=(et?et.end:this.getLoadPosition())+this.config.maxBufferHole,_t=m.firstKeyFramePTS?m.firstKeyFramePTS:Ce;if(!pe&&wt<_t-this.config.maxBufferHole&&!ye){this.backtrack(A);return}else ye&&(A.gap=!0);A.setElementaryStreamInfo(m.type,A.start,$e,A.start,Dt,!0)}else pe&&Ce-(D.appliedTimelineOffset||0)>we&&(A.gap=!0);A.setElementaryStreamInfo(m.type,Ce,$e,je,Dt),this.backtrackFragment&&(this.backtrackFragment=A),this.bufferFragmentData(m,A,f,i,pe||ye)}else if(pe||ye)A.gap=!0;else{this.backtrack(A);return}}if(G){const{startPTS:$,endPTS:pe,startDTS:ye,endDTS:Ce}=G;f&&(f.elementaryStreams[W.AUDIO]={startPTS:$,endPTS:pe,startDTS:ye,endDTS:Ce}),A.setElementaryStreamInfo(W.AUDIO,$,pe,ye,Ce),this.bufferFragmentData(G,A,f,i)}if(D&&w!=null&&w.samples.length){const $={id:t,frag:A,details:D,samples:w.samples};n.trigger(y.FRAG_PARSING_METADATA,$)}if(D&&_){const $={id:t,frag:A,details:D,samples:_.samples};n.trigger(y.FRAG_PARSING_USERDATA,$)}}logMuxedErr(e){this.warn(`${qe(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==Nt.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:A}=t;if(i){const u=e.audioCodec;let m=Kt(i.codec,u);m==="mp4a"&&(m="mp4a.40.5");const _=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){m&&(m.indexOf("mp4a.40.5")!==-1?m="mp4a.40.2":m="mp4a.40.5");const w=i.metadata;w&&"channelCount"in w&&(w.channelCount||1)!==1&&_.indexOf("firefox")===-1&&(m="mp4a.40.5")}m&&m.indexOf("mp4a.40.5")!==-1&&_.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(m="mp4a.40.2",this.log(`Android: force audio codec to ${m}`)),u&&u!==m&&this.log(`Swapping manifest audio codec "${u}" for "${m}"`),i.levelCodec=m,i.id=V.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${m||""}/${u||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=V.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}A&&(this.log(`Init audiovideo buffer, container:${A.container}, codecs[level/parsed]=[${e.codecs}/${A.codec}]`),delete t.video,delete t.audio);const f=Object.keys(t);if(f.length){if(this.hls.trigger(y.BUFFER_CODECS,t),!this.hls)return;f.forEach(u=>{const _=t[u].initSegment;_!=null&&_.byteLength&&this.hls.trigger(y.BUFFER_APPENDING,{type:u,data:_,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,V.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=Nt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(Yn.isBuffered(e,n)?t=this.getAppendedFrag(n):Yn.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(y.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(y.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 re(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(re(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?ve(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 fs extends Z{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=ne.KEY_LOAD_ERROR,n,r,i){return new Lr({type:xe.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&&(!qe(e)||!qe(s)||e.sn<s.sn)||!n&&r==i-1)return this.emeController.selectKeySystemFormat(s).then(A=>{if(!this.emeController)return;s.setKeyFormat(A);const f=ti(A);if(f)return this.emeController.getKeySystemAccess([f])})}if(this.config.requireKeySystemAccessOnStart){const r=ys(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 u=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:`Missing decryption data on fragment in onKeyLoading (emeEnabled with controller: ${this.emeController&&this.config.emeEnabled})`);return Promise.reject(this.createKeyLoadError(e,ne.KEY_LOAD_ERROR,u))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,ne.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const A=ha(i);let f=this.keyIdToKeyInfo[A];if((n=f)!=null&&n.decryptdata.key)return i.key=f.decryptdata.key,Promise.resolve({frag:e,keyInfo:f});if(this.emeController&&(r=f)!=null&&r.keyLoadPromise)switch(this.emeController.getKeyStatus(f.decryptdata)){case"usable":case"usable-in-future":return f.keyLoadPromise.then(m=>{const{keyInfo:_}=m;return i.key=_.decryptdata.key,{frag:e,keyInfo:_}})}switch(this.log(`${this.keyIdToKeyInfo[A]?"Rel":"L"}oading${i.keyId?" keyId: "+ie(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),f=this.keyIdToKeyInfo[A]={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(f,e):this.loadKeyEME(f,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(f,e);default:return Promise.reject(this.createKeyLoadError(e,ne.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,"data"in i&&(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,A)=>{const f={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},u=n.keyLoadPolicy.default,m={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(w,I,D,G)=>{const{frag:$,keyInfo:pe}=D,ye=ha(pe.decryptdata);if(!$.decryptdata||pe!==this.keyIdToKeyInfo[ye])return A(this.createKeyLoadError($,ne.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),G));pe.decryptdata.key=$.decryptdata.key=new Uint8Array(w.data),$.keyLoader=null,pe.loader=null,s({frag:$,keyInfo:pe})},onError:(w,I,D,G)=>{this.resetLoader(I),A(this.createKeyLoadError(t,ne.KEY_LOAD_ERROR,new Error(`HTTP Error ${w.code} loading key ${w.text}`),D,F({url:f.url,data:void 0},w)))},onTimeout:(w,I,D)=>{this.resetLoader(I),A(this.createKeyLoadError(t,ne.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),D))},onAbort:(w,I,D)=>{this.resetLoader(I),A(this.createKeyLoadError(t,ne.INTERNAL_ABORTED,new Error("key loading aborted"),D))}};i.load(f,m,_)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null);const s=ha(n.decryptdata)||r;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function ha(a){if(a.keyFormat!==vr.FAIRPLAY){const e=a.keyId;if(e)return ie(e)}return a.uri}function bs(a){const{type:e}=a;switch(e){case Se.AUDIO_TRACK:return V.AUDIO;case Se.SUBTITLE_TRACK:return V.SUBTITLE;default:return V.MAIN}}function ms(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class dA{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(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.LEVEL_LOADING,this.onLevelLoading,this),e.on(y.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(y.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.LEVEL_LOADING,this.onLevelLoading,this),e.off(y.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(y.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(y.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:Se.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:A,levelInfo:f}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:Se.LEVEL,url:s,deliveryDirectives:A,levelOrTrack:f})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:A}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:Se.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:A})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:A}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:Se.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:A})}onLevelsUpdated(e,t){const n=this.loaders[Se.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[Se.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const u=this.hls.logger,m=r.context;if(m&&m.levelOrTrack===e.levelOrTrack&&(m.url===e.url||m.deliveryDirectives&&!e.deliveryDirectives)){m.url===e.url?u.log(`[playlist-loader]: ignore ${e.url} ongoing request`):u.log(`[playlist-loader]: ignore ${e.url} in favor of ${m.url}`);return}u.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===Se.MANIFEST?i=n.manifestLoadPolicy.default:i=B({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),re((t=e.deliveryDirectives)==null?void 0:t.part)){let u;if(e.type===Se.LEVEL&&e.level!==null?u=this.hls.levels[e.level].details:e.type===Se.AUDIO_TRACK&&e.id!==null?u=this.hls.audioTracks[e.id].details:e.type===Se.SUBTITLE_TRACK&&e.id!==null&&(u=this.hls.subtitleTracks[e.id].details),u){const m=u.partTarget,_=u.targetduration;if(m&&_){const w=Math.max(m*3,_*.8)*1e3;i=B({},i,{maxTimeToFirstByteMs:Math.min(w,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(w,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},A={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},f={onSuccess:(u,m,_,w)=>{const I=this.getInternalLoader(_);this.resetInternalLoader(_.type);const D=u.data;m.parsing.start=performance.now(),gs.isMediaPlaylist(D)||_.type!==Se.MANIFEST?this.handleTrackOrLevelPlaylist(u,m,_,w||null,I):this.handleMasterPlaylist(u,m,_,w)},onError:(u,m,_,w)=>{this.handleNetworkError(m,_,!1,u,w)},onTimeout:(u,m,_)=>{this.handleNetworkError(m,_,!0,void 0,u)}};r.load(e,A,f)}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,A=ms(e,n),f=gs.parseMasterPlaylist(s,A);if(f.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,n,f.playlistParsingError,r,t);return}const{contentSteering:u,levels:m,sessionData:_,sessionKeys:w,startTimeOffset:I,variableList:D}=f;this.variableList=D,m.forEach(ye=>{const{unknownCodecs:Ce}=ye;if(Ce){const{preferManagedMediaSource:$e}=this.hls.config;let{audioCodec:je,videoCodec:Dt}=ye;for(let et=Ce.length;et--;){const wt=Ce[et];Cn(wt,"audio",$e)?(ye.audioCodec=je=je?`${je},${wt}`:wt,dr.audio[je.substring(0,4)]=2,Ce.splice(et,1)):Cn(wt,"video",$e)&&(ye.videoCodec=Dt=Dt?`${Dt},${wt}`:wt,dr.video[Dt.substring(0,4)]=2,Ce.splice(et,1))}}});const{AUDIO:G=[],SUBTITLES:$,"CLOSED-CAPTIONS":pe}=gs.parseMasterPlaylistMedia(s,A,f);G.length&&!G.some(Ce=>!Ce.url)&&m[0].audioCodec&&!m[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),G.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new ei({}),bitrate:0,url:""})),i.trigger(y.MANIFEST_LOADED,{levels:m,audioTracks:G,subtitles:$,captions:pe,contentSteering:u,url:A,stats:t,networkDetails:r,sessionData:_,sessionKeys:w,startTimeOffset:I,variableList:D})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:A,level:f,type:u}=n,m=ms(e,n),_=re(f)?f:re(A)?A:0,w=bs(n),I=gs.parseLevelPlaylist(e.data,m,_,w,0,this.variableList);if(u===Se.MANIFEST){const D={attrs:new ei({}),bitrate:0,details:I,name:"",url:m};I.requestScheduled=t.loading.start+Za(I,0),s.trigger(y.MANIFEST_LOADED,{levels:[D],audioTracks:[],url:m,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=I,this.handlePlaylistLoaded(I,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(y.ERROR,{type:xe.NETWORK_ERROR,details:ne.MANIFEST_PARSING_ERROR,fatal:t.type===Se.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===Se.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===Se.AUDIO_TRACK||e.type===Se.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const A=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let f=ne.UNKNOWN,u=!1;const m=this.getInternalLoader(e);switch(e.type){case Se.MANIFEST:f=n?ne.MANIFEST_LOAD_TIMEOUT:ne.MANIFEST_LOAD_ERROR,u=!0;break;case Se.LEVEL:f=n?ne.LEVEL_LOAD_TIMEOUT:ne.LEVEL_LOAD_ERROR,u=!1;break;case Se.AUDIO_TRACK:f=n?ne.AUDIO_TRACK_LOAD_TIMEOUT:ne.AUDIO_TRACK_LOAD_ERROR,u=!1;break;case Se.SUBTITLE_TRACK:f=n?ne.SUBTITLE_TRACK_LOAD_TIMEOUT:ne.SUBTITLE_LOAD_ERROR,u=!1;break}m&&this.resetInternalLoader(e.type);const _={type:xe.NETWORK_ERROR,details:f,fatal:u,url:e.url,loader:m,context:e,error:A,networkDetails:t,stats:i};if(r){const w=(t==null?void 0:t.url)||e.url;_.response=F({url:w,data:void 0},r)}this.hls.trigger(y.ERROR,_)}handlePlaylistLoaded(e,t,n,r,i,s){const A=this.hls,{type:f,level:u,levelOrTrack:m,id:_,groupId:w,deliveryDirectives:I}=r,D=ms(t,r),G=bs(r);let $=typeof r.level=="number"&&G===V.MAIN?u:void 0;const pe=e.playlistParsingError;if(pe){if(this.hls.logger.warn(`${pe} ${e.url}`),!A.config.ignorePlaylistParsingErrors){A.trigger(y.ERROR,{type:xe.NETWORK_ERROR,details:ne.LEVEL_PARSING_ERROR,fatal:!1,url:D,error:pe,reason:pe.message,response:t,context:r,level:$,parent:G,networkDetails:i,stats:n});return}e.playlistParsingError=null}if(!e.fragments.length){const ye=e.playlistParsingError=new Error("No Segments found in Playlist");A.trigger(y.ERROR,{type:xe.NETWORK_ERROR,details:ne.LEVEL_EMPTY_ERROR,fatal:!1,url:D,error:ye,reason:ye.message,response:t,context:r,level:$,parent:G,networkDetails:i,stats:n});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),f){case Se.MANIFEST:case Se.LEVEL:if($){if(!m)$=0;else if(m!==A.levels[$]){const ye=A.levels.indexOf(m);ye>-1&&($=ye)}}A.trigger(y.LEVEL_LOADED,{details:e,levelInfo:m||A.levels[0],level:$||0,id:_||0,stats:n,networkDetails:i,deliveryDirectives:I,withoutMultiVariant:f===Se.MANIFEST});break;case Se.AUDIO_TRACK:A.trigger(y.AUDIO_TRACK_LOADED,{details:e,track:m,id:_||0,groupId:w||"",stats:n,networkDetails:i,deliveryDirectives:I});break;case Se.SUBTITLE_TRACK:A.trigger(y.SUBTITLE_TRACK_LOADED,{details:e,track:m,id:_||0,groupId:w||"",stats:n,networkDetails:i,deliveryDirectives:I});break}}}class hs{static get version(){return Xs}static isMSESupported(){return Er()}static isSupported(){return Ji()}static getMediaSource(){return Ue()}static get Events(){return y}static get MetadataSchema(){return ji}static get ErrorTypes(){return xe}static get ErrorDetails(){return ne}static get DefaultConfig(){return hs.defaultConfig?hs.defaultConfig:d}static set DefaultConfig(e){hs.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 _i,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=ke(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=U(hs.DefaultConfig,e,t);this.userConfig=e,n.progressive&&Ee(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:A,fpsController:f}=n,u=new A(this),m=this.abrController=new r(this),_=new $n(this),w=n.interstitialsController,I=w?this.interstitialsController=new w(this,hs):null,D=this.bufferController=new i(this,_),G=this.capLevelController=new s(this),$=new f(this),pe=new dA(this),ye=n.contentSteeringController,Ce=ye?new ye(this):null,$e=this.levelController=new Nn(this,Ce),je=new Or(this),Dt=new fs(this.config,this.logger),et=this.streamController=new yi(this,_,Dt),wt=this.gapController=new Mt(this,_);G.setStreamController(et),$.setStreamController(et);const _t=[pe,$e,et];I&&_t.splice(1,0,I),Ce&&_t.splice(1,0,Ce),this.networkControllers=_t;const at=[m,D,wt,G,$,je,_];this.audioTrackController=this.createController(n.audioTrackController,_t);const Jt=n.audioStreamController;Jt&&_t.push(this.audioStreamController=new Jt(this,_,Dt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,_t);const In=n.subtitleStreamController;In&&_t.push(this.subtititleStreamController=new In(this,_,Dt)),this.createController(n.timelineController,at),Dt.emeController=this.emeController=this.createController(n.emeController,at),this.cmcdController=this.createController(n.cmcdController,at),this.latencyController=this.createController(wr,at),this.coreComponents=at,_t.push(u);const jn=u.onErrorOut;typeof jn=="function"&&this.on(y.ERROR,jn,u),this.on(y.MANIFEST_LOADED,pe.onManifestLoaded,pe)}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===y.ERROR;this.trigger(y.ERROR,{type:xe.OTHER_ERROR,details:ne.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(y.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(y.ERROR,{type:xe.OTHER_ERROR,details:ne.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(y.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(y.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(y.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=b.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(y.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={[V.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[V.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[V.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=Tu()),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){ii(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=Pt(t);return rr(e,n,navigator.mediaCapabilities)}}hs.defaultConfig=void 0}}]);
}());