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.
162 lines
1.3 MiB
162 lines
1.3 MiB
!(function(){var Nc=Object.defineProperty;var kc=Object.getOwnPropertySymbols;var Hc=Object.prototype.hasOwnProperty,Kc=Object.prototype.propertyIsEnumerable;var Qc=Math.pow,Sc=(Un,Ft,Y)=>Ft in Un?Nc(Un,Ft,{enumerable:!0,configurable:!0,writable:!0,value:Y}):Un[Ft]=Y,Fc=(Un,Ft)=>{for(var Y in Ft||(Ft={}))Hc.call(Ft,Y)&&Sc(Un,Y,Ft[Y]);if(kc)for(var Y of kc(Ft))Kc.call(Ft,Y)&&Sc(Un,Y,Ft[Y]);return Un};var di=(Un,Ft,Y)=>Sc(Un,typeof Ft!="symbol"?Ft+"":Ft,Y);(self.webpackChunk=self.webpackChunk||[]).push([[2303],{95869:function(Un,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return V}});var te=Y(32855),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"},be=He,ee=Y(7657),y=function(le,O){return Te.createElement(ee.Z,(0,te.Z)({},le,{ref:O,icon:be}))},Ce=Te.forwardRef(y),V=Ce},65030:function(Un,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return tn}});var te=Y(27247),Te=Y(11913),He=Y(43079),be=Y(43403),ee=Y(92310),y=Y.n(ee),Ce=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(32855),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.className,fe=k.content,Me=X.x,We=Me===void 0?0:Me,ot=X.y,ft=ot===void 0?0:ot,jt=F.useRef();if(!v||!v.points)return null;var _t={position:"absolute"};if(v.autoArrow!==!1){var Lt=v.points[0],vt=v.points[1],Ct=Lt[0],at=Lt[1],pt=vt[0],It=vt[1];Ct===pt||!["t","b"].includes(Ct)?_t.top=ft:Ct==="t"?_t.top=0:_t.bottom=0,at===It||!["l","r"].includes(at)?_t.left=We:at==="l"?_t.left=0:_t.right=0}return F.createElement("div",{ref:jt,className:y()("".concat(P,"-arrow"),$),style:_t},fe)}function K(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($){var fe=$.className;return F.createElement("div",{style:{zIndex:T},className:y()("".concat(P,"-mask"),fe)})}):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,$=Re.target,fe=Re.onVisibleChanged,Me=Re.open,We=Re.keepDom,ot=Re.fresh,ft=Re.onClick,jt=Re.mask,_t=Re.arrow,Lt=Re.arrowPos,vt=Re.align,Ct=Re.motion,at=Re.maskMotion,pt=Re.forceRender,It=Re.getPopupContainer,Ht=Re.autoDestroy,fn=Re.portal,Yt=Re.zIndex,mn=Re.onMouseEnter,ln=Re.onMouseLeave,yn=Re.onPointerEnter,$n=Re.onPointerDownCapture,dr=Re.ready,Xt=Re.offsetX,En=Re.offsetY,$e=Re.offsetR,Pe=Re.offsetB,Fe=Re.onAlign,re=Re.onPrepare,ce=Re.stretch,me=Re.targetWidth,Se=Re.targetHeight,Qe=typeof v=="function"?v():v,Tt=Me||We,Wt=(It==null?void 0:It.length)>0,Ut=F.useState(!It||!Wt),vn=(0,Te.Z)(Ut,2),jn=vn[0],ur=vn[1];if((0,B.Z)(function(){!jn&&Wt&&$&&ur(!0)},[jn,Wt,$]),!jn)return null;var gn="auto",Jt={left:"-1000vw",top:"-1000vh",right:gn,bottom:gn};if(dr||!Me){var or,mr=vt.points,Ge=vt.dynamicInset||((or=vt._experimental)===null||or===void 0?void 0:or.dynamicInset),lr=Ge&&mr[0][1]==="r",ir=Ge&&mr[0][0]==="b";lr?(Jt.right=$e,Jt.left=gn):(Jt.left=Xt,Jt.right=gn),ir?(Jt.bottom=Pe,Jt.top=gn):(Jt.top=En,Jt.bottom=gn)}var rr={};return ce&&(ce.includes("height")&&Se?rr.height=Se:ce.includes("minHeight")&&Se&&(rr.minHeight=Se),ce.includes("width")&&me?rr.width=me:ce.includes("minWidth")&&me&&(rr.minWidth=me)),Me||(rr.pointerEvents="none"),F.createElement(fn,{open:pt||Tt,getContainer:It&&function(){return It($)},autoDestroy:Ht},F.createElement(K,{prefixCls:X,open:Me,zIndex:Yt,mask:jt,motion:at}),F.createElement(Ce.Z,{onResize:Fe,disabled:!Me},function(Jr){return F.createElement(ae.default,(0,L.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:pt,leavedClassName:"".concat(X,"-hidden")},Ct,{onAppearPrepare:re,onEnterPrepare:re,visible:Me,onVisibleChanged:function(li){var Gr;Ct==null||(Gr=Ct.onVisibleChanged)===null||Gr===void 0||Gr.call(Ct,li),fe(li)}}),function(Sr,li){var Gr=Sr.className,bi=Sr.style,si=y()(X,Gr,T);return F.createElement("div",{ref:(0,Z.sQ)(Jr,P,li),className:si,style:(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({"--arrow-x":"".concat(Lt.x||0,"px"),"--arrow-y":"".concat(Lt.y||0,"px")},Jt),rr),bi),{},{boxSizing:"border-box",zIndex:Yt},k),onMouseEnter:mn,onMouseLeave:ln,onPointerEnter:yn,onClick:ft,onPointerDownCapture:$n},_t&&F.createElement(J,{prefixCls:X,arrow:_t,arrowPos:Lt,align:vt}),F.createElement(oe,{cache:!Me&&!ot},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(fe){(0,Z.mH)(P,T?T(fe):fe)},[T]),$=(0,Z.x1)(k,(0,Z.C4)(v));return X?F.cloneElement(v,{ref:$}):v}),pe=ke,Ue=F.createContext(null),Xe=Ue;function Ee(Re){return Re?Array.isArray(Re)?Re:[Re]:[]}function et(Re,P,v,T){return F.useMemo(function(){var X=Ee(v!=null?v:P),k=Ee(T!=null?T:P),$=new Set(X),fe=new Set(k);return Re&&($.has("hover")&&($.delete("hover"),$.add("click")),fe.has("hover")&&(fe.delete("hover"),fe.add("click"))),[$,fe]},[Re,P,v,T])}var ne=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),$=0;$<k.length;$+=1){var fe,Me=k[$];if(Q((fe=Re[Me])===null||fe===void 0?void 0:fe.points,X,T))return"".concat(P,"-placement-").concat(Me)}return""}function ie(Re,P,v,T){return P||(v?{motionName:"".concat(Re,"-").concat(v)}:T?{motionName:T}:null)}function ge(Re){return Re.ownerDocument.defaultView}function he(Re){for(var P=[],v=Re==null?void 0:Re.parentElement,T=["hidden","scroll","clip","auto"];v;){var X=ge(v).getComputedStyle(v),k=X.overflowX,$=X.overflowY,fe=X.overflow;[k,$,fe].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,te.Z)({},Re);return(P||[]).forEach(function(T){if(!(T instanceof HTMLBodyElement||T instanceof HTMLHtmlElement)){var X=ge(T).getComputedStyle(T),k=X.overflow,$=X.overflowClipMargin,fe=X.borderTopWidth,Me=X.borderBottomWidth,We=X.borderLeftWidth,ot=X.borderRightWidth,ft=T.getBoundingClientRect(),jt=T.offsetHeight,_t=T.clientHeight,Lt=T.offsetWidth,vt=T.clientWidth,Ct=S(fe),at=S(Me),pt=S(We),It=S(ot),Ht=b(Math.round(ft.width/Lt*1e3)/1e3),fn=b(Math.round(ft.height/jt*1e3)/1e3),Yt=(Lt-vt-pt-It)*Ht,mn=(jt-_t-Ct-at)*fn,ln=Ct*fn,yn=at*fn,$n=pt*Ht,dr=It*Ht,Xt=0,En=0;if(k==="clip"){var $e=S($);Xt=$e*Ht,En=$e*fn}var Pe=ft.x+$n-Xt,Fe=ft.y+ln-En,re=Pe+ft.width+2*Xt-$n-dr-Yt,ce=Fe+ft.height+2*En-ln-yn-mn;v.left=Math.max(v.left,Pe),v.top=Math.max(v.top,Fe),v.right=Math.min(v.right,re),v.bottom=Math.min(v.bottom,ce)}}),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 Je(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 on(Re,P,v,T,X,k,$){var fe=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)(fe,2),We=Me[0],ot=Me[1],ft=F.useRef(0),jt=F.useMemo(function(){return P?he(P):[]},[P]),_t=F.useRef({}),Lt=function(){_t.current={}};Re||Lt();var vt=(0,le.Z)(function(){if(P&&v&&Re){let Ii=function(Ri,as){var es=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xr,Us=Tt.x+Ri,ws=Tt.y+as,ei=Us+ir,yi=ws+lr,Ir=Math.max(Us,es.left),In=Math.max(ws,es.top),Jn=Math.min(ei,es.right),ti=Math.min(yi,es.bottom);return Math.max(0,(Jn-Ir)*(ti-In))},gi=function(){An=Tt.y+Ke,Kn=An+lr,Fn=Tt.x+ve,hn=Fn+ir};var pt,It,Ht,fn,Yt=P,mn=Yt.ownerDocument,ln=ge(Yt),yn=ln.getComputedStyle(Yt),$n=yn.position,dr=Yt.style.left,Xt=Yt.style.top,En=Yt.style.right,$e=Yt.style.bottom,Pe=Yt.style.overflow,Fe=(0,te.Z)((0,te.Z)({},X[T]),k),re=mn.createElement("div");(pt=Yt.parentElement)===null||pt===void 0||pt.appendChild(re),re.style.left="".concat(Yt.offsetLeft,"px"),re.style.top="".concat(Yt.offsetTop,"px"),re.style.position=$n,re.style.height="".concat(Yt.offsetHeight,"px"),re.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 ce;if(Array.isArray(v))ce={x:v[0],y:v[1],width:0,height:0};else{var me,Se,Qe=v.getBoundingClientRect();Qe.x=(me=Qe.x)!==null&&me!==void 0?me:Qe.left,Qe.y=(Se=Qe.y)!==null&&Se!==void 0?Se:Qe.top,ce={x:Qe.x,y:Qe.y,width:Qe.width,height:Qe.height}}var Tt=Yt.getBoundingClientRect(),Wt=ln.getComputedStyle(Yt),Ut=Wt.height,vn=Wt.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 jn=mn.documentElement,ur=jn.clientWidth,gn=jn.clientHeight,Jt=jn.scrollWidth,or=jn.scrollHeight,mr=jn.scrollTop,Ge=jn.scrollLeft,lr=Tt.height,ir=Tt.width,rr=ce.height,Jr=ce.width,Sr={left:0,top:0,right:ur,bottom:gn},li={left:-Ge,top:-mr,right:Jt-Ge,bottom:or-mr},Gr=Fe.htmlRegion,bi="visible",si="visibleFirst";Gr!=="scroll"&&Gr!==si&&(Gr=bi);var vi=Gr===si,Xi=W(li,jt),Fr=W(Sr,jt),xr=Gr===bi?Fr:Xi,Nr=vi?Fr:xr;Yt.style.left="auto",Yt.style.top="auto",Yt.style.right="0",Yt.style.bottom="0";var Hi=Yt.getBoundingClientRect();Yt.style.left=dr,Yt.style.top=Xt,Yt.style.right=En,Yt.style.bottom=$e,Yt.style.overflow=Pe,(fn=Yt.parentElement)===null||fn===void 0||fn.removeChild(re);var ai=b(Math.round(ir/parseFloat(vn)*1e3)/1e3),Ki=b(Math.round(lr/parseFloat(Ut)*1e3)/1e3);if(ai===0||Ki===0||(0,V.Sh)(v)&&!(0,ne.Z)(v))return;var gr=Fe.offset,Gn=Fe.targetOffset,nn=Je(Tt,gr),ze=(0,Te.Z)(nn,2),gt=ze[0],Nt=ze[1],yt=Je(ce,Gn),Kt=(0,Te.Z)(yt,2),xt=Kt[0],St=Kt[1];ce.x-=xt,ce.y-=St;var qt=Fe.points||[],_n=(0,Te.Z)(qt,2),xn=_n[0],sr=_n[1],Sn=mt(sr),Xn=mt(xn),M=Gt(ce,Sn),N=Gt(Tt,Xn),de=(0,te.Z)({},Fe),ve=M.x-N.x+gt,Ke=M.y-N.y+Nt,tt=Ii(ve,Ke),Et=Ii(ve,Ke,Fr),bt=Gt(ce,["t","l"]),$t=Gt(Tt,["t","l"]),Dt=Gt(ce,["b","r"]),Le=Gt(Tt,["b","r"]),rt=Fe.overflow||{},Ot=rt.adjustX,rn=rt.adjustY,un=rt.shiftX,en=rt.shiftY,an=function(as){return typeof as=="boolean"?as:as>=0},An,Kn,Fn,hn;gi();var On=an(rn),Ln=Xn[0]===Sn[0];if(On&&Xn[0]==="t"&&(Kn>Nr.bottom||_t.current.bt)){var cr=Ke;Ln?cr-=lr-rr:cr=bt.y-Le.y-Nt;var zn=Ii(ve,cr),Rn=Ii(ve,cr,Fr);zn>tt||zn===tt&&(!vi||Rn>=Et)?(_t.current.bt=!0,Ke=cr,Nt=-Nt,de.points=[Qt(Xn,0),Qt(Sn,0)]):_t.current.bt=!1}if(On&&Xn[0]==="b"&&(An<Nr.top||_t.current.tb)){var yr=Ke;Ln?yr+=lr-rr:yr=Dt.y-$t.y-Nt;var er=Ii(ve,yr),wr=Ii(ve,yr,Fr);er>tt||er===tt&&(!vi||wr>=Et)?(_t.current.tb=!0,Ke=yr,Nt=-Nt,de.points=[Qt(Xn,0),Qt(Sn,0)]):_t.current.tb=!1}var Lr=an(Ot),Vr=Xn[1]===Sn[1];if(Lr&&Xn[1]==="l"&&(hn>Nr.right||_t.current.rl)){var Qr=ve;Vr?Qr-=ir-Jr:Qr=bt.x-Le.x-gt;var Ur=Ii(Qr,Ke),fr=Ii(Qr,Ke,Fr);Ur>tt||Ur===tt&&(!vi||fr>=Et)?(_t.current.rl=!0,ve=Qr,gt=-gt,de.points=[Qt(Xn,1),Qt(Sn,1)]):_t.current.rl=!1}if(Lr&&Xn[1]==="r"&&(Fn<Nr.left||_t.current.lr)){var Rr=ve;Vr?Rr+=ir-Jr:Rr=Dt.x-$t.x-gt;var pr=Ii(Rr,Ke),Ui=Ii(Rr,Ke,Fr);pr>tt||pr===tt&&(!vi||Ui>=Et)?(_t.current.lr=!0,ve=Rr,gt=-gt,de.points=[Qt(Xn,1),Qt(Sn,1)]):_t.current.lr=!1}gi();var Hr=un===!0?0:un;typeof Hr=="number"&&(Fn<Fr.left&&(ve-=Fn-Fr.left-gt,ce.x+Jr<Fr.left+Hr&&(ve+=ce.x-Fr.left+Jr-Hr)),hn>Fr.right&&(ve-=hn-Fr.right-gt,ce.x>Fr.right-Hr&&(ve+=ce.x-Fr.right+Hr)));var Or=en===!0?0:en;typeof Or=="number"&&(An<Fr.top&&(Ke-=An-Fr.top-Nt,ce.y+rr<Fr.top+Or&&(Ke+=ce.y-Fr.top+rr-Or)),Kn>Fr.bottom&&(Ke-=Kn-Fr.bottom-Nt,ce.y>Fr.bottom-Or&&(Ke+=ce.y-Fr.bottom+Or)));var qr=Tt.x+ve,Tn=qr+ir,Wr=Tt.y+Ke,Ti=Wr+lr,Si=ce.x,$i=Si+Jr,ss=ce.y,ls=ss+rr,ki=Math.max(qr,Si),Er=Math.min(Tn,$i),Gi=(ki+Er)/2,gs=Gi-qr,Ds=Math.max(Wr,ss),Ls=Math.min(Ti,ls),us=(Ds+Ls)/2,ns=us-Wr;$==null||$(P,de);var Qi=Hi.right-Tt.x-(ve+Tt.width),Ji=Hi.bottom-Tt.y-(Ke+Tt.height);ai===1&&(ve=Math.round(ve),Qi=Math.round(Qi)),Ki===1&&(Ke=Math.round(Ke),Ji=Math.round(Ji));var qi={ready:!0,offsetX:ve/ai,offsetY:Ke/Ki,offsetR:Qi/ai,offsetB:Ji/Ki,arrowX:gs/ai,arrowY:ns/Ki,scaleX:ai,scaleY:Ki,align:de};ot(qi)}}),Ct=function(){ft.current+=1;var It=ft.current;Promise.resolve().then(function(){ft.current===It&&vt()})},at=function(){ot(function(It){return(0,te.Z)((0,te.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,Ct]}var Zt=Y(3300);function Rt(Re,P,v,T,X){(0,B.Z)(function(){if(Re&&P&&v){let ft=function(){T(),X()};var k=P,$=v,fe=he(k),Me=he($),We=ge($),ot=new Set([We].concat((0,Zt.Z)(fe),(0,Zt.Z)(Me)));return ot.forEach(function(jt){jt.addEventListener("scroll",ft,{passive:!0})}),We.addEventListener("resize",ft,{passive:!0}),T(),function(){ot.forEach(function(jt){jt.removeEventListener("scroll",ft),We.removeEventListener("resize",ft)})}}},[Re,P,v])}var je=Y(48736);function ht(Re,P,v,T,X,k,$,fe){var Me=F.useRef(Re);Me.current=Re;var We=F.useRef(!1);F.useEffect(function(){if(P&&T&&(!X||k)){var ft=function(){We.current=!1},jt=function(Ht){var fn;Me.current&&!$(((fn=Ht.composedPath)===null||fn===void 0||(fn=fn.call(Ht))===null||fn===void 0?void 0:fn[0])||Ht.target)&&!We.current&&fe(!1)},_t=ge(T);_t.addEventListener("pointerdown",ft,!0),_t.addEventListener("mousedown",jt,!0),_t.addEventListener("contextmenu",jt,!0);var Lt=(0,o.A)(v);if(Lt&&(Lt.addEventListener("mousedown",jt,!0),Lt.addEventListener("contextmenu",jt,!0)),0)var vt,Ct,at,pt;return function(){_t.removeEventListener("pointerdown",ft,!0),_t.removeEventListener("mousedown",jt,!0),_t.removeEventListener("contextmenu",jt,!0),Lt&&(Lt.removeEventListener("mousedown",jt,!0),Lt.removeEventListener("contextmenu",jt,!0))}}},[P,v,T,X,k]);function ot(){We.current=!0}return ot}var At=["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 ct(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:be.Z,P=F.forwardRef(function(v,T){var X=v.prefixCls,k=X===void 0?"rc-trigger-popup":X,$=v.children,fe=v.action,Me=fe===void 0?"hover":fe,We=v.showAction,ot=v.hideAction,ft=v.popupVisible,jt=v.defaultPopupVisible,_t=v.onPopupVisibleChange,Lt=v.afterPopupVisibleChange,vt=v.mouseEnterDelay,Ct=v.mouseLeaveDelay,at=Ct===void 0?.1:Ct,pt=v.focusDelay,It=v.blurDelay,Ht=v.mask,fn=v.maskClosable,Yt=fn===void 0?!0:fn,mn=v.getPopupContainer,ln=v.forceRender,yn=v.autoDestroy,$n=v.destroyPopupOnHide,dr=v.popup,Xt=v.popupClassName,En=v.popupStyle,$e=v.popupPlacement,Pe=v.builtinPlacements,Fe=Pe===void 0?{}:Pe,re=v.popupAlign,ce=v.zIndex,me=v.stretch,Se=v.getPopupClassNameFromAlign,Qe=v.fresh,Tt=v.alignPoint,Wt=v.onPopupClick,Ut=v.onPopupAlign,vn=v.arrow,jn=v.popupMotion,ur=v.maskMotion,gn=v.popupTransitionName,Jt=v.popupAnimation,or=v.maskTransitionName,mr=v.maskAnimation,Ge=v.className,lr=v.getTriggerDOMNode,ir=(0,He.Z)(v,At),rr=yn||$n||!1,Jr=F.useState(!1),Sr=(0,Te.Z)(Jr,2),li=Sr[0],Gr=Sr[1];(0,B.Z)(function(){Gr((0,E.Z)())},[]);var bi=F.useRef({}),si=F.useContext(Xe),vi=F.useMemo(function(){return{registerSubPopup:function(Jn,ti){bi.current[Jn]=ti,si==null||si.registerSubPopup(Jn,ti)}}},[si]),Xi=(0,O.Z)(),Fr=F.useState(null),xr=(0,Te.Z)(Fr,2),Nr=xr[0],Hi=xr[1],ai=F.useRef(null),Ki=(0,le.Z)(function(In){ai.current=In,(0,V.Sh)(In)&&Nr!==In&&Hi(In),si==null||si.registerSubPopup(Xi,In)}),gr=F.useState(null),Gn=(0,Te.Z)(gr,2),nn=Gn[0],ze=Gn[1],gt=F.useRef(null),Nt=(0,le.Z)(function(In){(0,V.Sh)(In)&&nn!==In&&(ze(In),gt.current=In)}),yt=F.Children.only($),Kt=(yt==null?void 0:yt.props)||{},xt={},St=(0,le.Z)(function(In){var Jn,ti,fi=nn;return(fi==null?void 0:fi.contains(In))||((Jn=(0,o.A)(fi))===null||Jn===void 0?void 0:Jn.host)===In||In===fi||(Nr==null?void 0:Nr.contains(In))||((ti=(0,o.A)(Nr))===null||ti===void 0?void 0:ti.host)===In||In===Nr||Object.values(bi.current).some(function(zr){return(zr==null?void 0:zr.contains(In))||In===zr})}),qt=ie(k,jn,Jt,gn),_n=ie(k,ur,mr,or),xn=F.useState(jt||!1),sr=(0,Te.Z)(xn,2),Sn=sr[0],Xn=sr[1],M=ft!=null?ft:Sn,N=(0,le.Z)(function(In){ft===void 0&&Xn(In)});(0,B.Z)(function(){Xn(ft||!1)},[ft]);var de=F.useRef(M);de.current=M;var ve=F.useRef([]);ve.current=[];var Ke=(0,le.Z)(function(In){var Jn;N(In),((Jn=ve.current[ve.current.length-1])!==null&&Jn!==void 0?Jn:M)!==In&&(ve.current.push(In),_t==null||_t(In))}),tt=F.useRef(),Et=function(){clearTimeout(tt.current)},bt=function(Jn){var ti=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Et(),ti===0?Ke(Jn):tt.current=setTimeout(function(){Ke(Jn)},ti*1e3)};F.useEffect(function(){return Et},[]);var $t=F.useState(!1),Dt=(0,Te.Z)($t,2),Le=Dt[0],rt=Dt[1];(0,B.Z)(function(In){(!In||M)&&rt(!0)},[M]);var Ot=F.useState(null),rn=(0,Te.Z)(Ot,2),un=rn[0],en=rn[1],an=F.useState(null),An=(0,Te.Z)(an,2),Kn=An[0],Fn=An[1],hn=function(Jn){Fn([Jn.clientX,Jn.clientY])},On=on(M,Nr,Tt&&Kn!==null?Kn:nn,$e,Fe,re,Ut),Ln=(0,Te.Z)(On,11),cr=Ln[0],zn=Ln[1],Rn=Ln[2],yr=Ln[3],er=Ln[4],wr=Ln[5],Lr=Ln[6],Vr=Ln[7],Qr=Ln[8],Ur=Ln[9],fr=Ln[10],Rr=et(li,Me,We,ot),pr=(0,Te.Z)(Rr,2),Ui=pr[0],Hr=pr[1],Or=Ui.has("click"),qr=Hr.has("click")||Hr.has("contextMenu"),Tn=(0,le.Z)(function(){Le||fr()}),Wr=function(){de.current&&Tt&&qr&&bt(!1)};Rt(M,nn,Nr,Tn,Wr),(0,B.Z)(function(){Tn()},[Kn,$e]),(0,B.Z)(function(){M&&!(Fe!=null&&Fe[$e])&&Tn()},[JSON.stringify(re)]);var Ti=F.useMemo(function(){var In=q(Fe,k,Ur,Tt);return y()(In,Se==null?void 0:Se(Ur))},[Ur,Se,Fe,k,Tt]);F.useImperativeHandle(T,function(){return{nativeElement:gt.current,popupElement:ai.current,forceAlign:Tn}});var Si=F.useState(0),$i=(0,Te.Z)(Si,2),ss=$i[0],ls=$i[1],ki=F.useState(0),Er=(0,Te.Z)(ki,2),Gi=Er[0],gs=Er[1],Ds=function(){if(me&&nn){var Jn=nn.getBoundingClientRect();ls(Jn.width),gs(Jn.height)}},Ls=function(){Ds(),Tn()},us=function(Jn){rt(!1),fr(),Lt==null||Lt(Jn)},ns=function(){return new Promise(function(Jn){Ds(),en(function(){return Jn})})};(0,B.Z)(function(){un&&(fr(),un(),en(null))},[un]);function Qi(In,Jn,ti,fi){xt[In]=function(zr){var Ys;fi==null||fi(zr),bt(Jn,ti);for(var Oi=arguments.length,pi=new Array(Oi>1?Oi-1:0),Es=1;Es<Oi;Es++)pi[Es-1]=arguments[Es];(Ys=Kt[In])===null||Ys===void 0||Ys.call.apply(Ys,[Kt,zr].concat(pi))}}(Or||qr)&&(xt.onClick=function(In){var Jn;de.current&&qr?bt(!1):!de.current&&Or&&(hn(In),bt(!0));for(var ti=arguments.length,fi=new Array(ti>1?ti-1:0),zr=1;zr<ti;zr++)fi[zr-1]=arguments[zr];(Jn=Kt.onClick)===null||Jn===void 0||Jn.call.apply(Jn,[Kt,In].concat(fi))});var Ji=ht(M,qr,nn,Nr,Ht,Yt,St,bt),qi=Ui.has("hover"),Ii=Hr.has("hover"),gi,Ri;qi&&(Qi("onMouseEnter",!0,vt,function(In){hn(In)}),Qi("onPointerEnter",!0,vt,function(In){hn(In)}),gi=function(Jn){(M||Le)&&Nr!==null&&Nr!==void 0&&Nr.contains(Jn.target)&&bt(!0,vt)},Tt&&(xt.onMouseMove=function(In){var Jn;(Jn=Kt.onMouseMove)===null||Jn===void 0||Jn.call(Kt,In)})),Ii&&(Qi("onMouseLeave",!1,at),Qi("onPointerLeave",!1,at),Ri=function(){bt(!1,at)}),Ui.has("focus")&&Qi("onFocus",!0,pt),Hr.has("focus")&&Qi("onBlur",!1,It),Ui.has("contextMenu")&&(xt.onContextMenu=function(In){var Jn;de.current&&Hr.has("contextMenu")?bt(!1):(hn(In),bt(!0)),In.preventDefault();for(var ti=arguments.length,fi=new Array(ti>1?ti-1:0),zr=1;zr<ti;zr++)fi[zr-1]=arguments[zr];(Jn=Kt.onContextMenu)===null||Jn===void 0||Jn.call.apply(Jn,[Kt,In].concat(fi))}),Ge&&(xt.className=y()(Kt.className,Ge));var as=F.useRef(!1);as.current||(as.current=ln||M||Le);var es=(0,te.Z)((0,te.Z)({},Kt),xt),Us={},ws=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];ws.forEach(function(In){ir[In]&&(Us[In]=function(){for(var Jn,ti=arguments.length,fi=new Array(ti),zr=0;zr<ti;zr++)fi[zr]=arguments[zr];(Jn=es[In])===null||Jn===void 0||Jn.call.apply(Jn,[es].concat(fi)),ir[In].apply(ir,fi)})});var ei=F.cloneElement(yt,(0,te.Z)((0,te.Z)({},es),Us)),yi={x:wr,y:Lr},Ir=vn?(0,te.Z)({},vn!==!0?vn:{}):null;return F.createElement(F.Fragment,null,F.createElement(Ce.Z,{disabled:!M,ref:Nt,onResize:Ls},F.createElement(pe,{getTriggerDOMNode:lr},ei)),as.current&&F.createElement(Xe.Provider,{value:vi},F.createElement(De,{portal:Re,ref:Ki,prefixCls:k,popup:dr,className:y()(Xt,Ti),style:En,target:nn,onMouseEnter:gi,onMouseLeave:Ri,onPointerEnter:gi,zIndex:ce,open:M,keepDom:Le,fresh:Qe,onClick:Wt,onPointerDownCapture:Ji,mask:Ht,motion:qt,maskMotion:_n,onVisibleChanged:us,onPrepare:ns,forceRender:ln,autoDestroy:rr,getPopupContainer:mn,align:Ur,arrow:Ir,arrowPos:yi,ready:cr,offsetX:zn,offsetY:Rn,offsetR:yr,offsetB:er,onAlign:Tn,stretch:me,targetWidth:ss/Vr,targetHeight:Gi/Qr})))});return P}var tn=ct(be.Z)},53281:function(Un,Ft,Y){"use strict";Y.r(Ft),Y.d(Ft,{default:function(){return vt}});var te=Y(59301),Te=Y(56656),He=Y.n(Te),be=Y(86129),ee=Y.n(be),y=Y(82093),Ce=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),K=Y(29787),z=Y(27812),oe=Y(95869),Be=Y(87169),De=Y(26227),ke=Y(90524),pe=Y(34055),Ue=Y(49661),Xe=Y(28284),Ee=Y(71051),et=Y(37568),ne=({defaultValue:Ct,onBlur:at,max:pt,className:It="game-score"})=>{const[Ht,fn]=(0,te.useState)(Ct);(0,te.useEffect)(()=>{fn(Ct)},[Ct]);function Yt(ln){fn(ln)}function mn(){Ht&&(at(Ht>pt?pt:Ht),fn(null))}return te.createElement(Ee.Z,{max:pt,min:0,className:It,value:Ht,onChange:Yt,onBlur:mn})},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),ie=Y(3493),ge=Y(59301),he=Object.defineProperty,b=Object.defineProperties,S=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,mt=(Ct,at,pt)=>at in Ct?he(Ct,at,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Ct[at]=pt,Gt=(Ct,at)=>{for(var pt in at||(at={}))_e.call(at,pt)&&mt(Ct,pt,at[pt]);if(W)for(var pt of W(at))Je.call(at,pt)&&mt(Ct,pt,at[pt]);return Ct},Qt=(Ct,at)=>b(Ct,S(at)),on=(Ct,at,pt)=>new Promise((It,Ht)=>{var fn=ln=>{try{mn(pt.next(ln))}catch(yn){Ht(yn)}},Yt=ln=>{try{mn(pt.throw(ln))}catch(yn){Ht(yn)}},mn=ln=>ln.done?It(ln.value):Promise.resolve(ln.value).then(fn,Yt);mn((pt=pt.apply(Ct,at)).next())});const Zt=({shixunHomeworks:Ct,dispatch:at,classroomList:pt,gethomeworkreport:It,homeWorkReport:Ht})=>{var fn,Yt;const{shixunWorkReport:mn}=Ct,ln=(0,Ce.useParams)(),[yn,$n]=(0,te.useState)(!1),[dr,Xt]=(0,te.useState)(!1),[En,$e]=(0,te.useState)(""),[Pe]=Xe.default.useForm(),Fe=Xe.default.useWatch("comment",Pe),re=Xe.default.useWatch("hidden_comment",Pe),[ce,me]=(0,te.useState)(!1),Se=(0,te.useRef)({}),[Qe,Tt]=V.default.useModal(),Wt=()=>on(void 0,null,function*(){Xt(!0);const gn=Pe.getFieldsValue();(yield(0,y.ZP)(`/api/student_works/${ln.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:gn.hidden_comment,comment:gn.comment}})).status===0&&(o.ZP.success("\u70B9\u8BC4\u6210\u529F"),Pe.resetFields(),at({type:"classroomList/setActionTabs",payload:{}}),It()),Xt(!1)}),Ut=()=>on(void 0,null,function*(){if(!En){o.ZP.warning("\u8BF7\u586B\u5199\u5206\u6570");return}Xt(!0);const gn=Pe.getFieldsValue();(yield(0,y.ZP)(`/api/student_works/${ln.homeworkId}/add_score.json`,{method:"post",body:{comment:gn.comment,score:En}})).status===0&&(o.ZP.success("\u70B9\u8BC4\u6210\u529F"),at({type:"classroomList/setActionTabs",payload:{}}),It()),Xt(!1)}),vn=gn=>on(void 0,null,function*(){const{mes:Jt,setChatData:or,setTyping:mr}=gn,Ge=yield(0,y.ZP)("/api/intelligent_reviews/large_model_intelligent_qa.json",{method:"post",body:Gt({query:Jt,student_work_id:ln.homeworkId},Se.current)});Ge.answer=(Ge==null?void 0:Ge.status)==-3?Ge.message:Ge==null?void 0:Ge.answer,Ge!=null&&Ge.answer&&or(lr=>[...lr].map((ir,rr)=>rr===lr.length-1?Qt(Gt({},ir),{text:Ge==null?void 0:Ge.answer,loading:!1,response:Ge}):ir))}),jn=({chatData:gn,setChatData:Jt,setLoading:or,getData:mr,renderChatItems:Ge})=>{at({type:"shixunHomeworks/setActionTabs",payload:{key:"\u667A\u80FD\u8BC4\u9605\u914D\u7F6E",onOk:lr=>{Se.current=lr,me(!0),or(!0);const ir=Ge();ir[0].show=!1,Jt(ir),mr()}}})},ur=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:160,render:gn=>gn||"--"},{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:gn=>gn||"--"},{title:"\u5F97\u5206",dataIndex:"score",width:90,render:(gn,Jt)=>ge.createElement("div",null,ge.createElement("span",{style:{color:parseFloat(Jt.score_full)!==parseFloat(gn)?"#E30000":"#53C41B"}},gn),"/",Jt.score_full)},{title:"\u8C03\u5206",width:100,dataIndex:"action",render:(gn,Jt)=>(0,pe.GJ)()?ge.createElement(ne,{max:Jt.score_full,onBlur:or=>on(void 0,null,function*(){var mr;if((0,pe.Rm)()&&!((mr=pt.AssistantObject.practice)!=null&&mr.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 Ge=yield(0,y.ZP)(`/api/student_works/${ln.homeworkId}/adjust_score.json`,{method:"post",body:{score:or}});It(),Ge.status===0&&o.ZP.success("\u8C03\u5206\u6210\u529F")})}):Ht!=null&&Ht.is_anonymous?ge.createElement(Ee.Z,{min:0,value:En,onChange:or=>$e(or),max:Jt.score_full}):gn}].filter(gn=>Ht!=null&&Ht.is_anonymous?!["late_penalty","score","absence_penalty"].includes(gn.dataIndex):!0);return ge.createElement(ge.Fragment,null,ge.createElement(V.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",afterClose:()=>{Pe.resetFields(),$e("")},confirmLoading:dr,open:pt.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>on(void 0,null,function*(){var gn;if((0,pe.Rm)()&&!((gn=pt.AssistantObject.practice)!=null&&gn.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){Ut();return}const Jt=Pe.getFieldsValue();JSON.stringify(Jt)==="{}"||Jt.hidden_comment===""&&Jt.comment===""?$n(!0):Wt()}),onCancel:()=>{at({type:"classroomList/setActionTabs",payload:{}})}},ge.createElement(le.Z,{className:Q.info},ge.createElement(O.Z,null,ge.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u59D3\u540D"),ge.createElement("span",{className:Q.blackContent},Ht==null?void 0:Ht.username)),ge.createElement(O.Z,null,ge.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u5B66\u53F7"),ge.createElement("span",{className:Q.blackContent},(Ht==null?void 0:Ht.student_id)||"--")),!(Ht!=null&&Ht.is_anonymous)&&ge.createElement(ge.Fragment,null,ge.createElement(O.Z,null,ge.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u73ED\u7EA7"),ge.createElement("span",{className:Q.blackContent},(Ht==null?void 0:Ht.group_name)||"--")),ge.createElement(O.Z,null,ge.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u8865\u4EA4\u6263\u5206"),ge.createElement("span",{className:Q.orangeContent},((fn=Ht==null?void 0:Ht.stage_list[0])==null?void 0:fn.late_penalty)||"--")),ge.createElement(O.Z,null,ge.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u7F3A\u8BC4\u6263\u5206"),ge.createElement("span",{className:Q.orangeContent},((Yt=Ht==null?void 0:Ht.stage_list[0])==null?void 0:Yt.absence_penalty)||"--")),ge.createElement(O.Z,null,ge.createElement("span",{className:`${Q.label} ${Q.greyText}`},"\u603B\u6210\u7EE9"),ge.createElement("span",{className:Q.orangeContent},(Ht==null?void 0:Ht.stage_list[0].score)||"--")))),ge.createElement(Xe.default,{form:Pe,onChange:()=>{yn&&$n(!1)}},ge.createElement("div",{className:"w-full flex justify-between item-center"},ge.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"),ge.createElement("div",{className:"mb10"},ge.createElement(q.Z,{title:"\u667A\u80FD\u8BC4\u9605",visible:ce,onOpen:jn,onClose:()=>{me(!1)},loadingOption:{text:"AI\u8BC4\u9605\u4E2D..."},hideUpload:!0,showDefaultTips:!1,hideInputBox:!0,customRequest:vn,extraAnswerAction:gn=>{var Jt;return!gn.loading&&![-1,-3].includes((Jt=gn==null?void 0:gn.response)==null?void 0:Jt.status)&&ge.createElement("div",{className:Q.apply,onClick:()=>{const or=()=>{var mr,Ge,lr;Pe.setFieldsValue({comment:(mr=gn==null?void 0:gn.response)==null?void 0:mr.remarks,hidden_comment:(Ge=gn==null?void 0:gn.response)==null?void 0:Ge.remarks}),$e((lr=gn==null?void 0:gn.response)==null?void 0:lr.score),me(!1)};if(En||Fe||re){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:or});return}or()}},ge.createElement("i",{style:{color:"#3061D0"},className:"iconfont icon-yijianyingyong1 font12 mr5"}),"\u4E00\u952E\u5E94\u7528")}},ge.createElement(B.ZP,{icon:ge.createElement("img",{src:Y(11689)}),type:"link"},"\u667A\u80FD\u8BC4\u9605")))),ge.createElement(Xe.default.Item,{name:"comment"},ge.createElement(et.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),!(Ht!=null&&Ht.is_anonymous)&&ge.createElement(ge.Fragment,null,ge.createElement("div",{className:`${Q.inputLabel} ${Q.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),ge.createElement(Xe.default.Item,{name:"hidden_comment"},ge.createElement(et.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))," ")),yn&&ge.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),ge.createElement("div",{className:Q.tableTitle},"\u5173\u5361\u6210\u7EE9"),ge.createElement(ae.default,{className:Q.scoreTable,dataSource:Ht==null?void 0:Ht.stage_list,rowKey:"challenge_id",pagination:!1,columns:ur})),ge.createElement(ie.Z,null))};var Rt=(0,Ce.connect)(({shixunHomeworks:Ct,classroomList:at})=>({shixunHomeworks:Ct,classroomList:at}))(Zt),je={},ht=(Ct,at,pt)=>new Promise((It,Ht)=>{var fn=ln=>{try{mn(pt.next(ln))}catch(yn){Ht(yn)}},Yt=ln=>{try{mn(pt.throw(ln))}catch(yn){Ht(yn)}},mn=ln=>ln.done?It(ln.value):Promise.resolve(ln.value).then(fn,Yt);mn((pt=pt.apply(Ct,at)).next())});const At=({shixunHomeworks:Ct,dispatch:at,gethomeworkreport:pt,homeWorkReport:It})=>{var Ht,fn;const{shixunWorkReport:Yt}=Ct;console.log(It,"homeWorkReport");const mn=(0,Ce.useParams)(),[ln,yn]=(0,te.useState)(!1),[$n]=Xe.default.useForm(),{user_name:dr,score:Xt,comment_time:En,content:$e,score_id:Pe,user_id:Fe}=((fn=(Ht=Ct==null?void 0:Ct.actionTabs)==null?void 0:Ht.selectArrs)==null?void 0:fn.data)||{},re=()=>ht(void 0,null,function*(){yield $n.validateFields(),yn(!0);const ce=$n.getFieldsValue();(yield(0,y.ZP)(`/api/student_works/${mn.homeworkId}/appeal_anonymous_score.json`,{method:"post",body:{comment:ce.comment,score_id:Pe,userId:Fe}})).status===0&&(o.ZP.success("\u64CD\u4F5C\u6210\u529F"),at({type:"shixunHomeworks/setActionTabs",payload:{}}),pt()),yn(!1)});return te.createElement(V.default,{centered:!0,width:600,title:"\u533F\u8BC4\u7533\u8BC9",afterClose:()=>{$n.resetFields()},confirmLoading:ln,open:Ct.actionTabs.key==="\u533F\u8BC4\u7533\u8BC9",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:re,onCancel:()=>{at({type:"shixunHomeworks/setActionTabs",payload:{}})}},te.createElement("div",{className:"p20",style:{background:"#F7F8F9",padding:15,marginBottom:20}},te.createElement(le.Z,{justify:"space-between",className:je.info},te.createElement("span",null,te.createElement("span",{className:"c-grey-666"},dr),te.createElement("span",{className:"c-grey-333 ml5"},"\u8C03\u5206\u4E3A"),te.createElement("span",{className:"c-orange ml5"},Xt,"\u5206")),te.createElement("span",{className:"c-grey-333"},En)),te.createElement("div",{className:"c-grey-333 mt5"},$e)),te.createElement(Xe.default,{form:$n,className:"mt15",layout:"vertical"},te.createElement(Xe.default.Item,{name:"comment",label:"\u7533\u8BC9",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0"}]},te.createElement(et.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0",rows:3}))))};var ct=(0,Ce.connect)(({shixunHomeworks:Ct})=>({shixunHomeworks:Ct}))(At),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),$=Object.defineProperty,fe=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ot=(Ct,at,pt)=>at in Ct?$(Ct,at,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Ct[at]=pt,ft=(Ct,at)=>{for(var pt in at||(at={}))Me.call(at,pt)&&ot(Ct,pt,at[pt]);if(fe)for(var pt of fe(at))We.call(at,pt)&&ot(Ct,pt,at[pt]);return Ct},jt=(Ct,at)=>{var pt={};for(var It in Ct)Me.call(Ct,It)&&at.indexOf(It)<0&&(pt[It]=Ct[It]);if(Ct!=null&&fe)for(var It of fe(Ct))at.indexOf(It)<0&&We.call(Ct,It)&&(pt[It]=Ct[It]);return pt},_t=(Ct,at,pt)=>new Promise((It,Ht)=>{var fn=ln=>{try{mn(pt.next(ln))}catch(yn){Ht(yn)}},Yt=ln=>{try{mn(pt.throw(ln))}catch(yn){Ht(yn)}},mn=ln=>ln.done?It(ln.value):Promise.resolve(ln.value).then(fn,Yt);mn((pt=pt.apply(Ct,at)).next())});const Lt=Ct=>{var at=Ct,{shixunHomeworks:pt,classroomList:It,globalSetting:Ht,loading:fn,user:Yt,dispatch:mn}=at,ln=jt(at,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),yn,$n,dr,Xt,En,$e,Pe;const[Fe,re]=(0,te.useState)(ft({},(0,Ce.useParams)())),ce=(0,Ce.useParams)(),me=(0,Ce.useLocation)(),[]=(0,te.useState)([]),[Se,Qe]=(0,te.useState)({last:!1}),[Tt,Wt]=(0,te.useState)({last:!1}),Ut=(0,te.useRef)(),vn=(0,te.useRef)(),[jn,ur]=(0,te.useState)(!1),[gn,Jt]=(0,te.useState)(!1),[or,mr]=(0,te.useState)(!1),[Ge,lr]=(0,te.useState)(),[ir,rr]=(0,te.useState)(),[Jr,Sr]=(0,te.useState)(!0),[li,Gr]=(0,te.useState)(),bi=(0,pe.GJ)(),[si,vi]=(0,te.useState)(new(ee())),[Xi,Fr]=(0,te.useState)(0),[xr,Nr]=(0,te.useState)([]),[Hi,ai]=(0,te.useState)(!1),[Ki,gr]=(0,te.useState)(!1),[Gn,nn]=(0,te.useState)(""),[ze,gt]=(0,te.useState)(!1),[Nt,yt]=(0,te.useState)(!0),[Kt,xt]=(0,te.useState)(0),[St]=(0,Ce.useSearchParams)(),qt=()=>_t(void 0,null,function*(){(Yt.userInfo.is_teacher||Yt.userInfo.admin)&&(gt(!0),yt(!1))});(0,te.useEffect)(()=>{qt(),console.log("\u6253\u5370\u7684------",Ge),console.log(pt),nn(Ge==null?void 0:Ge.repeat_minus_score)},[Ge,Yt]),(0,te.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",Ge==null?void 0:Ge.work_score),xt(Ge==null?void 0:Ge.work_score)},[Ge==null?void 0:Ge.work_score,Gn]),(0,te.useEffect)(()=>(mn({type:"globalSetting/footerToggle",payload:!1}),()=>{mn({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,te.useEffect)(()=>{var Le;if(Ge){let rt=[];(Le=Ge==null?void 0:Ge.target_test_sets)==null||Le.map((Ot,rn)=>{var un;(un=Ot==null?void 0:Ot.targets)==null||un.map((en,an)=>{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=an===0?(An=Ot==null?void 0:Ot.targets)==null?void 0:An.length:0,en.order=rn+1,rt.push(en)})}),Gr(rt),mn({type:"classroomList/getAssistantPermissions",payload:{course_id:Fe.coursesId}})}},[Ge]),(0,te.useEffect)(()=>{pt.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&xr.length>0&&Ge!=null&&Ge.course_name&&Sn("all")},[Ge==null?void 0:Ge.course_name]),(0,te.useEffect)(()=>{console.log(ce),re(ft({},ce))},[me.pathname]);const _n=()=>{document.body.scrollIntoView()};function xn(){return _t(this,null,function*(){var Le,rt,Ot,rn;const un=JSON.parse(localStorage.all_student_works_param||"{}"),en=yield mn({type:"shixunHomeworks/getAllStudentWorks",payload:ft(ft({},Fe),un)});Nr(en.all_student_works);const an=(Le=en.all_student_works)==null?void 0:Le.map(An=>String(An.student_work_id)).indexOf(Fe.homeworkId);an===((rt=en.all_student_works)==null?void 0:rt.length)-1?Qe({last:!0}):Qe((Ot=en.all_student_works)==null?void 0:Ot[an+1]),Wt(an===0?{last:!0}:(rn=en.all_student_works)==null?void 0:rn[an-1])})}const sr=()=>{document.querySelectorAll("canvas").forEach(Le=>{(!Le.clientWidth||!Le.clientHeight)&&Le.remove()})},Sn=Le=>_t(void 0,null,function*(){let rt=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"},rt+1),"/",Le!=="all"?1:xr==null?void 0:xr.length,k.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:Re.modal,onOk:()=>{}});const rn={margin:[0,0],filename:`${Ge==null?void 0:Ge.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}};function un(){return _t(this,null,function*(){_n(),rt++,setTimeout(()=>_t(this,null,function*(){var an;sr();const An=si.folder(`${(an=Ge==null?void 0:Ge.stage_list[0])==null?void 0:an.shixun_name}`),Kn=document.querySelector("#export-all").children;let Fn=X()();for(let hn=0;hn<Kn.length;hn++)yield Fn.set(rn).from(Kn[hn]).toContainer().toCanvas().toPdf().get("pdf").then(On=>_t(this,null,function*(){hn<Kn.length-1&&(yield On.addPage())}));An.file(`${xr[rt-1].student_work_user_name}.pdf`,Fn.output("blob")),Ot.update({content:k.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",k.createElement("span",{className:"c-blue"},rt),"/",xr==null?void 0:xr.length,k.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),rt==(xr==null?void 0:xr.length)?(Ot.destroy(),Xn()):en()}),2200)})}function en(){return _t(this,null,function*(){var an,An,Kn,Fn,hn;const On=yield(0,y.ZP)(`/api/student_works/${xr[rt].student_work_id}/jupyter_work_report.json`,{method:"get"});if((On==null?void 0:On.status)===0)if(lr(On.data),(An=(an=On==null?void 0:On.data)==null?void 0:an.shixun_detail[0])!=null&&An.myshixun_identifier){Sr(!0);const Ln=yield(0,y.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(Fn=(Kn=On==null?void 0:On.data)==null?void 0:Kn.shixun_detail[0])==null?void 0:Fn.myshixun_identifier,student_work_id:(hn=On==null?void 0:On.data)==null?void 0:hn.work_id}});Ln.status===0&&(rr(Ln.html_content),Sr(!1),ve(),un())}else un()})}if(Le!=="all"||(xr==null?void 0:xr.length)<2){sr(),_n();const an=vn.current.children;let An=X()();const Kn=si.folder(`${Ge==null?void 0:Ge.username}`);for(let Fn=0;Fn<an.length;Fn++)yield An.set(rn).from(an[Fn]).toContainer().toCanvas().toPdf().get("pdf").then(hn=>_t(void 0,null,function*(){Fn<an.length-1&&(yield hn.addPage())}));ur(!1),Kn.file(`${Ge==null?void 0:Ge.username}.pdf`,An.output("blob"),{base64:!1}),Ot.destroy(),Xn();return}else en()}),Xn=()=>{si.generateAsync({type:"blob"}).then(function(Le){const rt=document.createElement("a");rt.href=window.URL.createObjectURL(Le),rt.download=(Ge==null?void 0:Ge.course_name)+".zip",document.body.appendChild(rt);const Ot=document.createEvent("MouseEvents");Ot.initEvent("click",!1,!1),rt.dispatchEvent(Ot),document.body.removeChild(rt),vi(new(ee()))}),mr(!1)};(0,te.useEffect)(()=>{Ke()},[Fe.homeworkId]),(0,te.useEffect)(()=>{Ge!=null&&Ge.work_id&&((0,pe.GJ)()||Ge!=null&&Ge.is_anonymous)&&xn()},[Ge==null?void 0:Ge.work_id]),(0,te.useEffect)(()=>{console.log(Ge)},[Ge]);const M=()=>_t(void 0,null,function*(){const Le=yield(0,y.ZP)(`/api/student_works/${Fe.homeworkId}/jupyter_work_report.json`,{method:"get"});(Le==null?void 0:Le.status)===0&&lr(Le.data)}),N=()=>_t(void 0,null,function*(){var Le,rt,Ot,rn,un;const en=yield(0,y.ZP)(`/api/student_works/${Fe.homeworkId}/jupyter_work_report.json`,{method:"get"});if((en==null?void 0:en.status)===0&&(lr(en.data),(rt=(Le=en==null?void 0:en.data)==null?void 0:Le.shixun_detail[0])!=null&&rt.myshixun_identifier)){Sr(!0);const an=yield(0,y.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(rn=(Ot=en==null?void 0:en.data)==null?void 0:Ot.shixun_detail[0])==null?void 0:rn.myshixun_identifier,student_work_id:(un=en==null?void 0:en.data)==null?void 0:un.work_id}});if(an.status===0){rr(an.html_content),Sr(!1),de(an.html_content);return}}}),de=Le=>{var rt,Ot;(Ot=(rt=Le==null?void 0:Le.match)==null?void 0:rt.call(Le,/<script [^>]*src=['"]([^'"]+)[^>]*>/gi))==null||Ot.map(rn=>{const un=document.createElement("script");un.src=/<script [^>]*src=['"]([^'"]+)[^>]*>/gi.exec(rn)[1],document.body.appendChild(un)}),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=()=>_t(void 0,null,function*(){Jt(!0),N(),Jt(!1)}),tt=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0,render:(Le,rt,Ot)=>Le},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:Ge!=null&&Ge.is_anonymous?220:170,render:Le=>Le||"--"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",width:Ge!=null&&Ge.is_anonymous?140:90},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time",width:Ge!=null&&Ge.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,rt)=>k.createElement("div",null,k.createElement("span",{style:{color:parseFloat(rt.score_full)!==parseFloat(Le)?"red":"green"}},Le||0),"/",rt.score_full)},{title:"\u8C03\u5206",dataIndex:"action",width:110,render:(Le,rt)=>bi?k.createElement(ne,{max:rt.score_full,onBlur:Ot=>_t(void 0,null,function*(){var rn;if((0,pe.Rm)()&&!((rn=It.AssistantObject.practice)!=null&&rn.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 un=yield(0,y.ZP)(`/api/student_works/${Fe.homeworkId}/adjust_score.json`,{method:"post",body:{score:Ot}});M(),un.status===0&&o.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):Le}].filter(Le=>Ge!=null&&Ge.is_anonymous?!["late_penalty","absence_penalty","score","action"].includes(Le.dataIndex):!0),Et=Ge==null?void 0:Ge.comment_scores.map(Le=>{var rt,Ot,rn;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:()=>{mn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u533F\u8BC4\u7533\u8BC9",selectArrs:{data:ft({},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"},(rt=Le==null?void 0:Le.appeal_info)==null?void 0:rt.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},(rn=Le.appeal_info)==null?void 0:rn.content),k.createElement(O.Z,{style:{flexShrink:0,marginLeft:"auto"}},(Le==null?void 0:Le.appeal_status)===1&&(0,pe.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:()=>_t(void 0,null,function*(){const un=yield(0,y.ZP)(`/api/student_works/${Fe.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:Le.score_id,status:3}});(un==null?void 0:un.status)===0&&M()})})},className:"c-red current"},"\u63A5\u53D7\u7533\u8BC9"),(Le==null?void 0:Le.appeal_status)===1&&(0,pe.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:()=>_t(void 0,null,function*(){const un=yield(0,y.ZP)(`/api/student_works/${Fe.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:Le.score_id,status:4}});(un==null?void 0:un.status)===0&&M()})})},className:"c-light-black current ml10"},"\u62D2\u7EDD\u7533\u8BC9"))))))}}),bt=Le=>{rr(null),mn({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{Le==="next"?Ce.history.push(`/classrooms/${Fe.coursesId}/common_homework/${Fe.categoryId}/${Se==null?void 0:Se.student_work_id}/comment?page=${St.get("page")}`):Ce.history.push(`/classrooms/${Fe.coursesId}/common_homework/${Fe.categoryId}/${Tt==null?void 0:Tt.student_work_id}/comment?page=${St.get("page")}`)},200)},$t=Le=>{nn(""),Le.target.value&&(console.log("\u8FDB\u6765",Ge),Le.target.value=Le.target.value>(Ge==null?void 0:Ge.repeat_setting_score)?Ge==null?void 0:Ge.repeat_setting_score:Le.target.value,nn(Le.target.value))},Dt=()=>_t(void 0,null,function*(){const Le=yield(0,y.ZP)(`/api/student_works/${Ge==null?void 0:Ge.work_id}/update_repeat_score`,{method:"put",body:{score:Gn}});yield mn({type:"shixunHomeworks/gethomeWorkReport",payload:ft({},Fe)}),Le.status===0&&o.ZP.info("\u64CD\u4F5C\u6210\u529F")});return console.log(!!(Ge!=null&&Ge.category),Ge==null?void 0:Ge.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:gn,active:!0,avatar:{size:40},paragraph:{rows:5}},k.createElement("div",{className:"edu-container"},(Ge==null?void 0:Ge.course_id)&&k.createElement("section",{className:"animated fadeIn"},k.createElement("aside",{className:""},(Ge==null?void 0:Ge.category)&&k.createElement(F.Z,{separator:">"},k.createElement(F.Z.Item,null,k.createElement(Ce.Link,{to:`/classrooms/${Ge==null?void 0:Ge.course_id}/common_homework`},Ge==null?void 0:Ge.course_name)),k.createElement(F.Z.Item,null,k.createElement(Ce.Link,{to:`/classrooms/${Ge==null?void 0:Ge.course_id}/common_homework/${Ge!=null&&Ge.category.main?"":Ge==null?void 0:Ge.category.category_id}`},Ge==null?void 0:Ge.category.category_name)),k.createElement(F.Z.Item,null,k.createElement(Ce.Link,{to:`/classrooms/${Ge==null?void 0:Ge.course_id}/common_homework/${Ge==null?void 0:Ge.homework_common_id}/detail`},"\u4F5C\u4E1A\u8BE6\u60C5")),k.createElement(F.Z.Item,null,Ge==null?void 0:Ge.username))),k.createElement("aside",{className:[Re.title1,"mt20"].join(" ")},k.createElement(le.Z,{align:"middle"},k.createElement(O.Z,{flex:1},k.createElement(Ce.Link,{to:`/classrooms/${Ge==null?void 0:Ge.course_id}/common_homework/${Ge==null?void 0:Ge.homework_common_id}/detail?page=${St.get("page")}`},k.createElement(z.Z,{className:"font16 c-black"})),k.createElement("strong",{style:{fontWeight:700},className:"font20 ml5"},Ge==null?void 0:Ge.shixun_name),k.createElement(Ue.VV,{status:Ge==null?void 0:Ge.homework_status})),k.createElement(O.Z,{className:Re.title1_right},!(Ge!=null&&Ge.is_anonymous)&&!!(Ge!=null&&Ge.work_status)&&k.createElement(B.ZP,null,k.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),k.createElement(Ce.Link,{className:"c-black",target:"_blank",to:`/tasks/${($n=(yn=Ge==null?void 0:Ge.shixun_detail)==null?void 0:yn[0])==null?void 0:$n.myshixun_identifier}/jupyter${(0,pe.GJ)()?"":`?homework_common_id=${ce.categoryId}`}`},(0,pe.GJ)()?"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD":"\u67E5\u770B\u5B9E\u8BAD")),(0,pe.GJ)()&&!((dr=Ge==null?void 0:Ge.homework_status)!=null&&dr.includes("\u5DF2\u622A\u6B62"))&&k.createElement(B.ZP,{className:"ml10",onClick:()=>_t(void 0,null,function*(){yield mn({type:"shixunHomeworks/setActionTabs",payload:{key:"redoShixunModal",homework_common_id:ce.categoryId,student_work_id:ce.homeworkId}})})},k.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),!(Ge!=null&&Ge.is_anonymous)&&k.createElement(B.ZP,{className:"ml10",onClick:()=>{var Le;if((0,pe.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}Sn("")},loading:jn},k.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,pe.GJ)()&&(xr==null?void 0:xr.length)>1&&k.createElement(B.ZP,{className:"ml10",onClick:()=>{var Le;if((0,pe.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}Sn("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:Ut},k.createElement("div",{id:"export-all",ref:vn},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=Ge==null?void 0:Ge.homework_status)!=null&&Xt.includes("\u5DF2\u622A\u6B62")&&(0,pe.dE)())&&((0,pe.GJ)()||(Ge==null?void 0:Ge.is_anonymous))&&k.createElement(B.ZP,{className:"mr20",type:"primary",onClick:()=>{mn({type:"classroomList/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Ge==null?void 0:Ge.user_id,data:ft({},Ge)}}})}},k.createElement(oe.Z,null),Ge!=null&&Ge.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/${Ge==null?void 0:Ge.image_url}`,alt:Ge==null?void 0:Ge.username})),k.createElement(O.Z,{className:"pt20"},k.createElement("span",{className:"font16 ml40"},Ge==null?void 0:Ge.username),k.createElement(Ue.Y,{status:Ge==null?void 0:Ge.work_status}),k.createElement("ul",{className:Re.userInfo},k.createElement("li",null,"\u5B66\u53F7\uFF1A",(Ge==null?void 0:Ge.student_id)||"--"),((0,pe.GJ)()||!(Ge!=null&&Ge.is_anonymous))&&k.createElement("li",null,"\u5206\u73ED\uFF1A",(Ge==null?void 0:Ge.group_name)||"--"),k.createElement("br",null)))),k.createElement("aside",{className:"pl30 pr30 mt30 mb10"},k.createElement(ae.default,{dataSource:Ge==null?void 0:Ge.stage_list,rowKey:Le=>Le==null?void 0:Le.challenge_id,pagination:!1,columns:tt})),((Ge==null?void 0:Ge.work_comment_hidden)||(Ge==null?void 0:Ge.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,pe.GJ)()&&k.createElement(B.ZP,{onClick:()=>_t(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 _t(this,null,function*(){(yield(0,v.gZ)({comment_id:Ge==null?void 0:Ge.comment_id,homeworkId:Fe.homeworkId})).status===0&&(o.ZP.success("\u5220\u9664\u6210\u529F"),M())})}})})},k.createElement(De.Z,null),"\u5220\u9664"))),(Ge==null?void 0:Ge.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:Ge==null?void 0:Ge.work_comment,className:"font14"})),(Ge==null?void 0:Ge.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:Ge==null?void 0:Ge.work_comment_hidden,className:"font14"}))),(Ge==null?void 0:Ge.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:Et}))),((En=Ge==null?void 0:Ge.shixun_detail[0])==null?void 0:En.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:($e=Ge==null?void 0:Ge.shixun_detail[0])==null?void 0:$e.path}," ",Ge==null?void 0:Ge.shixun_detail.map(Le=>k.createElement(Option,{value:Le.path},Le.path))," "))),k.createElement(K.Z,{spinning:Jr},k.createElement("div",{style:{width:"100%",minHeight:"550px",padding:"16px"},dangerouslySetInnerHTML:{__html:ir}})))))))),((0,pe.GJ)()||(Ge==null?void 0:Ge.is_anonymous))&&k.createElement("aside",{className:`${Re.footerBar} ${jn?Re.footerBarStatic:""}`},k.createElement("aside",{className:"edu-container"},k.createElement(le.Z,{align:"middle"},k.createElement(O.Z,{flex:"1"},k.createElement(Ce.Link,{className:Re.exitComment,to:`/classrooms/${Fe.coursesId}/common_homework/${Fe.categoryId}/detail?page=${St.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:()=>bt()},"\u4E0A\u4E00\u4E2A"),k.createElement(B.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:Se==null?void 0:Se.last,onClick:()=>bt("next")},"\u4E0B\u4E00\u4E2A"),!((Pe=Ge==null?void 0:Ge.homework_status)!=null&&Pe.includes("\u5DF2\u622A\u6B62")&&(0,pe.dE)())&&((0,pe.GJ)()||(Ge==null?void 0:Ge.is_anonymous))&&k.createElement(B.ZP,{type:"primary",onClick:()=>_t(void 0,null,function*(){mn({type:"classroomList/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Ge==null?void 0:Ge.user_id,data:ft({},Ge)}}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),k.createElement(ct,{gethomeworkreport:M,homeWorkReport:Ge}),k.createElement(Rt,{gethomeworkreport:M,homeWorkReport:Ge}),k.createElement(tn.Z,{getData:M}),k.createElement(V.default,{open:Hi,width:860,centered:!0,onCancel:()=>{ai(!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:()=>{gr(!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 vt=(0,Ce.connect)(({shixunHomeworks:Ct,classroomList:at,loading:pt,globalSetting:It,user:Ht})=>({shixunHomeworks:Ct,classroomList:at,globalSetting:It,loading:pt.effects,user:Ht}))(Lt)},82572:function(Un,Ft,Y){"use strict";var te=Y(62957),Te=Y(6767),He=Y(82093),be=Y(76560),ee=Y(34055),y=Y(59301),Ce=(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(te.default,{centered:!0,title:"\u63D0\u793A",open:o.actionTabs.key==="redoShixunModal",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Ce(void 0,null,function*(){var E;if((0,ee.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,be.connect)(({shixunHomeworks:o,classroomList:le})=>({shixunHomeworks:o,classroomList:le}))(V)},71114:function(Un,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return Xe}});var te=Y(59301),Te=Y(92310),He=Y.n(Te),be=Y(48755),ee=Y(83397),y=Y(36237),Ce=Y(63356),V=Y(16931),o=Y(51636);const le=Ee=>{const{componentCls:et,calc:ne}=Ee;return{[et]:Object.assign(Object.assign({},(0,Ce.Wf)(Ee)),{margin:0,padding:0,listStyle:"none",[`${et}-item`]:{position:"relative",margin:0,paddingBottom:Ee.itemPaddingBottom,fontSize:Ee.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:Ee.itemHeadSize,insetInlineStart:ne(ne(Ee.itemHeadSize).sub(Ee.tailWidth)).div(2).equal(),height:`calc(100% - ${(0,y.unit)(Ee.itemHeadSize)})`,borderInlineStart:`${(0,y.unit)(Ee.tailWidth)} ${Ee.lineType} ${Ee.tailColor}`},"&-pending":{[`${et}-item-head`]:{fontSize:Ee.fontSizeSM,backgroundColor:"transparent"},[`${et}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:Ee.itemHeadSize,height:Ee.itemHeadSize,backgroundColor:Ee.dotBg,border:`${(0,y.unit)(Ee.dotBorderWidth)} ${Ee.lineType} transparent`,borderRadius:"50%","&-blue":{color:Ee.colorPrimary,borderColor:Ee.colorPrimary},"&-red":{color:Ee.colorError,borderColor:Ee.colorError},"&-green":{color:Ee.colorSuccess,borderColor:Ee.colorSuccess},"&-gray":{color:Ee.colorTextDisabled,borderColor:Ee.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:ne(Ee.itemHeadSize).div(2).equal(),insetInlineStart:ne(Ee.itemHeadSize).div(2).equal(),width:"auto",height:"auto",marginBlockStart:0,paddingBlock:Ee.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:ne(ne(Ee.fontSize).mul(Ee.lineHeight).sub(Ee.fontSize)).mul(-1).add(Ee.lineWidth).equal(),marginInlineStart:ne(Ee.margin).add(Ee.itemHeadSize).equal(),marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${et}-item-tail`]:{display:"none"},[`> ${et}-item-content`]:{minHeight:ne(Ee.controlHeightLG).mul(1.2).equal()}}},[`&${et}-alternate,
|
|
&${et}-right,
|
|
&${et}-label`]:{[`${et}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:ne(Ee.marginXXS).mul(-1).equal(),"&-custom":{marginInlineStart:ne(Ee.tailWidth).div(2).equal()}},"&-left":{[`${et}-item-content`]:{insetInlineStart:`calc(50% - ${(0,y.unit)(Ee.marginXXS)})`,width:`calc(50% - ${(0,y.unit)(Ee.marginSM)})`,textAlign:"start"}},"&-right":{[`${et}-item-content`]:{width:`calc(50% - ${(0,y.unit)(Ee.marginSM)})`,margin:0,textAlign:"end"}}}},[`&${et}-right`]:{[`${et}-item-right`]:{[`${et}-item-tail,
|
|
${et}-item-head,
|
|
${et}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(0,y.unit)(ne(ne(Ee.itemHeadSize).add(Ee.tailWidth)).div(2).equal())})`},[`${et}-item-content`]:{width:`calc(100% - ${(0,y.unit)(ne(Ee.itemHeadSize).add(Ee.marginXS).equal())})`}}},[`&${et}-pending
|
|
${et}-item-last
|
|
${et}-item-tail`]:{display:"block",height:`calc(100% - ${(0,y.unit)(Ee.margin)})`,borderInlineStart:`${(0,y.unit)(Ee.tailWidth)} dotted ${Ee.tailColor}`},[`&${et}-reverse
|
|
${et}-item-last
|
|
${et}-item-tail`]:{display:"none"},[`&${et}-reverse ${et}-item-pending`]:{[`${et}-item-tail`]:{insetBlockStart:Ee.margin,display:"block",height:`calc(100% - ${(0,y.unit)(Ee.margin)})`,borderInlineStart:`${(0,y.unit)(Ee.tailWidth)} dotted ${Ee.tailColor}`},[`${et}-item-content`]:{minHeight:ne(Ee.controlHeightLG).mul(1.2).equal()}},[`&${et}-label`]:{[`${et}-item-label`]:{position:"absolute",insetBlockStart:ne(ne(Ee.fontSize).mul(Ee.lineHeight).sub(Ee.fontSize)).mul(-1).add(Ee.tailWidth).equal(),width:`calc(50% - ${(0,y.unit)(Ee.marginSM)})`,textAlign:"end"},[`${et}-item-right`]:{[`${et}-item-label`]:{insetInlineStart:`calc(50% + ${(0,y.unit)(Ee.marginSM)})`,width:`calc(50% - ${(0,y.unit)(Ee.marginSM)})`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${et}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},O=Ee=>({tailColor:Ee.colorSplit,tailWidth:Ee.lineWidthBold,dotBorderWidth:Ee.wireframe?Ee.lineWidthBold:Ee.lineWidth*3,dotBg:Ee.colorBgContainer,itemPaddingBottom:Ee.padding*1.25});var B=(0,V.I$)("Timeline",Ee=>{const et=(0,o.mergeToken)(Ee,{itemHeadSize:10,customHeadPaddingVertical:Ee.paddingXXS,paddingInlineEnd:2});return[le(et)]},O),E=function(Ee,et){var ne={};for(var Q in Ee)Object.prototype.hasOwnProperty.call(Ee,Q)&&et.indexOf(Q)<0&&(ne[Q]=Ee[Q]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,Q=Object.getOwnPropertySymbols(Ee);q<Q.length;q++)et.indexOf(Q[q])<0&&Object.prototype.propertyIsEnumerable.call(Ee,Q[q])&&(ne[Q[q]]=Ee[Q[q]]);return ne},L=Ee=>{var{prefixCls:et,className:ne,color:Q="blue",dot:q,pending:ie=!1,position:ge,label:he,children:b}=Ee,S=E(Ee,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:W}=te.useContext(be.E_),_e=W("timeline",et),Je=He()(`${_e}-item`,{[`${_e}-item-pending`]:ie},ne),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 te.createElement("li",Object.assign({},S,{className:Je}),he&&te.createElement("div",{className:`${_e}-item-label`},he),te.createElement("div",{className:`${_e}-item-tail`}),te.createElement("div",{className:Gt,style:{borderColor:mt,color:mt}},q),te.createElement("div",{className:`${_e}-item-content`},b))},ae=Y(3300),Z=Y(58617),J=function(Ee,et){var ne={};for(var Q in Ee)Object.prototype.hasOwnProperty.call(Ee,Q)&&et.indexOf(Q)<0&&(ne[Q]=Ee[Q]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,Q=Object.getOwnPropertySymbols(Ee);q<Q.length;q++)et.indexOf(Q[q])<0&&Object.prototype.propertyIsEnumerable.call(Ee,Q[q])&&(ne[Q[q]]=Ee[Q[q]]);return ne},z=Ee=>{var{prefixCls:et,className:ne,pending:Q=!1,children:q,items:ie,rootClassName:ge,reverse:he=!1,direction:b,hashId:S,pendingDot:W,mode:_e=""}=Ee,Je=J(Ee,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const mt=(At,ct)=>_e==="alternate"?At==="right"?`${et}-item-right`:At==="left"?`${et}-item-left`:ct%2===0?`${et}-item-left`:`${et}-item-right`:_e==="left"?`${et}-item-left`:_e==="right"?`${et}-item-right`:At==="right"?`${et}-item-right`:"",Gt=(0,ae.Z)(ie||[]),Qt=typeof Q=="boolean"?null:Q;Q&&Gt.push({pending:!!Q,dot:W||te.createElement(Z.Z,null),children:Qt}),he&&Gt.reverse();const on=Gt.length,Zt=`${et}-item-last`,Rt=Gt.filter(At=>!!At).map((At,ct)=>{var tn;const Re=ct===on-2?Zt:"",P=ct===on-1?Zt:"",{className:v}=At,T=J(At,["className"]);return te.createElement(L,Object.assign({},T,{className:He()([v,!he&&Q?Re:P,mt((tn=At==null?void 0:At.position)!==null&&tn!==void 0?tn:"",ct)]),key:(At==null?void 0:At.key)||ct}))}),je=Gt.some(At=>!!(At!=null&&At.label)),ht=He()(et,{[`${et}-pending`]:!!Q,[`${et}-reverse`]:!!he,[`${et}-${_e}`]:!!_e&&!je,[`${et}-label`]:je,[`${et}-rtl`]:b==="rtl"},ne,ge,S);return te.createElement("ul",Object.assign({},Je,{className:ht}),Rt)},oe=Y(11592);function Be(Ee,et){return Ee&&Array.isArray(Ee)?Ee:(0,oe.Z)(et).map(ne=>{var Q,q;return Object.assign({children:(q=(Q=ne==null?void 0:ne.props)===null||Q===void 0?void 0:Q.children)!==null&&q!==void 0?q:""},ne.props)})}var De=Be,ke=function(Ee,et){var ne={};for(var Q in Ee)Object.prototype.hasOwnProperty.call(Ee,Q)&&et.indexOf(Q)<0&&(ne[Q]=Ee[Q]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,Q=Object.getOwnPropertySymbols(Ee);q<Q.length;q++)et.indexOf(Q[q])<0&&Object.prototype.propertyIsEnumerable.call(Ee,Q[q])&&(ne[Q[q]]=Ee[Q[q]]);return ne};const pe=Ee=>{const{getPrefixCls:et,direction:ne,timeline:Q}=te.useContext(be.E_),{prefixCls:q,children:ie,items:ge,className:he,style:b}=Ee,S=ke(Ee,["prefixCls","children","items","className","style"]),W=et("timeline",q),_e=(0,ee.Z)(W),[Je,mt,Gt]=B(W,_e),Qt=De(ge,ie);return Je(te.createElement(z,Object.assign({},S,{className:He()(Q==null?void 0:Q.className,he,Gt,_e),style:Object.assign(Object.assign({},Q==null?void 0:Q.style),b),prefixCls:W,direction:ne,items:Qt,hashId:mt})))};pe.Item=L;var Ue=pe,Xe=Ue},86251:function(Un,Ft){"use strict";Ft.byteLength=Ce,Ft.toByteArray=o,Ft.fromByteArray=B;for(var Y=[],te=[],Te=typeof Uint8Array!="undefined"?Uint8Array:Array,He="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=0,ee=He.length;be<ee;++be)Y[be]=He[be],te[He.charCodeAt(be)]=be;te[45]=62,te[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 Ce(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)),K=0,z=Z>0?ae-4:ae,oe;for(oe=0;oe<z;oe+=4)F=te[E.charCodeAt(oe)]<<18|te[E.charCodeAt(oe+1)]<<12|te[E.charCodeAt(oe+2)]<<6|te[E.charCodeAt(oe+3)],J[K++]=F>>16&255,J[K++]=F>>8&255,J[K++]=F&255;return Z===2&&(F=te[E.charCodeAt(oe)]<<2|te[E.charCodeAt(oe+1)]>>4,J[K++]=F&255),Z===1&&(F=te[E.charCodeAt(oe)]<<10|te[E.charCodeAt(oe+1)]<<4|te[E.charCodeAt(oe+2)]>>2,J[K++]=F>>8&255,J[K++]=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,K=0,z=L-ae;K<z;K+=J)Z.push(O(E,K,K+J>z?z:K+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(Un,Ft,Y){"use strict";var te;var Te=Y(86251),He=Y(67467),be=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ft.lW=V,te=K,Ft.h2=50;var ee=2147483647;te=ee,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 Ce(P){if(P>ee)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(ct(P,ArrayBuffer)||P&&ct(P.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ct(P,SharedArrayBuffer)||P&&ct(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?Ce(P):v!==void 0?typeof T=="string"?Ce(P).fill(v,T):Ce(P).fill(v):Ce(P)}V.alloc=function(P,v,T){return O(P,v,T)};function B(P){return le(P),Ce(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=Ce(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=Ce(v),X=0;X<v;X+=1)T[X]=P[X]&255;return T}function L(P){if(ct(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=Ce(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)?Ce(0):F(P);if(P.type==="Buffer"&&Array.isArray(P.data))return F(P.data)}function J(P){if(P>=ee)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ee.toString(16)+" bytes");return P|0}function K(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(ct(v,Uint8Array)&&(v=V.from(v,v.offset,v.byteLength)),ct(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,$=0,fe=Math.min(X,k);$<fe;++$)if(v[$]!==T[$]){X=v[$],k=T[$];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),$=0;for(X=0;X<v.length;++X){var fe=v[X];if(ct(fe,Uint8Array))$+fe.length>k.length?V.from(fe).copy(k,$):Uint8Array.prototype.set.call(k,fe,$);else if(V.isBuffer(fe))fe.copy(k,$);else throw new TypeError('"list" argument must be an Array of Buffers');$+=fe.length}return k};function z(P,v){if(V.isBuffer(P))return P.length;if(ArrayBuffer.isView(P)||ct(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 Zt(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return ht(P).length;default:if(k)return X?-1:Zt(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 ge(this,v,T);case"latin1":case"binary":return he(this,v,T);case"base64":return ne(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+">"},be&&(V.prototype[be]=V.prototype.inspect),V.prototype.compare=function(v,T,X,k,$){if(ct(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),$===void 0&&($=this.length),T<0||X>v.length||k<0||$>this.length)throw new RangeError("out of range index");if(k>=$&&T>=X)return 0;if(k>=$)return-1;if(T>=X)return 1;if(T>>>=0,X>>>=0,k>>>=0,$>>>=0,this===v)return 0;for(var fe=$-k,Me=X-T,We=Math.min(fe,Me),ot=this.slice(k,$),ft=v.slice(T,X),jt=0;jt<We;++jt)if(ot[jt]!==ft[jt]){fe=ot[jt],Me=ft[jt];break}return fe<Me?-1:Me<fe?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 $=1,fe=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;$=2,fe/=2,Me/=2,T/=2}function We(Lt,vt){return $===1?Lt[vt]:Lt.readUInt16BE(vt*$)}var ot;if(k){var ft=-1;for(ot=T;ot<fe;ot++)if(We(P,ot)===We(v,ft===-1?0:ot-ft)){if(ft===-1&&(ft=ot),ot-ft+1===Me)return ft*$}else ft!==-1&&(ot-=ot-ft),ft=-1}else for(T+Me>fe&&(T=fe-Me),ot=T;ot>=0;ot--){for(var jt=!0,_t=0;_t<Me;_t++)if(We(P,ot+_t)!==We(v,_t)){jt=!1;break}if(jt)return ot}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 pe(P,v,T,X){T=Number(T)||0;var k=P.length-T;X?(X=Number(X),X>k&&(X=k)):X=k;var $=v.length;X>$/2&&(X=$/2);for(var fe=0;fe<X;++fe){var Me=parseInt(v.substr(fe*2,2),16);if(tn(Me))return fe;P[T+fe]=Me}return fe}function Ue(P,v,T,X){return At(Zt(v,P.length-T),P,T,X)}function Xe(P,v,T,X){return At(Rt(v),P,T,X)}function Ee(P,v,T,X){return At(ht(v),P,T,X)}function et(P,v,T,X){return At(je(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 $=this.length-T;if((X===void 0||X>$)&&(X=$),v.length>0&&(X<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");for(var fe=!1;;)switch(k){case"hex":return pe(this,v,T,X);case"utf8":case"utf-8":return Ue(this,v,T,X);case"ascii":case"latin1":case"binary":return Xe(this,v,T,X);case"base64":return Ee(this,v,T,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,v,T,X);default:if(fe)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),fe=!0}},V.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(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 $=P[k],fe=null,Me=$>239?4:$>223?3:$>191?2:1;if(k+Me<=T){var We,ot,ft,jt;switch(Me){case 1:$<128&&(fe=$);break;case 2:We=P[k+1],(We&192)===128&&(jt=($&31)<<6|We&63,jt>127&&(fe=jt));break;case 3:We=P[k+1],ot=P[k+2],(We&192)===128&&(ot&192)===128&&(jt=($&15)<<12|(We&63)<<6|ot&63,jt>2047&&(jt<55296||jt>57343)&&(fe=jt));break;case 4:We=P[k+1],ot=P[k+2],ft=P[k+3],(We&192)===128&&(ot&192)===128&&(ft&192)===128&&(jt=($&15)<<18|(We&63)<<12|(ot&63)<<6|ft&63,jt>65535&&jt<1114112&&(fe=jt))}}fe===null?(fe=65533,Me=1):fe>65535&&(fe-=65536,X.push(fe>>>10&1023|55296),fe=56320|fe&1023),X.push(fe),k+=Me}return ie(X)}var q=4096;function ie(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 ge(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 he(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="",$=v;$<T;++$)k+=Re[P[$]];return k}function S(P,v,T){for(var X=P.slice(v,T),k="",$=0;$<X.length-1;$+=2)k+=String.fromCharCode(X[$]+X[$+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],$=1,fe=0;++fe<T&&($*=256);)k+=this[v+fe]*$;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],$=1;T>0&&($*=256);)k+=this[v+--T]*$;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],$=1,fe=0;++fe<T&&($*=256);)k+=this[v+fe]*$;return $*=128,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,$=1,fe=this[v+--k];k>0&&($*=256);)fe+=this[v+--k]*$;return $*=128,fe>=$&&(fe-=Math.pow(2,8*T)),fe},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,$){if(!V.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>k||v<$)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 $=Math.pow(2,8*X)-1;_e(this,v,T,X,$,0)}var fe=1,Me=0;for(this[T]=v&255;++Me<X&&(fe*=256);)this[T+Me]=v/fe&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 $=Math.pow(2,8*X)-1;_e(this,v,T,X,$,0)}var fe=X-1,Me=1;for(this[T+fe]=v&255;--fe>=0&&(Me*=256);)this[T+fe]=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 $=Math.pow(2,8*X-1);_e(this,v,T,X,$-1,-$)}var fe=0,Me=1,We=0;for(this[T]=v&255;++fe<X&&(Me*=256);)v<0&&We===0&&this[T+fe-1]!==0&&(We=1),this[T+fe]=(v/Me>>0)-We&255;return T+X},V.prototype.writeIntBE=function(v,T,X,k){if(v=+v,T=T>>>0,!k){var $=Math.pow(2,8*X-1);_e(this,v,T,X,$-1,-$)}var fe=X-1,Me=1,We=0;for(this[T+fe]=v&255;--fe>=0&&(Me*=256);)v<0&&We===0&&this[T+fe+1]!==0&&(We=1),this[T+fe]=(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 Je(P,v,T,X,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||Je(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||Je(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-X;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(T,X,k):Uint8Array.prototype.set.call(v,this.subarray(X,k),T),$},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 $=v.charCodeAt(0);(k==="utf8"&&$<128||k==="latin1")&&(v=$)}}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 fe;if(typeof v=="number")for(fe=T;fe<X;++fe)this[fe]=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(fe=0;fe<X-T;++fe)this[fe+T]=Me[fe%We]}return this};var Qt=/[^+/0-9A-Za-z-_]/g;function on(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 Zt(P,v){v=v||1/0;for(var T,X=P.length,k=null,$=[],fe=0;fe<X;++fe){if(T=P.charCodeAt(fe),T>55295&&T<57344){if(!k){if(T>56319){(v-=3)>-1&&$.push(239,191,189);continue}else if(fe+1===X){(v-=3)>-1&&$.push(239,191,189);continue}k=T;continue}if(T<56320){(v-=3)>-1&&$.push(239,191,189),k=T;continue}T=(k-55296<<10|T-56320)+65536}else k&&(v-=3)>-1&&$.push(239,191,189);if(k=null,T<128){if((v-=1)<0)break;$.push(T)}else if(T<2048){if((v-=2)<0)break;$.push(T>>6|192,T&63|128)}else if(T<65536){if((v-=3)<0)break;$.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((v-=4)<0)break;$.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return $}function Rt(P){for(var v=[],T=0;T<P.length;++T)v.push(P.charCodeAt(T)&255);return v}function je(P,v){for(var T,X,k,$=[],fe=0;fe<P.length&&!((v-=2)<0);++fe)T=P.charCodeAt(fe),X=T>>8,k=T%256,$.push(k),$.push(X);return $}function ht(P){return Te.toByteArray(on(P))}function At(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 ct(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 Un,Ft,Y,te=!1,Te,He;window.PR_SHOULD_USE_CONTINUATION=!0;var be,ee;(function(){var y=window,Ce=["break,continue,do,else,for,if,return,while"],V=[Ce,"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=[Ce,"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=[Ce,"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=[Ce,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=[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",pe="lit",Ue="pun",Xe="pln",Ee="tag",et="dec",ne="src",Q="atn",q="atv",ie="nocode",ge="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function he(P){for(var v=0,T=!1,X=!1,k=0,$=P.length;k<$;++k){var fe=P[k];if(fe.ignoreCase)X=!0;else if(/[a-z]/i.test(fe.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(Lt){var vt=Lt.charCodeAt(0);if(vt!==92)return vt;var Ct=Lt.charAt(1);return vt=Me[Ct],vt||("0"<=Ct&&Ct<="7"?parseInt(Lt.substring(1),8):Ct==="u"||Ct==="x"?parseInt(Lt.substring(2),16):Lt.charCodeAt(1))}function ot(Lt){if(Lt<32)return(Lt<16?"\\x0":"\\x")+Lt.toString(16);var vt=String.fromCharCode(Lt);return vt==="\\"||vt==="-"||vt==="]"||vt==="^"?"\\"+vt:vt}function ft(Lt){var vt=Lt.substring(1,Lt.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")),Ct=[],at=vt[0]==="^",pt=["["];at&&pt.push("^");for(var It=at?1:0,Ht=vt.length;It<Ht;++It){var fn=vt[It];if(/\\[bdsw]/i.test(fn))pt.push(fn);else{var Yt=We(fn),mn;It+2<Ht&&vt[It+1]==="-"?(mn=We(vt[It+2]),It+=2):mn=Yt,Ct.push([Yt,mn]),mn<65||Yt>122||(mn<65||Yt>90||Ct.push([Math.max(65,Yt)|32,Math.min(mn,90)|32]),mn<97||Yt>122||Ct.push([Math.max(97,Yt)&-33,Math.min(mn,122)&-33]))}}Ct.sort(function(dr,Xt){return dr[0]-Xt[0]||Xt[1]-dr[1]});for(var ln=[],yn=[],It=0;It<Ct.length;++It){var $n=Ct[It];$n[0]<=yn[1]+1?yn[1]=Math.max(yn[1],$n[1]):ln.push(yn=$n)}for(var It=0;It<ln.length;++It){var $n=ln[It];pt.push(ot($n[0])),$n[1]>$n[0]&&($n[1]+1>$n[0]&&pt.push("-"),pt.push(ot($n[1])))}return pt.push("]"),pt.join("")}function jt(Lt){for(var vt=Lt.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")),Ct=vt.length,at=[],pt=0,It=0;pt<Ct;++pt){var Ht=vt[pt];if(Ht==="(")++It;else if(Ht.charAt(0)==="\\"){var fn=+Ht.substring(1);fn&&(fn<=It?at[fn]=-1:vt[pt]=ot(fn))}}for(var pt=1;pt<at.length;++pt)at[pt]===-1&&(at[pt]=++v);for(var pt=0,It=0;pt<Ct;++pt){var Ht=vt[pt];if(Ht==="(")++It,at[It]||(vt[pt]="(?:");else if(Ht.charAt(0)==="\\"){var fn=+Ht.substring(1);fn&&fn<=It&&(vt[pt]="\\"+at[fn])}}for(var pt=0;pt<Ct;++pt)vt[pt]==="^"&&vt[pt+1]!=="^"&&(vt[pt]="");if(Lt.ignoreCase&&T)for(var pt=0;pt<Ct;++pt){var Ht=vt[pt],Yt=Ht.charAt(0);Ht.length>=2&&Yt==="["?vt[pt]=ft(Ht):Yt!=="\\"&&(vt[pt]=Ht.replace(/[a-zA-Z]/g,function(yn){var $n=yn.charCodeAt(0);return"["+String.fromCharCode($n&-33,$n|32)+"]"}))}return vt.join("")}for(var _t=[],k=0,$=P.length;k<$;++k){var fe=P[k];if(fe.global||fe.multiline)throw new Error(""+fe);_t.push("(?:"+jt(fe)+")")}return new RegExp(_t.join("|"),X?"gi":"g")}function b(P,v){var T=/(?:^|\s)nocode(?:\s|$)/,X=[],k=0,$=[],fe=0;function Me(We){var ot=We.nodeType;if(ot==1){if(T.test(We.className))return;for(var ft=We.firstChild;ft;ft=ft.nextSibling)Me(ft);var jt=We.nodeName.toLowerCase();(jt==="br"||jt==="li")&&(X[fe]=`
|
|
`,$[fe<<1]=k++,$[fe++<<1|1]=We)}else if(ot==3||ot==4){var _t=We.nodeValue;_t.length&&(v?_t=_t.replace(/\r\n?/g,`
|
|
`):_t=_t.replace(/[ \t\r\n]+/g," "),X[fe]=_t,$[fe<<1]=k,k+=_t.length,$[fe++<<1|1]=We)}}return Me(P),{sourceCode:X.join("").replace(/\n$/,""),spans:$}}function S(P,v,T,X,k){if(T){var $={sourceNode:P,pre:1,langExtension:null,numberLines:null,sourceCode:T,spans:null,basePos:v,decorations:null};X($),k.push.apply(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 Je(P,v){var T={},X;(function(){for(var fe=P.concat(v),Me=[],We={},ot=0,ft=fe.length;ot<ft;++ot){var jt=fe[ot],_t=jt[3];if(_t)for(var Lt=_t.length;--Lt>=0;)T[_t.charAt(Lt)]=jt;var vt=jt[1],Ct=""+vt;We.hasOwnProperty(Ct)||(Me.push(vt),We[Ct]=null)}Me.push(/[\0-\uffff]/),X=he(Me)})();var k=v.length,$=function(fe){for(var Me=fe.sourceCode,We=fe.basePos,ot=fe.sourceNode,ft=[We,Xe],jt=0,_t=Me.match(X)||[],Lt={},vt=0,Ct=_t.length;vt<Ct;++vt){var at=_t[vt],pt=Lt[at],It=void 0,Ht;if(typeof pt=="string")Ht=!1;else{var fn=T[at.charAt(0)];if(fn)It=at.match(fn[1]),pt=fn[0];else{for(var Yt=0;Yt<k;++Yt)if(fn=v[Yt],It=at.match(fn[1]),It){pt=fn[0];break}It||(pt=Xe)}Ht=pt.length>=5&&pt.substring(0,5)==="lang-",Ht&&!(It&&typeof It[1]=="string")&&(Ht=!1,pt=ne),Ht||(Lt[at]=pt)}var mn=jt;if(jt+=at.length,!Ht)ft.push(We+mn,pt);else{var ln=It[1],yn=at.indexOf(ln),$n=yn+ln.length;It[2]&&($n=at.length-It[2].length,yn=$n-ln.length);var dr=pt.substring(5);S(ot,We+mn,at.substring(0,yn),$,ft),S(ot,We+mn+yn,ln,je(dr,ln),ft),S(ot,We+mn+$n,at.substring($n),$,ft)}}fe.decorations=ft};return $}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>1?"":`
|
|
\r`,fe=$?".":"[\\S\\s]",Me="/(?=[^/*"+$+"])(?:[^/\\x5B\\x5C"+$+"]|\\x5C"+fe+"|\\x5B(?:[^\\x5C\\x5D"+$+"]|\\x5C"+fe+")*(?:\\x5D|$))+/";T.push(["lang-regex",RegExp("^"+ge+"("+Me+")")])}var We=P.types;We&&T.push([ke,We]);var ot=(""+P.keywords).replace(/^ | $/g,"");ot.length&&T.push([Be,new RegExp("^(?:"+ot.replace(/[\s,]+/g,"|")+")\\b"),null]),v.push([Xe,/^\s+/,null,` \r
|
|
\xA0`]);var ft="^.[^\\s\\w.$@'\"`/\\\\]*";return P.regexLiterals&&(ft+="(?!s*/)"),T.push([pe,/^@[a-z_$][a-z_$@0-9]*/i,null],[ke,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Xe,/^[a-z_$][a-z_$@0-9]*/i,null],[pe,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Xe,/^\\[\s\S]?/,null],[Ue,new RegExp(ft),null]),Je(v,T)}var Gt=mt({keywords:K,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Qt(P,v,T){for(var X=/(?:^|\s)nocode(?:\s|$)/,k=/\r\n?|\n/,$=P.ownerDocument,fe=$.createElement("li");P.firstChild;)fe.appendChild(P.firstChild);var Me=[fe];function We(vt){var Ct=vt.nodeType;if(Ct==1&&!X.test(vt.className))if(vt.nodeName==="br")ot(vt),vt.parentNode&&vt.parentNode.removeChild(vt);else for(var at=vt.firstChild;at;at=at.nextSibling)We(at);else if((Ct==3||Ct==4)&&T){var pt=vt.nodeValue,It=pt.match(k);if(It){var Ht=pt.substring(0,It.index);vt.nodeValue=Ht;var fn=pt.substring(It.index+It[0].length);if(fn){var Yt=vt.parentNode;Yt.insertBefore($.createTextNode(fn),vt.nextSibling)}ot(vt),Ht||vt.parentNode.removeChild(vt)}}}function ot(vt){for(;!vt.nextSibling;)if(vt=vt.parentNode,!vt)return;function Ct(It,Ht){var fn=Ht?It.cloneNode(!1):It,Yt=It.parentNode;if(Yt){var mn=Ct(Yt,1),ln=It.nextSibling;mn.appendChild(fn);for(var yn=ln;yn;yn=ln)ln=yn.nextSibling,mn.appendChild(yn)}return fn}for(var at=Ct(vt.nextSibling,0),pt;(pt=at.parentNode)&&pt.nodeType===1;)at=pt;Me.push(at)}for(var ft=0;ft<Me.length;++ft)We(Me[ft]);v===(v|0)&&Me[0].setAttribute("value",v);var jt=$.createElement("ol");jt.className="linenums";for(var _t=Math.max(0,v-1|0)||0,ft=0,Lt=Me.length;ft<Lt;++ft)fe=Me[ft],fe.className="L"+(ft+_t)%10,fe.firstChild||fe.appendChild($.createTextNode("\xA0")),jt.appendChild(fe);P.appendChild(jt)}function on(P){var v=/\bMSIE\s(\d+)/.exec(navigator.userAgent);v=v&&+v[1]<=8;var T=/\n/g,X=P.sourceCode,k=X.length,$=0,fe=P.spans,Me=fe.length,We=0,ot=P.decorations,ft=ot.length,jt=0;ot[ft]=k;var _t,Lt;for(Lt=_t=0;Lt<ft;)ot[Lt]!==ot[Lt+2]?(ot[_t++]=ot[Lt++],ot[_t++]=ot[Lt++]):Lt+=2;for(ft=_t,Lt=_t=0;Lt<ft;){for(var vt=ot[Lt],Ct=ot[Lt+1],at=Lt+2;at+2<=ft&&ot[at+1]===Ct;)at+=2;ot[_t++]=vt,ot[_t++]=Ct,Lt=at}ft=ot.length=_t;var pt=P.sourceNode,It="";pt&&(It=pt.style.display,pt.style.display="none");try{for(var Ht=null;We<Me;){var fn=fe[We],Yt=fe[We+2]||k,mn=ot[jt+2]||k,at=Math.min(Yt,mn),ln=fe[We+1],yn;if(ln.nodeType!==1&&(yn=X.substring($,at))){v&&(yn=yn.replace(T,"\r")),ln.nodeValue=yn;var $n=ln.ownerDocument,dr=$n.createElement("span");dr.className=ot[jt+1];var Xt=ln.parentNode;Xt.replaceChild(dr,ln),dr.appendChild(ln),$<Yt&&(fe[We+1]=ln=$n.createTextNode(X.substring(at,Yt)),Xt.insertBefore(ln,dr.nextSibling))}$=at,$>=Yt&&(We+=2),$>=mn&&(jt+=2)}}finally{pt&&(pt.style.display=It)}}var Zt={};function Rt(P,v){for(var T=v.length;--T>=0;){var X=v[T];Zt.hasOwnProperty(X)?y.console&&console.warn("cannot override language handler %s",X):Zt[X]=P}}function je(P,v){return P&&Zt.hasOwnProperty(P)||(P=/^\s*</.test(v)?"default-markup":"default-code"),Zt[P]}Rt(Gt,["default-code"]),Rt(Je([],[[Xe,/^[^<?]+/],[et,/^<!\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"]),Rt(Je([[Xe,/^[\s]+/,null,` \r
|
|
`],[q,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Ee,/^^<\/?[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"]),Rt(Je([],[[q,/^[\s\S]+/]]),["uq.val"]),Rt(mt({keywords:le,hashComments:!0,cStyleComments:!0,types:z}),["c","cc","cpp","cxx","cyc","m"]),Rt(mt({keywords:"null,true,false"}),["json"]),Rt(mt({keywords:B,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:z}),["cs"]),Rt(mt({keywords:O,cStyleComments:!0}),["java"]),Rt(mt({keywords:J,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Rt(mt({keywords:ae,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Rt(mt({keywords:L,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Rt(mt({keywords:Z,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Rt(mt({keywords:F,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Rt(mt({keywords:E,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Rt(Je([],[[oe,/^[\s\S]+/]]),["regex"]);function ht(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,je(v,X)(P),on(P)}catch(k){y.console&&console.log(k&&k.stack||k)}}function At(P,v,T){var X=T||!1,k=v||null,$=document.createElement("div");$.innerHTML="<pre>"+P+"</pre>",$=$.firstChild,X&&Qt($,X,!0);var fe={langExtension:k,numberLines:X,sourceNode:$,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ht(fe),$.innerHTML}function ct(P,v){var T=v||document.body,X=T.ownerDocument||document;function k(fn){return T.getElementsByTagName(fn)}for(var $=[k("pre"),k("code"),k("xmp")],fe=[],Me=0;Me<$.length;++Me)for(var We=0,ot=$[Me].length;We<ot;++We)fe.push($[Me][We]);$=null;var ft=Date;ft.now||(ft={now:function(){return+new Date}});var jt=0,_t=/\blang(?:uage)?-([\w.]+)(?!\S)/,Lt=/\bprettyprint\b/,vt=/\bprettyprinted\b/,Ct=/pre|xmp/i,at=/^code$/i,pt=/^(?:pre|code|xmp)$/i,It={};function Ht(){for(var fn=y.PR_SHOULD_USE_CONTINUATION?ft.now()+250:1/0;jt<fe.length&&ft.now()<fn;jt++){for(var Yt=fe[jt],mn=It,ln=Yt;ln=ln.previousSibling;){var yn=ln.nodeType,$n=(yn===7||yn===8)&&ln.nodeValue;if($n?!/^\??prettify\b/.test($n):yn!==3||/\S/.test(ln.nodeValue))break;if($n){mn={},$n.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Wt,Ut,vn){mn[Ut]=vn});break}}var dr=Yt.className;if((mn!==It||Lt.test(dr))&&!vt.test(dr)){for(var Xt=!1,En=Yt.parentNode;En;En=En.parentNode){var $e=En.tagName;if(pt.test($e)&&En.className&&Lt.test(En.className)){Xt=!0;break}}if(!Xt){Yt.className+=" prettyprinted";var Pe=mn.lang;if(!Pe){Pe=dr.match(_t);var Fe;!Pe&&(Fe=_e(Yt))&&at.test(Fe.tagName)&&(Pe=Fe.className.match(_t)),Pe&&(Pe=Pe[1])}var re;if(Ct.test(Yt.tagName))re=1;else{var ce=Yt.currentStyle,me=X.defaultView,Se=ce?ce.whiteSpace:me&&me.getComputedStyle?me.getComputedStyle(Yt,null).getPropertyValue("white-space"):0;re=Se&&Se.substring(0,3)==="pre"}var Qe=mn.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,re);var Tt={langExtension:Pe,sourceNode:Yt,numberLines:Qe,pre:re,sourceCode:null,basePos:null,spans:null,decorations:null};ht(Tt)}}}jt<fe.length?y.setTimeout(Ht,250):typeof P=="function"&&P()}Ht()}var tn=y.PR={createSimpleLexer:Je,registerLangHandler:Rt,sourceDecorator:mt,PR_ATTRIB_NAME:Q,PR_ATTRIB_VALUE:q,PR_COMMENT:De,PR_DECLARATION:et,PR_KEYWORD:Be,PR_LITERAL:pe,PR_NOCODE:ie,PR_PLAIN:Xe,PR_PUNCTUATION:Ue,PR_SOURCE:ne,PR_STRING:oe,PR_TAG:Ee,PR_TYPE:ke,prettyPrintOne:te?y.prettyPrintOne=At:be=At,prettyPrint:ee=te?y.prettyPrint=ct:ee=ct},Re=y.define;typeof Re=="function"&&Re.amd&&Re("google-code-prettify",[],function(){return tn})})()},25769:function(Un,Ft,Y){"use strict";var te=Y(98040),Te={"text/plain":"Text","text/html":"Url",default:"Text"},He="Copy to clipboard: #{key}, Enter";function be(y){var Ce=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return y.replace(/#{\s*key\s*}/g,Ce)}function ee(y,Ce){var V,o,le,O,B,E,F=!1;Ce||(Ce={}),V=Ce.debug||!1;try{le=te(),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(),Ce.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[Ce.format]||Te.default;window.clipboardData.setData(Z,y)}else ae.clipboardData.clearData(),ae.clipboardData.setData(Ce.format,y);Ce.onCopy&&(ae.preventDefault(),Ce.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(Ce.format||"text",y),Ce.onCopy&&Ce.onCopy(window.clipboardData),F=!0}catch(Z){V&&console.error("unable to copy using clipboardData: ",Z),V&&console.error("falling back to prompt"),o=be("message"in Ce?Ce.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}Un.exports=ee},6341:function(Un,Ft,Y){"use strict";Y.d(Ft,{Jx:function(){return Ms}});function te(l,C="utf8"){return new TextDecoder(C).decode(l)}const Te=new TextEncoder;function He(l){return Te.encode(l)}const be=1024*8,ee=(()=>{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 Ce{constructor(C=be,m={}){di(this,"buffer");di(this,"byteLength");di(this,"byteOffset");di(this,"length");di(this,"offset");di(this,"lastWrittenByte");di(this,"littleEndian");di(this,"_data");di(this,"_mark");di(this,"_marks");let R=!1;typeof C=="number"?C=new ArrayBuffer(C):(R=!0,this.lastWrittenByte=C.byteLength);const j=m.offset?m.offset>>>0:0,Ae=C.byteLength-j;let Ze=j;(ArrayBuffer.isView(C)||C instanceof Ce)&&(C.byteLength!==C.buffer.byteLength&&(Ze=C.byteOffset+j),C=C.buffer),R?this.lastWrittenByte=Ae:this.lastWrittenByte=0,this.buffer=C,this.length=Ae,this.byteLength=Ae,this.byteOffset=Ze,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,Ze,Ae),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,m){const R=y[m].BYTES_PER_ELEMENT*C,j=this.byteOffset+this.offset,Ae=this.buffer.slice(j,j+R);if(this.littleEndian===ee&&m!=="uint8"&&m!=="int8"){const Ne=new Uint8Array(this.buffer.slice(j,j+R));Ne.reverse();const sn=new y[m](Ne.buffer);return this.offset+=R,sn.reverse(),sn}const Ze=new y[m](Ae);return this.offset+=R,Ze}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 m="";for(let R=0;R<C;R++)m+=this.readChar();return m}readUtf8(C=1){return te(this.readBytes(C))}decodeText(C=1,m="utf8"){return te(this.readBytes(C),m)}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 m=0;m<C.length;m++)this._data.setUint8(this.offset++,C[m]);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 m=0;m<C.length;m++)this.writeUint8(C.charCodeAt(m));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,K=256,z=K+1+J,oe=30,Be=19,De=2*z+1,ke=15,pe=16,Ue=7,Xe=256,Ee=16,et=17,ne=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]),ie=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ge=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),he=512,b=new Array((z+2)*2);B(b);const S=new Array(oe*2);B(S);const W=new Array(he);B(W);const _e=new Array(Z-ae+1);B(_e);const Je=new Array(J);B(Je);const mt=new Array(oe);B(mt);function Gt(l,C,m,R,j){this.static_tree=l,this.extra_bits=C,this.extra_base=m,this.elems=R,this.max_length=j,this.has_stree=l&&l.length}let Qt,on,Zt;function Rt(l,C){this.dyn_tree=l,this.max_code=0,this.stat_desc=C}const je=l=>l<256?W[l]:W[256+(l>>>7)],ht=(l,C)=>{l.pending_buf[l.pending++]=C&255,l.pending_buf[l.pending++]=C>>>8&255},At=(l,C,m)=>{l.bi_valid>pe-m?(l.bi_buf|=C<<l.bi_valid&65535,ht(l,l.bi_buf),l.bi_buf=C>>pe-l.bi_valid,l.bi_valid+=m-pe):(l.bi_buf|=C<<l.bi_valid&65535,l.bi_valid+=m)},ct=(l,C,m)=>{At(l,m[C*2],m[C*2+1])},tn=(l,C)=>{let m=0;do m|=l&1,l>>>=1,m<<=1;while(--C>0);return m>>>1},Re=l=>{l.bi_valid===16?(ht(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 m=C.dyn_tree,R=C.max_code,j=C.stat_desc.static_tree,Ae=C.stat_desc.has_stree,Ze=C.stat_desc.extra_bits,Ne=C.stat_desc.extra_base,sn=C.stat_desc.max_length;let Oe,nt,Pn,dn,zt,Vn,ui=0;for(dn=0;dn<=ke;dn++)l.bl_count[dn]=0;for(m[l.heap[l.heap_max]*2+1]=0,Oe=l.heap_max+1;Oe<De;Oe++)nt=l.heap[Oe],dn=m[m[nt*2+1]*2+1]+1,dn>sn&&(dn=sn,ui++),m[nt*2+1]=dn,!(nt>R)&&(l.bl_count[dn]++,zt=0,nt>=Ne&&(zt=Ze[nt-Ne]),Vn=m[nt*2],l.opt_len+=Vn*(dn+zt),Ae&&(l.static_len+=Vn*(j[nt*2+1]+zt)));if(ui!==0){do{for(dn=sn-1;l.bl_count[dn]===0;)dn--;l.bl_count[dn]--,l.bl_count[dn+1]+=2,l.bl_count[sn]--,ui-=2}while(ui>0);for(dn=sn;dn!==0;dn--)for(nt=l.bl_count[dn];nt!==0;)Pn=l.heap[--Oe],!(Pn>R)&&(m[Pn*2+1]!==dn&&(l.opt_len+=(dn-m[Pn*2+1])*m[Pn*2],m[Pn*2+1]=dn),nt--)}},v=(l,C,m)=>{const R=new Array(ke+1);let j=0,Ae,Ze;for(Ae=1;Ae<=ke;Ae++)j=j+m[Ae-1]<<1,R[Ae]=j;for(Ze=0;Ze<=C;Ze++){let Ne=l[Ze*2+1];Ne!==0&&(l[Ze*2]=tn(R[Ne]++,Ne))}},T=()=>{let l,C,m,R,j;const Ae=new Array(ke+1);for(m=0,R=0;R<J-1;R++)for(Je[R]=m,l=0;l<1<<Q[R];l++)_e[m++]=R;for(_e[m-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++)Ae[C]=0;for(l=0;l<=143;)b[l*2+1]=8,l++,Ae[8]++;for(;l<=255;)b[l*2+1]=9,l++,Ae[9]++;for(;l<=279;)b[l*2+1]=7,l++,Ae[7]++;for(;l<=287;)b[l*2+1]=8,l++,Ae[8]++;for(v(b,z+1,Ae),l=0;l<oe;l++)S[l*2+1]=5,S[l*2]=tn(l,5);Qt=new Gt(b,Q,K+1,z,ke),on=new Gt(S,q,0,oe,ke),Zt=new Gt(new Array(0),ie,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[Xe*2]=1,l.opt_len=l.static_len=0,l.sym_next=l.matches=0},k=l=>{l.bi_valid>8?ht(l,l.bi_buf):l.bi_valid>0&&(l.pending_buf[l.pending++]=l.bi_buf),l.bi_buf=0,l.bi_valid=0},$=(l,C,m,R)=>{const j=C*2,Ae=m*2;return l[j]<l[Ae]||l[j]===l[Ae]&&R[C]<=R[m]},fe=(l,C,m)=>{const R=l.heap[m];let j=m<<1;for(;j<=l.heap_len&&(j<l.heap_len&&$(C,l.heap[j+1],l.heap[j],l.depth)&&j++,!$(C,R,l.heap[j],l.depth));)l.heap[m]=l.heap[j],m=j,j<<=1;l.heap[m]=R},Me=(l,C,m)=>{let R,j,Ae=0,Ze,Ne;if(l.sym_next!==0)do R=l.pending_buf[l.sym_buf+Ae++]&255,R+=(l.pending_buf[l.sym_buf+Ae++]&255)<<8,j=l.pending_buf[l.sym_buf+Ae++],R===0?ct(l,j,C):(Ze=_e[j],ct(l,Ze+K+1,C),Ne=Q[Ze],Ne!==0&&(j-=Je[Ze],At(l,j,Ne)),R--,Ze=je(R),ct(l,Ze,m),Ne=q[Ze],Ne!==0&&(R-=mt[Ze],At(l,R,Ne)));while(Ae<l.sym_next);ct(l,Xe,C)},We=(l,C)=>{const m=C.dyn_tree,R=C.stat_desc.static_tree,j=C.stat_desc.has_stree,Ae=C.stat_desc.elems;let Ze,Ne,sn=-1,Oe;for(l.heap_len=0,l.heap_max=De,Ze=0;Ze<Ae;Ze++)m[Ze*2]!==0?(l.heap[++l.heap_len]=sn=Ze,l.depth[Ze]=0):m[Ze*2+1]=0;for(;l.heap_len<2;)Oe=l.heap[++l.heap_len]=sn<2?++sn:0,m[Oe*2]=1,l.depth[Oe]=0,l.opt_len--,j&&(l.static_len-=R[Oe*2+1]);for(C.max_code=sn,Ze=l.heap_len>>1;Ze>=1;Ze--)fe(l,m,Ze);Oe=Ae;do Ze=l.heap[1],l.heap[1]=l.heap[l.heap_len--],fe(l,m,1),Ne=l.heap[1],l.heap[--l.heap_max]=Ze,l.heap[--l.heap_max]=Ne,m[Oe*2]=m[Ze*2]+m[Ne*2],l.depth[Oe]=(l.depth[Ze]>=l.depth[Ne]?l.depth[Ze]:l.depth[Ne])+1,m[Ze*2+1]=m[Ne*2+1]=Oe,l.heap[1]=Oe++,fe(l,m,1);while(l.heap_len>=2);l.heap[--l.heap_max]=l.heap[1],P(l,C),v(m,sn,l.bl_count)},ot=(l,C,m)=>{let R,j=-1,Ae,Ze=C[0*2+1],Ne=0,sn=7,Oe=4;for(Ze===0&&(sn=138,Oe=3),C[(m+1)*2+1]=65535,R=0;R<=m;R++)Ae=Ze,Ze=C[(R+1)*2+1],!(++Ne<sn&&Ae===Ze)&&(Ne<Oe?l.bl_tree[Ae*2]+=Ne:Ae!==0?(Ae!==j&&l.bl_tree[Ae*2]++,l.bl_tree[Ee*2]++):Ne<=10?l.bl_tree[et*2]++:l.bl_tree[ne*2]++,Ne=0,j=Ae,Ze===0?(sn=138,Oe=3):Ae===Ze?(sn=6,Oe=3):(sn=7,Oe=4))},ft=(l,C,m)=>{let R,j=-1,Ae,Ze=C[0*2+1],Ne=0,sn=7,Oe=4;for(Ze===0&&(sn=138,Oe=3),R=0;R<=m;R++)if(Ae=Ze,Ze=C[(R+1)*2+1],!(++Ne<sn&&Ae===Ze)){if(Ne<Oe)do ct(l,Ae,l.bl_tree);while(--Ne!==0);else Ae!==0?(Ae!==j&&(ct(l,Ae,l.bl_tree),Ne--),ct(l,Ee,l.bl_tree),At(l,Ne-3,2)):Ne<=10?(ct(l,et,l.bl_tree),At(l,Ne-3,3)):(ct(l,ne,l.bl_tree),At(l,Ne-11,7));Ne=0,j=Ae,Ze===0?(sn=138,Oe=3):Ae===Ze?(sn=6,Oe=3):(sn=7,Oe=4)}},jt=l=>{let C;for(ot(l,l.dyn_ltree,l.l_desc.max_code),ot(l,l.dyn_dtree,l.d_desc.max_code),We(l,l.bl_desc),C=Be-1;C>=3&&l.bl_tree[ge[C]*2+1]===0;C--);return l.opt_len+=3*(C+1)+5+5+4,C},_t=(l,C,m,R)=>{let j;for(At(l,C-257,5),At(l,m-1,5),At(l,R-4,4),j=0;j<R;j++)At(l,l.bl_tree[ge[j]*2+1],3);ft(l,l.dyn_ltree,C-1),ft(l,l.dyn_dtree,m-1)},Lt=l=>{let C=4093624447,m;for(m=0;m<=31;m++,C>>>=1)if(C&1&&l.dyn_ltree[m*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(m=32;m<K;m++)if(l.dyn_ltree[m*2]!==0)return le;return o};let vt=!1;const Ct=l=>{vt||(T(),vt=!0),l.l_desc=new Rt(l.dyn_ltree,Qt),l.d_desc=new Rt(l.dyn_dtree,on),l.bl_desc=new Rt(l.bl_tree,Zt),l.bi_buf=0,l.bi_valid=0,X(l)},at=(l,C,m,R)=>{At(l,(E<<1)+(R?1:0),3),k(l),ht(l,m),ht(l,~m),m&&l.pending_buf.set(l.window.subarray(C,C+m),l.pending),l.pending+=m},pt=l=>{At(l,F<<1,3),ct(l,Xe,b),Re(l)},It=(l,C,m,R)=>{let j,Ae,Ze=0;l.level>0?(l.strm.data_type===O&&(l.strm.data_type=Lt(l)),We(l,l.l_desc),We(l,l.d_desc),Ze=jt(l),j=l.opt_len+3+7>>>3,Ae=l.static_len+3+7>>>3,Ae<=j&&(j=Ae)):j=Ae=m+5,m+4<=j&&C!==-1?at(l,C,m,R):l.strategy===V||Ae===j?(At(l,(F<<1)+(R?1:0),3),Me(l,b,S)):(At(l,(L<<1)+(R?1:0),3),_t(l,l.l_desc.max_code+1,l.d_desc.max_code+1,Ze+1),Me(l,l.dyn_ltree,l.dyn_dtree)),X(l),R&&k(l)},Ht=(l,C,m)=>(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++]=m,C===0?l.dyn_ltree[m*2]++:(l.matches++,C--,l.dyn_ltree[(_e[m]+K+1)*2]++,l.dyn_dtree[je(C)*2]++),l.sym_next===l.sym_end);var fn=Ct,Yt=at,mn=It,ln=Ht,yn=pt,$n={_tr_init:fn,_tr_stored_block:Yt,_tr_flush_block:mn,_tr_tally:ln,_tr_align:yn},Xt=(l,C,m,R)=>{let j=l&65535|0,Ae=l>>>16&65535|0,Ze=0;for(;m!==0;){Ze=m>2e3?2e3:m,m-=Ze;do j=j+C[R++]|0,Ae=Ae+j|0;while(--Ze);j%=65521,Ae%=65521}return j|Ae<<16|0};const En=()=>{let l,C=[];for(var m=0;m<256;m++){l=m;for(var R=0;R<8;R++)l=l&1?3988292384^l>>>1:l>>>1;C[m]=l}return C},$e=new Uint32Array(En());var Fe=(l,C,m,R)=>{const j=$e,Ae=R+m;l^=-1;for(let Ze=R;Ze<Ae;Ze++)l=l>>>8^j[(l^C[Ze])&255];return l^-1},re={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"},ce={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:Se,_tr_flush_block:Qe,_tr_tally:Tt,_tr_align:Wt}=$n,{Z_NO_FLUSH:Ut,Z_PARTIAL_FLUSH:vn,Z_FULL_FLUSH:jn,Z_FINISH:ur,Z_BLOCK:gn,Z_OK:Jt,Z_STREAM_END:or,Z_STREAM_ERROR:mr,Z_DATA_ERROR:Ge,Z_BUF_ERROR:lr,Z_DEFAULT_COMPRESSION:ir,Z_FILTERED:rr,Z_HUFFMAN_ONLY:Jr,Z_RLE:Sr,Z_FIXED:li,Z_DEFAULT_STRATEGY:Gr,Z_UNKNOWN:bi,Z_DEFLATED:si}=ce,vi=9,Xi=15,Fr=8,Hi=256+1+29,ai=30,Ki=19,gr=2*Hi+1,Gn=15,nn=3,ze=258,gt=ze+nn+1,Nt=32,yt=42,Kt=57,xt=69,St=73,qt=91,_n=103,xn=113,sr=666,Sn=1,Xn=2,M=3,N=4,de=3,ve=(l,C)=>(l.msg=re[C],C),Ke=l=>l*2-(l>4?9:0),tt=l=>{let C=l.length;for(;--C>=0;)l[C]=0},Et=l=>{let C,m,R,j=l.w_size;C=l.hash_size,R=C;do m=l.head[--R],l.head[R]=m>=j?m-j:0;while(--C);C=j,R=C;do m=l.prev[--R],l.prev[R]=m>=j?m-j:0;while(--C)};let $t=(l,C,m)=>(C<<l.hash_shift^m)&l.hash_mask;const Dt=l=>{const C=l.state;let m=C.pending;m>l.avail_out&&(m=l.avail_out),m!==0&&(l.output.set(C.pending_buf.subarray(C.pending_out,C.pending_out+m),l.next_out),l.next_out+=m,C.pending_out+=m,l.total_out+=m,l.avail_out-=m,C.pending-=m,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,Dt(l.strm)},rt=(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},rn=(l,C,m,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),m),l.state.wrap===1?l.adler=Xt(l.adler,C,j,m):l.state.wrap===2&&(l.adler=Fe(l.adler,C,j,m)),l.next_in+=j,l.total_in+=j,j)},un=(l,C)=>{let m=l.max_chain_length,R=l.strstart,j,Ae,Ze=l.prev_length,Ne=l.nice_match;const sn=l.strstart>l.w_size-gt?l.strstart-(l.w_size-gt):0,Oe=l.window,nt=l.w_mask,Pn=l.prev,dn=l.strstart+ze;let zt=Oe[R+Ze-1],Vn=Oe[R+Ze];l.prev_length>=l.good_match&&(m>>=2),Ne>l.lookahead&&(Ne=l.lookahead);do if(j=C,!(Oe[j+Ze]!==Vn||Oe[j+Ze-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<dn);if(Ae=ze-(dn-R),R=dn-ze,Ae>Ze){if(l.match_start=C,Ze=Ae,Ae>=Ne)break;zt=Oe[R+Ze-1],Vn=Oe[R+Ze]}}while((C=Pn[C&nt])>sn&&--m!==0);return Ze<=l.lookahead?Ze:l.lookahead},en=l=>{const C=l.w_size;let m,R,j;do{if(R=l.window_size-l.lookahead-l.strstart,l.strstart>=C+(C-gt)&&(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),Et(l),R+=C),l.strm.avail_in===0)break;if(m=rn(l.strm,l.window,l.strstart+l.lookahead,R),l.lookahead+=m,l.lookahead+l.insert>=nn)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+nn-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<nn)););}while(l.lookahead<gt&&l.strm.avail_in!==0)},an=(l,C)=>{let m=l.pending_buf_size-5>l.w_size?l.w_size:l.pending_buf_size-5,R,j,Ae,Ze=0,Ne=l.strm.avail_in;do{if(R=65535,Ae=l.bi_valid+42>>3,l.strm.avail_out<Ae||(Ae=l.strm.avail_out-Ae,j=l.strstart-l.block_start,R>j+l.strm.avail_in&&(R=j+l.strm.avail_in),R>Ae&&(R=Ae),R<m&&(R===0&&C!==ur||C===Ut||R!==j+l.strm.avail_in)))break;Ze=C===ur&&R===j+l.strm.avail_in?1:0,Se(l,0,0,Ze),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,Dt(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&&(rn(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(Ze===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),Ze?N:C!==Ut&&C!==ur&&l.strm.avail_in===0&&l.strstart===l.block_start?Xn:(Ae=l.window_size-l.strstart,l.strm.avail_in>Ae&&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++,Ae+=l.w_size,l.insert>l.strstart&&(l.insert=l.strstart)),Ae>l.strm.avail_in&&(Ae=l.strm.avail_in),Ae&&(rn(l.strm,l.window,l.strstart,Ae),l.strstart+=Ae,l.insert+=Ae>l.w_size-l.insert?l.w_size-l.insert:Ae),l.high_water<l.strstart&&(l.high_water=l.strstart),Ae=l.bi_valid+42>>3,Ae=l.pending_buf_size-Ae>65535?65535:l.pending_buf_size-Ae,m=Ae>l.w_size?l.w_size:Ae,j=l.strstart-l.block_start,(j>=m||(j||C===ur)&&C!==Ut&&l.strm.avail_in===0&&j<=Ae)&&(R=j>Ae?Ae:j,Ze=C===ur&&l.strm.avail_in===0&&R===j?1:0,Se(l,l.block_start,R,Ze),l.block_start+=R,Dt(l.strm)),Ze?M:Sn)},An=(l,C)=>{let m,R;for(;;){if(l.lookahead<gt){if(en(l),l.lookahead<gt&&C===Ut)return Sn;if(l.lookahead===0)break}if(m=0,l.lookahead>=nn&&(l.ins_h=$t(l,l.ins_h,l.window[l.strstart+nn-1]),m=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart),m!==0&&l.strstart-m<=l.w_size-gt&&(l.match_length=un(l,m)),l.match_length>=nn)if(R=Tt(l,l.strstart-l.match_start,l.match_length-nn),l.lookahead-=l.match_length,l.match_length<=l.max_lazy_match&&l.lookahead>=nn){l.match_length--;do l.strstart++,l.ins_h=$t(l,l.ins_h,l.window[l.strstart+nn-1]),m=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 Sn}return l.insert=l.strstart<nn-1?l.strstart:nn-1,C===ur?(Le(l,!0),l.strm.avail_out===0?M:N):l.sym_next&&(Le(l,!1),l.strm.avail_out===0)?Sn:Xn},Kn=(l,C)=>{let m,R,j;for(;;){if(l.lookahead<gt){if(en(l),l.lookahead<gt&&C===Ut)return Sn;if(l.lookahead===0)break}if(m=0,l.lookahead>=nn&&(l.ins_h=$t(l,l.ins_h,l.window[l.strstart+nn-1]),m=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=nn-1,m!==0&&l.prev_length<l.max_lazy_match&&l.strstart-m<=l.w_size-gt&&(l.match_length=un(l,m),l.match_length<=5&&(l.strategy===rr||l.match_length===nn&&l.strstart-l.match_start>4096)&&(l.match_length=nn-1)),l.prev_length>=nn&&l.match_length<=l.prev_length){j=l.strstart+l.lookahead-nn,R=Tt(l,l.strstart-1-l.prev_match,l.prev_length-nn),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+nn-1]),m=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=nn-1,l.strstart++,R&&(Le(l,!1),l.strm.avail_out===0))return Sn}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 Sn}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<nn-1?l.strstart:nn-1,C===ur?(Le(l,!0),l.strm.avail_out===0?M:N):l.sym_next&&(Le(l,!1),l.strm.avail_out===0)?Sn:Xn},Fn=(l,C)=>{let m,R,j,Ae;const Ze=l.window;for(;;){if(l.lookahead<=ze){if(en(l),l.lookahead<=ze&&C===Ut)return Sn;if(l.lookahead===0)break}if(l.match_length=0,l.lookahead>=nn&&l.strstart>0&&(j=l.strstart-1,R=Ze[j],R===Ze[++j]&&R===Ze[++j]&&R===Ze[++j])){Ae=l.strstart+ze;do;while(R===Ze[++j]&&R===Ze[++j]&&R===Ze[++j]&&R===Ze[++j]&&R===Ze[++j]&&R===Ze[++j]&&R===Ze[++j]&&R===Ze[++j]&&j<Ae);l.match_length=ze-(Ae-j),l.match_length>l.lookahead&&(l.match_length=l.lookahead)}if(l.match_length>=nn?(m=Tt(l,1,l.match_length-nn),l.lookahead-=l.match_length,l.strstart+=l.match_length,l.match_length=0):(m=Tt(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++),m&&(Le(l,!1),l.strm.avail_out===0))return Sn}return l.insert=0,C===ur?(Le(l,!0),l.strm.avail_out===0?M:N):l.sym_next&&(Le(l,!1),l.strm.avail_out===0)?Sn:Xn},hn=(l,C)=>{let m;for(;;){if(l.lookahead===0&&(en(l),l.lookahead===0)){if(C===Ut)return Sn;break}if(l.match_length=0,m=Tt(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++,m&&(Le(l,!1),l.strm.avail_out===0))return Sn}return l.insert=0,C===ur?(Le(l,!0),l.strm.avail_out===0?M:N):l.sym_next&&(Le(l,!1),l.strm.avail_out===0)?Sn:Xn};function On(l,C,m,R,j){this.good_length=l,this.max_lazy=C,this.nice_length=m,this.max_chain=R,this.func=j}const Ln=[new On(0,0,0,0,an),new On(4,4,8,4,An),new On(4,5,16,8,An),new On(4,6,32,32,An),new On(4,4,16,16,Kn),new On(8,16,32,32,Kn),new On(8,16,128,128,Kn),new On(8,32,128,256,Kn),new On(32,128,258,1024,Kn),new On(32,258,258,4096,Kn)],cr=l=>{l.window_size=2*l.w_size,tt(l.head),l.max_lazy_match=Ln[l.level].max_lazy,l.good_match=Ln[l.level].good_length,l.nice_match=Ln[l.level].nice_length,l.max_chain_length=Ln[l.level].max_chain,l.strstart=0,l.block_start=0,l.lookahead=0,l.insert=0,l.match_length=l.prev_length=nn-1,l.match_available=0,l.ins_h=0};function zn(){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=si,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(gr*2),this.dyn_dtree=new Uint16Array((2*ai+1)*2),this.bl_tree=new Uint16Array((2*Ki+1)*2),tt(this.dyn_ltree),tt(this.dyn_dtree),tt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Gn+1),this.heap=new Uint16Array(2*Hi+1),tt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Hi+1),tt(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!==yt&&C.status!==Kt&&C.status!==xt&&C.status!==St&&C.status!==qt&&C.status!==_n&&C.status!==xn&&C.status!==sr?1:0},yr=l=>{if(Rn(l))return ve(l,mr);l.total_in=l.total_out=0,l.data_type=bi;const C=l.state;return C.pending=0,C.pending_out=0,C.wrap<0&&(C.wrap=-C.wrap),C.status=C.wrap===2?Kt:C.wrap?yt:xn,l.adler=C.wrap===2?0:1,C.last_flush=-2,me(C),Jt},er=l=>{const C=yr(l);return C===Jt&&cr(l.state),C},wr=(l,C)=>Rn(l)||l.state.wrap!==2?mr:(l.state.gzhead=C,Jt),Lr=(l,C,m,R,j,Ae)=>{if(!l)return mr;let Ze=1;if(C===ir&&(C=6),R<0?(Ze=0,R=-R):R>15&&(Ze=2,R-=16),j<1||j>vi||m!==si||R<8||R>15||C<0||C>9||Ae<0||Ae>li||R===8&&Ze!==1)return ve(l,mr);R===8&&(R=9);const Ne=new zn;return l.state=Ne,Ne.strm=l,Ne.status=yt,Ne.wrap=Ze,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+nn-1)/nn),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=Ae,Ne.method=m,er(l)},Vr=(l,C)=>Lr(l,C,si,Xi,Fr,Gr),Qr=(l,C)=>{if(Rn(l)||C>gn||C<0)return l?ve(l,mr):mr;const m=l.state;if(!l.output||l.avail_in!==0&&!l.input||m.status===sr&&C!==ur)return ve(l,l.avail_out===0?lr:mr);const R=m.last_flush;if(m.last_flush=C,m.pending!==0){if(Dt(l),l.avail_out===0)return m.last_flush=-1,Jt}else if(l.avail_in===0&&Ke(C)<=Ke(R)&&C!==ur)return ve(l,lr);if(m.status===sr&&l.avail_in!==0)return ve(l,lr);if(m.status===yt&&m.wrap===0&&(m.status=xn),m.status===yt){let j=si+(m.w_bits-8<<4)<<8,Ae=-1;if(m.strategy>=Jr||m.level<2?Ae=0:m.level<6?Ae=1:m.level===6?Ae=2:Ae=3,j|=Ae<<6,m.strstart!==0&&(j|=Nt),j+=31-j%31,Ot(m,j),m.strstart!==0&&(Ot(m,l.adler>>>16),Ot(m,l.adler&65535)),l.adler=1,m.status=xn,Dt(l),m.pending!==0)return m.last_flush=-1,Jt}if(m.status===Kt){if(l.adler=0,rt(m,31),rt(m,139),rt(m,8),m.gzhead)rt(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),rt(m,m.gzhead.time&255),rt(m,m.gzhead.time>>8&255),rt(m,m.gzhead.time>>16&255),rt(m,m.gzhead.time>>24&255),rt(m,m.level===9?2:m.strategy>=Jr||m.level<2?4:0),rt(m,m.gzhead.os&255),m.gzhead.extra&&m.gzhead.extra.length&&(rt(m,m.gzhead.extra.length&255),rt(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(l.adler=Fe(l.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=xt;else if(rt(m,0),rt(m,0),rt(m,0),rt(m,0),rt(m,0),rt(m,m.level===9?2:m.strategy>=Jr||m.level<2?4:0),rt(m,de),m.status=xn,Dt(l),m.pending!==0)return m.last_flush=-1,Jt}if(m.status===xt){if(m.gzhead.extra){let j=m.pending,Ae=(m.gzhead.extra.length&65535)-m.gzindex;for(;m.pending+Ae>m.pending_buf_size;){let Ne=m.pending_buf_size-m.pending;if(m.pending_buf.set(m.gzhead.extra.subarray(m.gzindex,m.gzindex+Ne),m.pending),m.pending=m.pending_buf_size,m.gzhead.hcrc&&m.pending>j&&(l.adler=Fe(l.adler,m.pending_buf,m.pending-j,j)),m.gzindex+=Ne,Dt(l),m.pending!==0)return m.last_flush=-1,Jt;j=0,Ae-=Ne}let Ze=new Uint8Array(m.gzhead.extra);m.pending_buf.set(Ze.subarray(m.gzindex,m.gzindex+Ae),m.pending),m.pending+=Ae,m.gzhead.hcrc&&m.pending>j&&(l.adler=Fe(l.adler,m.pending_buf,m.pending-j,j)),m.gzindex=0}m.status=St}if(m.status===St){if(m.gzhead.name){let j=m.pending,Ae;do{if(m.pending===m.pending_buf_size){if(m.gzhead.hcrc&&m.pending>j&&(l.adler=Fe(l.adler,m.pending_buf,m.pending-j,j)),Dt(l),m.pending!==0)return m.last_flush=-1,Jt;j=0}m.gzindex<m.gzhead.name.length?Ae=m.gzhead.name.charCodeAt(m.gzindex++)&255:Ae=0,rt(m,Ae)}while(Ae!==0);m.gzhead.hcrc&&m.pending>j&&(l.adler=Fe(l.adler,m.pending_buf,m.pending-j,j)),m.gzindex=0}m.status=qt}if(m.status===qt){if(m.gzhead.comment){let j=m.pending,Ae;do{if(m.pending===m.pending_buf_size){if(m.gzhead.hcrc&&m.pending>j&&(l.adler=Fe(l.adler,m.pending_buf,m.pending-j,j)),Dt(l),m.pending!==0)return m.last_flush=-1,Jt;j=0}m.gzindex<m.gzhead.comment.length?Ae=m.gzhead.comment.charCodeAt(m.gzindex++)&255:Ae=0,rt(m,Ae)}while(Ae!==0);m.gzhead.hcrc&&m.pending>j&&(l.adler=Fe(l.adler,m.pending_buf,m.pending-j,j))}m.status=_n}if(m.status===_n){if(m.gzhead.hcrc){if(m.pending+2>m.pending_buf_size&&(Dt(l),m.pending!==0))return m.last_flush=-1,Jt;rt(m,l.adler&255),rt(m,l.adler>>8&255),l.adler=0}if(m.status=xn,Dt(l),m.pending!==0)return m.last_flush=-1,Jt}if(l.avail_in!==0||m.lookahead!==0||C!==Ut&&m.status!==sr){let j=m.level===0?an(m,C):m.strategy===Jr?hn(m,C):m.strategy===Sr?Fn(m,C):Ln[m.level].func(m,C);if((j===M||j===N)&&(m.status=sr),j===Sn||j===M)return l.avail_out===0&&(m.last_flush=-1),Jt;if(j===Xn&&(C===vn?Wt(m):C!==gn&&(Se(m,0,0,!1),C===jn&&(tt(m.head),m.lookahead===0&&(m.strstart=0,m.block_start=0,m.insert=0))),Dt(l),l.avail_out===0))return m.last_flush=-1,Jt}return C!==ur?Jt:m.wrap<=0?or:(m.wrap===2?(rt(m,l.adler&255),rt(m,l.adler>>8&255),rt(m,l.adler>>16&255),rt(m,l.adler>>24&255),rt(m,l.total_in&255),rt(m,l.total_in>>8&255),rt(m,l.total_in>>16&255),rt(m,l.total_in>>24&255)):(Ot(m,l.adler>>>16),Ot(m,l.adler&65535)),Dt(l),m.wrap>0&&(m.wrap=-m.wrap),m.pending!==0?Jt:or)},Ur=l=>{if(Rn(l))return mr;const C=l.state.status;return l.state=null,C===xn?ve(l,Ge):Jt},fr=(l,C)=>{let m=C.length;if(Rn(l))return mr;const R=l.state,j=R.wrap;if(j===2||j===1&&R.status!==yt||R.lookahead)return mr;if(j===1&&(l.adler=Xt(l.adler,C,m,0)),R.wrap=0,m>=R.w_size){j===0&&(tt(R.head),R.strstart=0,R.block_start=0,R.insert=0);let sn=new Uint8Array(R.w_size);sn.set(C.subarray(m-R.w_size,m),0),C=sn,m=R.w_size}const Ae=l.avail_in,Ze=l.next_in,Ne=l.input;for(l.avail_in=m,l.next_in=0,l.input=C,en(R);R.lookahead>=nn;){let sn=R.strstart,Oe=R.lookahead-(nn-1);do R.ins_h=$t(R,R.ins_h,R.window[sn+nn-1]),R.prev[sn&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=sn,sn++;while(--Oe);R.strstart=sn,R.lookahead=nn-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=nn-1,R.match_available=0,l.next_in=Ze,l.input=Ne,l.avail_in=Ae,R.wrap=j,Jt};var Rr=Vr,pr=Lr,Ui=er,Hr=yr,Or=wr,qr=Qr,Tn=Ur,Wr=fr,Ti="pako deflate (from Nodeca project)",Si={deflateInit:Rr,deflateInit2:pr,deflateReset:Ui,deflateResetKeep:Hr,deflateSetHeader:Or,deflate:qr,deflateEnd:Tn,deflateSetDictionary:Wr,deflateInfo:Ti};const $i=(l,C)=>Object.prototype.hasOwnProperty.call(l,C);var ss=function(l){const C=Array.prototype.slice.call(arguments,1);for(;C.length;){const m=C.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(const R in m)$i(m,R)&&(l[R]=m[R])}}return l},ls=l=>{let C=0;for(let R=0,j=l.length;R<j;R++)C+=l[R].length;const m=new Uint8Array(C);for(let R=0,j=0,Ae=l.length;R<Ae;R++){let Ze=l[R];m.set(Ze,j),j+=Ze.length}return m},ki={assign:ss,flattenChunks:ls};let Er=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(l){Er=!1}const Gi=new Uint8Array(256);for(let l=0;l<256;l++)Gi[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;Gi[254]=Gi[254]=1;var gs=l=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(l);let C,m,R,j,Ae,Ze=l.length,Ne=0;for(j=0;j<Ze;j++)m=l.charCodeAt(j),(m&64512)===55296&&j+1<Ze&&(R=l.charCodeAt(j+1),(R&64512)===56320&&(m=65536+(m-55296<<10)+(R-56320),j++)),Ne+=m<128?1:m<2048?2:m<65536?3:4;for(C=new Uint8Array(Ne),Ae=0,j=0;Ae<Ne;j++)m=l.charCodeAt(j),(m&64512)===55296&&j+1<Ze&&(R=l.charCodeAt(j+1),(R&64512)===56320&&(m=65536+(m-55296<<10)+(R-56320),j++)),m<128?C[Ae++]=m:m<2048?(C[Ae++]=192|m>>>6,C[Ae++]=128|m&63):m<65536?(C[Ae++]=224|m>>>12,C[Ae++]=128|m>>>6&63,C[Ae++]=128|m&63):(C[Ae++]=240|m>>>18,C[Ae++]=128|m>>>12&63,C[Ae++]=128|m>>>6&63,C[Ae++]=128|m&63);return C};const Ds=(l,C)=>{if(C<65534&&l.subarray&&Er)return String.fromCharCode.apply(null,l.length===C?l:l.subarray(0,C));let m="";for(let R=0;R<C;R++)m+=String.fromCharCode(l[R]);return m};var Ls=(l,C)=>{const m=C||l.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(l.subarray(0,C));let R,j;const Ae=new Array(m*2);for(j=0,R=0;R<m;){let Ze=l[R++];if(Ze<128){Ae[j++]=Ze;continue}let Ne=Gi[Ze];if(Ne>4){Ae[j++]=65533,R+=Ne-1;continue}for(Ze&=Ne===2?31:Ne===3?15:7;Ne>1&&R<m;)Ze=Ze<<6|l[R++]&63,Ne--;if(Ne>1){Ae[j++]=65533;continue}Ze<65536?Ae[j++]=Ze:(Ze-=65536,Ae[j++]=55296|Ze>>10&1023,Ae[j++]=56320|Ze&1023)}return Ds(Ae,j)},us=(l,C)=>{C=C||l.length,C>l.length&&(C=l.length);let m=C-1;for(;m>=0&&(l[m]&192)===128;)m--;return m<0||m===0?C:m+Gi[l[m]]>C?m:C},ns={string2buf:gs,buf2string:Ls,utf8border:us};function Qi(){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 Ji=Qi;const qi=Object.prototype.toString,{Z_NO_FLUSH:Ii,Z_SYNC_FLUSH:gi,Z_FULL_FLUSH:Ri,Z_FINISH:as,Z_OK:es,Z_STREAM_END:Us,Z_DEFAULT_COMPRESSION:ws,Z_DEFAULT_STRATEGY:ei,Z_DEFLATED:yi}=ce;function Ir(l){this.options=ki.assign({level:ws,method:yi,chunkSize:16384,windowBits:15,memLevel:8,strategy:ei},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 Ji,this.strm.avail_out=0;let m=Si.deflateInit2(this.strm,C.level,C.method,C.windowBits,C.memLevel,C.strategy);if(m!==es)throw new Error(re[m]);if(C.header&&Si.deflateSetHeader(this.strm,C.header),C.dictionary){let R;if(typeof C.dictionary=="string"?R=ns.string2buf(C.dictionary):qi.call(C.dictionary)==="[object ArrayBuffer]"?R=new Uint8Array(C.dictionary):R=C.dictionary,m=Si.deflateSetDictionary(this.strm,R),m!==es)throw new Error(re[m]);this._dict_set=!0}}Ir.prototype.push=function(l,C){const m=this.strm,R=this.options.chunkSize;let j,Ae;if(this.ended)return!1;for(C===~~C?Ae=C:Ae=C===!0?as:Ii,typeof l=="string"?m.input=ns.string2buf(l):qi.call(l)==="[object ArrayBuffer]"?m.input=new Uint8Array(l):m.input=l,m.next_in=0,m.avail_in=m.input.length;;){if(m.avail_out===0&&(m.output=new Uint8Array(R),m.next_out=0,m.avail_out=R),(Ae===gi||Ae===Ri)&&m.avail_out<=6){this.onData(m.output.subarray(0,m.next_out)),m.avail_out=0;continue}if(j=Si.deflate(m,Ae),j===Us)return m.next_out>0&&this.onData(m.output.subarray(0,m.next_out)),j=Si.deflateEnd(this.strm),this.onEnd(j),this.ended=!0,j===es;if(m.avail_out===0){this.onData(m.output);continue}if(Ae>0&&m.next_out>0){this.onData(m.output.subarray(0,m.next_out)),m.avail_out=0;continue}if(m.avail_in===0)break}return!0},Ir.prototype.onData=function(l){this.chunks.push(l)},Ir.prototype.onEnd=function(l){l===es&&(this.result=ki.flattenChunks(this.chunks)),this.chunks=[],this.err=l,this.msg=this.strm.msg};function In(l,C){const m=new Ir(C);if(m.push(l,!0),m.err)throw m.msg||re[m.err];return m.result}function Jn(l,C){return C=C||{},C.raw=!0,In(l,C)}function ti(l,C){return C=C||{},C.gzip=!0,In(l,C)}var fi=Ir,zr=In,Ys=Jn,Oi=ti,pi=ce,Es={Deflate:fi,deflate:zr,deflateRaw:Ys,gzip:Oi,constants:pi};const Di=16209,Ca=16191;var Rs=function(C,m){let R,j,Ae,Ze,Ne,sn,Oe,nt,Pn,dn,zt,Vn,ui,Tr,_r,Kr,hr,cn,Dr,wi,Ar,ci,Pr,Cr;const Zr=C.state;R=C.next_in,Pr=C.input,j=R+(C.avail_in-5),Ae=C.next_out,Cr=C.output,Ze=Ae-(m-C.avail_out),Ne=Ae+(C.avail_out-257),sn=Zr.dmax,Oe=Zr.wsize,nt=Zr.whave,Pn=Zr.wnext,dn=Zr.window,zt=Zr.hold,Vn=Zr.bits,ui=Zr.lencode,Tr=Zr.distcode,_r=(1<<Zr.lenbits)-1,Kr=(1<<Zr.distbits)-1;e:do{Vn<15&&(zt+=Pr[R++]<<Vn,Vn+=8,zt+=Pr[R++]<<Vn,Vn+=8),hr=ui[zt&_r];t:for(;;){if(cn=hr>>>24,zt>>>=cn,Vn-=cn,cn=hr>>>16&255,cn===0)Cr[Ae++]=hr&65535;else if(cn&16){Dr=hr&65535,cn&=15,cn&&(Vn<cn&&(zt+=Pr[R++]<<Vn,Vn+=8),Dr+=zt&(1<<cn)-1,zt>>>=cn,Vn-=cn),Vn<15&&(zt+=Pr[R++]<<Vn,Vn+=8,zt+=Pr[R++]<<Vn,Vn+=8),hr=Tr[zt&Kr];n:for(;;){if(cn=hr>>>24,zt>>>=cn,Vn-=cn,cn=hr>>>16&255,cn&16){if(wi=hr&65535,cn&=15,Vn<cn&&(zt+=Pr[R++]<<Vn,Vn+=8,Vn<cn&&(zt+=Pr[R++]<<Vn,Vn+=8)),wi+=zt&(1<<cn)-1,wi>sn){C.msg="invalid distance too far back",Zr.mode=Di;break e}if(zt>>>=cn,Vn-=cn,cn=Ae-Ze,wi>cn){if(cn=wi-cn,cn>nt&&Zr.sane){C.msg="invalid distance too far back",Zr.mode=Di;break e}if(Ar=0,ci=dn,Pn===0){if(Ar+=Oe-cn,cn<Dr){Dr-=cn;do Cr[Ae++]=dn[Ar++];while(--cn);Ar=Ae-wi,ci=Cr}}else if(Pn<cn){if(Ar+=Oe+Pn-cn,cn-=Pn,cn<Dr){Dr-=cn;do Cr[Ae++]=dn[Ar++];while(--cn);if(Ar=0,Pn<Dr){cn=Pn,Dr-=cn;do Cr[Ae++]=dn[Ar++];while(--cn);Ar=Ae-wi,ci=Cr}}}else if(Ar+=Pn-cn,cn<Dr){Dr-=cn;do Cr[Ae++]=dn[Ar++];while(--cn);Ar=Ae-wi,ci=Cr}for(;Dr>2;)Cr[Ae++]=ci[Ar++],Cr[Ae++]=ci[Ar++],Cr[Ae++]=ci[Ar++],Dr-=3;Dr&&(Cr[Ae++]=ci[Ar++],Dr>1&&(Cr[Ae++]=ci[Ar++]))}else{Ar=Ae-wi;do Cr[Ae++]=Cr[Ar++],Cr[Ae++]=Cr[Ar++],Cr[Ae++]=Cr[Ar++],Dr-=3;while(Dr>2);Dr&&(Cr[Ae++]=Cr[Ar++],Dr>1&&(Cr[Ae++]=Cr[Ar++]))}}else if(cn&64){C.msg="invalid distance code",Zr.mode=Di;break e}else{hr=Tr[(hr&65535)+(zt&(1<<cn)-1)];continue n}break}}else if(cn&64)if(cn&32){Zr.mode=Ca;break e}else{C.msg="invalid literal/length code",Zr.mode=Di;break e}else{hr=ui[(hr&65535)+(zt&(1<<cn)-1)];continue t}break}}while(R<j&&Ae<Ne);Dr=Vn>>3,R-=Dr,Vn-=Dr<<3,zt&=(1<<Vn)-1,C.next_in=R,C.next_out=Ae,C.avail_in=R<j?5+(j-R):5-(R-j),C.avail_out=Ae<Ne?257+(Ne-Ae):257-(Ae-Ne),Zr.hold=zt,Zr.bits=Vn};const Bs=15,ni=852,na=592,cs=0,js=1,ks=2,ra=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]),xa=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]),Na=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]),rs=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 ts=(l,C,m,R,j,Ae,Ze,Ne)=>{const sn=Ne.bits;let Oe=0,nt=0,Pn=0,dn=0,zt=0,Vn=0,ui=0,Tr=0,_r=0,Kr=0,hr,cn,Dr,wi,Ar,ci=null,Pr;const Cr=new Uint16Array(Bs+1),Zr=new Uint16Array(Bs+1);let Ea=null,no,vs,xi;for(Oe=0;Oe<=Bs;Oe++)Cr[Oe]=0;for(nt=0;nt<R;nt++)Cr[C[m+nt]]++;for(zt=sn,dn=Bs;dn>=1&&Cr[dn]===0;dn--);if(zt>dn&&(zt=dn),dn===0)return j[Ae++]=1<<24|64<<16|0,j[Ae++]=1<<24|64<<16|0,Ne.bits=1,0;for(Pn=1;Pn<dn&&Cr[Pn]===0;Pn++);for(zt<Pn&&(zt=Pn),Tr=1,Oe=1;Oe<=Bs;Oe++)if(Tr<<=1,Tr-=Cr[Oe],Tr<0)return-1;if(Tr>0&&(l===cs||dn!==1))return-1;for(Zr[1]=0,Oe=1;Oe<Bs;Oe++)Zr[Oe+1]=Zr[Oe]+Cr[Oe];for(nt=0;nt<R;nt++)C[m+nt]!==0&&(Ze[Zr[C[m+nt]]++]=nt);if(l===cs?(ci=Ea=Ze,Pr=20):l===js?(ci=ra,Ea=xa,Pr=257):(ci=Na,Ea=rs,Pr=0),Kr=0,nt=0,Oe=Pn,Ar=Ae,Vn=zt,ui=0,Dr=-1,_r=1<<zt,wi=_r-1,l===js&&_r>ni||l===ks&&_r>na)return 1;for(;;){no=Oe-ui,Ze[nt]+1<Pr?(vs=0,xi=Ze[nt]):Ze[nt]>=Pr?(vs=Ea[Ze[nt]-Pr],xi=ci[Ze[nt]-Pr]):(vs=96,xi=0),hr=1<<Oe-ui,cn=1<<Vn,Pn=cn;do cn-=hr,j[Ar+(Kr>>ui)+cn]=no<<24|vs<<16|xi|0;while(cn!==0);for(hr=1<<Oe-1;Kr&hr;)hr>>=1;if(hr!==0?(Kr&=hr-1,Kr+=hr):Kr=0,nt++,--Cr[Oe]===0){if(Oe===dn)break;Oe=C[m+Ze[nt]]}if(Oe>zt&&(Kr&wi)!==Dr){for(ui===0&&(ui=zt),Ar+=Pn,Vn=Oe-ui,Tr=1<<Vn;Vn+ui<dn&&(Tr-=Cr[Vn+ui],!(Tr<=0));)Vn++,Tr<<=1;if(_r+=1<<Vn,l===js&&_r>ni||l===ks&&_r>na)return 1;Dr=Kr&wi,j[Dr]=zt<<24|Vn<<16|Ar-Ae|0}}return Kr!==0&&(j[Ar+Kr]=Oe-ui<<24|64<<16|0),Ne.bits=zt,0};const Pi=0,bs=1,ps=2,{Z_FINISH:Sa,Z_BLOCK:ia,Z_TREES:Cs,Z_OK:Qs,Z_STREAM_END:ma,Z_NEED_DICT:Os,Z_STREAM_ERROR:fs,Z_DATA_ERROR:Fa,Z_MEM_ERROR:Ps,Z_BUF_ERROR:Ta,Z_DEFLATED:Ha}=ce,_a=16180,is=16181,Ia=16182,Ka=16183,cA=16184,sa=16185,aa=16186,Ei=16187,jr=16188,hi=16189,Vi=16190,Ci=16191,xs=16192,Mi=16193,Wi=16194,$a=16195,Pt=16196,$s=16197,va=16198,Js=16199,fA=16200,Ga=16201,PA=16202,fo=16203,ho=16204,hA=16205,ya=16206,Ss=16207,go=16208,Fi=16209,Va=16210,po=16211,mo=852,MA=592,Aa=15,_o=l=>(l>>>24&255)+(l>>>8&65280)+((l&65280)<<8)+((l&255)<<24);function vo(){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 oa=l=>{if(!l)return 1;const C=l.state;return!C||C.strm!==l||C.mode<_a||C.mode>po?1:0},dA=l=>{if(oa(l))return fs;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=_a,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(mo),C.distcode=C.distdyn=new Int32Array(MA),C.sane=1,C.back=-1,Qs},Wa=l=>{if(oa(l))return fs;const C=l.state;return C.wsize=0,C.whave=0,C.wnext=0,dA(l)},za=(l,C)=>{let m;if(oa(l))return fs;const R=l.state;return C<0?(m=0,C=-C):(m=(C>>4)+5,C<48&&(C&=15)),C&&(C<8||C>15)?fs:(R.window!==null&&R.wbits!==C&&(R.window=null),R.wrap=m,R.wbits=C,Wa(l))},yo=(l,C)=>{if(!l)return fs;const m=new vo;l.state=m,m.strm=l,m.window=null,m.mode=_a;const R=za(l,C);return R!==Qs&&(l.state=null),R},sl=l=>yo(l,Aa);let HA=!0,wa,KA;const wo=l=>{if(HA){wa=new Int32Array(512),KA=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(ts(bs,l.lens,0,288,wa,0,l.work,{bits:9}),C=0;C<32;)l.lens[C++]=5;ts(ps,l.lens,0,32,KA,0,l.work,{bits:5}),HA=!1}l.lencode=wa,l.lenbits=9,l.distcode=KA,l.distbits=5},Eo=(l,C,m,R)=>{let j;const Ae=l.state;return Ae.window===null&&(Ae.wsize=1<<Ae.wbits,Ae.wnext=0,Ae.whave=0,Ae.window=new Uint8Array(Ae.wsize)),R>=Ae.wsize?(Ae.window.set(C.subarray(m-Ae.wsize,m),0),Ae.wnext=0,Ae.whave=Ae.wsize):(j=Ae.wsize-Ae.wnext,j>R&&(j=R),Ae.window.set(C.subarray(m-R,m-R+j),Ae.wnext),R-=j,R?(Ae.window.set(C.subarray(m-R,m),0),Ae.wnext=R,Ae.whave=Ae.wsize):(Ae.wnext+=j,Ae.wnext===Ae.wsize&&(Ae.wnext=0),Ae.whave<Ae.wsize&&(Ae.whave+=j))),0},al=(l,C)=>{let m,R,j,Ae,Ze,Ne,sn,Oe,nt,Pn,dn,zt,Vn,ui,Tr=0,_r,Kr,hr,cn,Dr,wi,Ar,ci;const Pr=new Uint8Array(4);let Cr,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(oa(l)||!l.output||!l.input&&l.avail_in!==0)return fs;m=l.state,m.mode===Ci&&(m.mode=xs),Ze=l.next_out,j=l.output,sn=l.avail_out,Ae=l.next_in,R=l.input,Ne=l.avail_in,Oe=m.hold,nt=m.bits,Pn=Ne,dn=sn,ci=Qs;e:for(;;)switch(m.mode){case _a:if(m.wrap===0){m.mode=xs;break}for(;nt<16;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if(m.wrap&2&&Oe===35615){m.wbits===0&&(m.wbits=15),m.check=0,Pr[0]=Oe&255,Pr[1]=Oe>>>8&255,m.check=Fe(m.check,Pr,2,0),Oe=0,nt=0,m.mode=is;break}if(m.head&&(m.head.done=!1),!(m.wrap&1)||(((Oe&255)<<8)+(Oe>>8))%31){l.msg="incorrect header check",m.mode=Fi;break}if((Oe&15)!==Ha){l.msg="unknown compression method",m.mode=Fi;break}if(Oe>>>=4,nt-=4,Ar=(Oe&15)+8,m.wbits===0&&(m.wbits=Ar),Ar>15||Ar>m.wbits){l.msg="invalid window size",m.mode=Fi;break}m.dmax=1<<m.wbits,m.flags=0,l.adler=m.check=1,m.mode=Oe&512?hi:Ci,Oe=0,nt=0;break;case is:for(;nt<16;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if(m.flags=Oe,(m.flags&255)!==Ha){l.msg="unknown compression method",m.mode=Fi;break}if(m.flags&57344){l.msg="unknown header flags set",m.mode=Fi;break}m.head&&(m.head.text=Oe>>8&1),m.flags&512&&m.wrap&4&&(Pr[0]=Oe&255,Pr[1]=Oe>>>8&255,m.check=Fe(m.check,Pr,2,0)),Oe=0,nt=0,m.mode=Ia;case Ia:for(;nt<32;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}m.head&&(m.head.time=Oe),m.flags&512&&m.wrap&4&&(Pr[0]=Oe&255,Pr[1]=Oe>>>8&255,Pr[2]=Oe>>>16&255,Pr[3]=Oe>>>24&255,m.check=Fe(m.check,Pr,4,0)),Oe=0,nt=0,m.mode=Ka;case Ka:for(;nt<16;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}m.head&&(m.head.xflags=Oe&255,m.head.os=Oe>>8),m.flags&512&&m.wrap&4&&(Pr[0]=Oe&255,Pr[1]=Oe>>>8&255,m.check=Fe(m.check,Pr,2,0)),Oe=0,nt=0,m.mode=cA;case cA:if(m.flags&1024){for(;nt<16;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}m.length=Oe,m.head&&(m.head.extra_len=Oe),m.flags&512&&m.wrap&4&&(Pr[0]=Oe&255,Pr[1]=Oe>>>8&255,m.check=Fe(m.check,Pr,2,0)),Oe=0,nt=0}else m.head&&(m.head.extra=null);m.mode=sa;case sa:if(m.flags&1024&&(zt=m.length,zt>Ne&&(zt=Ne),zt&&(m.head&&(Ar=m.head.extra_len-m.length,m.head.extra||(m.head.extra=new Uint8Array(m.head.extra_len)),m.head.extra.set(R.subarray(Ae,Ae+zt),Ar)),m.flags&512&&m.wrap&4&&(m.check=Fe(m.check,R,zt,Ae)),Ne-=zt,Ae+=zt,m.length-=zt),m.length))break e;m.length=0,m.mode=aa;case aa:if(m.flags&2048){if(Ne===0)break e;zt=0;do Ar=R[Ae+zt++],m.head&&Ar&&m.length<65536&&(m.head.name+=String.fromCharCode(Ar));while(Ar&&zt<Ne);if(m.flags&512&&m.wrap&4&&(m.check=Fe(m.check,R,zt,Ae)),Ne-=zt,Ae+=zt,Ar)break e}else m.head&&(m.head.name=null);m.length=0,m.mode=Ei;case Ei:if(m.flags&4096){if(Ne===0)break e;zt=0;do Ar=R[Ae+zt++],m.head&&Ar&&m.length<65536&&(m.head.comment+=String.fromCharCode(Ar));while(Ar&&zt<Ne);if(m.flags&512&&m.wrap&4&&(m.check=Fe(m.check,R,zt,Ae)),Ne-=zt,Ae+=zt,Ar)break e}else m.head&&(m.head.comment=null);m.mode=jr;case jr:if(m.flags&512){for(;nt<16;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if(m.wrap&4&&Oe!==(m.check&65535)){l.msg="header crc mismatch",m.mode=Fi;break}Oe=0,nt=0}m.head&&(m.head.hcrc=m.flags>>9&1,m.head.done=!0),l.adler=m.check=0,m.mode=Ci;break;case hi:for(;nt<32;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}l.adler=m.check=_o(Oe),Oe=0,nt=0,m.mode=Vi;case Vi:if(m.havedict===0)return l.next_out=Ze,l.avail_out=sn,l.next_in=Ae,l.avail_in=Ne,m.hold=Oe,m.bits=nt,Os;l.adler=m.check=1,m.mode=Ci;case Ci:if(C===ia||C===Cs)break e;case xs:if(m.last){Oe>>>=nt&7,nt-=nt&7,m.mode=ya;break}for(;nt<3;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}switch(m.last=Oe&1,Oe>>>=1,nt-=1,Oe&3){case 0:m.mode=Mi;break;case 1:if(wo(m),m.mode=Js,C===Cs){Oe>>>=2,nt-=2;break e}break;case 2:m.mode=Pt;break;case 3:l.msg="invalid block type",m.mode=Fi}Oe>>>=2,nt-=2;break;case Mi:for(Oe>>>=nt&7,nt-=nt&7;nt<32;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if((Oe&65535)!==(Oe>>>16^65535)){l.msg="invalid stored block lengths",m.mode=Fi;break}if(m.length=Oe&65535,Oe=0,nt=0,m.mode=Wi,C===Cs)break e;case Wi:m.mode=$a;case $a:if(zt=m.length,zt){if(zt>Ne&&(zt=Ne),zt>sn&&(zt=sn),zt===0)break e;j.set(R.subarray(Ae,Ae+zt),Ze),Ne-=zt,Ae+=zt,sn-=zt,Ze+=zt,m.length-=zt;break}m.mode=Ci;break;case Pt:for(;nt<14;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if(m.nlen=(Oe&31)+257,Oe>>>=5,nt-=5,m.ndist=(Oe&31)+1,Oe>>>=5,nt-=5,m.ncode=(Oe&15)+4,Oe>>>=4,nt-=4,m.nlen>286||m.ndist>30){l.msg="too many length or distance symbols",m.mode=Fi;break}m.have=0,m.mode=$s;case $s:for(;m.have<m.ncode;){for(;nt<3;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}m.lens[Ea[m.have++]]=Oe&7,Oe>>>=3,nt-=3}for(;m.have<19;)m.lens[Ea[m.have++]]=0;if(m.lencode=m.lendyn,m.lenbits=7,Cr={bits:m.lenbits},ci=ts(Pi,m.lens,0,19,m.lencode,0,m.work,Cr),m.lenbits=Cr.bits,ci){l.msg="invalid code lengths set",m.mode=Fi;break}m.have=0,m.mode=va;case va:for(;m.have<m.nlen+m.ndist;){for(;Tr=m.lencode[Oe&(1<<m.lenbits)-1],_r=Tr>>>24,Kr=Tr>>>16&255,hr=Tr&65535,!(_r<=nt);){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if(hr<16)Oe>>>=_r,nt-=_r,m.lens[m.have++]=hr;else{if(hr===16){for(Zr=_r+2;nt<Zr;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if(Oe>>>=_r,nt-=_r,m.have===0){l.msg="invalid bit length repeat",m.mode=Fi;break}Ar=m.lens[m.have-1],zt=3+(Oe&3),Oe>>>=2,nt-=2}else if(hr===17){for(Zr=_r+3;nt<Zr;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}Oe>>>=_r,nt-=_r,Ar=0,zt=3+(Oe&7),Oe>>>=3,nt-=3}else{for(Zr=_r+7;nt<Zr;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}Oe>>>=_r,nt-=_r,Ar=0,zt=11+(Oe&127),Oe>>>=7,nt-=7}if(m.have+zt>m.nlen+m.ndist){l.msg="invalid bit length repeat",m.mode=Fi;break}for(;zt--;)m.lens[m.have++]=Ar}}if(m.mode===Fi)break;if(m.lens[256]===0){l.msg="invalid code -- missing end-of-block",m.mode=Fi;break}if(m.lenbits=9,Cr={bits:m.lenbits},ci=ts(bs,m.lens,0,m.nlen,m.lencode,0,m.work,Cr),m.lenbits=Cr.bits,ci){l.msg="invalid literal/lengths set",m.mode=Fi;break}if(m.distbits=6,m.distcode=m.distdyn,Cr={bits:m.distbits},ci=ts(ps,m.lens,m.nlen,m.ndist,m.distcode,0,m.work,Cr),m.distbits=Cr.bits,ci){l.msg="invalid distances set",m.mode=Fi;break}if(m.mode=Js,C===Cs)break e;case Js:m.mode=fA;case fA:if(Ne>=6&&sn>=258){l.next_out=Ze,l.avail_out=sn,l.next_in=Ae,l.avail_in=Ne,m.hold=Oe,m.bits=nt,Rs(l,dn),Ze=l.next_out,j=l.output,sn=l.avail_out,Ae=l.next_in,R=l.input,Ne=l.avail_in,Oe=m.hold,nt=m.bits,m.mode===Ci&&(m.back=-1);break}for(m.back=0;Tr=m.lencode[Oe&(1<<m.lenbits)-1],_r=Tr>>>24,Kr=Tr>>>16&255,hr=Tr&65535,!(_r<=nt);){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if(Kr&&!(Kr&240)){for(cn=_r,Dr=Kr,wi=hr;Tr=m.lencode[wi+((Oe&(1<<cn+Dr)-1)>>cn)],_r=Tr>>>24,Kr=Tr>>>16&255,hr=Tr&65535,!(cn+_r<=nt);){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}Oe>>>=cn,nt-=cn,m.back+=cn}if(Oe>>>=_r,nt-=_r,m.back+=_r,m.length=hr,Kr===0){m.mode=hA;break}if(Kr&32){m.back=-1,m.mode=Ci;break}if(Kr&64){l.msg="invalid literal/length code",m.mode=Fi;break}m.extra=Kr&15,m.mode=Ga;case Ga:if(m.extra){for(Zr=m.extra;nt<Zr;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}m.length+=Oe&(1<<m.extra)-1,Oe>>>=m.extra,nt-=m.extra,m.back+=m.extra}m.was=m.length,m.mode=PA;case PA:for(;Tr=m.distcode[Oe&(1<<m.distbits)-1],_r=Tr>>>24,Kr=Tr>>>16&255,hr=Tr&65535,!(_r<=nt);){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if(!(Kr&240)){for(cn=_r,Dr=Kr,wi=hr;Tr=m.distcode[wi+((Oe&(1<<cn+Dr)-1)>>cn)],_r=Tr>>>24,Kr=Tr>>>16&255,hr=Tr&65535,!(cn+_r<=nt);){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}Oe>>>=cn,nt-=cn,m.back+=cn}if(Oe>>>=_r,nt-=_r,m.back+=_r,Kr&64){l.msg="invalid distance code",m.mode=Fi;break}m.offset=hr,m.extra=Kr&15,m.mode=fo;case fo:if(m.extra){for(Zr=m.extra;nt<Zr;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}m.offset+=Oe&(1<<m.extra)-1,Oe>>>=m.extra,nt-=m.extra,m.back+=m.extra}if(m.offset>m.dmax){l.msg="invalid distance too far back",m.mode=Fi;break}m.mode=ho;case ho:if(sn===0)break e;if(zt=dn-sn,m.offset>zt){if(zt=m.offset-zt,zt>m.whave&&m.sane){l.msg="invalid distance too far back",m.mode=Fi;break}zt>m.wnext?(zt-=m.wnext,Vn=m.wsize-zt):Vn=m.wnext-zt,zt>m.length&&(zt=m.length),ui=m.window}else ui=j,Vn=Ze-m.offset,zt=m.length;zt>sn&&(zt=sn),sn-=zt,m.length-=zt;do j[Ze++]=ui[Vn++];while(--zt);m.length===0&&(m.mode=fA);break;case hA:if(sn===0)break e;j[Ze++]=m.length,sn--,m.mode=fA;break;case ya:if(m.wrap){for(;nt<32;){if(Ne===0)break e;Ne--,Oe|=R[Ae++]<<nt,nt+=8}if(dn-=sn,l.total_out+=dn,m.total+=dn,m.wrap&4&&dn&&(l.adler=m.check=m.flags?Fe(m.check,j,dn,Ze-dn):Xt(m.check,j,dn,Ze-dn)),dn=sn,m.wrap&4&&(m.flags?Oe:_o(Oe))!==m.check){l.msg="incorrect data check",m.mode=Fi;break}Oe=0,nt=0}m.mode=Ss;case Ss:if(m.wrap&&m.flags){for(;nt<32;){if(Ne===0)break e;Ne--,Oe+=R[Ae++]<<nt,nt+=8}if(m.wrap&4&&Oe!==(m.total&4294967295)){l.msg="incorrect length check",m.mode=Fi;break}Oe=0,nt=0}m.mode=go;case go:ci=ma;break e;case Fi:ci=Fa;break e;case Va:return Ps;case po:default:return fs}return l.next_out=Ze,l.avail_out=sn,l.next_in=Ae,l.avail_in=Ne,m.hold=Oe,m.bits=nt,(m.wsize||dn!==l.avail_out&&m.mode<Fi&&(m.mode<ya||C!==Sa))&&Eo(l,l.output,l.next_out,dn-l.avail_out),Pn-=l.avail_in,dn-=l.avail_out,l.total_in+=Pn,l.total_out+=dn,m.total+=dn,m.wrap&4&&dn&&(l.adler=m.check=m.flags?Fe(m.check,j,dn,l.next_out-dn):Xt(m.check,j,dn,l.next_out-dn)),l.data_type=m.bits+(m.last?64:0)+(m.mode===Ci?128:0)+(m.mode===Js||m.mode===Wi?256:0),(Pn===0&&dn===0||C===Sa)&&ci===Qs&&(ci=Ta),ci},$A=l=>{if(oa(l))return fs;let C=l.state;return C.window&&(C.window=null),l.state=null,Qs},Al=(l,C)=>{if(oa(l))return fs;const m=l.state;return m.wrap&2?(m.head=C,C.done=!1,Qs):fs},ol=(l,C)=>{const m=C.length;let R,j,Ae;return oa(l)||(R=l.state,R.wrap!==0&&R.mode!==Vi)?fs:R.mode===Vi&&(j=1,j=Xt(j,C,m,0),j!==R.check)?Fa:(Ae=Eo(l,C,m,m),Ae?(R.mode=Va,Ps):(R.havedict=1,Qs))};var ll=Wa,ul=za,cl=dA,gA=sl,fl=yo,hl=al,Bo=$A,pA=Al,dl=ol,mA="pako inflate (from Nodeca project)",ms={inflateReset:ll,inflateReset2:ul,inflateResetKeep:cl,inflateInit:gA,inflateInit2:fl,inflate:hl,inflateEnd:Bo,inflateGetHeader:pA,inflateSetDictionary:dl,inflateInfo:mA};function gl(){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 GA=gl;const hs=Object.prototype.toString,{Z_NO_FLUSH:Gs,Z_FINISH:VA,Z_OK:Za,Z_STREAM_END:qs,Z_NEED_DICT:WA,Z_STREAM_ERROR:pl,Z_DATA_ERROR:bo,Z_MEM_ERROR:ml}=ce;function Da(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 Ji,this.strm.avail_out=0;let m=ms.inflateInit2(this.strm,C.windowBits);if(m!==Za)throw new Error(re[m]);if(this.header=new GA,ms.inflateGetHeader(this.strm,this.header),C.dictionary&&(typeof C.dictionary=="string"?C.dictionary=ns.string2buf(C.dictionary):hs.call(C.dictionary)==="[object ArrayBuffer]"&&(C.dictionary=new Uint8Array(C.dictionary)),C.raw&&(m=ms.inflateSetDictionary(this.strm,C.dictionary),m!==Za)))throw new Error(re[m])}Da.prototype.push=function(l,C){const m=this.strm,R=this.options.chunkSize,j=this.options.dictionary;let Ae,Ze,Ne;if(this.ended)return!1;for(C===~~C?Ze=C:Ze=C===!0?VA:Gs,hs.call(l)==="[object ArrayBuffer]"?m.input=new Uint8Array(l):m.input=l,m.next_in=0,m.avail_in=m.input.length;;){for(m.avail_out===0&&(m.output=new Uint8Array(R),m.next_out=0,m.avail_out=R),Ae=ms.inflate(m,Ze),Ae===WA&&j&&(Ae=ms.inflateSetDictionary(m,j),Ae===Za?Ae=ms.inflate(m,Ze):Ae===bo&&(Ae=WA));m.avail_in>0&&Ae===qs&&m.state.wrap>0&&l[m.next_in]!==0;)ms.inflateReset(m),Ae=ms.inflate(m,Ze);switch(Ae){case pl:case bo:case WA:case ml:return this.onEnd(Ae),this.ended=!0,!1}if(Ne=m.avail_out,m.next_out&&(m.avail_out===0||Ae===qs))if(this.options.to==="string"){let sn=ns.utf8border(m.output,m.next_out),Oe=m.next_out-sn,nt=ns.buf2string(m.output,sn);m.next_out=Oe,m.avail_out=R-Oe,Oe&&m.output.set(m.output.subarray(sn,sn+Oe),0),this.onData(nt)}else this.onData(m.output.length===m.next_out?m.output:m.output.subarray(0,m.next_out));if(!(Ae===Za&&Ne===0)){if(Ae===qs)return Ae=ms.inflateEnd(this.strm),this.onEnd(Ae),this.ended=!0,!0;if(m.avail_in===0)break}}return!0},Da.prototype.onData=function(l){this.chunks.push(l)},Da.prototype.onEnd=function(l){l===Za&&(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 _A(l,C){const m=new Da(C);if(m.push(l),m.err)throw m.msg||re[m.err];return m.result}function zA(l,C){return C=C||{},C.raw=!0,_A(l,C)}var Co=Da,_l=_A,xo=zA,vl=_A,So=ce,Fo={Inflate:Co,inflate:_l,inflateRaw:xo,ungzip:vl,constants:So};const{Deflate:To,deflate:yl,deflateRaw:wl,gzip:Ya}=Es,{Inflate:Io,inflate:El,inflateRaw:ZA,ungzip:ja}=Fo;var Bl=To,bl=yl,Yi=wl,la=Ya,Xa=Io,Do=El,Cl=ZA,Ni=ja,YA=ce,Ja={Deflate:Bl,deflate:bl,deflateRaw:Yi,gzip:la,Inflate:Xa,inflate:Do,inflateRaw:Cl,ungzip:Ni,constants:YA};const Lo=[];for(let l=0;l<256;l++){let C=l;for(let m=0;m<8;m++)C&1?C=3988292384^C>>>1:C=C>>>1;Lo[l]=C}const ea=4294967295;function ut(l,C,m){let R=l;for(let j=0;j<m;j++)R=Lo[(R^C[j])&255]^R>>>8;return R}function vA(l,C){return(ut(ea,l,C)^ea)>>>0}function yA(l,C,m){const R=l.readUint32(),j=vA(new Uint8Array(l.buffer,l.byteOffset+l.offset-C-4,C),C);if(j!==R)throw new Error(`CRC mismatch for chunk ${m}. Expected ${R}, found ${j}`)}function Yl(l,C){l.writeUint32(vA(new Uint8Array(l.buffer,l.byteOffset+l.offset-C,C),C))}function La(l,C,m){for(let R=0;R<m;R++)C[R]=l[R]}function Uo(l,C,m,R){let j=0;for(;j<R;j++)C[j]=l[j];for(;j<m;j++)C[j]=l[j]+C[j-R]&255}function Ro(l,C,m,R){let j=0;if(m.length===0)for(;j<R;j++)C[j]=l[j];else for(;j<R;j++)C[j]=l[j]+m[j]&255}function ko(l,C,m,R,j){let Ae=0;if(m.length===0){for(;Ae<j;Ae++)C[Ae]=l[Ae];for(;Ae<R;Ae++)C[Ae]=l[Ae]+(C[Ae-j]>>1)&255}else{for(;Ae<j;Ae++)C[Ae]=l[Ae]+(m[Ae]>>1)&255;for(;Ae<R;Ae++)C[Ae]=l[Ae]+(C[Ae-j]+m[Ae]>>1)&255}}function jA(l,C,m,R,j){let Ae=0;if(m.length===0){for(;Ae<j;Ae++)C[Ae]=l[Ae];for(;Ae<R;Ae++)C[Ae]=l[Ae]+C[Ae-j]&255}else{for(;Ae<j;Ae++)C[Ae]=l[Ae]+m[Ae]&255;for(;Ae<R;Ae++)C[Ae]=l[Ae]+Mn(C[Ae-j],m[Ae],m[Ae-j])&255}}function Mn(l,C,m){const R=l+C-m,j=Math.abs(R-l),Ae=Math.abs(R-C),Ze=Math.abs(R-m);return j<=Ae&&j<=Ze?l:Ae<=Ze?C:m}function Ua(l,C,m,R,j,Ae){switch(l){case 0:La(C,m,j);break;case 1:Uo(C,m,j,Ae);break;case 2:Ro(C,m,R,j);break;case 3:ko(C,m,R,j,Ae);break;case 4:jA(C,m,R,j,Ae);break;default:throw new Error(`Unsupported filter: ${l}`)}}const XA=new Uint16Array([255]),_s=new Uint8Array(XA.buffer)[0]===255;function Fs(l){const{data:C,width:m,height:R,channels:j,depth:Ae}=l,Ze=[{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(Ae/8)*j,sn=new Uint8Array(R*m*Ne);let Oe=0;for(let nt=0;nt<7;nt++){const Pn=Ze[nt],dn=Math.ceil((m-Pn.x)/Pn.xStep),zt=Math.ceil((R-Pn.y)/Pn.yStep);if(dn<=0||zt<=0)continue;const Vn=dn*Ne,ui=new Uint8Array(Vn);for(let Tr=0;Tr<zt;Tr++){const _r=C[Oe++],Kr=C.subarray(Oe,Oe+Vn);Oe+=Vn;const hr=new Uint8Array(Vn);Ua(_r,Kr,hr,ui,Vn,Ne),ui.set(hr);for(let cn=0;cn<dn;cn++){const Dr=Pn.x+cn*Pn.xStep,wi=Pn.y+Tr*Pn.yStep;if(!(Dr>=m||wi>=R))for(let Ar=0;Ar<Ne;Ar++)sn[(wi*m+Dr)*Ne+Ar]=hr[cn*Ne+Ar]}}}if(Ae===16){const nt=new Uint16Array(sn.buffer);if(_s)for(let Pn=0;Pn<nt.length;Pn++)nt[Pn]=Qo(nt[Pn]);return nt}else return sn}function Qo(l){return(l&255)<<8|l>>8&255}const Ra=new Uint16Array([255]),xl=new Uint8Array(Ra.buffer)[0]===255,EA=new Uint8Array(0);function Oo(l){const{data:C,width:m,height:R,channels:j,depth:Ae}=l,Ze=Math.ceil(Ae/8)*j,Ne=Math.ceil(Ae/8*j*m),sn=new Uint8Array(R*Ne);let Oe=EA,nt=0,Pn,dn;for(let zt=0;zt<R;zt++){switch(Pn=C.subarray(nt+1,nt+1+Ne),dn=sn.subarray(zt*Ne,(zt+1)*Ne),C[nt]){case 0:La(Pn,dn,Ne);break;case 1:Uo(Pn,dn,Ne,Ze);break;case 2:Ro(Pn,dn,Oe,Ne);break;case 3:ko(Pn,dn,Oe,Ne,Ze);break;case 4:jA(Pn,dn,Oe,Ne,Ze);break;default:throw new Error(`Unsupported filter: ${C[nt]}`)}Oe=dn,nt+=Ne+1}if(Ae===16){const zt=new Uint16Array(sn.buffer);if(xl)for(let Vn=0;Vn<zt.length;Vn++)zt[Vn]=ua(zt[Vn]);return zt}else return sn}function ua(l){return(l&255)<<8|l>>8&255}const As=Uint8Array.of(137,80,78,71,13,10,26,10);function qa(l){l.writeBytes(As)}function qA(l){if(!Po(l.readBytes(As.length)))throw new Error("wrong PNG signature")}function Po(l){if(l.length<As.length)return!1;for(let C=0;C<As.length;C++)if(l[C]!==As[C])return!1;return!0}const BA="tEXt",ca=0,Mo=new TextDecoder("latin1");function No(l){if(eo(l),l.length===0||l.length>79)throw new Error("keyword length must be between 1 and 79")}const Ho=/^[\u0000-\u00FF]*$/;function eo(l){if(!Ho.test(l))throw new Error("invalid latin1 text")}function Ko(l,C,m){const R=bA(C);l[R]=$o(C,m-R.length-1)}function jl(l,C,m){No(C),eo(m);const R=C.length+1+m.length;l.writeUint32(R),l.writeChars(BA),l.writeChars(C),l.writeByte(ca),l.writeChars(m),writeCrc(l,R+4)}function bA(l){for(l.mark();l.readByte()!==ca;);const C=l.offset;l.reset();const m=Mo.decode(l.readBytes(C-l.offset-1));return l.skip(1),No(m),m}function $o(l,C){return Mo.decode(l.readBytes(C))}const ji={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},eA={UNKNOWN:-1,DEFLATE:0},Go={UNKNOWN:-1,ADAPTIVE:0},to={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},ka={NONE:0,BACKGROUND:1,PREVIOUS:2},CA={SOURCE:0,OVER:1};class xA extends Ce{constructor(m,R={}){super(m);di(this,"_checkCrc");di(this,"_inflator");di(this,"_png");di(this,"_apng");di(this,"_end");di(this,"_hasPalette");di(this,"_palette");di(this,"_hasTransparency");di(this,"_transparency");di(this,"_compressionMethod");di(this,"_filterMethod");di(this,"_interlaceMethod");di(this,"_colorType");di(this,"_isAnimated");di(this,"_numberOfFrames");di(this,"_numberOfPlays");di(this,"_frames");di(this,"_writingDataChunks");const{checkCrc:j=!1}=R;this._checkCrc=j,this._inflator=new Xa,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=eA.UNKNOWN,this._filterMethod=Go.UNKNOWN,this._interlaceMethod=to.UNKNOWN,this._colorType=ji.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(qA(this);!this._end;){const m=this.readUint32(),R=this.readChars(4);this.decodeChunk(m,R)}return this.decodeImage(),this._png}decodeApng(){for(qA(this);!this._end;){const m=this.readUint32(),R=this.readChars(4);this.decodeApngChunk(m,R)}return this.decodeApngImage(),this._apng}decodeChunk(m,R){const j=this.offset;switch(R){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(m);break;case"IDAT":this.decodeIDAT(m);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(m);break;case"iCCP":this.decodeiCCP(m);break;case BA:Ko(this._png.text,this,m);break;case"pHYs":this.decodepHYs();break;default:this.skip(m);break}if(this.offset-j!==m)throw new Error(`Length mismatch while decoding chunk ${R}`);this._checkCrc?yA(this,m+4,R):this.skip(4)}decodeApngChunk(m,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(m);break;default:this.decodeChunk(m,R),this.offset=j+m;break}if(this.offset-j!==m)throw new Error(`Length mismatch while decoding chunk ${R}`);this._checkCrc?yA(this,m+4,R):this.skip(4)}decodeIHDR(){const m=this._png;m.width=this.readUint32(),m.height=this.readUint32(),m.depth=Sl(this.readUint8());const R=this.readUint8();this._colorType=R;let j;switch(R){case ji.GREYSCALE:j=1;break;case ji.TRUECOLOUR:j=3;break;case ji.INDEXED_COLOUR:j=1;break;case ji.GREYSCALE_ALPHA:j=2;break;case ji.TRUECOLOUR_ALPHA:j=4;break;case ji.UNKNOWN:default:throw new Error(`Unknown color type: ${R}`)}if(this._png.channels=j,this._compressionMethod=this.readUint8(),this._compressionMethod!==eA.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 m={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(m)}decodePLTE(m){if(m%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${m}`);const R=m/3;this._hasPalette=!0;const j=[];this._palette=j;for(let Ae=0;Ae<R;Ae++)j.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(m){this._writingDataChunks=!0;const R=m,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(m)}decodeFDAT(m){this._writingDataChunks=!0;let R=m,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(m)}decodetRNS(m){switch(this._colorType){case ji.GREYSCALE:case ji.TRUECOLOUR:{if(m%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${m}`);if(m/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${m/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(m/2);for(let R=0;R<m/2;R++)this._transparency[R]=this.readUint16();break}case ji.INDEXED_COLOUR:{if(m>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${m} vs ${this._palette.length})`);let R=0;for(;R<m;R++){const j=this.readByte();this._palette[R].push(j)}for(;R<this._palette.length;R++)this._palette[R].push(255);break}case ji.UNKNOWN:case ji.GREYSCALE_ALPHA:case ji.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(m){const R=bA(this),j=this.readUint8();if(j!==eA.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${j}`);const Ae=this.readBytes(m-R.length-2);this._png.iccEmbeddedProfile={name:R,profile:Do(Ae)}}decodepHYs(){const m=this.readUint32(),R=this.readUint32(),j=this.readByte();this._png.resolution={x:m,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 m=0;m<this._numberOfFrames;m++){const R={sequenceNumber:this._frames[m].sequenceNumber,delayNumber:this._frames[m].delayNumber,delayDenominator:this._frames[m].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(m);if(j){if(j.data=Oo({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),m===0||j.xOffset===0&&j.yOffset===0&&j.width===this._png.width&&j.height===this._png.height)R.data=j.data;else{const Ae=this._apng.frames.at(m-1);this.disposeFrame(j,Ae,R),this.addFrameDataToCanvas(R,j)}this._apng.frames.push(R)}}return this._apng}disposeFrame(m,R,j){switch(m.disposeOp){case ka.NONE:break;case ka.BACKGROUND:for(let Ae=0;Ae<this._png.height;Ae++)for(let Ze=0;Ze<this._png.width;Ze++){const Ne=(Ae*m.width+Ze)*this._png.channels;for(let sn=0;sn<this._png.channels;sn++)j.data[Ne+sn]=0}break;case ka.PREVIOUS:j.data.set(R.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(m,R){const j=1<<this._png.depth,Ae=(Ze,Ne)=>{const sn=((Ze+R.yOffset)*this._png.width+R.xOffset+Ne)*this._png.channels,Oe=(Ze*R.width+Ne)*this._png.channels;return{index:sn,frameIndex:Oe}};switch(R.blendOp){case CA.SOURCE:for(let Ze=0;Ze<R.height;Ze++)for(let Ne=0;Ne<R.width;Ne++){const{index:sn,frameIndex:Oe}=Ae(Ze,Ne);for(let nt=0;nt<this._png.channels;nt++)m.data[sn+nt]=R.data[Oe+nt]}break;case CA.OVER:for(let Ze=0;Ze<R.height;Ze++)for(let Ne=0;Ne<R.width;Ne++){const{index:sn,frameIndex:Oe}=Ae(Ze,Ne);for(let nt=0;nt<this._png.channels;nt++){const Pn=R.data[Oe+this._png.channels-1]/j,dn=nt%(this._png.channels-1)===0?1:R.data[Oe+nt],zt=Math.floor(Pn*dn+(1-Pn)*m.data[sn+nt]);m.data[sn+nt]+=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 m=this._isAnimated?((R=this._frames)==null?void 0:R.at(0)).data:this._inflator.result;if(this._filterMethod!==Go.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===to.NO_INTERLACE)this._png.data=Oo({data:m,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===to.ADAM7)this._png.data=Fs({data:m,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 m=this._inflator.result,R=this._frames.at(-1);R?R.data=m:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:ka.NONE,blendOp:CA.SOURCE,data:m}),this._inflator=new Xa,this._writingDataChunks=!1}}function Sl(l){if(l!==1&&l!==2&&l!==4&&l!==8&&l!==16)throw new Error(`invalid bit depth: ${l}`);return l}const SA={level:3};class Vo extends null{constructor(m,R={}){var j;super();di(this,"_png");di(this,"_zlibOptions");di(this,"_colorType");di(this,"_interlaceMethod");this._colorType=ColorType.UNKNOWN,this._zlibOptions=Fc(Fc({},SA),R.zlib),this._png=this._checkData(m),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[m,R]of Object.entries(this._png.text))encodetEXt(this,m,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 m=((R=this._png.palette)==null?void 0:R.length)*3;this.writeUint32(m),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+m)}encodeTRNS(){const m=this._png.palette.filter(R=>R.at(-1)!==255);this.writeUint32(m.length),this.writeChars("tRNS");for(const R of m)this.writeByte(R.at(-1));writeCrc(this,4+m.length)}encodeIDAT(m){this.writeUint32(m.length),this.writeChars("IDAT"),this.writeBytes(m),writeCrc(this,m.length+4)}encodeData(){const{width:m,height:R,channels:j,depth:Ae,data:Ze}=this._png,Ne=Ae<=8?Math.ceil(m*Ae/8)*j:Math.ceil(m*Ae/8*j/2),sn=new IOBuffer().setBigEndian();let Oe=0;if(this._interlaceMethod===InterlaceMethod.NO_INTERLACE)for(let dn=0;dn<R;dn++)sn.writeByte(0),Ae===16?Oe=Wo(Ze,sn,Ne,Oe):Oe=Xl(Ze,sn,Ne,Oe);else this._interlaceMethod===InterlaceMethod.ADAM7&&(Oe=os(this._png,Ze,sn,Oe));const nt=sn.toArray(),Pn=deflate(nt,this._zlibOptions);this.encodeIDAT(Pn)}_checkData(m){const{colorType:R,channels:j,depth:Ae}=FA(m,m.palette),Ze={width:tA(m.width,"width"),height:tA(m.height,"height"),channels:j,data:m.data,depth:Ae,text:m.text,palette:m.palette};this._colorType=R;const Ne=Ae<8?Math.ceil(Ze.width*Ae/8)*Ze.height*j:Ze.width*Ze.height*j;if(Ze.data.length!==Ne)throw new RangeError(`wrong data size. Found ${Ze.data.length}, expected ${Ne}`);return Ze}}function tA(l,C){if(Number.isInteger(l)&&l>0)return l;throw new TypeError(`${C} must be a positive integer`)}function FA(l,C){const{channels:m=4,depth:R=8}=l;if(m!==4&&m!==3&&m!==2&&m!==1)throw new RangeError(`unsupported number of channels: ${m}`);const j={channels:m,depth:R,colorType:ColorType.UNKNOWN};switch(m){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 Xl(l,C,m,R){for(let j=0;j<m;j++)C.writeByte(l[R++]);return R}function os(l,C,m,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:Ae,height:Ze,channels:Ne,depth:sn}=l;let Oe=0;sn===16?Oe=Ne*sn/8/2:Oe=Ne*sn/8;for(let nt=0;nt<7;nt++){const Pn=j[nt],dn=Math.floor((Ae-Pn.x+Pn.xStep-1)/Pn.xStep),zt=Math.floor((Ze-Pn.y+Pn.yStep-1)/Pn.yStep);if(dn<=0||zt<=0)continue;const Vn=dn*Oe;for(let ui=0;ui<zt;ui++){const Tr=Pn.y+ui*Pn.yStep,_r=sn<=8?new Uint8Array(Vn):new Uint16Array(Vn);let Kr=0;for(let hr=0;hr<dn;hr++){const cn=Pn.x+hr*Pn.xStep;if(cn<Ae&&Tr<Ze){const Dr=(Tr*Ae+cn)*Oe;for(let wi=0;wi<Oe;wi++)_r[Kr++]=C[Dr+wi]}}if(m.writeByte(0),sn===8)m.writeBytes(_r);else if(sn===16)for(const hr of _r)m.writeByte(hr>>8&255),m.writeByte(hr&255)}}return R}function Wo(l,C,m,R){for(let j=0;j<m;j++)C.writeUint16(l[R++]);return R}var TA;(function(l){l[l.UNKNOWN=0]="UNKNOWN",l[l.METRE=1]="METRE"})(TA||(TA={}));function Ms(l,C){return new xA(l,C).decode()}function Fl(l,C){return new PngEncoder(l,C).encode()}function Tl(l,C){return new PngDecoder(l,C).decodeApng()}},6330:function(Un,Ft,Y){"use strict";Y.d(Ft,{iZ:function(){return gn}});var te={},Te=function(M,N,de,ve,Ke){var tt=new Worker(te[N]||(te[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 tt.onmessage=function(Et){var bt=Et.data,$t=bt.$e$;if($t){var Dt=new Error($t[0]);Dt.code=$t[1],Dt.stack=$t[2],Ke(Dt,null)}else Ke(null,bt)},tt.postMessage(de,ve),tt},He=Uint8Array,be=Uint16Array,ee=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]),Ce=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 de=new be(31),ve=0;ve<31;++ve)de[ve]=N+=1<<M[ve-1];for(var Ke=new ee(de[30]),ve=1;ve<30;++ve)for(var tt=de[ve];tt<de[ve+1];++tt)Ke[tt]=tt-de[ve]<<5|ve;return{b:de,r:Ke}},le=o(y,2),O=le.b,B=le.r;O[28]=258,B[258]=28;for(var E=o(Ce,0),F=E.b,L=E.r,ae=new be(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 K=function(M,N,de){for(var ve=M.length,Ke=0,tt=new be(N);Ke<ve;++Ke)M[Ke]&&++tt[M[Ke]-1];var Et=new be(N);for(Ke=1;Ke<N;++Ke)Et[Ke]=Et[Ke-1]+tt[Ke-1]<<1;var bt;if(de){bt=new be(1<<N);var $t=15-N;for(Ke=0;Ke<ve;++Ke)if(M[Ke])for(var Dt=Ke<<4|M[Ke],Le=N-M[Ke],rt=Et[M[Ke]-1]++<<Le,Ot=rt|(1<<Le)-1;rt<=Ot;++rt)bt[ae[rt]>>$t]=Dt}else for(bt=new be(ve),Ke=0;Ke<ve;++Ke)M[Ke]&&(bt[Ke]=ae[Et[M[Ke]-1]++]>>15-M[Ke]);return bt},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=K(z,9,0),De=null,ke=K(oe,5,0),pe=null,Ue=function(M){for(var N=M[0],de=1;de<M.length;++de)M[de]>N&&(N=M[de]);return N},Xe=function(M,N,de){var ve=N/8|0;return(M[ve]|M[ve+1]<<8)>>(N&7)&de},Ee=function(M,N){var de=N/8|0;return(M[de]|M[de+1]<<8|M[de+2]<<16)>>(N&7)},et=function(M){return(M+7)/8|0},ne=function(M,N,de){return(N==null||N<0)&&(N=0),(de==null||de>M.length)&&(de=M.length),new He(M.subarray(N,de))},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"],ie=function(M,N,de){var ve=new Error(N||q[M]);if(ve.code=M,Error.captureStackTrace&&Error.captureStackTrace(ve,ie),!de)throw ve;return ve},ge=function(M,N,de,ve){var Ke=M.length,tt=ve?ve.length:0;if(!Ke||N.f&&!N.l)return de||new He(0);var Et=!de,bt=Et||N.i!=2,$t=N.i;Et&&(de=new He(Ke*3));var Dt=function(ki){var Er=de.length;if(ki>Er){var Gi=new He(Math.max(Er*2,ki));Gi.set(de),de=Gi}},Le=N.f||0,rt=N.p||0,Ot=N.b||0,rn=N.l,un=N.d,en=N.m,an=N.n,An=Ke*8;do{if(!rn){Le=Xe(M,rt,1);var Kn=Xe(M,rt+1,3);if(rt+=3,Kn)if(Kn==1)rn=De,un=pe,en=9,an=5;else if(Kn==2){var Ln=Xe(M,rt,31)+257,cr=Xe(M,rt+10,15)+4,zn=Ln+Xe(M,rt+5,31)+1;rt+=14;for(var Rn=new He(zn),yr=new He(19),er=0;er<cr;++er)yr[V[er]]=Xe(M,rt+er*3,7);rt+=cr*3;for(var wr=Ue(yr),Lr=(1<<wr)-1,Vr=K(yr,wr,1),er=0;er<zn;){var Qr=Vr[Xe(M,rt,Lr)];rt+=Qr&15;var Fn=Qr>>4;if(Fn<16)Rn[er++]=Fn;else{var Ur=0,fr=0;for(Fn==16?(fr=3+Xe(M,rt,3),rt+=2,Ur=Rn[er-1]):Fn==17?(fr=3+Xe(M,rt,7),rt+=3):Fn==18&&(fr=11+Xe(M,rt,127),rt+=7);fr--;)Rn[er++]=Ur}}var Rr=Rn.subarray(0,Ln),pr=Rn.subarray(Ln);en=Ue(Rr),an=Ue(pr),rn=K(Rr,en,1),un=K(pr,an,1)}else ie(1);else{var Fn=et(rt)+4,hn=M[Fn-4]|M[Fn-3]<<8,On=Fn+hn;if(On>Ke){$t&&ie(0);break}bt&&Dt(Ot+hn),de.set(M.subarray(Fn,On),Ot),N.b=Ot+=hn,N.p=rt=On*8,N.f=Le;continue}if(rt>An){$t&&ie(0);break}}bt&&Dt(Ot+131072);for(var Ui=(1<<en)-1,Hr=(1<<an)-1,Or=rt;;Or=rt){var Ur=rn[Ee(M,rt)&Ui],qr=Ur>>4;if(rt+=Ur&15,rt>An){$t&&ie(0);break}if(Ur||ie(2),qr<256)de[Ot++]=qr;else if(qr==256){Or=rt,rn=null;break}else{var Tn=qr-254;if(qr>264){var er=qr-257,Wr=y[er];Tn=Xe(M,rt,(1<<Wr)-1)+O[er],rt+=Wr}var Ti=un[Ee(M,rt)&Hr],Si=Ti>>4;Ti||ie(3),rt+=Ti&15;var pr=F[Si];if(Si>3){var Wr=Ce[Si];pr+=Ee(M,rt)&(1<<Wr)-1,rt+=Wr}if(rt>An){$t&&ie(0);break}bt&&Dt(Ot+131072);var $i=Ot+Tn;if(Ot<pr){var ss=tt-pr,ls=Math.min(pr,$i);for(ss+Ot<0&&ie(3);Ot<ls;++Ot)de[Ot]=ve[ss+Ot]}for(;Ot<$i;++Ot)de[Ot]=de[Ot-pr]}}N.l=rn,N.p=Or,N.b=Ot,N.f=Le,rn&&(Le=1,N.m=en,N.d=un,N.n=an)}while(!Le);return Ot!=de.length&&Et?ne(de,0,Ot):de.subarray(0,Ot)},he=function(M,N,de){de<<=N&7;var ve=N/8|0;M[ve]|=de,M[ve+1]|=de>>8},b=function(M,N,de){de<<=N&7;var ve=N/8|0;M[ve]|=de,M[ve+1]|=de>>8,M[ve+2]|=de>>16},S=function(M,N){for(var de=[],ve=0;ve<M.length;++ve)M[ve]&&de.push({s:ve,f:M[ve]});var Ke=de.length,tt=de.slice();if(!Ke)return{t:on,l:0};if(Ke==1){var Et=new He(de[0].s+1);return Et[de[0].s]=1,{t:Et,l:1}}de.sort(function(On,Ln){return On.f-Ln.f}),de.push({s:-1,f:25001});var bt=de[0],$t=de[1],Dt=0,Le=1,rt=2;for(de[0]={s:-1,f:bt.f+$t.f,l:bt,r:$t};Le!=Ke-1;)bt=de[de[Dt].f<de[rt].f?Dt++:rt++],$t=de[Dt!=Le&&de[Dt].f<de[rt].f?Dt++:rt++],de[Le++]={s:-1,f:bt.f+$t.f,l:bt,r:$t};for(var Ot=tt[0].s,ve=1;ve<Ke;++ve)tt[ve].s>Ot&&(Ot=tt[ve].s);var rn=new be(Ot+1),un=W(de[Le-1],rn,0);if(un>N){var ve=0,en=0,an=un-N,An=1<<an;for(tt.sort(function(Ln,cr){return rn[cr.s]-rn[Ln.s]||Ln.f-cr.f});ve<Ke;++ve){var Kn=tt[ve].s;if(rn[Kn]>N)en+=An-(1<<un-rn[Kn]),rn[Kn]=N;else break}for(en>>=an;en>0;){var Fn=tt[ve].s;rn[Fn]<N?en-=1<<N-rn[Fn]++-1:++ve}for(;ve>=0&&en;--ve){var hn=tt[ve].s;rn[hn]==N&&(--rn[hn],++en)}un=N}return{t:new He(rn),l:un}},W=function(M,N,de){return M.s==-1?Math.max(W(M.l,N,de+1),W(M.r,N,de+1)):N[M.s]=de},_e=function(M){for(var N=M.length;N&&!M[--N];);for(var de=new be(++N),ve=0,Ke=M[0],tt=1,Et=function($t){de[ve++]=$t},bt=1;bt<=N;++bt)if(M[bt]==Ke&&bt!=N)++tt;else{if(!Ke&&tt>2){for(;tt>138;tt-=138)Et(32754);tt>2&&(Et(tt>10?tt-11<<5|28690:tt-3<<5|12305),tt=0)}else if(tt>3){for(Et(Ke),--tt;tt>6;tt-=6)Et(8304);tt>2&&(Et(tt-3<<5|8208),tt=0)}for(;tt--;)Et(Ke);tt=1,Ke=M[bt]}return{c:de.subarray(0,ve),n:N}},Je=function(M,N){for(var de=0,ve=0;ve<N.length;++ve)de+=M[ve]*N[ve];return de},mt=function(M,N,de){var ve=de.length,Ke=et(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 tt=0;tt<ve;++tt)M[Ke+tt+4]=de[tt];return(Ke+4+ve)*8},Gt=function(M,N,de,ve,Ke,tt,Et,bt,$t,Dt,Le){he(N,Le++,de),++Ke[256];for(var rt=S(Ke,15),Ot=rt.t,rn=rt.l,un=S(tt,15),en=un.t,an=un.l,An=_e(Ot),Kn=An.c,Fn=An.n,hn=_e(en),On=hn.c,Ln=hn.n,cr=new be(19),zn=0;zn<Kn.length;++zn)++cr[Kn[zn]&31];for(var zn=0;zn<On.length;++zn)++cr[On[zn]&31];for(var Rn=S(cr,7),yr=Rn.t,er=Rn.l,wr=19;wr>4&&!yr[V[wr-1]];--wr);var Lr=Dt+5<<3,Vr=Je(Ke,z)+Je(tt,oe)+Et,Qr=Je(Ke,Ot)+Je(tt,en)+Et+14+3*wr+Je(cr,yr)+2*cr[16]+3*cr[17]+7*cr[18];if($t>=0&&Lr<=Vr&&Lr<=Qr)return mt(N,Le,M.subarray($t,$t+Dt));var Ur,fr,Rr,pr;if(he(N,Le,1+(Qr<Vr)),Le+=2,Qr<Vr){Ur=K(Ot,rn,0),fr=Ot,Rr=K(en,an,0),pr=en;var Ui=K(yr,er,0);he(N,Le,Fn-257),he(N,Le+5,Ln-1),he(N,Le+10,wr-4),Le+=14;for(var zn=0;zn<wr;++zn)he(N,Le+3*zn,yr[V[zn]]);Le+=3*wr;for(var Hr=[Kn,On],Or=0;Or<2;++Or)for(var qr=Hr[Or],zn=0;zn<qr.length;++zn){var Tn=qr[zn]&31;he(N,Le,Ui[Tn]),Le+=yr[Tn],Tn>15&&(he(N,Le,qr[zn]>>5&127),Le+=qr[zn]>>12)}}else Ur=Be,fr=z,Rr=ke,pr=oe;for(var zn=0;zn<bt;++zn){var Wr=ve[zn];if(Wr>255){var Tn=Wr>>18&31;b(N,Le,Ur[Tn+257]),Le+=fr[Tn+257],Tn>7&&(he(N,Le,Wr>>23&31),Le+=y[Tn]);var Ti=Wr&31;b(N,Le,Rr[Ti]),Le+=pr[Ti],Ti>3&&(b(N,Le,Wr>>5&8191),Le+=Ce[Ti])}else b(N,Le,Ur[Wr]),Le+=fr[Wr]}return b(N,Le,Ur[256]),Le+fr[256]},Qt=new ee([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),on=new He(0),Zt=function(M,N,de,ve,Ke,tt){var Et=tt.z||M.length,bt=new He(ve+Et+5*(1+Math.ceil(Et/7e3))+Ke),$t=bt.subarray(ve,bt.length-Ke),Dt=tt.l,Le=(tt.r||0)&7;if(N){Le&&($t[0]=tt.r>>3);for(var rt=Qt[N-1],Ot=rt>>13,rn=rt&8191,un=(1<<de)-1,en=tt.p||new be(32768),an=tt.h||new be(un+1),An=Math.ceil(de/3),Kn=2*An,Fn=function(gs){return(M[gs]^M[gs+1]<<An^M[gs+2]<<Kn)&un},hn=new ee(25e3),On=new be(288),Ln=new be(32),cr=0,zn=0,Rn=tt.i||0,yr=0,er=tt.w||0,wr=0;Rn+2<Et;++Rn){var Lr=Fn(Rn),Vr=Rn&32767,Qr=an[Lr];if(en[Vr]=Qr,an[Lr]=Vr,er<=Rn){var Ur=Et-Rn;if((cr>7e3||yr>24576)&&(Ur>423||!Dt)){Le=Gt(M,$t,0,hn,On,Ln,zn,yr,wr,Rn-wr,Le),yr=cr=zn=0,wr=Rn;for(var fr=0;fr<286;++fr)On[fr]=0;for(var fr=0;fr<30;++fr)Ln[fr]=0}var Rr=2,pr=0,Ui=rn,Hr=Vr-Qr&32767;if(Ur>2&&Lr==Fn(Rn-Hr))for(var Or=Math.min(Ot,Ur)-1,qr=Math.min(32767,Rn),Tn=Math.min(258,Ur);Hr<=qr&&--Ui&&Vr!=Qr;){if(M[Rn+Rr]==M[Rn+Rr-Hr]){for(var Wr=0;Wr<Tn&&M[Rn+Wr]==M[Rn+Wr-Hr];++Wr);if(Wr>Rr){if(Rr=Wr,pr=Hr,Wr>Or)break;for(var Ti=Math.min(Hr,Wr-2),Si=0,fr=0;fr<Ti;++fr){var $i=Rn-Hr+fr&32767,ss=en[$i],ls=$i-ss&32767;ls>Si&&(Si=ls,Qr=$i)}}}Vr=Qr,Qr=en[Vr],Hr+=Vr-Qr&32767}if(pr){hn[yr++]=268435456|B[Rr]<<18|L[pr];var ki=B[Rr]&31,Er=L[pr]&31;zn+=y[ki]+Ce[Er],++On[257+ki],++Ln[Er],er=Rn+Rr,++cr}else hn[yr++]=M[Rn],++On[M[Rn]]}}for(Rn=Math.max(Rn,er);Rn<Et;++Rn)hn[yr++]=M[Rn],++On[M[Rn]];Le=Gt(M,$t,Dt,hn,On,Ln,zn,yr,wr,Rn-wr,Le),Dt||(tt.r=Le&7|$t[Le/8|0]<<3,Le-=7,tt.h=an,tt.p=en,tt.i=Rn,tt.w=er)}else{for(var Rn=tt.w||0;Rn<Et+Dt;Rn+=65535){var Gi=Rn+65535;Gi>=Et&&($t[Le/8|0]=Dt,Gi=Et),Le=mt($t,Le+1,M.subarray(Rn,Gi))}tt.i=Et}return ne(bt,0,ve+et(Le)+Ke)},Rt=null,je=function(){var M=-1;return{p:function(N){for(var de=M,ve=0;ve<N.length;++ve)de=Rt[de&255^N[ve]]^de>>>8;M=de},d:function(){return~M}}},ht=function(){var M=1,N=0;return{p:function(de){for(var ve=M,Ke=N,tt=de.length|0,Et=0;Et!=tt;){for(var bt=Math.min(Et+2655,tt);Et<bt;++Et)Ke+=ve+=de[Et];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}}},At=function(M,N,de,ve,Ke){if(!Ke&&(Ke={l:1},N.dictionary)){var tt=N.dictionary.subarray(-32768),Et=new He(tt.length+M.length);Et.set(tt),Et.set(M,tt.length),M=Et,Ke.w=tt.length}return Zt(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,de,ve,Ke)},ct=function(M,N){var de={};for(var ve in M)de[ve]=M[ve];for(var ve in N)de[ve]=N[ve];return de},tn=function(M,N,de){for(var ve=M(),Ke=M.toString(),tt=Ke.slice(Ke.indexOf("[")+1,Ke.lastIndexOf("]")).replace(/\s+/g,"").split(","),Et=0;Et<ve.length;++Et){var bt=ve[Et],$t=tt[Et];if(typeof bt=="function"){N+=";"+$t+"=";var Dt=bt.toString();if(bt.prototype)if(Dt.indexOf("[native code]")!=-1){var Le=Dt.indexOf(" ",8)+1;N+=Dt.slice(Le,Dt.indexOf("(",Le))}else{N+=Dt;for(var rt in bt.prototype)N+=";"+$t+".prototype."+rt+"="+bt.prototype[rt].toString()}else N+=Dt}else de[$t]=bt}return N},Re=null,P=function(M){var N=[];for(var de in M)M[de].buffer&&N.push((M[de]=new M[de].constructor(M[de])).buffer);return N},v=function(M,N,de,ve){if(!Re[de]){for(var Ke="",tt={},Et=M.length-1,bt=0;bt<Et;++bt)Ke=tn(M[bt],Ke,tt);Re[de]={c:tn(M[Et],Ke,tt),e:tt}}var $t=ct({},Re[de].e);return Te(Re[de].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+N.toString()+"}",de,$t,P($t),ve)},T=function(){return[He,be,ee,y,Ce,V,O,F,De,pe,ae,q,K,Ue,Xe,Ee,et,ne,ie,ge,Fe,We,ot]},X=function(){return[He,be,ee,y,Ce,V,B,L,Be,z,ke,oe,ae,Qt,on,K,he,b,S,W,_e,Je,mt,Gt,et,ne,Zt,At,Xt,We]},k=function(){return[pt,fn,at,je,Rt]},$=function(){return[It,Ht]},fe=function(){return[Yt,at,ht]},Me=function(){return[mn]},We=function(M){return postMessage(M,[M.buffer])},ot=function(M){return M&&{out:M.size&&new He(M.size),dictionary:M.dictionary}},ft=function(M,N,de,ve,Ke,tt){var Et=v(de,ve,Ke,function(bt,$t){Et.terminate(),tt(bt,$t)});return Et.postMessage([M,N],N.consume?[M.buffer]:[]),function(){Et.terminate()}},jt=function(M){return M.ondata=function(N,de){return postMessage([N,de],[N.buffer])},function(N){N.data.length?(M.push(N.data[0],N.data[1]),postMessage([N.data[0].length])):M.flush()}},_t=function(M,N,de,ve,Ke,tt,Et){var bt,$t=v(M,ve,Ke,function(Dt,Le){Dt?($t.terminate(),N.ondata.call(N,Dt)):Array.isArray(Le)?Le.length==1?(N.queuedSize-=Le[0],N.ondrain&&N.ondrain(Le[0])):(Le[1]&&$t.terminate(),N.ondata.call(N,Dt,Le[0],Le[1])):Et(Le)});$t.postMessage(de),N.queuedSize=0,N.push=function(Dt,Le){N.ondata||ie(5),bt&&N.ondata(ie(4,0,1),null,!!Le),N.queuedSize+=Dt.length,$t.postMessage([Dt,bt=Le],[Dt.buffer])},N.terminate=function(){$t.terminate()},tt&&(N.flush=function(){$t.postMessage([])})},Lt=function(M,N){return M[N]|M[N+1]<<8},vt=function(M,N){return(M[N]|M[N+1]<<8|M[N+2]<<16|M[N+3]<<24)>>>0},Ct=function(M,N){return vt(M,N)+vt(M,N+4)*4294967296},at=function(M,N,de){for(;de;++N)M[N]=de,de>>>=8},pt=function(M,N){var de=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)),de){M[3]=8;for(var ve=0;ve<=de.length;++ve)M[ve+10]=de.charCodeAt(ve)}},It=function(M){(M[0]!=31||M[1]!=139||M[2]!=8)&&ie(6,"invalid gzip data");var N=M[3],de=10;N&4&&(de+=(M[10]|M[11]<<8)+2);for(var ve=(N>>3&1)+(N>>4&1);ve>0;ve-=!M[de++]);return de+(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},fn=function(M){return 10+(M.filename?M.filename.length+1:0)},Yt=function(M,N){var de=N.level,ve=de==0?0:de<6?1:de==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=ht();Ke.p(N.dictionary),at(M,2,Ke.d())}},mn=function(M,N){return((M[0]&15)!=8||M[0]>>4>7||(M[0]<<8|M[1])%31)&&ie(6,"invalid zlib data"),(M[1]>>5&1)==+!N&&ie(6,"invalid zlib data: "+(M[1]&32?"need":"unexpected")+" dictionary"),(M[1]>>3&4)+2};function ln(M,N){return typeof M=="function"&&(N=M,M={}),this.ondata=N,M}var yn=null,$n=null;function dr(M,N,de){return de||(de=N,N={}),typeof de!="function"&&ie(7),ft(M,N,[X],function(ve){return We(Xt(ve.data[0],ve.data[1]))},0,de)}function Xt(M,N){return At(M,N||{},0,0)}var En=null,$e=null;function Pe(M,N,de){return de||(de=N,N={}),typeof de!="function"&&ie(7),ft(M,N,[T],function(ve){return We(Fe(ve.data[0],ot(ve.data[1])))},1,de)}function Fe(M,N){return ge(M,{i:2},N&&N.out,N&&N.dictionary)}var re=null,ce=null;function me(M,N,de){return de||(de=N,N={}),typeof de!="function"&&ie(7),ft(M,N,[X,k,function(){return[Se]}],function(ve){return We(Se(ve.data[0],ve.data[1]))},2,de)}function Se(M,N){N||(N={});var de=je(),ve=M.length;de.p(M);var Ke=At(M,N,fn(N),8),tt=Ke.length;return pt(Ke,N),at(Ke,tt-8,de.d()),at(Ke,tt-4,ve),Ke}var Qe=null,Tt=null;function Wt(M,N,de){return de||(de=N,N={}),typeof de!="function"&&ie(7),ft(M,N,[T,$,function(){return[Ut]}],function(ve){return We(Ut(ve.data[0],ve.data[1]))},3,de)}function Ut(M,N){var de=It(M);return de+8>M.length&&ie(6,"invalid gzip data"),ge(M.subarray(de,-8),{i:2},N&&N.out||new He(Ht(M)),N&&N.dictionary)}var vn=null,jn=null;function ur(M,N,de){return de||(de=N,N={}),typeof de!="function"&&ie(7),ft(M,N,[X,fe,function(){return[gn]}],function(ve){return We(gn(ve.data[0],ve.data[1]))},4,de)}function gn(M,N){N||(N={});var de=ht();de.p(M);var ve=At(M,N,N.dictionary?6:2,4);return Yt(ve,N),at(ve,ve.length-4,de.d()),ve}var Jt=null,or=null;function mr(M,N,de){return de||(de=N,N={}),typeof de!="function"&&ie(7),ft(M,N,[T,Me,function(){return[Ge]}],function(ve){return We(Ge(ve.data[0],ot(ve.data[1])))},5,de)}function Ge(M,N){return ge(M.subarray(mn(M,N&&N.dictionary),-4),{i:2},N&&N.out,N&&N.dictionary)}var lr=null,ir=null;function rr(M,N,de){return de||(de=N,N={}),typeof de!="function"&&ie(7),M[0]==31&&M[1]==139&&M[2]==8?Wt(M,N,de):(M[0]&15)!=8||M[0]>>4>7||(M[0]<<8|M[1])%31?Pe(M,N,de):mr(M,N,de)}function Jr(M,N){return M[0]==31&&M[1]==139&&M[2]==8?Ut(M,N):(M[0]&15)!=8||M[0]>>4>7||(M[0]<<8|M[1])%31?Fe(M,N):Ge(M,N)}var Sr=function(M,N,de,ve){for(var Ke in M){var tt=M[Ke],Et=N+Ke,bt=ve;Array.isArray(tt)&&(bt=ct(ve,tt[1]),tt=tt[0]),tt instanceof He?de[Et]=[tt,bt]:(de[Et+="/"]=[new He(0),bt],Sr(tt,Et,de,ve))}},li=typeof TextEncoder!="undefined"&&new TextEncoder,Gr=typeof TextDecoder!="undefined"&&new TextDecoder,bi=0;try{Gr.decode(on,{stream:!0}),bi=1}catch(M){}var si=function(M){for(var N="",de=0;;){var ve=M[de++],Ke=(ve>127)+(ve>223)+(ve>239);if(de+Ke>M.length)return{s:N,r:ne(M,de-1)};Ke?Ke==3?(ve=((ve&15)<<18|(M[de++]&63)<<12|(M[de++]&63)<<6|M[de++]&63)-65536,N+=String.fromCharCode(55296|ve>>10,56320|ve&1023)):Ke&1?N+=String.fromCharCode((ve&31)<<6|M[de++]&63):N+=String.fromCharCode((ve&15)<<12|(M[de++]&63)<<6|M[de++]&63):N+=String.fromCharCode(ve)}},vi=null,Xi=null;function Fr(M,N){if(N){for(var de=new He(M.length),ve=0;ve<M.length;++ve)de[ve]=M.charCodeAt(ve);return de}if(li)return li.encode(M);for(var Ke=M.length,tt=new He(M.length+(M.length>>1)),Et=0,bt=function(Le){tt[Et++]=Le},ve=0;ve<Ke;++ve){if(Et+5>tt.length){var $t=new He(Et+8+(Ke-ve<<1));$t.set(tt),tt=$t}var Dt=M.charCodeAt(ve);Dt<128||N?bt(Dt):Dt<2048?(bt(192|Dt>>6),bt(128|Dt&63)):Dt>55295&&Dt<57344?(Dt=65536+(Dt&1047552)|M.charCodeAt(++ve)&1023,bt(240|Dt>>18),bt(128|Dt>>12&63),bt(128|Dt>>6&63),bt(128|Dt&63)):(bt(224|Dt>>12),bt(128|Dt>>6&63),bt(128|Dt&63))}return ne(tt,0,Et)}function xr(M,N){if(N){for(var de="",ve=0;ve<M.length;ve+=16384)de+=String.fromCharCode.apply(null,M.subarray(ve,ve+16384));return de}else{if(Gr)return Gr.decode(M);var Ke=si(M),tt=Ke.s,de=Ke.r;return de.length&&ie(8),tt}}var Nr=function(M){return M==1?3:M<6?2:M==9?1:0},Hi=function(M,N){return N+30+Lt(M,N+26)+Lt(M,N+28)},ai=function(M,N,de){var ve=Lt(M,N+28),Ke=xr(M.subarray(N+46,N+46+ve),!(Lt(M,N+8)&2048)),tt=N+46+ve,Et=vt(M,N+20),bt=de&&Et==4294967295?Ki(M,tt):[Et,vt(M,N+24),vt(M,N+42)],$t=bt[0],Dt=bt[1],Le=bt[2];return[Lt(M,N+10),$t,Dt,Ke,tt+Lt(M,N+30)+Lt(M,N+32),Le]},Ki=function(M,N){for(;Lt(M,N)!=1;N+=4+Lt(M,N+2));return[Ct(M,N+12),Ct(M,N+4),Ct(M,N+20)]},gr=function(M){var N=0;if(M)for(var de in M){var ve=M[de].length;ve>65535&&ie(9),N+=ve+4}return N},Gn=function(M,N,de,ve,Ke,tt,Et,bt){var $t=ve.length,Dt=de.extra,Le=bt&&bt.length,rt=gr(Dt);at(M,N,Et!=null?33639248:67324752),N+=4,Et!=null&&(M[N++]=20,M[N++]=de.os),M[N]=20,N+=2,M[N++]=de.flag<<1|(tt<0&&8),M[N++]=Ke&&8,M[N++]=de.compression&255,M[N++]=de.compression>>8;var Ot=new Date(de.mtime==null?Date.now():de.mtime),rn=Ot.getFullYear()-1980;if((rn<0||rn>119)&&ie(10),at(M,N,rn<<25|Ot.getMonth()+1<<21|Ot.getDate()<<16|Ot.getHours()<<11|Ot.getMinutes()<<5|Ot.getSeconds()>>1),N+=4,tt!=-1&&(at(M,N,de.crc),at(M,N+4,tt<0?-tt-2:tt),at(M,N+8,de.size)),at(M,N+12,$t),at(M,N+14,rt),N+=16,Et!=null&&(at(M,N,Le),at(M,N+6,de.attrs),at(M,N+10,Et),N+=14),M.set(ve,N),N+=$t,rt)for(var un in Dt){var en=Dt[un],an=en.length;at(M,N,+un),at(M,N+2,an),M.set(en,N+4),N+=4+an}return Le&&(M.set(bt,N),N+=Le),N},nn=function(M,N,de,ve,Ke){at(M,N,101010256),at(M,N+8,de),at(M,N+10,de),at(M,N+12,ve),at(M,N+16,Ke)},ze=null,gt=null,Nt=null,yt=null;function Kt(M,N,de){de||(de=N,N={}),typeof de!="function"&&ie(7);var ve={};Sr(M,"",ve,N);var Ke=Object.keys(ve),tt=Ke.length,Et=0,bt=0,$t=tt,Dt=new Array(tt),Le=[],rt=function(){for(var an=0;an<Le.length;++an)Le[an]()},Ot=function(an,An){sr(function(){de(an,An)})};sr(function(){Ot=de});var rn=function(){var an=new He(bt+22),An=Et,Kn=bt-Et;bt=0;for(var Fn=0;Fn<$t;++Fn){var hn=Dt[Fn];try{var On=hn.c.length;Gn(an,bt,hn,hn.f,hn.u,On);var Ln=30+hn.f.length+gr(hn.extra),cr=bt+Ln;an.set(hn.c,cr),Gn(an,Et,hn,hn.f,hn.u,On,bt,hn.m),Et+=16+Ln+(hn.m?hn.m.length:0),bt=cr+On}catch(zn){return Ot(zn,null)}}nn(an,Et,Dt.length,Kn,An),Ot(null,an)};tt||rn();for(var un=function(an){var An=Ke[an],Kn=ve[An],Fn=Kn[0],hn=Kn[1],On=je(),Ln=Fn.length;On.p(Fn);var cr=Fr(An),zn=cr.length,Rn=hn.comment,yr=Rn&&Fr(Rn),er=yr&&yr.length,wr=gr(hn.extra),Lr=hn.level==0?0:8,Vr=function(Qr,Ur){if(Qr)rt(),Ot(Qr,null);else{var fr=Ur.length;Dt[an]=ct(hn,{size:Ln,crc:On.d(),c:Ur,f:cr,m:yr,u:zn!=An.length||yr&&Rn.length!=er,compression:Lr}),Et+=30+zn+wr+fr,bt+=76+2*(zn+wr)+(er||0)+fr,--tt||rn()}};if(zn>65535&&Vr(ie(11,0,1),null),!Lr)Vr(null,Fn);else if(Ln<16e4)try{Vr(null,Xt(Fn,hn))}catch(Qr){Vr(Qr,null)}else Le.push(dr(Fn,hn,Vr))},en=0;en<$t;++en)un(en);return rt}function xt(M,N){N||(N={});var de={},ve=[];Sr(M,"",de,N);var Ke=0,tt=0;for(var Et in de){var bt=de[Et],$t=bt[0],Dt=bt[1],Le=Dt.level==0?0:8,rt=Fr(Et),Ot=rt.length,rn=Dt.comment,un=rn&&Fr(rn),en=un&&un.length,an=gr(Dt.extra);Ot>65535&&ie(11);var An=Le?Xt($t,Dt):$t,Kn=An.length,Fn=je();Fn.p($t),ve.push(ct(Dt,{size:$t.length,crc:Fn.d(),c:An,f:rt,m:un,u:Ot!=Et.length||un&&rn.length!=en,o:Ke,compression:Le})),Ke+=30+Ot+an+Kn,tt+=76+2*(Ot+an)+(en||0)+Kn}for(var hn=new He(tt+22),On=Ke,Ln=tt-Ke,cr=0;cr<ve.length;++cr){var rt=ve[cr];Gn(hn,rt.o,rt,rt.f,rt.u,rt.c.length);var zn=30+rt.f.length+gr(rt.extra);hn.set(rt.c,rt.o+zn),Gn(hn,Ke,rt,rt.f,rt.u,rt.c.length,rt.o,rt.m),Ke+=16+zn+(rt.m?rt.m.length:0)}return nn(hn,Ke,ve.length,Ln,On),hn}var St=null,qt=null,_n=null,xn=null,sr=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(M){M()};function Sn(M,N,de){de||(de=N,N={}),typeof de!="function"&&ie(7);var ve=[],Ke=function(){for(var an=0;an<ve.length;++an)ve[an]()},tt={},Et=function(an,An){sr(function(){de(an,An)})};sr(function(){Et=de});for(var bt=M.length-22;vt(M,bt)!=101010256;--bt)if(!bt||M.length-bt>65558)return Et(ie(13,0,1),null),Ke;var $t=Lt(M,bt+8);if($t){var Dt=$t,Le=vt(M,bt+16),rt=Le==4294967295||Dt==65535;if(rt){var Ot=vt(M,bt-12);rt=vt(M,Ot)==101075792,rt&&(Dt=$t=vt(M,Ot+32),Le=vt(M,Ot+48))}for(var rn=N&&N.filter,un=function(an){var An=ai(M,Le,rt),Kn=An[0],Fn=An[1],hn=An[2],On=An[3],Ln=An[4],cr=An[5],zn=Hi(M,cr);Le=Ln;var Rn=function(er,wr){er?(Ke(),Et(er,null)):(wr&&(tt[On]=wr),--$t||Et(null,tt))};if(!rn||rn({name:On,size:Fn,originalSize:hn,compression:Kn}))if(!Kn)Rn(null,ne(M,zn,zn+Fn));else if(Kn==8){var yr=M.subarray(zn,zn+Fn);if(hn<524288||Fn>.8*hn)try{Rn(null,Fe(yr,{out:new He(hn)}))}catch(er){Rn(er,null)}else ve.push(Pe(yr,{size:hn},Rn))}else Rn(ie(14,"unknown compression type "+Kn,1),null);else Rn(null,null)},en=0;en<Dt;++en)un(en)}else Et(null,{});return Ke}function Xn(M,N){for(var de={},ve=M.length-22;vt(M,ve)!=101010256;--ve)(!ve||M.length-ve>65558)&&ie(13);var Ke=Lt(M,ve+8);if(!Ke)return{};var tt=vt(M,ve+16),Et=tt==4294967295||Ke==65535;if(Et){var bt=vt(M,ve-12);Et=vt(M,bt)==101075792,Et&&(Ke=vt(M,bt+32),tt=vt(M,bt+48))}for(var $t=N&&N.filter,Dt=0;Dt<Ke;++Dt){var Le=ai(M,tt,Et),rt=Le[0],Ot=Le[1],rn=Le[2],un=Le[3],en=Le[4],an=Le[5],An=Hi(M,an);tt=en,(!$t||$t({name:un,size:Ot,originalSize:rn,compression:rt}))&&(rt?rt==8?de[un]=Fe(M.subarray(An,An+Ot),{out:new He(rn)}):ie(14,"unknown compression type "+rt):de[un]=ne(M,An,An+Ot))}return de}},64270:function(Un){(function(Ft,Y){Un.exports=Y()})(this,function(){"use strict";var Ft=function(h,u){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,u)};function Y(h,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");Ft(h,u);function g(){this.constructor=h}h.prototype=u===null?Object.create(u):(g.prototype=u.prototype,new g)}var te=function(){return te=Object.assign||function(u){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)&&(u[U]=g[U])}return u},te.apply(this,arguments)};function Te(h,u,g,d){function x(U){return U instanceof g?U:new g(function(se){se(U)})}return new(g||(g=Promise))(function(U,se){function we(qe){try{Ve(d.next(qe))}catch(dt){se(dt)}}function ye(qe){try{Ve(d.throw(qe))}catch(dt){se(dt)}}function Ve(qe){qe.done?U(qe.value):x(qe.value).then(we,ye)}Ve((d=d.apply(h,u||[])).next())})}function He(h,u){var g={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},d,x,U,se;return se={next:we(0),throw:we(1),return:we(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function we(Ve){return function(qe){return ye([Ve,qe])}}function ye(Ve){if(d)throw new TypeError("Generator is already executing.");for(;g;)try{if(d=1,x&&(U=Ve[0]&2?x.return:Ve[0]?x.throw||((U=x.return)&&U.call(x),0):x.next)&&!(U=U.call(x,Ve[1])).done)return U;switch(x=0,U&&(Ve=[Ve[0]&2,U.value]),Ve[0]){case 0:case 1:U=Ve;break;case 4:return g.label++,{value:Ve[1],done:!1};case 5:g.label++,x=Ve[1],Ve=[0];continue;case 7:Ve=g.ops.pop(),g.trys.pop();continue;default:if(U=g.trys,!(U=U.length>0&&U[U.length-1])&&(Ve[0]===6||Ve[0]===2)){g=0;continue}if(Ve[0]===3&&(!U||Ve[1]>U[0]&&Ve[1]<U[3])){g.label=Ve[1];break}if(Ve[0]===6&&g.label<U[1]){g.label=U[1],U=Ve;break}if(U&&g.label<U[2]){g.label=U[2],g.ops.push(Ve);break}U[2]&&g.ops.pop(),g.trys.pop();continue}Ve=u.call(h,g)}catch(qe){Ve=[6,qe],x=0}finally{d=U=0}if(Ve[0]&5)throw Ve[1];return{value:Ve[0]?Ve[1]:void 0,done:!0}}}function be(h,u,g){if(g||arguments.length===2)for(var d=0,x=u.length,U;d<x;d++)(U||!(d in u))&&(U||(U=Array.prototype.slice.call(u,0,d)),U[d]=u[d]);return h.concat(U||u)}for(var ee=function(){function h(u,g,d,x){this.left=u,this.top=g,this.width=d,this.height=x}return h.prototype.add=function(u,g,d,x){return new h(this.left+u,this.top+g,this.width+d,this.height+x)},h.fromClientRect=function(u,g){return new h(g.left+u.windowBounds.left,g.top+u.windowBounds.top,g.width,g.height)},h.fromDOMRectList=function(u,g){var d=Array.from(g).find(function(x){return x.width!==0});return d?new h(d.left+u.windowBounds.left,d.top+u.windowBounds.top,d.width,d.height):h.EMPTY},h.EMPTY=new h(0,0,0,0),h}(),y=function(h,u){return ee.fromClientRect(h,u.getBoundingClientRect())},Ce=function(h){var u=h.body,g=h.documentElement;if(!u||!g)throw new Error("Unable to get document size");var d=Math.max(Math.max(u.scrollWidth,g.scrollWidth),Math.max(u.offsetWidth,g.offsetWidth),Math.max(u.clientWidth,g.clientWidth)),x=Math.max(Math.max(u.scrollHeight,g.scrollHeight),Math.max(u.offsetHeight,g.offsetHeight),Math.max(u.clientHeight,g.clientHeight));return new ee(0,0,d,x)},V=function(h){for(var u=[],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?u.push(((x&1023)<<10)+(U&1023)+65536):(u.push(x),g--)}else u.push(x)}return u},o=function(){for(var h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];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 se=h[x];se<=65535?d.push(se):(se-=65536,d.push((se>>10)+55296,se%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 u=h.length*.75,g=h.length,d,x=0,U,se,we,ye;h[h.length-1]==="="&&(u--,h[h.length-2]==="="&&u--);var Ve=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(u):new Array(u),qe=Array.isArray(Ve)?Ve:new Uint8Array(Ve);for(d=0;d<g;d+=4)U=F[h.charCodeAt(d)],se=F[h.charCodeAt(d+1)],we=F[h.charCodeAt(d+2)],ye=F[h.charCodeAt(d+3)],qe[x++]=U<<2|se>>4,qe[x++]=(se&15)<<4|we>>2,qe[x++]=(we&3)<<6|ye&63;return Ve},Z=function(h){for(var u=h.length,g=[],d=0;d<u;d+=2)g.push(h[d+1]<<8|h[d]);return g},J=function(h){for(var u=h.length,g=[],d=0;d<u;d+=4)g.push(h[d+3]<<24|h[d+2]<<16|h[d+1]<<8|h[d]);return g},K=5,z=11,oe=2,Be=z-K,De=65536>>K,ke=1<<K,pe=ke-1,Ue=1024>>K,Xe=De+Ue,Ee=Xe,et=32,ne=Ee+et,Q=65536>>z,q=1<<Be,ie=q-1,ge=function(h,u,g){return h.slice?h.slice(u,g):new Uint16Array(Array.prototype.slice.call(h,u,g))},he=function(h,u,g){return h.slice?h.slice(u,g):new Uint32Array(Array.prototype.slice.call(h,u,g))},b=function(h,u){var g=ae(h),d=Array.isArray(g)?J(g):new Uint32Array(g),x=Array.isArray(g)?Z(g):new Uint16Array(g),U=24,se=ge(x,U/2,d[4]/2),we=d[5]===2?ge(x,(U+d[4])/2):he(d,Math.ceil((U+d[4])/4));return new S(d[0],d[1],d[2],d[3],se,we)},S=function(){function h(u,g,d,x,U,se){this.initialValue=u,this.errorValue=g,this.highStart=d,this.highValueIndex=x,this.index=U,this.data=se}return h.prototype.get=function(u){var g;if(u>=0){if(u<55296||u>56319&&u<=65535)return g=this.index[u>>K],g=(g<<oe)+(u&pe),this.data[g];if(u<=65535)return g=this.index[De+(u-55296>>K)],g=(g<<oe)+(u&pe),this.data[g];if(u<this.highStart)return g=ne-Q+(u>>z),g=this.index[g],g+=u>>K&ie,g=this.index[g],g=(g<<oe)+(u&pe),this.data[g];if(u<=1114111)return this.data[this.highValueIndex]}return this.errorValue},h}(),W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_e=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Je=0;Je<W.length;Je++)_e[W.charCodeAt(Je)]=Je;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,on=2,Zt=3,Rt=4,je=5,ht=7,At=8,ct=9,tn=10,Re=11,P=12,v=13,T=14,X=15,k=16,$=17,fe=18,Me=19,We=20,ot=21,ft=22,jt=23,_t=24,Lt=25,vt=26,Ct=27,at=28,pt=29,It=30,Ht=31,fn=32,Yt=33,mn=34,ln=35,yn=36,$n=37,dr=38,Xt=39,En=40,$e=41,Pe=42,Fe=43,re=[9001,65288],ce="!",me="\xD7",Se="\xF7",Qe=b(mt),Tt=[It,yn],Wt=[Qt,on,Zt,je],Ut=[tn,At],vn=[Ct,vt],jn=Wt.concat(Ut),ur=[dr,Xt,En,mn,ln],gn=[X,v],Jt=function(h,u){u===void 0&&(u="strict");var g=[],d=[],x=[];return h.forEach(function(U,se){var we=Qe.get(U);if(we>Gt?(x.push(!0),we-=Gt):x.push(!1),["normal","auto","loose"].indexOf(u)!==-1&&[8208,8211,12316,12448].indexOf(U)!==-1)return d.push(se),g.push(k);if(we===Rt||we===Re){if(se===0)return d.push(se),g.push(It);var ye=g[se-1];return jn.indexOf(ye)===-1?(d.push(d[se-1]),g.push(ye)):(d.push(se),g.push(It))}if(d.push(se),we===Ht)return g.push(u==="strict"?ot:$n);if(we===Pe||we===pt)return g.push(It);if(we===Fe)return U>=131072&&U<=196605||U>=196608&&U<=262141?g.push($n):g.push(It);g.push(we)}),[d,g,x]},or=function(h,u,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 se=d[U];if(se===u)return!0;if(se!==tn)break}if(x===tn)for(var U=g;U>0;){U--;var we=d[U];if(Array.isArray(h)?h.indexOf(we)!==-1:h===we)for(var ye=g;ye<=d.length;){ye++;var se=d[ye];if(se===u)return!0;if(se!==tn)break}if(we!==tn)break}return!1},mr=function(h,u){for(var g=h;g>=0;){var d=u[g];if(d===tn)g--;else return d}return 0},Ge=function(h,u,g,d,x){if(g[d]===0)return me;var U=d-1;if(Array.isArray(x)&&x[U]===!0)return me;var se=U-1,we=U+1,ye=u[U],Ve=se>=0?u[se]:0,qe=u[we];if(ye===on&&qe===Zt)return me;if(Wt.indexOf(ye)!==-1)return ce;if(Wt.indexOf(qe)!==-1||Ut.indexOf(qe)!==-1)return me;if(mr(U,u)===At)return Se;if(Qe.get(h[U])===Re||(ye===fn||ye===Yt)&&Qe.get(h[we])===Re||ye===ht||qe===ht||ye===ct||[tn,v,X].indexOf(ye)===-1&&qe===ct||[$,fe,Me,_t,at].indexOf(qe)!==-1||mr(U,u)===ft||or(jt,ft,U,u)||or([$,fe],ot,U,u)||or(P,P,U,u))return me;if(ye===tn)return Se;if(ye===jt||qe===jt)return me;if(qe===k||ye===k)return Se;if([v,X,ot].indexOf(qe)!==-1||ye===T||Ve===yn&&gn.indexOf(ye)!==-1||ye===at&&qe===yn||qe===We||Tt.indexOf(qe)!==-1&&ye===Lt||Tt.indexOf(ye)!==-1&&qe===Lt||ye===Ct&&[$n,fn,Yt].indexOf(qe)!==-1||[$n,fn,Yt].indexOf(ye)!==-1&&qe===vt||Tt.indexOf(ye)!==-1&&vn.indexOf(qe)!==-1||vn.indexOf(ye)!==-1&&Tt.indexOf(qe)!==-1||[Ct,vt].indexOf(ye)!==-1&&(qe===Lt||[ft,X].indexOf(qe)!==-1&&u[we+1]===Lt)||[ft,X].indexOf(ye)!==-1&&qe===Lt||ye===Lt&&[Lt,at,_t].indexOf(qe)!==-1)return me;if([Lt,at,_t,$,fe].indexOf(qe)!==-1)for(var dt=U;dt>=0;){var Mt=u[dt];if(Mt===Lt)return me;if([at,_t].indexOf(Mt)!==-1)dt--;else break}if([Ct,vt].indexOf(qe)!==-1)for(var dt=[$,fe].indexOf(ye)!==-1?se:U;dt>=0;){var Mt=u[dt];if(Mt===Lt)return me;if([at,_t].indexOf(Mt)!==-1)dt--;else break}if(dr===ye&&[dr,Xt,mn,ln].indexOf(qe)!==-1||[Xt,mn].indexOf(ye)!==-1&&[Xt,En].indexOf(qe)!==-1||[En,ln].indexOf(ye)!==-1&&qe===En||ur.indexOf(ye)!==-1&&[We,vt].indexOf(qe)!==-1||ur.indexOf(qe)!==-1&&ye===Ct||Tt.indexOf(ye)!==-1&&Tt.indexOf(qe)!==-1||ye===_t&&Tt.indexOf(qe)!==-1||Tt.concat(Lt).indexOf(ye)!==-1&&qe===ft&&re.indexOf(h[we])===-1||Tt.concat(Lt).indexOf(qe)!==-1&&ye===fe)return me;if(ye===$e&&qe===$e){for(var Qn=g[U],pn=1;Qn>0&&(Qn--,u[Qn]===$e);)pn++;if(pn%2!==0)return me}return ye===fn&&qe===Yt?me:Se},lr=function(h,u){u||(u={lineBreak:"normal",wordBreak:"normal"});var g=Jt(h,u.lineBreak),d=g[0],x=g[1],U=g[2];(u.wordBreak==="break-all"||u.wordBreak==="break-word")&&(x=x.map(function(we){return[Lt,It,Pe].indexOf(we)!==-1?$n:we}));var se=u.wordBreak==="keep-all"?U.map(function(we,ye){return we&&h[ye]>=19968&&h[ye]<=40959}):void 0;return[d,x,se]},ir=function(){function h(u,g,d,x){this.codePoints=u,this.required=g===ce,this.start=d,this.end=x}return h.prototype.slice=function(){return o.apply(void 0,this.codePoints.slice(this.start,this.end))},h}(),rr=function(h,u){var g=V(h),d=lr(g,u),x=d[0],U=d[1],se=d[2],we=g.length,ye=0,Ve=0;return{next:function(){if(Ve>=we)return{done:!0,value:null};for(var qe=me;Ve<we&&(qe=Ge(g,U,x,++Ve,se))===me;);if(qe!==me||Ve===we){var dt=new ir(g,qe,ye,Ve);return ye=Ve,{value:dt,done:!1}}return{done:!0,value:null}}}},Jr=1,Sr=2,li=4,Gr=8,bi=10,si=47,vi=92,Xi=9,Fr=32,xr=34,Nr=61,Hi=35,ai=36,Ki=37,gr=39,Gn=40,nn=41,ze=95,gt=45,Nt=33,yt=60,Kt=62,xt=64,St=91,qt=93,_n=61,xn=123,sr=63,Sn=125,Xn=124,M=126,N=128,de=65533,ve=42,Ke=43,tt=44,Et=58,bt=59,$t=46,Dt=0,Le=8,rt=11,Ot=14,rn=31,un=127,en=-1,an=48,An=97,Kn=101,Fn=102,hn=117,On=122,Ln=65,cr=69,zn=70,Rn=85,yr=90,er=function(h){return h>=an&&h<=57},wr=function(h){return h>=55296&&h<=57343},Lr=function(h){return er(h)||h>=Ln&&h<=zn||h>=An&&h<=Fn},Vr=function(h){return h>=An&&h<=On},Qr=function(h){return h>=Ln&&h<=yr},Ur=function(h){return Vr(h)||Qr(h)},fr=function(h){return h>=N},Rr=function(h){return h===bi||h===Xi||h===Fr},pr=function(h){return Ur(h)||fr(h)||h===ze},Ui=function(h){return pr(h)||er(h)||h===gt},Hr=function(h){return h>=Dt&&h<=Le||h===rt||h>=Ot&&h<=rn||h===un},Or=function(h,u){return h!==vi?!1:u!==bi},qr=function(h,u,g){return h===gt?pr(u)||Or(u,g):pr(h)?!0:!!(h===vi&&Or(h,u))},Tn=function(h,u,g){return h===Ke||h===gt?er(u)?!0:u===$t&&er(g):er(h===$t?u:h)},Wr=function(h){var u=0,g=1;(h[u]===Ke||h[u]===gt)&&(h[u]===gt&&(g=-1),u++);for(var d=[];er(h[u]);)d.push(h[u++]);var x=d.length?parseInt(o.apply(void 0,d),10):0;h[u]===$t&&u++;for(var U=[];er(h[u]);)U.push(h[u++]);var se=U.length,we=se?parseInt(o.apply(void 0,U),10):0;(h[u]===cr||h[u]===Kn)&&u++;var ye=1;(h[u]===Ke||h[u]===gt)&&(h[u]===gt&&(ye=-1),u++);for(var Ve=[];er(h[u]);)Ve.push(h[u++]);var qe=Ve.length?parseInt(o.apply(void 0,Ve),10):0;return g*(x+we*Math.pow(10,-se))*Math.pow(10,ye*qe)},Ti={type:2},Si={type:3},$i={type:4},ss={type:13},ls={type:8},ki={type:21},Er={type:9},Gi={type:10},gs={type:11},Ds={type:12},Ls={type:14},us={type:23},ns={type:1},Qi={type:25},Ji={type:24},qi={type:26},Ii={type:27},gi={type:28},Ri={type:29},as={type:31},es={type:32},Us=function(){function h(){this._value=[]}return h.prototype.write=function(u){this._value=this._value.concat(V(u))},h.prototype.read=function(){for(var u=[],g=this.consumeToken();g!==es;)u.push(g),g=this.consumeToken();return u},h.prototype.consumeToken=function(){var u=this.consumeCodePoint();switch(u){case xr:return this.consumeStringToken(xr);case Hi:var g=this.peekCodePoint(0),d=this.peekCodePoint(1),x=this.peekCodePoint(2);if(Ui(g)||Or(d,x)){var U=qr(g,d,x)?Sr:Jr,se=this.consumeName();return{type:5,value:se,flags:U}}break;case ai:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),ss;break;case gr:return this.consumeStringToken(gr);case Gn:return Ti;case nn:return Si;case ve:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),Ls;break;case Ke:if(Tn(u,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(u),this.consumeNumericToken();break;case tt:return $i;case gt:var we=u,ye=this.peekCodePoint(0),Ve=this.peekCodePoint(1);if(Tn(we,ye,Ve))return this.reconsumeCodePoint(u),this.consumeNumericToken();if(qr(we,ye,Ve))return this.reconsumeCodePoint(u),this.consumeIdentLikeToken();if(ye===gt&&Ve===Kt)return this.consumeCodePoint(),this.consumeCodePoint(),Ji;break;case $t:if(Tn(u,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(u),this.consumeNumericToken();break;case si:if(this.peekCodePoint(0)===ve)for(this.consumeCodePoint();;){var qe=this.consumeCodePoint();if(qe===ve&&(qe=this.consumeCodePoint(),qe===si))return this.consumeToken();if(qe===en)return this.consumeToken()}break;case Et:return qi;case bt:return Ii;case yt:if(this.peekCodePoint(0)===Nt&&this.peekCodePoint(1)===gt&&this.peekCodePoint(2)===gt)return this.consumeCodePoint(),this.consumeCodePoint(),Qi;break;case xt:var dt=this.peekCodePoint(0),Mt=this.peekCodePoint(1),Qn=this.peekCodePoint(2);if(qr(dt,Mt,Qn)){var se=this.consumeName();return{type:7,value:se}}break;case St:return gi;case vi:if(Or(u,this.peekCodePoint(0)))return this.reconsumeCodePoint(u),this.consumeIdentLikeToken();break;case qt:return Ri;case _n:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),ls;break;case xn:return gs;case Sn:return Ds;case hn:case Rn:var pn=this.peekCodePoint(0),Dn=this.peekCodePoint(1);return pn===Ke&&(Lr(Dn)||Dn===sr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(u),this.consumeIdentLikeToken();case Xn:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),Er;if(this.peekCodePoint(0)===Xn)return this.consumeCodePoint(),ki;break;case M:if(this.peekCodePoint(0)===Nr)return this.consumeCodePoint(),Gi;break;case en:return es}return Rr(u)?(this.consumeWhiteSpace(),as):er(u)?(this.reconsumeCodePoint(u),this.consumeNumericToken()):pr(u)?(this.reconsumeCodePoint(u),this.consumeIdentLikeToken()):{type:6,value:o(u)}},h.prototype.consumeCodePoint=function(){var u=this._value.shift();return typeof u=="undefined"?-1:u},h.prototype.reconsumeCodePoint=function(u){this._value.unshift(u)},h.prototype.peekCodePoint=function(u){return u>=this._value.length?-1:this._value[u]},h.prototype.consumeUnicodeRangeToken=function(){for(var u=[],g=this.consumeCodePoint();Lr(g)&&u.length<6;)u.push(g),g=this.consumeCodePoint();for(var d=!1;g===sr&&u.length<6;)u.push(g),g=this.consumeCodePoint(),d=!0;if(d){var x=parseInt(o.apply(void 0,u.map(function(ye){return ye===sr?an:ye})),16),U=parseInt(o.apply(void 0,u.map(function(ye){return ye===sr?zn:ye})),16);return{type:30,start:x,end:U}}var se=parseInt(o.apply(void 0,u),16);if(this.peekCodePoint(0)===gt&&Lr(this.peekCodePoint(1))){this.consumeCodePoint(),g=this.consumeCodePoint();for(var we=[];Lr(g)&&we.length<6;)we.push(g),g=this.consumeCodePoint();var U=parseInt(o.apply(void 0,we),16);return{type:30,start:se,end:U}}else return{type:30,start:se,end:se}},h.prototype.consumeIdentLikeToken=function(){var u=this.consumeName();return u.toLowerCase()==="url"&&this.peekCodePoint(0)===Gn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Gn?(this.consumeCodePoint(),{type:19,value:u}):{type:20,value:u}},h.prototype.consumeUrlToken=function(){var u=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===en)return{type:22,value:""};var g=this.peekCodePoint(0);if(g===gr||g===xr){var d=this.consumeStringToken(this.consumeCodePoint());return d.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===en||this.peekCodePoint(0)===nn)?(this.consumeCodePoint(),{type:22,value:d.value}):(this.consumeBadUrlRemnants(),us)}for(;;){var x=this.consumeCodePoint();if(x===en||x===nn)return{type:22,value:o.apply(void 0,u)};if(Rr(x))return this.consumeWhiteSpace(),this.peekCodePoint(0)===en||this.peekCodePoint(0)===nn?(this.consumeCodePoint(),{type:22,value:o.apply(void 0,u)}):(this.consumeBadUrlRemnants(),us);if(x===xr||x===gr||x===Gn||Hr(x))return this.consumeBadUrlRemnants(),us;if(x===vi)if(Or(x,this.peekCodePoint(0)))u.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),us;else u.push(x)}},h.prototype.consumeWhiteSpace=function(){for(;Rr(this.peekCodePoint(0));)this.consumeCodePoint()},h.prototype.consumeBadUrlRemnants=function(){for(;;){var u=this.consumeCodePoint();if(u===nn||u===en)return;Or(u,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},h.prototype.consumeStringSlice=function(u){for(var g=5e4,d="";u>0;){var x=Math.min(g,u);d+=o.apply(void 0,this._value.splice(0,x)),u-=x}return this._value.shift(),d},h.prototype.consumeStringToken=function(u){var g="",d=0;do{var x=this._value[d];if(x===en||x===void 0||x===u)return g+=this.consumeStringSlice(d),{type:0,value:g};if(x===bi)return this._value.splice(0,d),ns;if(x===vi){var U=this._value[d+1];U!==en&&U!==void 0&&(U===bi?(g+=this.consumeStringSlice(d),d=-1,this._value.shift()):Or(x,U)&&(g+=this.consumeStringSlice(d),g+=o(this.consumeEscapedCodePoint()),d=-1))}d++}while(!0)},h.prototype.consumeNumber=function(){var u=[],g=li,d=this.peekCodePoint(0);for((d===Ke||d===gt)&&u.push(this.consumeCodePoint());er(this.peekCodePoint(0));)u.push(this.consumeCodePoint());d=this.peekCodePoint(0);var x=this.peekCodePoint(1);if(d===$t&&er(x))for(u.push(this.consumeCodePoint(),this.consumeCodePoint()),g=Gr;er(this.peekCodePoint(0));)u.push(this.consumeCodePoint());d=this.peekCodePoint(0),x=this.peekCodePoint(1);var U=this.peekCodePoint(2);if((d===cr||d===Kn)&&((x===Ke||x===gt)&&er(U)||er(x)))for(u.push(this.consumeCodePoint(),this.consumeCodePoint()),g=Gr;er(this.peekCodePoint(0));)u.push(this.consumeCodePoint());return[Wr(u),g]},h.prototype.consumeNumericToken=function(){var u=this.consumeNumber(),g=u[0],d=u[1],x=this.peekCodePoint(0),U=this.peekCodePoint(1),se=this.peekCodePoint(2);if(qr(x,U,se)){var we=this.consumeName();return{type:15,number:g,flags:d,unit:we}}return x===Ki?(this.consumeCodePoint(),{type:16,number:g,flags:d}):{type:17,number:g,flags:d}},h.prototype.consumeEscapedCodePoint=function(){var u=this.consumeCodePoint();if(Lr(u)){for(var g=o(u);Lr(this.peekCodePoint(0))&&g.length<6;)g+=o(this.consumeCodePoint());Rr(this.peekCodePoint(0))&&this.consumeCodePoint();var d=parseInt(g,16);return d===0||wr(d)||d>1114111?de:d}return u===en?de:u},h.prototype.consumeName=function(){for(var u="";;){var g=this.consumeCodePoint();if(Ui(g))u+=o(g);else if(Or(g,this.peekCodePoint(0)))u+=o(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(g),u}},h}(),ws=function(){function h(u){this._tokens=u}return h.create=function(u){var g=new Us;return g.write(u),new h(g.read())},h.parseValue=function(u){return h.create(u).parseComponentValue()},h.parseValues=function(u){return h.create(u).parseComponentValues()},h.prototype.parseComponentValue=function(){for(var u=this.consumeToken();u.type===31;)u=this.consumeToken();if(u.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(u);var g=this.consumeComponentValue();do u=this.consumeToken();while(u.type===31);if(u.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 u=[];;){var g=this.consumeComponentValue();if(g.type===32)return u;u.push(g),u.push()}},h.prototype.consumeComponentValue=function(){var u=this.consumeToken();switch(u.type){case 11:case 28:case 2:return this.consumeSimpleBlock(u.type);case 19:return this.consumeFunction(u)}return u},h.prototype.consumeSimpleBlock=function(u){for(var g={type:u,values:[]},d=this.consumeToken();;){if(d.type===32||Ys(d,u))return g;this.reconsumeToken(d),g.values.push(this.consumeComponentValue()),d=this.consumeToken()}},h.prototype.consumeFunction=function(u){for(var g={name:u.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 u=this._tokens.shift();return typeof u=="undefined"?es:u},h.prototype.reconsumeToken=function(u){this._tokens.unshift(u)},h}(),ei=function(h){return h.type===15},yi=function(h){return h.type===17},Ir=function(h){return h.type===20},In=function(h){return h.type===0},Jn=function(h,u){return Ir(h)&&h.value===u},ti=function(h){return h.type!==31},fi=function(h){return h.type!==31&&h.type!==4},zr=function(h){var u=[],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");u.push(g),g=[];return}d.type!==31&&g.push(d)}),g.length&&u.push(g),u},Ys=function(h,u){return u===11&&h.type===12||u===28&&h.type===29?!0:u===2&&h.type===3},Oi=function(h){return h.type===17||h.type===15},pi=function(h){return h.type===16||Oi(h)},Es=function(h){return h.length>1?[h[0],h[1]]:[h[0]]},Di={type:17,number:0,flags:li},Ca={type:16,number:50,flags:li},Rs={type:16,number:100,flags:li},Bs=function(h,u,g){var d=h[0],x=h[1];return[ni(d,u),ni(typeof x!="undefined"?x:d,g)]},ni=function(h,u){if(h.type===16)return h.number/100*u;if(ei(h))switch(h.unit){case"rem":case"em":return 16*h.number;case"px":default:return h.number}return h.number},na="deg",cs="grad",js="rad",ks="turn",ra={name:"angle",parse:function(h,u){if(u.type===15)switch(u.unit){case na:return Math.PI*u.number/180;case cs:return Math.PI/200*u.number;case js:return u.number;case ks:return Math.PI*2*u.number}throw new Error("Unsupported angle type")}},xa=function(h){return h.type===15&&(h.unit===na||h.unit===cs||h.unit===js||h.unit===ks)},Na=function(h){var u=h.filter(Ir).map(function(g){return g.value}).join(" ");switch(u){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Di,Di];case"to top":case"bottom":return rs(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Di,Rs];case"to right":case"left":return rs(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Rs,Rs];case"to bottom":case"top":return rs(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Rs,Di];case"to left":case"right":return rs(270)}return 0},rs=function(h){return Math.PI*h/180},Xs={name:"color",parse:function(h,u){if(u.type===18){var g=Qs[u.name];if(typeof g=="undefined")throw new Error('Attempting to parse an unsupported color function "'+u.name+'"');return g(h,u.values)}if(u.type===5){if(u.value.length===3){var d=u.value.substring(0,1),x=u.value.substring(1,2),U=u.value.substring(2,3);return bs(parseInt(d+d,16),parseInt(x+x,16),parseInt(U+U,16),1)}if(u.value.length===4){var d=u.value.substring(0,1),x=u.value.substring(1,2),U=u.value.substring(2,3),se=u.value.substring(3,4);return bs(parseInt(d+d,16),parseInt(x+x,16),parseInt(U+U,16),parseInt(se+se,16)/255)}if(u.value.length===6){var d=u.value.substring(0,2),x=u.value.substring(2,4),U=u.value.substring(4,6);return bs(parseInt(d,16),parseInt(x,16),parseInt(U,16),1)}if(u.value.length===8){var d=u.value.substring(0,2),x=u.value.substring(2,4),U=u.value.substring(4,6),se=u.value.substring(6,8);return bs(parseInt(d,16),parseInt(x,16),parseInt(U,16),parseInt(se,16)/255)}}if(u.type===20){var we=Os[u.value.toUpperCase()];if(typeof we!="undefined")return we}return Os.TRANSPARENT}},ts=function(h){return(255&h)===0},Pi=function(h){var u=255&h,g=255&h>>8,d=255&h>>16,x=255&h>>24;return u<255?"rgba("+x+","+d+","+g+","+u/255+")":"rgb("+x+","+d+","+g+")"},bs=function(h,u,g,d){return(h<<24|u<<16|g<<8|Math.round(d*255)<<0)>>>0},ps=function(h,u){if(h.type===17)return h.number;if(h.type===16){var g=u===3?1:255;return u===3?h.number/100*g:Math.round(h.number/100*g)}return 0},Sa=function(h,u){var g=u.filter(fi);if(g.length===3){var d=g.map(ps),x=d[0],U=d[1],se=d[2];return bs(x,U,se,1)}if(g.length===4){var we=g.map(ps),x=we[0],U=we[1],se=we[2],ye=we[3];return bs(x,U,se,ye)}return 0};function ia(h,u,g){return g<0&&(g+=1),g>=1&&(g-=1),g<1/6?(u-h)*g*6+h:g<1/2?u:g<2/3?(u-h)*6*(2/3-g)+h:h}var Cs=function(h,u){var g=u.filter(fi),d=g[0],x=g[1],U=g[2],se=g[3],we=(d.type===17?rs(d.number):ra.parse(h,d))/(Math.PI*2),ye=pi(x)?x.number/100:0,Ve=pi(U)?U.number/100:0,qe=typeof se!="undefined"&&pi(se)?ni(se,1):1;if(ye===0)return bs(Ve*255,Ve*255,Ve*255,1);var dt=Ve<=.5?Ve*(ye+1):Ve+ye-Ve*ye,Mt=Ve*2-dt,Qn=ia(Mt,dt,we+1/3),pn=ia(Mt,dt,we),Dn=ia(Mt,dt,we-1/3);return bs(Qn*255,pn*255,Dn*255,qe)},Qs={hsl:Cs,hsla:Cs,rgb:Sa,rgba:Sa},ma=function(h,u){return Xs.parse(h,ws.create(u).parseComponentValue())},Os={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},fs={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(h,u){return u.map(function(g){if(Ir(g))switch(g.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Fa={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ps=function(h,u){var g=Xs.parse(h,u[0]),d=u[1];return d&&pi(d)?{color:g,stop:d}:{color:g,stop:null}},Ta=function(h,u){var g=h[0],d=h[h.length-1];g.stop===null&&(g.stop=Di),d.stop===null&&(d.stop=Rs);for(var x=[],U=0,se=0;se<h.length;se++){var we=h[se].stop;if(we!==null){var ye=ni(we,u);ye>U?x.push(ye):x.push(U),U=ye}else x.push(null)}for(var Ve=null,se=0;se<x.length;se++){var qe=x[se];if(qe===null)Ve===null&&(Ve=se);else if(Ve!==null){for(var dt=se-Ve,Mt=x[Ve-1],Qn=(qe-Mt)/(dt+1),pn=1;pn<=dt;pn++)x[Ve+pn-1]=Qn*pn;Ve=null}}return h.map(function(Dn,kr){var qn=Dn.color;return{color:qn,stop:Math.max(Math.min(1,x[kr]/u),0)}})},Ha=function(h,u,g){var d=u/2,x=g/2,U=ni(h[0],u)-d,se=x-ni(h[1],g);return(Math.atan2(se,U)+Math.PI*2)%(Math.PI*2)},_a=function(h,u,g){var d=typeof h=="number"?h:Ha(h,u,g),x=Math.abs(u*Math.sin(d))+Math.abs(g*Math.cos(d)),U=u/2,se=g/2,we=x/2,ye=Math.sin(d-Math.PI/2)*we,Ve=Math.cos(d-Math.PI/2)*we;return[x,U-Ve,U+Ve,se-ye,se+ye]},is=function(h,u){return Math.sqrt(h*h+u*u)},Ia=function(h,u,g,d,x){var U=[[0,0],[0,u],[h,0],[h,u]];return U.reduce(function(se,we){var ye=we[0],Ve=we[1],qe=is(g-ye,d-Ve);return(x?qe<se.optimumDistance:qe>se.optimumDistance)?{optimumCorner:we,optimumDistance:qe}:se},{optimumDistance:x?1/0:-1/0,optimumCorner:null}).optimumCorner},Ka=function(h,u,g,d,x){var U=0,se=0;switch(h.size){case 0:h.shape===0?U=se=Math.min(Math.abs(u),Math.abs(u-d),Math.abs(g),Math.abs(g-x)):h.shape===1&&(U=Math.min(Math.abs(u),Math.abs(u-d)),se=Math.min(Math.abs(g),Math.abs(g-x)));break;case 2:if(h.shape===0)U=se=Math.min(is(u,g),is(u,g-x),is(u-d,g),is(u-d,g-x));else if(h.shape===1){var we=Math.min(Math.abs(g),Math.abs(g-x))/Math.min(Math.abs(u),Math.abs(u-d)),ye=Ia(d,x,u,g,!0),Ve=ye[0],qe=ye[1];U=is(Ve-u,(qe-g)/we),se=we*U}break;case 1:h.shape===0?U=se=Math.max(Math.abs(u),Math.abs(u-d),Math.abs(g),Math.abs(g-x)):h.shape===1&&(U=Math.max(Math.abs(u),Math.abs(u-d)),se=Math.max(Math.abs(g),Math.abs(g-x)));break;case 3:if(h.shape===0)U=se=Math.max(is(u,g),is(u,g-x),is(u-d,g),is(u-d,g-x));else if(h.shape===1){var we=Math.max(Math.abs(g),Math.abs(g-x))/Math.max(Math.abs(u),Math.abs(u-d)),dt=Ia(d,x,u,g,!1),Ve=dt[0],qe=dt[1];U=is(Ve-u,(qe-g)/we),se=we*U}break}return Array.isArray(h.size)&&(U=ni(h.size[0],d),se=h.size.length===2?ni(h.size[1],x):U),[U,se]},cA=function(h,u){var g=rs(180),d=[];return zr(u).forEach(function(x,U){if(U===0){var se=x[0];if(se.type===20&&se.value==="to"){g=Na(x);return}else if(xa(se)){g=ra.parse(h,se);return}}var we=Ps(h,x);d.push(we)}),{angle:g,stops:d,type:1}},sa=function(h,u){var g=rs(180),d=[];return zr(u).forEach(function(x,U){if(U===0){var se=x[0];if(se.type===20&&["top","left","right","bottom"].indexOf(se.value)!==-1){g=Na(x);return}else if(xa(se)){g=(ra.parse(h,se)+rs(270))%rs(360);return}}var we=Ps(h,x);d.push(we)}),{angle:g,stops:d,type:1}},aa=function(h,u){var g=rs(180),d=[],x=1,U=0,se=3,we=[];return zr(u).forEach(function(ye,Ve){var qe=ye[0];if(Ve===0){if(Ir(qe)&&qe.value==="linear"){x=1;return}else if(Ir(qe)&&qe.value==="radial"){x=2;return}}if(qe.type===18){if(qe.name==="from"){var dt=Xs.parse(h,qe.values[0]);d.push({stop:Di,color:dt})}else if(qe.name==="to"){var dt=Xs.parse(h,qe.values[0]);d.push({stop:Rs,color:dt})}else if(qe.name==="color-stop"){var Mt=qe.values.filter(fi);if(Mt.length===2){var dt=Xs.parse(h,Mt[1]),Qn=Mt[0];yi(Qn)&&d.push({stop:{type:16,number:Qn.number*100,flags:Qn.flags},color:dt})}}}}),x===1?{angle:(g+rs(180))%rs(360),stops:d,type:x}:{size:se,shape:U,stops:d,position:we,type:x}},Ei="closest-side",jr="farthest-side",hi="closest-corner",Vi="farthest-corner",Ci="circle",xs="ellipse",Mi="cover",Wi="contain",$a=function(h,u){var g=0,d=3,x=[],U=[];return zr(u).forEach(function(se,we){var ye=!0;if(we===0){var Ve=!1;ye=se.reduce(function(dt,Mt){if(Ve)if(Ir(Mt))switch(Mt.value){case"center":return U.push(Ca),dt;case"top":case"left":return U.push(Di),dt;case"right":case"bottom":return U.push(Rs),dt}else(pi(Mt)||Oi(Mt))&&U.push(Mt);else if(Ir(Mt))switch(Mt.value){case Ci:return g=0,!1;case xs:return g=1,!1;case"at":return Ve=!0,!1;case Ei:return d=0,!1;case Mi:case jr:return d=1,!1;case Wi:case hi:return d=2,!1;case Vi:return d=3,!1}else if(Oi(Mt)||pi(Mt))return Array.isArray(d)||(d=[]),d.push(Mt),!1;return dt},ye)}if(ye){var qe=Ps(h,se);x.push(qe)}}),{size:d,shape:g,stops:x,position:U,type:2}},Pt=function(h,u){var g=0,d=3,x=[],U=[];return zr(u).forEach(function(se,we){var ye=!0;if(we===0?ye=se.reduce(function(qe,dt){if(Ir(dt))switch(dt.value){case"center":return U.push(Ca),!1;case"top":case"left":return U.push(Di),!1;case"right":case"bottom":return U.push(Rs),!1}else if(pi(dt)||Oi(dt))return U.push(dt),!1;return qe},ye):we===1&&(ye=se.reduce(function(qe,dt){if(Ir(dt))switch(dt.value){case Ci:return g=0,!1;case xs:return g=1,!1;case Wi:case Ei:return d=0,!1;case jr:return d=1,!1;case hi:return d=2,!1;case Mi:case Vi:return d=3,!1}else if(Oi(dt)||pi(dt))return Array.isArray(d)||(d=[]),d.push(dt),!1;return qe},ye)),ye){var Ve=Ps(h,se);x.push(Ve)}}),{size:d,shape:g,stops:x,position:U,type:2}},$s=function(h){return h.type===1},va=function(h){return h.type===2},Js={name:"image",parse:function(h,u){if(u.type===22){var g={url:u.value,type:0};return h.cache.addImage(u.value),g}if(u.type===18){var d=Ga[u.name];if(typeof d=="undefined")throw new Error('Attempting to parse an unsupported image function "'+u.name+'"');return d(h,u.values)}throw new Error("Unsupported image type "+u.type)}};function fA(h){return!(h.type===20&&h.value==="none")&&(h.type!==18||!!Ga[h.name])}var Ga={"linear-gradient":cA,"-moz-linear-gradient":sa,"-ms-linear-gradient":sa,"-o-linear-gradient":sa,"-webkit-linear-gradient":sa,"radial-gradient":$a,"-moz-radial-gradient":Pt,"-ms-radial-gradient":Pt,"-o-radial-gradient":Pt,"-webkit-radial-gradient":Pt,"-webkit-gradient":aa},PA={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(h,u){if(u.length===0)return[];var g=u[0];return g.type===20&&g.value==="none"?[]:u.filter(function(d){return fi(d)&&fA(d)}).map(function(d){return Js.parse(h,d)})}},fo={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(h,u){return u.map(function(g){if(Ir(g))switch(g.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ho={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(h,u){return zr(u).map(function(g){return g.filter(pi)}).map(Es)}},hA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(h,u){return zr(u).map(function(g){return g.filter(Ir).map(function(d){return d.value}).join(" ")}).map(ya)}},ya=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}},Ss;(function(h){h.AUTO="auto",h.CONTAIN="contain",h.COVER="cover"})(Ss||(Ss={}));var go={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(h,u){return zr(u).map(function(g){return g.filter(Fi)})}},Fi=function(h){return Ir(h)||pi(h)},Va=function(h){return{name:"border-"+h+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},po=Va("top"),mo=Va("right"),MA=Va("bottom"),NA=Va("left"),Aa=function(h){return{name:"border-radius-"+h,initialValue:"0 0",prefix:!1,type:1,parse:function(u,g){return Es(g.filter(pi))}}},_o=Aa("top-left"),vo=Aa("top-right"),oa=Aa("bottom-right"),dA=Aa("bottom-left"),Wa=function(h){return{name:"border-"+h+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(u,g){switch(g){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},za=Wa("top"),yo=Wa("right"),sl=Wa("bottom"),HA=Wa("left"),wa=function(h){return{name:"border-"+h+"-width",initialValue:"0",type:0,prefix:!1,parse:function(u,g){return ei(g)?g.number:0}}},KA=wa("top"),wo=wa("right"),Eo=wa("bottom"),al=wa("left"),$A={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Al={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(h,u){switch(u){case"rtl":return 1;case"ltr":default:return 0}}},ol={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(h,u){return u.filter(Ir).reduce(function(g,d){return g|ll(d.value)},0)}},ll=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},ul={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(h,u){switch(u){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},cl={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(h,u){return u.type===20&&u.value==="normal"?0:u.type===17||u.type===15?u.number:0}},gA;(function(h){h.NORMAL="normal",h.STRICT="strict"})(gA||(gA={}));var fl={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(h,u){switch(u){case"strict":return gA.STRICT;case"normal":default:return gA.NORMAL}}},hl={name:"line-height",initialValue:"normal",prefix:!1,type:4},Bo=function(h,u){return Ir(h)&&h.value==="normal"?1.2*u:h.type===17?u*h.number:pi(h)?ni(h,u):u},pA={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(h,u){return u.type===20&&u.value==="none"?null:Js.parse(h,u)}},dl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(h,u){switch(u){case"inside":return 0;case"outside":default:return 1}}},mA={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(h,u){switch(u){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}}},ms=function(h){return{name:"margin-"+h,initialValue:"0",prefix:!1,type:4}},gl=ms("top"),GA=ms("right"),hs=ms("bottom"),Gs=ms("left"),VA={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(h,u){return u.filter(Ir).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}})}},Za={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(h,u){switch(u){case"break-word":return"break-word";case"normal":default:return"normal"}}},qs=function(h){return{name:"padding-"+h,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},WA=qs("top"),pl=qs("right"),bo=qs("bottom"),ml=qs("left"),Da={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(h,u){switch(u){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},_A={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(h,u){switch(u){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},zA={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(h,u){return u.length===1&&Jn(u[0],"none")?[]:zr(u).map(function(g){for(var d={color:Os.TRANSPARENT,offsetX:Di,offsetY:Di,blur:Di},x=0,U=0;U<g.length;U++){var se=g[U];Oi(se)?(x===0?d.offsetX=se:x===1?d.offsetY=se:d.blur=se,x++):d.color=Xs.parse(h,se)}return d})}},Co={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(h,u){switch(u){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},_l={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(h,u){if(u.type===20&&u.value==="none")return null;if(u.type===18){var g=So[u.name];if(typeof g=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+u.name+'"');return g(u.values)}return null}},xo=function(h){var u=h.filter(function(g){return g.type===17}).map(function(g){return g.number});return u.length===6?u:null},vl=function(h){var u=h.filter(function(ye){return ye.type===17}).map(function(ye){return ye.number}),g=u[0],d=u[1];u[2],u[3];var x=u[4],U=u[5];u[6],u[7],u[8],u[9],u[10],u[11];var se=u[12],we=u[13];return u[14],u[15],u.length===16?[g,d,x,U,se,we]:null},So={matrix:xo,matrix3d:vl},Fo={type:16,number:50,flags:li},To=[Fo,Fo],yl={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(h,u){var g=u.filter(pi);return g.length!==2?To:[g[0],g[1]]}},wl={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(h,u){switch(u){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Ya;(function(h){h.NORMAL="normal",h.BREAK_ALL="break-all",h.KEEP_ALL="keep-all"})(Ya||(Ya={}));for(var Io={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(h,u){switch(u){case"break-all":return Ya.BREAK_ALL;case"keep-all":return Ya.KEEP_ALL;case"normal":default:return Ya.NORMAL}}},El={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(h,u){if(u.type===20)return{auto:!0,order:0};if(yi(u))return{auto:!1,order:u.number};throw new Error("Invalid z-index number parsed")}},ZA={name:"time",parse:function(h,u){if(u.type===15)switch(u.unit.toLowerCase()){case"s":return 1e3*u.number;case"ms":return u.number}throw new Error("Unsupported time type")}},ja={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(h,u){return yi(u)?u.number:1}},Bl={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},bl={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(h,u){return u.filter(Ir).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})}},Yi={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(h,u){var g=[],d=[];return u.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+"'"})}},la={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Xa={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(h,u){if(yi(u))return u.number;if(Ir(u))switch(u.value){case"bold":return 700;case"normal":default:return 400}return 400}},Do={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(h,u){return u.filter(Ir).map(function(g){return g.value})}},Cl={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(h,u){switch(u){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Ni=function(h,u){return(h&u)!==0},YA={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(h,u){if(u.length===0)return[];var g=u[0];return g.type===20&&g.value==="none"?[]:u}},Ja={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(h,u){if(u.length===0)return null;var g=u[0];if(g.type===20&&g.value==="none")return null;for(var d=[],x=u.filter(ti),U=0;U<x.length;U++){var se=x[U],we=x[U+1];if(se.type===20){var ye=we&&yi(we)?we.number:1;d.push({counter:se.value,increment:ye})}}return d}},Lo={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(h,u){if(u.length===0)return[];for(var g=[],d=u.filter(ti),x=0;x<d.length;x++){var U=d[x],se=d[x+1];if(Ir(U)&&U.value!=="none"){var we=se&&yi(se)?se.number:0;g.push({counter:U.value,reset:we})}}return g}},ea={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(h,u){return u.filter(ei).map(function(g){return ZA.parse(h,g)})}},ut={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(h,u){if(u.length===0)return null;var g=u[0];if(g.type===20&&g.value==="none")return null;var d=[],x=u.filter(In);if(x.length%2!==0)return null;for(var U=0;U<x.length;U+=2){var se=x[U].value,we=x[U+1].value;d.push({open:se,close:we})}return d}},vA=function(h,u,g){if(!h)return"";var d=h[Math.min(u,h.length-1)];return d?g?d.open:d.close:""},yA={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(h,u){return u.length===1&&Jn(u[0],"none")?[]:zr(u).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 se=g[U];Jn(se,"inset")?d.inset=!0:Oi(se)?(x===0?d.offsetX=se:x===1?d.offsetY=se:x===2?d.blur=se:d.spread=se,x++):d.color=Xs.parse(h,se)}return d})}},Yl={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(h,u){var g=[0,1,2],d=[];return u.filter(Ir).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}},La={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Uo={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(h,u){return ei(u)?u.number:0}},Ro=function(){function h(u,g){var d,x;this.animationDuration=Mn(u,ea,g.animationDuration),this.backgroundClip=Mn(u,fs,g.backgroundClip),this.backgroundColor=Mn(u,Fa,g.backgroundColor),this.backgroundImage=Mn(u,PA,g.backgroundImage),this.backgroundOrigin=Mn(u,fo,g.backgroundOrigin),this.backgroundPosition=Mn(u,ho,g.backgroundPosition),this.backgroundRepeat=Mn(u,hA,g.backgroundRepeat),this.backgroundSize=Mn(u,go,g.backgroundSize),this.borderTopColor=Mn(u,po,g.borderTopColor),this.borderRightColor=Mn(u,mo,g.borderRightColor),this.borderBottomColor=Mn(u,MA,g.borderBottomColor),this.borderLeftColor=Mn(u,NA,g.borderLeftColor),this.borderTopLeftRadius=Mn(u,_o,g.borderTopLeftRadius),this.borderTopRightRadius=Mn(u,vo,g.borderTopRightRadius),this.borderBottomRightRadius=Mn(u,oa,g.borderBottomRightRadius),this.borderBottomLeftRadius=Mn(u,dA,g.borderBottomLeftRadius),this.borderTopStyle=Mn(u,za,g.borderTopStyle),this.borderRightStyle=Mn(u,yo,g.borderRightStyle),this.borderBottomStyle=Mn(u,sl,g.borderBottomStyle),this.borderLeftStyle=Mn(u,HA,g.borderLeftStyle),this.borderTopWidth=Mn(u,KA,g.borderTopWidth),this.borderRightWidth=Mn(u,wo,g.borderRightWidth),this.borderBottomWidth=Mn(u,Eo,g.borderBottomWidth),this.borderLeftWidth=Mn(u,al,g.borderLeftWidth),this.boxShadow=Mn(u,yA,g.boxShadow),this.color=Mn(u,$A,g.color),this.direction=Mn(u,Al,g.direction),this.display=Mn(u,ol,g.display),this.float=Mn(u,ul,g.cssFloat),this.fontFamily=Mn(u,Yi,g.fontFamily),this.fontSize=Mn(u,la,g.fontSize),this.fontStyle=Mn(u,Cl,g.fontStyle),this.fontVariant=Mn(u,Do,g.fontVariant),this.fontWeight=Mn(u,Xa,g.fontWeight),this.letterSpacing=Mn(u,cl,g.letterSpacing),this.lineBreak=Mn(u,fl,g.lineBreak),this.lineHeight=Mn(u,hl,g.lineHeight),this.listStyleImage=Mn(u,pA,g.listStyleImage),this.listStylePosition=Mn(u,dl,g.listStylePosition),this.listStyleType=Mn(u,mA,g.listStyleType),this.marginTop=Mn(u,gl,g.marginTop),this.marginRight=Mn(u,GA,g.marginRight),this.marginBottom=Mn(u,hs,g.marginBottom),this.marginLeft=Mn(u,Gs,g.marginLeft),this.opacity=Mn(u,ja,g.opacity);var U=Mn(u,VA,g.overflow);this.overflowX=U[0],this.overflowY=U[U.length>1?1:0],this.overflowWrap=Mn(u,Za,g.overflowWrap),this.paddingTop=Mn(u,WA,g.paddingTop),this.paddingRight=Mn(u,pl,g.paddingRight),this.paddingBottom=Mn(u,bo,g.paddingBottom),this.paddingLeft=Mn(u,ml,g.paddingLeft),this.paintOrder=Mn(u,Yl,g.paintOrder),this.position=Mn(u,_A,g.position),this.textAlign=Mn(u,Da,g.textAlign),this.textDecorationColor=Mn(u,Bl,(d=g.textDecorationColor)!==null&&d!==void 0?d:g.color),this.textDecorationLine=Mn(u,bl,(x=g.textDecorationLine)!==null&&x!==void 0?x:g.textDecoration),this.textShadow=Mn(u,zA,g.textShadow),this.textTransform=Mn(u,Co,g.textTransform),this.transform=Mn(u,_l,g.transform),this.transformOrigin=Mn(u,yl,g.transformOrigin),this.visibility=Mn(u,wl,g.visibility),this.webkitTextStrokeColor=Mn(u,La,g.webkitTextStrokeColor),this.webkitTextStrokeWidth=Mn(u,Uo,g.webkitTextStrokeWidth),this.wordBreak=Mn(u,Io,g.wordBreak),this.zIndex=Mn(u,El,g.zIndex)}return h.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},h.prototype.isTransparent=function(){return ts(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 Ni(this.display,4)||Ni(this.display,33554432)||Ni(this.display,268435456)||Ni(this.display,536870912)||Ni(this.display,67108864)||Ni(this.display,134217728)},h}(),ko=function(){function h(u,g){this.content=Mn(u,YA,g.content),this.quotes=Mn(u,ut,g.quotes)}return h}(),jA=function(){function h(u,g){this.counterIncrement=Mn(u,Ja,g.counterIncrement),this.counterReset=Mn(u,Lo,g.counterReset)}return h}(),Mn=function(h,u,g){var d=new Us,x=g!==null&&typeof g!="undefined"?g.toString():u.initialValue;d.write(x);var U=new ws(d.read());switch(u.type){case 2:var se=U.parseComponentValue();return u.parse(h,Ir(se)?se.value:u.initialValue);case 0:return u.parse(h,U.parseComponentValue());case 1:return u.parse(h,U.parseComponentValues());case 4:return U.parseComponentValue();case 3:switch(u.format){case"angle":return ra.parse(h,U.parseComponentValue());case"color":return Xs.parse(h,U.parseComponentValue());case"image":return Js.parse(h,U.parseComponentValue());case"length":var we=U.parseComponentValue();return Oi(we)?we:Di;case"length-percentage":var ye=U.parseComponentValue();return pi(ye)?ye:Di;case"time":return ZA.parse(h,U.parseComponentValue())}break}},Ua="data-html2canvas-debug",XA=function(h){var u=h.getAttribute(Ua);switch(u){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},JA=function(h,u){var g=XA(h);return g===1||u===g},_s=function(){function h(u,g){if(this.context=u,this.textNodes=[],this.elements=[],this.flags=0,JA(g,3))debugger;this.styles=new Ro(u,window.getComputedStyle(g,null)),Ul(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),JA(g,4)&&(this.flags|=16)}return h}(),Fs="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Qo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ra=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),wA=0;wA<Qo.length;wA++)Ra[Qo.charCodeAt(wA)]=wA;for(var xl=function(h){var u=h.length*.75,g=h.length,d,x=0,U,se,we,ye;h[h.length-1]==="="&&(u--,h[h.length-2]==="="&&u--);var Ve=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(u):new Array(u),qe=Array.isArray(Ve)?Ve:new Uint8Array(Ve);for(d=0;d<g;d+=4)U=Ra[h.charCodeAt(d)],se=Ra[h.charCodeAt(d+1)],we=Ra[h.charCodeAt(d+2)],ye=Ra[h.charCodeAt(d+3)],qe[x++]=U<<2|se>>4,qe[x++]=(se&15)<<4|we>>2,qe[x++]=(we&3)<<6|ye&63;return Ve},EA=function(h){for(var u=h.length,g=[],d=0;d<u;d+=2)g.push(h[d+1]<<8|h[d]);return g},Oo=function(h){for(var u=h.length,g=[],d=0;d<u;d+=4)g.push(h[d+3]<<24|h[d+2]<<16|h[d+1]<<8|h[d]);return g},ua=5,As=11,qa=2,qA=As-ua,Po=65536>>ua,BA=1<<ua,ca=BA-1,Mo=1024>>ua,No=Po+Mo,Ho=No,eo=32,Ko=Ho+eo,jl=65536>>As,bA=1<<qA,$o=bA-1,ji=function(h,u,g){return h.slice?h.slice(u,g):new Uint16Array(Array.prototype.slice.call(h,u,g))},eA=function(h,u,g){return h.slice?h.slice(u,g):new Uint32Array(Array.prototype.slice.call(h,u,g))},Go=function(h,u){var g=xl(h),d=Array.isArray(g)?Oo(g):new Uint32Array(g),x=Array.isArray(g)?EA(g):new Uint16Array(g),U=24,se=ji(x,U/2,d[4]/2),we=d[5]===2?ji(x,(U+d[4])/2):eA(d,Math.ceil((U+d[4])/4));return new to(d[0],d[1],d[2],d[3],se,we)},to=function(){function h(u,g,d,x,U,se){this.initialValue=u,this.errorValue=g,this.highStart=d,this.highValueIndex=x,this.index=U,this.data=se}return h.prototype.get=function(u){var g;if(u>=0){if(u<55296||u>56319&&u<=65535)return g=this.index[u>>ua],g=(g<<qa)+(u&ca),this.data[g];if(u<=65535)return g=this.index[Po+(u-55296>>ua)],g=(g<<qa)+(u&ca),this.data[g];if(u<this.highStart)return g=Ko-jl+(u>>As),g=this.index[g],g+=u>>ua&$o,g=this.index[g],g=(g<<qa)+(u&ca),this.data[g];if(u<=1114111)return this.data[this.highValueIndex]}return this.errorValue},h}(),ka="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",CA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),xA=0;xA<ka.length;xA++)CA[ka.charCodeAt(xA)]=xA;var Sl=1,SA=2,Vo=3,tA=4,FA=5,Xl=7,os=8,Wo=9,TA=10,Ms=11,Fl=12,Tl=13,l=14,C=15,m=function(h){for(var u=[],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?u.push(((x&1023)<<10)+(U&1023)+65536):(u.push(x),g--)}else u.push(x)}return u},R=function(){for(var h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];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 se=h[x];se<=65535?d.push(se):(se-=65536,d.push((se>>10)+55296,se%1024+56320)),(x+1===g||d.length>16384)&&(U+=String.fromCharCode.apply(String,d),d.length=0)}return U},j=Go(Fs),Ae="\xD7",Ze="\xF7",Ne=function(h){return j.get(h)},sn=function(h,u,g){var d=g-2,x=u[d],U=u[g-1],se=u[g];if(U===SA&&se===Vo)return Ae;if(U===SA||U===Vo||U===tA||se===SA||se===Vo||se===tA)return Ze;if(U===os&&[os,Wo,Ms,Fl].indexOf(se)!==-1||(U===Ms||U===Wo)&&(se===Wo||se===TA)||(U===Fl||U===TA)&&se===TA||se===Tl||se===FA||se===Xl||U===Sl)return Ae;if(U===Tl&&se===l){for(;x===FA;)x=u[--d];if(x===l)return Ae}if(U===C&&se===C){for(var we=0;x===C;)we++,x=u[--d];if(we%2===0)return Ae}return Ze},Oe=function(h){var u=m(h),g=u.length,d=0,x=0,U=u.map(Ne);return{next:function(){if(d>=g)return{done:!0,value:null};for(var se=Ae;d<g&&(se=sn(u,U,++d))===Ae;);if(se!==Ae||d===g){var we=R.apply(null,u.slice(x,d));return x=d,{value:we,done:!1}}return{done:!0,value:null}}}},nt=function(h){for(var u=Oe(h),g=[],d;!(d=u.next()).done;)d.value&&g.push(d.value.slice());return g},Pn=function(h){var u=123;if(h.createRange){var g=h.createRange();if(g.getBoundingClientRect){var d=h.createElement("boundtest");d.style.height=u+"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===u)return!0}}return!1},dn=function(h){var u=h.createElement("boundtest");u.style.width="50px",u.style.display="block",u.style.fontSize="12px",u.style.letterSpacing="0px",u.style.wordSpacing="0px",h.body.appendChild(u);var g=h.createRange();u.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var d=u.firstChild,x=V(d.data).map(function(ye){return o(ye)}),U=0,se={},we=x.every(function(ye,Ve){g.setStart(d,U),g.setEnd(d,U+ye.length);var qe=g.getBoundingClientRect();U+=ye.length;var dt=qe.x>se.x||qe.y>se.y;return se=qe,Ve===0?!0:dt});return h.body.removeChild(u),we},zt=function(){return typeof new Image().crossOrigin!="undefined"},Vn=function(){return typeof new XMLHttpRequest().responseType=="string"},ui=function(h){var u=new Image,g=h.createElement("canvas"),d=g.getContext("2d");if(!d)return!1;u.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{d.drawImage(u,0,0),g.toDataURL()}catch(x){return!1}return!0},Tr=function(h){return h[0]===0&&h[1]===255&&h[2]===0&&h[3]===255},_r=function(h){var u=h.createElement("canvas"),g=100;u.width=g,u.height=g;var d=u.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=u.toDataURL();x.src=U;var se=Kr(g,g,0,0,x);return d.fillStyle="red",d.fillRect(0,0,g,g),hr(se).then(function(we){d.drawImage(we,0,0);var ye=d.getImageData(0,0,g,g).data;d.fillStyle="red",d.fillRect(0,0,g,g);var Ve=h.createElement("div");return Ve.style.backgroundImage="url("+U+")",Ve.style.height=g+"px",Tr(ye)?hr(Kr(g,g,0,0,Ve)):Promise.reject(!1)}).then(function(we){return d.drawImage(we,0,0),Tr(d.getImageData(0,0,g,g).data)}).catch(function(){return!1})},Kr=function(h,u,g,d,x){var U="http://www.w3.org/2000/svg",se=document.createElementNS(U,"svg"),we=document.createElementNS(U,"foreignObject");return se.setAttributeNS(null,"width",h.toString()),se.setAttributeNS(null,"height",u.toString()),we.setAttributeNS(null,"width","100%"),we.setAttributeNS(null,"height","100%"),we.setAttributeNS(null,"x",g.toString()),we.setAttributeNS(null,"y",d.toString()),we.setAttributeNS(null,"externalResourcesRequired","true"),se.appendChild(we),we.appendChild(x),se},hr=function(h){return new Promise(function(u,g){var d=new Image;d.onload=function(){return u(d)},d.onerror=g,d.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(h))})},cn={get SUPPORT_RANGE_BOUNDS(){var h=Pn(document);return Object.defineProperty(cn,"SUPPORT_RANGE_BOUNDS",{value:h}),h},get SUPPORT_WORD_BREAKING(){var h=cn.SUPPORT_RANGE_BOUNDS&&dn(document);return Object.defineProperty(cn,"SUPPORT_WORD_BREAKING",{value:h}),h},get SUPPORT_SVG_DRAWING(){var h=ui(document);return Object.defineProperty(cn,"SUPPORT_SVG_DRAWING",{value:h}),h},get SUPPORT_FOREIGNOBJECT_DRAWING(){var h=typeof Array.from=="function"&&typeof window.fetch=="function"?_r(document):Promise.resolve(!1);return Object.defineProperty(cn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:h}),h},get SUPPORT_CORS_IMAGES(){var h=zt();return Object.defineProperty(cn,"SUPPORT_CORS_IMAGES",{value:h}),h},get SUPPORT_RESPONSE_TYPE(){var h=Vn();return Object.defineProperty(cn,"SUPPORT_RESPONSE_TYPE",{value:h}),h},get SUPPORT_CORS_XHR(){var h="withCredentials"in new XMLHttpRequest;return Object.defineProperty(cn,"SUPPORT_CORS_XHR",{value:h}),h},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var h=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(cn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:h}),h}},Dr=function(){function h(u,g){this.text=u,this.bounds=g}return h}(),wi=function(h,u,g,d){var x=Zr(u,g),U=[],se=0;return x.forEach(function(we){if(g.textDecorationLine.length||we.trim().length>0)if(cn.SUPPORT_RANGE_BOUNDS){var ye=ci(d,se,we.length).getClientRects();if(ye.length>1){var Ve=Pr(we),qe=0;Ve.forEach(function(Mt){U.push(new Dr(Mt,ee.fromDOMRectList(h,ci(d,qe+se,Mt.length).getClientRects()))),qe+=Mt.length})}else U.push(new Dr(we,ee.fromDOMRectList(h,ye)))}else{var dt=d.splitText(we.length);U.push(new Dr(we,Ar(h,d))),d=dt}else cn.SUPPORT_RANGE_BOUNDS||(d=d.splitText(we.length));se+=we.length}),U},Ar=function(h,u){var g=u.ownerDocument;if(g){var d=g.createElement("html2canvaswrapper");d.appendChild(u.cloneNode(!0));var x=u.parentNode;if(x){x.replaceChild(d,u);var U=y(h,d);return d.firstChild&&x.replaceChild(d.firstChild,d),U}}return ee.EMPTY},ci=function(h,u,g){var d=h.ownerDocument;if(!d)throw new Error("Node has no owner document");var x=d.createRange();return x.setStart(h,u),x.setEnd(h,u+g),x},Pr=function(h){if(cn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var u=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(u.segment(h)).map(function(g){return g.segment})}return nt(h)},Cr=function(h,u){if(cn.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 no(h,u)},Zr=function(h,u){return u.letterSpacing!==0?Pr(h):Cr(h,u)},Ea=[32,160,4961,65792,65793,4153,4241],no=function(h,u){for(var g=rr(h,{lineBreak:u.lineBreak,wordBreak:u.overflowWrap==="break-word"?"break-word":u.wordBreak}),d=[],x,U=function(){if(x.value){var se=x.value.slice(),we=V(se),ye="";we.forEach(function(Ve){Ea.indexOf(Ve)===-1?ye+=o(Ve):(ye.length&&d.push(ye),d.push(o(Ve)),ye="")}),ye.length&&d.push(ye)}};!(x=g.next()).done;)U();return d},vs=function(){function h(u,g,d){this.text=xi(g.data,d.textTransform),this.textBounds=wi(u,this.text,d,g)}return h}(),xi=function(h,u){switch(u){case 1:return h.toLowerCase();case 3:return h.replace(nA,Qa);case 2:return h.toUpperCase();default:return h}},nA=/(^|\s|:|-|\(|\))([a-z])/g,Qa=function(h,u,g){return h.length>0?u+g.toUpperCase():h},Jl=function(h){Y(u,h);function u(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 u}(_s),ql=function(h){Y(u,h);function u(g,d){var x=h.call(this,g,d)||this;return x.canvas=d,x.intrinsicWidth=d.width,x.intrinsicHeight=d.height,x}return u}(_s),eu=function(h){Y(u,h);function u(g,d){var x=h.call(this,g,d)||this,U=new XMLSerializer,se=y(g,d);return d.setAttribute("width",se.width+"px"),d.setAttribute("height",se.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 u}(_s),tu=function(h){Y(u,h);function u(g,d){var x=h.call(this,g,d)||this;return x.value=d.value,x}return u}(_s),Il=function(h){Y(u,h);function u(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 u}(_s),Hu=[{type:15,flags:0,unit:"px",number:3}],nu=[{type:16,flags:0,number:50}],Ku=function(h){return h.width>h.height?new ee(h.left+(h.width-h.height)/2,h.top,h.height,h.height):h.width<h.height?new ee(h.left,h.top+(h.height-h.width)/2,h.width,h.width):h},zo=function(h){var u=h.type===Tc?new Array(h.value.length+1).join("\u2022"):h.value;return u.length===0?h.placeholder||"":u},IA="checkbox",rA="radio",Tc="password",ru=707406591,Zo=function(h){Y(u,h);function u(g,d){var x=h.call(this,g,d)||this;switch(x.type=d.type.toLowerCase(),x.checked=d.checked,x.value=zo(d),(x.type===IA||x.type===rA)&&(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=Ku(x.bounds)),x.type){case IA:x.styles.borderTopRightRadius=x.styles.borderTopLeftRadius=x.styles.borderBottomRightRadius=x.styles.borderBottomLeftRadius=Hu;break;case rA:x.styles.borderTopRightRadius=x.styles.borderTopLeftRadius=x.styles.borderBottomRightRadius=x.styles.borderBottomLeftRadius=nu;break}return x}return u}(_s),Dl=function(h){Y(u,h);function u(g,d){var x=h.call(this,g,d)||this,U=d.options[d.selectedIndex||0];return x.value=U&&U.text||"",x}return u}(_s),Yo=function(h){Y(u,h);function u(g,d){var x=h.call(this,g,d)||this;return x.value=d.value,x}return u}(_s),iu=function(h){Y(u,h);function u(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=Ll(g,d.contentWindow.document.documentElement);var U=d.contentWindow.document.documentElement?ma(g,getComputedStyle(d.contentWindow.document.documentElement).backgroundColor):Os.TRANSPARENT,se=d.contentWindow.document.body?ma(g,getComputedStyle(d.contentWindow.document.body).backgroundColor):Os.TRANSPARENT;x.backgroundColor=ts(U)?ts(se)?x.styles.backgroundColor:se:U}}catch(we){}return x}return u}(_s),$u=["OL","UL","MENU"],iA=function(h,u,g,d){for(var x=u.firstChild,U=void 0;x;x=U)if(U=x.nextSibling,au(x)&&x.data.trim().length>0)g.textNodes.push(new vs(h,x,g.styles));else if(DA(x))if(sA(x)&&x.assignedNodes)x.assignedNodes().forEach(function(we){return iA(h,we,g,d)});else{var se=su(h,x);se.styles.isVisible()&&(Gu(x,se,d)?se.flags|=4:Vu(se.styles)&&(se.flags|=2),$u.indexOf(x.tagName)!==-1&&(se.flags|=8),g.elements.push(se),x.slot,x.shadowRoot?iA(h,x.shadowRoot,se,d):!ro(x)&&!ou(x)&&!io(x)&&iA(h,x,se,d))}},su=function(h,u){return Ql(u)?new Jl(h,u):lu(u)?new ql(h,u):ou(u)?new eu(h,u):Au(u)?new tu(h,u):Wu(u)?new Il(h,u):zu(u)?new Zo(h,u):io(u)?new Dl(h,u):ro(u)?new Yo(h,u):uu(u)?new iu(h,u):new _s(h,u)},Ll=function(h,u){var g=su(h,u);return g.flags|=4,iA(h,u,g,g),g},Gu=function(h,u,g){return u.styles.isPositionedWithZIndex()||u.styles.opacity<1||u.styles.isTransformed()||Rl(h)&&g.styles.isTransparent()},Vu=function(h){return h.isPositioned()||h.isFloating()},au=function(h){return h.nodeType===Node.TEXT_NODE},DA=function(h){return h.nodeType===Node.ELEMENT_NODE},Ul=function(h){return DA(h)&&typeof h.style!="undefined"&&!jo(h)},jo=function(h){return typeof h.className=="object"},Au=function(h){return h.tagName==="LI"},Wu=function(h){return h.tagName==="OL"},zu=function(h){return h.tagName==="INPUT"},Zu=function(h){return h.tagName==="HTML"},ou=function(h){return h.tagName==="svg"},Rl=function(h){return h.tagName==="BODY"},lu=function(h){return h.tagName==="CANVAS"},kl=function(h){return h.tagName==="VIDEO"},Ql=function(h){return h.tagName==="IMG"},uu=function(h){return h.tagName==="IFRAME"},cu=function(h){return h.tagName==="STYLE"},Yu=function(h){return h.tagName==="SCRIPT"},ro=function(h){return h.tagName==="TEXTAREA"},io=function(h){return h.tagName==="SELECT"},sA=function(h){return h.tagName==="SLOT"},Vs=function(h){return h.tagName.indexOf("-")>0},fu=function(){function h(){this.counters={}}return h.prototype.getCounterValue=function(u){var g=this.counters[u];return g&&g.length?g[g.length-1]:1},h.prototype.getCounterValues=function(u){var g=this.counters[u];return g||[]},h.prototype.pop=function(u){var g=this;u.forEach(function(d){return g.counters[d].pop()})},h.prototype.parse=function(u){var g=this,d=u.counterIncrement,x=u.counterReset,U=!0;d!==null&&d.forEach(function(we){var ye=g.counters[we.counter];ye&&we.increment!==0&&(U=!1,ye.length||ye.push(1),ye[Math.max(0,ye.length-1)]+=we.increment)});var se=[];return U&&x.forEach(function(we){var ye=g.counters[we.counter];se.push(we.counter),ye||(ye=g.counters[we.counter]=[]),ye.push(we.reset)}),se},h}(),hu={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"]},Ol={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"]},du={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"]},LA={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"]},Oa=function(h,u,g,d,x,U){return h<u||h>g?aA(h,x,U.length>0):d.integers.reduce(function(se,we,ye){for(;h>=we;)h-=we,se+=d.values[ye];return se},"")+U},gu=function(h,u,g,d){var x="";do g||h--,x=d(h)+x,h/=u;while(h*u>=u);return x},zi=function(h,u,g,d,x){var U=g-u+1;return(h<0?"-":"")+(gu(Math.abs(h),U,d,function(se){return o(Math.floor(se%U)+u)})+x)},fa=function(h,u,g){g===void 0&&(g=". ");var d=u.length;return gu(Math.abs(h),d,!1,function(x){return u[Math.floor(x%d)]})+g},UA=1,Pa=2,Ws=4,ha=8,zs=function(h,u,g,d,x,U){if(h<-9999||h>9999)return aA(h,4,x.length>0);var se=Math.abs(h),we=x;if(se===0)return u[0]+we;for(var ye=0;se>0&&ye<=4;ye++){var Ve=se%10;Ve===0&&Ni(U,UA)&&we!==""?we=u[Ve]+we:Ve>1||Ve===1&&ye===0||Ve===1&&ye===1&&Ni(U,Pa)||Ve===1&&ye===1&&Ni(U,Ws)&&h>100||Ve===1&&ye>1&&Ni(U,ha)?we=u[Ve]+(ye>0?g[ye-1]:"")+we:Ve===1&&ye>0&&(we=g[ye-1]+we),se=Math.floor(se/10)}return(h<0?d:"")+we},pu="\u5341\u767E\u5343\u842C",mu="\u62FE\u4F70\u4EDF\u842C",Xo="\u30DE\u30A4\u30CA\u30B9",Jo="\uB9C8\uC774\uB108\uC2A4",aA=function(h,u,g){var d=g?". ":"",x=g?"\u3001":"",U=g?", ":"",se=g?" ":"";switch(u){case 0:return"\u2022"+se;case 1:return"\u25E6"+se;case 2:return"\u25FE"+se;case 5:var we=zi(h,48,57,!0,d);return we.length<4?"0"+we:we;case 4:return fa(h,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",x);case 6:return Oa(h,1,3999,hu,3,d).toLowerCase();case 7:return Oa(h,1,3999,hu,3,d);case 8:return zi(h,945,969,!1,d);case 9:return zi(h,97,122,!1,d);case 10:return zi(h,65,90,!1,d);case 11:return zi(h,1632,1641,!0,d);case 12:case 49:return Oa(h,1,9999,Ol,3,d);case 35:return Oa(h,1,9999,Ol,3,d).toLowerCase();case 13:return zi(h,2534,2543,!0,d);case 14:case 30:return zi(h,6112,6121,!0,d);case 15:return fa(h,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",x);case 16:return fa(h,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",x);case 17:case 48:return zs(h,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",pu,"\u8CA0",x,Pa|Ws|ha);case 47:return zs(h,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",mu,"\u8CA0",x,UA|Pa|Ws|ha);case 42:return zs(h,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",pu,"\u8D1F",x,Pa|Ws|ha);case 41:return zs(h,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",mu,"\u8D1F",x,UA|Pa|Ws|ha);case 26:return zs(h,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Xo,x,0);case 25:return zs(h,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Xo,x,UA|Pa|Ws);case 31:return zs(h,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Jo,U,UA|Pa|Ws);case 33:return zs(h,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Jo,U,0);case 32:return zs(h,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Jo,U,UA|Pa|Ws);case 18:return zi(h,2406,2415,!0,d);case 20:return Oa(h,1,19999,LA,3,d);case 21:return zi(h,2790,2799,!0,d);case 22:return zi(h,2662,2671,!0,d);case 22:return Oa(h,1,10999,du,3,d);case 23:return fa(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 fa(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 zi(h,3302,3311,!0,d);case 28:return fa(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 fa(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 zi(h,3792,3801,!0,d);case 37:return zi(h,6160,6169,!0,d);case 38:return zi(h,4160,4169,!0,d);case 39:return zi(h,2918,2927,!0,d);case 40:return zi(h,1776,1785,!0,d);case 43:return zi(h,3046,3055,!0,d);case 44:return zi(h,3174,3183,!0,d);case 45:return zi(h,3664,3673,!0,d);case 46:return zi(h,3872,3881,!0,d);case 3:default:return zi(h,48,57,!0,d)}},_u="data-html2canvas-ignore",AA=function(){function h(u,g,d){if(this.context=u,this.options=d,this.scrolledElements=[],this.referenceElement=g,this.counters=new fu,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(u,g){var d=this,x=vu(u,g);if(!x.contentWindow)return Promise.reject("Unable to find iframe window");var U=u.defaultView.pageXOffset,se=u.defaultView.pageYOffset,we=x.contentWindow,ye=we.document,Ve=Xu(x).then(function(){return Te(d,void 0,void 0,function(){var qe,dt;return He(this,function(Mt){switch(Mt.label){case 0:return this.scrolledElements.forEach(qu),we&&(we.scrollTo(g.left,g.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(we.scrollY!==g.top||we.scrollX!==g.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(we.scrollX-g.left,we.scrollY-g.top,0,0))),qe=this.options.onclone,dt=this.clonedReferenceElement,typeof dt=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:ye.fonts&&ye.fonts.ready?[4,ye.fonts.ready]:[3,2];case 1:Mt.sent(),Mt.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,ta(ye)]:[3,4];case 3:Mt.sent(),Mt.label=4;case 4:return typeof qe=="function"?[2,Promise.resolve().then(function(){return qe(ye,dt)}).then(function(){return x})]:[2,x]}})})});return ye.open(),ye.write(Ju(document.doctype)+"<html></html>"),wu(this.referenceElement.ownerDocument,U,se),ye.replaceChild(ye.adoptNode(this.documentElement),ye.documentElement),ye.close(),Ve},h.prototype.createElementClone=function(u){if(JA(u,2))debugger;if(lu(u))return this.createCanvasClone(u);if(kl(u))return this.createVideoClone(u);if(cu(u))return this.createStyleClone(u);var g=u.cloneNode(!1);return Ql(g)&&(Ql(u)&&u.currentSrc&&u.currentSrc!==u.src&&(g.src=u.currentSrc,g.srcset=""),g.loading==="lazy"&&(g.loading="eager")),Vs(g)?this.createCustomElementClone(g):g},h.prototype.createCustomElementClone=function(u){var g=document.createElement("html2canvascustomelement");return RA(u.style,g),g},h.prototype.createStyleClone=function(u){try{var g=u.sheet;if(g&&g.cssRules){var d=[].slice.call(g.cssRules,0).reduce(function(U,se){return se&&typeof se.cssText=="string"?U+se.cssText:U},""),x=u.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 u.cloneNode(!1)},h.prototype.createCanvasClone=function(u){var g;if(this.options.inlineImages&&u.ownerDocument){var d=u.ownerDocument.createElement("img");try{return d.src=u.toDataURL(),d}catch(Ve){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",u)}}var x=u.cloneNode(!1);try{x.width=u.width,x.height=u.height;var U=u.getContext("2d"),se=x.getContext("2d");if(se)if(!this.options.allowTaint&&U)se.putImageData(U.getImageData(0,0,u.width,u.height),0,0);else{var we=(g=u.getContext("webgl2"))!==null&&g!==void 0?g:u.getContext("webgl");if(we){var ye=we.getContextAttributes();(ye==null?void 0:ye.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",u)}se.drawImage(u,0,0)}return x}catch(Ve){this.context.logger.info("Unable to clone canvas as it is tainted",u)}return x},h.prototype.createVideoClone=function(u){var g=u.ownerDocument.createElement("canvas");g.width=u.offsetWidth,g.height=u.offsetHeight;var d=g.getContext("2d");try{return d&&(d.drawImage(u,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",u)}var x=u.ownerDocument.createElement("canvas");return x.width=u.offsetWidth,x.height=u.offsetHeight,x},h.prototype.appendChildNode=function(u,g,d){(!DA(g)||!Yu(g)&&!g.hasAttribute(_u)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(g)))&&(!this.options.copyStyles||!DA(g)||!cu(g))&&u.appendChild(this.cloneNode(g,d))},h.prototype.cloneChildNodes=function(u,g,d){for(var x=this,U=u.shadowRoot?u.shadowRoot.firstChild:u.firstChild;U;U=U.nextSibling)if(DA(U)&&sA(U)&&typeof U.assignedNodes=="function"){var se=U.assignedNodes();se.length&&se.forEach(function(we){return x.appendChildNode(g,we,d)})}else this.appendChildNode(g,U,d)},h.prototype.cloneNode=function(u,g){if(au(u))return document.createTextNode(u.data);if(!u.ownerDocument)return u.cloneNode(!1);var d=u.ownerDocument.defaultView;if(d&&DA(u)&&(Ul(u)||jo(u))){var x=this.createElementClone(u);x.style.transitionProperty="none";var U=d.getComputedStyle(u),se=d.getComputedStyle(u,":before"),we=d.getComputedStyle(u,":after");this.referenceElement===u&&Ul(x)&&(this.clonedReferenceElement=x),Rl(x)&&nc(x);var ye=this.counters.parse(new jA(this.context,U)),Ve=this.resolvePseudoContent(u,x,se,so.BEFORE);Vs(u)&&(g=!0),kl(u)||this.cloneChildNodes(u,x,g),Ve&&x.insertBefore(Ve,x.firstChild);var qe=this.resolvePseudoContent(u,x,we,so.AFTER);return qe&&x.appendChild(qe),this.counters.pop(ye),(U&&(this.options.copyStyles||jo(u))&&!uu(u)||g)&&RA(U,x),(u.scrollTop!==0||u.scrollLeft!==0)&&this.scrolledElements.push([x,u.scrollLeft,u.scrollTop]),(ro(u)||io(u))&&(ro(x)||io(x))&&(x.value=u.value),x}return u.cloneNode(!1)},h.prototype.resolvePseudoContent=function(u,g,d,x){var U=this;if(d){var se=d.content,we=g.ownerDocument;if(!(!we||!se||se==="none"||se==="-moz-alt-content"||d.display==="none")){this.counters.parse(new jA(this.context,d));var ye=new ko(this.context,d),Ve=we.createElement("html2canvaspseudoelement");RA(d,Ve),ye.content.forEach(function(dt){if(dt.type===0)Ve.appendChild(we.createTextNode(dt.value));else if(dt.type===22){var Mt=we.createElement("img");Mt.src=dt.value,Mt.style.opacity="1",Ve.appendChild(Mt)}else if(dt.type===18){if(dt.name==="attr"){var Qn=dt.values.filter(Ir);Qn.length&&Ve.appendChild(we.createTextNode(u.getAttribute(Qn[0].value)||""))}else if(dt.name==="counter"){var pn=dt.values.filter(fi),Dn=pn[0],kr=pn[1];if(Dn&&Ir(Dn)){var qn=U.counters.getCounterValue(Dn.value),Wn=kr&&Ir(kr)?mA.parse(U.context,kr.value):3;Ve.appendChild(we.createTextNode(aA(qn,Wn,!1)))}}else if(dt.name==="counters"){var Ai=dt.values.filter(fi),Dn=Ai[0],Mr=Ai[1],kr=Ai[2];if(Dn&&Ir(Dn)){var Br=U.counters.getCounterValues(Dn.value),Nn=kr&&Ir(kr)?mA.parse(U.context,kr.value):3,ri=Mr&&Mr.type===0?Mr.value:"",ii=Br.map(function(ds){return aA(ds,Nn,!1)}).join(ri);Ve.appendChild(we.createTextNode(ii))}}}else if(dt.type===20)switch(dt.value){case"open-quote":Ve.appendChild(we.createTextNode(vA(ye.quotes,U.quoteDepth++,!0)));break;case"close-quote":Ve.appendChild(we.createTextNode(vA(ye.quotes,--U.quoteDepth,!1)));break;default:Ve.appendChild(we.createTextNode(dt.value))}}),Ve.className=qo+" "+Ns;var qe=x===so.BEFORE?" "+qo:" "+Ns;return jo(g)?g.className.baseValue+=qe:g.className+=qe,Ve}}},h.destroy=function(u){return u.parentNode?(u.parentNode.removeChild(u),!0):!1},h}(),so;(function(h){h[h.BEFORE=0]="BEFORE",h[h.AFTER=1]="AFTER"})(so||(so={}));var vu=function(h,u){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=u.width.toString(),g.height=u.height.toString(),g.scrolling="no",g.setAttribute(_u,"true"),h.body.appendChild(g),g},ju=function(h){return new Promise(function(u){if(h.complete){u();return}if(!h.src){u();return}h.onload=u,h.onerror=u})},ta=function(h){return Promise.all([].slice.call(h.images,0).map(ju))},Xu=function(h){return new Promise(function(u,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),u(h))},50)}})},yu=["all","d","content"],RA=function(h,u){for(var g=h.length-1;g>=0;g--){var d=h.item(g);yu.indexOf(d)===-1&&u.style.setProperty(d,h.getPropertyValue(d))}return u},Ju=function(h){var u="";return h&&(u+="<!DOCTYPE ",h.name&&(u+=h.name),h.internalSubset&&(u+=h.internalSubset),h.publicId&&(u+='"'+h.publicId+'"'),h.systemId&&(u+='"'+h.systemId+'"'),u+=">"),u},wu=function(h,u,g){h&&h.defaultView&&(u!==h.defaultView.pageXOffset||g!==h.defaultView.pageYOffset)&&h.defaultView.scrollTo(u,g)},qu=function(h){var u=h[0],g=h[1],d=h[2];u.scrollLeft=g,u.scrollTop=d},ec=":before",tc=":after",qo="___html2canvas___pseudoelement_before",Ns="___html2canvas___pseudoelement_after",da=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,nc=function(h){rc(h,"."+qo+ec+da+`
|
|
.`+Ns+tc+da)},rc=function(h,u){var g=h.ownerDocument;if(g){var d=g.createElement("style");d.textContent=u,h.appendChild(d)}},Eu=function(){function h(){}return h.getOrigin=function(u){var g=h._link;return g?(g.href=u,g.href=g.href,g.protocol+g.hostname+g.port):"about:blank"},h.isSameOrigin=function(u){return h.getOrigin(u)===h._origin},h.setContext=function(u){h._link=u.document.createElement("a"),h._origin=h.getOrigin(u.location.href)},h._origin="about:blank",h}(),ic=function(){function h(u,g){this.context=u,this._options=g,this._cache={}}return h.prototype.addImage=function(u){var g=Promise.resolve();return this.has(u)||(ao(u)||Bu(u))&&(this._cache[u]=this.loadImage(u)).catch(function(){}),g},h.prototype.match=function(u){return this._cache[u]},h.prototype.loadImage=function(u){return Te(this,void 0,void 0,function(){var g,d,x,U,se=this;return He(this,function(we){switch(we.label){case 0:return g=Eu.isSameOrigin(u),d=!Pl(u)&&this._options.useCORS===!0&&cn.SUPPORT_CORS_IMAGES&&!g,x=!Pl(u)&&!g&&!ao(u)&&typeof this._options.proxy=="string"&&cn.SUPPORT_CORS_XHR&&!d,!g&&this._options.allowTaint===!1&&!Pl(u)&&!ao(u)&&!x&&!d?[2]:(U=u,x?[4,this.proxy(U)]:[3,2]);case 1:U=we.sent(),we.label=2;case 2:return this.context.logger.debug("Added image "+u.substring(0,256)),[4,new Promise(function(ye,Ve){var qe=new Image;qe.onload=function(){return ye(qe)},qe.onerror=Ve,(Ac(U)||d)&&(qe.crossOrigin="anonymous"),qe.src=U,qe.complete===!0&&setTimeout(function(){return ye(qe)},500),se._options.imageTimeout>0&&setTimeout(function(){return Ve("Timed out ("+se._options.imageTimeout+"ms) loading image")},se._options.imageTimeout)})];case 3:return[2,we.sent()]}})})},h.prototype.has=function(u){return typeof this._cache[u]!="undefined"},h.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},h.prototype.proxy=function(u){var g=this,d=this._options.proxy;if(!d)throw new Error("No proxy defined");var x=u.substring(0,256);return new Promise(function(U,se){var we=cn.SUPPORT_RESPONSE_TYPE?"blob":"text",ye=new XMLHttpRequest;ye.onload=function(){if(ye.status===200)if(we==="text")U(ye.response);else{var dt=new FileReader;dt.addEventListener("load",function(){return U(dt.result)},!1),dt.addEventListener("error",function(Mt){return se(Mt)},!1),dt.readAsDataURL(ye.response)}else se("Failed to proxy resource "+x+" with status code "+ye.status)},ye.onerror=se;var Ve=d.indexOf("?")>-1?"&":"?";if(ye.open("GET",""+d+Ve+"url="+encodeURIComponent(u)+"&responseType="+we),we!=="text"&&ye instanceof XMLHttpRequest&&(ye.responseType=we),g._options.imageTimeout){var qe=g._options.imageTimeout;ye.timeout=qe,ye.ontimeout=function(){return se("Timed out ("+qe+"ms) proxying "+x)}}ye.send()})},h}(),sc=/^data:image\/svg\+xml/i,ac=/^data:image\/.*;base64,/i,oA=/^data:image\/.*/i,Bu=function(h){return cn.SUPPORT_SVG_DRAWING||!bu(h)},Pl=function(h){return oA.test(h)},Ac=function(h){return ac.test(h)},ao=function(h){return h.substr(0,4)==="blob"},bu=function(h){return h.substr(-3).toLowerCase()==="svg"||sc.test(h)},kn=function(){function h(u,g){this.type=0,this.x=u,this.y=g}return h.prototype.add=function(u,g){return new h(this.x+u,this.y+g)},h}(),Ba=function(h,u,g){return new kn(h.x+(u.x-h.x)*g,h.y+(u.y-h.y)*g)},el=function(){function h(u,g,d,x){this.type=1,this.start=u,this.startControl=g,this.endControl=d,this.end=x}return h.prototype.subdivide=function(u,g){var d=Ba(this.start,this.startControl,u),x=Ba(this.startControl,this.endControl,u),U=Ba(this.endControl,this.end,u),se=Ba(d,x,u),we=Ba(x,U,u),ye=Ba(se,we,u);return g?new h(this.start,d,se,ye):new h(ye,we,U,this.end)},h.prototype.add=function(u,g){return new h(this.start.add(u,g),this.startControl.add(u,g),this.endControl.add(u,g),this.end.add(u,g))},h.prototype.reverse=function(){return new h(this.end,this.endControl,this.startControl,this.start)},h}(),Zs=function(h){return h.type===1},Ml=function(){function h(u){var g=u.styles,d=u.bounds,x=Bs(g.borderTopLeftRadius,d.width,d.height),U=x[0],se=x[1],we=Bs(g.borderTopRightRadius,d.width,d.height),ye=we[0],Ve=we[1],qe=Bs(g.borderBottomRightRadius,d.width,d.height),dt=qe[0],Mt=qe[1],Qn=Bs(g.borderBottomLeftRadius,d.width,d.height),pn=Qn[0],Dn=Qn[1],kr=[];kr.push((U+ye)/d.width),kr.push((pn+dt)/d.width),kr.push((se+Dn)/d.height),kr.push((Ve+Mt)/d.height);var qn=Math.max.apply(Math,kr);qn>1&&(U/=qn,se/=qn,ye/=qn,Ve/=qn,dt/=qn,Mt/=qn,pn/=qn,Dn/=qn);var Wn=d.width-ye,Ai=d.height-Mt,Mr=d.width-dt,Br=d.height-Dn,Nn=g.borderTopWidth,ri=g.borderRightWidth,ii=g.borderBottomWidth,vr=g.borderLeftWidth,Zi=ni(g.paddingTop,u.bounds.width),ds=ni(g.paddingRight,u.bounds.width),Ks=ni(g.paddingBottom,u.bounds.width),Xr=ni(g.paddingLeft,u.bounds.width);this.topLeftBorderDoubleOuterBox=U>0||se>0?Li(d.left+vr/3,d.top+Nn/3,U-vr/3,se-Nn/3,mi.TOP_LEFT):new kn(d.left+vr/3,d.top+Nn/3),this.topRightBorderDoubleOuterBox=U>0||se>0?Li(d.left+Wn,d.top+Nn/3,ye-ri/3,Ve-Nn/3,mi.TOP_RIGHT):new kn(d.left+d.width-ri/3,d.top+Nn/3),this.bottomRightBorderDoubleOuterBox=dt>0||Mt>0?Li(d.left+Mr,d.top+Ai,dt-ri/3,Mt-ii/3,mi.BOTTOM_RIGHT):new kn(d.left+d.width-ri/3,d.top+d.height-ii/3),this.bottomLeftBorderDoubleOuterBox=pn>0||Dn>0?Li(d.left+vr/3,d.top+Br,pn-vr/3,Dn-ii/3,mi.BOTTOM_LEFT):new kn(d.left+vr/3,d.top+d.height-ii/3),this.topLeftBorderDoubleInnerBox=U>0||se>0?Li(d.left+vr*2/3,d.top+Nn*2/3,U-vr*2/3,se-Nn*2/3,mi.TOP_LEFT):new kn(d.left+vr*2/3,d.top+Nn*2/3),this.topRightBorderDoubleInnerBox=U>0||se>0?Li(d.left+Wn,d.top+Nn*2/3,ye-ri*2/3,Ve-Nn*2/3,mi.TOP_RIGHT):new kn(d.left+d.width-ri*2/3,d.top+Nn*2/3),this.bottomRightBorderDoubleInnerBox=dt>0||Mt>0?Li(d.left+Mr,d.top+Ai,dt-ri*2/3,Mt-ii*2/3,mi.BOTTOM_RIGHT):new kn(d.left+d.width-ri*2/3,d.top+d.height-ii*2/3),this.bottomLeftBorderDoubleInnerBox=pn>0||Dn>0?Li(d.left+vr*2/3,d.top+Br,pn-vr*2/3,Dn-ii*2/3,mi.BOTTOM_LEFT):new kn(d.left+vr*2/3,d.top+d.height-ii*2/3),this.topLeftBorderStroke=U>0||se>0?Li(d.left+vr/2,d.top+Nn/2,U-vr/2,se-Nn/2,mi.TOP_LEFT):new kn(d.left+vr/2,d.top+Nn/2),this.topRightBorderStroke=U>0||se>0?Li(d.left+Wn,d.top+Nn/2,ye-ri/2,Ve-Nn/2,mi.TOP_RIGHT):new kn(d.left+d.width-ri/2,d.top+Nn/2),this.bottomRightBorderStroke=dt>0||Mt>0?Li(d.left+Mr,d.top+Ai,dt-ri/2,Mt-ii/2,mi.BOTTOM_RIGHT):new kn(d.left+d.width-ri/2,d.top+d.height-ii/2),this.bottomLeftBorderStroke=pn>0||Dn>0?Li(d.left+vr/2,d.top+Br,pn-vr/2,Dn-ii/2,mi.BOTTOM_LEFT):new kn(d.left+vr/2,d.top+d.height-ii/2),this.topLeftBorderBox=U>0||se>0?Li(d.left,d.top,U,se,mi.TOP_LEFT):new kn(d.left,d.top),this.topRightBorderBox=ye>0||Ve>0?Li(d.left+Wn,d.top,ye,Ve,mi.TOP_RIGHT):new kn(d.left+d.width,d.top),this.bottomRightBorderBox=dt>0||Mt>0?Li(d.left+Mr,d.top+Ai,dt,Mt,mi.BOTTOM_RIGHT):new kn(d.left+d.width,d.top+d.height),this.bottomLeftBorderBox=pn>0||Dn>0?Li(d.left,d.top+Br,pn,Dn,mi.BOTTOM_LEFT):new kn(d.left,d.top+d.height),this.topLeftPaddingBox=U>0||se>0?Li(d.left+vr,d.top+Nn,Math.max(0,U-vr),Math.max(0,se-Nn),mi.TOP_LEFT):new kn(d.left+vr,d.top+Nn),this.topRightPaddingBox=ye>0||Ve>0?Li(d.left+Math.min(Wn,d.width-ri),d.top+Nn,Wn>d.width+ri?0:Math.max(0,ye-ri),Math.max(0,Ve-Nn),mi.TOP_RIGHT):new kn(d.left+d.width-ri,d.top+Nn),this.bottomRightPaddingBox=dt>0||Mt>0?Li(d.left+Math.min(Mr,d.width-vr),d.top+Math.min(Ai,d.height-ii),Math.max(0,dt-ri),Math.max(0,Mt-ii),mi.BOTTOM_RIGHT):new kn(d.left+d.width-ri,d.top+d.height-ii),this.bottomLeftPaddingBox=pn>0||Dn>0?Li(d.left+vr,d.top+Math.min(Br,d.height-ii),Math.max(0,pn-vr),Math.max(0,Dn-ii),mi.BOTTOM_LEFT):new kn(d.left+vr,d.top+d.height-ii),this.topLeftContentBox=U>0||se>0?Li(d.left+vr+Xr,d.top+Nn+Zi,Math.max(0,U-(vr+Xr)),Math.max(0,se-(Nn+Zi)),mi.TOP_LEFT):new kn(d.left+vr+Xr,d.top+Nn+Zi),this.topRightContentBox=ye>0||Ve>0?Li(d.left+Math.min(Wn,d.width+vr+Xr),d.top+Nn+Zi,Wn>d.width+vr+Xr?0:ye-vr+Xr,Ve-(Nn+Zi),mi.TOP_RIGHT):new kn(d.left+d.width-(ri+ds),d.top+Nn+Zi),this.bottomRightContentBox=dt>0||Mt>0?Li(d.left+Math.min(Mr,d.width-(vr+Xr)),d.top+Math.min(Ai,d.height+Nn+Zi),Math.max(0,dt-(ri+ds)),Mt-(ii+Ks),mi.BOTTOM_RIGHT):new kn(d.left+d.width-(ri+ds),d.top+d.height-(ii+Ks)),this.bottomLeftContentBox=pn>0||Dn>0?Li(d.left+vr+Xr,d.top+Br,Math.max(0,pn-(vr+Xr)),Dn-(ii+Ks),mi.BOTTOM_LEFT):new kn(d.left+vr+Xr,d.top+d.height-(ii+Ks))}return h}(),mi;(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"})(mi||(mi={}));var Li=function(h,u,g,d,x){var U=4*((Math.sqrt(2)-1)/3),se=g*U,we=d*U,ye=h+g,Ve=u+d;switch(x){case mi.TOP_LEFT:return new el(new kn(h,Ve),new kn(h,Ve-we),new kn(ye-se,u),new kn(ye,u));case mi.TOP_RIGHT:return new el(new kn(h,u),new kn(h+se,u),new kn(ye,Ve-we),new kn(ye,Ve));case mi.BOTTOM_RIGHT:return new el(new kn(ye,u),new kn(ye,u+we),new kn(h+se,Ve),new kn(h,Ve));case mi.BOTTOM_LEFT:default:return new el(new kn(ye,Ve),new kn(ye-se,Ve),new kn(h,u+we),new kn(h,u))}},tl=function(h){return[h.topLeftBorderBox,h.topRightBorderBox,h.bottomRightBorderBox,h.bottomLeftBorderBox]},Cu=function(h){return[h.topLeftContentBox,h.topRightContentBox,h.bottomRightContentBox,h.bottomLeftContentBox]},kA=function(h){return[h.topLeftPaddingBox,h.topRightPaddingBox,h.bottomRightPaddingBox,h.bottomLeftPaddingBox]},nl=function(){function h(u,g,d){this.offsetX=u,this.offsetY=g,this.matrix=d,this.type=0,this.target=6}return h}(),rl=function(){function h(u,g){this.path=u,this.target=g,this.type=1}return h}(),xu=function(){function h(u){this.opacity=u,this.type=2,this.target=6}return h}(),oc=function(h){return h.type===0},Su=function(h){return h.type===1},Nl=function(h){return h.type===2},Fu=function(h,u){return h.length===u.length?h.some(function(g,d){return g===u[d]}):!1},Hl=function(h,u,g,d,x){return h.map(function(U,se){switch(se){case 0:return U.add(u,g);case 1:return U.add(u+d,g);case 2:return U.add(u+d,g+x);case 3:return U.add(u,g+x)}return U})},Tu=function(){function h(u){this.element=u,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return h}(),Iu=function(){function h(u,g){if(this.container=u,this.parent=g,this.effects=[],this.curves=new Ml(this.container),this.container.styles.opacity<1&&this.effects.push(new xu(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 nl(d,x,U))}if(this.container.styles.overflowX!==0){var se=tl(this.curves),we=kA(this.curves);Fu(se,we)?this.effects.push(new rl(se,6)):(this.effects.push(new rl(se,2)),this.effects.push(new rl(we,4)))}}return h.prototype.getEffects=function(u){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(ye){return!Su(ye)});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 se=tl(d.curves),we=kA(d.curves);Fu(se,we)||x.unshift(new rl(we,6))}}else x.unshift.apply(x,U);d=d.parent}return x.filter(function(ye){return Ni(ye.target,u)})},h}(),Ao=function(h,u,g,d){h.container.elements.forEach(function(x){var U=Ni(x.flags,4),se=Ni(x.flags,2),we=new Iu(x,h);Ni(x.styles.display,2048)&&d.push(we);var ye=Ni(x.flags,8)?[]:d;if(U||se){var Ve=U||x.styles.isPositioned()?g:u,qe=new Tu(we);if(x.styles.isPositioned()||x.styles.opacity<1||x.styles.isTransformed()){var dt=x.styles.zIndex.order;if(dt<0){var Mt=0;Ve.negativeZIndex.some(function(pn,Dn){return dt>pn.element.container.styles.zIndex.order?(Mt=Dn,!1):Mt>0}),Ve.negativeZIndex.splice(Mt,0,qe)}else if(dt>0){var Qn=0;Ve.positiveZIndex.some(function(pn,Dn){return dt>=pn.element.container.styles.zIndex.order?(Qn=Dn+1,!1):Qn>0}),Ve.positiveZIndex.splice(Qn,0,qe)}else Ve.zeroOrAutoZIndexOrTransformedOrOpacity.push(qe)}else x.styles.isFloating()?Ve.nonPositionedFloats.push(qe):Ve.nonPositionedInlineLevel.push(qe);Ao(we,qe,U?qe:g,ye)}else x.styles.isInlineLevel()?u.inlineLevel.push(we):u.nonInlineLevel.push(we),Ao(we,u,g,ye);Ni(x.flags,8)&&Kl(x,ye)})},Kl=function(h,u){for(var g=h instanceof Il?h.start:1,d=h instanceof Il?h.reversed:!1,x=0;x<u.length;x++){var U=u[x];U.container instanceof tu&&typeof U.container.value=="number"&&U.container.value!==0&&(g=U.container.value),U.listValue=aA(g,U.container.styles.listStyleType,!0),g+=d?-1:1}},Du=function(h){var u=new Iu(h,null),g=new Tu(u),d=[];return Ao(u,g,g,d),Kl(u.container,d),g},Lu=function(h,u){switch(u){case 0:return Hs(h.topLeftBorderBox,h.topLeftPaddingBox,h.topRightBorderBox,h.topRightPaddingBox);case 1:return Hs(h.topRightBorderBox,h.topRightPaddingBox,h.bottomRightBorderBox,h.bottomRightPaddingBox);case 2:return Hs(h.bottomRightBorderBox,h.bottomRightPaddingBox,h.bottomLeftBorderBox,h.bottomLeftPaddingBox);case 3:default:return Hs(h.bottomLeftBorderBox,h.bottomLeftPaddingBox,h.topLeftBorderBox,h.topLeftPaddingBox)}},Uu=function(h,u){switch(u){case 0:return Hs(h.topLeftBorderBox,h.topLeftBorderDoubleOuterBox,h.topRightBorderBox,h.topRightBorderDoubleOuterBox);case 1:return Hs(h.topRightBorderBox,h.topRightBorderDoubleOuterBox,h.bottomRightBorderBox,h.bottomRightBorderDoubleOuterBox);case 2:return Hs(h.bottomRightBorderBox,h.bottomRightBorderDoubleOuterBox,h.bottomLeftBorderBox,h.bottomLeftBorderDoubleOuterBox);case 3:default:return Hs(h.bottomLeftBorderBox,h.bottomLeftBorderDoubleOuterBox,h.topLeftBorderBox,h.topLeftBorderDoubleOuterBox)}},lc=function(h,u){switch(u){case 0:return Hs(h.topLeftBorderDoubleInnerBox,h.topLeftPaddingBox,h.topRightBorderDoubleInnerBox,h.topRightPaddingBox);case 1:return Hs(h.topRightBorderDoubleInnerBox,h.topRightPaddingBox,h.bottomRightBorderDoubleInnerBox,h.bottomRightPaddingBox);case 2:return Hs(h.bottomRightBorderDoubleInnerBox,h.bottomRightPaddingBox,h.bottomLeftBorderDoubleInnerBox,h.bottomLeftPaddingBox);case 3:default:return Hs(h.bottomLeftBorderDoubleInnerBox,h.bottomLeftPaddingBox,h.topLeftBorderDoubleInnerBox,h.topLeftPaddingBox)}},$l=function(h,u){switch(u){case 0:return oo(h.topLeftBorderStroke,h.topRightBorderStroke);case 1:return oo(h.topRightBorderStroke,h.bottomRightBorderStroke);case 2:return oo(h.bottomRightBorderStroke,h.bottomLeftBorderStroke);case 3:default:return oo(h.bottomLeftBorderStroke,h.topLeftBorderStroke)}},oo=function(h,u){var g=[];return Zs(h)?g.push(h.subdivide(.5,!1)):g.push(h),Zs(u)?g.push(u.subdivide(.5,!0)):g.push(u),g},Hs=function(h,u,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(u)?x.push(u.subdivide(.5,!1).reverse()):x.push(u),x},Ru=function(h){var u=h.bounds,g=h.styles;return u.add(g.borderLeftWidth,g.borderTopWidth,-(g.borderRightWidth+g.borderLeftWidth),-(g.borderTopWidth+g.borderBottomWidth))},QA=function(h){var u=h.styles,g=h.bounds,d=ni(u.paddingLeft,g.width),x=ni(u.paddingRight,g.width),U=ni(u.paddingTop,g.width),se=ni(u.paddingBottom,g.width);return g.add(d+u.borderLeftWidth,U+u.borderTopWidth,-(u.borderRightWidth+u.borderLeftWidth+d+x),-(u.borderTopWidth+u.borderBottomWidth+U+se))},ku=function(h,u){return h===0?u.bounds:h===2?QA(u):Ru(u)},Gl=function(h,u){return h===0?u.bounds:h===2?QA(u):Ru(u)},Vl=function(h,u,g){var d=ku(uA(h.styles.backgroundOrigin,u),h),x=Gl(uA(h.styles.backgroundClip,u),h),U=uc(uA(h.styles.backgroundSize,u),g,d),se=U[0],we=U[1],ye=Bs(uA(h.styles.backgroundPosition,u),d.width-se,d.height-we),Ve=Qu(uA(h.styles.backgroundRepeat,u),ye,U,d,x),qe=Math.round(d.left+ye[0]),dt=Math.round(d.top+ye[1]);return[Ve,qe,dt,se,we]},OA=function(h){return Ir(h)&&h.value===Ss.AUTO},lA=function(h){return typeof h=="number"},uc=function(h,u,g){var d=u[0],x=u[1],U=u[2],se=h[0],we=h[1];if(!se)return[0,0];if(pi(se)&&we&&pi(we))return[ni(se,g.width),ni(we,g.height)];var ye=lA(U);if(Ir(se)&&(se.value===Ss.CONTAIN||se.value===Ss.COVER)){if(lA(U)){var Ve=g.width/g.height;return Ve<U!=(se.value===Ss.COVER)?[g.width,g.width/U]:[g.height*U,g.height]}return[g.width,g.height]}var qe=lA(d),dt=lA(x),Mt=qe||dt;if(OA(se)&&(!we||OA(we))){if(qe&&dt)return[d,x];if(!ye&&!Mt)return[g.width,g.height];if(Mt&&ye){var Qn=qe?d:x*U,pn=dt?x:d/U;return[Qn,pn]}var Dn=qe?d:g.width,kr=dt?x:g.height;return[Dn,kr]}if(ye){var qn=0,Wn=0;return pi(se)?qn=ni(se,g.width):pi(we)&&(Wn=ni(we,g.height)),OA(se)?qn=Wn*U:(!we||OA(we))&&(Wn=qn/U),[qn,Wn]}var Ai=null,Mr=null;if(pi(se)?Ai=ni(se,g.width):we&&pi(we)&&(Mr=ni(we,g.height)),Ai!==null&&(!we||OA(we))&&(Mr=qe&&dt?Ai/d*x:g.height),Mr!==null&&OA(se)&&(Ai=qe&&dt?Mr/x*d:g.width),Ai!==null&&Mr!==null)return[Ai,Mr];throw new Error("Unable to calculate background-size for element")},uA=function(h,u){var g=h[u];return typeof g=="undefined"?h[0]:g},Qu=function(h,u,g,d,x){var U=u[0],se=u[1],we=g[0],ye=g[1];switch(h){case 2:return[new kn(Math.round(d.left),Math.round(d.top+se)),new kn(Math.round(d.left+d.width),Math.round(d.top+se)),new kn(Math.round(d.left+d.width),Math.round(ye+d.top+se)),new kn(Math.round(d.left),Math.round(ye+d.top+se))];case 3:return[new kn(Math.round(d.left+U),Math.round(d.top)),new kn(Math.round(d.left+U+we),Math.round(d.top)),new kn(Math.round(d.left+U+we),Math.round(d.height+d.top)),new kn(Math.round(d.left+U),Math.round(d.height+d.top))];case 1:return[new kn(Math.round(d.left+U),Math.round(d.top+se)),new kn(Math.round(d.left+U+we),Math.round(d.top+se)),new kn(Math.round(d.left+U+we),Math.round(d.top+se+ye)),new kn(Math.round(d.left+U),Math.round(d.top+se+ye))];default:return[new kn(Math.round(x.left),Math.round(x.top)),new kn(Math.round(x.left+x.width),Math.round(x.top)),new kn(Math.round(x.left+x.width),Math.round(x.height+x.top)),new kn(Math.round(x.left),Math.round(x.height+x.top))]}},cc="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Wl="Hidden Text",fc=function(){function h(u){this._data={},this._document=u}return h.prototype.parseMetrics=function(u,g){var d=this._document.createElement("div"),x=this._document.createElement("img"),U=this._document.createElement("span"),se=this._document.body;d.style.visibility="hidden",d.style.fontFamily=u,d.style.fontSize=g,d.style.margin="0",d.style.padding="0",d.style.whiteSpace="nowrap",se.appendChild(d),x.src=cc,x.width=1,x.height=1,x.style.margin="0",x.style.padding="0",x.style.verticalAlign="baseline",U.style.fontFamily=u,U.style.fontSize=g,U.style.margin="0",U.style.padding="0",U.appendChild(this._document.createTextNode(Wl)),d.appendChild(U),d.appendChild(x);var we=x.offsetTop-U.offsetTop+2;d.removeChild(U),d.appendChild(this._document.createTextNode(Wl)),d.style.lineHeight="normal",x.style.verticalAlign="super";var ye=x.offsetTop-d.offsetTop+2;return se.removeChild(d),{baseline:we,middle:ye}},h.prototype.getMetrics=function(u,g){var d=u+" "+g;return typeof this._data[d]=="undefined"&&(this._data[d]=this.parseMetrics(u,g)),this._data[d]},h}(),Ou=function(){function h(u,g){this.context=u,this.options=g}return h}(),hc=1e4,dc=function(h){Y(u,h);function u(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 fc(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 u.prototype.applyEffects=function(g){for(var d=this;this._activeEffects.length;)this.popEffect();g.forEach(function(x){return d.applyEffect(x)})},u.prototype.applyEffect=function(g){this.ctx.save(),Nl(g)&&(this.ctx.globalAlpha=g.opacity),oc(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)),Su(g)&&(this.path(g.path),this.ctx.clip()),this._activeEffects.push(g)},u.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},u.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]}})})},u.prototype.renderNode=function(g){return Te(this,void 0,void 0,function(){return He(this,function(d){switch(d.label){case 0:if(Ni(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]}})})},u.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 se=Pr(g.text);se.reduce(function(we,ye){return U.ctx.fillText(ye,we,g.bounds.top+x),we+U.ctx.measureText(ye).width},g.bounds.left)}},u.prototype.createFontStyle=function(g){var d=g.fontVariant.filter(function(se){return se==="normal"||se==="small-caps"}).join(""),x=_c(g.fontFamily).join(", "),U=ei(g.fontSize)?""+g.fontSize.number+g.fontSize.unit:g.fontSize.number+"px";return[[g.fontStyle,d,g.fontWeight,U,x].join(" "),x,U]},u.prototype.renderTextNode=function(g,d){return Te(this,void 0,void 0,function(){var x,U,se,we,ye,Ve,qe,dt,Mt=this;return He(this,function(Qn){return x=this.createFontStyle(d),U=x[0],se=x[1],we=x[2],this.ctx.font=U,this.ctx.direction=d.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",ye=this.fontMetrics.getMetrics(se,we),Ve=ye.baseline,qe=ye.middle,dt=d.paintOrder,g.textBounds.forEach(function(pn){dt.forEach(function(Dn){switch(Dn){case 0:Mt.ctx.fillStyle=Pi(d.color),Mt.renderTextWithLetterSpacing(pn,d.letterSpacing,Ve);var kr=d.textShadow;kr.length&&pn.text.trim().length&&(kr.slice(0).reverse().forEach(function(qn){Mt.ctx.shadowColor=Pi(qn.color),Mt.ctx.shadowOffsetX=qn.offsetX.number*Mt.options.scale,Mt.ctx.shadowOffsetY=qn.offsetY.number*Mt.options.scale,Mt.ctx.shadowBlur=qn.blur.number,Mt.renderTextWithLetterSpacing(pn,d.letterSpacing,Ve)}),Mt.ctx.shadowColor="",Mt.ctx.shadowOffsetX=0,Mt.ctx.shadowOffsetY=0,Mt.ctx.shadowBlur=0),d.textDecorationLine.length&&(Mt.ctx.fillStyle=Pi(d.textDecorationColor||d.color),d.textDecorationLine.forEach(function(qn){switch(qn){case 1:Mt.ctx.fillRect(pn.bounds.left,Math.round(pn.bounds.top+Ve),pn.bounds.width,1);break;case 2:Mt.ctx.fillRect(pn.bounds.left,Math.round(pn.bounds.top),pn.bounds.width,1);break;case 3:Mt.ctx.fillRect(pn.bounds.left,Math.ceil(pn.bounds.top+qe),pn.bounds.width,1);break}}));break;case 1:d.webkitTextStrokeWidth&&pn.text.trim().length&&(Mt.ctx.strokeStyle=Pi(d.webkitTextStrokeColor),Mt.ctx.lineWidth=d.webkitTextStrokeWidth,Mt.ctx.lineJoin=window.chrome?"miter":"round",Mt.ctx.strokeText(pn.text,pn.bounds.left,pn.bounds.top+Ve)),Mt.ctx.strokeStyle="",Mt.ctx.lineWidth=0,Mt.ctx.lineJoin="miter";break}})}),[2]})})},u.prototype.renderReplacedElement=function(g,d,x){if(x&&g.intrinsicWidth>0&&g.intrinsicHeight>0){var U=QA(g),se=kA(d);this.path(se),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()}},u.prototype.renderNodeContent=function(g){return Te(this,void 0,void 0,function(){var d,x,U,se,we,ye,Wn,Wn,Ve,qe,dt,Mt,Mr,Qn,pn,Br,Dn,kr,qn,Wn,Ai,Mr,Br;return He(this,function(Nn){switch(Nn.label){case 0:this.applyEffects(g.getEffects(4)),d=g.container,x=g.curves,U=d.styles,se=0,we=d.textNodes,Nn.label=1;case 1:return se<we.length?(ye=we[se],[4,this.renderTextNode(ye,U)]):[3,4];case 2:Nn.sent(),Nn.label=3;case 3:return se++,[3,1];case 4:if(!(d instanceof Jl))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 Wn=Nn.sent(),this.renderReplacedElement(d,x,Wn),[3,8];case 7:return Nn.sent(),this.context.logger.error("Error loading image "+d.src),[3,8];case 8:if(d instanceof ql&&this.renderReplacedElement(d,x,d.canvas),!(d instanceof eu))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 Wn=Nn.sent(),this.renderReplacedElement(d,x,Wn),[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 iu&&d.tree?(Ve=new u(this.context,{scale:this.options.scale,backgroundColor:d.backgroundColor,x:0,y:0,width:d.width,height:d.height}),[4,Ve.render(d.tree)]):[3,14];case 13:qe=Nn.sent(),d.width&&d.height&&this.ctx.drawImage(qe,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 Zo&&(dt=Math.min(d.bounds.width,d.bounds.height),d.type===IA?d.checked&&(this.ctx.save(),this.path([new kn(d.bounds.left+dt*.39363,d.bounds.top+dt*.79),new kn(d.bounds.left+dt*.16,d.bounds.top+dt*.5549),new kn(d.bounds.left+dt*.27347,d.bounds.top+dt*.44071),new kn(d.bounds.left+dt*.39694,d.bounds.top+dt*.5649),new kn(d.bounds.left+dt*.72983,d.bounds.top+dt*.23),new kn(d.bounds.left+dt*.84,d.bounds.top+dt*.34085),new kn(d.bounds.left+dt*.39363,d.bounds.top+dt*.79)]),this.ctx.fillStyle=Pi(ru),this.ctx.fill(),this.ctx.restore()):d.type===rA&&d.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(d.bounds.left+dt/2,d.bounds.top+dt/2,dt/4,0,Math.PI*2,!0),this.ctx.fillStyle=Pi(ru),this.ctx.fill(),this.ctx.restore())),Pu(d)&&d.value.length){switch(Mt=this.createFontStyle(U),Mr=Mt[0],Qn=Mt[1],pn=this.fontMetrics.getMetrics(Mr,Qn).baseline,this.ctx.font=Mr,this.ctx.fillStyle=Pi(U.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=pc(d.styles.textAlign),Br=QA(d),Dn=0,d.styles.textAlign){case 1:Dn+=Br.width/2;break;case 2:Dn+=Br.width;break}kr=Br.add(Dn,0,0,-Br.height/2+1),this.ctx.save(),this.path([new kn(Br.left,Br.top),new kn(Br.left+Br.width,Br.top),new kn(Br.left+Br.width,Br.top+Br.height),new kn(Br.left,Br.top+Br.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Dr(d.value,kr),U.letterSpacing,pn),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ni(d.styles.display,2048))return[3,20];if(d.styles.listStyleImage===null)return[3,19];if(qn=d.styles.listStyleImage,qn.type!==0)return[3,18];Wn=void 0,Ai=qn.url,Nn.label=15;case 15:return Nn.trys.push([15,17,,18]),[4,this.context.cache.match(Ai)];case 16:return Wn=Nn.sent(),this.ctx.drawImage(Wn,d.bounds.left-(Wn.width+10),d.bounds.top),[3,18];case 17:return Nn.sent(),this.context.logger.error("Error loading list-style-image "+Ai),[3,18];case 18:return[3,20];case 19:g.listValue&&d.styles.listStyleType!==-1&&(Mr=this.createFontStyle(U)[0],this.ctx.font=Mr,this.ctx.fillStyle=Pi(U.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",Br=new ee(d.bounds.left,d.bounds.top+ni(d.styles.paddingTop,d.bounds.width),d.bounds.width,Bo(U.lineHeight,U.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Dr(g.listValue,Br),U.letterSpacing,Bo(U.lineHeight,U.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Nn.label=20;case 20:return[2]}})})},u.prototype.renderStackContent=function(g){return Te(this,void 0,void 0,function(){var d,x,qn,U,se,qn,we,ye,qn,Ve,qe,qn,dt,Mt,qn,Qn,pn,qn,Dn,kr,qn;return He(this,function(Wn){switch(Wn.label){case 0:if(Ni(g.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(g.element)];case 1:Wn.sent(),d=0,x=g.negativeZIndex,Wn.label=2;case 2:return d<x.length?(qn=x[d],[4,this.renderStack(qn)]):[3,5];case 3:Wn.sent(),Wn.label=4;case 4:return d++,[3,2];case 5:return[4,this.renderNodeContent(g.element)];case 6:Wn.sent(),U=0,se=g.nonInlineLevel,Wn.label=7;case 7:return U<se.length?(qn=se[U],[4,this.renderNode(qn)]):[3,10];case 8:Wn.sent(),Wn.label=9;case 9:return U++,[3,7];case 10:we=0,ye=g.nonPositionedFloats,Wn.label=11;case 11:return we<ye.length?(qn=ye[we],[4,this.renderStack(qn)]):[3,14];case 12:Wn.sent(),Wn.label=13;case 13:return we++,[3,11];case 14:Ve=0,qe=g.nonPositionedInlineLevel,Wn.label=15;case 15:return Ve<qe.length?(qn=qe[Ve],[4,this.renderStack(qn)]):[3,18];case 16:Wn.sent(),Wn.label=17;case 17:return Ve++,[3,15];case 18:dt=0,Mt=g.inlineLevel,Wn.label=19;case 19:return dt<Mt.length?(qn=Mt[dt],[4,this.renderNode(qn)]):[3,22];case 20:Wn.sent(),Wn.label=21;case 21:return dt++,[3,19];case 22:Qn=0,pn=g.zeroOrAutoZIndexOrTransformedOrOpacity,Wn.label=23;case 23:return Qn<pn.length?(qn=pn[Qn],[4,this.renderStack(qn)]):[3,26];case 24:Wn.sent(),Wn.label=25;case 25:return Qn++,[3,23];case 26:Dn=0,kr=g.positiveZIndex,Wn.label=27;case 27:return Dn<kr.length?(qn=kr[Dn],[4,this.renderStack(qn)]):[3,30];case 28:Wn.sent(),Wn.label=29;case 29:return Dn++,[3,27];case 30:return[2]}})})},u.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()},u.prototype.path=function(g){this.ctx.beginPath(),this.formatPath(g),this.ctx.closePath()},u.prototype.formatPath=function(g){var d=this;g.forEach(function(x,U){var se=Zs(x)?x.start:x;U===0?d.ctx.moveTo(se.x,se.y):d.ctx.lineTo(se.x,se.y),Zs(x)&&d.ctx.bezierCurveTo(x.startControl.x,x.startControl.y,x.endControl.x,x.endControl.y,x.end.x,x.end.y)})},u.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)},u.prototype.resizeImage=function(g,d,x){var U;if(g.width===d&&g.height===x)return g;var se=(U=this.canvas.ownerDocument)!==null&&U!==void 0?U:document,we=se.createElement("canvas");we.width=Math.max(1,d),we.height=Math.max(1,x);var ye=we.getContext("2d");return ye.drawImage(g,0,0,g.width,g.height,0,0,d,x),we},u.prototype.renderBackgroundImage=function(g){return Te(this,void 0,void 0,function(){var d,x,U,se,we,ye;return He(this,function(Ve){switch(Ve.label){case 0:d=g.styles.backgroundImage.length-1,x=function(qe){var dt,Mt,Qn,Zi,t,n,Xr,a,ii,pn,Zi,t,n,Xr,a,Dn,kr,qn,Wn,Ai,Mr,Br,Nn,ri,ii,vr,Zi,ds,Ks,Xr,a,e,t,n,r,i,s,A,f,c,p,_;return He(this,function(w){switch(w.label){case 0:if(qe.type!==0)return[3,5];dt=void 0,Mt=qe.url,w.label=1;case 1:return w.trys.push([1,3,,4]),[4,U.context.cache.match(Mt)];case 2:return dt=w.sent(),[3,4];case 3:return w.sent(),U.context.logger.error("Error loading background-image "+Mt),[3,4];case 4:return dt&&(Qn=Vl(g,d,[dt.width,dt.height,dt.width/dt.height]),Zi=Qn[0],t=Qn[1],n=Qn[2],Xr=Qn[3],a=Qn[4],ii=U.ctx.createPattern(U.resizeImage(dt,Xr,a),"repeat"),U.renderRepeat(Zi,ii,t,n)),[3,6];case 5:$s(qe)?(pn=Vl(g,d,[null,null,null]),Zi=pn[0],t=pn[1],n=pn[2],Xr=pn[3],a=pn[4],Dn=_a(qe.angle,Xr,a),kr=Dn[0],qn=Dn[1],Wn=Dn[2],Ai=Dn[3],Mr=Dn[4],Br=document.createElement("canvas"),Br.width=Xr,Br.height=a,Nn=Br.getContext("2d"),ri=Nn.createLinearGradient(qn,Ai,Wn,Mr),Ta(qe.stops,kr).forEach(function(I){return ri.addColorStop(I.stop,Pi(I.color))}),Nn.fillStyle=ri,Nn.fillRect(0,0,Xr,a),Xr>0&&a>0&&(ii=U.ctx.createPattern(Br,"repeat"),U.renderRepeat(Zi,ii,t,n))):va(qe)&&(vr=Vl(g,d,[null,null,null]),Zi=vr[0],ds=vr[1],Ks=vr[2],Xr=vr[3],a=vr[4],e=qe.position.length===0?[Ca]:qe.position,t=ni(e[0],Xr),n=ni(e[e.length-1],a),r=Ka(qe,t,n,Xr,a),i=r[0],s=r[1],i>0&&s>0&&(A=U.ctx.createRadialGradient(ds+t,Ks+n,0,ds+t,Ks+n,i),Ta(qe.stops,i*2).forEach(function(I){return A.addColorStop(I.stop,Pi(I.color))}),U.path(Zi),U.ctx.fillStyle=A,i!==s?(f=g.bounds.left+.5*g.bounds.width,c=g.bounds.top+.5*g.bounds.height,p=s/i,_=1/p,U.ctx.save(),U.ctx.translate(f,c),U.ctx.transform(1,0,0,p,0,0),U.ctx.translate(-f,-c),U.ctx.fillRect(ds,_*(Ks-c)+c,Xr,a*_),U.ctx.restore()):U.ctx.fill())),w.label=6;case 6:return d--,[2]}})},U=this,se=0,we=g.styles.backgroundImage.slice(0).reverse(),Ve.label=1;case 1:return se<we.length?(ye=we[se],[5,x(ye)]):[3,4];case 2:Ve.sent(),Ve.label=3;case 3:return se++,[3,1];case 4:return[2]}})})},u.prototype.renderSolidBorder=function(g,d,x){return Te(this,void 0,void 0,function(){return He(this,function(U){return this.path(Lu(x,d)),this.ctx.fillStyle=Pi(g),this.ctx.fill(),[2]})})},u.prototype.renderDoubleBorder=function(g,d,x,U){return Te(this,void 0,void 0,function(){var se,we;return He(this,function(ye){switch(ye.label){case 0:return d<3?[4,this.renderSolidBorder(g,x,U)]:[3,2];case 1:return ye.sent(),[2];case 2:return se=Uu(U,x),this.path(se),this.ctx.fillStyle=Pi(g),this.ctx.fill(),we=lc(U,x),this.path(we),this.ctx.fill(),[2]}})})},u.prototype.renderNodeBackgroundAndBorders=function(g){return Te(this,void 0,void 0,function(){var d,x,U,se,we,ye,Ve,qe,dt=this;return He(this,function(Mt){switch(Mt.label){case 0:return this.applyEffects(g.getEffects(2)),d=g.container.styles,x=!ts(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}],se=gc(uA(d.backgroundClip,0),g.curves),x||d.boxShadow.length?(this.ctx.save(),this.path(se),this.ctx.clip(),ts(d.backgroundColor)||(this.ctx.fillStyle=Pi(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(Qn){dt.ctx.save();var pn=tl(g.curves),Dn=Qn.inset?0:hc,kr=Hl(pn,-Dn+(Qn.inset?1:-1)*Qn.spread.number,(Qn.inset?1:-1)*Qn.spread.number,Qn.spread.number*(Qn.inset?-2:2),Qn.spread.number*(Qn.inset?-2:2));Qn.inset?(dt.path(pn),dt.ctx.clip(),dt.mask(kr)):(dt.mask(pn),dt.ctx.clip(),dt.path(kr)),dt.ctx.shadowOffsetX=Qn.offsetX.number+Dn,dt.ctx.shadowOffsetY=Qn.offsetY.number,dt.ctx.shadowColor=Pi(Qn.color),dt.ctx.shadowBlur=Qn.blur.number,dt.ctx.fillStyle=Qn.inset?Pi(Qn.color):"rgba(0,0,0,1)",dt.ctx.fill(),dt.ctx.restore()}),Mt.label=2;case 2:we=0,ye=0,Ve=U,Mt.label=3;case 3:return ye<Ve.length?(qe=Ve[ye],qe.style!==0&&!ts(qe.color)&&qe.width>0?qe.style!==2?[3,5]:[4,this.renderDashedDottedBorder(qe.color,qe.width,we,g.curves,2)]:[3,11]):[3,13];case 4:return Mt.sent(),[3,11];case 5:return qe.style!==3?[3,7]:[4,this.renderDashedDottedBorder(qe.color,qe.width,we,g.curves,3)];case 6:return Mt.sent(),[3,11];case 7:return qe.style!==4?[3,9]:[4,this.renderDoubleBorder(qe.color,qe.width,we,g.curves)];case 8:return Mt.sent(),[3,11];case 9:return[4,this.renderSolidBorder(qe.color,we,g.curves)];case 10:Mt.sent(),Mt.label=11;case 11:we++,Mt.label=12;case 12:return ye++,[3,3];case 13:return[2]}})})},u.prototype.renderDashedDottedBorder=function(g,d,x,U,se){return Te(this,void 0,void 0,function(){var we,ye,Ve,qe,dt,Mt,Qn,pn,Dn,kr,qn,Wn,Ai,Mr,Br,Nn,Br,Nn;return He(this,function(ri){return this.ctx.save(),we=$l(U,x),ye=Lu(U,x),se===2&&(this.path(ye),this.ctx.clip()),Zs(ye[0])?(Ve=ye[0].start.x,qe=ye[0].start.y):(Ve=ye[0].x,qe=ye[0].y),Zs(ye[1])?(dt=ye[1].end.x,Mt=ye[1].end.y):(dt=ye[1].x,Mt=ye[1].y),x===0||x===2?Qn=Math.abs(Ve-dt):Qn=Math.abs(qe-Mt),this.ctx.beginPath(),se===3?this.formatPath(we):this.formatPath(ye.slice(0,2)),pn=d<3?d*3:d*2,Dn=d<3?d*2:d,se===3&&(pn=d,Dn=d),kr=!0,Qn<=pn*2?kr=!1:Qn<=pn*2+Dn?(qn=Qn/(2*pn+Dn),pn*=qn,Dn*=qn):(Wn=Math.floor((Qn+Dn)/(pn+Dn)),Ai=(Qn-Wn*pn)/(Wn-1),Mr=(Qn-(Wn+1)*pn)/Wn,Dn=Mr<=0||Math.abs(Dn-Ai)<Math.abs(Dn-Mr)?Ai:Mr),kr&&(se===3?this.ctx.setLineDash([0,pn+Dn]):this.ctx.setLineDash([pn,Dn])),se===3?(this.ctx.lineCap="round",this.ctx.lineWidth=d):this.ctx.lineWidth=d*2+1.1,this.ctx.strokeStyle=Pi(g),this.ctx.stroke(),this.ctx.setLineDash([]),se===2&&(Zs(ye[0])&&(Br=ye[3],Nn=ye[0],this.ctx.beginPath(),this.formatPath([new kn(Br.end.x,Br.end.y),new kn(Nn.start.x,Nn.start.y)]),this.ctx.stroke()),Zs(ye[1])&&(Br=ye[1],Nn=ye[2],this.ctx.beginPath(),this.formatPath([new kn(Br.end.x,Br.end.y),new kn(Nn.start.x,Nn.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},u.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=Pi(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),d=Du(g),[4,this.renderStack(d)];case 1:return x.sent(),this.applyEffects([]),[2,this.canvas]}})})},u}(Ou),Pu=function(h){return h instanceof Yo||h instanceof Dl?!0:h instanceof Zo&&h.type!==rA&&h.type!==IA},gc=function(h,u){switch(h){case 0:return tl(u);case 2:return Cu(u);case 1:default:return kA(u)}},pc=function(h){switch(h){case 1:return"center";case 2:return"right";case 0:default:return"left"}},mc=["-apple-system","system-ui"],_c=function(h){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?h.filter(function(u){return mc.indexOf(u)===-1}):h},vc=function(h){Y(u,h);function u(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 u.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,yc(d)];case 1:return x=U.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Pi(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]}})})},u}(Ou),yc=function(h){return new Promise(function(u,g){var d=new Image;d.onload=function(){u(d)},d.onerror=g,d.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(h))})},Mu=function(){function h(u){var g=u.id,d=u.enabled;this.id=g,this.enabled=d,this.start=Date.now()}return h.prototype.debug=function(){for(var u=[],g=0;g<arguments.length;g++)u[g]=arguments[g];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,be([this.id,this.getTime()+"ms"],u)):this.info.apply(this,u))},h.prototype.getTime=function(){return Date.now()-this.start},h.prototype.info=function(){for(var u=[],g=0;g<arguments.length;g++)u[g]=arguments[g];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,be([this.id,this.getTime()+"ms"],u))},h.prototype.warn=function(){for(var u=[],g=0;g<arguments.length;g++)u[g]=arguments[g];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,be([this.id,this.getTime()+"ms"],u)):this.info.apply(this,u))},h.prototype.error=function(){for(var u=[],g=0;g<arguments.length;g++)u[g]=arguments[g];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,be([this.id,this.getTime()+"ms"],u)):this.info.apply(this,u))},h.instances={},h}(),wc=function(){function h(u,g){var d;this.windowBounds=g,this.instanceName="#"+h.instanceCount++,this.logger=new Mu({id:this.instanceName,enabled:u.logging}),this.cache=(d=u.cache)!==null&&d!==void 0?d:new ic(this,u)}return h.instanceCount=1,h}(),Ec=function(h,u){return u===void 0&&(u={}),Bc(h,u)};typeof window!="undefined"&&Eu.setContext(window);var Bc=function(h,u){return Te(void 0,void 0,void 0,function(){var g,d,x,U,se,we,ye,Ve,qe,dt,Mt,Qn,pn,Dn,kr,qn,Wn,Ai,Mr,Br,ri,Nn,ri,ii,vr,Zi,ds,Ks,Xr,a,e,t,n,r,i,s,A,f,c,p;return He(this,function(_){switch(_.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:(ii=u.allowTaint)!==null&&ii!==void 0?ii:!1,imageTimeout:(vr=u.imageTimeout)!==null&&vr!==void 0?vr:15e3,proxy:u.proxy,useCORS:(Zi=u.useCORS)!==null&&Zi!==void 0?Zi:!1},U=te({logging:(ds=u.logging)!==null&&ds!==void 0?ds:!0,cache:u.cache},x),se={windowWidth:(Ks=u.windowWidth)!==null&&Ks!==void 0?Ks:d.innerWidth,windowHeight:(Xr=u.windowHeight)!==null&&Xr!==void 0?Xr:d.innerHeight,scrollX:(a=u.scrollX)!==null&&a!==void 0?a:d.pageXOffset,scrollY:(e=u.scrollY)!==null&&e!==void 0?e:d.pageYOffset},we=new ee(se.scrollX,se.scrollY,se.windowWidth,se.windowHeight),ye=new wc(U,we),Ve=(t=u.foreignObjectRendering)!==null&&t!==void 0?t:!1,qe={allowTaint:(n=u.allowTaint)!==null&&n!==void 0?n:!1,onclone:u.onclone,ignoreElements:u.ignoreElements,inlineImages:Ve,copyStyles:Ve},ye.logger.debug("Starting document clone with size "+we.width+"x"+we.height+" scrolled to "+-we.left+","+-we.top),dt=new AA(ye,h,qe),Mt=dt.clonedReferenceElement,Mt?[4,dt.toIFrame(g,we)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Qn=_.sent(),pn=Rl(Mt)||Zu(Mt)?Ce(Mt.ownerDocument):y(ye,Mt),Dn=pn.width,kr=pn.height,qn=pn.left,Wn=pn.top,Ai=bc(ye,Mt,u.backgroundColor),Mr={canvas:u.canvas,backgroundColor:Ai,scale:(i=(r=u.scale)!==null&&r!==void 0?r:d.devicePixelRatio)!==null&&i!==void 0?i:1,x:((s=u.x)!==null&&s!==void 0?s:0)+qn,y:((A=u.y)!==null&&A!==void 0?A:0)+Wn,width:(f=u.width)!==null&&f!==void 0?f:Math.ceil(Dn),height:(c=u.height)!==null&&c!==void 0?c:Math.ceil(kr)},Ve?(ye.logger.debug("Document cloned, using foreign object rendering"),ri=new vc(ye,Mr),[4,ri.render(Mt)]):[3,3];case 2:return Br=_.sent(),[3,5];case 3:return ye.logger.debug("Document cloned, element located at "+qn+","+Wn+" with size "+Dn+"x"+kr+" using computed rendering"),ye.logger.debug("Starting DOM parsing"),Nn=Ll(ye,Mt),Ai===Nn.styles.backgroundColor&&(Nn.styles.backgroundColor=Os.TRANSPARENT),ye.logger.debug("Starting renderer for element at "+Mr.x+","+Mr.y+" with size "+Mr.width+"x"+Mr.height),ri=new dc(ye,Mr),[4,ri.render(Nn)];case 4:Br=_.sent(),_.label=5;case 5:return(!((p=u.removeContainer)!==null&&p!==void 0)||p)&&(AA.destroy(Qn)||ye.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),ye.logger.debug("Finished rendering"),[2,Br]}})})},bc=function(h,u,g){var d=u.ownerDocument,x=d.documentElement?ma(h,getComputedStyle(d.documentElement).backgroundColor):Os.TRANSPARENT,U=d.body?ma(h,getComputedStyle(d.body).backgroundColor):Os.TRANSPARENT,se=typeof g=="string"?ma(h,g):g===null?Os.TRANSPARENT:4294967295;return u===d.documentElement?ts(x)?ts(U)?se:U:x:se};return Ec})},67467:function(Un,Ft){Ft.read=function(Y,te,Te,He,be){var ee,y,Ce=be*8-He-1,V=(1<<Ce)-1,o=V>>1,le=-7,O=Te?be-1:0,B=Te?-1:1,E=Y[te+O];for(O+=B,ee=E&(1<<-le)-1,E>>=-le,le+=Ce;le>0;ee=ee*256+Y[te+O],O+=B,le-=8);for(y=ee&(1<<-le)-1,ee>>=-le,le+=He;le>0;y=y*256+Y[te+O],O+=B,le-=8);if(ee===0)ee=1-o;else{if(ee===V)return y?NaN:(E?-1:1)*(1/0);y=y+Math.pow(2,He),ee=ee-o}return(E?-1:1)*y*Math.pow(2,ee-He)},Ft.write=function(Y,te,Te,He,be,ee){var y,Ce,V,o=ee*8-be-1,le=(1<<o)-1,O=le>>1,B=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=He?0:ee-1,F=He?1:-1,L=te<0||te===0&&1/te<0?1:0;for(te=Math.abs(te),isNaN(te)||te===1/0?(Ce=isNaN(te)?1:0,y=le):(y=Math.floor(Math.log(te)/Math.LN2),te*(V=Math.pow(2,-y))<1&&(y--,V*=2),y+O>=1?te+=B/V:te+=B*Math.pow(2,1-O),te*V>=2&&(y++,V/=2),y+O>=le?(Ce=0,y=le):y+O>=1?(Ce=(te*V-1)*Math.pow(2,be),y=y+O):(Ce=te*Math.pow(2,O-1)*Math.pow(2,be),y=0));be>=8;Y[Te+E]=Ce&255,E+=F,Ce/=256,be-=8);for(y=y<<be|Ce,o+=be;o>0;Y[Te+E]=y&255,E+=F,y/=256,o-=8);Y[Te+E-F]|=L*128}},53184:function(Un,Ft,Y){"use strict";var te,Te;function He(be,ee,y){var Ce=function(V,o){return be.js_beautify(V,o)};return Ce.js=be.js_beautify,Ce.css=ee.css_beautify,Ce.html=y.html_beautify,Ce.js_beautify=be.js_beautify,Ce.css_beautify=ee.css_beautify,Ce.html_beautify=y.html_beautify,Ce}te=[Y(58553),Y(87804),Y(40998)],Te=function(be,ee,y){return He(be,ee,y)}.apply(Ft,te),Te!==void 0&&(Un.exports=Te)},87804:function(Un,Ft){var Y,te;(function(){var Te;(function(){"use strict";var be=[,,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/,K=/(?:\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()),pe=0;J.test(this._input.peek());)this._ch=this._input.next(),De&&this._ch===`
|
|
`&&(pe===0||pe<this._options.max_preserve_newlines)&&(pe++,this._output.add_new_line(!0));return ke},Be.prototype.foundNestedPseudoClass=function(){for(var De=0,ke=1,pe=this._input.peek(ke);pe;){if(pe==="{")return!0;if(pe==="(")De+=1;else if(pe===")"){if(De===0)return!1;De-=1}else if(pe===";"||pe==="}")return!1;ke++,pe=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 pe=De.match(/^[\t ]*/)[0];this._output=new B(this._options,pe),this._input=new E(De),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Ue=0,Xe=!1,Ee=!1,et=!1,ne=!1,Q=!1,q=this._ch,ie=!1,ge,he,b;ge=this._input.read(K),he=ge!=="",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(he),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&&(Ee=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(he),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Je=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Je.match(/[ :]$/)&&(Je=this.eatString(": ").replace(/\s+$/,""),this.print_string(Je),this._output.space_before_token=!0),Ue===0&&Je.indexOf(":")!==-1?(Ee=!0,this.indent()):Je in this.NESTED_AT_RULE?(this._nestedLevel+=1,Je in this.CONDITIONAL_GROUP_RULE&&(et=!0)):Ue===0&&!Ee&&(ne=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(he),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Ee&&(Ee=!1,this.outdent()),ne=!1,et?(et=!1,Xe=this._indentLevel>=this._nestedLevel):Xe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Xe&&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),Ee&&(this.outdent(),Ee=!1),this.print_string(this._ch),Xe=!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])){ie=!0;break}(Xe||et)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!ne&&Ue===0?(this.print_string(":"),Ee||(Ee=!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||he),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")ie=!1,Ue===0?(Ee&&(this.outdent(),Ee=!1),ne=!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(he||Qt),this.print_string(this._ch),Ee&&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&&(!Ee||Q)&&Ue===0&&!ne?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Ee&&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(he),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 on=b==='"'||b==="'";this.preserveSingleSpace(on||he),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&ie&&this._output.add_new_line()}var Zt=this._output.get_code(ke);return Zt},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}],ee={};function y(V){var o=ee[V];if(o!==void 0)return o.exports;var le=ee[V]={exports:{}};return be[V](le,le.exports,y),le.exports}var Ce=y(15);Te=Ce})();var He=Te;Y=[],te=function(){return{css_beautify:He}}.apply(Ft,Y),te!==void 0&&(Un.exports=te)})()},40998:function(Un,Ft,Y){var te,Te;(function(){var He;(function(){"use strict";var Ce=[,,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"},K=function(z,oe){this._input=new F(z),this._options=oe||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new Z(this._input)};K.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},K.prototype._is_first_token=function(){return this.__tokens.isEmpty()},K.prototype._reset=function(){},K.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,"")},K.prototype._is_comment=function(z){return!1},K.prototype._is_opening=function(z){return!1},K.prototype._is_closing=function(z,oe){return!1},K.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},K.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},O.exports.Tokenizer=K,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,K=[],z=ae.exec(Z);z;)K.push(Z.substring(J,z.index)),J=z.index+z[0].length,z=ae.exec(Z);return J<Z.length?K.push(Z.substring(J,Z.length)):K.push(""),K},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 K=new F(Z);this.__patterns={handlebars_comment:K.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:K.starting_with(/{{{/).until_after(/}}}/),handlebars:K.starting_with(/{{/).until_after(/}}/),php:K.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:K.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:K.starting_with(/{%/).until_after(/%}/),django_value:K.starting_with(/{{/).until_after(/}}/),django_comment:K.starting_with(/{#/).until_after(/#}/),smarty:K.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:K.starting_with(/{\*/).until_after(/\*}/),smarty_literal:K.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 K in L)J._disabled[K]=Z.templating.indexOf(K)===-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 K=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&K==="?"&&(Z=Z||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&K==="%"&&(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,K,z){var oe=new F(Z,J,K,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]/,K=/\r\n|[\r\n]/g,z=function(ne,Q){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=ne.max_preserve_newlines,this.preserve_newlines=ne.preserve_newlines,this._output=new L(ne,Q)};z.prototype.current_line_has_match=function(ne){return this._output.current_line.has_match(ne)},z.prototype.set_space_before_token=function(ne,Q){this._output.space_before_token=ne,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(ne){this._output.add_raw_token(ne)},z.prototype.print_preserved_newlines=function(ne){var Q=0;ne.type!==Z.TEXT&&ne.previous.type!==Z.TEXT&&(Q=ne.newlines?1:0),this.preserve_newlines&&(Q=ne.newlines<this.max_preserve_newlines+1?ne.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(ne){return ne.whitespace_before||ne.newlines?(this.print_preserved_newlines(ne)||(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(ne){this._output.add_new_line(ne)},z.prototype.print_token=function(ne){ne.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(ne.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(ne){return ne=this.indent_level+(ne||0),ne<1?"":this._output.get_indent_string(ne)};var oe=function(ne){for(var Q=null,q=ne.next;q.type!==Z.EOF&&ne.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(ne,Q){var q=null,ie=null;return Q.closed?(ne==="script"?q="text/javascript":ne==="style"&&(q="text/css"),q=oe(Q)||q,q.search("text/css")>-1?ie="css":q.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?ie="javascript":q.search(/(text|application|dojo)\/(x-)?(html)/)>-1?ie="html":q.search(/test\/null/)>-1&&(ie="null"),ie):null};function De(ne,Q){return Q.indexOf(ne)!==-1}function ke(ne,Q,q){this.parent=ne||null,this.tag=Q?Q.tag_name:"",this.indent_level=q||0,this.parser_token=Q||null}function pe(ne){this._printer=ne,this._current_frame=null}pe.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},pe.prototype.record_tag=function(ne){var Q=new ke(this._current_frame,ne,this._printer.indent_level);this._current_frame=Q},pe.prototype._try_pop_frame=function(ne){var Q=null;return ne&&(Q=ne.parser_token,this._printer.indent_level=ne.indent_level,this._current_frame=ne.parent),Q},pe.prototype._get_frame=function(ne,Q){for(var q=this._current_frame;q&&ne.indexOf(q.tag)===-1;){if(Q&&Q.indexOf(q.tag)!==-1){q=null;break}q=q.parent}return q},pe.prototype.try_pop=function(ne,Q){var q=this._get_frame([ne],Q);return this._try_pop_frame(q)},pe.prototype.indent_to_tag=function(ne){var Q=this._get_frame(ne);Q&&(this._printer.indent_level=Q.indent_level)};function Ue(ne,Q,q,ie){this._source_text=ne||"",Q=Q||{},this._js_beautify=q,this._css_beautify=ie,this._tag_stack=null;var ge=new F(Q,"html");this._options=ge,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 ne=this._source_text,Q=this._options.eol;this._options.eol==="auto"&&(Q=`
|
|
`,ne&&J.test(ne)&&(Q=ne.match(J)[0])),ne=ne.replace(K,`
|
|
`);var q=ne.match(/^[\t ]*/)[0],ie={text:"",type:""},ge=new Xe(this._options),he=new z(this._options,q),b=new ae(ne,this._options).tokenize();this._tag_stack=new pe(he);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(he,W,ge,ie,b),ge=S):W.type===Z.ATTRIBUTE||W.type===Z.EQUALS||W.type===Z.VALUE||W.type===Z.TEXT&&!ge.tag_complete?S=this._handle_inside_tag(he,W,ge,ie):W.type===Z.TAG_CLOSE?S=this._handle_tag_close(he,W,ge):W.type===Z.TEXT?S=this._handle_text(he,W,ge):W.type===Z.CONTROL_FLOW_OPEN?S=this._handle_control_flow_open(he,W):W.type===Z.CONTROL_FLOW_CLOSE?S=this._handle_control_flow_close(he,W):he.add_raw_token(W),ie=S,W=b.next();var _e=he._output.get_code(Q);return _e},Ue.prototype._handle_control_flow_open=function(ne,Q){var q={text:Q.text,type:Q.type};return ne.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),Q.newlines?ne.print_preserved_newlines(Q):ne.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),ne.print_token(Q),ne.indent(),q},Ue.prototype._handle_control_flow_close=function(ne,Q){var q={text:Q.text,type:Q.type};return ne.deindent(),Q.newlines?ne.print_preserved_newlines(Q):ne.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),ne.print_token(Q),q},Ue.prototype._handle_tag_close=function(ne,Q,q){var ie={text:Q.text,type:Q.type};return ne.alignment_size=0,q.tag_complete=!0,ne.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),q.is_unformatted?ne.add_raw_token(Q):(q.tag_start_char==="<"&&(ne.set_space_before_token(Q.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&q.has_wrapped_attrs&&ne.print_newline(!1)),ne.print_token(Q)),q.indent_content&&!(q.is_unformatted||q.is_content_unformatted)&&(ne.indent(),q.indent_content=!1),!q.is_inline_element&&!(q.is_unformatted||q.is_content_unformatted)&&ne.set_wrap_point(),ie},Ue.prototype._handle_inside_tag=function(ne,Q,q,ie){var ge=q.has_wrapped_attrs,he={text:Q.text,type:Q.type};return ne.set_space_before_token(Q.newlines||Q.whitespace_before!=="",!0),q.is_unformatted?ne.add_raw_token(Q):q.tag_start_char==="{"&&Q.type===Z.TEXT?ne.print_preserved_newlines(Q)?(Q.newlines=0,ne.add_raw_token(Q)):ne.print_token(Q):(Q.type===Z.ATTRIBUTE?ne.set_space_before_token(!0):(Q.type===Z.EQUALS||Q.type===Z.VALUE&&Q.previous.type===Z.EQUALS)&&ne.set_space_before_token(!1),Q.type===Z.ATTRIBUTE&&q.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(ne.traverse_whitespace(Q),ge=ge||Q.newlines!==0),this._is_wrap_attributes_force&&q.attr_count>=this._options.wrap_attributes_min_attrs&&(ie.type!==Z.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(ne.print_newline(!1),ge=!0)),ne.print_token(Q),ge=ge||ne.previous_token_wrapped(),q.has_wrapped_attrs=ge),he},Ue.prototype._handle_text=function(ne,Q,q){var ie={text:Q.text,type:"TK_CONTENT"};return q.custom_beautifier_name?this._print_custom_beatifier_text(ne,Q,q):q.is_unformatted||q.is_content_unformatted?ne.add_raw_token(Q):(ne.traverse_whitespace(Q),ne.print_token(Q)),ie},Ue.prototype._print_custom_beatifier_text=function(ne,Q,q){var ie=this;if(Q.text!==""){var ge=Q.text,he,b=1,S="",W="";q.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?he=this._js_beautify:q.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?he=this._css_beautify:q.custom_beautifier_name==="html"&&(he=function(on,Zt){var Rt=new Ue(on,Zt,ie._js_beautify,ie._css_beautify);return Rt.beautify()}),this._options.indent_scripts==="keep"?b=0:this._options.indent_scripts==="separate"&&(b=-ne.indent_level);var _e=ne.get_full_indent(b);if(ge=ge.replace(/\n[ \t]*$/,""),q.custom_beautifier_name!=="html"&&ge[0]==="<"&&ge.match(/^(<!--|<!\[CDATA\[)/)){var Je=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ge);if(!Je){ne.add_raw_token(Q);return}S=_e+Je[1]+`
|
|
`,ge=Je[4],Je[5]&&(W=_e+Je[5]),ge=ge.replace(/\n[ \t]*$/,""),(Je[2]||Je[3].indexOf(`
|
|
`)!==-1)&&(Je=Je[3].match(/[ \t]+$/),Je&&(Q.whitespace_before=Je[0]))}if(ge)if(he){var mt=function(){this.eol=`
|
|
`};mt.prototype=this._options.raw_options;var Gt=new mt;ge=he(_e+ge,Gt)}else{var Qt=Q.whitespace_before;Qt&&(ge=ge.replace(new RegExp(`
|
|
(`+Qt+")?","g"),`
|
|
`)),ge=_e+ge.replace(/\n/g,`
|
|
`+_e)}S&&(ge?ge=S+ge+`
|
|
`+W:ge=S+W),ne.print_newline(!1),ge&&(Q.text=ge,Q.whitespace_before="",Q.newlines=0,ne.add_raw_token(Q),ne.print_newline(!0))}},Ue.prototype._handle_tag_open=function(ne,Q,q,ie,ge){var he=this._get_tag_open_token(Q);if((q.is_unformatted||q.is_content_unformatted)&&!q.is_empty_element&&Q.type===Z.TAG_OPEN&&!he.is_start_tag?(ne.add_raw_token(Q),he.start_tag_token=this._tag_stack.try_pop(he.tag_name)):(ne.traverse_whitespace(Q),this._set_tag_position(ne,Q,he,q,ie),he.is_inline_element||ne.set_wrap_point(),ne.print_token(Q)),he.is_start_tag&&this._is_wrap_attributes_force){var b=0,S;do S=ge.peek(b),S.type===Z.ATTRIBUTE&&(he.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)&&(he.alignment_size=Q.text.length+1),!he.tag_complete&&!he.is_unformatted&&(ne.alignment_size=he.alignment_size),he};var Xe=function(ne,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 ie;this.tag_start_char=q.text[0],this.text=q.text,this.tag_start_char==="<"?(ie=q.text.match(/^<([^\s>]*)/),this.tag_check=ie?ie[1]:""):(ie=q.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=ie?ie[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 ge=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(ge=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!ne.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ge)))}};Ue.prototype._get_tag_open_token=function(ne){var Q=new Xe(this._options,this._tag_stack.get_parser_token(),ne);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(ne,Q,q,ie,ge){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||ne.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)&&(ne.print_newline(!1),ne._output.just_added_blankline()||ne.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 he=ne.current_line_has_match(/{{#if/);he||ne.print_newline(!1)}q.tag_name==="!--"&&ge.type===Z.TAG_CLOSE&&ie.is_end_tag&&q.text.indexOf(`
|
|
`)===-1||(q.is_inline_element||q.is_unformatted||ne.print_newline(!1),this._calcluate_parent_multiline(ne,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&&!(ie.is_inline_element||ie.is_unformatted)&&!(ge.type===Z.TAG_CLOSE&&q.start_tag_token===ie)&&ge.type!=="TK_CONTENT",(q.is_content_unformatted||q.is_unformatted)&&(b=!1),b&&ne.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)&&(ge.type!=="TK_CONTENT"||q.is_content_unformatted)&&ne.print_newline(!1),this._calcluate_parent_multiline(ne,q)},Ue.prototype._calcluate_parent_multiline=function(ne,Q){Q.parent&&ne._output.just_added_newline()&&!((Q.is_inline_element||Q.is_unformatted)&&Q.parent.is_inline_element)&&(Q.parent.multiline_content=!0)};var Ee=["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"],et=["a","audio","del","ins","map","noscript","video"];Ue.prototype._do_optional_end_element=function(ne){var Q=null;if(!(ne.is_empty_element||!ne.is_start_tag||!ne.parent)){if(ne.tag_name==="body")Q=Q||this._tag_stack.try_pop("head");else if(ne.tag_name==="li")Q=Q||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(ne.tag_name==="dd"||ne.tag_name==="dt")Q=Q||this._tag_stack.try_pop("dt",["dl"]),Q=Q||this._tag_stack.try_pop("dd",["dl"]);else if(ne.parent.tag_name==="p"&&Ee.indexOf(ne.tag_name)!==-1){var q=ne.parent.parent;(!q||et.indexOf(q.tag_name)===-1)&&(Q=Q||this._tag_stack.try_pop("p"))}else ne.tag_name==="rp"||ne.tag_name==="rt"?(Q=Q||this._tag_stack.try_pop("rt",["ruby","rtc"]),Q=Q||this._tag_stack.try_pop("rp",["ruby","rtc"])):ne.tag_name==="optgroup"?Q=Q||this._tag_stack.try_pop("optgroup",["select"]):ne.tag_name==="option"?Q=Q||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):ne.tag_name==="colgroup"?Q=Q||this._tag_stack.try_pop("caption",["table"]):ne.tag_name==="thead"?(Q=Q||this._tag_stack.try_pop("caption",["table"]),Q=Q||this._tag_stack.try_pop("colgroup",["table"])):ne.tag_name==="tbody"||ne.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"])):ne.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"])):(ne.tag_name==="th"||ne.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 ne.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,K={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),pe=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:pe.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:pe.starting_with(/{{!--/).until_after(/--}}/),handlebars:pe.starting_with(/{{/).until_after(/}}/),handlebars_open:pe.until(/[\n\r\t }]/),handlebars_raw_close:pe.until(/}}/),comment:pe.starting_with(/<!--/).until_after(/-->/),cdata:pe.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:pe.starting_with(/<!\[/).until_after(/]>/),processing:pe.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=pe.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===K.TAG_OPEN||Be.type===K.CONTROL_FLOW_OPEN},oe.prototype._is_closing=function(Be,De){return Be.type===K.TAG_CLOSE&&De&&((Be.text===">"||Be.text==="/>")&&De.text[0]==="<"||Be.text==="}}"&&De.text[0]==="{"&&De.text[1]==="{")||Be.type===K.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 pe=this._input.peek();return pe===null?this._create_token(K.EOF,""):(ke=ke||this._read_open_handlebars(pe,De),ke=ke||this._read_attribute(pe,Be,De),ke=ke||this._read_close(pe,De),ke=ke||this._read_script_and_style(pe,Be),ke=ke||this._read_control_flows(pe,De),ke=ke||this._read_raw_content(pe,Be,De),ke=ke||this._read_content_word(pe,De),ke=ke||this._read_comment_or_cdata(pe),ke=ke||this._read_processing(pe),ke=ke||this._read_open(pe,De),ke=ke||this._create_token(K.UNKNOWN,this._input.next()),ke)},oe.prototype._read_comment_or_cdata=function(Be){var De=null,ke=null,pe=null;if(Be==="<"){var Ue=this._input.peek(1);Ue==="!"&&(ke=this.__patterns.comment.read(),ke?(pe=z.get_directives(ke),pe&&pe.ignore==="start"&&(ke+=z.readIgnored(this._input))):ke=this.__patterns.cdata.read()),ke&&(De=this._create_token(K.COMMENT,ke),De.directives=pe)}return De},oe.prototype._read_processing=function(Be){var De=null,ke=null,pe=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(K.COMMENT,ke),De.directives=pe)}return De},oe.prototype._read_open=function(Be,De){var ke=null,pe=null;return(!De||De.type===K.CONTROL_FLOW_OPEN)&&Be==="<"&&(ke=this._input.next(),this._input.peek()==="/"&&(ke+=this._input.next()),ke+=this.__patterns.element_name.read(),pe=this._create_token(K.TAG_OPEN,ke)),pe},oe.prototype._read_open_handlebars=function(Be,De){var ke=null,pe=null;return(!De||De.type===K.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(),pe=this._create_token(K.COMMENT,ke)):(ke=this.__patterns.handlebars_open.read(),pe=this._create_token(K.TAG_OPEN,ke))),pe},oe.prototype._read_control_flows=function(Be,De){var ke="",pe=null;if(!this._options.templating.includes("angular"))return pe;if(Be==="@"){if(ke=this.__patterns.angular_control_flow_start.read(),ke==="")return pe;for(var Ue=ke.endsWith("(")?1:0,Xe=0;!(ke.endsWith("{")&&Ue===Xe);){var Ee=this._input.next();if(Ee===null)break;Ee==="("?Ue++:Ee===")"&&Xe++,ke+=Ee}pe=this._create_token(K.CONTROL_FLOW_OPEN,ke)}else Be==="}"&&De&&De.type===K.CONTROL_FLOW_OPEN&&(ke=this._input.next(),pe=this._create_token(K.CONTROL_FLOW_CLOSE,ke));return pe},oe.prototype._read_close=function(Be,De){var ke=null,pe=null;return De&&De.type===K.TAG_OPEN&&(De.text[0]==="<"&&(Be===">"||Be==="/"&&this._input.peek(1)===">")?(ke=this._input.next(),Be==="/"&&(ke+=this._input.next()),pe=this._create_token(K.TAG_CLOSE,ke)):De.text[0]==="{"&&Be==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),pe=this._create_token(K.TAG_CLOSE,"}}"))),pe},oe.prototype._read_attribute=function(Be,De,ke){var pe=null,Ue="";if(ke&&ke.text[0]==="<")if(Be==="=")pe=this._create_token(K.EQUALS,this._input.next());else if(Be==='"'||Be==="'"){var Xe=this._input.next();Be==='"'?Xe+=this.__patterns.double_quote.read():Xe+=this.__patterns.single_quote.read(),pe=this._create_token(K.VALUE,Xe)}else Ue=this.__patterns.attribute.read(),Ue&&(De.type===K.EQUALS?pe=this._create_token(K.VALUE,Ue):pe=this._create_token(K.ATTRIBUTE,Ue));return pe},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 pe="";if(ke&&ke.text[0]==="{")pe=this.__patterns.handlebars_raw_close.read();else if(De.type===K.TAG_CLOSE&&De.opened.text[0]==="<"&&De.text[0]!=="/"){var Ue=De.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Ue)&&(pe=this._input.readUntil(new RegExp("</"+Ue+"[\\n\\r\\t ]*?>","ig")))}return pe?this._create_token(K.TEXT,pe):null},oe.prototype._read_script_and_style=function(Be,De){if(De.type===K.TAG_CLOSE&&De.opened.text[0]==="<"&&De.text[0]!=="/"){var ke=De.opened.text.substr(1).toLowerCase();if(ke==="script"||ke==="style"){var pe=this._read_comment_or_cdata(Be);if(pe)return pe.type=K.TEXT,pe;var Ue=this._input.readUntil(new RegExp("</"+ke+"[\\n\\r\\t ]*?>","ig"));if(Ue)return this._create_token(K.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===K.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ke?this._create_token(K.TEXT,ke):null},O.exports.Tokenizer=oe,O.exports.TOKEN=K}],V={};function o(O){var B=V[O];if(B!==void 0)return B.exports;var E=V[O]={exports:{}};return Ce[O](E,E.exports,o),E.exports}var le=o(18);He=le})();var be=He;if(1)te=[Y,Y(58553),Y(87804)],Te=function(Ce){var V=Y(58553),o=Y(87804);return{html_beautify:function(le,O){return be(le,O,V.js_beautify,o.css_beautify)}}}.apply(Ft,te),Te!==void 0&&(Un.exports=Te);else var ee,y})()},58553:function(Un,Ft){var Y,te;(function(){var Te;(function(){"use strict";var be=[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 K(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&&K(S.text,W)}var ke=["case","return","do","if","throw","else","await","break","continue","async"],pe=["before-newline","after-newline","preserve-newline"],Ue=oe(pe),Xe=[Ue.before_newline,Ue.preserve_newline],Ee={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function et(S,W){W.multiline_frame||W.mode===Ee.ForInitializer||W.mode===Ee.Conditional||S.remove_indent(W.start_line_index)}function ne(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===Ee.ArrayLiteral}function q(S){return K(S,[Ee.Expression,Ee.ForInitializer,Ee.Conditional])}function ie(S,W){for(var _e=0;_e<S.length;_e++){var Je=S[_e].trim();if(Je.charAt(0)!==W)return!1}return!0}function ge(S,W){for(var _e=0,Je=S.length,mt;_e<Je;_e++)if(mt=S[_e],mt&&mt.indexOf(W)!==0)return!1;return!0}function he(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)}he.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 Je={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 Je},he.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(Ee.BlockStatement);var _e=new L(S,this._options);return this._tokens=_e.tokenize(),S},he.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 Je=this._tokens.next();Je;)this.handle_token(Je),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Je,Je=this._tokens.next();return S=this._output.get_code(_e),S},he.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)},he.prototype.handle_whitespace_and_comments=function(S,W){var _e=S.newlines,Je=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(Je)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"];he.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,Je=K(this._flags.last_token.text,Z)||K(S.text,Z);if(Je){var mt=K(this._flags.last_token.text,Z)&&K(this._options.operator_position,Xe)||K(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()}}},he.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===Ee.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)},he.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))},he.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)},he.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},he.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))},he.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)},he.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Ee.Statement&&et(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},he.prototype.start_of_object_property=function(){return this._flags.parent.mode===Ee.ObjectLiteral&&this._flags.mode===Ee.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||De(this._flags.last_token,["get","set"]))},he.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===Ee.ObjectLiteral&&this._flags.mode===Ee.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===Ee.ForInitializer||this._previous_flags.mode===Ee.Conditional),W=W||this._flags.last_token.type===J.WORD&&this._flags.mode===Ee.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===Ee.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||De(this._flags.last_token,["get","set"])),W?(this.set_mode(Ee.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},he.prototype.handle_start_expr=function(S){this.start_of_statement(S)||this.handle_whitespace_and_comments(S);var W=Ee.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=Ee.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()),K(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=Ee.ForInitializer):K(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,W=Ee.Conditional):K(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:(K(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 Je=this._tokens.peek(-4);De(_e,["async","function"])||_e.text==="*"&&De(Je,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Ee.ObjectLiteral?(_e.text==="{"||_e.text===","||_e.text==="*"&&(Je.text==="{"||Je.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==="*"&&(K(this._last_last_text,["function","yield"])||this._flags.mode===Ee.ObjectLiteral&&K(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()},he.prototype.handle_end_expr=function(S){for(;this._flags.mode===Ee.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(),et(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Ee.Conditional&&(this._previous_flags.mode=Ee.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},he.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(Ee.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Ee.BlockStatement):_e&&(K(_e.text,[":",","])&&K(W.type,[J.STRING,J.WORD,J.RESERVED])||K(W.text,["get","set","..."])&&K(_e.type,[J.WORD,J.RESERVED]))?K(this._last_last_text,["class","interface"])&&!K(_e.text,[":",","])?this.set_mode(Ee.BlockStatement):this.set_mode(Ee.ObjectLiteral):this._flags.last_token.type===J.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Ee.BlockStatement):K(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(Ee.ObjectLiteral):this.set_mode(Ee.BlockStatement),this._flags.last_token&&De(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Je=!W.comments_before&&W.text==="}",mt=Je&&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&&(K(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(),!Je&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},he.prototype.handle_end_block=function(S){for(this.handle_whitespace_and_comments(S);this._flags.mode===Ee.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)},he.prototype.handle_word=function(S){if(S.type===J.RESERVED){if(K(S.text,["set","get"])&&this._flags.mode!==Ee.ObjectLiteral)S.type=J.WORD;else if(S.text==="import"&&K(this._tokens.peek().text,["(","."]))S.type=J.WORD;else if(K(S.text,["as","from"])&&!this._flags.import_block)S.type=J.WORD;else if(this._flags.mode===Ee.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===Ee.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()&&!(K(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Ee.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(S),Be(S,"function")){(K(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(K(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===Ee.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==="*"&&(K(this._last_last_text,["function","yield"])||this._flags.mode===Ee.ObjectLiteral&&K(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===Ee.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 Je=this._output.current_line;Je.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))},he.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===Ee.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)},he.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)},he.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},he.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===Ee.ObjectLiteral||this._flags.mode===Ee.Statement&&this._flags.parent.mode===Ee.ObjectLiteral?(this._flags.mode===Ee.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(S)},he.prototype.handle_operator=function(S){var W=S.text==="*"&&(De(this._flags.last_token,["function","yield"])||K(this._flags.last_token.type,[J.START_BLOCK,J.COMMA,J.END_BLOCK,J.SEMICOLON])),_e=K(S.text,["-","+"])&&(K(this._flags.last_token.type,[J.START_BLOCK,J.START_EXPR,J.EQUALS,J.OPERATOR])||K(this._flags.last_token.text,ae)||this._flags.last_token.text===",");if(!this.start_of_statement(S)){var Je=!W;this.handle_whitespace_and_comments(S,Je)}if(S.text==="*"&&this._flags.last_token.type===J.DOT){this.print_token(S);return}if(S.text==="::"){this.print_token(S);return}if(K(S.text,["-","+"])&&this.start_of_object_property()){this.print_token(S);return}if(this._flags.last_token.type===J.OPERATOR&&K(this._options.operator_position,Xe)&&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&&K(S.text,Z)){var on=S.text===":",Zt=on&&Qt,Rt=on&&!Qt;switch(this._options.operator_position){case Ue.before_newline:this._output.space_before_token=!Rt,this.print_token(S),(!on||Zt)&&this.allow_wrap_or_preserved_newline(S),this._output.space_before_token=!0;return;case Ue.after_newline:this._output.space_before_token=!0,!on||Zt?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:Rt||this.allow_wrap_or_preserved_newline(S),mt=!(this._output.just_added_newline()||Rt),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 je=this._tokens.peek();Gt=je&&K(je.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(K(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 ht=De(this._flags.last_token,ke)&&S.newlines;ht&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ht,!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=K(S.text,["--","-","++","+"])&&K(this._flags.last_token.text,["--","-","++","+"]),K(S.text,["+","-"])&&K(this._flags.last_token.text,["--","++"])&&(Gt=!0)),(this._flags.mode===Ee.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Ee.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},he.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)},he.prototype.print_block_commment=function(S,W){var _e=ne(S.text),Je,mt=!1,Gt=!1,Qt=S.whitespace_before,on=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=ie(_e,"*"),Gt=ge(_e,Qt),mt&&(this._flags.alignment=1),Je=0;Je<_e.length;Je++)mt?(this.print_token_line_indentation(S),this._output.add_token(z(_e[Je]))):Gt&&_e[Je]?(this.print_token_line_indentation(S),this._output.add_token(_e[Je].substring(on))):(this._output.current_line.set_indent(-1),this._output.add_token(_e[Je])),this.print_newline(!1,W);this._flags.alignment=0}},he.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)},he.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)},he.prototype.handle_unknown=function(S,W){this.print_token(S),S.text[S.text.length-1]===`
|
|
`&&this.print_newline(!1,W)},he.prototype.handle_eof=function(S){for(;this._flags.mode===Ee.Statement;)this.restore_mode();this.handle_whitespace_and_comments(S)},V.exports.Beautifier=he},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(ie,ge){return ge.indexOf(ie)!==-1}var K={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(" "),pe=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";pe=pe.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),pe="\\?\\.(?!\\d) "+pe,pe=pe.replace(/ /g,"|");var Ue=new RegExp(pe),Xe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Ee=Xe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),et=new RegExp("^(?:"+Ee.join("|")+")$"),ne,Q=function(ie,ge){B.call(this,ie,ge),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var he=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:he.matching(oe),punct:he.matching(Ue),comment:he.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:he.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:he.matching(/<!--/),html_comment_end:he.matching(/-->/),include:he.starting_with(/#include/).until_after(L.lineBreak),shebang:he.starting_with(/#!/).until_after(L.lineBreak),xml:he.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(ie){return ie.type===K.COMMENT||ie.type===K.BLOCK_COMMENT||ie.type===K.UNKNOWN},Q.prototype._is_opening=function(ie){return ie.type===K.START_BLOCK||ie.type===K.START_EXPR},Q.prototype._is_closing=function(ie,ge){return(ie.type===K.END_BLOCK||ie.type===K.END_EXPR)&&ge&&(ie.text==="]"&&ge.text==="["||ie.text===")"&&ge.text==="("||ie.text==="}"&&ge.text==="{")},Q.prototype._reset=function(){ne=!1},Q.prototype._get_next_token=function(ie,ge){var he=null;this._readWhitespace();var b=this._input.peek();return b===null?this._create_token(K.EOF,""):(he=he||this._read_non_javascript(b),he=he||this._read_string(b),he=he||this._read_pair(b,this._input.peek(1)),he=he||this._read_word(ie),he=he||this._read_singles(b),he=he||this._read_comment(b),he=he||this._read_regexp(b,ie),he=he||this._read_xml(b,ie),he=he||this._read_punctuation(),he=he||this._create_token(K.UNKNOWN,this._input.next()),he)},Q.prototype._read_word=function(ie){var ge;if(ge=this.__patterns.identifier.read(),ge!=="")return ge=ge.replace(L.allLineBreaks,`
|
|
`),!(ie.type===K.DOT||ie.type===K.RESERVED&&(ie.text==="set"||ie.text==="get"))&&et.test(ge)?(ge==="in"||ge==="of")&&(ie.type===K.WORD||ie.type===K.STRING)?this._create_token(K.OPERATOR,ge):this._create_token(K.RESERVED,ge):this._create_token(K.WORD,ge);if(ge=this.__patterns.number.read(),ge!=="")return this._create_token(K.WORD,ge)},Q.prototype._read_singles=function(ie){var ge=null;return ie==="("||ie==="["?ge=this._create_token(K.START_EXPR,ie):ie===")"||ie==="]"?ge=this._create_token(K.END_EXPR,ie):ie==="{"?ge=this._create_token(K.START_BLOCK,ie):ie==="}"?ge=this._create_token(K.END_BLOCK,ie):ie===";"?ge=this._create_token(K.SEMICOLON,ie):ie==="."&&De.test(this._input.peek(1))?ge=this._create_token(K.DOT,ie):ie===","&&(ge=this._create_token(K.COMMA,ie)),ge&&this._input.next(),ge},Q.prototype._read_pair=function(ie,ge){var he=null;return ie==="#"&&ge==="{"&&(he=this._create_token(K.START_BLOCK,ie+ge)),he&&(this._input.next(),this._input.next()),he},Q.prototype._read_punctuation=function(){var ie=this.__patterns.punct.read();if(ie!=="")return ie==="="?this._create_token(K.EQUALS,ie):ie==="?."?this._create_token(K.DOT,ie):this._create_token(K.OPERATOR,ie)},Q.prototype._read_non_javascript=function(ie){var ge="";if(ie==="#"){if(this._is_first_token()&&(ge=this.__patterns.shebang.read(),ge))return this._create_token(K.UNKNOWN,ge.trim()+`
|
|
`);if(ge=this.__patterns.include.read(),ge)return this._create_token(K.UNKNOWN,ge.trim()+`
|
|
`);ie=this._input.next();var he="#";if(this._input.hasNext()&&this._input.testChar(Be)){do ie=this._input.next(),he+=ie;while(this._input.hasNext()&&ie!=="#"&&ie!=="=");return ie==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(he+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(he+="{}",this._input.next(),this._input.next())),this._create_token(K.WORD,he)}this._input.back()}else if(ie==="<"&&this._is_first_token()){if(ge=this.__patterns.html_comment_start.read(),ge){for(;this._input.hasNext()&&!this._input.testChar(L.newline);)ge+=this._input.next();return ne=!0,this._create_token(K.COMMENT,ge)}}else if(ne&&ie==="-"&&(ge=this.__patterns.html_comment_end.read(),ge))return ne=!1,this._create_token(K.COMMENT,ge);return null},Q.prototype._read_comment=function(ie){var ge=null;if(ie==="/"){var he="";if(this._input.peek(1)==="*"){he=this.__patterns.block_comment.read();var b=z.get_directives(he);b&&b.ignore==="start"&&(he+=z.readIgnored(this._input)),he=he.replace(L.allLineBreaks,`
|
|
`),ge=this._create_token(K.BLOCK_COMMENT,he),ge.directives=b}else this._input.peek(1)==="/"&&(he=this.__patterns.comment.read(),ge=this._create_token(K.COMMENT,he))}return ge},Q.prototype._read_string=function(ie){if(ie==="`"||ie==="'"||ie==='"'){var ge=this._input.next();return this.has_char_escapes=!1,ie==="`"?ge+=this._read_string_recursive("`",!0,"${"):ge+=this._read_string_recursive(ie),this.has_char_escapes&&this._options.unescape_strings&&(ge=q(ge)),this._input.peek()===ie&&(ge+=this._input.next()),ge=ge.replace(L.allLineBreaks,`
|
|
`),this._create_token(K.STRING,ge)}return null},Q.prototype._allow_regexp_or_xml=function(ie){return ie.type===K.RESERVED&&J(ie.text,["return","case","throw","else","do","typeof","yield"])||ie.type===K.END_EXPR&&ie.text===")"&&ie.opened.previous.type===K.RESERVED&&J(ie.opened.previous.text,["if","while","for"])||J(ie.type,[K.COMMENT,K.START_EXPR,K.START_BLOCK,K.START,K.END_BLOCK,K.OPERATOR,K.EQUALS,K.EOF,K.SEMICOLON,K.COMMA])},Q.prototype._read_regexp=function(ie,ge){if(ie==="/"&&this._allow_regexp_or_xml(ge)){for(var he=this._input.next(),b=!1,S=!1;this._input.hasNext()&&(b||S||this._input.peek()!==ie)&&!this._input.testChar(L.newline);)he+=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()===ie&&(he+=this._input.next(),he+=this._input.read(L.identifier)),this._create_token(K.STRING,he)}return null},Q.prototype._read_xml=function(ie,ge){if(this._options.e4x&&ie==="<"&&this._allow_regexp_or_xml(ge)){var he="",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 Je=!!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+}$/,"}"))&&(Je?--_e:++_e),he+=b[0],_e<=0)break;b=this.__patterns.xml.read_match()}return b||(he+=this._input.match(/[\s\S]*/g)[0]),he=he.replace(L.allLineBreaks,`
|
|
`),this._create_token(K.STRING,he)}}return null};function q(ie){for(var ge="",he=0,b=new O(ie),S=null;b.hasNext();)if(S=b.match(/([\s]|[^\\]|\\\\)+/g),S&&(ge+=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{ge+="\\",b.hasNext()&&(ge+=b.next());continue}if(!S||(he=parseInt(S[1],16),he>126&&he<=255&&S[0].indexOf("x")===0))return ie;he>=0&&he<32||he>1114111?ge+="\\"+S[0]:he===34||he===39||he===92?ge+="\\"+String.fromCharCode(he):ge+=String.fromCharCode(he)}return ge}Q.prototype._read_string_recursive=function(ie,ge,he){var b,S;ie==="'"?S=this.__patterns.single_quote:ie==='"'?S=this.__patterns.double_quote:ie==="`"?S=this.__patterns.template_text:ie==="}"&&(S=this.__patterns.template_expression);for(var W=S.read(),_e="";this._input.hasNext();){if(_e=this._input.next(),_e===ie||!ge&&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()):he&&(he==="${"&&_e==="$"&&this._input.peek()==="{"&&(_e+=this._input.next()),he===_e&&(ie==="`"?_e+=this._read_string_recursive("}",ge,"`"):_e+=this._read_string_recursive("`",ge,"${"),this._input.hasNext()&&(_e+=this._input.next())));_e+=S.read(),W+=_e}return W},V.exports.Tokenizer=Q,V.exports.TOKEN=K,V.exports.positionable_operators=ke.slice(),V.exports.line_starters=Xe.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,""),K=null,z=[],oe=new E;J.type!==L.EOF;){for(Z=this._get_next_token(J,K);this._is_comment(Z);)oe.add(Z),Z=this._get_next_token(J,K);oe.isEmpty()||(Z.comments_before=oe,oe=new E),Z.parent=K,this._is_opening(Z)?(z.push(K),K=Z):K&&this._is_closing(Z,K)&&(Z.opened=K,K.closed=Z,K=z.pop(),Z.parent=K),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 K=this._input.read(/.+/g);return K?this._create_token(L.RAW,K):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 K=new B(Z,J,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return K},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}],ee={};function y(V){var o=ee[V];if(o!==void 0)return o.exports;var le=ee[V]={exports:{}};return be[V](le,le.exports,y),le.exports}var Ce=y(0);Te=Ce})();var He=Te;Y=[],te=function(){return{js_beautify:He}}.apply(Ft,Y),te!==void 0&&(Un.exports=te)})()},32834:function(Un){(function(Ft,Y){Un.exports=Y()})(this,function(){"use strict";function Ft($e,Pe){for(var Fe=0;Fe<Pe.length;Fe++){var re=Pe[Fe];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty($e,re.key,re)}}function Y($e,Pe,Fe){return Pe&&Ft($e.prototype,Pe),Fe&&Ft($e,Fe),$e}function te($e,Pe){if($e){if(typeof $e=="string")return Te($e,Pe);var Fe=Object.prototype.toString.call($e).slice(8,-1);if(Fe==="Object"&&$e.constructor&&(Fe=$e.constructor.name),Fe==="Map"||Fe==="Set")return Array.from($e);if(Fe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Fe))return Te($e,Pe)}}function Te($e,Pe){(Pe==null||Pe>$e.length)&&(Pe=$e.length);for(var Fe=0,re=new Array(Pe);Fe<Pe;Fe++)re[Fe]=$e[Fe];return re}function He($e,Pe){var Fe=typeof Symbol!="undefined"&&$e[Symbol.iterator]||$e["@@iterator"];if(Fe)return(Fe=Fe.call($e)).next.bind(Fe);if(Array.isArray($e)||(Fe=te($e))||Pe&&$e&&typeof $e.length=="number"){Fe&&($e=Fe);var re=0;return function(){return re>=$e.length?{done:!0}:{done:!1,value:$e[re++]}}}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 be={exports:{}};function ee(){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($e){be.exports.defaults=$e}be.exports={defaults:ee(),getDefaults:ee,changeDefaults:y};var Ce=/[&<>"']/,V=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,le=/[<>"']|&(?!#?\w+;)/g,O={"&":"&","<":"<",">":">",'"':""","'":"'"},B=function(Pe){return O[Pe]};function E($e,Pe){if(Pe){if(Ce.test($e))return $e.replace(V,B)}else if(o.test($e))return $e.replace(le,B);return $e}var F=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function L($e){return $e.replace(F,function(Pe,Fe){return Fe=Fe.toLowerCase(),Fe==="colon"?":":Fe.charAt(0)==="#"?Fe.charAt(1)==="x"?String.fromCharCode(parseInt(Fe.substring(2),16)):String.fromCharCode(+Fe.substring(1)):""})}var ae=/(^|[^\[])\^/g;function Z($e,Pe){$e=$e.source||$e,Pe=Pe||"";var Fe={replace:function(ce,me){return me=me.source||me,me=me.replace(ae,"$1"),$e=$e.replace(ce,me),Fe},getRegex:function(){return new RegExp($e,Pe)}};return Fe}var J=/[^\w:]/g,K=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function z($e,Pe,Fe){if($e){var re;try{re=decodeURIComponent(L(Fe)).replace(J,"").toLowerCase()}catch(ce){return null}if(re.indexOf("javascript:")===0||re.indexOf("vbscript:")===0||re.indexOf("data:")===0)return null}Pe&&!K.test(Fe)&&(Fe=pe(Pe,Fe));try{Fe=encodeURI(Fe).replace(/%25/g,"%")}catch(ce){return null}return Fe}var oe={},Be=/^[^:]+:\/*[^/]*$/,De=/^([^:]+:)[\s\S]*$/,ke=/^([^:]+:\/*[^/]*)[\s\S]*$/;function pe($e,Pe){oe[" "+$e]||(Be.test($e)?oe[" "+$e]=$e+"/":oe[" "+$e]=et($e,"/",!0)),$e=oe[" "+$e];var Fe=$e.indexOf(":")===-1;return Pe.substring(0,2)==="//"?Fe?Pe:$e.replace(De,"$1")+Pe:Pe.charAt(0)==="/"?Fe?Pe:$e.replace(ke,"$1")+Pe:$e+Pe}var Ue={exec:function(){}};function Xe($e){for(var Pe=1,Fe,re;Pe<arguments.length;Pe++){Fe=arguments[Pe];for(re in Fe)Object.prototype.hasOwnProperty.call(Fe,re)&&($e[re]=Fe[re])}return $e}function Ee($e,Pe){var Fe=$e.replace(/\|/g,function(me,Se,Qe){for(var Tt=!1,Wt=Se;--Wt>=0&&Qe[Wt]==="\\";)Tt=!Tt;return Tt?"|":" |"}),re=Fe.split(/ \|/),ce=0;if(re.length>Pe)re.splice(Pe);else for(;re.length<Pe;)re.push("");for(;ce<re.length;ce++)re[ce]=re[ce].trim().replace(/\\\|/g,"|");return re}function et($e,Pe,Fe){var re=$e.length;if(re===0)return"";for(var ce=0;ce<re;){var me=$e.charAt(re-ce-1);if(me===Pe&&!Fe)ce++;else if(me!==Pe&&Fe)ce++;else break}return $e.substr(0,re-ce)}function ne($e,Pe){if($e.indexOf(Pe[1])===-1)return-1;for(var Fe=$e.length,re=0,ce=0;ce<Fe;ce++)if($e[ce]==="\\")ce++;else if($e[ce]===Pe[0])re++;else if($e[ce]===Pe[1]&&(re--,re<0))return ce;return-1}function Q($e){$e&&$e.sanitize&&!$e.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($e,Pe){if(Pe<1)return"";for(var Fe="";Pe>1;)Pe&1&&(Fe+=$e),Pe>>=1,$e+=$e;return Fe+$e}var ie={escape:E,unescape:L,edit:Z,cleanUrl:z,resolveUrl:pe,noopTest:Ue,merge:Xe,splitCells:Ee,rtrim:et,findClosingBracket:ne,checkSanitizeDeprecation:Q,repeatString:q},ge=be.exports.defaults,he=ie.rtrim,b=ie.splitCells,S=ie.escape,W=ie.findClosingBracket;function _e($e,Pe,Fe){var re=Pe.href,ce=Pe.title?S(Pe.title):null,me=$e[1].replace(/\\([\[\]])/g,"$1");return $e[0].charAt(0)!=="!"?{type:"link",raw:Fe,href:re,title:ce,text:me}:{type:"image",raw:Fe,href:re,title:ce,text:S(me)}}function Je($e,Pe){var Fe=$e.match(/^(\s+)(?:```)/);if(Fe===null)return Pe;var re=Fe[1];return Pe.split(`
|
|
`).map(function(ce){var me=ce.match(/^\s+/);if(me===null)return ce;var Se=me[0];return Se.length>=re.length?ce.slice(re.length):ce}).join(`
|
|
`)}var mt=function(){function $e(Fe){this.options=Fe||ge}var Pe=$e.prototype;return Pe.space=function(re){var ce=this.rules.block.newline.exec(re);if(ce)return ce[0].length>1?{type:"space",raw:ce[0]}:{raw:`
|
|
`}},Pe.code=function(re){var ce=this.rules.block.code.exec(re);if(ce){var me=ce[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ce[0],codeBlockStyle:"indented",text:this.options.pedantic?me:he(me,`
|
|
`)}}},Pe.fences=function(re){var ce=this.rules.block.fences.exec(re);if(ce){var me=ce[0],Se=Je(me,ce[3]||"");return{type:"code",raw:me,lang:ce[2]?ce[2].trim():ce[2],text:Se}}},Pe.heading=function(re){var ce=this.rules.block.heading.exec(re);if(ce){var me=ce[2].trim();if(/#$/.test(me)){var Se=he(me,"#");(this.options.pedantic||!Se||/ $/.test(Se))&&(me=Se.trim())}return{type:"heading",raw:ce[0],depth:ce[1].length,text:me}}},Pe.nptable=function(re){var ce=this.rules.block.nptable.exec(re);if(ce){var me={type:"table",header:b(ce[1].replace(/^ *| *\| *$/g,"")),align:ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ce[3]?ce[3].replace(/\n$/,"").split(`
|
|
`):[],raw:ce[0]};if(me.header.length===me.align.length){var Se=me.align.length,Qe;for(Qe=0;Qe<Se;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(Se=me.cells.length,Qe=0;Qe<Se;Qe++)me.cells[Qe]=b(me.cells[Qe],me.header.length);return me}}},Pe.hr=function(re){var ce=this.rules.block.hr.exec(re);if(ce)return{type:"hr",raw:ce[0]}},Pe.blockquote=function(re){var ce=this.rules.block.blockquote.exec(re);if(ce){var me=ce[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ce[0],text:me}}},Pe.list=function(re){var ce=this.rules.block.list.exec(re);if(ce){var me=ce[0],Se=ce[2],Qe=Se.length>1,Tt={type:"list",raw:me,ordered:Qe,start:Qe?+Se.slice(0,-1):"",loose:!1,items:[]},Wt=ce[0].match(this.rules.block.item),Ut=!1,vn,jn,ur,gn,Jt,or,mr,Ge,lr,ir=Wt.length;ur=this.rules.block.listItemStart.exec(Wt[0]);for(var rr=0;rr<ir;rr++){if(vn=Wt[rr],me=vn,this.options.pedantic||(lr=vn.match(new RegExp("\\n\\s*\\n {0,"+(ur[0].length-1)+"}\\S")),lr&&(Jt=vn.length-lr.index+Wt.slice(rr+1).join(`
|
|
`).length,Tt.raw=Tt.raw.substring(0,Tt.raw.length-Jt),vn=vn.substring(0,lr.index),me=vn,ir=rr+1)),rr!==ir-1){if(gn=this.rules.block.listItemStart.exec(Wt[rr+1]),this.options.pedantic?gn[1].length>ur[1].length:gn[1].length>=ur[0].length||gn[1].length>3){Wt.splice(rr,2,Wt[rr]+(!this.options.pedantic&&gn[1].length<ur[0].length&&!Wt[rr].match(/\n$/)?"":`
|
|
`)+Wt[rr+1]),rr--,ir--;continue}else(!this.options.pedantic||this.options.smartLists?gn[2][gn[2].length-1]!==Se[Se.length-1]:Qe===(gn[2].length===1))&&(Jt=Wt.slice(rr+1).join(`
|
|
`).length,Tt.raw=Tt.raw.substring(0,Tt.raw.length-Jt),rr=ir-1);ur=gn}jn=vn.length,vn=vn.replace(/^ *([*+-]|\d+[.)]) ?/,""),~vn.indexOf(`
|
|
`)&&(jn-=vn.length,vn=this.options.pedantic?vn.replace(/^ {1,4}/gm,""):vn.replace(new RegExp("^ {1,"+jn+"}","gm"),"")),vn=he(vn,`
|
|
`),rr!==ir-1&&(me=me+`
|
|
`),or=Ut||/\n\n(?!\s*$)/.test(me),rr!==ir-1&&(Ut=me.slice(-2)===`
|
|
|
|
`,or||(or=Ut)),or&&(Tt.loose=!0),this.options.gfm&&(mr=/^\[[ xX]\] /.test(vn),Ge=void 0,mr&&(Ge=vn[1]!==" ",vn=vn.replace(/^\[[ xX]\] +/,""))),Tt.items.push({type:"list_item",raw:me,task:mr,checked:Ge,loose:or,text:vn})}return Tt}},Pe.html=function(re){var ce=this.rules.block.html.exec(re);if(ce)return{type:this.options.sanitize?"paragraph":"html",raw:ce[0],pre:!this.options.sanitizer&&(ce[1]==="pre"||ce[1]==="script"||ce[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):S(ce[0]):ce[0]}},Pe.def=function(re){var ce=this.rules.block.def.exec(re);if(ce){ce[3]&&(ce[3]=ce[3].substring(1,ce[3].length-1));var me=ce[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:me,raw:ce[0],href:ce[2],title:ce[3]}}},Pe.table=function(re){var ce=this.rules.block.table.exec(re);if(ce){var me={type:"table",header:b(ce[1].replace(/^ *| *\| *$/g,"")),align:ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ce[3]?ce[3].replace(/\n$/,"").split(`
|
|
`):[]};if(me.header.length===me.align.length){me.raw=ce[0];var Se=me.align.length,Qe;for(Qe=0;Qe<Se;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(Se=me.cells.length,Qe=0;Qe<Se;Qe++)me.cells[Qe]=b(me.cells[Qe].replace(/^ *\| *| *\| *$/g,""),me.header.length);return me}}},Pe.lheading=function(re){var ce=this.rules.block.lheading.exec(re);if(ce)return{type:"heading",raw:ce[0],depth:ce[2].charAt(0)==="="?1:2,text:ce[1]}},Pe.paragraph=function(re){var ce=this.rules.block.paragraph.exec(re);if(ce)return{type:"paragraph",raw:ce[0],text:ce[1].charAt(ce[1].length-1)===`
|
|
`?ce[1].slice(0,-1):ce[1]}},Pe.text=function(re){var ce=this.rules.block.text.exec(re);if(ce)return{type:"text",raw:ce[0],text:ce[0]}},Pe.escape=function(re){var ce=this.rules.inline.escape.exec(re);if(ce)return{type:"escape",raw:ce[0],text:S(ce[1])}},Pe.tag=function(re,ce,me){var Se=this.rules.inline.tag.exec(re);if(Se)return!ce&&/^<a /i.test(Se[0])?ce=!0:ce&&/^<\/a>/i.test(Se[0])&&(ce=!1),!me&&/^<(pre|code|kbd|script)(\s|>)/i.test(Se[0])?me=!0:me&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Se[0])&&(me=!1),{type:this.options.sanitize?"text":"html",raw:Se[0],inLink:ce,inRawBlock:me,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):S(Se[0]):Se[0]}},Pe.link=function(re){var ce=this.rules.inline.link.exec(re);if(ce){var me=ce[2].trim();if(!this.options.pedantic&&/^</.test(me)){if(!/>$/.test(me))return;var Se=he(me.slice(0,-1),"\\");if((me.length-Se.length)%2===0)return}else{var Qe=W(ce[2],"()");if(Qe>-1){var Tt=ce[0].indexOf("!")===0?5:4,Wt=Tt+ce[1].length+Qe;ce[2]=ce[2].substring(0,Qe),ce[0]=ce[0].substring(0,Wt).trim(),ce[3]=""}}var Ut=ce[2],vn="";if(this.options.pedantic){var jn=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ut);jn&&(Ut=jn[1],vn=jn[3])}else vn=ce[3]?ce[3].slice(1,-1):"";return Ut=Ut.trim(),/^</.test(Ut)&&(this.options.pedantic&&!/>$/.test(me)?Ut=Ut.slice(1):Ut=Ut.slice(1,-1)),_e(ce,{href:Ut&&Ut.replace(this.rules.inline._escapes,"$1"),title:vn&&vn.replace(this.rules.inline._escapes,"$1")},ce[0])}},Pe.reflink=function(re,ce){var me;if((me=this.rules.inline.reflink.exec(re))||(me=this.rules.inline.nolink.exec(re))){var Se=(me[2]||me[1]).replace(/\s+/g," ");if(Se=ce[Se.toLowerCase()],!Se||!Se.href){var Qe=me[0].charAt(0);return{type:"text",raw:Qe,text:Qe}}return _e(me,Se,me[0])}},Pe.emStrong=function(re,ce,me){me===void 0&&(me="");var Se=this.rules.inline.emStrong.lDelim.exec(re);if(Se&&!(Se[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=Se[1]||Se[2]||"";if(!Qe||Qe&&(me===""||this.rules.inline.punctuation.exec(me))){var Tt=Se[0].length-1,Wt,Ut,vn=Tt,jn=0,ur=Se[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(ur.lastIndex=0,ce=ce.slice(-1*re.length+Tt);(Se=ur.exec(ce))!=null;)if(Wt=Se[1]||Se[2]||Se[3]||Se[4]||Se[5]||Se[6],!!Wt){if(Ut=Wt.length,Se[3]||Se[4]){vn+=Ut;continue}else if((Se[5]||Se[6])&&Tt%3&&!((Tt+Ut)%3)){jn+=Ut;continue}if(vn-=Ut,!(vn>0))return Ut=Math.min(Ut,Ut+vn+jn),Math.min(Tt,Ut)%2?{type:"em",raw:re.slice(0,Tt+Se.index+Ut+1),text:re.slice(1,Tt+Se.index+Ut)}:{type:"strong",raw:re.slice(0,Tt+Se.index+Ut+1),text:re.slice(2,Tt+Se.index+Ut-1)}}}}},Pe.codespan=function(re){var ce=this.rules.inline.code.exec(re);if(ce){var me=ce[2].replace(/\n/g," "),Se=/[^ ]/.test(me),Qe=/^ /.test(me)&&/ $/.test(me);return Se&&Qe&&(me=me.substring(1,me.length-1)),me=S(me,!0),{type:"codespan",raw:ce[0],text:me}}},Pe.br=function(re){var ce=this.rules.inline.br.exec(re);if(ce)return{type:"br",raw:ce[0]}},Pe.del=function(re){var ce=this.rules.inline.del.exec(re);if(ce)return{type:"del",raw:ce[0],text:ce[2]}},Pe.autolink=function(re,ce){var me=this.rules.inline.autolink.exec(re);if(me){var Se,Qe;return me[2]==="@"?(Se=S(this.options.mangle?ce(me[1]):me[1]),Qe="mailto:"+Se):(Se=S(me[1]),Qe=Se),{type:"link",raw:me[0],text:Se,href:Qe,tokens:[{type:"text",raw:Se,text:Se}]}}},Pe.url=function(re,ce){var me;if(me=this.rules.inline.url.exec(re)){var Se,Qe;if(me[2]==="@")Se=S(this.options.mangle?ce(me[0]):me[0]),Qe="mailto:"+Se;else{var Tt;do Tt=me[0],me[0]=this.rules.inline._backpedal.exec(me[0])[0];while(Tt!==me[0]);Se=S(me[0]),me[1]==="www."?Qe="http://"+Se:Qe=Se}return{type:"link",raw:me[0],text:Se,href:Qe,tokens:[{type:"text",raw:Se,text:Se}]}}},Pe.inlineText=function(re,ce,me){var Se=this.rules.inline.text.exec(re);if(Se){var Qe;return ce?Qe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):S(Se[0]):Se[0]:Qe=S(this.options.smartypants?me(Se[0]):Se[0]),{type:"text",raw:Se[0],text:Qe}}},$e}(),Gt=ie.noopTest,Qt=ie.edit,on=ie.merge,Zt={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]+/};Zt._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Zt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Zt.def=Qt(Zt.def).replace("label",Zt._label).replace("title",Zt._title).getRegex(),Zt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Zt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Zt.item=Qt(Zt.item,"gm").replace(/bull/g,Zt.bullet).getRegex(),Zt.listItemStart=Qt(/^( *)(bull) */).replace("bull",Zt.bullet).getRegex(),Zt.list=Qt(Zt.list).replace(/bull/g,Zt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Zt.def.source+")").getRegex(),Zt._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",Zt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Zt.html=Qt(Zt.html,"i").replace("comment",Zt._comment).replace("tag",Zt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Zt.paragraph=Qt(Zt._paragraph).replace("hr",Zt.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",Zt._tag).getRegex(),Zt.blockquote=Qt(Zt.blockquote).replace("paragraph",Zt.paragraph).getRegex(),Zt.normal=on({},Zt),Zt.gfm=on({},Zt.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*|$)"}),Zt.gfm.nptable=Qt(Zt.gfm.nptable).replace("hr",Zt.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",Zt._tag).getRegex(),Zt.gfm.table=Qt(Zt.gfm.table).replace("hr",Zt.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",Zt._tag).getRegex(),Zt.pedantic=on({},Zt.normal,{html:Qt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Zt._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(Zt.normal._paragraph).replace("hr",Zt.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Zt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Rt={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])/};Rt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Rt.punctuation=Qt(Rt.punctuation).replace(/punctuation/g,Rt._punctuation).getRegex(),Rt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Rt.escapedEmSt=/\\\*|\\_/g,Rt._comment=Qt(Zt._comment).replace("(?:-->|$)","-->").getRegex(),Rt.emStrong.lDelim=Qt(Rt.emStrong.lDelim).replace(/punct/g,Rt._punctuation).getRegex(),Rt.emStrong.rDelimAst=Qt(Rt.emStrong.rDelimAst,"g").replace(/punct/g,Rt._punctuation).getRegex(),Rt.emStrong.rDelimUnd=Qt(Rt.emStrong.rDelimUnd,"g").replace(/punct/g,Rt._punctuation).getRegex(),Rt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Rt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Rt._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])?)+(?![-_])/,Rt.autolink=Qt(Rt.autolink).replace("scheme",Rt._scheme).replace("email",Rt._email).getRegex(),Rt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Rt.tag=Qt(Rt.tag).replace("comment",Rt._comment).replace("attribute",Rt._attribute).getRegex(),Rt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Rt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Rt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Rt.link=Qt(Rt.link).replace("label",Rt._label).replace("href",Rt._href).replace("title",Rt._title).getRegex(),Rt.reflink=Qt(Rt.reflink).replace("label",Rt._label).getRegex(),Rt.reflinkSearch=Qt(Rt.reflinkSearch,"g").replace("reflink",Rt.reflink).replace("nolink",Rt.nolink).getRegex(),Rt.normal=on({},Rt),Rt.pedantic=on({},Rt.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",Rt._label).getRegex(),reflink:Qt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Rt._label).getRegex()}),Rt.gfm=on({},Rt.normal,{escape:Qt(Rt.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Rt.gfm.url=Qt(Rt.gfm.url,"i").replace("email",Rt.gfm._extended_email).getRegex(),Rt.breaks=on({},Rt.gfm,{br:Qt(Rt.br).replace("{2,}","*").getRegex(),text:Qt(Rt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var je={block:Zt,inline:Rt},ht=mt,At=be.exports.defaults,ct=je.block,tn=je.inline,Re=ie.repeatString;function P($e){return $e.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($e){var Pe="",Fe,re,ce=$e.length;for(Fe=0;Fe<ce;Fe++)re=$e.charCodeAt(Fe),Math.random()>.5&&(re="x"+re.toString(16)),Pe+="&#"+re+";";return Pe}var T=function(){function $e(Fe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Fe||At,this.options.tokenizer=this.options.tokenizer||new ht,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var re={block:ct.normal,inline:tn.normal};this.options.pedantic?(re.block=ct.pedantic,re.inline=tn.pedantic):this.options.gfm&&(re.block=ct.gfm,this.options.breaks?re.inline=tn.breaks:re.inline=tn.gfm),this.tokenizer.rules=re}$e.lex=function(re,ce){var me=new $e(ce);return me.lex(re)},$e.lexInline=function(re,ce){var me=new $e(ce);return me.inlineTokens(re)};var Pe=$e.prototype;return Pe.lex=function(re){return re=re.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(re,this.tokens,!0),this.inline(this.tokens),this.tokens},Pe.blockTokens=function(re,ce,me){ce===void 0&&(ce=[]),me===void 0&&(me=!0),this.options.pedantic&&(re=re.replace(/^ +$/gm,""));for(var Se,Qe,Tt,Wt;re;){if(Se=this.tokenizer.space(re)){re=re.substring(Se.raw.length),Se.type&&ce.push(Se);continue}if(Se=this.tokenizer.code(re)){re=re.substring(Se.raw.length),Wt=ce[ce.length-1],Wt&&Wt.type==="paragraph"?(Wt.raw+=`
|
|
`+Se.raw,Wt.text+=`
|
|
`+Se.text):ce.push(Se);continue}if(Se=this.tokenizer.fences(re)){re=re.substring(Se.raw.length),ce.push(Se);continue}if(Se=this.tokenizer.heading(re)){re=re.substring(Se.raw.length),ce.push(Se);continue}if(Se=this.tokenizer.nptable(re)){re=re.substring(Se.raw.length),ce.push(Se);continue}if(Se=this.tokenizer.hr(re)){re=re.substring(Se.raw.length),ce.push(Se);continue}if(Se=this.tokenizer.blockquote(re)){re=re.substring(Se.raw.length),Se.tokens=this.blockTokens(Se.text,[],me),ce.push(Se);continue}if(Se=this.tokenizer.list(re)){for(re=re.substring(Se.raw.length),Tt=Se.items.length,Qe=0;Qe<Tt;Qe++)Se.items[Qe].tokens=this.blockTokens(Se.items[Qe].text,[],!1);ce.push(Se);continue}if(Se=this.tokenizer.html(re)){re=re.substring(Se.raw.length),ce.push(Se);continue}if(me&&(Se=this.tokenizer.def(re))){re=re.substring(Se.raw.length),this.tokens.links[Se.tag]||(this.tokens.links[Se.tag]={href:Se.href,title:Se.title});continue}if(Se=this.tokenizer.table(re)){re=re.substring(Se.raw.length),ce.push(Se);continue}if(Se=this.tokenizer.lheading(re)){re=re.substring(Se.raw.length),ce.push(Se);continue}if(me&&(Se=this.tokenizer.paragraph(re))){re=re.substring(Se.raw.length),ce.push(Se);continue}if(Se=this.tokenizer.text(re)){re=re.substring(Se.raw.length),Wt=ce[ce.length-1],Wt&&Wt.type==="text"?(Wt.raw+=`
|
|
`+Se.raw,Wt.text+=`
|
|
`+Se.text):ce.push(Se);continue}if(re){var Ut="Infinite loop on byte: "+re.charCodeAt(0);if(this.options.silent){console.error(Ut);break}else throw new Error(Ut)}}return ce},Pe.inline=function(re){var ce,me,Se,Qe,Tt,Wt,Ut=re.length;for(ce=0;ce<Ut;ce++)switch(Wt=re[ce],Wt.type){case"paragraph":case"text":case"heading":{Wt.tokens=[],this.inlineTokens(Wt.text,Wt.tokens);break}case"table":{for(Wt.tokens={header:[],cells:[]},Qe=Wt.header.length,me=0;me<Qe;me++)Wt.tokens.header[me]=[],this.inlineTokens(Wt.header[me],Wt.tokens.header[me]);for(Qe=Wt.cells.length,me=0;me<Qe;me++)for(Tt=Wt.cells[me],Wt.tokens.cells[me]=[],Se=0;Se<Tt.length;Se++)Wt.tokens.cells[me][Se]=[],this.inlineTokens(Tt[Se],Wt.tokens.cells[me][Se]);break}case"blockquote":{this.inline(Wt.tokens);break}case"list":{for(Qe=Wt.items.length,me=0;me<Qe;me++)this.inline(Wt.items[me].tokens);break}}return re},Pe.inlineTokens=function(re,ce,me,Se){ce===void 0&&(ce=[]),me===void 0&&(me=!1),Se===void 0&&(Se=!1);var Qe,Tt,Wt=re,Ut,vn,jn;if(this.tokens.links){var ur=Object.keys(this.tokens.links);if(ur.length>0)for(;(Ut=this.tokenizer.rules.inline.reflinkSearch.exec(Wt))!=null;)ur.includes(Ut[0].slice(Ut[0].lastIndexOf("[")+1,-1))&&(Wt=Wt.slice(0,Ut.index)+"["+Re("a",Ut[0].length-2)+"]"+Wt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ut=this.tokenizer.rules.inline.blockSkip.exec(Wt))!=null;)Wt=Wt.slice(0,Ut.index)+"["+Re("a",Ut[0].length-2)+"]"+Wt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Ut=this.tokenizer.rules.inline.escapedEmSt.exec(Wt))!=null;)Wt=Wt.slice(0,Ut.index)+"++"+Wt.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;re;){if(vn||(jn=""),vn=!1,Qe=this.tokenizer.escape(re)){re=re.substring(Qe.raw.length),ce.push(Qe);continue}if(Qe=this.tokenizer.tag(re,me,Se)){re=re.substring(Qe.raw.length),me=Qe.inLink,Se=Qe.inRawBlock;var gn=ce[ce.length-1];gn&&Qe.type==="text"&&gn.type==="text"?(gn.raw+=Qe.raw,gn.text+=Qe.text):ce.push(Qe);continue}if(Qe=this.tokenizer.link(re)){re=re.substring(Qe.raw.length),Qe.type==="link"&&(Qe.tokens=this.inlineTokens(Qe.text,[],!0,Se)),ce.push(Qe);continue}if(Qe=this.tokenizer.reflink(re,this.tokens.links)){re=re.substring(Qe.raw.length);var Jt=ce[ce.length-1];Qe.type==="link"?(Qe.tokens=this.inlineTokens(Qe.text,[],!0,Se),ce.push(Qe)):Jt&&Qe.type==="text"&&Jt.type==="text"?(Jt.raw+=Qe.raw,Jt.text+=Qe.text):ce.push(Qe);continue}if(Qe=this.tokenizer.emStrong(re,Wt,jn)){re=re.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],me,Se),ce.push(Qe);continue}if(Qe=this.tokenizer.codespan(re)){re=re.substring(Qe.raw.length),ce.push(Qe);continue}if(Qe=this.tokenizer.br(re)){re=re.substring(Qe.raw.length),ce.push(Qe);continue}if(Qe=this.tokenizer.del(re)){re=re.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],me,Se),ce.push(Qe);continue}if(Qe=this.tokenizer.autolink(re,v)){re=re.substring(Qe.raw.length),ce.push(Qe);continue}if(!me&&(Qe=this.tokenizer.url(re,v))){re=re.substring(Qe.raw.length),ce.push(Qe);continue}if(Qe=this.tokenizer.inlineText(re,Se,P)){re=re.substring(Qe.raw.length),Qe.raw.slice(-1)!=="_"&&(jn=Qe.raw.slice(-1)),vn=!0,Tt=ce[ce.length-1],Tt&&Tt.type==="text"?(Tt.raw+=Qe.raw,Tt.text+=Qe.text):ce.push(Qe);continue}if(re){var or="Infinite loop on byte: "+re.charCodeAt(0);if(this.options.silent){console.error(or);break}else throw new Error(or)}}return ce},Y($e,null,[{key:"rules",get:function(){return{block:ct,inline:tn}}}]),$e}(),X=be.exports.defaults,k=ie.cleanUrl,$=ie.escape,fe=function(){function $e(Fe){this.options=Fe||X}var Pe=$e.prototype;return Pe.code=function(re,ce,me){var Se=(ce||"").match(/\S*/)[0];if(this.options.highlight){var Qe=this.options.highlight(re,Se);Qe!=null&&Qe!==re&&(me=!0,re=Qe)}return re=re.replace(/\n$/,"")+`
|
|
`,Se?'<pre><code class="'+this.options.langPrefix+$(Se,!0)+'">'+(me?re:$(re,!0))+`</code></pre>
|
|
`:"<pre><code>"+(me?re:$(re,!0))+`</code></pre>
|
|
`},Pe.blockquote=function(re){return`<blockquote>
|
|
`+re+`</blockquote>
|
|
`},Pe.html=function(re){return re},Pe.heading=function(re,ce,me,Se){return this.options.headerIds?"<h"+ce+' id="'+this.options.headerPrefix+Se.slug(me)+'">'+re+"</h"+ce+`>
|
|
`:"<h"+ce+">"+re+"</h"+ce+`>
|
|
`},Pe.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Pe.list=function(re,ce,me){var Se=ce?"ol":"ul",Qe=ce&&me!==1?' start="'+me+'"':"";return"<"+Se+Qe+`>
|
|
`+re+"</"+Se+`>
|
|
`},Pe.listitem=function(re){return"<li>"+re+`</li>
|
|
`},Pe.checkbox=function(re){return"<input "+(re?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Pe.paragraph=function(re){return"<p>"+re+`</p>
|
|
`},Pe.table=function(re,ce){return ce&&(ce="<tbody>"+ce+"</tbody>"),`<table>
|
|
<thead>
|
|
`+re+`</thead>
|
|
`+ce+`</table>
|
|
`},Pe.tablerow=function(re){return`<tr>
|
|
`+re+`</tr>
|
|
`},Pe.tablecell=function(re,ce){var me=ce.header?"th":"td",Se=ce.align?"<"+me+' align="'+ce.align+'">':"<"+me+">";return Se+re+"</"+me+`>
|
|
`},Pe.strong=function(re){return"<strong>"+re+"</strong>"},Pe.em=function(re){return"<em>"+re+"</em>"},Pe.codespan=function(re){return"<code>"+re+"</code>"},Pe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Pe.del=function(re){return"<del>"+re+"</del>"},Pe.link=function(re,ce,me){if(re=k(this.options.sanitize,this.options.baseUrl,re),re===null)return me;var Se='<a href="'+$(re)+'"';return ce&&(Se+=' title="'+ce+'"'),Se+=">"+me+"</a>",Se},Pe.image=function(re,ce,me){if(re=k(this.options.sanitize,this.options.baseUrl,re),re===null)return me;var Se='<img src="'+re+'" alt="'+me+'"';return ce&&(Se+=' title="'+ce+'"'),Se+=this.options.xhtml?"/>":">",Se},Pe.text=function(re){return re},$e}(),Me=function(){function $e(){}var Pe=$e.prototype;return Pe.strong=function(re){return re},Pe.em=function(re){return re},Pe.codespan=function(re){return re},Pe.del=function(re){return re},Pe.html=function(re){return re},Pe.text=function(re){return re},Pe.link=function(re,ce,me){return""+me},Pe.image=function(re,ce,me){return""+me},Pe.br=function(){return""},$e}(),We=function(){function $e(){this.seen={}}var Pe=$e.prototype;return Pe.serialize=function(re){return re.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Pe.getNextSafeSlug=function(re,ce){var me=re,Se=0;if(this.seen.hasOwnProperty(me)){Se=this.seen[re];do Se++,me=re+"-"+Se;while(this.seen.hasOwnProperty(me))}return ce||(this.seen[re]=Se,this.seen[me]=0),me},Pe.slug=function(re,ce){ce===void 0&&(ce={});var me=this.serialize(re);return this.getNextSafeSlug(me,ce.dryrun)},$e}(),ot=fe,ft=Me,jt=We,_t=be.exports.defaults,Lt=ie.unescape,vt=function(){function $e(Fe){this.options=Fe||_t,this.options.renderer=this.options.renderer||new ot,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ft,this.slugger=new jt}$e.parse=function(re,ce){var me=new $e(ce);return me.parse(re)},$e.parseInline=function(re,ce){var me=new $e(ce);return me.parseInline(re)};var Pe=$e.prototype;return Pe.parse=function(re,ce){ce===void 0&&(ce=!0);var me="",Se,Qe,Tt,Wt,Ut,vn,jn,ur,gn,Jt,or,mr,Ge,lr,ir,rr,Jr,Sr,li=re.length;for(Se=0;Se<li;Se++)switch(Jt=re[Se],Jt.type){case"space":continue;case"hr":{me+=this.renderer.hr();continue}case"heading":{me+=this.renderer.heading(this.parseInline(Jt.tokens),Jt.depth,Lt(this.parseInline(Jt.tokens,this.textRenderer)),this.slugger);continue}case"code":{me+=this.renderer.code(Jt.text,Jt.lang,Jt.escaped);continue}case"table":{for(ur="",jn="",Wt=Jt.header.length,Qe=0;Qe<Wt;Qe++)jn+=this.renderer.tablecell(this.parseInline(Jt.tokens.header[Qe]),{header:!0,align:Jt.align[Qe]});for(ur+=this.renderer.tablerow(jn),gn="",Wt=Jt.cells.length,Qe=0;Qe<Wt;Qe++){for(vn=Jt.tokens.cells[Qe],jn="",Ut=vn.length,Tt=0;Tt<Ut;Tt++)jn+=this.renderer.tablecell(this.parseInline(vn[Tt]),{header:!1,align:Jt.align[Tt]});gn+=this.renderer.tablerow(jn)}me+=this.renderer.table(ur,gn);continue}case"blockquote":{gn=this.parse(Jt.tokens),me+=this.renderer.blockquote(gn);continue}case"list":{for(or=Jt.ordered,mr=Jt.start,Ge=Jt.loose,Wt=Jt.items.length,gn="",Qe=0;Qe<Wt;Qe++)ir=Jt.items[Qe],rr=ir.checked,Jr=ir.task,lr="",ir.task&&(Sr=this.renderer.checkbox(rr),Ge?ir.tokens.length>0&&ir.tokens[0].type==="text"?(ir.tokens[0].text=Sr+" "+ir.tokens[0].text,ir.tokens[0].tokens&&ir.tokens[0].tokens.length>0&&ir.tokens[0].tokens[0].type==="text"&&(ir.tokens[0].tokens[0].text=Sr+" "+ir.tokens[0].tokens[0].text)):ir.tokens.unshift({type:"text",text:Sr}):lr+=Sr),lr+=this.parse(ir.tokens,Ge),gn+=this.renderer.listitem(lr,Jr,rr);me+=this.renderer.list(gn,or,mr);continue}case"html":{me+=this.renderer.html(Jt.text);continue}case"paragraph":{me+=this.renderer.paragraph(this.parseInline(Jt.tokens));continue}case"text":{for(gn=Jt.tokens?this.parseInline(Jt.tokens):Jt.text;Se+1<li&&re[Se+1].type==="text";)Jt=re[++Se],gn+=`
|
|
`+(Jt.tokens?this.parseInline(Jt.tokens):Jt.text);me+=ce?this.renderer.paragraph(gn):gn;continue}default:{var Gr='Token with "'+Jt.type+'" type was not found.';if(this.options.silent){console.error(Gr);return}else throw new Error(Gr)}}return me},Pe.parseInline=function(re,ce){ce=ce||this.renderer;var me="",Se,Qe,Tt=re.length;for(Se=0;Se<Tt;Se++)switch(Qe=re[Se],Qe.type){case"escape":{me+=ce.text(Qe.text);break}case"html":{me+=ce.html(Qe.text);break}case"link":{me+=ce.link(Qe.href,Qe.title,this.parseInline(Qe.tokens,ce));break}case"image":{me+=ce.image(Qe.href,Qe.title,Qe.text);break}case"strong":{me+=ce.strong(this.parseInline(Qe.tokens,ce));break}case"em":{me+=ce.em(this.parseInline(Qe.tokens,ce));break}case"codespan":{me+=ce.codespan(Qe.text);break}case"br":{me+=ce.br();break}case"del":{me+=ce.del(this.parseInline(Qe.tokens,ce));break}case"text":{me+=ce.text(Qe.text);break}default:{var Wt='Token with "'+Qe.type+'" type was not found.';if(this.options.silent){console.error(Wt);return}else throw new Error(Wt)}}return me},$e}(),Ct=T,at=vt,pt=mt,It=fe,Ht=Me,fn=We,Yt=ie.merge,mn=ie.checkSanitizeDeprecation,ln=ie.escape,yn=be.exports.getDefaults,$n=be.exports.changeDefaults,dr=be.exports.defaults;function Xt($e,Pe,Fe){if(typeof $e=="undefined"||$e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof $e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call($e)+", string expected");if(typeof Pe=="function"&&(Fe=Pe,Pe=null),Pe=Yt({},Xt.defaults,Pe||{}),mn(Pe),Fe){var re=Pe.highlight,ce;try{ce=Ct.lex($e,Pe)}catch(Tt){return Fe(Tt)}var me=function(Wt){var Ut;if(!Wt)try{Pe.walkTokens&&Xt.walkTokens(ce,Pe.walkTokens),Ut=at.parse(ce,Pe)}catch(vn){Wt=vn}return Pe.highlight=re,Wt?Fe(Wt):Fe(null,Ut)};if(!re||re.length<3||(delete Pe.highlight,!ce.length))return me();var Se=0;Xt.walkTokens(ce,function(Tt){Tt.type==="code"&&(Se++,setTimeout(function(){re(Tt.text,Tt.lang,function(Wt,Ut){if(Wt)return me(Wt);Ut!=null&&Ut!==Tt.text&&(Tt.text=Ut,Tt.escaped=!0),Se--,Se===0&&me()})},0))}),Se===0&&me();return}try{var Qe=Ct.lex($e,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>"+ln(Tt.message+"",!0)+"</pre>";throw Tt}}Xt.options=Xt.setOptions=function($e){return Yt(Xt.defaults,$e),$n(Xt.defaults),Xt},Xt.getDefaults=yn,Xt.defaults=dr,Xt.use=function($e){var Pe=Yt({},$e);if($e.renderer&&function(){var re=Xt.defaults.renderer||new It,ce=function(Qe){var Tt=re[Qe];re[Qe]=function(){for(var Wt=arguments.length,Ut=new Array(Wt),vn=0;vn<Wt;vn++)Ut[vn]=arguments[vn];var jn=$e.renderer[Qe].apply(re,Ut);return jn===!1&&(jn=Tt.apply(re,Ut)),jn}};for(var me in $e.renderer)ce(me);Pe.renderer=re}(),$e.tokenizer&&function(){var re=Xt.defaults.tokenizer||new pt,ce=function(Qe){var Tt=re[Qe];re[Qe]=function(){for(var Wt=arguments.length,Ut=new Array(Wt),vn=0;vn<Wt;vn++)Ut[vn]=arguments[vn];var jn=$e.tokenizer[Qe].apply(re,Ut);return jn===!1&&(jn=Tt.apply(re,Ut)),jn}};for(var me in $e.tokenizer)ce(me);Pe.tokenizer=re}(),$e.walkTokens){var Fe=Xt.defaults.walkTokens;Pe.walkTokens=function(re){$e.walkTokens(re),Fe&&Fe(re)}}Xt.setOptions(Pe)},Xt.walkTokens=function($e,Pe){for(var Fe=He($e),re;!(re=Fe()).done;){var ce=re.value;switch(Pe(ce),ce.type){case"table":{for(var me=He(ce.tokens.header),Se;!(Se=me()).done;){var Qe=Se.value;Xt.walkTokens(Qe,Pe)}for(var Tt=He(ce.tokens.cells),Wt;!(Wt=Tt()).done;)for(var Ut=Wt.value,vn=He(Ut),jn;!(jn=vn()).done;){var ur=jn.value;Xt.walkTokens(ur,Pe)}break}case"list":{Xt.walkTokens(ce.items,Pe);break}default:ce.tokens&&Xt.walkTokens(ce.tokens,Pe)}}},Xt.parseInline=function($e,Pe){if(typeof $e=="undefined"||$e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof $e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call($e)+", string expected");Pe=Yt({},Xt.defaults,Pe||{}),mn(Pe);try{var Fe=Ct.lexInline($e,Pe);return Pe.walkTokens&&Xt.walkTokens(Fe,Pe.walkTokens),at.parseInline(Fe,Pe)}catch(re){if(re.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Pe.silent)return"<p>An error occurred:</p><pre>"+ln(re.message+"",!0)+"</pre>";throw re}},Xt.Parser=at,Xt.parser=at.parse,Xt.Renderer=It,Xt.TextRenderer=Ht,Xt.Lexer=Ct,Xt.lexer=Ct.lex,Xt.Tokenizer=pt,Xt.Slugger=fn,Xt.parse=Xt;var En=Xt;return En})},11690:function(Un){const Ft=/[&<>"']/,Y=/[&<>"']/g,te=/[<>"']|&(?!#?\w+;)/,Te=/[<>"']|&(?!#?\w+;)/g,He={"&":"&","<":"<",">":">",'"':""","'":"'"},be=pe=>He[pe];function ee(pe,Ue){if(Ue){if(Ft.test(pe))return pe.replace(Y,be)}else if(te.test(pe))return pe.replace(Te,be);return pe}const y=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Ce(pe){return pe.replace(y,(Ue,Xe)=>(Xe=Xe.toLowerCase(),Xe==="colon"?":":Xe.charAt(0)==="#"?Xe.charAt(1)==="x"?String.fromCharCode(parseInt(Xe.substring(2),16)):String.fromCharCode(+Xe.substring(1)):""))}const V=/(^|[^\[])\^/g;function o(pe,Ue){pe=pe.source||pe,Ue=Ue||"";const Xe={replace:(Ee,et)=>(et=et.source||et,et=et.replace(V,"$1"),pe=pe.replace(Ee,et),Xe),getRegex:()=>new RegExp(pe,Ue)};return Xe}const le=/[^\w:]/g,O=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function B(pe,Ue,Xe){if(pe){let Ee;try{Ee=decodeURIComponent(Ce(Xe)).replace(le,"").toLowerCase()}catch(et){return null}if(Ee.indexOf("javascript:")===0||Ee.indexOf("vbscript:")===0||Ee.indexOf("data:")===0)return null}Ue&&!O.test(Xe)&&(Xe=Z(Ue,Xe));try{Xe=encodeURI(Xe).replace(/%25/g,"%")}catch(Ee){return null}return Xe}const E={},F=/^[^:]+:\/*[^/]*$/,L=/^([^:]+:)[\s\S]*$/,ae=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Z(pe,Ue){E[" "+pe]||(F.test(pe)?E[" "+pe]=pe+"/":E[" "+pe]=oe(pe,"/",!0)),pe=E[" "+pe];const Xe=pe.indexOf(":")===-1;return Ue.substring(0,2)==="//"?Xe?Ue:pe.replace(L,"$1")+Ue:Ue.charAt(0)==="/"?Xe?Ue:pe.replace(ae,"$1")+Ue:pe+Ue}const J={exec:function(){}};function K(pe){let Ue=1,Xe,Ee;for(;Ue<arguments.length;Ue++){Xe=arguments[Ue];for(Ee in Xe)Object.prototype.hasOwnProperty.call(Xe,Ee)&&(pe[Ee]=Xe[Ee])}return pe}function z(pe,Ue){const Xe=pe.replace(/\|/g,(ne,Q,q)=>{let ie=!1,ge=Q;for(;--ge>=0&&q[ge]==="\\";)ie=!ie;return ie?"|":" |"}),Ee=Xe.split(/ \|/);let et=0;if(Ee.length>Ue)Ee.splice(Ue);else for(;Ee.length<Ue;)Ee.push("");for(;et<Ee.length;et++)Ee[et]=Ee[et].trim().replace(/\\\|/g,"|");return Ee}function oe(pe,Ue,Xe){const Ee=pe.length;if(Ee===0)return"";let et=0;for(;et<Ee;){const ne=pe.charAt(Ee-et-1);if(ne===Ue&&!Xe)et++;else if(ne!==Ue&&Xe)et++;else break}return pe.substr(0,Ee-et)}function Be(pe,Ue){if(pe.indexOf(Ue[1])===-1)return-1;const Xe=pe.length;let Ee=0,et=0;for(;et<Xe;et++)if(pe[et]==="\\")et++;else if(pe[et]===Ue[0])Ee++;else if(pe[et]===Ue[1]&&(Ee--,Ee<0))return et;return-1}function De(pe){pe&&pe.sanitize&&!pe.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(pe,Ue){if(Ue<1)return"";let Xe="";for(;Ue>1;)Ue&1&&(Xe+=pe),Ue>>=1,pe+=pe;return Xe+pe}Un.exports={escape:ee,unescape:Ce,edit:o,cleanUrl:B,resolveUrl:Z,noopTest:J,merge:K,splitCells:z,rtrim:oe,findClosingBracket:Be,checkSanitizeDeprecation:De,repeatString:ke}},75918:function(Un,Ft,Y){"use strict";Y.d(Ft,{Wi:function(){return y},Z0:function(){return Ce},aU:function(){return ee},eZ:function(){return o},wY:function(){return V}});var te=Y(4348),Te=Y(69323),He=Y(13268),be=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{K(E.next(z))}catch(oe){ae(oe)}}function J(z){try{K(E.throw(z))}catch(oe){ae(oe)}}function K(z){z.done?L(z.value):F(z.value).then(Z,J)}K((E=E.apply(le,O||[])).next())})};class ee extends Te.JT{constructor(O,B="",E="",F=!0,L){super(),this._onDidChange=this._register(new te.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 be(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 te.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new te.Q5),this.onDidRun=this._onDidRun.event}run(O,B){return be(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 be(this,void 0,void 0,function*(){yield O.run(B)})}}class Ce extends ee{constructor(O){super(Ce.ID,O,O?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Ce.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 be(this,void 0,void 0,function*(){})}}class o extends ee{constructor(){super(o.ID,He.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(Un,Ft,Y){"use strict";Y.d(Ft,{ok:function(){return te}});function te(Te,He){if(!Te)throw new Error(He?`Assertion failed (${He})`:"Assertion Failed")}},52615:function(Un,Ft,Y){"use strict";Y.d(Ft,{CM:function(){return ee},JL:function(){return y},dT:function(){return V},fK:function(){return be},lA:function(){return Ce}});var te=Y(4348);class Te{constructor(){this._icons=new Map,this._onDidRegister=new te.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,be=He;function ee(o,le){return new Ce(o,le)}function y(o){return o?o.replace(/\$\((.*?)\)/g,(le,O)=>` ${O} `).trim():""}class Ce{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 Ce)return["codicon","codicon-"+F.id];const L=le.exec(F.id);if(!L)return O(Ce.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"})}(Ce||(Ce={}))},79881:function(Un,Ft,Y){"use strict";Y.d(Ft,{B8:function(){return O},Cp:function(){return be},F0:function(){return V},L6:function(){return le},VV:function(){return Ce},b1:function(){return o},dL:function(){return He},ri:function(){return ee}});class te{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 te;function He(B){Ce(B)||Te.onUnexpectedError(B)}function be(B){Ce(B)||Te.onUnexpectedExternalError(B)}function ee(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 Ce(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(Un,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 ee}});var te=Y(79881),Te=Y(69323),He=Y(34502),be=Y(95830),ee;(function(F){F.None=()=>Te.JT.None;function L(q){return(ie,ge=null,he)=>{let b=!1,S;return S=q(W=>{if(!b)return S?S.dispose():b=!0,ie.call(ge,W)},null,he),b&&S.dispose(),S}}F.once=L;function ae(q,ie){return Be((ge,he=null,b)=>q(S=>ge.call(he,ie(S)),null,b))}F.map=ae;function Z(q,ie){return Be((ge,he=null,b)=>q(S=>{ie(S),ge.call(he,S)},null,b))}F.forEach=Z;function J(q,ie){return Be((ge,he=null,b)=>q(S=>ie(S)&&ge.call(he,S),null,b))}F.filter=J;function K(q){return q}F.signal=K;function z(...q){return(ie,ge=null,he)=>(0,Te.F8)(...q.map(b=>b(S=>ie.call(ge,S),null,he)))}F.any=z;function oe(q,ie,ge){let he=ge;return ae(q,b=>(he=ie(he,b),he))}F.reduce=oe;function Be(q){let ie;const ge=new o({onFirstListenerAdd(){ie=q(ge.fire,ge)},onLastListenerRemove(){ie.dispose()}});return ge.event}function De(q,ie,ge=100,he=!1,b){let S,W,_e,Je=0;const mt=new o({leakWarningThreshold:b,onFirstListenerAdd(){S=q(Gt=>{Je++,W=ie(W,Gt),he&&!_e&&(mt.fire(W),W=void 0),clearTimeout(_e),_e=setTimeout(()=>{const Qt=W;W=void 0,_e=void 0,(!he||Je>1)&&mt.fire(Qt),Je=0},ge)})},onLastListenerRemove(){S.dispose()}});return mt.event}F.debounce=De;function ke(q,ie=(ge,he)=>ge===he){let ge=!0,he;return J(q,b=>{const S=ge||!ie(b,he);return ge=!1,he=b,S})}F.latch=ke;function pe(q,ie){return[F.filter(q,ie),F.filter(q,ge=>!ie(ge))]}F.split=pe;function Ue(q,ie=!1,ge=[]){let he=ge.slice(),b=q(_e=>{he?he.push(_e):W.fire(_e)});const S=()=>{he&&he.forEach(_e=>W.fire(_e)),he=null},W=new o({onFirstListenerAdd(){b||(b=q(_e=>W.fire(_e)))},onFirstListenerDidAdd(){he&&(ie?setTimeout(S):S())},onLastListenerRemove(){b&&b.dispose(),b=null}});return W.event}F.buffer=Ue;class Xe{constructor(ie){this.event=ie}map(ie){return new Xe(ae(this.event,ie))}forEach(ie){return new Xe(Z(this.event,ie))}filter(ie){return new Xe(J(this.event,ie))}reduce(ie,ge){return new Xe(oe(this.event,ie,ge))}latch(){return new Xe(ke(this.event))}debounce(ie,ge=100,he=!1,b){return new Xe(De(this.event,ie,ge,he,b))}on(ie,ge,he){return this.event(ie,ge,he)}once(ie,ge,he){return L(this.event)(ie,ge,he)}}function Ee(q){return new Xe(q)}F.chain=Ee;function et(q,ie,ge=he=>he){const he=(..._e)=>W.fire(ge(..._e)),b=()=>q.on(ie,he),S=()=>q.removeListener(ie,he),W=new o({onFirstListenerAdd:b,onLastListenerRemove:S});return W.event}F.fromNodeEventEmitter=et;function ne(q,ie,ge=he=>he){const he=(..._e)=>W.fire(ge(..._e)),b=()=>q.addEventListener(ie,he),S=()=>q.removeEventListener(ie,he),W=new o({onFirstListenerAdd:b,onLastListenerRemove:S});return W.event}F.fromDOMEventEmitter=ne;function Q(q){return new Promise(ie=>L(q)(ie))}F.toPromise=Q})(ee||(ee={}));class y{constructor(L){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${L}_${y._idPool++}`}start(L){this._stopWatch=new be.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 Ce=-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=Ce;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 K,z=0;for(const[oe,Be]of this._stacks)(!K||z<Be)&&(K=oe,z=Be);console.warn(`[${this.name}] potential listener LEAK detected, having ${L} listeners already. MOST frequent listener (${z}):`),console.warn(K)}return()=>{const K=this._stacks.get(Z)||0;this._stacks.set(Z,K-1)}}}class o{constructor(L){var ae;this._disposed=!1,this._options=L,this._leakageMon=Ce>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 K=this._listeners.isEmpty();K&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const z=this._listeners.push(ae?[L,ae]:L);K&&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,K]=this._deliveryQueue.shift();try{typeof J=="function"?J.call(void 0,K):J[0].call(J[1],K)}catch(z){(0,te.dL)(z)}}(Z=this._perfMon)===null||Z===void 0||Z.stop()}}dispose(){var L,ae,Z,J,K;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),(K=this._leakageMon)===null||K===void 0||K.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(K=>{const z=this.buffers[this.buffers.length-1];z?z.push(()=>ae.call(Z,K)):ae.call(Z,K)},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=ee.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(Un,Ft,Y){"use strict";Y.d(Ft,{I:function(){return te}});function te(Te){const He=this;let be=!1,ee;return function(){return be||(be=!0,ee=Te.apply(He,arguments)),ee}}},88226:function(Un,Ft,Y){"use strict";Y.d(Ft,{$:function(){return te}});var te;(function(Te){function He(z){return z&&typeof z=="object"&&typeof z[Symbol.iterator]=="function"}Te.is=He;const be=Object.freeze([]);function ee(){return be}Te.empty=ee;function*y(z){yield z}Te.single=y;function Ce(z){return z||be}Te.from=Ce;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 pe=De.next();if(pe.done)return[Be,Te.empty()];Be.push(pe.value)}return[Be,{[Symbol.iterator](){return De}}]}Te.consume=J;function K(z,oe,Be=(De,ke)=>De===ke){const De=z[Symbol.iterator](),ke=oe[Symbol.iterator]();for(;;){const pe=De.next(),Ue=ke.next();if(pe.done!==Ue.done)return!1;if(pe.done)return!0;if(!Be(pe.value,Ue.value))return!1}}Te.equals=K})(te||(te={}))},69323:function(Un,Ft,Y){"use strict";Y.d(Ft,{B9:function(){return E},F8:function(){return F},JT:function(){return Z},Jz:function(){return K},OF:function(){return L},SL:function(){return ae},Wf:function(){return B},XK:function(){return J},dk:function(){return le}});var te=Y(17845),Te=Y(88226);const He=!1;let be=null;function ee(z){be=z}if(He){const z="__is_disposable_tracked__";ee(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 be==null||be.trackDisposable(z),z}function Ce(z){be==null||be.markAsDisposed(z)}function V(z,oe){be==null||be.setParent(z,oe)}function o(z,oe){if(be)for(const Be of z)be.setParent(Be,oe)}function le(z){return be==null||be.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,te.I)(()=>{Ce(oe),z()})});return oe}class ae{constructor(){this._toDispose=new Set,this._isDisposed=!1,y(this)}dispose(){this._isDisposed||(Ce(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(){Ce(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,Ce(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 K{constructor(oe){this.object=oe}dispose(){}}},34502:function(Un,Ft,Y){"use strict";Y.d(Ft,{S:function(){return Te}});class te{constructor(be){this.element=be,this.next=te.Undefined,this.prev=te.Undefined}}te.Undefined=new te(void 0);class Te{constructor(){this._first=te.Undefined,this._last=te.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===te.Undefined}clear(){let be=this._first;for(;be!==te.Undefined;){const ee=be.next;be.prev=te.Undefined,be.next=te.Undefined,be=ee}this._first=te.Undefined,this._last=te.Undefined,this._size=0}unshift(be){return this._insert(be,!1)}push(be){return this._insert(be,!0)}_insert(be,ee){const y=new te(be);if(this._first===te.Undefined)this._first=y,this._last=y;else if(ee){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 Ce=!1;return()=>{Ce||(Ce=!0,this._remove(y))}}shift(){if(this._first!==te.Undefined){const be=this._first.element;return this._remove(this._first),be}}pop(){if(this._last!==te.Undefined){const be=this._last.element;return this._remove(this._last),be}}_remove(be){if(be.prev!==te.Undefined&&be.next!==te.Undefined){const ee=be.prev;ee.next=be.next,be.next.prev=ee}else be.prev===te.Undefined&&be.next===te.Undefined?(this._first=te.Undefined,this._last=te.Undefined):be.next===te.Undefined?(this._last=this._last.prev,this._last.next=te.Undefined):be.prev===te.Undefined&&(this._first=this._first.next,this._first.prev=te.Undefined);this._size-=1}*[Symbol.iterator](){let be=this._first;for(;be!==te.Undefined;)yield be.element,be=be.next}}},23345:function(Un,Ft,Y){"use strict";Y.d(Ft,{$L:function(){return De},ED:function(){return K},IJ:function(){return oe},OS:function(){return Xe},WE:function(){return pe},dz:function(){return z},gn:function(){return ke},li:function(){return L},r:function(){return ne},tY:function(){return Be},xS:function(){return Ue}});var te=Y(97671),Te;const He="en";let be=!1,ee=!1,y=!1,Ce=!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 te!="undefined"&&(ae=te);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,be=F.indexOf("Windows")>=0,ee=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"){be=ae.platform==="win32",ee=ae.platform==="darwin",y=ae.platform==="linux",Ce=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),ie=q.availableLanguages["*"];O=q.locale,B=ie||He,E=q._translationsConfigFile}catch(q){}V=!0}else console.error("Unable to resolve platform.");let J=0;ee?J=1:be?J=3:y&&(J=2);const K=be,z=ee,oe=y,Be=V,De=o,ke=le,pe=F,Ue=function(){if(L.setImmediate)return L.setImmediate.bind(L);if(typeof L.postMessage=="function"&&!L.importScripts){let ie=[];L.addEventListener("message",he=>{if(he.data&&he.data.vscodeSetImmediateId)for(let b=0,S=ie.length;b<S;b++){const W=ie[b];if(W.id===he.data.vscodeSetImmediateId){ie.splice(b,1),W.callback();return}}});let ge=0;return he=>{const b=++ge;ie.push({id:b,callback:he}),L.postMessage({vscodeSetImmediateId:b},"*")}}if(typeof(ae==null?void 0:ae.nextTick)=="function")return ae.nextTick.bind(ae);const q=Promise.resolve();return ie=>q.then(ie)}(),Xe=ee||le?2:be?1:3;let Ee=!0,et=!1;function ne(){if(!et){et=!0;const Q=new Uint8Array(2);Q[0]=1,Q[1]=2,Ee=new Uint16Array(Q.buffer)[0]===513}return Ee}},95830:function(Un,Ft,Y){"use strict";Y.d(Ft,{G:function(){return He}});var te=Y(23345);const Te=te.li.performance&&typeof te.li.performance.now=="function";class He{constructor(ee){this._highResolution=Te&&ee,this._startTime=this._now(),this._stopTime=-1}static create(ee=!0){return new He(ee)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?te.li.performance.now():Date.now()}}},82983:function(Un,Ft,Y){"use strict";Y.d(Ft,{$i:function(){return Je},C8:function(){return Zt},GF:function(){return O},HO:function(){return ge},IO:function(){return B},K7:function(){return on},Kw:function(){return ht},LC:function(){return L},Mh:function(){return Ue},P1:function(){return Xe},PJ:function(){return At},Qe:function(){return mt},R1:function(){return le},RP:function(){return W},S6:function(){return ct},TT:function(){return K},Ut:function(){return b},V8:function(){return ae},WU:function(){return He},YK:function(){return et},YU:function(){return be},ZG:function(){return Ee},ZH:function(){return Q},ab:function(){return Gt},c1:function(){return Rt},df:function(){return De},ec:function(){return ee},fi:function(){return tn},fy:function(){return y},j3:function(){return Ce},j_:function(){return oe},m5:function(){return te},mK:function(){return Be},mr:function(){return E},oH:function(){return v},oL:function(){return V},ok:function(){return pe},ow:function(){return Z},qq:function(){return ke},qu:function(){return J},rL:function(){return ne},uS:function(){return je},un:function(){return o},uq:function(){return F},vH:function(){return ie},xe:function(){return Qt},zY:function(){return z}});function te($){return!$||typeof $!="string"?!0:$.trim().length===0}const Te=/{(\d+)}/g;function He($,...fe){return fe.length===0?$:$.replace(Te,function(Me,We){const ot=parseInt(We,10);return isNaN(ot)||ot<0||ot>=fe.length?Me:fe[ot]})}function be($){return $.replace(/[<>&]/g,function(fe){switch(fe){case"<":return"<";case">":return">";case"&":return"&";default:return fe}})}function ee($){return $.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function y($,fe=" "){const Me=Ce($,fe);return V(Me,fe)}function Ce($,fe){if(!$||!fe)return $;const Me=fe.length;if(Me===0||$.length===0)return $;let We=0;for(;$.indexOf(fe,We)===We;)We=We+Me;return $.substring(We)}function V($,fe){if(!$||!fe)return $;const Me=fe.length,We=$.length;if(Me===0||We===0)return $;let ot=We,ft=-1;for(;ft=$.lastIndexOf(fe,ot-1),!(ft===-1||ft+Me!==ot);){if(ft===0)return"";ot=ft}return $.substring(0,ot)}function o($){return $.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function le($){return $.replace(/\*/g,"")}function O($,fe,Me={}){if(!$)throw new Error("Cannot create regex from empty string");fe||($=ee($)),Me.wholeWord&&(/\B/.test($.charAt(0))||($="\\b"+$),/\B/.test($.charAt($.length-1))||($=$+"\\b"));let We="";return Me.global&&(We+="g"),Me.matchCase||(We+="i"),Me.multiline&&(We+="m"),Me.unicode&&(We+="u"),new RegExp($,We)}function B($){return $.source==="^"||$.source==="^$"||$.source==="$"||$.source==="^\\s*$"?!1:!!($.exec("")&&$.lastIndex===0)}function E($){return($.global?"g":"")+($.ignoreCase?"i":"")+($.multiline?"m":"")+($.unicode?"u":"")}function F($){return $.split(/\r\n|\r|\n/)}function L($){for(let fe=0,Me=$.length;fe<Me;fe++){const We=$.charCodeAt(fe);if(We!==32&&We!==9)return fe}return-1}function ae($,fe=0,Me=$.length){for(let We=fe;We<Me;We++){const ot=$.charCodeAt(We);if(ot!==32&&ot!==9)return $.substring(fe,We)}return $.substring(fe,Me)}function Z($,fe=$.length-1){for(let Me=fe;Me>=0;Me--){const We=$.charCodeAt(Me);if(We!==32&&We!==9)return Me}return-1}function J($,fe){return $<fe?-1:$>fe?1:0}function K($,fe,Me=0,We=$.length,ot=0,ft=fe.length){for(;Me<We&&ot<ft;Me++,ot++){let Lt=$.charCodeAt(Me),vt=fe.charCodeAt(ot);if(Lt<vt)return-1;if(Lt>vt)return 1}const jt=We-Me,_t=ft-ot;return jt<_t?-1:jt>_t?1:0}function z($,fe){return oe($,fe,0,$.length,0,fe.length)}function oe($,fe,Me=0,We=$.length,ot=0,ft=fe.length){for(;Me<We&&ot<ft;Me++,ot++){let Lt=$.charCodeAt(Me),vt=fe.charCodeAt(ot);if(Lt===vt)continue;if(Lt>=128||vt>=128)return K($.toLowerCase(),fe.toLowerCase(),Me,We,ot,ft);Be(Lt)&&(Lt-=32),Be(vt)&&(vt-=32);const Ct=Lt-vt;if(Ct!==0)return Ct}const jt=We-Me,_t=ft-ot;return jt<_t?-1:jt>_t?1:0}function Be($){return $>=97&&$<=122}function De($){return $>=65&&$<=90}function ke($,fe){return $.length===fe.length&&oe($,fe)===0}function pe($,fe){const Me=fe.length;return fe.length>$.length?!1:oe($,fe,0,Me)===0}function Ue($,fe){let Me,We=Math.min($.length,fe.length);for(Me=0;Me<We;Me++)if($.charCodeAt(Me)!==fe.charCodeAt(Me))return Me;return We}function Xe($,fe){let Me,We=Math.min($.length,fe.length);const ot=$.length-1,ft=fe.length-1;for(Me=0;Me<We;Me++)if($.charCodeAt(ot-Me)!==fe.charCodeAt(ft-Me))return Me;return We}function Ee($){return 55296<=$&&$<=56319}function et($){return 56320<=$&&$<=57343}function ne($,fe){return($-55296<<10)+(fe-56320)+65536}function Q($,fe,Me){const We=$.charCodeAt(Me);if(Ee(We)&&Me+1<fe){const ot=$.charCodeAt(Me+1);if(et(ot))return ne(We,ot)}return We}function q($,fe){const Me=$.charCodeAt(fe-1);if(et(Me)&&fe>1){const We=$.charCodeAt(fe-2);if(Ee(We))return ne(We,Me)}return Me}function ie($,fe){const Me=Re.getInstance(),We=fe,ot=$.length,ft=Q($,ot,fe);fe+=ft>=65536?2:1;let jt=Me.getGraphemeBreakType(ft);for(;fe<ot;){const _t=Q($,ot,fe),Lt=Me.getGraphemeBreakType(_t);if(tn(jt,Lt))break;fe+=_t>=65536?2:1,jt=Lt}return fe-We}function ge($,fe){const Me=Re.getInstance(),We=fe,ot=q($,fe);fe-=ot>=65536?2:1;let ft=Me.getGraphemeBreakType(ot);for(;fe>0;){const jt=q($,fe),_t=Me.getGraphemeBreakType(jt);if(tn(_t,ft))break;fe-=jt>=65536?2:1,ft=_t}return We-fe}const he=/(?:[\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($){return he.test($)}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($){return S.test($)}const _e=/^[\t\n\r\x20-\x7E]*$/;function Je($){return _e.test($)}const mt=/[\u2028\u2029]/;function Gt($){return mt.test($)}function Qt($){for(let fe=0,Me=$.length;fe<Me;fe++)if(on($.charCodeAt(fe)))return!0;return!1}function on($){return $=+$,$>=11904&&$<=55215||$>=63744&&$<=64255||$>=65281&&$<=65374}function Zt($){return $>=127462&&$<=127487||$===8986||$===8987||$===9200||$===9203||$>=9728&&$<=10175||$===11088||$===11093||$>=127744&&$<=128591||$>=128640&&$<=128764||$>=128992&&$<=129003||$>=129280&&$<=129535||$>=129648&&$<=129750}const Rt="\uFEFF";function je($){return!!($&&$.length>0&&$.charCodeAt(0)===65279)}function ht($,fe=!1){return $?(fe&&($=$.replace(/\\./g,"")),$.toLowerCase()!==$):!1}function At($){return $=$%(2*26),$<26?String.fromCharCode(97+$):String.fromCharCode(65+$-26)}function ct($){return Re.getInstance().getGraphemeBreakType($)}function tn($,fe){return $===0?fe!==5&&fe!==7:$===2&&fe===3?!1:$===4||$===2||$===3||fe===4||fe===2||fe===3?!0:!($===8&&(fe===8||fe===9||fe===11||fe===12)||($===11||$===9)&&(fe===9||fe===10)||($===12||$===10)&&fe===10||fe===5||fe===13||fe===7||$===1||$===13&&fe===14||$===6&&fe===6)}class Re{constructor(){this._data=P()}static getInstance(){return Re._INSTANCE||(Re._INSTANCE=new Re),Re._INSTANCE}getGraphemeBreakType(fe){if(fe<32)return fe===10?3:fe===13?2:4;if(fe<127)return 0;const Me=this._data,We=Me.length/3;let ot=1;for(;ot<=We;)if(fe<Me[3*ot])ot=2*ot;else if(fe>Me[3*ot+1])ot=2*ot+1;else return Me[3*ot+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($,fe){if($===0)return 0;const Me=T($,fe);if(Me!==void 0)return Me;const We=q(fe,$);return $-=X(We),$}function T($,fe){let Me=q(fe,$);for($-=X(Me);k(Me)||Me===65039||Me===8419;){if($===0)return;Me=q(fe,$),$-=X(Me)}if(Zt(Me)){if($>=0){const We=q(fe,$);We===8205&&($-=X(We))}return $}}function X($){return $>=65536?2:1}function k($){return 127995<=$&&$<=127999}},72999:function(Un,Ft,Y){"use strict";Y.d(Ft,{$E:function(){return L},$K:function(){return Ce},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 be},jn:function(){return ee},kJ:function(){return te},mf:function(){return O},o8:function(){return y},p_:function(){return o},vE:function(){return J}});function te(K){return Array.isArray(K)}function Te(K){return typeof K=="string"}function He(K){return typeof K=="object"&&K!==null&&!Array.isArray(K)&&!(K instanceof RegExp)&&!(K instanceof Date)}function be(K){return typeof K=="number"&&!isNaN(K)}function ee(K){return K===!0||K===!1}function y(K){return typeof K=="undefined"}function Ce(K){return!V(K)}function V(K){return y(K)||K===null}function o(K,z){if(!K)throw new Error(z?`Unexpected type, expected '${z}'`:"Unexpected type")}function le(K){if(V(K))throw new Error("Assertion Failed: argument is undefined or null");return K}function O(K){return typeof K=="function"}function B(K,z){const oe=Math.min(K.length,z.length);for(let Be=0;Be<oe;Be++)E(K[Be],z[Be])}function E(K,z){if(Te(z)){if(typeof K!==z)throw new Error(`argument does not match constraint: typeof ${z}`)}else if(O(z)){try{if(K instanceof z)return}catch(oe){}if(!V(K)&&K.constructor===z||z.length===1&&z.call(void 0,K)===!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(K){let z=[],oe=Object.getPrototypeOf(K);for(;Object.prototype!==oe;)z=z.concat(Object.getOwnPropertyNames(oe)),oe=Object.getPrototypeOf(oe);return z}function L(K){const z=[];for(const oe of F(K))typeof K[oe]=="function"&&z.push(oe);return z}function ae(K,z){const oe=De=>function(){const ke=Array.prototype.slice.call(arguments,0);return z(De,ke)};let Be={};for(const De of K)Be[De]=oe(De);return Be}function Z(K){return K===null?void 0:K}function J(K,z="Unreachable"){throw new Error(z)}},13268:function(Un,Ft,Y){"use strict";Y.d(Ft,{N:function(){return Te}});function te(He,be){let ee;return be.length===0?ee=He:ee=He.replace(/\{(\d+)\}/g,function(y,Ce){const V=Ce[0];return typeof be[V]!="undefined"?be[V]:y}),ee}function Te(He,be,...ee){return te(be,ee)}},96236:function(Un,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 te=Y(75918),Te=Y(52615),He=Y(4348),be=Y(88226),ee=Y(69323),y=Y(34502),Ce=Y(35884),V=Y(90689),o=Y(16925),le=Y(49055),O=function(K,z,oe,Be){var De=arguments.length,ke=De<3?z:Be===null?Be=Object.getOwnPropertyDescriptor(z,oe):Be,pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(K,z,oe,Be);else for(var Ue=K.length-1;Ue>=0;Ue--)(pe=K[Ue])&&(ke=(De<3?pe(ke):De>3?pe(z,oe,ke):pe(z,oe))||ke);return De>3&&ke&&Object.defineProperty(z,oe,ke),ke},B=function(K,z){return function(oe,Be){z(oe,Be,K)}};function E(K){return K.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:K=>K===F.CommandPalette}}addCommand(K){return this.addCommands(be.$.single(K))}addCommands(K){for(const z of K)this._commands.set(z.id,z);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,ee.OF)(()=>{let z=!1;for(const oe of K)z=this._commands.delete(oe.id)||z;z&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(K){return this._commands.get(K)}getCommands(){const K=new Map;return this._commands.forEach((z,oe)=>K.set(oe,z)),K}appendMenuItem(K,z){return this.appendMenuItems(be.$.single({id:K,item:z}))}appendMenuItems(K){const z=new Set,oe=new y.S;for(const{id:Be,item:De}of K){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,ee.OF)(()=>{if(oe.size>0){for(let Be of oe)Be();this._onDidChangeMenu.fire(z),oe.clear()}})}getMenuItems(K){let z;return this._menuItems.has(K)?z=[...this._menuItems.get(K)]:z=[],K===F.CommandPalette&&this._appendImplicitItems(z),z}_appendImplicitItems(K){const z=new Set;for(const oe of K)E(oe)&&(z.add(oe.command.id),oe.alt&&z.add(oe.alt.id));this._commands.forEach((oe,Be)=>{z.has(Be)||K.push({command:oe})})}};class Z extends te.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 te.Z0));return z.length&&z.pop(),z}}let J=class Oc{constructor(z,oe,Be,De,ke){var pe,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:(pe=z.tooltip)===null||pe===void 0?void 0:pe.value)!==null&&Ue!==void 0?Ue:"",this.enabled=!z.precondition||De.contextMatchesRules(z.precondition),this.checked=void 0,z.toggled){const Xe=z.toggled.condition?z.toggled:{condition:z.toggled};this.checked=De.contextMatchesRules(Xe.condition),this.checked&&Xe.tooltip&&(this.tooltip=typeof Xe.tooltip=="string"?Xe.tooltip:Xe.tooltip.value),Xe.title&&(this.label=typeof Xe.title=="string"?Xe.title:Xe.title.value)}this.item=z,this.alt=oe?new Oc(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,Ce.H)],J)},35884:function(Un,Ft,Y){"use strict";Y.d(Ft,{H:function(){return Ce},P:function(){return V}});var te=Y(4348),Te=Y(88226),He=Y(69323),be=Y(34502),ee=Y(72999),y=Y(16925);const Ce=(0,y.yh)("commandService"),V=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new te.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,ee.D8)(J,L),ae(Z,...J)}}const{id:O}=o;let B=this._commands.get(O);B||(B=new be.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(Ce).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(Un,Ft,Y){"use strict";Y.d(Ft,{Ao:function(){return Ce},Eq:function(){return ne},Fb:function(){return V},K8:function(){return ie},i6:function(){return et},uy:function(){return Ee}});var te=Y(23345),Te=Y(82983),He=Y(16925);let be=te.WE||"";const ee=new Map;ee.set("false",!1),ee.set("true",!0),ee.set("isMac",te.dz),ee.set("isLinux",te.IJ),ee.set("isWindows",te.ED),ee.set("isWeb",te.$L),ee.set("isMacNative",te.dz&&!te.$L),ee.set("isEdge",be.indexOf("Edg/")>=0),ee.set("isFirefox",be.indexOf("Firefox")>=0),ee.set("isChrome",be.indexOf("Chrome")>=0),ee.set("isSafari",be.indexOf("Safari")>=0);const y=Object.prototype.hasOwnProperty;class Ce{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 Xe.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 Xe.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 K.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 Je=b.slice(W+1,_e),mt=b[_e+1]==="i"?"i":"";try{return new RegExp(Je,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(he,b){const S=he?he.substituteConstants():void 0,W=b?b.substituteConstants():void 0;return!S&&!W?!0:!S||!W?!1:S.equals(W)}function o(he,b){return he.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=ee.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=ee.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=ee.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=ee.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=ee.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=ee.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=ee.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=ee.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(he,b){if(typeof he=="string"){const S=parseFloat(he);isNaN(S)||(he=S)}return typeof he=="string"||typeof he=="number"?b(he):le.INSTANCE}class K{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 K(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=K.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 pe(he){let b=null;for(let S=0,W=he.length;S<W;S++){const _e=he[S].substituteConstants();if(he[S]!==_e&&b===null){b=[];for(let Je=0;Je<S;Je++)b[Je]=he[Je]}b!==null&&(b[S]=_e)}return b===null?he: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=pe(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 Je of b)if(Je){if(Je.type===1){_e=!0;continue}if(Je.type===0)return le.INSTANCE;if(Je.type===6){W.push(...Je.expr);continue}W.push(Je)}if(W.length===0&&_e)return O.INSTANCE;if(W.length!==0){if(W.length===1)return W[0];W.sort(o);for(let Je=1;Je<W.length;Je++)W[Je-1].equals(W[Je])&&(W.splice(Je,1),Je--);if(W.length===1)return W[0];for(;W.length>1;){const Je=W[W.length-1];if(Je.type!==9)break;W.pop();const mt=W.pop(),Gt=W.length===0,Qt=Xe.create(Je.expr.map(on=>Ue.create([on,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=Xe.create(b,this,!0)}return this.negated}}class Xe{constructor(b,S){this.expr=b,this.negated=S,this.type=9}static create(b,S,W){return Xe._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=pe(this.expr);return b===this.expr?this:Xe.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=[],Je=!1;if(b){for(let mt=0,Gt=b.length;mt<Gt;mt++){const Qt=b[mt];if(Qt){if(Qt.type===0){Je=!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&&Je)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++)ie(_e[mt],_e[Gt])&&(_e.splice(Gt,1),Gt--);if(_e.length===1)return _e[0]}return new Xe(_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 ge(S))for(const Gt of ge(W))_e.push(Ue.create([mt,Gt],null));const Je=b.length===0;b.unshift(Xe.create(_e,null,Je))}this.negated=b[0]}return this.negated}}class Ee extends B{constructor(b,S,W){super(b,null),this._defaultValue=S,typeof W=="object"?Ee._info.push(Object.assign(Object.assign({},W),{key:b})):W!==!0&&Ee._info.push({key:b,description:W,type:S!=null?typeof S:void 0})}static all(){return Ee._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)}}Ee._info=[];const et=(0,He.yh)("contextKeyService"),ne="setContext";function Q(he,b){return he<b?-1:he>b?1:0}function q(he,b,S,W){return he<S?-1:he>S?1:b<W?-1:b>W?1:0}function ie(he,b){if(b.type===6&&he.type!==9&&he.type!==6){for(const _e of b.expr)if(he.equals(_e))return!0}const S=he.negate(),W=ge(S).concat(ge(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 ge(he){return he.type===9?he.expr:[he]}},16925:function(Un,Ft,Y){"use strict";Y.d(Ft,{I8:function(){return te},TG:function(){return Te},jt:function(){return ee},yh:function(){return be}});var te;(function(y){y.serviceIds=new Map,y.DI_TARGET="$di$target",y.DI_DEPENDENCIES="$di$dependencies";function Ce(V){return V[y.DI_DEPENDENCIES]||[]}y.getServiceDependencies=Ce})(te||(te={}));const Te=be("instantiationService");function He(y,Ce,V,o){Ce[te.DI_TARGET]===Ce?Ce[te.DI_DEPENDENCIES].push({id:y,index:V,optional:o}):(Ce[te.DI_DEPENDENCIES]=[{id:y,index:V,optional:o}],Ce[te.DI_TARGET]=Ce)}function be(y){if(te.serviceIds.has(y))return te.serviceIds.get(y);const Ce=function(V,o,le){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");He(Ce,V,le,!1)};return Ce.toString=()=>y,te.serviceIds.set(y,Ce),Ce}function ee(y){return function(Ce,V,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");He(y,Ce,o,!0)}}},44650:function(Un,Ft,Y){"use strict";Y.d(Ft,{B:function(){return be}});var te=Y(76068),Te=Y(72999);class He{constructor(){this.data=new Map}add(y,Ce){te.ok(Te.HD(y)),te.ok(Te.Kn(Ce)),te.ok(!this.data.has(y),"There is already an extension with this id"),this.data.set(y,Ce)}as(y){return this.data.get(y)||null}}const be=new He},66213:function(Un,Ft,Y){"use strict";Y.d(Ft,{e:function(){return te}});var te;(function(Te){Te.DARK="dark",Te.LIGHT="light",Te.HIGH_CONTRAST="hc"})(te||(te={}))},49055:function(Un,Ft,Y){"use strict";Y.d(Ft,{EN:function(){return o},IP:function(){return B},Ic:function(){return L},XE:function(){return Ce},bB:function(){return ae},kS:function(){return le},m6:function(){return O}});var te=Y(52615),Te=Y(4348),He=Y(69323),be=Y(16925),ee=Y(44650),y=Y(66213);const Ce=(0,be.yh)("themeService");var V;(function(Z){function J(K){return K&&typeof K=="object"&&typeof K.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 K=new RegExp(`^\\$\\((${te.dT.iconNameExpression}(?:${te.dT.iconModifierExpression})?)\\)$`);function z(ke){const pe=K.exec(ke);if(!pe)return;let[,Ue]=pe;return{id:Ue}}Z.fromString=z;function oe(ke,pe){let Ue=ke.id;const Xe=Ue.lastIndexOf("~");return Xe!==-1&&(Ue=Ue.substring(0,Xe)),pe&&(Ue=`${Ue}~${pe}`),{id:Ue}}Z.modify=oe;function Be(ke,pe){var Ue,Xe;return ke.id===pe.id&&((Ue=ke.color)===null||Ue===void 0?void 0:Ue.id)===((Xe=pe.color)===null||Xe===void 0?void 0:Xe.id)}Z.isEqual=Be;function De(ke,pe){return{id:ke.id,color:pe?o(pe):void 0}}Z.asThemeIcon=De,Z.asClassNameArray=te.dT.asClassNameArray,Z.asClassName=te.dT.asClassName,Z.asCSSSelector=te.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 K=this.themingParticipants.indexOf(J);this.themingParticipants.splice(K,1)})}getThemingParticipants(){return this.themingParticipants}}let F=new E;ee.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(K=>this.onThemeChange(K)))}onThemeChange(J){this.theme=J,this.updateStyles()}updateStyles(){}}},16632:function(Un,Ft,Y){"use strict";var te=Y(32855),Te=Y(27247),He=Y(74430),be=Y(11913),ee=Y(43079),y=Y(92310),Ce=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,K=B.disabled,z=B.defaultChecked,oe=z===void 0?!1:z,Be=B.type,De=Be===void 0?"checkbox":Be,ke=B.title,pe=B.onChange,Ue=(0,ee.Z)(B,le),Xe=(0,o.useRef)(null),Ee=(0,o.useRef)(null),et=(0,V.Z)(oe,{value:J}),ne=(0,be.Z)(et,2),Q=ne[0],q=ne[1];(0,o.useImperativeHandle)(E,function(){return{focus:function(b){var S;(S=Xe.current)===null||S===void 0||S.focus(b)},blur:function(){var b;(b=Xe.current)===null||b===void 0||b.blur()},input:Xe.current,nativeElement:Ee.current}});var ie=Ce()(L,ae,(0,He.Z)((0,He.Z)({},"".concat(L,"-checked"),Q),"".concat(L,"-disabled"),K)),ge=function(b){K||("checked"in B||q(b.target.checked),pe==null||pe({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:ie,title:ke,style:Z,ref:Ee},o.createElement("input",(0,te.Z)({},Ue,{className:"".concat(L,"-input"),ref:Xe,onChange:ge,disabled:K,checked:!!Q,type:De})),o.createElement("span",{className:"".concat(L,"-inner")}))});Ft.Z=O},96478:function(Un,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return ke}});var te=Y(32855),Te=Y(74430),He=Y(11913),be=Y(43079),ee=Y(65030),y=Y(92310),Ce=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(pe){var Ue=pe.visible,Xe=pe.triggerRef,Ee=pe.onVisibleChange,et=pe.autoFocus,ne=pe.overlayRef,Q=o.useRef(!1),q=function(){if(Ue){var b,S;(b=Xe.current)===null||b===void 0||(S=b.focus)===null||S===void 0||S.call(b),Ee==null||Ee(!1)}},ie=function(){var b;return(b=ne.current)!==null&&b!==void 0&&b.focus?(ne.current.focus(),Q.current=!0,!0):!1},ge=function(b){switch(b.keyCode){case B:q();break;case E:{var S=!1;Q.current||(S=ie()),S?b.preventDefault():q();break}}};o.useEffect(function(){return Ue?(window.addEventListener("keydown",ge),et&&(0,O.Z)(ie,3),function(){window.removeEventListener("keydown",ge),Q.current=!1}):function(){Q.current=!1}},[Ue])}var L=(0,o.forwardRef)(function(pe,Ue){var Xe=pe.overlay,Ee=pe.arrow,et=pe.prefixCls,ne=(0,o.useMemo)(function(){var q;return typeof Xe=="function"?q=Xe():q=Xe,q},[Xe]),Q=(0,V.sQ)(Ue,(0,V.C4)(ne));return o.createElement(o.Fragment,null,Ee&&o.createElement("div",{className:"".concat(et,"-arrow")}),o.cloneElement(ne,{ref:(0,V.Yr)(ne)?Q:void 0}))}),ae=L,Z={adjustX:1,adjustY:1},J=[0,0],K={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=K,oe=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Be(pe,Ue){var Xe,Ee=pe.arrow,et=Ee===void 0?!1:Ee,ne=pe.prefixCls,Q=ne===void 0?"rc-dropdown":ne,q=pe.transitionName,ie=pe.animation,ge=pe.align,he=pe.placement,b=he===void 0?"bottomLeft":he,S=pe.placements,W=S===void 0?z:S,_e=pe.getPopupContainer,Je=pe.showAction,mt=pe.hideAction,Gt=pe.overlayClassName,Qt=pe.overlayStyle,on=pe.visible,Zt=pe.trigger,Rt=Zt===void 0?["hover"]:Zt,je=pe.autoFocus,ht=pe.overlay,At=pe.children,ct=pe.onVisibleChange,tn=(0,be.Z)(pe,oe),Re=o.useState(),P=(0,He.Z)(Re,2),v=P[0],T=P[1],X="visible"in pe?on:v,k=o.useRef(null),$=o.useRef(null),fe=o.useRef(null);o.useImperativeHandle(Ue,function(){return k.current});var Me=function(at){T(at),ct==null||ct(at)};F({visible:X,triggerRef:fe,onVisibleChange:Me,autoFocus:je,overlayRef:$});var We=function(at){var pt=pe.onOverlayClick;T(!1),pt&&pt(at)},ot=function(){return o.createElement(ae,{ref:$,overlay:ht,prefixCls:Q,arrow:et})},ft=function(){return typeof ht=="function"?ot:ot()},jt=function(){var at=pe.minOverlayWidthMatchTrigger,pt=pe.alignPoint;return"minOverlayWidthMatchTrigger"in pe?at:!pt},_t=function(){var at=pe.openClassName;return at!==void 0?at:"".concat(Q,"-open")},Lt=o.cloneElement(At,{className:Ce()((Xe=At.props)===null||Xe===void 0?void 0:Xe.className,X&&_t()),ref:(0,V.Yr)(At)?(0,V.sQ)(fe,(0,V.C4)(At)):void 0}),vt=mt;return!vt&&Rt.indexOf("contextMenu")!==-1&&(vt=["click"]),o.createElement(ee.Z,(0,te.Z)({builtinPlacements:W},tn,{prefixCls:Q,ref:k,popupClassName:Ce()(Gt,(0,Te.Z)({},"".concat(Q,"-show-arrow"),et)),popupStyle:Qt,action:Rt,showAction:Je,hideAction:vt,popupPlacement:b,popupAlign:ge,popupTransitionName:q,popupAnimation:ie,popupVisible:X,stretch:jt()?"minWidth":"",popup:ft(),onPopupVisibleChange:Me,onPopupClick:We,getPopupContainer:_e}),Lt)}var De=o.forwardRef(Be),ke=De},20922:function(Un,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return Rt}});var te=Y(32855),Te=Y(74430),He=Y(34666),be=Y(11913),ee=Y(43079),y=Y(33377),Ce=Y(93912);function V(){return typeof BigInt=="function"}function o(je){return!je&&je!==0&&!Number.isNaN(je)||!String(je).trim()}function le(je){var ht=je.trim(),At=ht.startsWith("-");At&&(ht=ht.slice(1)),ht=ht.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ht.startsWith(".")&&(ht="0".concat(ht));var ct=ht||"0",tn=ct.split("."),Re=tn[0]||"0",P=tn[1]||"0";Re==="0"&&P==="0"&&(At=!1);var v=At?"-":"";return{negative:At,negativeStr:v,trimStr:ct,integerStr:Re,decimalStr:P,fullStr:"".concat(v).concat(ct)}}function O(je){var ht=String(je);return!Number.isNaN(Number(ht))&&ht.includes("e")}function B(je){var ht=String(je);if(O(je)){var At=Number(ht.slice(ht.indexOf("e-")+2)),ct=ht.match(/\.(\d+)/);return ct!=null&&ct[1]&&(At+=ct[1].length),At}return ht.includes(".")&&F(ht)?ht.length-ht.indexOf(".")-1:0}function E(je){var ht=String(je);if(O(je)){if(je>Number.MAX_SAFE_INTEGER)return String(V()?BigInt(je).toString():Number.MAX_SAFE_INTEGER);if(je<Number.MIN_SAFE_INTEGER)return String(V()?BigInt(je).toString():Number.MIN_SAFE_INTEGER);ht=je.toFixed(B(ht))}return le(ht).fullStr}function F(je){return typeof je=="number"?!Number.isNaN(je):je?/^\s*-?\d+(\.\d+)?\s*$/.test(je)||/^\s*-?\d+\.\s*$/.test(je)||/^\s*-?\.\d+\s*$/.test(je):!1}var L=function(){function je(ht){if((0,y.Z)(this,je),(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(ht)){this.empty=!0;return}if(this.origin=String(ht),ht==="-"||Number.isNaN(ht)){this.nan=!0;return}var At=ht;if(O(At)&&(At=Number(At)),At=typeof At=="string"?At:E(At),F(At)){var ct=le(At);this.negative=ct.negative;var tn=ct.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,Ce.Z)(je,[{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(At){var ct="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(At,"0"));return BigInt(ct)}},{key:"negate",value:function(){var At=new je(this.toString());return At.negative=!At.negative,At}},{key:"cal",value:function(At,ct,tn){var Re=Math.max(this.getDecimalStr().length,At.getDecimalStr().length),P=this.alignDecimal(Re),v=At.alignDecimal(Re),T=ct(P,v).toString(),X=tn(Re),k=le(T),$=k.negativeStr,fe=k.trimStr,Me="".concat($).concat(fe.padStart(X+1,"0"));return new je("".concat(Me.slice(0,-X),".").concat(Me.slice(-X)))}},{key:"add",value:function(At){if(this.isInvalidate())return new je(At);var ct=new je(At);return ct.isInvalidate()?this:this.cal(ct,function(tn,Re){return tn+Re},function(tn){return tn})}},{key:"multi",value:function(At){var ct=new je(At);return this.isInvalidate()||ct.isInvalidate()?new je(NaN):this.cal(ct,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(At){return this.toString()===(At==null?void 0:At.toString())}},{key:"lessEquals",value:function(At){return this.add(At.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return At?this.isInvalidate()?"":le("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),je}(),ae=function(){function je(ht){if((0,y.Z)(this,je),(0,Te.Z)(this,"origin",""),(0,Te.Z)(this,"number",void 0),(0,Te.Z)(this,"empty",void 0),o(ht)){this.empty=!0;return}this.origin=String(ht),this.number=Number(ht)}return(0,Ce.Z)(je,[{key:"negate",value:function(){return new je(-this.toNumber())}},{key:"add",value:function(At){if(this.isInvalidate())return new je(At);var ct=Number(At);if(Number.isNaN(ct))return this;var tn=this.number+ct;if(tn>Number.MAX_SAFE_INTEGER)return new je(Number.MAX_SAFE_INTEGER);if(tn<Number.MIN_SAFE_INTEGER)return new je(Number.MIN_SAFE_INTEGER);var Re=Math.max(B(this.number),B(ct));return new je(tn.toFixed(Re))}},{key:"multi",value:function(At){var ct=Number(At);if(this.isInvalidate()||Number.isNaN(ct))return new je(NaN);var tn=this.number*ct;if(tn>Number.MAX_SAFE_INTEGER)return new je(Number.MAX_SAFE_INTEGER);if(tn<Number.MIN_SAFE_INTEGER)return new je(Number.MIN_SAFE_INTEGER);var Re=Math.max(B(this.number),B(ct));return new je(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(At){return this.toNumber()===(At==null?void 0:At.toNumber())}},{key:"lessEquals",value:function(At){return this.add(At.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return At?this.isInvalidate()?"":E(this.number):this.origin}}]),je}();function Z(je){return V()?new L(je):new ae(je)}function J(je,ht,At){var ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(je==="")return"";var tn=le(je),Re=tn.negativeStr,P=tn.integerStr,v=tn.decimalStr,T="".concat(ht).concat(v),X="".concat(Re).concat(P);if(At>=0){var k=Number(v[At]);if(k>=5&&!ct){var $=Z(je).add("".concat(Re,"0.").concat("0".repeat(At)).concat(10-k));return J($.toString(),ht,At,ct)}return At===0?X:"".concat(X).concat(ht).concat(v.padEnd(At,"0").slice(0,At))}return T===".0"?X:"".concat(X).concat(T)}var K=Z,z=Y(92310),oe=Y.n(z),Be=Y(36901),De=Y(34280);function ke(je,ht){return typeof Proxy!="undefined"&&je?new Proxy(je,{get:function(ct,tn){if(ht[tn])return ht[tn];var Re=ct[tn];return typeof Re=="function"?Re.bind(ct):Re}}):je}var pe=Y(8654),Ue=Y(59301),Xe=Y(48736);function Ee(je,ht){var At=(0,Ue.useRef)(null);function ct(){try{var Re=je.selectionStart,P=je.selectionEnd,v=je.value,T=v.substring(0,Re),X=v.substring(P);At.current={start:Re,end:P,value:v,beforeTxt:T,afterTxt:X}}catch(k){}}function tn(){if(je&&At.current&&ht)try{var Re=je.value,P=At.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-At.current.afterTxt.length;else{var $=v[X-1],fe=Re.indexOf($,X-1);fe!==-1&&(k=fe+1)}je.setSelectionRange(k,k)}catch(Me){(0,Xe.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Me.message))}}return[ct,tn]}var et=Y(49658),ne=function(){var ht=(0,Ue.useState)(!1),At=(0,be.Z)(ht,2),ct=At[0],tn=At[1];return(0,De.Z)(function(){tn((0,et.Z)())},[]),ct},Q=ne,q=Y(16089),ie=200,ge=600;function he(je){var ht=je.prefixCls,At=je.upNode,ct=je.downNode,tn=je.upDisabled,Re=je.downDisabled,P=je.onStep,v=Ue.useRef(),T=Ue.useRef([]),X=Ue.useRef();X.current=P;var k=function(){clearTimeout(v.current)},$=function(Lt,vt){Lt.preventDefault(),k(),X.current(vt);function Ct(){X.current(vt),v.current=setTimeout(Ct,ie)}v.current=setTimeout(Ct,ge)};Ue.useEffect(function(){return function(){k(),T.current.forEach(function(_t){return q.Z.cancel(_t)})}},[]);var fe=Q();if(fe)return null;var Me="".concat(ht,"-handler"),We=oe()(Me,"".concat(Me,"-up"),(0,Te.Z)({},"".concat(Me,"-up-disabled"),tn)),ot=oe()(Me,"".concat(Me,"-down"),(0,Te.Z)({},"".concat(Me,"-down-disabled"),Re)),ft=function(){return T.current.push((0,q.Z)(k))},jt={unselectable:"on",role:"button",onMouseUp:ft,onMouseLeave:ft};return Ue.createElement("div",{className:"".concat(Me,"-wrap")},Ue.createElement("span",(0,te.Z)({},jt,{onMouseDown:function(Lt){$(Lt,!0)},"aria-label":"Increase Value","aria-disabled":tn,className:We}),At||Ue.createElement("span",{unselectable:"on",className:"".concat(ht,"-handler-up-inner")})),Ue.createElement("span",(0,te.Z)({},jt,{onMouseDown:function(Lt){$(Lt,!1)},"aria-label":"Decrease Value","aria-disabled":Re,className:ot}),ct||Ue.createElement("span",{unselectable:"on",className:"".concat(ht,"-handler-down-inner")})))}function b(je){var ht=typeof je=="number"?E(je):le(je).fullStr,At=ht.includes(".");return At?le(ht.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:je+"0"}var S=Y(30292),W=function(){var je=(0,Ue.useRef)(0),ht=function(){q.Z.cancel(je.current)};return(0,Ue.useEffect)(function(){return ht},[]),function(At){ht(),je.current=(0,q.Z)(function(){At()})}},_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"],Je=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],mt=function(ht,At){return ht||At.isEmpty()?At.toString():At.toNumber()},Gt=function(ht){var At=K(ht);return At.isInvalidate()?null:At},Qt=Ue.forwardRef(function(je,ht){var At=je.prefixCls,ct=je.className,tn=je.style,Re=je.min,P=je.max,v=je.step,T=v===void 0?1:v,X=je.defaultValue,k=je.value,$=je.disabled,fe=je.readOnly,Me=je.upHandler,We=je.downHandler,ot=je.keyboard,ft=je.changeOnWheel,jt=ft===void 0?!1:ft,_t=je.controls,Lt=_t===void 0?!0:_t,vt=je.classNames,Ct=je.stringMode,at=je.parser,pt=je.formatter,It=je.precision,Ht=je.decimalSeparator,fn=je.onChange,Yt=je.onInput,mn=je.onPressEnter,ln=je.onStep,yn=je.changeOnBlur,$n=yn===void 0?!0:yn,dr=je.domRef,Xt=(0,ee.Z)(je,_e),En="".concat(At,"-input"),$e=Ue.useRef(null),Pe=Ue.useState(!1),Fe=(0,be.Z)(Pe,2),re=Fe[0],ce=Fe[1],me=Ue.useRef(!1),Se=Ue.useRef(!1),Qe=Ue.useRef(!1),Tt=Ue.useState(function(){return K(k!=null?k:X)}),Wt=(0,be.Z)(Tt,2),Ut=Wt[0],vn=Wt[1];function jn(xt){k===void 0&&vn(xt)}var ur=Ue.useCallback(function(xt,St){if(!St)return It>=0?It:Math.max(B(xt),B(T))},[It,T]),gn=Ue.useCallback(function(xt){var St=String(xt);if(at)return at(St);var qt=St;return Ht&&(qt=qt.replace(Ht,".")),qt.replace(/[^\w.-]+/g,"")},[at,Ht]),Jt=Ue.useRef(""),or=Ue.useCallback(function(xt,St){if(pt)return pt(xt,{userTyping:St,input:String(Jt.current)});var qt=typeof xt=="number"?E(xt):xt;if(!St){var _n=ur(qt,St);if(F(qt)&&(Ht||_n>=0)){var xn=Ht||".";qt=J(qt,xn,_n)}}return qt},[pt,ur,Ht]),mr=Ue.useState(function(){var xt=X!=null?X:k;return Ut.isInvalidate()&&["string","number"].includes((0,He.Z)(xt))?Number.isNaN(xt)?"":xt:or(Ut.toString(),!1)}),Ge=(0,be.Z)(mr,2),lr=Ge[0],ir=Ge[1];Jt.current=lr;function rr(xt,St){ir(or(xt.isInvalidate()?xt.toString(!1):xt.toString(!St),St))}var Jr=Ue.useMemo(function(){return Gt(P)},[P,It]),Sr=Ue.useMemo(function(){return Gt(Re)},[Re,It]),li=Ue.useMemo(function(){return!Jr||!Ut||Ut.isInvalidate()?!1:Jr.lessEquals(Ut)},[Jr,Ut]),Gr=Ue.useMemo(function(){return!Sr||!Ut||Ut.isInvalidate()?!1:Ut.lessEquals(Sr)},[Sr,Ut]),bi=Ee($e.current,re),si=(0,be.Z)(bi,2),vi=si[0],Xi=si[1],Fr=function(St){return Jr&&!St.lessEquals(Jr)?Jr:Sr&&!Sr.lessEquals(St)?Sr:null},xr=function(St){return!Fr(St)},Nr=function(St,qt){var _n=St,xn=xr(_n)||_n.isEmpty();if(!_n.isEmpty()&&!qt&&(_n=Fr(_n)||_n,xn=!0),!fe&&!$&&xn){var sr=_n.toString(),Sn=ur(sr,qt);return Sn>=0&&(_n=K(J(sr,".",Sn)),xr(_n)||(_n=K(J(sr,".",Sn,!0)))),_n.equals(Ut)||(jn(_n),fn==null||fn(_n.isEmpty()?null:mt(Ct,_n)),k===void 0&&rr(_n,qt)),_n}return Ut},Hi=W(),ai=function xt(St){if(vi(),Jt.current=St,ir(St),!Se.current){var qt=gn(St),_n=K(qt);_n.isNaN()||Nr(_n,!0)}Yt==null||Yt(St),Hi(function(){var xn=St;at||(xn=St.replace(/。/g,".")),xn!==St&&xt(xn)})},Ki=function(){Se.current=!0},gr=function(){Se.current=!1,ai($e.current.value)},Gn=function(St){ai(St.target.value)},nn=function(St){var qt;if(!(St&&li||!St&&Gr)){me.current=!1;var _n=K(Qe.current?b(T):T);St||(_n=_n.negate());var xn=(Ut||K(0)).add(_n.toString()),sr=Nr(xn,!1);ln==null||ln(mt(Ct,sr),{offset:Qe.current?b(T):T,type:St?"up":"down"}),(qt=$e.current)===null||qt===void 0||qt.focus()}},ze=function(St){var qt=K(gn(lr)),_n;qt.isNaN()?_n=Nr(Ut,St):_n=Nr(qt,St),k!==void 0?rr(Ut,!1):_n.isNaN()||rr(_n,!1)},gt=function(){me.current=!0},Nt=function(St){var qt=St.key,_n=St.shiftKey;me.current=!0,Qe.current=_n,qt==="Enter"&&(Se.current||(me.current=!1),ze(!1),mn==null||mn(St)),ot!==!1&&!Se.current&&["Up","ArrowUp","Down","ArrowDown"].includes(qt)&&(nn(qt==="Up"||qt==="ArrowUp"),St.preventDefault())},yt=function(){me.current=!1,Qe.current=!1};Ue.useEffect(function(){if(jt&&re){var xt=function(_n){nn(_n.deltaY<0),_n.preventDefault()},St=$e.current;if(St)return St.addEventListener("wheel",xt,{passive:!1}),function(){return St.removeEventListener("wheel",xt)}}});var Kt=function(){$n&&ze(!1),ce(!1),me.current=!1};return(0,De.o)(function(){Ut.isInvalidate()||rr(Ut,!1)},[It,pt]),(0,De.o)(function(){var xt=K(k);vn(xt);var St=K(gn(lr));(!xt.equals(St)||!me.current||pt)&&rr(xt,me.current)},[k]),(0,De.o)(function(){pt&&Xi()},[lr]),Ue.createElement("div",{ref:dr,className:oe()(At,ct,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(At,"-focused"),re),"".concat(At,"-disabled"),$),"".concat(At,"-readonly"),fe),"".concat(At,"-not-a-number"),Ut.isNaN()),"".concat(At,"-out-of-range"),!Ut.isInvalidate()&&!xr(Ut))),style:tn,onFocus:function(){ce(!0)},onBlur:Kt,onKeyDown:Nt,onKeyUp:yt,onCompositionStart:Ki,onCompositionEnd:gr,onBeforeInput:gt},Lt&&Ue.createElement(he,{prefixCls:At,upNode:Me,downNode:We,upDisabled:li,downDisabled:Gr,onStep:nn}),Ue.createElement("div",{className:"".concat(En,"-wrap")},Ue.createElement("input",(0,te.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Re,"aria-valuemax":P,"aria-valuenow":Ut.isInvalidate()?null:Ut.toString(),step:T},Xt,{ref:(0,pe.sQ)($e,ht),className:En,value:lr,onChange:Gn,disabled:$,readOnly:fe}))))}),on=Ue.forwardRef(function(je,ht){var At=je.disabled,ct=je.style,tn=je.prefixCls,Re=tn===void 0?"rc-input-number":tn,P=je.value,v=je.prefix,T=je.suffix,X=je.addonBefore,k=je.addonAfter,$=je.className,fe=je.classNames,Me=(0,ee.Z)(je,Je),We=Ue.useRef(null),ot=Ue.useRef(null),ft=Ue.useRef(null),jt=function(Lt){ft.current&&(0,S.nH)(ft.current,Lt)};return Ue.useImperativeHandle(ht,function(){return ke(ft.current,{focus:jt,nativeElement:We.current.nativeElement||ot.current})}),Ue.createElement(Be.BaseInput,{className:$,triggerFocus:jt,prefixCls:Re,value:P,disabled:At,style:ct,prefix:v,suffix:T,addonAfter:k,addonBefore:X,classNames:fe,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:We},Ue.createElement(Qt,(0,te.Z)({prefixCls:Re,disabled:At,ref:ft,domRef:ot,className:fe==null?void 0:fe.input},Me)))}),Zt=on,Rt=Zt},66003:function(Un,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return Ce}});var te=Y(43079),Te=Y(27247),He=Y(34666),be=Y(59301),ee=["show"];function y(V,o){if(!o.max)return!0;var le=o.strategy(V);return le<=o.max}function Ce(V,o){return be.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,te.Z)(O,ee);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(Un,Ft,Y){"use strict";Y.r(Ft),Y.d(Ft,{BaseInput:function(){return le},default:function(){return z}});var te=Y(27247),Te=Y(32855),He=Y(74430),be=Y(34666),ee=Y(92310),y=Y.n(ee),Ce=Y(59301),V=Y(30292),o=Ce.forwardRef(function(oe,Be){var De,ke,pe,Ue=oe.inputElement,Xe=oe.children,Ee=oe.prefixCls,et=oe.prefix,ne=oe.suffix,Q=oe.addonBefore,q=oe.addonAfter,ie=oe.className,ge=oe.style,he=oe.disabled,b=oe.readOnly,S=oe.focused,W=oe.triggerFocus,_e=oe.allowClear,Je=oe.value,mt=oe.handleReset,Gt=oe.hidden,Qt=oe.classes,on=oe.classNames,Zt=oe.dataAttrs,Rt=oe.styles,je=oe.components,ht=oe.onClear,At=Xe!=null?Xe:Ue,ct=(je==null?void 0:je.affixWrapper)||"span",tn=(je==null?void 0:je.groupWrapper)||"span",Re=(je==null?void 0:je.wrapper)||"span",P=(je==null?void 0:je.groupAddon)||"span",v=(0,Ce.useRef)(null),T=function(Ht){var fn;(fn=v.current)!==null&&fn!==void 0&&fn.contains(Ht.target)&&(W==null||W())},X=(0,V.X3)(oe),k=(0,Ce.cloneElement)(At,{value:Je,className:y()((De=At.props)===null||De===void 0?void 0:De.className,!X&&(on==null?void 0:on.variant))||null}),$=(0,Ce.useRef)(null);if(Ce.useImperativeHandle(Be,function(){return{nativeElement:$.current||v.current}}),X){var fe=null;if(_e){var Me=!he&&!b&&Je,We="".concat(Ee,"-clear-icon"),ot=(0,be.Z)(_e)==="object"&&_e!==null&&_e!==void 0&&_e.clearIcon?_e.clearIcon:"\u2716";fe=Ce.createElement("button",{type:"button",tabIndex:-1,onClick:function(Ht){mt==null||mt(Ht),ht==null||ht()},onMouseDown:function(Ht){return Ht.preventDefault()},className:y()(We,(0,He.Z)((0,He.Z)({},"".concat(We,"-hidden"),!Me),"".concat(We,"-has-suffix"),!!ne))},ot)}var ft="".concat(Ee,"-affix-wrapper"),jt=y()(ft,(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Ee,"-disabled"),he),"".concat(ft,"-disabled"),he),"".concat(ft,"-focused"),S),"".concat(ft,"-readonly"),b),"".concat(ft,"-input-with-clear-btn"),ne&&_e&&Je),Qt==null?void 0:Qt.affixWrapper,on==null?void 0:on.affixWrapper,on==null?void 0:on.variant),_t=(ne||_e)&&Ce.createElement("span",{className:y()("".concat(Ee,"-suffix"),on==null?void 0:on.suffix),style:Rt==null?void 0:Rt.suffix},fe,ne);k=Ce.createElement(ct,(0,Te.Z)({className:jt,style:Rt==null?void 0:Rt.affixWrapper,onClick:T},Zt==null?void 0:Zt.affixWrapper,{ref:v}),et&&Ce.createElement("span",{className:y()("".concat(Ee,"-prefix"),on==null?void 0:on.prefix),style:Rt==null?void 0:Rt.prefix},et),k,_t)}if((0,V.He)(oe)){var Lt="".concat(Ee,"-group"),vt="".concat(Lt,"-addon"),Ct="".concat(Lt,"-wrapper"),at=y()("".concat(Ee,"-wrapper"),Lt,Qt==null?void 0:Qt.wrapper,on==null?void 0:on.wrapper),pt=y()(Ct,(0,He.Z)({},"".concat(Ct,"-disabled"),he),Qt==null?void 0:Qt.group,on==null?void 0:on.groupWrapper);k=Ce.createElement(tn,{className:pt,ref:$},Ce.createElement(Re,{className:at},Q&&Ce.createElement(P,{className:vt},Q),k,q&&Ce.createElement(P,{className:vt},q)))}return Ce.cloneElement(k,{className:y()((ke=k.props)===null||ke===void 0?void 0:ke.className,ie)||null,style:(0,te.Z)((0,te.Z)({},(pe=k.props)===null||pe===void 0?void 0:pe.style),ge),hidden:Gt})}),le=o,O=Y(3300),B=Y(11913),E=Y(43079),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,Ce.forwardRef)(function(oe,Be){var De=oe.autoComplete,ke=oe.onChange,pe=oe.onFocus,Ue=oe.onBlur,Xe=oe.onPressEnter,Ee=oe.onKeyDown,et=oe.onKeyUp,ne=oe.prefixCls,Q=ne===void 0?"rc-input":ne,q=oe.disabled,ie=oe.htmlSize,ge=oe.className,he=oe.maxLength,b=oe.suffix,S=oe.showCount,W=oe.count,_e=oe.type,Je=_e===void 0?"text":_e,mt=oe.classes,Gt=oe.classNames,Qt=oe.styles,on=oe.onCompositionStart,Zt=oe.onCompositionEnd,Rt=(0,E.Z)(oe,Z),je=(0,Ce.useState)(!1),ht=(0,B.Z)(je,2),At=ht[0],ct=ht[1],tn=(0,Ce.useRef)(!1),Re=(0,Ce.useRef)(!1),P=(0,Ce.useRef)(null),v=(0,Ce.useRef)(null),T=function(En){P.current&&(0,V.nH)(P.current,En)},X=(0,F.Z)(oe.defaultValue,{value:oe.value}),k=(0,B.Z)(X,2),$=k[0],fe=k[1],Me=$==null?"":String($),We=(0,Ce.useState)(null),ot=(0,B.Z)(We,2),ft=ot[0],jt=ot[1],_t=(0,ae.Z)(W,S),Lt=_t.max||he,vt=_t.strategy(Me),Ct=!!Lt&&vt>Lt;(0,Ce.useImperativeHandle)(Be,function(){var Xt;return{focus:T,blur:function(){var $e;($e=P.current)===null||$e===void 0||$e.blur()},setSelectionRange:function($e,Pe,Fe){var re;(re=P.current)===null||re===void 0||re.setSelectionRange($e,Pe,Fe)},select:function(){var $e;($e=P.current)===null||$e===void 0||$e.select()},input:P.current,nativeElement:((Xt=v.current)===null||Xt===void 0?void 0:Xt.nativeElement)||P.current}}),(0,Ce.useEffect)(function(){Re.current&&(Re.current=!1),ct(function(Xt){return Xt&&q?!1:Xt})},[q]);var at=function(En,$e,Pe){var Fe=$e;if(!tn.current&&_t.exceedFormatter&&_t.max&&_t.strategy($e)>_t.max){if(Fe=_t.exceedFormatter($e,{max:_t.max}),$e!==Fe){var re,ce;jt([((re=P.current)===null||re===void 0?void 0:re.selectionStart)||0,((ce=P.current)===null||ce===void 0?void 0:ce.selectionEnd)||0])}}else if(Pe.source==="compositionEnd")return;fe(Fe),P.current&&(0,V.rJ)(P.current,En,ke,Fe)};(0,Ce.useEffect)(function(){if(ft){var Xt;(Xt=P.current)===null||Xt===void 0||Xt.setSelectionRange.apply(Xt,(0,O.Z)(ft))}},[ft]);var pt=function(En){at(En,En.target.value,{source:"change"})},It=function(En){tn.current=!1,at(En,En.currentTarget.value,{source:"compositionEnd"}),Zt==null||Zt(En)},Ht=function(En){Xe&&En.key==="Enter"&&!Re.current&&(Re.current=!0,Xe(En)),Ee==null||Ee(En)},fn=function(En){En.key==="Enter"&&(Re.current=!1),et==null||et(En)},Yt=function(En){ct(!0),pe==null||pe(En)},mn=function(En){Re.current&&(Re.current=!1),ct(!1),Ue==null||Ue(En)},ln=function(En){fe(""),T(),P.current&&(0,V.rJ)(P.current,En,ke)},yn=Ct&&"".concat(Q,"-out-of-range"),$n=function(){var En=(0,L.Z)(oe,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Ce.createElement("input",(0,Te.Z)({autoComplete:De},En,{onChange:pt,onFocus:Yt,onBlur:mn,onKeyDown:Ht,onKeyUp:fn,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:ie,type:Je,onCompositionStart:function(Pe){tn.current=!0,on==null||on(Pe)},onCompositionEnd:It}))},dr=function(){var En=Number(Lt)>0;if(b||_t.show){var $e=_t.showFormatter?_t.showFormatter({value:Me,count:vt,maxLength:Lt}):"".concat(vt).concat(En?" / ".concat(Lt):"");return Ce.createElement(Ce.Fragment,null,_t.show&&Ce.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,te.Z)({},Qt==null?void 0:Qt.count)},$e),b)}return null};return Ce.createElement(le,(0,Te.Z)({},Rt,{prefixCls:Q,className:y()(ge,yn),handleReset:ln,value:Me,focused:At,triggerFocus:T,suffix:dr(),disabled:q,classes:mt,classNames:Gt,styles:Qt}),$n())}),K=J,z=K},30292:function(Un,Ft,Y){"use strict";Y.d(Ft,{He:function(){return te},X3:function(){return Te},nH:function(){return ee},rJ:function(){return be}});function te(y){return!!(y.addonBefore||y.addonAfter)}function Te(y){return!!(y.prefix||y.suffix||y.allowClear)}function He(y,Ce,V){var o=Ce.cloneNode(!0),le=Object.create(y,{target:{value:o},currentTarget:{value:o}});return o.value=V,typeof Ce.selectionStart=="number"&&typeof Ce.selectionEnd=="number"&&(o.selectionStart=Ce.selectionStart,o.selectionEnd=Ce.selectionEnd),o.setSelectionRange=function(){Ce.setSelectionRange.apply(Ce,arguments)},le}function be(y,Ce,V,o){if(V){var le=Ce;if(Ce.type==="click"){le=He(Ce,y,""),V(le);return}if(y.type!=="file"&&o!==void 0){le=He(Ce,y,o),V(le);return}V(le)}}function ee(y,Ce){if(y){y.focus(Ce);var V=Ce||{},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(Un,Ft,Y){"use strict";Y.d(Ft,{iz:function(){return Gr},ck:function(){return Fe},BW:function(){return Xi},sN:function(){return Fe},Wd:function(){return Sr},ZP:function(){return nn},Xl:function(){return Xe}});var te=Y(32855),Te=Y(74430),He=Y(27247),be=Y(3300),ee=Y(11913),y=Y(43079),Ce=Y(92310),V=Y.n(Ce),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,gt){return ze===void 0?null:"".concat(ze,"-").concat(gt)}function Z(ze){var gt=E.useContext(L);return ae(gt,ze)}var J=Y(80547),K=["children","locked"],z=E.createContext(null);function oe(ze,gt){var Nt=(0,He.Z)({},ze);return Object.keys(gt).forEach(function(yt){var Kt=gt[yt];Kt!==void 0&&(Nt[yt]=Kt)}),Nt}function Be(ze){var gt=ze.children,Nt=ze.locked,yt=(0,y.Z)(ze,K),Kt=E.useContext(z),xt=(0,J.Z)(function(){return oe(Kt,yt)},[Kt,yt],function(St,qt){return!Nt&&(St[0]!==qt[0]||!(0,O.Z)(St[1],qt[1],!0))});return E.createElement(z.Provider,{value:xt},gt)}var De=[],ke=E.createContext(null);function pe(){return E.useContext(ke)}var Ue=E.createContext(De);function Xe(ze){var gt=E.useContext(Ue);return E.useMemo(function(){return ze!==void 0?[].concat((0,be.Z)(gt),[ze]):gt},[gt,ze])}var Ee=E.createContext(null),et=E.createContext({}),ne=et,Q=Y(29194);function q(ze){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,Q.Z)(ze)){var Nt=ze.nodeName.toLowerCase(),yt=["input","select","textarea","button"].includes(Nt)||ze.isContentEditable||Nt==="a"&&!!ze.getAttribute("href"),Kt=ze.getAttribute("tabindex"),xt=Number(Kt),St=null;return Kt&&!Number.isNaN(xt)?St=xt:yt&&St===null&&(St=0),yt&&ze.disabled&&(St=null),St!==null&&(St>=0||gt&&St<0)}return!1}function ie(ze){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=(0,be.Z)(ze.querySelectorAll("*")).filter(function(yt){return q(yt,gt)});return q(ze,gt)&&Nt.unshift(ze),Nt}var ge=null;function he(){ge=document.activeElement}function b(){ge=null}function S(){if(ge)try{ge.focus()}catch(ze){}}function W(ze,gt){if(gt.keyCode===9){var Nt=ie(ze),yt=Nt[gt.shiftKey?0:Nt.length-1],Kt=yt===document.activeElement||ze===document.activeElement;if(Kt){var xt=Nt[gt.shiftKey?Nt.length-1:0];xt.focus(),gt.preventDefault()}}}var _e=Y(10228),Je=Y(16089),mt=_e.Z.LEFT,Gt=_e.Z.RIGHT,Qt=_e.Z.UP,on=_e.Z.DOWN,Zt=_e.Z.ENTER,Rt=_e.Z.ESC,je=_e.Z.HOME,ht=_e.Z.END,At=[Qt,on,mt,Gt];function ct(ze,gt,Nt,yt){var Kt,xt="prev",St="next",qt="children",_n="parent";if(ze==="inline"&&yt===Zt)return{inlineTrigger:!0};var xn=(0,Te.Z)((0,Te.Z)({},Qt,xt),on,St),sr=(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},mt,Nt?St:xt),Gt,Nt?xt:St),on,qt),Zt,qt),Sn=(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},Qt,xt),on,St),Zt,qt),Rt,_n),mt,Nt?qt:_n),Gt,Nt?_n:qt),Xn={inline:xn,horizontal:sr,vertical:Sn,inlineSub:xn,horizontalSub:Sn,verticalSub:Sn},M=(Kt=Xn["".concat(ze).concat(gt?"":"Sub")])===null||Kt===void 0?void 0:Kt[yt];switch(M){case xt:return{offset:-1,sibling:!0};case St:return{offset:1,sibling:!0};case _n:return{offset:-1,sibling:!1};case qt:return{offset:1,sibling:!1};default:return null}}function tn(ze){for(var gt=ze;gt;){if(gt.getAttribute("data-menu-list"))return gt;gt=gt.parentElement}return null}function Re(ze,gt){for(var Nt=ze||document.activeElement;Nt;){if(gt.has(Nt))return Nt;Nt=Nt.parentElement}return null}function P(ze,gt){var Nt=ie(ze,!0);return Nt.filter(function(yt){return gt.has(yt)})}function v(ze,gt,Nt){var yt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!ze)return null;var Kt=P(ze,gt),xt=Kt.length,St=Kt.findIndex(function(qt){return Nt===qt});return yt<0?St===-1?St=xt-1:St-=1:yt>0&&(St+=1),St=(St+xt)%xt,Kt[St]}var T=function(gt,Nt){var yt=new Set,Kt=new Map,xt=new Map;return gt.forEach(function(St){var qt=document.querySelector("[data-menu-id='".concat(ae(Nt,St),"']"));qt&&(yt.add(qt),xt.set(qt,St),Kt.set(St,qt))}),{elements:yt,key2element:Kt,element2key:xt}};function X(ze,gt,Nt,yt,Kt,xt,St,qt,_n,xn){var sr=E.useRef(),Sn=E.useRef();Sn.current=gt;var Xn=function(){Je.Z.cancel(sr.current)};return E.useEffect(function(){return function(){Xn()}},[]),function(M){var N=M.which;if([].concat(At,[Zt,Rt,je,ht]).includes(N)){var de=xt(),ve=T(de,yt),Ke=ve,tt=Ke.elements,Et=Ke.key2element,bt=Ke.element2key,$t=Et.get(gt),Dt=Re($t,tt),Le=bt.get(Dt),rt=ct(ze,St(Le,!0).length===1,Nt,N);if(!rt&&N!==je&&N!==ht)return;(At.includes(N)||[je,ht].includes(N))&&M.preventDefault();var Ot=function(hn){if(hn){var On=hn,Ln=hn.querySelector("a");Ln!=null&&Ln.getAttribute("href")&&(On=Ln);var cr=bt.get(hn);qt(cr),Xn(),sr.current=(0,Je.Z)(function(){Sn.current===cr&&On.focus()})}};if([je,ht].includes(N)||rt.sibling||!Dt){var rn;!Dt||ze==="inline"?rn=Kt.current:rn=tn(Dt);var un,en=P(rn,tt);N===je?un=en[0]:N===ht?un=en[en.length-1]:un=v(rn,tt,Dt,rt.offset),Ot(un)}else if(rt.inlineTrigger)_n(Le);else if(rt.offset>0)_n(Le,!0),Xn(),sr.current=(0,Je.Z)(function(){ve=T(de,yt);var Fn=Dt.getAttribute("aria-controls"),hn=document.getElementById(Fn),On=v(hn,ve.elements);Ot(On)},5);else if(rt.offset<0){var an=St(Le,!0),An=an[an.length-2],Kn=Et.get(An);_n(An,!1),Ot(Kn)}}xn==null||xn(M)}}function k(ze){Promise.resolve().then(ze)}var $="__RC_UTIL_PATH_SPLIT__",fe=function(gt){return gt.join($)},Me=function(gt){return gt.split($)},We="rc-menu-more";function ot(){var ze=E.useState({}),gt=(0,ee.Z)(ze,2),Nt=gt[1],yt=(0,E.useRef)(new Map),Kt=(0,E.useRef)(new Map),xt=E.useState([]),St=(0,ee.Z)(xt,2),qt=St[0],_n=St[1],xn=(0,E.useRef)(0),sr=(0,E.useRef)(!1),Sn=function(){sr.current||Nt({})},Xn=(0,E.useCallback)(function(Et,bt){var $t=fe(bt);Kt.current.set($t,Et),yt.current.set(Et,$t),xn.current+=1;var Dt=xn.current;k(function(){Dt===xn.current&&Sn()})},[]),M=(0,E.useCallback)(function(Et,bt){var $t=fe(bt);Kt.current.delete($t),yt.current.delete(Et)},[]),N=(0,E.useCallback)(function(Et){_n(Et)},[]),de=(0,E.useCallback)(function(Et,bt){var $t=yt.current.get(Et)||"",Dt=Me($t);return bt&&qt.includes(Dt[0])&&Dt.unshift(We),Dt},[qt]),ve=(0,E.useCallback)(function(Et,bt){return Et.filter(function($t){return $t!==void 0}).some(function($t){var Dt=de($t,!0);return Dt.includes(bt)})},[de]),Ke=function(){var bt=(0,be.Z)(yt.current.keys());return qt.length&&bt.push(We),bt},tt=(0,E.useCallback)(function(Et){var bt="".concat(yt.current.get(Et)).concat($),$t=new Set;return(0,be.Z)(Kt.current.keys()).forEach(function(Dt){Dt.startsWith(bt)&&$t.add(Kt.current.get(Dt))}),$t},[]);return E.useEffect(function(){return function(){sr.current=!0}},[]),{registerPath:Xn,unregisterPath:M,refreshOverflowKeys:N,isSubPathKey:ve,getKeyPath:de,getKeys:Ke,getSubPathKeys:tt}}function ft(ze){var gt=E.useRef(ze);gt.current=ze;var Nt=E.useCallback(function(){for(var yt,Kt=arguments.length,xt=new Array(Kt),St=0;St<Kt;St++)xt[St]=arguments[St];return(yt=gt.current)===null||yt===void 0?void 0:yt.call.apply(yt,[gt].concat(xt))},[]);return ze?Nt:void 0}var jt=Math.random().toFixed(5).toString().slice(2),_t=0;function Lt(ze){var gt=(0,le.Z)(ze,{value:ze}),Nt=(0,ee.Z)(gt,2),yt=Nt[0],Kt=Nt[1];return E.useEffect(function(){_t+=1;var xt="".concat(jt,"-").concat(_t);Kt("rc-menu-uuid-".concat(xt))},[]),yt}var vt=Y(33377),Ct=Y(93912),at=Y(18881),pt=Y(85461),It=Y(2738),Ht=Y(8654);function fn(ze,gt,Nt,yt){var Kt=E.useContext(z),xt=Kt.activeKey,St=Kt.onActive,qt=Kt.onInactive,_n={active:xt===ze};return gt||(_n.onMouseEnter=function(xn){Nt==null||Nt({key:ze,domEvent:xn}),St(ze)},_n.onMouseLeave=function(xn){yt==null||yt({key:ze,domEvent:xn}),qt(ze)}),_n}function Yt(ze){var gt=E.useContext(z),Nt=gt.mode,yt=gt.rtl,Kt=gt.inlineIndent;if(Nt!=="inline")return null;var xt=ze;return yt?{paddingRight:xt*Kt}:{paddingLeft:xt*Kt}}function mn(ze){var gt=ze.icon,Nt=ze.props,yt=ze.children,Kt;return gt===null||gt===!1?null:(typeof gt=="function"?Kt=E.createElement(gt,(0,He.Z)({},Nt)):typeof gt!="boolean"&&(Kt=gt),Kt||yt||null)}var ln=["item"];function yn(ze){var gt=ze.item,Nt=(0,y.Z)(ze,ln);return Object.defineProperty(Nt,"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."),gt}}),Nt}var $n=["title","attribute","elementRef"],dr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Xt=["active"],En=function(ze){(0,at.Z)(Nt,ze);var gt=(0,pt.Z)(Nt);function Nt(){return(0,vt.Z)(this,Nt),gt.apply(this,arguments)}return(0,Ct.Z)(Nt,[{key:"render",value:function(){var Kt=this.props,xt=Kt.title,St=Kt.attribute,qt=Kt.elementRef,_n=(0,y.Z)(Kt,$n),xn=(0,It.Z)(_n,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,B.ZP)(!St,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),E.createElement(o.Z.Item,(0,te.Z)({},St,{title:typeof xt=="string"?xt:void 0},xn,{ref:qt}))}}]),Nt}(E.Component),$e=E.forwardRef(function(ze,gt){var Nt=ze.style,yt=ze.className,Kt=ze.eventKey,xt=ze.warnKey,St=ze.disabled,qt=ze.itemIcon,_n=ze.children,xn=ze.role,sr=ze.onMouseEnter,Sn=ze.onMouseLeave,Xn=ze.onClick,M=ze.onKeyDown,N=ze.onFocus,de=(0,y.Z)(ze,dr),ve=Z(Kt),Ke=E.useContext(z),tt=Ke.prefixCls,Et=Ke.onItemClick,bt=Ke.disabled,$t=Ke.overflowDisabled,Dt=Ke.itemIcon,Le=Ke.selectedKeys,rt=Ke.onActive,Ot=E.useContext(ne),rn=Ot._internalRenderMenuItem,un="".concat(tt,"-item"),en=E.useRef(),an=E.useRef(),An=bt||St,Kn=(0,Ht.x1)(gt,an),Fn=Xe(Kt),hn=function(fr){return{key:Kt,keyPath:(0,be.Z)(Fn).reverse(),item:en.current,domEvent:fr}},On=qt||Dt,Ln=fn(Kt,An,sr,Sn),cr=Ln.active,zn=(0,y.Z)(Ln,Xt),Rn=Le.includes(Kt),yr=Yt(Fn.length),er=function(fr){if(!An){var Rr=hn(fr);Xn==null||Xn(yn(Rr)),Et(Rr)}},wr=function(fr){if(M==null||M(fr),fr.which===_e.Z.ENTER){var Rr=hn(fr);Xn==null||Xn(yn(Rr)),Et(Rr)}},Lr=function(fr){rt(Kt),N==null||N(fr)},Vr={};ze.role==="option"&&(Vr["aria-selected"]=Rn);var Qr=E.createElement(En,(0,te.Z)({ref:en,elementRef:Kn,role:xn===null?"none":xn||"menuitem",tabIndex:St?null:-1,"data-menu-id":$t&&ve?null:ve},(0,It.Z)(de,["extra"]),zn,Vr,{component:"li","aria-disabled":St,style:(0,He.Z)((0,He.Z)({},yr),Nt),className:V()(un,(0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(un,"-active"),cr),"".concat(un,"-selected"),Rn),"".concat(un,"-disabled"),An),yt),onClick:er,onKeyDown:wr,onFocus:Lr}),_n,E.createElement(mn,{props:(0,He.Z)((0,He.Z)({},ze),{},{isSelected:Rn}),icon:On}));return rn&&(Qr=rn(Qr,ze,{selected:Rn})),Qr});function Pe(ze,gt){var Nt=ze.eventKey,yt=pe(),Kt=Xe(Nt);return E.useEffect(function(){if(yt)return yt.registerPath(Nt,Kt),function(){yt.unregisterPath(Nt,Kt)}},[Kt]),yt?null:E.createElement($e,(0,te.Z)({},ze,{ref:gt}))}var Fe=E.forwardRef(Pe),re=["className","children"],ce=function(gt,Nt){var yt=gt.className,Kt=gt.children,xt=(0,y.Z)(gt,re),St=E.useContext(z),qt=St.prefixCls,_n=St.mode,xn=St.rtl;return E.createElement("ul",(0,te.Z)({className:V()(qt,xn&&"".concat(qt,"-rtl"),"".concat(qt,"-sub"),"".concat(qt,"-").concat(_n==="inline"?"inline":"vertical"),yt),role:"menu"},xt,{"data-menu-list":!0,ref:Nt}),Kt)},me=E.forwardRef(ce);me.displayName="SubMenuList";var Se=me,Qe=Y(11592);function Tt(ze,gt){return(0,Qe.Z)(ze).map(function(Nt,yt){if(E.isValidElement(Nt)){var Kt,xt,St=Nt.key,qt=(Kt=(xt=Nt.props)===null||xt===void 0?void 0:xt.eventKey)!==null&&Kt!==void 0?Kt:St,_n=qt==null;_n&&(qt="tmp_key-".concat([].concat((0,be.Z)(gt),[yt]).join("-")));var xn={key:qt,eventKey:qt};return E.cloneElement(Nt,xn)}return Nt})}var Wt=Y(65030),Ut={adjustX:1,adjustY:1},vn={topLeft:{points:["bl","tl"],overflow:Ut},topRight:{points:["br","tr"],overflow:Ut},bottomLeft:{points:["tl","bl"],overflow:Ut},bottomRight:{points:["tr","br"],overflow:Ut},leftTop:{points:["tr","tl"],overflow:Ut},leftBottom:{points:["br","bl"],overflow:Ut},rightTop:{points:["tl","tr"],overflow:Ut},rightBottom:{points:["bl","br"],overflow:Ut}},jn={topLeft:{points:["bl","tl"],overflow:Ut},topRight:{points:["br","tr"],overflow:Ut},bottomLeft:{points:["tl","bl"],overflow:Ut},bottomRight:{points:["tr","br"],overflow:Ut},rightTop:{points:["tr","tl"],overflow:Ut},rightBottom:{points:["br","bl"],overflow:Ut},leftTop:{points:["tl","tr"],overflow:Ut},leftBottom:{points:["bl","br"],overflow:Ut}},ur=null;function gn(ze,gt,Nt){if(gt)return gt;if(Nt)return Nt[ze]||Nt.other}var Jt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function or(ze){var gt=ze.prefixCls,Nt=ze.visible,yt=ze.children,Kt=ze.popup,xt=ze.popupStyle,St=ze.popupClassName,qt=ze.popupOffset,_n=ze.disabled,xn=ze.mode,sr=ze.onVisibleChange,Sn=E.useContext(z),Xn=Sn.getPopupContainer,M=Sn.rtl,N=Sn.subMenuOpenDelay,de=Sn.subMenuCloseDelay,ve=Sn.builtinPlacements,Ke=Sn.triggerSubMenuAction,tt=Sn.forceSubMenuRender,Et=Sn.rootClassName,bt=Sn.motion,$t=Sn.defaultMotions,Dt=E.useState(!1),Le=(0,ee.Z)(Dt,2),rt=Le[0],Ot=Le[1],rn=M?(0,He.Z)((0,He.Z)({},jn),ve):(0,He.Z)((0,He.Z)({},vn),ve),un=Jt[xn],en=gn(xn,bt,$t),an=E.useRef(en);xn!=="inline"&&(an.current=en);var An=(0,He.Z)((0,He.Z)({},an.current),{},{leavedClassName:"".concat(gt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Kn=E.useRef();return E.useEffect(function(){return Kn.current=(0,Je.Z)(function(){Ot(Nt)}),function(){Je.Z.cancel(Kn.current)}},[Nt]),E.createElement(Wt.Z,{prefixCls:gt,popupClassName:V()("".concat(gt,"-popup"),(0,Te.Z)({},"".concat(gt,"-rtl"),M),St,Et),stretch:xn==="horizontal"?"minWidth":null,getPopupContainer:Xn,builtinPlacements:rn,popupPlacement:un,popupVisible:rt,popup:Kt,popupStyle:xt,popupAlign:qt&&{offset:qt},action:_n?[]:[Ke],mouseEnterDelay:N,mouseLeaveDelay:de,onPopupVisibleChange:sr,forceRender:tt,popupMotion:An,fresh:!0},yt)}var mr=Y(77900);function Ge(ze){var gt=ze.id,Nt=ze.open,yt=ze.keyPath,Kt=ze.children,xt="inline",St=E.useContext(z),qt=St.prefixCls,_n=St.forceSubMenuRender,xn=St.motion,sr=St.defaultMotions,Sn=St.mode,Xn=E.useRef(!1);Xn.current=Sn===xt;var M=E.useState(!Xn.current),N=(0,ee.Z)(M,2),de=N[0],ve=N[1],Ke=Xn.current?Nt:!1;E.useEffect(function(){Xn.current&&ve(!1)},[Sn]);var tt=(0,He.Z)({},gn(xt,xn,sr));yt.length>1&&(tt.motionAppear=!1);var Et=tt.onVisibleChanged;return tt.onVisibleChanged=function(bt){return!Xn.current&&!bt&&ve(!0),Et==null?void 0:Et(bt)},de?null:E.createElement(Be,{mode:xt,locked:!Xn.current},E.createElement(mr.default,(0,te.Z)({visible:Ke},tt,{forceRender:_n,removeOnLeave:!1,leavedClassName:"".concat(qt,"-hidden")}),function(bt){var $t=bt.className,Dt=bt.style;return E.createElement(Se,{id:gt,className:$t,style:Dt},Kt)}))}var lr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],ir=["active"],rr=E.forwardRef(function(ze,gt){var Nt=ze.style,yt=ze.className,Kt=ze.title,xt=ze.eventKey,St=ze.warnKey,qt=ze.disabled,_n=ze.internalPopupClose,xn=ze.children,sr=ze.itemIcon,Sn=ze.expandIcon,Xn=ze.popupClassName,M=ze.popupOffset,N=ze.popupStyle,de=ze.onClick,ve=ze.onMouseEnter,Ke=ze.onMouseLeave,tt=ze.onTitleClick,Et=ze.onTitleMouseEnter,bt=ze.onTitleMouseLeave,$t=(0,y.Z)(ze,lr),Dt=Z(xt),Le=E.useContext(z),rt=Le.prefixCls,Ot=Le.mode,rn=Le.openKeys,un=Le.disabled,en=Le.overflowDisabled,an=Le.activeKey,An=Le.selectedKeys,Kn=Le.itemIcon,Fn=Le.expandIcon,hn=Le.onItemClick,On=Le.onOpenChange,Ln=Le.onActive,cr=E.useContext(ne),zn=cr._internalRenderSubMenuItem,Rn=E.useContext(Ee),yr=Rn.isSubPathKey,er=Xe(),wr="".concat(rt,"-submenu"),Lr=un||qt,Vr=E.useRef(),Qr=E.useRef(),Ur=sr!=null?sr:Kn,fr=Sn!=null?Sn:Fn,Rr=rn.includes(xt),pr=!en&&Rr,Ui=yr(An,xt),Hr=fn(xt,Lr,Et,bt),Or=Hr.active,qr=(0,y.Z)(Hr,ir),Tn=E.useState(!1),Wr=(0,ee.Z)(Tn,2),Ti=Wr[0],Si=Wr[1],$i=function(Ri){Lr||Si(Ri)},ss=function(Ri){$i(!0),ve==null||ve({key:xt,domEvent:Ri})},ls=function(Ri){$i(!1),Ke==null||Ke({key:xt,domEvent:Ri})},ki=E.useMemo(function(){return Or||(Ot!=="inline"?Ti||yr([an],xt):!1)},[Ot,Or,an,Ti,xt,yr]),Er=Yt(er.length),Gi=function(Ri){Lr||(tt==null||tt({key:xt,domEvent:Ri}),Ot==="inline"&&On(xt,!Rr))},gs=ft(function(gi){de==null||de(yn(gi)),hn(gi)}),Ds=function(Ri){Ot!=="inline"&&On(xt,Ri)},Ls=function(){Ln(xt)},us=Dt&&"".concat(Dt,"-popup"),ns=E.useMemo(function(){return E.createElement(mn,{icon:Ot!=="horizontal"?fr:void 0,props:(0,He.Z)((0,He.Z)({},ze),{},{isOpen:pr,isSubMenu:!0})},E.createElement("i",{className:"".concat(wr,"-arrow")}))},[Ot,fr,ze,pr,wr]),Qi=E.createElement("div",(0,te.Z)({role:"menuitem",style:Er,className:"".concat(wr,"-title"),tabIndex:Lr?null:-1,ref:Vr,title:typeof Kt=="string"?Kt:null,"data-menu-id":en&&Dt?null:Dt,"aria-expanded":pr,"aria-haspopup":!0,"aria-controls":us,"aria-disabled":Lr,onClick:Gi,onFocus:Ls},qr),Kt,ns),Ji=E.useRef(Ot);if(Ot!=="inline"&&er.length>1?Ji.current="vertical":Ji.current=Ot,!en){var qi=Ji.current;Qi=E.createElement(or,{mode:qi,prefixCls:wr,visible:!_n&&pr&&Ot!=="inline",popupClassName:Xn,popupOffset:M,popupStyle:N,popup:E.createElement(Be,{mode:qi==="horizontal"?"vertical":qi},E.createElement(Se,{id:us,ref:Qr},xn)),disabled:Lr,onVisibleChange:Ds},Qi)}var Ii=E.createElement(o.Z.Item,(0,te.Z)({ref:gt,role:"none"},$t,{component:"li",style:Nt,className:V()(wr,"".concat(wr,"-").concat(Ot),yt,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(wr,"-open"),pr),"".concat(wr,"-active"),ki),"".concat(wr,"-selected"),Ui),"".concat(wr,"-disabled"),Lr)),onMouseEnter:ss,onMouseLeave:ls}),Qi,!en&&E.createElement(Ge,{id:us,open:pr,keyPath:er},xn));return zn&&(Ii=zn(Ii,ze,{selected:Ui,active:ki,open:pr,disabled:Lr})),E.createElement(Be,{onItemClick:gs,mode:Ot==="horizontal"?"vertical":Ot,itemIcon:Ur,expandIcon:fr},Ii)}),Jr=E.forwardRef(function(ze,gt){var Nt=ze.eventKey,yt=ze.children,Kt=Xe(Nt),xt=Tt(yt,Kt),St=pe();E.useEffect(function(){if(St)return St.registerPath(Nt,Kt),function(){St.unregisterPath(Nt,Kt)}},[Kt]);var qt;return St?qt=xt:qt=E.createElement(rr,(0,te.Z)({ref:gt},ze),xt),E.createElement(Ue.Provider,{value:Kt},qt)}),Sr=Jr,li=Y(34666);function Gr(ze){var gt=ze.className,Nt=ze.style,yt=E.useContext(z),Kt=yt.prefixCls,xt=pe();return xt?null:E.createElement("li",{role:"separator",className:V()("".concat(Kt,"-item-divider"),gt),style:Nt})}var bi=["className","title","eventKey","children"],si=E.forwardRef(function(ze,gt){var Nt=ze.className,yt=ze.title,Kt=ze.eventKey,xt=ze.children,St=(0,y.Z)(ze,bi),qt=E.useContext(z),_n=qt.prefixCls,xn="".concat(_n,"-item-group");return E.createElement("li",(0,te.Z)({ref:gt,role:"presentation"},St,{onClick:function(Sn){return Sn.stopPropagation()},className:V()(xn,Nt)}),E.createElement("div",{role:"presentation",className:"".concat(xn,"-title"),title:typeof yt=="string"?yt:void 0},yt),E.createElement("ul",{role:"group",className:"".concat(xn,"-list")},xt))}),vi=E.forwardRef(function(ze,gt){var Nt=ze.eventKey,yt=ze.children,Kt=Xe(Nt),xt=Tt(yt,Kt),St=pe();return St?xt:E.createElement(si,(0,te.Z)({ref:gt},(0,It.Z)(ze,["warnKey"])),xt)}),Xi=vi,Fr=["label","children","key","type","extra"];function xr(ze,gt,Nt){var yt=gt.item,Kt=gt.group,xt=gt.submenu,St=gt.divider;return(ze||[]).map(function(qt,_n){if(qt&&(0,li.Z)(qt)==="object"){var xn=qt,sr=xn.label,Sn=xn.children,Xn=xn.key,M=xn.type,N=xn.extra,de=(0,y.Z)(xn,Fr),ve=Xn!=null?Xn:"tmp-".concat(_n);return Sn||M==="group"?M==="group"?E.createElement(Kt,(0,te.Z)({key:ve},de,{title:sr}),xr(Sn,gt,Nt)):E.createElement(xt,(0,te.Z)({key:ve},de,{title:sr}),xr(Sn,gt,Nt)):M==="divider"?E.createElement(St,(0,te.Z)({key:ve},de)):E.createElement(yt,(0,te.Z)({key:ve},de,{extra:N}),sr,(!!N||N===0)&&E.createElement("span",{className:"".concat(Nt,"-item-extra")},N))}return null}).filter(function(qt){return qt})}function Nr(ze,gt,Nt,yt,Kt){var xt=ze,St=(0,He.Z)({divider:Gr,item:Fe,group:Xi,submenu:Sr},yt);return gt&&(xt=xr(gt,St,Kt)),Tt(xt,Nt)}var Hi=["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"],ai=[],Ki=E.forwardRef(function(ze,gt){var Nt,yt=ze,Kt=yt.prefixCls,xt=Kt===void 0?"rc-menu":Kt,St=yt.rootClassName,qt=yt.style,_n=yt.className,xn=yt.tabIndex,sr=xn===void 0?0:xn,Sn=yt.items,Xn=yt.children,M=yt.direction,N=yt.id,de=yt.mode,ve=de===void 0?"vertical":de,Ke=yt.inlineCollapsed,tt=yt.disabled,Et=yt.disabledOverflow,bt=yt.subMenuOpenDelay,$t=bt===void 0?.1:bt,Dt=yt.subMenuCloseDelay,Le=Dt===void 0?.1:Dt,rt=yt.forceSubMenuRender,Ot=yt.defaultOpenKeys,rn=yt.openKeys,un=yt.activeKey,en=yt.defaultActiveFirst,an=yt.selectable,An=an===void 0?!0:an,Kn=yt.multiple,Fn=Kn===void 0?!1:Kn,hn=yt.defaultSelectedKeys,On=yt.selectedKeys,Ln=yt.onSelect,cr=yt.onDeselect,zn=yt.inlineIndent,Rn=zn===void 0?24:zn,yr=yt.motion,er=yt.defaultMotions,wr=yt.triggerSubMenuAction,Lr=wr===void 0?"hover":wr,Vr=yt.builtinPlacements,Qr=yt.itemIcon,Ur=yt.expandIcon,fr=yt.overflowedIndicator,Rr=fr===void 0?"...":fr,pr=yt.overflowedIndicatorPopupClassName,Ui=yt.getPopupContainer,Hr=yt.onClick,Or=yt.onOpenChange,qr=yt.onKeyDown,Tn=yt.openAnimation,Wr=yt.openTransitionName,Ti=yt._internalRenderMenuItem,Si=yt._internalRenderSubMenuItem,$i=yt._internalComponents,ss=(0,y.Z)(yt,Hi),ls=E.useMemo(function(){return[Nr(Xn,Sn,ai,$i,xt),Nr(Xn,Sn,ai,{},xt)]},[Xn,Sn,$i]),ki=(0,ee.Z)(ls,2),Er=ki[0],Gi=ki[1],gs=E.useState(!1),Ds=(0,ee.Z)(gs,2),Ls=Ds[0],us=Ds[1],ns=E.useRef(),Qi=Lt(N),Ji=M==="rtl",qi=(0,le.Z)(Ot,{value:rn,postState:function(jr){return jr||ai}}),Ii=(0,ee.Z)(qi,2),gi=Ii[0],Ri=Ii[1],as=function(jr){var hi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Vi(){Ri(jr),Or==null||Or(jr)}hi?(0,F.flushSync)(Vi):Vi()},es=E.useState(gi),Us=(0,ee.Z)(es,2),ws=Us[0],ei=Us[1],yi=E.useRef(!1),Ir=E.useMemo(function(){return(ve==="inline"||ve==="vertical")&&Ke?["vertical",Ke]:[ve,!1]},[ve,Ke]),In=(0,ee.Z)(Ir,2),Jn=In[0],ti=In[1],fi=Jn==="inline",zr=E.useState(Jn),Ys=(0,ee.Z)(zr,2),Oi=Ys[0],pi=Ys[1],Es=E.useState(ti),Di=(0,ee.Z)(Es,2),Ca=Di[0],Rs=Di[1];E.useEffect(function(){pi(Jn),Rs(ti),yi.current&&(fi?Ri(ws):as(ai))},[Jn,ti]);var Bs=E.useState(0),ni=(0,ee.Z)(Bs,2),na=ni[0],cs=ni[1],js=na>=Er.length-1||Oi!=="horizontal"||Et;E.useEffect(function(){fi&&ei(gi)},[gi]),E.useEffect(function(){return yi.current=!0,function(){yi.current=!1}},[]);var ks=ot(),ra=ks.registerPath,xa=ks.unregisterPath,Na=ks.refreshOverflowKeys,rs=ks.isSubPathKey,Xs=ks.getKeyPath,ts=ks.getKeys,Pi=ks.getSubPathKeys,bs=E.useMemo(function(){return{registerPath:ra,unregisterPath:xa}},[ra,xa]),ps=E.useMemo(function(){return{isSubPathKey:rs}},[rs]);E.useEffect(function(){Na(js?ai:Er.slice(na+1).map(function(Ei){return Ei.key}))},[na,js]);var Sa=(0,le.Z)(un||en&&((Nt=Er[0])===null||Nt===void 0?void 0:Nt.key),{value:un}),ia=(0,ee.Z)(Sa,2),Cs=ia[0],Qs=ia[1],ma=ft(function(Ei){Qs(Ei)}),Os=ft(function(){Qs(void 0)});(0,E.useImperativeHandle)(gt,function(){return{list:ns.current,focus:function(jr){var hi,Vi=ts(),Ci=T(Vi,Qi),xs=Ci.elements,Mi=Ci.key2element,Wi=Ci.element2key,$a=P(ns.current,xs),Pt=Cs!=null?Cs:$a[0]?Wi.get($a[0]):(hi=Er.find(function(Js){return!Js.props.disabled}))===null||hi===void 0?void 0:hi.key,$s=Mi.get(Pt);if(Pt&&$s){var va;$s==null||(va=$s.focus)===null||va===void 0||va.call($s,jr)}}}});var fs=(0,le.Z)(hn||[],{value:On,postState:function(jr){return Array.isArray(jr)?jr:jr==null?ai:[jr]}}),Fa=(0,ee.Z)(fs,2),Ps=Fa[0],Ta=Fa[1],Ha=function(jr){if(An){var hi=jr.key,Vi=Ps.includes(hi),Ci;Fn?Vi?Ci=Ps.filter(function(Mi){return Mi!==hi}):Ci=[].concat((0,be.Z)(Ps),[hi]):Ci=[hi],Ta(Ci);var xs=(0,He.Z)((0,He.Z)({},jr),{},{selectedKeys:Ci});Vi?cr==null||cr(xs):Ln==null||Ln(xs)}!Fn&&gi.length&&Oi!=="inline"&&as(ai)},_a=ft(function(Ei){Hr==null||Hr(yn(Ei)),Ha(Ei)}),is=ft(function(Ei,jr){var hi=gi.filter(function(Ci){return Ci!==Ei});if(jr)hi.push(Ei);else if(Oi!=="inline"){var Vi=Pi(Ei);hi=hi.filter(function(Ci){return!Vi.has(Ci)})}(0,O.Z)(gi,hi,!0)||as(hi,!0)}),Ia=function(jr,hi){var Vi=hi!=null?hi:!gi.includes(jr);is(jr,Vi)},Ka=X(Oi,Cs,Ji,Qi,ns,ts,Xs,Qs,Ia,qr);E.useEffect(function(){us(!0)},[]);var cA=E.useMemo(function(){return{_internalRenderMenuItem:Ti,_internalRenderSubMenuItem:Si}},[Ti,Si]),sa=Oi!=="horizontal"||Et?Er:Er.map(function(Ei,jr){return E.createElement(Be,{key:Ei.key,overflowDisabled:jr>na},Ei)}),aa=E.createElement(o.Z,(0,te.Z)({id:N,ref:ns,prefixCls:"".concat(xt,"-overflow"),component:"ul",itemComponent:Fe,className:V()(xt,"".concat(xt,"-root"),"".concat(xt,"-").concat(Oi),_n,(0,Te.Z)((0,Te.Z)({},"".concat(xt,"-inline-collapsed"),Ca),"".concat(xt,"-rtl"),Ji),St),dir:M,style:qt,role:"menu",tabIndex:sr,data:sa,renderRawItem:function(jr){return jr},renderRawRest:function(jr){var hi=jr.length,Vi=hi?Er.slice(-hi):null;return E.createElement(Sr,{eventKey:We,title:Rr,disabled:js,internalPopupClose:hi===0,popupClassName:pr},Vi)},maxCount:Oi!=="horizontal"||Et?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(jr){cs(jr)},onKeyDown:Ka},ss));return E.createElement(ne.Provider,{value:cA},E.createElement(L.Provider,{value:Qi},E.createElement(Be,{prefixCls:xt,rootClassName:St,mode:Oi,openKeys:gi,rtl:Ji,disabled:tt,motion:Ls?yr:null,defaultMotions:Ls?er:null,activeKey:Cs,onActive:ma,onInactive:Os,selectedKeys:Ps,inlineIndent:Rn,subMenuOpenDelay:$t,subMenuCloseDelay:Le,forceSubMenuRender:rt,builtinPlacements:Vr,triggerSubMenuAction:Lr,getPopupContainer:Ui,itemIcon:Qr,expandIcon:Ur,onItemClick:_a,onOpenChange:is},E.createElement(Ee.Provider,{value:ps},aa),E.createElement("div",{style:{display:"none"},"aria-hidden":!0},E.createElement(ke.Provider,{value:bs},Gi)))))}),gr=Ki,Gn=gr;Gn.Item=Fe,Gn.SubMenu=Sr,Gn.ItemGroup=Xi,Gn.Divider=Gr;var nn=Gn},11780:function(Un,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return he}});var te=Y(32855),Te=Y(27247),He=Y(11913),be=Y(43079),ee=Y(59301),y=Y(92310),Ce=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,Je=b.item,mt=b.renderItem,Gt=b.responsive,Qt=b.responsiveDisabled,on=b.registerSize,Zt=b.itemKey,Rt=b.className,je=b.style,ht=b.children,At=b.display,ct=b.order,tn=b.component,Re=tn===void 0?"div":tn,P=(0,be.Z)(b,le),v=Gt&&!At;function T(Me){on(Zt,Me)}ee.useEffect(function(){return function(){T(null)}},[]);var X=mt&&Je!==O?mt(Je,{index:ct}):ht,k;_e||(k={opacity:v?0:1,height:v?0:O,overflowY:v?"hidden":O,order:Gt?ct:O,pointerEvents:v?"none":O,position:v?"absolute":O});var $={};v&&($["aria-hidden"]=!0);var fe=ee.createElement(Re,(0,te.Z)({className:Ce()(!_e&&W,Rt),style:(0,Te.Z)((0,Te.Z)({},k),je)},$,P,{ref:S}),X);return Gt&&(fe=ee.createElement(V.Z,{onResize:function(We){var ot=We.offsetWidth;T(ot)},disabled:Qt},fe)),fe}var E=ee.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 K(){var b=ee.useRef(null),S=function(_e){b.current||(b.current=[],J(function(){(0,ae.unstable_batchedUpdates)(function(){b.current.forEach(function(Je){Je()}),b.current=null})})),b.current.push(_e)};return S}function z(b,S){var W=ee.useState(S),_e=(0,He.Z)(W,2),Je=_e[0],mt=_e[1],Gt=(0,L.Z)(function(Qt){b(function(){mt(Qt)})});return[Je,Gt]}var oe=ee.createContext(null),Be=["component"],De=["className"],ke=["className"],pe=function(S,W){var _e=ee.useContext(oe);if(!_e){var Je=S.component,mt=Je===void 0?"div":Je,Gt=(0,be.Z)(S,Be);return ee.createElement(mt,(0,te.Z)({},Gt,{ref:W}))}var Qt=_e.className,on=(0,be.Z)(_e,De),Zt=S.className,Rt=(0,be.Z)(S,ke);return ee.createElement(oe.Provider,{value:null},ee.createElement(F,(0,te.Z)({ref:W,className:Ce()(Qt,Zt)},on,Rt)))},Ue=ee.forwardRef(pe);Ue.displayName="RawItem";var Xe=Ue,Ee=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],et="responsive",ne="invalidate";function Q(b){return"+ ".concat(b.length," ...")}function q(b,S){var W=b.prefixCls,_e=W===void 0?"rc-overflow":W,Je=b.data,mt=Je===void 0?[]:Je,Gt=b.renderItem,Qt=b.renderRawItem,on=b.itemKey,Zt=b.itemWidth,Rt=Zt===void 0?10:Zt,je=b.ssr,ht=b.style,At=b.className,ct=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,$=(0,be.Z)(b,Ee),fe=je==="full",Me=K(),We=z(Me,null),ot=(0,He.Z)(We,2),ft=ot[0],jt=ot[1],_t=ft||0,Lt=z(Me,new Map),vt=(0,He.Z)(Lt,2),Ct=vt[0],at=vt[1],pt=z(Me,0),It=(0,He.Z)(pt,2),Ht=It[0],fn=It[1],Yt=z(Me,0),mn=(0,He.Z)(Yt,2),ln=mn[0],yn=mn[1],$n=z(Me,0),dr=(0,He.Z)($n,2),Xt=dr[0],En=dr[1],$e=(0,ee.useState)(null),Pe=(0,He.Z)($e,2),Fe=Pe[0],re=Pe[1],ce=(0,ee.useState)(null),me=(0,He.Z)(ce,2),Se=me[0],Qe=me[1],Tt=ee.useMemo(function(){return Se===null&&fe?Number.MAX_SAFE_INTEGER:Se||0},[Se,ft]),Wt=(0,ee.useState)(!1),Ut=(0,He.Z)(Wt,2),vn=Ut[0],jn=Ut[1],ur="".concat(_e,"-item"),gn=Math.max(Ht,ln),Jt=ct===et,or=mt.length&&Jt,mr=ct===ne,Ge=or||typeof ct=="number"&&mt.length>ct,lr=(0,ee.useMemo)(function(){var Gn=mt;return or?ft===null&&fe?Gn=mt:Gn=mt.slice(0,Math.min(mt.length,_t/Rt)):typeof ct=="number"&&(Gn=mt.slice(0,ct)),Gn},[mt,Rt,ft,ct,or]),ir=(0,ee.useMemo)(function(){return or?mt.slice(Tt+1):mt.slice(lr.length)},[mt,lr,or,Tt]),rr=(0,ee.useCallback)(function(Gn,nn){var ze;return typeof on=="function"?on(Gn):(ze=on&&(Gn==null?void 0:Gn[on]))!==null&&ze!==void 0?ze:nn},[on]),Jr=(0,ee.useCallback)(Gt||function(Gn){return Gn},[Gt]);function Sr(Gn,nn,ze){Se===Gn&&(nn===void 0||nn===Fe)||(Qe(Gn),ze||(jn(Gn<mt.length-1),k==null||k(Gn)),nn!==void 0&&re(nn))}function li(Gn,nn){jt(nn.clientWidth)}function Gr(Gn,nn){at(function(ze){var gt=new Map(ze);return nn===null?gt.delete(Gn):gt.set(Gn,nn),gt})}function bi(Gn,nn){yn(nn),fn(ln)}function si(Gn,nn){En(nn)}function vi(Gn){return Ct.get(rr(lr[Gn],Gn))}(0,o.Z)(function(){if(_t&&typeof gn=="number"&&lr){var Gn=Xt,nn=lr.length,ze=nn-1;if(!nn){Sr(0,null);return}for(var gt=0;gt<nn;gt+=1){var Nt=vi(gt);if(fe&&(Nt=Nt||0),Nt===void 0){Sr(gt-1,void 0,!0);break}if(Gn+=Nt,ze===0&&Gn<=_t||gt===ze-1&&Gn+vi(ze)<=_t){Sr(ze,null);break}else if(Gn+gn>_t){Sr(gt-1,Gn-Nt-Xt+ln);break}}P&&vi(0)+Xt>_t&&re(null)}},[_t,Ct,ln,Xt,rr,lr]);var Xi=vn&&!!ir.length,Fr={};Fe!==null&&or&&(Fr={position:"absolute",left:Fe,top:0});var xr={prefixCls:ur,responsive:or,component:X,invalidate:mr},Nr=Qt?function(Gn,nn){var ze=rr(Gn,nn);return ee.createElement(oe.Provider,{key:ze,value:(0,Te.Z)((0,Te.Z)({},xr),{},{order:nn,item:Gn,itemKey:ze,registerSize:Gr,display:nn<=Tt})},Qt(Gn,nn))}:function(Gn,nn){var ze=rr(Gn,nn);return ee.createElement(F,(0,te.Z)({},xr,{order:nn,key:ze,item:Gn,renderItem:Jr,itemKey:ze,registerSize:Gr,display:nn<=Tt}))},Hi={order:Xi?Tt:Number.MAX_SAFE_INTEGER,className:"".concat(ur,"-rest"),registerSize:bi,display:Xi},ai=tn||Q,Ki=Re?ee.createElement(oe.Provider,{value:(0,Te.Z)((0,Te.Z)({},xr),Hi)},Re(ir)):ee.createElement(F,(0,te.Z)({},xr,Hi),typeof ai=="function"?ai(ir):ai),gr=ee.createElement(T,(0,te.Z)({className:Ce()(!mr&&_e,At),style:ht,ref:S},$),lr.map(Nr),Ge?Ki:null,P&&ee.createElement(F,(0,te.Z)({},xr,{responsive:Jt,responsiveDisabled:!or,order:Tt,className:"".concat(ur,"-suffix"),registerSize:si,display:!0,style:Fr}),P));return Jt?ee.createElement(V.Z,{onResize:li,disabled:!or},gr):gr}var ie=ee.forwardRef(q);ie.displayName="Overflow",ie.Item=Xe,ie.RESPONSIVE=et,ie.INVALIDATE=ne;var ge=ie,he=ge},29301:function(Un,Ft,Y){"use strict";Y.d(Ft,{Z:function(){return ne}});var te=Y(32855),Te=Y(59301),He=Y(11592),be=Y(48736),ee=Y(27247),y=Y(34666),Ce=Y(76846),V=Y(8654),o=Te.createContext(null);function le(Q){var q=Q.children,ie=Q.onBatchResize,ge=Te.useRef(0),he=Te.useRef([]),b=Te.useContext(o),S=Te.useCallback(function(W,_e,Je){ge.current+=1;var mt=ge.current;he.current.push({size:W,element:_e,data:Je}),Promise.resolve().then(function(){mt===ge.current&&(ie==null||ie(he.current),he.current=[])}),b==null||b(W,_e,Je)},[ie,b]);return Te.createElement(o.Provider,{value:S},q)}var O=Y(76374),B=new Map;function E(Q){Q.forEach(function(q){var ie,ge=q.target;(ie=B.get(ge))===null||ie===void 0||ie.forEach(function(he){return he(ge)})})}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 K=Y(33377),z=Y(93912),oe=Y(18881),Be=Y(85461),De=function(Q){(0,oe.Z)(ie,Q);var q=(0,Be.Z)(ie);function ie(){return(0,K.Z)(this,ie),q.apply(this,arguments)}return(0,z.Z)(ie,[{key:"render",value:function(){return this.props.children}}]),ie}(Te.Component);function ke(Q,q){var ie=Q.children,ge=Q.disabled,he=Te.useRef(null),b=Te.useRef(null),S=Te.useContext(o),W=typeof ie=="function",_e=W?ie(he):ie,Je=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,he),on=function(){var ht;return(0,Ce.ZP)(he.current)||(he.current&&(0,y.Z)(he.current)==="object"?(0,Ce.ZP)((ht=he.current)===null||ht===void 0?void 0:ht.nativeElement):null)||(0,Ce.ZP)(b.current)};Te.useImperativeHandle(q,function(){return on()});var Zt=Te.useRef(Q);Zt.current=Q;var Rt=Te.useCallback(function(je){var ht=Zt.current,At=ht.onResize,ct=ht.data,tn=je.getBoundingClientRect(),Re=tn.width,P=tn.height,v=je.offsetWidth,T=je.offsetHeight,X=Math.floor(Re),k=Math.floor(P);if(Je.current.width!==X||Je.current.height!==k||Je.current.offsetWidth!==v||Je.current.offsetHeight!==T){var $={width:X,height:k,offsetWidth:v,offsetHeight:T};Je.current=$;var fe=v===Math.round(Re)?Re:v,Me=T===Math.round(P)?P:T,We=(0,ee.Z)((0,ee.Z)({},$),{},{offsetWidth:fe,offsetHeight:Me});S==null||S(We,je,ct),At&&Promise.resolve().then(function(){At(We,je)})}},[]);return Te.useEffect(function(){var je=on();return je&&!ge&&Z(je,Rt),function(){return J(je,Rt)}},[he.current,ge]),Te.createElement(De,{ref:b},mt?Te.cloneElement(_e,{ref:Qt}):_e)}var pe=Te.forwardRef(ke),Ue=pe,Xe="rc-observer-key";function Ee(Q,q){var ie=Q.children,ge=typeof ie=="function"?[ie]:(0,He.Z)(ie);return ge.map(function(he,b){var S=(he==null?void 0:he.key)||"".concat(Xe,"-").concat(b);return Te.createElement(Ue,(0,te.Z)({},Q,{key:S,ref:b===0?q:void 0}),he)})}var et=Te.forwardRef(Ee);et.Collection=le;var ne=et},29125:function(Un,Ft,Y){"use strict";Y.d(Ft,{G:function(){return be},Z:function(){return J}});var te=Y(92310),Te=Y.n(te),He=Y(59301);function be(K){var z=K.children,oe=K.prefixCls,Be=K.id,De=K.overlayInnerStyle,ke=K.bodyClassName,pe=K.className,Ue=K.style;return He.createElement("div",{className:Te()("".concat(oe,"-content"),pe),style:Ue},He.createElement("div",{className:Te()("".concat(oe,"-inner"),ke),id:Be,role:"tooltip",style:De},typeof z=="function"?z():z))}var ee=Y(32855),y=Y(27247),Ce=Y(43079),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,pe=z.mouseEnterDelay,Ue=pe===void 0?0:pe,Xe=z.mouseLeaveDelay,Ee=Xe===void 0?.1:Xe,et=z.overlayStyle,ne=z.prefixCls,Q=ne===void 0?"rc-tooltip":ne,q=z.children,ie=z.onVisibleChange,ge=z.afterVisibleChange,he=z.transitionName,b=z.animation,S=z.motion,W=z.placement,_e=W===void 0?"right":W,Je=z.align,mt=Je===void 0?{}:Je,Gt=z.destroyTooltipOnHide,Qt=Gt===void 0?!1:Gt,on=z.defaultVisible,Zt=z.getTooltipContainer,Rt=z.overlayInnerStyle,je=z.arrowContent,ht=z.overlay,At=z.id,ct=z.showArrow,tn=ct===void 0?!0:ct,Re=z.classNames,P=z.styles,v=(0,Ce.Z)(z,L),T=(0,F.Z)(At),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 $=function(){return He.createElement(be,{key:"content",prefixCls:Q,id:T,bodyClassName:Re==null?void 0:Re.body,overlayInnerStyle:(0,y.Z)((0,y.Z)({},Rt),P==null?void 0:P.body)},ht)},fe=function(){var We=He.Children.only(q),ot=(We==null?void 0:We.props)||{},ft=(0,y.Z)((0,y.Z)({},ot),{},{"aria-describedby":ht?T:null});return He.cloneElement(q,ft)};return He.createElement(V.Z,(0,ee.Z)({popupClassName:Te()(Be,Re==null?void 0:Re.root),prefixCls:Q,popup:$,action:ke,builtinPlacements:B,popupPlacement:_e,ref:X,popupAlign:mt,getPopupContainer:Zt,onPopupVisibleChange:ie,afterPopupVisibleChange:ge,popupTransitionName:he,popupAnimation:b,popupMotion:S,defaultPopupVisible:on,autoDestroy:Qt,mouseLeaveDelay:Ee,popupStyle:(0,y.Z)((0,y.Z)({},et),P==null?void 0:P.root),mouseEnterDelay:Ue,arrow:tn},k),fe())},Z=(0,He.forwardRef)(ae),J=Z},49658:function(Un,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(Un,Ft,Y){"use strict";Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.CopyToClipboard=void 0;var te=He(Y(59301)),Te=He(Y(25769));function He(K){return K&&K.__esModule?K:{default:K}}function be(K){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?be=function(oe){return typeof oe}:be=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},be(K)}function ee(K,z){var oe=Object.keys(K);if(Object.getOwnPropertySymbols){var Be=Object.getOwnPropertySymbols(K);z&&(Be=Be.filter(function(De){return Object.getOwnPropertyDescriptor(K,De).enumerable})),oe.push.apply(oe,Be)}return oe}function y(K){for(var z=1;z<arguments.length;z++){var oe=arguments[z]!=null?arguments[z]:{};z%2?ee(oe,!0).forEach(function(Be){Z(K,Be,oe[Be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(K,Object.getOwnPropertyDescriptors(oe)):ee(oe).forEach(function(Be){Object.defineProperty(K,Be,Object.getOwnPropertyDescriptor(oe,Be))})}return K}function Ce(K,z){if(K==null)return{};var oe=V(K,z),Be,De;if(Object.getOwnPropertySymbols){var ke=Object.getOwnPropertySymbols(K);for(De=0;De<ke.length;De++)Be=ke[De],!(z.indexOf(Be)>=0)&&Object.prototype.propertyIsEnumerable.call(K,Be)&&(oe[Be]=K[Be])}return oe}function V(K,z){if(K==null)return{};var oe={},Be=Object.keys(K),De,ke;for(ke=0;ke<Be.length;ke++)De=Be[ke],!(z.indexOf(De)>=0)&&(oe[De]=K[De]);return oe}function o(K,z){if(!(K instanceof z))throw new TypeError("Cannot call a class as a function")}function le(K,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(K,Be.key,Be)}}function O(K,z,oe){return z&&le(K.prototype,z),oe&&le(K,oe),K}function B(K,z){return z&&(be(z)==="object"||typeof z=="function")?z:F(K)}function E(K){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(oe){return oe.__proto__||Object.getPrototypeOf(oe)},E(K)}function F(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}function L(K,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");K.prototype=Object.create(z&&z.prototype,{constructor:{value:K,writable:!0,configurable:!0}}),z&&ae(K,z)}function ae(K,z){return ae=Object.setPrototypeOf||function(Be,De){return Be.__proto__=De,Be},ae(K,z)}function Z(K,z,oe){return z in K?Object.defineProperty(K,z,{value:oe,enumerable:!0,configurable:!0,writable:!0}):K[z]=oe,K}var J=function(K){L(z,K);function z(){var oe,Be;o(this,z);for(var De=arguments.length,ke=new Array(De),pe=0;pe<De;pe++)ke[pe]=arguments[pe];return Be=B(this,(oe=E(z)).call.apply(oe,[this].concat(ke))),Z(F(Be),"onClick",function(Ue){var Xe=Be.props,Ee=Xe.text,et=Xe.onCopy,ne=Xe.children,Q=Xe.options,q=te.default.Children.only(ne),ie=(0,Te.default)(Ee,Q);et&&et(Ee,ie),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,pe=Be.options,Ue=Be.children,Xe=Ce(Be,["text","onCopy","options","children"]),Ee=te.default.Children.only(Ue);return te.default.cloneElement(Ee,y({},Xe,{onClick:this.onClick}))}}]),z}(te.default.PureComponent);Ft.CopyToClipboard=J,Z(J,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Un,Ft,Y){"use strict";var te=Y(83145),Te=te.CopyToClipboard;Te.CopyToClipboard=Te,Un.exports=Te},76374:function(Un,Ft,Y){"use strict";var te=function(){if(typeof Map!="undefined")return Map;function ne(Q,q){var ie=-1;return Q.some(function(ge,he){return ge[0]===q?(ie=he,!0):!1}),ie}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 ie=ne(this.__entries__,q),ge=this.__entries__[ie];return ge&&ge[1]},Q.prototype.set=function(q,ie){var ge=ne(this.__entries__,q);~ge?this.__entries__[ge][1]=ie:this.__entries__.push([q,ie])},Q.prototype.delete=function(q){var ie=this.__entries__,ge=ne(ie,q);~ge&&ie.splice(ge,1)},Q.prototype.has=function(q){return!!~ne(this.__entries__,q)},Q.prototype.clear=function(){this.__entries__.splice(0)},Q.prototype.forEach=function(q,ie){ie===void 0&&(ie=null);for(var ge=0,he=this.__entries__;ge<he.length;ge++){var b=he[ge];q.call(ie,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")()}(),be=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(He):function(ne){return setTimeout(function(){return ne(Date.now())},1e3/60)}}(),ee=2;function y(ne,Q){var q=!1,ie=!1,ge=0;function he(){q&&(q=!1,ne()),ie&&S()}function b(){be(he)}function S(){var W=Date.now();if(q){if(W-ge<ee)return;ie=!0}else q=!0,ie=!1,setTimeout(b,Q);ge=W}return S}var Ce=20,V=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",le=function(){function ne(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=y(this.refresh.bind(this),Ce)}return ne.prototype.addObserver=function(Q){~this.observers_.indexOf(Q)||this.observers_.push(Q),this.connected_||this.connect_()},ne.prototype.removeObserver=function(Q){var q=this.observers_,ie=q.indexOf(Q);~ie&&q.splice(ie,1),!q.length&&this.connected_&&this.disconnect_()},ne.prototype.refresh=function(){var Q=this.updateObservers_();Q&&this.refresh()},ne.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},ne.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)},ne.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)},ne.prototype.onTransitionEnd_=function(Q){var q=Q.propertyName,ie=q===void 0?"":q,ge=V.some(function(he){return!!~ie.indexOf(he)});ge&&this.refresh()},ne.getInstance=function(){return this.instance_||(this.instance_=new ne),this.instance_},ne.instance_=null,ne}(),O=function(ne,Q){for(var q=0,ie=Object.keys(Q);q<ie.length;q++){var ge=ie[q];Object.defineProperty(ne,ge,{value:Q[ge],enumerable:!1,writable:!1,configurable:!0})}return ne},B=function(ne){var Q=ne&&ne.ownerDocument&&ne.ownerDocument.defaultView;return Q||He},E=De(0,0,0,0);function F(ne){return parseFloat(ne)||0}function L(ne){for(var Q=[],q=1;q<arguments.length;q++)Q[q-1]=arguments[q];return Q.reduce(function(ie,ge){var he=ne["border-"+ge+"-width"];return ie+F(he)},0)}function ae(ne){for(var Q=["top","right","bottom","left"],q={},ie=0,ge=Q;ie<ge.length;ie++){var he=ge[ie],b=ne["padding-"+he];q[he]=F(b)}return q}function Z(ne){var Q=ne.getBBox();return De(0,0,Q.width,Q.height)}function J(ne){var Q=ne.clientWidth,q=ne.clientHeight;if(!Q&&!q)return E;var ie=B(ne).getComputedStyle(ne),ge=ae(ie),he=ge.left+ge.right,b=ge.top+ge.bottom,S=F(ie.width),W=F(ie.height);if(ie.boxSizing==="border-box"&&(Math.round(S+he)!==Q&&(S-=L(ie,"left","right")+he),Math.round(W+b)!==q&&(W-=L(ie,"top","bottom")+b)),!z(ne)){var _e=Math.round(S+he)-Q,Je=Math.round(W+b)-q;Math.abs(_e)!==1&&(S-=_e),Math.abs(Je)!==1&&(W-=Je)}return De(ge.left,ge.top,S,W)}var K=function(){return typeof SVGGraphicsElement!="undefined"?function(ne){return ne instanceof B(ne).SVGGraphicsElement}:function(ne){return ne instanceof B(ne).SVGElement&&typeof ne.getBBox=="function"}}();function z(ne){return ne===B(ne).document.documentElement}function oe(ne){return Te?K(ne)?Z(ne):J(ne):E}function Be(ne){var Q=ne.x,q=ne.y,ie=ne.width,ge=ne.height,he=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,b=Object.create(he.prototype);return O(b,{x:Q,y:q,width:ie,height:ge,top:q,right:Q+ie,bottom:ge+q,left:Q}),b}function De(ne,Q,q,ie){return{x:ne,y:Q,width:q,height:ie}}var ke=function(){function ne(Q){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=De(0,0,0,0),this.target=Q}return ne.prototype.isActive=function(){var Q=oe(this.target);return this.contentRect_=Q,Q.width!==this.broadcastWidth||Q.height!==this.broadcastHeight},ne.prototype.broadcastRect=function(){var Q=this.contentRect_;return this.broadcastWidth=Q.width,this.broadcastHeight=Q.height,Q},ne}(),pe=function(){function ne(Q,q){var ie=Be(q);O(this,{target:Q,contentRect:ie})}return ne}(),Ue=function(){function ne(Q,q,ie){if(this.activeObservations_=[],this.observations_=new te,typeof Q!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=Q,this.controller_=q,this.callbackCtx_=ie}return ne.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())}},ne.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))}},ne.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ne.prototype.gatherActive=function(){var Q=this;this.clearActive(),this.observations_.forEach(function(q){q.isActive()&&Q.activeObservations_.push(q)})},ne.prototype.broadcastActive=function(){if(this.hasActive()){var Q=this.callbackCtx_,q=this.activeObservations_.map(function(ie){return new pe(ie.target,ie.broadcastRect())});this.callback_.call(Q,q,Q),this.clearActive()}},ne.prototype.clearActive=function(){this.activeObservations_.splice(0)},ne.prototype.hasActive=function(){return this.activeObservations_.length>0},ne}(),Xe=typeof WeakMap!="undefined"?new WeakMap:new te,Ee=function(){function ne(Q){if(!(this instanceof ne))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(),ie=new Ue(Q,q,this);Xe.set(this,ie)}return ne}();["observe","unobserve","disconnect"].forEach(function(ne){Ee.prototype[ne]=function(){var Q;return(Q=Xe.get(this))[ne].apply(Q,arguments)}});var et=function(){return typeof He.ResizeObserver!="undefined"?He.ResizeObserver:Ee}();Ft.Z=et},98040:function(Un){Un.exports=function(){var Ft=document.getSelection();if(!Ft.rangeCount)return function(){};for(var Y=document.activeElement,te=[],Te=0;Te<Ft.rangeCount;Te++)te.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||te.forEach(function(He){Ft.addRange(He)}),Y&&Y.focus()}}},68535:function(Un,Ft,Y){"use strict";Y.d(Ft,{ZP:function(){return Xr}});const te=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 be=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}({}),ee=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 Ce={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(){},K={trace:J,debug:J,log:J,warn:J,info:J,error:J};function z(){return B({},K)}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.11`)}catch(i){return z()}r.forEach(i=>{De[i]=Be(i,a)})}else B(De,n);return n}const pe=De;function Ue(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Xe(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Ee(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 et(a,e=!1){if(typeof TextDecoder!="undefined"){const c=new TextDecoder("utf-8").decode(a);if(e){const p=c.indexOf("\0");return p!==-1?c.substring(0,p):c}return c.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 ne(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 ie={exports:{}},ge;function he(){return ge||(ge=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,c,p){if(p=p||{},f=f.trim(),c=c.trim(),!c){if(!p.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(c);if(!w)throw new Error("Error trying to parse relative URL.");if(w.scheme)return p.alwaysNormalize?(w.path=A.normalizePath(w.path),A.buildURLFromParts(w)):c;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 H=I.path,ue=H.substring(0,H.lastIndexOf("/")+1)+w.path;G.path=A.normalizePath(ue)}return G.path===null&&(G.path=p.alwaysNormalize?A.normalizePath(w.path):w.path),A.buildURLFromParts(G)},parseURL:function(f){var c=n.exec(f);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[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})()}(ie)),ie.exports}var b=he();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,on(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 Je(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(te(e)&&te(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=te(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(!te(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Je(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 on(a,e){const t=Qt(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const Zt=Math.pow(2,32)-1,Rt=[].push,je={video:1,audio:2,id3:3,text:4};function ht(a){return String.fromCharCode.apply(null,a)}function At(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function ct(a,e){const t=Re(a,e);return t<0?4294967296+t:t}function tn(a,e){let t=ct(a,e);return t*=Math.pow(2,32),t+=ct(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=ct(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=ct(a,r),s=ht(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&&Rt.apply(t,f)}r=A}return t}function T(a){const e=[],t=a[0];let n=8;const r=ct(a,n);n+=4;let i=0,s=0;t===0?(i=ct(a,n),s=ct(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=At(a,n);n+=2;for(let c=0;c<f;c++){let p=n;const _=ct(a,p);p+=4;const w=_&2147483647;if((_&2147483648)>>>31===1)return pe.warn("SIDX has hierarchical references (not supported)"),null;const D=ct(a,p);p+=4,e.push({referenceSize:w,subsegmentDuration:D,info:{duration:D/r,start:A,end:A+w-1}}),A+=w,p+=4,n=p}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=ct(s,A===0?12:20),c=v(i,["mdia","mdhd"])[0];if(c){A=c[0];const p=ct(c,A===0?12:20),_=v(i,["mdia","hdlr"])[0];if(_){const w=ht(_.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:p,type:I,stsd:G},e[I]=F({timescale:p,id:f},G)):e[f]={timescale:p,type:w,stsd:G}}}}}return v(a,["moov","mvex","trex"]).forEach(r=>{const i=ct(r,4),s=e[i];s&&(s.default={duration:ct(r,12),flags:ct(r,20)})}),e}function k(a){const e=a.subarray(8),t=e.subarray(86),n=ht(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const c=v(e,[n])[0].subarray(n==="enca"?28:78);v(c,["sinf"]).forEach(_=>{const w=v(_,["schm"])[0];if(w){const I=ht(w.subarray(4,8));if(I==="cbcs"||I==="cenc"){const D=v(_,["frma"])[0];D&&(r=ht(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=$(A==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const f=v(e,[n])[0],c=v(f.subarray(28),["esds"])[0];if(c&&c.length>7){let p=4;if(c[p++]!==3)break;p=Me(c,p),p+=2;const _=c[p++];if(_&128&&(p+=2),_&64&&(p+=c[p++]),c[p++]!==4)break;p=Me(c,p);const w=c[p++];if(w===64)r+="."+We(w);else break;if(p+=12,c[p++]!==5)break;p=Me(c,p);const I=c[p++];let D=(I&248)>>3;D===31&&(D+=1+((I&7)<<3)+((c[p]&224)>>5)),r+="."+D}break}case"hvc1":case"hev1":{const f=v(t,["hvcC"])[0];if(f&&f.length>12){const c=f[1],p=["","A","B","C"][c>>6],_=c&31,w=ct(f,2),I=(c&32)>>5?"H":"L",D=f[12],G=f.subarray(6,12);r+="."+p+_,r+="."+fe(w).toString(16).toUpperCase(),r+="."+I+D;let H="";for(let ue=G.length;ue--;){const Ie=G[ue];(Ie||H)&&(H="."+Ie.toString(16).toUpperCase()+H)}r+=H}i=$(A=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=$(r,t)||r;break}case"vp09":{const f=v(t,["vpcC"])[0];if(f&&f.length>6){const c=f[4],p=f[5],_=f[6]>>4&15;r+="."+ot(c)+"."+ot(p)+"."+ot(_)}break}case"av01":{const f=v(t,["av1C"])[0];if(f&&f.length>2){const c=f[1]>>>5,p=f[1]&31,_=f[2]>>>7?"H":"M",w=(f[2]&64)>>6,I=(f[2]&32)>>5,D=c===2&&w?I?12:10:w?10:8,G=(f[2]&16)>>4,H=(f[2]&8)>>3,ue=(f[2]&4)>>2,Ie=f[2]&3;r+="."+c+"."+ot(p)+_+"."+ot(D)+"."+G+"."+H+ue+Ie+"."+ot(1)+"."+ot(1)+"."+ot(1)+"."+0,i=$("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function $(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+"."+ot(r)+"."+ot(i)}}function fe(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 ot(a){return(a<10?"0":"")+a}function ft(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(c=>{const p=f?c.subarray(28):c.subarray(78);v(p,["sinf"]).forEach(w=>{const I=jt(w);if(I){const D=I.subarray(8,24);D.some(G=>G!==0)||(pe.log(`[eme] Patching keyId in 'enc${f?"a":"v"}>sinf>>tenc' box: ${ne(D)} -> ${ne(t)}`),I.set(t,8))}})})})}function jt(a){const e=v(a,["schm"])[0];if(e){const t=ht(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return v(a,["schi","tenc"])[0]}return null}function _t(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=ct(A,4),c=e[f];if(!c)continue;n[f]||(n[f]={start:NaN,duration:0,sampleCount:0,timescale:c.timescale,type:c.type});const p=n[f],_=v(s,["tfdt"])[0];if(_){const xe=_[0];let Ye=ct(_,4);xe===1&&(Ye===Zt?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(Ye*=Zt+1,Ye+=ct(_,8))),te(Ye)&&(!te(p.start)||Ye<p.start)&&(p.start=Ye)}const w=c.default,I=ct(A,0)|(w==null?void 0:w.flags);let D=(w==null?void 0:w.duration)||0;I&8&&(I&2?D=ct(A,12):D=ct(A,8));const G=v(s,["trun"]);let H=p.start||0,ue=0,Ie=D;for(let xe=0;xe<G.length;xe++){const Ye=G[xe],lt=ct(Ye,4),kt=p.sampleCount;p.sampleCount+=lt;const it=Ye[3]&1,wt=Ye[3]&4,Bt=Ye[2]&1,st=Ye[2]&2,Vt=Ye[2]&4,Cn=Ye[2]&8;let Zn=8,ar=lt;for(it&&(Zn+=4),wt&<&&(!(Ye[Zn+1]&1)&&p.keyFrameIndex===void 0&&(p.keyFrameIndex=kt),Zn+=4,Bt?(Ie=ct(Ye,Zn),Zn+=4):Ie=D,st&&(Zn+=4),Cn&&(Zn+=4),H+=Ie,ue+=Ie,ar--);ar--;)Bt?(Ie=ct(Ye,Zn),Zn+=4):Ie=D,st&&(Zn+=4),Vt&&(Ye[Zn+1]&1||p.keyFrameIndex===void 0&&(p.keyFrameIndex=p.sampleCount-(ar+1),p.keyFrameStart=H),Zn+=4),Cn&&(Zn+=4),H+=Ie,ue+=Ie;!ue&&D&&(ue+=D*lt)}p.duration+=ue}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 c=T(A[f]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const p=c.references.reduce((_,w)=>_+w.info.duration||0,0);s=Math.max(s,p+c.earliestPresentationTime/c.timescale)}}s&&te(s)&&Object.keys(n).forEach(f=>{n[f].duration||(n[f].duration=s*n[f].timescale-n[f].start)})}return n}function Lt(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 vt(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Ct(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return v(n,["moof"]).map(f=>{const c=f.byteOffset-8;v(f,["traf"]).map(_=>{const w=v(_,["tfdt"]).map(I=>{const D=I[0];let G=ct(I,4);return D===1&&(G*=Math.pow(2,32),G+=ct(I,8)),G/r})[0];return w!==void 0&&(a=w),v(_,["tfhd"]).map(I=>{const D=ct(I,4),G=ct(I,0)&16777215,H=(G&1)!==0,ue=(G&2)!==0,Ie=(G&8)!==0;let xe=0;const Ye=(G&16)!==0;let lt=0;const kt=(G&32)!==0;let it=8;D===i&&(H&&(it+=8),ue&&(it+=4),Ie&&(xe=ct(I,it),it+=4),Ye&&(lt=ct(I,it),it+=4),kt&&(it+=4),e.type==="video"&&(s=at(e.codec)),v(_,["trun"]).map(wt=>{const Bt=wt[0],st=ct(wt,0)&16777215,Vt=(st&1)!==0;let Cn=0;const Zn=(st&4)!==0,ar=(st&256)!==0;let Yn=0;const wn=(st&512)!==0;let tr=0;const Hn=(st&1024)!==0,nr=(st&2048)!==0;let br=0;const Bn=ct(wt,4);let bn=8;Vt&&(Cn=ct(wt,bn),bn+=4),Zn&&(bn+=4);let $r=Cn+c;for(let Bi=0;Bi<Bn;Bi++){if(ar?(Yn=ct(wt,bn),bn+=4):Yn=xe,wn?(tr=ct(wt,bn),bn+=4):tr=lt,Hn&&(bn+=4),nr&&(Bt===0?br=ct(wt,bn):br=Re(wt,bn),bn+=4),e.type===W.VIDEO){let Yr=0;for(;Yr<tr;){const oi=ct(n,$r);if($r+=4,pt(s,n[$r])){const Ts=n.subarray($r,$r+oi);It(Ts,s?2:1,a+br/r,t)}$r+=oi,Yr+=oi+4}}a+=Yn/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 pt(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 c=r.length-i;let p=i;if(A<c)i+=A;else if(A>c){pe.error(`Malformed SEI payload. ${A} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(r[p++]===181){const w=At(r,p);if(p+=2,w===49){const I=ct(r,p);if(p+=4,I===1195456820){const D=r[p++];if(D===3){const G=r[p++],H=31&G,ue=64&G,Ie=ue?2+H*3:0,xe=new Uint8Array(Ie);if(ue){xe[0]=G;for(let Ye=1;Ye<Ie;Ye++)xe[Ye]=r[p++]}n.push({type:D,payloadType:s,pts:t,bytes:xe})}}}}}else if(s===5&&A>16){const _=[];for(let D=0;D<16;D++){const G=r[p++].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[p++];n.push({payloadType:s,pts:t,uuid:_.join(""),userData:et(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 fn(a){const e=a[0];let t="",n="",r=0,i=0,s=0,A=0,f=0,c=0;if(e===0){for(;ht(a.subarray(c,c+1))!=="\0";)t+=ht(a.subarray(c,c+1)),c+=1;for(t+=ht(a.subarray(c,c+1)),c+=1;ht(a.subarray(c,c+1))!=="\0";)n+=ht(a.subarray(c,c+1)),c+=1;n+=ht(a.subarray(c,c+1)),c+=1,r=ct(a,12),i=ct(a,16),A=ct(a,20),f=ct(a,24),c=28}else if(e===1){c+=4,r=ct(a,c),c+=4;const _=ct(a,c);c+=4;const w=ct(a,c);for(c+=4,s=Qc(2,32)*_+w,Te(s)||(s=Number.MAX_SAFE_INTEGER,pe.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),A=ct(a,c),c+=4,f=ct(a,c),c+=4;ht(a.subarray(c,c+1))!=="\0";)t+=ht(a.subarray(c,c+1)),c+=1;for(t+=ht(a.subarray(c,c+1)),c+=1;ht(a.subarray(c,c+1))!=="\0";)n+=ht(a.subarray(c,c+1)),c+=1;n+=ht(a.subarray(c,c+1)),c+=1}const p=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:A,id:f,payload:p}}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 mn(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)}const ln=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),yn={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 $n(a,e){const t=yn[e];return!!t&&!!t[a.slice(0,4)]}function dr(a,e,t=!0){return!a.split(",").some(n=>!Xt(n,e,t))}function Xt(a,e,t=!0){var n;const r=Ue(t);return(n=r==null?void 0:r.isTypeSupported(En(a,e)))!=null?n:!1}function En(a,e){return`${e}/mp4;codecs=${a}`}function $e(a){if(a){const e=a.substring(0,4);return yn.video[e]}return 2}function Pe(a){const e=ln();return a.split(",").reduce((t,n)=>{const i=e&&at(n)?9:yn.video[n];return i?(i*2+t)/(t?3:2):(yn.audio[n]+t)/(t?2:1)},0)}const Fe={};function re(a,e=!0){if(Fe[a])return Fe[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(Xt(t[r],"audio",e))return Fe[a]=t[r],t[r];if(t[r]==="mp3"&&(n=Ue(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const ce=/flac|opus|mp4a\.40\.34/i;function me(a,e=!0){return a.replace(ce,t=>re(t.toLowerCase(),e))}function Se(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)$n(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function Qe(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Tt(a,"audio")||Tt(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 Tt(a,e){return $n(a,e)&&Xt(a,e)}function Wt(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 Ut(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 vn(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 jn(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const ur={supported:!0,powerEfficient:!0,smooth:!0},gn={supported:!1,smooth:!1,powerEfficient:!1},Jt={supported:!0,configurations:[],decodingInfoResults:[ur]};function or(a,e){return{supported:!1,configurations:e,decodingInfoResults:[gn],error:a}}function mr(a,e,t,n,r,i){const s=a.videoCodec,A=a.audioCodec?a.audioGroups:null,f=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,p=c?parseInt(c):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))||!!_&&te(p)&&Object.keys(_).some(w=>parseInt(w)>p)}function Ge(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(Jt);const i=[],s=lr(a),A=s.length,f=ir(a,e,A>0),c=f.length;for(let p=A||1*c||1;p--;){const _={type:"media-source"};if(A&&(_.video=s[p%A]),c){_.audio=f[p%c];const w=_.audio.bitrate;_.video&&w&&(_.video.bitrate-=w)}i.push(_)}if(r){const p=navigator.userAgent;if(r.split(",").some(_=>at(_))&&ln())return Promise.resolve(or(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${p})`),i))}return Promise.all(i.map(p=>{const _=Sr(p);return n[_]||(n[_]=t.decodingInfo(p))})).then(p=>({supported:!p.some(_=>!_.supported),configurations:i,decodingInfoResults:p})).catch(p=>({supported:!1,configurations:i,decodingInfoResults:[],error:p}))}function lr(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=Jr(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,A=a.videoRange.toLowerCase();return t?t.map(f=>{const c={contentType:En(Ut(f),"video"),width:r,height:i,bitrate:n,framerate:s};return A!=="sdr"&&(c.transferFunction=A),c}):[]}function ir(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=Jr(a);return r&&a.audioGroups?a.audioGroups.reduce((s,A)=>{var f;const c=A?(f=e.groups[A])==null?void 0:f.tracks:null;return c?c.reduce((p,_)=>{if(_.groupId===A){const w=parseFloat(_.channels||"");r.forEach(I=>{const D={contentType:En(I,"audio"),bitrate:t?rr(I,i):i};w&&(D.channels=""+w),p.push(D)})}return p},s):s},[]):[]}function rr(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 Jr(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function Sr(a){let e="";const{audio:t,video:n}=a;if(n){const r=jn(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=jn(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const li=["NONE","TYPE-0","TYPE-1",null];function Gr(a){return li.indexOf(a)>-1}const bi=["SDR","PQ","HLG"];function si(a){return!!a&&bi.indexOf(a)>-1}var vi={No:"",Yes:"YES",v2:"v2"};function Xi(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?vi.v2:vi.Yes:vi.No}class Fr{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 xr{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 Nr(this._audioGroups,e)}hasSubtitleGroup(e){return Nr(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 Nr(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Hi(){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 ai(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||bi.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Hi(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const Ki=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}},gr=(a,e)=>JSON.stringify(a,Ki(e));function Gn(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,c=s&&parseInt(s)===2;let p=!1,_=!1,w=1/0,I=1/0,D=1/0,G=1/0,H=0,ue=[];const{preferHDR:Ie,allowedVideoRanges:xe}=ai(e,r);for(let wt=i.length;wt--;){const Bt=a[i[wt]];p||(p=Bt.channels[2]>0),w=Math.min(w,Bt.minHeight),I=Math.min(I,Bt.minFramerate),D=Math.min(D,Bt.minBitrate),xe.filter(Vt=>Bt.videoRanges[Vt]>0).length>0&&(_=!0)}w=te(w)?w:0,I=te(I)?I:0;const Ye=Math.max(1080,w),lt=Math.max(30,I);D=te(D)?D:t,t=Math.max(D,t),_||(e=void 0);const kt=i.length>1;return{codecSet:i.reduce((wt,Bt)=>{const st=a[Bt];if(Bt===wt)return wt;if(ue=_?xe.filter(Vt=>st.videoRanges[Vt]>0):[],kt){if(st.minBitrate>t)return nn(Bt,`min bitrate of ${st.minBitrate} > current estimate of ${t}`),wt;if(!st.hasDefaultAudio)return nn(Bt,"no renditions with default or auto-select sound found"),wt;if(A&&Bt.indexOf(A.substring(0,4))%5!==0)return nn(Bt,`audio codec preference "${A}" not found`),wt;if(s&&!c){if(!st.channels[s])return nn(Bt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(st.channels)})`),wt}else if((!A||c)&&p&&st.channels[2]===0)return nn(Bt,"no renditions with stereo sound found"),wt;if(st.minHeight>Ye)return nn(Bt,`min resolution of ${st.minHeight} > maximum of ${Ye}`),wt;if(st.minFramerate>lt)return nn(Bt,`min framerate of ${st.minFramerate} > maximum of ${lt}`),wt;if(!ue.some(Vt=>st.videoRanges[Vt]>0))return nn(Bt,`no variants with VIDEO-RANGE of ${gr(ue)} found`),wt;if(f&&Bt.indexOf(f.substring(0,4))%5!==0)return nn(Bt,`video codec preference "${f}" not found`),wt;if(st.maxScore<H)return nn(Bt,`max score of ${st.maxScore} < selected max of ${H}`),wt}return wt&&(Pe(Bt)>=Pe(wt)||st.fragmentError>a[wt].fragmentError)?wt:(G=st.minIndex,H=st.maxScore,Bt)},void 0),videoRanges:ue,preferHDR:Ie,minFramerate:I,minBitrate:D,minIndex:G}}function nn(a,e){pe.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function ze(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 gt(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 c=Math.min(i.height,i.width);return f.minHeight=Math.min(f.minHeight,c),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(p=>{if(!p)return;const _=e.groups[p];_&&(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 Nt(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 yt(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(Kt(a,r,t))return n}return-1}function Kt(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||xt(i,e.lang))&&(i===void 0||e.assocLang===s)&&(A===void 0||e.default===A)&&(f===void 0||e.forced===f)&&(!("characteristics"in a)||St(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function xt(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function St(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function qt(a,e){const{audioCodec:t,channels:n}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function _n(a,e,t,n,r){const i=e[n],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,c=i.frameRate,p=i.codecSet.substring(0,4),_=xn(e,n,w=>{if(w.videoRange!==f||w.frameRate!==c||w.codecSet.substring(0,4)!==p)return!1;const I=w.audioGroups,D=t.filter(G=>!I||I.indexOf(G.groupId)!==-1);return yt(a,D,r)>-1});return _>-1?_:xn(e,n,w=>{const I=w.audioGroups,D=t.filter(G=>!I||I.indexOf(G.groupId)!==-1);return yt(a,D,r)>-1})}function xn(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 sr(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Sn 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 c=performance.now(),p=i?i.stats:r.stats,_=i?i.duration:r.duration,w=c-p.loading.start,I=s.minAutoLevel,D=r.level,G=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||D<=I){this.clearTimer(),this._nextAutoLevel=-1;return}if(!A)return;const H=G>-1&&G!==D,ue=!!t||H;if(!ue&&(f.paused||!f.playbackRate||!f.readyState))return;const Ie=s.mainForwardBufferInfo;if(!ue&&Ie===null)return;const xe=this.bwEstimator.getEstimateTTFB(),Ye=Math.abs(f.playbackRate);if(w<=Math.max(xe,1e3*(_/(Ye*2))))return;const lt=Ie?Ie.len/Ye:0,kt=p.loading.first?p.loading.first-p.loading.start:-1,it=p.loaded&&kt>-1,wt=this.getBwEstimate(),Bt=s.levels,st=Bt[D],Vt=Math.max(p.loaded,Math.round(_*(r.bitrate||st.averageBitrate)/8));let Cn=it?w-kt:w;Cn<1&&it&&(Cn=Math.min(w,p.loaded*8/wt));const Zn=it?p.loaded*1e3/Cn:0,ar=xe/1e3,Yn=Zn?(Vt-p.loaded)/Zn:Vt*8/wt+ar;if(Yn<=lt)return;const wn=Zn?Zn*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 Bi=Bt[br].maxBitrate,Yr=!Bt[br].details||tr;if(nr=this.getTimeToLoadFrag(ar,wn,_*Bi,Yr),nr<Math.min(lt,_+ar))break}if(nr>=Yn||nr>_*10)return;it?this.bwEstimator.sample(w-Math.min(xe,kt),p.loaded):this.bwEstimator.sampleTTFB(w);const Bn=Bt[br].maxBitrate;this.getBwEstimate()*Hn>Bn&&this.resetEstimator(Bn);const bn=this.findBestLevel(Bn,I,br,0,lt,1,1);bn>-1&&(br=bn),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: ${lt.toFixed(3)} s
|
|
Estimated load time for current fragment: ${Yn.toFixed(3)} s
|
|
Estimated load time for down switch fragment: ${nr.toFixed(3)} s
|
|
TTFB estimate: ${kt|0} ms
|
|
Current BW estimate: ${te(wt)?wt|0:"Unknown"} bps
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
Switching to level ${br} @ ${Bn|0} bps`),s.nextLoadLevel=s.nextAutoLevel=br,this.clearTimer();const $r=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===br&&br>0){const Bi=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${br>0?"and switching down":""}
|
|
Fragment duration: ${r.duration.toFixed(3)} s
|
|
Time to underbuffer: ${Bi.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,br>I){let Yr=this.findBestLevel(this.hls.levels[I].bitrate,I,br,0,Bi,1,1);Yr===-1&&(Yr=I),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Yr,this.resetEstimator(this.hls.levels[Yr].bitrate)}}};H||Yn>nr*2?$r():this.timer=self.setInterval($r,nr*1e3),s.trigger(y.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:p})},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 ee.BUFFER_ADD_CODEC_ERROR:case ee.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case ee.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,c=A.loading.first?A.loading.first-A.loading.start:-1;if(A.loaded&&c>-1){const _=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(f-Math.min(_,c),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;te(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(),c=this.getStarvationDelay();let p=i.abrBandWidthFactor,_=i.abrBandWidthUpFactor;if(c){const H=this.findBestLevel(f,s,r,c,0,p,_);if(H>=0)return this.rebufferNotice=-1,H}let w=A?Math.min(A,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const H=this.bitrateTestDelay;H&&(w=(A?Math.min(A,i.maxLoadingDelay):i.maxLoadingDelay)-H,this.info(`bitrate test took ${Math.round(1e3*H)}ms, set first fragment max fetchDuration to ${Math.round(1e3*w)} ms`),p=_=1)}const I=this.findBestLevel(f,s,r,c,w,p,_);if(this.rebufferNotice!==I&&(this.rebufferNotice=I,this.info(`${c?"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 c=r+i,p=this.lastLoadedFragLevel,_=p===-1?this.hls.firstLevel:p,{fragCurrent:w,partCurrent:I}=this,{levels:D,allAudioTracks:G,loadLevel:H,config:ue}=this.hls;if(D.length===1)return 0;const Ie=D[_],xe=!!((f=this.hls.latestLevelDetails)!=null&&f.live),Ye=H===-1||p===-1;let lt,kt="SDR",it=(Ie==null?void 0:Ie.frameRate)||0;const{audioPreference:wt,videoPreference:Bt}=ue,st=this.audioTracksByGroup||(this.audioTracksByGroup=ze(G));let Vt=-1;if(Ye){if(this.firstSelection!==-1)return this.firstSelection;const wn=this.codecTiers||(this.codecTiers=gt(D,st,t,n)),tr=Gn(wn,kt,e,wt,Bt),{codecSet:Hn,videoRanges:nr,minFramerate:br,minBitrate:Bn,minIndex:bn,preferHDR:$r}=tr;Vt=bn,lt=Hn,kt=$r?nr[nr.length-1]:nr[0],it=br,e=Math.max(e,Bn),this.log(`picked start tier ${gr(tr)}`)}else lt=Ie==null?void 0:Ie.codecSet,kt=Ie==null?void 0:Ie.videoRange;const Cn=I?I.duration:w?w.duration:0,Zn=this.bwEstimator.getEstimateTTFB()/1e3,ar=[];for(let wn=n;wn>=t;wn--){var Yn;const tr=D[wn],Hn=wn>_;if(!tr)continue;if(ue.useMediaCapabilities&&!tr.supportedResult&&!tr.supportedPromise){const Yr=navigator.mediaCapabilities;typeof(Yr==null?void 0:Yr.decodingInfo)=="function"&&mr(tr,st,kt,it,e,wt)?(tr.supportedPromise=Ge(tr,st,Yr,this.supportedCache),tr.supportedPromise.then(oi=>{if(!this.hls)return;tr.supportedResult=oi;const Ts=this.hls.levels,ys=Ts.indexOf(tr);oi.error?this.warn(`MediaCapabilities decodingInfo error: "${oi.error}" for level ${ys} ${gr(oi)}`):oi.supported?oi.decodingInfoResults.some(ga=>ga.smooth===!1||ga.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${ys} not smooth or powerEfficient: ${gr(oi)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${ys} ${gr(oi)}`),ys>-1&&Ts.length>1&&(this.log(`Removing unsupported level ${ys}`),this.hls.removeLevel(ys),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(oi=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${oi}`)})):tr.supportedResult=Jt}if((lt&&tr.codecSet!==lt||kt&&tr.videoRange!==kt||Hn&&it>tr.frameRate||!Hn&&it>0&&it<tr.frameRate||(Yn=tr.supportedResult)!=null&&(Yn=Yn.decodingInfoResults)!=null&&Yn.some(Yr=>Yr.smooth===!1))&&(!Ye||wn!==Vt)){ar.push(wn);continue}const nr=tr.details,br=(I?nr==null?void 0:nr.partTarget:nr==null?void 0:nr.averagetargetduration)||Cn;let Bn;Hn?Bn=A*e:Bn=s*e;const bn=Cn&&r>=Cn*2&&i===0?tr.averageBitrate:tr.maxBitrate,$r=this.getTimeToLoadFrag(Zn,Bn,bn*br,nr===void 0);if(Bn>=bn&&(wn===p||tr.loadError===0&&tr.fragmentError===0)&&($r<=Zn||!te($r)||xe&&!this.bitrateTestDelay||$r<c)){const Yr=this.forcedAutoLevel;return wn!==H&&(Yr===-1||Yr!==H)&&(ar.length&&this.trace(`Skipped level(s) ${ar.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${D[ar[0]].codecs}" ${D[ar[0]].videoRange}; not compatible with "${lt}" ${kt}`),this.info(`switch candidate:${_}->${wn} adjustedbw(${Math.round(Bn)})-bitrate=${Math.round(Bn-bn)} ttfb:${Zn.toFixed(1)} avgDuration:${br.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${$r.toFixed(1)} firstSelection:${Ye} codecSet:${tr.codecSet} videoRange:${tr.videoRange} hls.loadLevel:${H}`)),Ye&&(this.firstSelection=wn),wn}}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 Xn={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 M(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!te(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(Ke(e,t,s))return s}return null}function N(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)&&ve(t,n,i)===0||de(i,a,Math.min(r,n))))return i;const s=Xn.search(e,ve.bind(null,t,n));return s&&(s!==a||!i)?s:i}function de(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 ve(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 Ke(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function tt(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 Xn.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 Et(a){switch(a.details){case ee.FRAG_LOAD_TIMEOUT:case ee.KEY_LOAD_TIMEOUT:case ee.LEVEL_LOAD_TIMEOUT:case ee.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function bt(a,e){const t=Et(e);return a.default[`${t?"timeout":"error"}Retry`]}function $t(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function Dt(a){return F(F({},a),{errorRetry:null,timeoutRetry:null})}function Le(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(rt(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function rt(a){return Ot(a)||!!a&&(a<400||a>499)}function Ot(a){return a===0&&navigator.onLine===!1}var rn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},un={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class en 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 ee.FRAG_LOAD_ERROR:case ee.FRAG_LOAD_TIMEOUT:case ee.KEY_LOAD_ERROR:case ee.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case ee.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=an();return}case ee.FRAG_GAP:case ee.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=rn.SendAlternateToPenaltyBox;return}case ee.LEVEL_EMPTY_ERROR:case ee.LEVEL_PARSING_ERROR:{var s;const f=t.parent===V.MAIN?t.level:r.loadLevel;t.details===ee.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 ee.LEVEL_LOAD_ERROR:case ee.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case ee.AUDIO_TRACK_LOAD_ERROR:case ee.AUDIO_TRACK_LOAD_TIMEOUT:case ee.SUBTITLE_LOAD_ERROR:case ee.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const f=r.loadLevelObj;if(f&&(i.type===Ce.AUDIO_TRACK&&f.hasAudioGroup(i.groupId)||i.type===Ce.SUBTITLE_TRACK&&f.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=rn.SendAlternateToPenaltyBox,t.errorAction.flags=un.MoveAllAlternatesMatchingHost;return}}return;case ee.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:rn.SendAlternateToPenaltyBox,flags:un.MoveAllAlternatesMatchingHDCP};return;case ee.KEY_SYSTEM_SESSION_UPDATE_FAILED:case ee.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case ee.KEY_SYSTEM_NO_SESSION:t.errorAction={action:rn.SendAlternateToPenaltyBox,flags:un.MoveAllAlternatesMatchingKey};return;case ee.BUFFER_ADD_CODEC_ERROR:case ee.REMUX_ALLOC_ERROR:case ee.BUFFER_APPEND_ERROR:if(!t.errorAction){var A;t.errorAction=this.getLevelSwitchAction(t,(A=t.level)!=null?A:r.loadLevel)}return;case ee.INTERNAL_EXCEPTION:case ee.BUFFER_APPENDING_ERROR:case ee.BUFFER_FULL_ERROR:case ee.LEVEL_SWITCH_ERROR:case ee.BUFFER_STALLED_ERROR:case ee.BUFFER_SEEK_OVER_HOLE:case ee.BUFFER_NUDGE_ON_STALL:t.errorAction=an();return}t.type===be.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=an())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=bt(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(Le(r,i,Et(e),e.response))return{action:rn.RetryRequest,flags:un.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=bt(e.details.startsWith("key")?s:i,e),f=t.levels.reduce((p,_)=>p+_.fragmentError,0);if(r&&(e.details!==ee.FRAG_GAP&&r.fragmentError++,Le(A,f,Et(e),e.response)))return{action:rn.RetryRequest,flags:un.None,retryConfig:A,retryCount:f};const c=this.getLevelSwitchAction(e,n);return A&&(c.retryConfig=A,c.retryCount=f),c}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const c=e.details;r.loadError++,c===ee.BUFFER_APPEND_ERROR&&r.fragmentError++;let p=-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,ue=(G===V.AUDIO&&c===ee.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===ee.BUFFER_ADD_CODEC_ERROR||c===ee.BUFFER_APPEND_ERROR))&&_.some(({audioCodec:kt})=>r.audioCodec!==kt),xe=e.sourceBufferName==="video"&&(c===ee.BUFFER_ADD_CODEC_ERROR||c===ee.BUFFER_APPEND_ERROR)&&_.some(({codecSet:kt,audioCodec:it})=>r.codecSet!==kt&&r.audioCodec===it),{type:Ye,groupId:lt}=(s=e.context)!=null?s:{};for(let kt=_.length;kt--;){const it=(kt+w)%_.length;if(it!==w&&it>=I&&it<=D&&_[it].loadError===0){var A,f;const wt=_[it];if(c===ee.FRAG_GAP&&G===V.MAIN&&e.frag){const Bt=_[it].details;if(Bt){const st=N(e.frag,Bt.fragments,e.frag.start);if(st!=null&&st.gap)continue}}else{if(Ye===Ce.AUDIO_TRACK&&wt.hasAudioGroup(lt)||Ye===Ce.SUBTITLE_TRACK&&wt.hasSubtitleGroup(lt))continue;if(G===V.AUDIO&&(A=r.audioGroups)!=null&&A.some(Bt=>wt.hasAudioGroup(Bt))||G===V.SUBTITLE&&(f=r.subtitleGroups)!=null&&f.some(Bt=>wt.hasSubtitleGroup(Bt))||ue&&r.audioCodec===wt.audioCodec||xe&&r.codecSet===wt.codecSet||!ue&&r.codecSet!==wt.codecSet)continue}p=it;break}}if(p>-1&&n.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:rn.SendAlternateToPenaltyBox,flags:un.None,nextAutoLevel:p}}return{action:rn.SendAlternateToPenaltyBox,flags:un.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case rn.DoNothing:break;case rn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==ee.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 rn.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 un.None:this.switchLevel(e,i);break;case un.MoveAllAlternatesMatchingHDCP:{const f=this.getVariantLevelIndex(e.frag),c=t.levels[f],p=c==null?void 0:c.attrs["HDCP-LEVEL"];if(n.hdcpLevel=p,p){t.maxHdcpLevel=li[li.indexOf(p)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case un.MoveAllAlternatesMatchingKey:{const f=e.decryptdata;if(f){const c=this.hls.levels;for(let p=c.length;p--;)if(this.variantHasKey(c[p],f)){var s,A;this.log(`Banned key found in level ${p} (${c[p].bitrate}bps) or audio group "${(s=c[p].audioGroups)==null?void 0:s.join(",")}" (${(A=e.frag)==null?void 0:A.type} fragment) ${ne(f.keyId||[])}`),c[p].fragmentError++,c[p].loadError++,this.log(`Removing level ${p} with key error (${e.error})`),this.hls.removeLevel(p)}c.length&&(n.resolved=!0)}break}}n.resolved||this.switchLevel(e,i)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===ee.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=jn(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 an(a){const e={action:rn.DoNothing,flags:un.None};return a&&(e.resolved=!0),e}var An={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Kn{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 c=f.range[e];if(c){if(c.time.length===0){this.removeFragment(f.body);return}c.time.some(p=>{const _=!this.isTimeBuffered(p.startPTS,p.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=hn(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 c=t[A],p=s||f.partial===!0;i.range[A]=this.getBufferedTimes(n,e.part,p,c)}),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),Fn(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=On(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=hn(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,c=e.maxStartPTS||s;for(let p=0;p<r.length;p++){const _=r.start(p)-this.bufferPadding,w=r.end(p)+this.bufferPadding;if(c>=_&&f<=w){i.time.push({startPTS:Math.max(s,r.start(p)),endPTS:Math.min(A,r.end(p))});break}else if(s<w&&A>_){const I=Math.max(s,r.start(p)),D=Math.min(A,r.end(p));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(c=>{const p=f[c];p&&Fn(p)&&(r=p.body.start-A,i=p.body.end+A,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=p.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Fn(t))}getState(e){const t=hn(e),n=this.fragments[t];return n?n.buffered?Fn(n)?An.PARTIAL:An.OK:An.APPENDING:An.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=hn(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 c=this.activePartLists[A];c||(this.activePartLists[A]=c=[]),c.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=hn(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=hn(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=On(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 Fn(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 hn(a){return`${a.type}_${a.level}_${a.sn}`}function On(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var Ln={cbc:0,ctr:1};class cr{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 Ln.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case Ln.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 zn(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class Rn{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,c=f[0],p=f[1],_=f[2],w=f[3],I=new Uint32Array(256);let D=0,G=0,H=0;for(H=0;H<256;H++)H<128?I[H]=H<<1:I[H]=H<<1^283;for(H=0;H<256;H++){let ue=G^G<<1^G<<2^G<<3^G<<4;ue=ue>>>8^ue&255^99,e[D]=ue,t[ue]=D;const Ie=I[D],xe=I[Ie],Ye=I[xe];let lt=I[ue]*257^ue*16843008;r[D]=lt<<24|lt>>>8,i[D]=lt<<16|lt>>>16,s[D]=lt<<8|lt>>>24,A[D]=lt,lt=Ye*16843009^xe*65537^Ie*257^D*16843008,c[ue]=lt<<24|lt>>>8,p[ue]=lt<<16|lt>>>16,_[ue]=lt<<8|lt>>>24,w[ue]=lt,D?(D=Ie^I[I[I[Ye^Ie]]],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 c=this.keySchedule=new Uint32Array(s),p=this.invKeySchedule=new Uint32Array(s),_=this.sBox,w=this.rcon,I=this.invSubMix,D=I[0],G=I[1],H=I[2],ue=I[3];let Ie,xe;for(A=0;A<s;A++){if(A<i){Ie=c[A]=t[A];continue}xe=Ie,A%i===0?(xe=xe<<8|xe>>>24,xe=_[xe>>>24]<<24|_[xe>>>16&255]<<16|_[xe>>>8&255]<<8|_[xe&255],xe^=w[A/i|0]<<24):i>6&&A%i===4&&(xe=_[xe>>>24]<<24|_[xe>>>16&255]<<16|_[xe>>>8&255]<<8|_[xe&255]),c[A]=Ie=(c[A-i]^xe)>>>0}for(f=0;f<s;f++)A=s-f,f&3?xe=c[A]:xe=c[A-4],f<4||A<=4?p[f]=xe:p[f]=D[_[xe>>>24]]^G[_[xe>>>16&255]]^H[_[xe>>>8&255]]^ue[_[xe&255]],p[f]=p[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],c=A[1],p=A[2],_=A[3],w=this.uint8ArrayToUint32Array_(n);let I=w[0],D=w[1],G=w[2],H=w[3];const ue=new Int32Array(e),Ie=new Int32Array(ue.length);let xe,Ye,lt,kt,it,wt,Bt,st,Vt,Cn,Zn,ar,Yn,wn;const tr=this.networkToHostOrderSwap;for(;t<ue.length;){for(Vt=tr(ue[t]),Cn=tr(ue[t+1]),Zn=tr(ue[t+2]),ar=tr(ue[t+3]),it=Vt^i[0],wt=ar^i[1],Bt=Zn^i[2],st=Cn^i[3],Yn=4,wn=1;wn<r;wn++)xe=f[it>>>24]^c[wt>>16&255]^p[Bt>>8&255]^_[st&255]^i[Yn],Ye=f[wt>>>24]^c[Bt>>16&255]^p[st>>8&255]^_[it&255]^i[Yn+1],lt=f[Bt>>>24]^c[st>>16&255]^p[it>>8&255]^_[wt&255]^i[Yn+2],kt=f[st>>>24]^c[it>>16&255]^p[wt>>8&255]^_[Bt&255]^i[Yn+3],it=xe,wt=Ye,Bt=lt,st=kt,Yn=Yn+4;xe=s[it>>>24]<<24^s[wt>>16&255]<<16^s[Bt>>8&255]<<8^s[st&255]^i[Yn],Ye=s[wt>>>24]<<24^s[Bt>>16&255]<<16^s[st>>8&255]<<8^s[it&255]^i[Yn+1],lt=s[Bt>>>24]<<24^s[st>>16&255]<<16^s[it>>8&255]<<8^s[wt&255]^i[Yn+2],kt=s[st>>>24]<<24^s[it>>16&255]<<16^s[wt>>8&255]<<8^s[Bt&255]^i[Yn+3],Ie[t]=tr(xe^I),Ie[t+1]=tr(kt^D),Ie[t+2]=tr(lt^G),Ie[t+3]=tr(Ye^H),I=Vt,D=Cn,G=Zn,H=ar,t=t+4}return Ie.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=er(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function er(a){switch(a){case Ln.cbc:return"AES-CBC";case Ln.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const wr=16;class Lr{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?zn(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!==Ln.cbc||t.byteLength!==16)return pe.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),A&&(e=vt(A,e),this.remainderData=null);const f=this.getValidChunk(e);if(!f.length)return null;i&&(n=i);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new Rn),c.expandKey(t);const p=s;return this.currentResult=c.decrypt(f.buffer,0,n),this.currentIV=f.slice(-16).buffer,p||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 cr(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(pe.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%wr;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(pe.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Vr=Math.pow(2,17);class Qr{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 pr({type:be.NETWORK_ERROR,details:ee.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(fr(e));return}else e.gap=!1;const c=this.loader=i?new i(r):new s(r),p=Ur(e);e.loader=c;const _=Dt(r.fragLoadPolicy.default),w={loadPolicy:_,timeout:_.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Vr};e.stats=c.stats;const I={onSuccess:(D,G,H,ue)=>{this.resetLoader(e,c);let Ie=D.data;H.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Ie.slice(0,16)),Ie=Ie.slice(16)),A({frag:e,part:null,payload:Ie,networkDetails:ue})},onError:(D,G,H,ue)=>{this.resetLoader(e,c),f(new pr({type:be.NETWORK_ERROR,details:ee.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:H,stats:ue}))},onAbort:(D,G,H)=>{this.resetLoader(e,c),f(new pr({type:be.NETWORK_ERROR,details:ee.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:H,stats:D}))},onTimeout:(D,G,H)=>{this.resetLoader(e,c),f(new pr({type:be.NETWORK_ERROR,details:ee.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${w.timeout}ms`),networkDetails:H,stats:D}))}};t&&(I.onProgress=(D,G,H,ue)=>t({frag:e,part:null,payload:H,networkDetails:ue})),c.load(p,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(fr(e,t));return}const c=this.loader=i?new i(r):new s(r),p=Ur(e,t);e.loader=c;const _=Dt(r.fragLoadPolicy.default),w={loadPolicy:_,timeout:_.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Vr};t.stats=c.stats,c.load(p,w,{onSuccess:(I,D,G,H)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const ue={frag:e,part:t,payload:I.data,networkDetails:H};n(ue),A(ue)},onError:(I,D,G,H)=>{this.resetLoader(e,c),f(new pr({type:be.NETWORK_ERROR,details:ee.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:F({url:p.url,data:void 0},I),error:new Error(`HTTP Error ${I.code} ${I.text}`),networkDetails:G,stats:H}))},onAbort:(I,D,G)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),f(new pr({type:be.NETWORK_ERROR,details:ee.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:G,stats:I}))},onTimeout:(I,D,G)=>{this.resetLoader(e,c),f(new pr({type:be.NETWORK_ERROR,details:ee.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),c=Math.min(Math.round(n.loaded/i),f),_=(f-c)*Math.round(n.loaded/c);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 Ur(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(te(r)&&te(i)){var s;let A=r,f=i;if(a.sn==="initSegment"&&Rr((s=a.decryptdata)==null?void 0:s.method)){const c=i-r;c%16&&(f=i+(16-c%16)),r!==0&&(n.resetIV=!0,A=r-16)}n.rangeStart=A,n.rangeEnd=f}return n}function fr(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:be.MEDIA_ERROR,details:ee.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new pr(n)}function Rr(a){return a==="AES-128"||a==="AES-256"}class pr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Ui 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=Or(),this.buffering={audio:Or(),video:Or(),audiovideo:Or()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function Or(){return{start:0,executeStart:0,executeEnd:0,end:0}}const qr={length:0,start:()=>0,end:()=>0};class Tn{static isBuffered(e,t){if(e){const n=Tn.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=Tn.getBuffered(e);return Tn.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=Tn.bufferedRanges(e);if(r.length)return Tn.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((p,_)=>p.start-_.start||_.end-p.end);let r=-1,i=[];if(n)for(let p=0;p<e.length;p++){t>=e[p].start&&t<=e[p].end&&(r=p);const _=i.length;if(_){const w=i[_-1].end;e[p].start-w<n?e[p].end>w&&(i[_-1].end=e[p].end):i.push(e[p])}else i.push(e[p])}else i=e;let s=0,A,f=t,c=t;for(let p=0;p<i.length;p++){const _=i[p].start,w=i[p].end;if(r===-1&&t>=_&&t<=w&&(r=p),t+n>=_&&t<w)f=_,c=w,s=c-t;else if(t+n<_){A=_;break}}return{len:s,start:f||0,end:c||0,nextStart:A,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||qr}catch(t){return pe.log("failed to get media.buffered",t),qr}}}const Wr=/\{\$([a-zA-Z0-9-_]+)\}/g;function Ti(a){return Wr.test(a)}function Si(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Wr,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 $i(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 ss(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 ls=/^(\d+)x(\d+)$/,ki=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Er{constructor(e,t){typeof e=="string"&&(e=Er.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=ls.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(ki.lastIndex=0;(n=ki.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 c=!1;if(f)A=A.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(f||c))A=Si(t,A);else if(!c&&!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":pe.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=A}return r}}const Gi="com.apple.hls.interstitial";function gs(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Ds(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Ls{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]){pe.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=B(new Er({}),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"]);te(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?(pe.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(te(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===Gi}get isValid(){return!!this.id&&!this._badValueForSameId&&te(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 us=10;class ns{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?te(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||us}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 Qi(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function Ji(a,e){return!a&&!e?!0:!a||!e?!1:Qi(a,e)}function qi(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function Ii(a){switch(a){case"AES-128":case"AES-256":return Ln.cbc;case"AES-256-CTR":return Ln.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function gi(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Ri(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function as(a){const e=Ri(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function es(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 Us(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=gi(s)):t=as(s)}}return t}const ws=typeof self!="undefined"?self:void 0;var ei={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},yi={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Ir(a){switch(a){case yi.FAIRPLAY:return ei.FAIRPLAY;case yi.PLAYREADY:return ei.PLAYREADY;case yi.WIDEVINE:return ei.WIDEVINE;case yi.CLEARKEY:return ei.CLEARKEY}}function In(a){switch(a){case ei.FAIRPLAY:return yi.FAIRPLAY;case ei.PLAYREADY:return yi.PLAYREADY;case ei.WIDEVINE:return yi.WIDEVINE;case ei.CLEARKEY:return yi.CLEARKEY}}function Jn(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[ei.FAIRPLAY,ei.WIDEVINE,ei.PLAYREADY,ei.CLEARKEY].filter(r=>!!e[r]):[];return!n[ei.WIDEVINE]&&t&&n.push(ei.WIDEVINE),n}const ti=function(a){return ws!=null&&(a=ws.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function fi(a,e,t,n){let r;switch(a){case ei.FAIRPLAY:r=["cenc","sinf"];break;case ei.WIDEVINE:case ei.PLAYREADY:r=["cenc"];break;case ei.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return zr(r,e,t,n)}function zr(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 Ys(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Oi(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(s){const A=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(A){const f=gi(A).subarray(0,16);return es(f),f}}return null}let pi={};class Es{static clearKeyUriToKeyIdMap(){pi={}}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&&!qi(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&&Qi(e.keyFormatVersions,this.keyFormatVersions)&&Ji(e.iv,this.iv)&&Ji(e.keyId,this.keyId)}isSupported(){if(this.method){if(qi(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case yi.FAIRPLAY:case yi.WIDEVINE:case yi.PLAYREADY:case yi.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(qi(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(pe.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=Di(e);return new Es(this.method,this.uri,"identity",this.keyFormatVersions,n)}if(this.pssh&&this.keyId)return this;const t=Us(this.uri);if(t)switch(this.keyFormat){case yi.WIDEVINE:if(this.pssh=t,!this.keyId&&t.length>=22){const n=t.length-22;this.keyId=t.subarray(n,n+16)}break;case yi.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=mn(n,null,t),this.keyId=Oi(t);break}default:{let n=t.subarray(0,16);if(n.length!==16){const r=new Uint8Array(16);r.set(n,16-n.length),n=r}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){let n=pi[this.uri];if(!n){const r=Object.keys(pi).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,r),pi[this.uri]=n}this.keyId=n}return this}}function Di(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const Ca=/#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,Rs=/#EXT-X-MEDIA:(.*)/g,Bs=/^#EXT(?:INF|-X-TARGETDURATION):/m,ni=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),na=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 cs{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 Bs.test(e)}static parseMasterPlaylist(e,t){const n=Ti(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];Ca.lastIndex=0;let s;for(;(s=Ca.exec(e))!=null;)if(s[1]){var A;const c=new Er(s[1],r),p=Si(r,s[2]),_={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:cs.resolve(p,t)},w=c.decimalResolution("RESOLUTION");w&&(_.width=w.width,_.height=w.height),Na(c.CODECS,_);const I=c["SUPPLEMENTAL-CODECS"];I&&(_.supplemental={},Na(I,_.supplemental)),(A=_.unknownCodecs)!=null&&A.length||i.push(_),r.levels.push(_)}else if(s[3]){const c=s[3],p=s[4];switch(c){case"SESSION-DATA":{const _=new Er(p,r),w=_["DATA-ID"];w&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[w]=_);break}case"SESSION-KEY":{const _=ra(p,t,r);_.encrypted&&_.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(_)):pe.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const _=new Er(p,r);$i(r,_,t)}break}case"CONTENT-STEERING":{const _=new Er(p,r);r.contentSteering={uri:cs.resolve(_["SERVER-URI"],t),pathwayId:_["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=xa(p);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(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:s.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let f=0;for(Rs.lastIndex=0;(r=Rs.exec(e))!==null;){const c=new Er(r[1],n),p=c.TYPE;if(p){const _=A[p],w=i[p]||[];i[p]=w;const I=c.LANGUAGE,D=c["ASSOC-LANGUAGE"],G=c.CHANNELS,H=c.CHARACTERISTICS,ue=c["INSTREAM-ID"],Ie={attrs:c,bitrate:0,id:f++,groupId:c["GROUP-ID"]||"",name:c.NAME||I||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:I,url:c.URI?cs.resolve(c.URI,t):""};if(D&&(Ie.assocLang=D),G&&(Ie.channels=G),H&&(Ie.characteristics=H),ue&&(Ie.instreamId=ue),_!=null&&_.length){const xe=cs.findGroup(_,Ie.groupId)||_[0];rs(Ie,xe,"audioCodec"),rs(Ie,xe,"textCodec")}w.push(Ie)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var A;const f={url:t},c=new ns(t),p=c.fragments,_=[];let w=null,I=0,D=0,G=0,H=0,ue=0,Ie=null,xe=new mt(r,f),Ye,lt,kt,it=-1,wt=!1,Bt=null,st;if(ni.lastIndex=0,c.m3u8=e,c.hasVariableRefs=Ti(e),((A=ni.exec(e))==null?void 0:A[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(Ye=ni.exec(e))!==null;){wt&&(wt=!1,xe=new mt(r,f),xe.playlistOffset=G,xe.setStart(G),xe.sn=I,xe.cc=H,ue&&(xe.bitrate=ue),xe.level=n,w&&(xe.initSegment=w,w.rawProgramDateTime&&(xe.rawProgramDateTime=w.rawProgramDateTime,w.rawProgramDateTime=null),Bt&&(xe.setByteRange(Bt),Bt=null)));const ar=Ye[1];if(ar){xe.duration=parseFloat(ar);const Yn=(" "+Ye[2]).slice(1);xe.title=Yn||null,xe.tagList.push(Yn?["INF",ar,Yn]:["INF",ar])}else if(Ye[3]){if(te(xe.duration)){xe.playlistOffset=G,xe.setStart(G),kt&&bs(xe,kt,c),xe.sn=I,xe.level=n,xe.cc=H,p.push(xe);const Yn=(" "+Ye[3]).slice(1);xe.relurl=Si(c,Yn),ts(xe,Ie,_),Ie=xe,G+=xe.duration,I++,D=0,wt=!0}}else{if(Ye=Ye[0].match(na),!Ye){pe.warn("No matches on slow regex match for level playlist!");continue}for(lt=1;lt<Ye.length&&Ye[lt]===void 0;lt++);const Yn=(" "+Ye[lt]).slice(1),wn=(" "+Ye[lt+1]).slice(1),tr=Ye[lt+2]?(" "+Ye[lt+2]).slice(1):null;switch(Yn){case"BYTERANGE":Ie?xe.setByteRange(wn,Ie):xe.setByteRange(wn);break;case"PROGRAM-DATE-TIME":xe.rawProgramDateTime=wn,xe.tagList.push(["PROGRAM-DATE-TIME",wn]),it===-1&&(it=p.length);break;case"PLAYLIST-TYPE":c.type&&ps(c,Yn,Ye),c.type=wn.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?ps(c,Yn,Ye):p.length>0&&Sa(c,Yn,Ye),I=c.startSN=parseInt(wn);break;case"SKIP":{c.skippedSegments&&ps(c,Yn,Ye);const Hn=new Er(wn,c),nr=Hn.decimalInteger("SKIPPED-SEGMENTS");if(te(nr)){c.skippedSegments+=nr;for(let Bn=nr;Bn--;)p.push(null);I+=nr}const br=Hn.enumeratedString("RECENTLY-REMOVED-DATERANGES");br&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(br.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&ps(c,Yn,Ye),c.targetduration=Math.max(parseInt(wn),1);break;case"VERSION":c.version!==null&&ps(c,Yn,Ye),c.version=parseInt(wn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||ps(c,Yn,Ye),c.live=!1;break;case"#":(wn||tr)&&xe.tagList.push(tr?[wn,tr]:[wn]);break;case"DISCONTINUITY":H++,xe.tagList.push(["DIS"]);break;case"GAP":xe.gap=!0,xe.tagList.push([Yn]);break;case"BITRATE":xe.tagList.push([Yn,wn]),ue=parseInt(wn)*1e3,te(ue)?xe.bitrate=ue:ue=0;break;case"DATERANGE":{const Hn=new Er(wn,c),nr=new Ls(Hn,c.dateRanges[Hn.ID],c.dateRangeTagCount);c.dateRangeTagCount++,nr.isValid||c.skippedSegments?c.dateRanges[nr.id]=nr:pe.warn(`Ignoring invalid DATERANGE tag: "${wn}"`),xe.tagList.push(["EXT-X-DATERANGE",wn]);break}case"DEFINE":{{const Hn=new Er(wn,c);"IMPORT"in Hn?ss(c,Hn,s):$i(c,Hn,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?ps(c,Yn,Ye):p.length>0&&Sa(c,Yn,Ye),c.startCC=H=parseInt(wn);break;case"KEY":{const Hn=ra(wn,t,c);if(Hn.isSupported()){if(Hn.method==="NONE"){kt=void 0;break}kt||(kt={});const nr=kt[Hn.keyFormat];nr!=null&&nr.matches(Hn)||(nr&&(kt=B({},kt)),kt[Hn.keyFormat]=Hn)}else pe.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${wn}"`);break}case"START":c.startTimeOffset=xa(wn);break;case"MAP":{const Hn=new Er(wn,c);if(xe.duration){const nr=new mt(r,f);Pi(nr,Hn,n,kt),w=nr,xe.initSegment=w,w.rawProgramDateTime&&!xe.rawProgramDateTime&&(xe.rawProgramDateTime=w.rawProgramDateTime)}else{const nr=xe.byteRangeEndOffset;if(nr){const br=xe.byteRangeStartOffset;Bt=`${nr-br}@${br}`}else Bt=null;Pi(xe,Hn,n,kt),w=xe,wt=!0}w.cc=H;break}case"SERVER-CONTROL":{st&&ps(c,Yn,Ye),st=new Er(wn),c.canBlockReload=st.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=st.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&st.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=st.optionalFloat("PART-HOLD-BACK",0),c.holdBack=st.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&ps(c,Yn,Ye);const Hn=new Er(wn);c.partTarget=Hn.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Hn=c.partList;Hn||(Hn=c.partList=[]);const nr=D>0?Hn[Hn.length-1]:void 0,br=D++,Bn=new Er(wn,c),bn=new Gt(Bn,xe,f,br,nr);Hn.push(bn),xe.duration+=bn.duration;break}case"PRELOAD-HINT":{const Hn=new Er(wn,c);c.preloadHint=Hn;break}case"RENDITION-REPORT":{const Hn=new Er(wn,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(Hn);break}default:pe.warn(`line parsed but not handled: ${Ye}`);break}}}Ie&&!Ie.relurl?(p.pop(),G-=Ie.duration,c.partList&&(c.fragmentHint=Ie)):c.partList&&(ts(xe,Ie,_),xe.cc=H,c.fragmentHint=xe,kt&&bs(xe,kt,c)),c.targetduration||(c.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const Vt=p.length,Cn=p[0],Zn=p[Vt-1];if(G+=c.skippedSegments*c.targetduration,G>0&&Vt&&Zn){c.averagetargetduration=G/Vt;const ar=Zn.sn;c.endSN=ar!=="initSegment"?ar:0,c.live||(Zn.endList=!0),it>0&&(Xs(p,it),Cn&&_.unshift(Cn))}return c.fragmentHint&&(G+=c.fragmentHint.duration),c.totalduration=G,_.length&&c.dateRangeTagCount&&Cn&&js(_,c),c.endCC=H,c}}function js(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]],c=f.startDate.getTime();f.tagAnchor=n.ref;for(let p=t;p--;){var s;if(((s=a[p])==null?void 0:s.sn)<e.startSN)break;const _=ks(e,c,a,p,r);if(_!==-1){f.tagAnchor=e.fragments[_].ref;break}}}}function ks(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 c=t[n].sn-a.startSN;if(c<0)return-1;const p=a.fragments;if(p.length>t.length){const w=(t[n+1]||p[p.length-1]).sn-a.startSN;for(let I=w;I>c;I--){const D=p[I].programDateTime;if(e>=D&&e<D+p[I].duration*1e3)return I}}return c}}}return-1}function ra(a,e,t){var n,r;const i=new Er(a,t),s=(n=i.METHOD)!=null?n:"",A=i.URI,f=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,p=(r=i.KEYFORMAT)!=null?r:"identity";A&&i.IV&&!f&&pe.error(`Invalid IV: ${i.IV}`);const _=A?cs.resolve(A,e):"",w=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Es(s,_,p,w,f,i.KEYID)}function xa(a){const t=new Er(a).decimalFloatingPoint("TIME-OFFSET");return te(t)?t:null}function Na(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>$n(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 rs(a,e,t){const n=e[t];n&&(a[t]=n)}function Xs(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 ts(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function Pi(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 bs(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 ps(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 ia(a,e){const t=e.startPTS;if(te(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 Cs(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,c=n;const p=e.startPTS,_=e.endPTS;if(te(p)){const ue=Math.abs(p-t);a&&ue>a.totalduration?s.warn(`media timestamps and playlist times differ by ${ue}s for level ${e.level} ${a.url}`):te(e.deltaPTS)?e.deltaPTS=Math.max(ue,e.deltaPTS):e.deltaPTS=ue,f=Math.max(t,p),t=Math.min(t,p),r=e.startDTS!==void 0?Math.min(r,e.startDTS):r,c=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=c,e.endDTS=i;const I=e.sn;if(!a||I<a.startSN||I>a.endSN)return 0;let D;const G=I-a.startSN,H=a.fragments;for(H[G]=e,D=G;D>0;D--)ia(H[D],H[D-1]);for(D=G;D<H.length-1;D++)ia(H[D],H[D+1]);return a.fragmentHint&&ia(H[H.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,w}function Qs(a,e,t){if(a===e)return;let n=null;const r=a.fragments;for(let p=r.length-1;p>=0;p--){const _=r[p].initSegment;if(_){n=_;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;fs(a,e,(p,_,w,I)=>{if((!e.startCC||e.skippedSegments)&&_.cc!==p.cc){const D=p.cc-_.cc;for(let G=w;G<I.length;G++)I[G].cc+=D;e.endCC=I[I.length-1].cc}te(p.startPTS)&&te(p.endPTS)&&(_.setStart(_.startPTS=p.startPTS),_.startDTS=p.startDTS,_.maxStartPTS=p.maxStartPTS,_.endPTS=p.endPTS,_.endDTS=p.endDTS,_.minEndPTS=p.minEndPTS,_.setDuration(p.endPTS-p.startPTS),_.duration&&(i=_),e.PTSKnown=e.alignedSliding=!0),p.hasStreams&&(_.elementaryStreams=p.elementaryStreams),_.loader=p.loader,p.hasStats&&(_.stats=p.stats),p.initSegment&&(_.initSegment=p.initSegment,n=p.initSegment)});const s=e.fragments,A=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&A.forEach(p=>{var _;p&&(!p.initSegment||p.initSegment.relurl===((_=n)==null?void 0:_.relurl))&&(p.initSegment=n)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(p=>!p),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let p=e.skippedSegments;p--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=ma(a.dateRanges,e,t));const p=a.fragments.filter(_=>_.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let _=1;_<A.length;_++)A[_].programDateTime===null&&ts(A[_],A[_-1],p);js(p,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var f;const p=_a(a,e.startSN-1);e.startCC=(f=p==null?void 0:p.cc)!=null?f:s[0].cc}Os(a.partList,e.partList,(p,_)=>{_.elementaryStreams=p.elementaryStreams,_.stats=p.stats}),i?Cs(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):Ps(a,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const c=e.advancedDateTime;if(e.advanced&&c){const p=e.edge;e.driftStart||(e.driftStartTime=c,e.driftStart=p),e.driftEndTime=c,e.driftEnd=p}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function ma(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 c=i[f],p=new Ls(n[f].attr,c);p.isValid?(i[f]=p,c||(p.tagOrder+=A)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${gr(n[f].attr)}"`)}),i):n}function Os(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 fs(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 c=r;c<=i;c++){const p=f[s+c];let _=A[c];if(n&&!_&&p&&(_=e.fragments[c]=p),p&&_){t(p,_,c,A);const w=p.relurl,I=_.relurl;if(w&&cA(w,I)){e.playlistParsingError=Fa(`media sequence mismatch ${_.sn}:`,a,e,p,_);return}else if(p.cc!==_.cc){e.playlistParsingError=Fa(`discontinuity sequence mismatch (${p.cc}!=${_.cc})`,a,e,p,_);return}}}}function Fa(a,e,t,n,r){return new Error(`${a} ${r.url}
|
|
Playlist starting @${e.startSN}
|
|
${e.m3u8}
|
|
|
|
Playlist starting @${t.startSN}
|
|
${t.m3u8}`)}function Ps(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;Ta(e,s)}function Ta(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 Ha(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 _a(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 is(a,e,t){return a?Ia(a.partList,e,t):null}function Ia(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 Ka(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 cA(a,e){return a!==e&&e?sa(a)!==sa(e):!1}function sa(a){return a.replace(/\?[^?]*$/,"")}function aa(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 Ei(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function jr(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function hi(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)jr(t[n],a);e.fragmentHint&&jr(e.fragmentHint,a),e.alignedSliding=!0}function Vi(a,e){a&&(Ci(e,a),e.alignedSliding||xs(e,a),!e.alignedSliding&&!e.skippedSegments&&Ps(a,e,!1))}function Ci(a,e){if(!Ei(e,a))return;const t=Math.min(e.endCC,a.endCC),n=aa(e.fragments,t),r=aa(a.fragments,t);if(!n||!r)return;pe.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;hi(i,a)}function xs(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=aa(n,s),i=aa(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=aa(t,r.cc)||t[Math.floor(t.length/2)]);const A=r.programDateTime,f=i.programDateTime;if(!A||!f)return;const c=(f-A)/1e3-(i.start-r.start);hi(c,a)}function Mi(a,e,t){Wi(a,e,t),a.addEventListener(e,t)}function Wi(a,e,t){a.removeEventListener(e,t)}const $a={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}},Pt={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 $s extends Ui{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=Pt.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:c,state:p}=this,_=f?f.currentTime:0,w=Tn.bufferInfo(c||f,_,s.maxBufferHole),I=!w.len;if(this.log(`Media seeking to ${te(_)?_.toFixed(3):_}, state: ${p}, ${I?"out of":"in"} buffer`),this.state===Pt.ENDED)this.resetLoadingState();else if(A){const D=s.maxFragLookUpTolerance,G=A.start-D,H=A.start+A.duration+D;if(I||H<w.start||G>w.end){const ue=_>H;(_<G||ue)&&(ue&&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,_),H=this.shouldLoadParts(this.getLevelDetails(),G);H&&(this.log(`LL-Part loading ON after seeking to ${_.toFixed(2)} with buffer @${G.toFixed(2)}`),this.loadingParts=H)}}this.hls.hasEnoughToStart||(this.log(`Setting ${I?"startPosition":"nextLoadPosition"} to ${_} for seek without enough to start`),this.nextLoadPosition=_,I&&(this.startPosition=_)),I&&this.state===Pt.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 Qr(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Lr(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===Pt.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=Pt.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=Tn.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 p=f[f.length-1];return Tn.isBuffered(this.media,p.start+p.duration/2)}const c=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(c)}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;Mi(n,"seeking",this.onMediaSeeking),Mi(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===Pt.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),Wi(r,"seeking",this.onMediaSeeking),Wi(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=Pt.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===Pt.FRAG_LOADING||!this.fragCurrent&&s===Pt.PARSING)&&(this.fragmentTracker.removeFragment(A),this.state=Pt.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===Pt.STOPPED||this.state===Pt.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)===An.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)===An.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&&qi(A.method)){const f=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),A.key.buffer,A.iv.buffer,Ii(A.method)).catch(c=>{throw r.trigger(y.ERROR,{type:be.MEDIA_ERROR,details:ee.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const p=self.performance.now();return r.trigger(y.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:f,tdecrypt:p}}),n.payload=c,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Pt.STOPPED||this.state===Pt.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!==Pt.STOPPED&&(this.state=Pt.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:be.KEY_SYSTEM_ERROR,details:ee.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?$a.toString(Tn.getBuffered(n)):"(detached)"})`),Je(e)){var r;if(e.type!==V.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(A=>!!s[A])){this.state=Pt.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=Pt.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=Pt.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===Pt.KEY_LOADING&&(this.state=Pt.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(Je(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&&Je(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=Pt.FRAG_LOADING;let G;return A?G=A.then(H=>!H||this.fragContextChanged(H.frag)?null:this.doFragPartsLoad(e,D,t,r)).catch(H=>this.handleFragLoadError(H)):G=this.doFragPartsLoad(e,D,t,r).catch(H=>this.handleFragLoadError(H)),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(Je(e)&&this.loadingParts){var c;this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${(c=s.partList)==null?void 0:c.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))}`),te(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Pt.FRAG_LOADING;const p=this.config.progressive;let _;return p&&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,p?r:void 0),A]).then(([w])=>(!p&&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=[],c=(A=n.details)==null?void 0:A.partList,p=_=>{this.fragmentLoader.loadPart(e,_,r).then(w=>{f[_.index]=w;const I=w.part;this.hls.trigger(y.FRAG_LOADED,w);const D=is(n.details,e.sn,_.index+1)||Ia(c,e.sn,_.index+1);if(D)p(D);else return i({frag:e,part:I,partsLoaded:f})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===ee.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===be.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetFragmentLoading(t.frag)):this.hls.trigger(y.ERROR,t)}else this.hls.trigger(y.ERROR,{type:be.OTHER_ERROR,details:ee.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Pt.PARSING){!this.fragCurrent&&this.state!==Pt.STOPPED&&this.state!==Pt.ERROR&&(this.state=Pt.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(),c=A&&n.sn>A.endSN||this.shouldLoadParts(A,n.end);c!==this.loadingParts&&(this.log(`LL-Part loading ${c?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=c),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,c=s>-1?is(f,i,s):null,p=c?c.fragment:_a(f,i,n);return p?(n&&n!==p&&(p.stats=n.stats),{frag:p,part:c,level:A}):null}bufferFragmentData(e,t,n,r,i){if(this.state!==Pt.PARSING)return;const{data1:s,data2:A}=e;let f=s;if(A&&(f=vt(s,A)),!f.length)return;const c=this.initPTS[t.cc],p=c?-c.baseTime/c.timescale:void 0,_={type:e.type,frag:t,part:n,chunkMeta:r,offset:p,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(!Tn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=Tn.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(!te(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=Tn.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 Tn.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 c;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: ${(c=f)==null?void 0:c.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 p=this.filterReplacedPrimary(f,t);if(!p&&f){const _=f.sn-t.startSN;p=this.filterReplacedPrimary(n[_+1]||null,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===An.OK||n===An.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(va(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(va(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 c=e[A];if(s=s&&!c.independent,r>-1&&n<c.start)break;const p=c.loaded;p?r=-1:(i||(c.independent||s)&&c.fragment===t)&&(c.fragment!==t&&this.warn(`Need buffer at ${n} but next unloaded part starts at ${c.start}`),r=A),i=p}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=M(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=tt(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:c}=r,p=n.partList,_=!!(this.loadingParts&&p!=null&&p.length&&f);_&&!this.bitrateTest&&p[p.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-c||(I=this.media)!=null&&I.paused||!this.startFragRequested?0:c;w=N(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===An.OK||G===An.PARTIAL&&w.gap)&&(i=w),i&&w.sn===i.sn&&(!_||p[0].fragment.sn>w.sn||!n.live)&&w.level===i.level){const ue=s[D+1];w.sn<A&&this.fragmentTracker.getState(ue)!==An.OK?w=ue: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&&te(i);if(s||!A&&!i){Vi(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&&te(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&&Je(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!==Pt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Pt.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const ue=this.getCurrentContext(t.chunkMeta);ue&&(t.frag=ue.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===ee.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const A=t.errorAction;if(!A){this.state=Pt.ERROR;return}const{action:f,flags:c,retryCount:p=0,retryConfig:_}=A,w=!!_,I=w&&f===rn.RetryRequest,D=w&&!A.resolved&&c===un.MoveAllAlternatesMatchingHost,G=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!I&&D&&Je(r)&&!r.endList&&G)this.resetFragmentErrors(e),this.treatAsGap(r),A.resolved=!0;else if((I||D)&&p<_.maxNumRetry){var H;const ue=Ot((H=t.response)==null?void 0:H.code),Ie=$t(_,p);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+Ie,this.state=Pt.FRAG_LOADING_WAITING_RETRY,A.resolved=!0,ue){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 ${p+1}/${_.maxNumRetry} in ${Ie}ms`)}else if(_)if(this.resetFragmentErrors(e),p<_.maxNumRetry)!s&&f!==rn.RemoveAlternatePermanently&&(A.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${p})`);return}else f===rn.SendAlternateToPenaltyBox?this.state=Pt.WAITING_LEVEL:this.state=Pt.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!Ot(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Pt.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===Pt.PARSING||this.state===Pt.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!==Pt.STOPPED&&(this.state=Pt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=Tn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Pt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Pt.STOPPED&&(this.state=Pt.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,c)=>{const p=e.elementaryStreams[c];if(p){const _=p.endPTS-p.startPTS;if(_<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${_})`),f||!1;const w=r?0:Cs(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS,this);return this.hls.trigger(y.LEVEL_PTS_UPDATED,{details:i,level:n,drift:w,type:c,frag:e,start:p.startPTS,end:p.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:be.MEDIA_ERROR,details:ee.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=Pt.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 va(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Js{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=fA(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function fA(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 Ga={exports:{}},PA;function fo(){return PA||(PA=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,c,p){this.fn=f,this.context=c,this.once=p||!1}function i(f,c,p,_,w){if(typeof p!="function")throw new TypeError("The listener must be a function");var I=new r(p,_||f,w),D=t?t+c:c;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,c){--f._eventsCount===0?f._events=new n:delete f._events[c]}function A(){this._events=new n,this._eventsCount=0}A.prototype.eventNames=function(){var c=[],p,_;if(this._eventsCount===0)return c;for(_ in p=this._events)e.call(p,_)&&c.push(t?_.slice(1):_);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},A.prototype.listeners=function(c){var p=t?t+c:c,_=this._events[p];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(c){var p=t?t+c:c,_=this._events[p];return _?_.fn?1:_.length:0},A.prototype.emit=function(c,p,_,w,I,D){var G=t?t+c:c;if(!this._events[G])return!1;var H=this._events[G],ue=arguments.length,Ie,xe;if(H.fn){switch(H.once&&this.removeListener(c,H.fn,void 0,!0),ue){case 1:return H.fn.call(H.context),!0;case 2:return H.fn.call(H.context,p),!0;case 3:return H.fn.call(H.context,p,_),!0;case 4:return H.fn.call(H.context,p,_,w),!0;case 5:return H.fn.call(H.context,p,_,w,I),!0;case 6:return H.fn.call(H.context,p,_,w,I,D),!0}for(xe=1,Ie=new Array(ue-1);xe<ue;xe++)Ie[xe-1]=arguments[xe];H.fn.apply(H.context,Ie)}else{var Ye=H.length,lt;for(xe=0;xe<Ye;xe++)switch(H[xe].once&&this.removeListener(c,H[xe].fn,void 0,!0),ue){case 1:H[xe].fn.call(H[xe].context);break;case 2:H[xe].fn.call(H[xe].context,p);break;case 3:H[xe].fn.call(H[xe].context,p,_);break;case 4:H[xe].fn.call(H[xe].context,p,_,w);break;default:if(!Ie)for(lt=1,Ie=new Array(ue-1);lt<ue;lt++)Ie[lt-1]=arguments[lt];H[xe].fn.apply(H[xe].context,Ie)}}return!0},A.prototype.on=function(c,p,_){return i(this,c,p,_,!1)},A.prototype.once=function(c,p,_){return i(this,c,p,_,!0)},A.prototype.removeListener=function(c,p,_,w){var I=t?t+c:c;if(!this._events[I])return this;if(!p)return s(this,I),this;var D=this._events[I];if(D.fn)D.fn===p&&(!w||D.once)&&(!_||D.context===_)&&s(this,I);else{for(var G=0,H=[],ue=D.length;G<ue;G++)(D[G].fn!==p||w&&!D[G].once||_&&D[G].context!==_)&&H.push(D[G]);H.length?this._events[I]=H.length===1?H[0]:H:s(this,I)}return this},A.prototype.removeAllListeners=function(c){var p;return c?(p=t?t+c:c,this._events[p]&&s(this,p)):(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}(Ga)),Ga.exports}var ho=fo(),hA=q(ho);const ya="1.6.11",Ss={};function go(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Fi(){const a=Ss[ya];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 Ss[ya]=r,r}function Va(a){const e=Ss[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 Ss[a]=r,r}function po(a){const e=Ss[a||ya];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete Ss[a||ya],r&&self.URL.revokeObjectURL(r),n.terminate()}}function mo(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 MA(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 NA(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 Aa(a,e){const t=e;let n=0;for(;MA(a,e);){n+=10;const r=NA(a,e+6);n+=r,mo(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function _o(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:be.MEDIA_ERROR,details:ee.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,c="mp4a.40."+A,p=r[s];let _=s;(A===5||A===29)&&(_-=3);const w=[A<<3|(_&14)>>1,(_&1)<<7|f<<3];return pe.log(`manifest codec:${n}, parsed codec:${c}, channels:${f}, rate:${p} (ADTS object type:${A} sampling index:${s})`),{config:w,samplerate:p,channelCount:f,codec:c,parsedCodec:c,manifestCodec:n}}function vo(a,e){return a[e]===255&&(a[e+1]&246)===240}function oa(a,e){return a[e+1]&1?7:9}function dA(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Wa(a,e){return e+5<a.length}function za(a,e){return e+1<a.length&&vo(a,e)}function yo(a,e){return Wa(a,e)&&vo(a,e)&&dA(a,e)<=a.length-e}function sl(a,e){if(za(a,e)){const t=oa(a,e);if(e+t>=a.length)return!1;const n=dA(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||za(a,r)}return!1}function HA(a,e,t,n,r){if(!a.samplerate){const i=_o(e,t,n,r);if(!i)return;B(a,i)}}function wa(a){return 1024*9e4/a}function KA(a,e){const t=oa(a,e);if(e+t<=a.length){const n=dA(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function wo(a,e,t,n,r){const i=wa(a.samplerate),s=n+r*i,A=KA(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 c=e.length-t;return f=new Uint8Array(c),f.set(e.subarray(t,e.length),0),{sample:{unit:f,pts:s},length:c,missing:-1}}function Eo(a,e){return MA(a,e)&&NA(a,e+6)+10<=a.length-e}function al(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 Al(a,e,t,Uint8Array)}function Al(a,e,t,n){const r=ol(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=ll(a)?a.byteOffset:0,A=(s+a.byteLength)/i,f=(s+e)/i,c=Math.floor(Math.max(0,Math.min(f,A))),p=Math.floor(Math.min(c+Math.max(t,0),A));return new n(r,c,p-c)}function ol(a){return a instanceof ArrayBuffer?a:a.buffer}function ll(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function ul(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=et($A(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const A=et($A(a.data,3+n,s));let f;return r==="-->"?f=et($A(a.data,4+n+s)):f=al(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=A,e.data=f,e}function cl(a){if(a.size<2)return;const e=et(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function gA(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=et(a.data.subarray(t),!0);t+=n.length+1;const r=et(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=et(a.data.subarray(1));return{key:a.type,info:"",data:e}}function fl(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=et(a.data.subarray(t),!0);t+=n.length+1;const r=et(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=et(a.data);return{key:a.type,info:"",data:e}}function hl(a){return a.type==="PRIV"?cl(a):a.type[0]==="W"?fl(a):a.type==="APIC"?ul(a):gA(a)}function Bo(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=NA(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const pA=10,dl=10;function mA(a){let e=0;const t=[];for(;MA(a,e);){const n=NA(a,e+6);a[e+5]>>6&1&&(e+=pA),e+=pA;const r=e+n;for(;e+dl<r;){const i=Bo(a.subarray(e)),s=hl(i);s&&t.push(s),e+=i.size+pA}mo(a,e)&&(e+=pA)}return t}function ms(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function gl(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 GA(a){const e=mA(a);for(let t=0;t<e.length;t++){const n=e[t];if(ms(n))return gl(n)}}let hs=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 Gs(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class VA{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=vt(this.cachedData,e),this.cachedData=null);let n=Aa(e,0),r=n?n.length:0,i;const s=this._audioTrack,A=this._id3Track,f=n?GA(n):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&te(f))&&(this.basePTS=Za(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:hs.audioId3,duration:Number.POSITIVE_INFINITY});r<c;){if(this.canParse(e,r)){const p=this.appendFrame(s,e,r);p?(this.frameIndex++,this.lastPTS=p.sample.pts,r+=p.length,i=r):r=c}else Eo(e,r)?(n=Aa(e,r),A.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:hs.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===c&&i!==c){const p=e.slice(i);this.cachedData?this.cachedData=vt(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:Gs(),id3Track:A,textTrack:Gs()}}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:Gs(),id3Track:this._id3Track,textTrack:Gs()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const Za=(a,e,t)=>{if(te(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let qs=null;const WA=[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],pl=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],bo=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ml=[0,1,1,4];function Da(a,e,t,n,r){if(t+24>e.length)return;const i=_A(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 _A(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,c=WA[f*14+r-1]*1e3,_=pl[(t===3?0:t===2?1:2)*3+i],w=A===3?1:2,I=bo[t][n],D=ml[n],G=I*8*D,H=Math.floor(I*c/_+s)*D;if(qs===null){const xe=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);qs=xe?parseInt(xe[1]):0}return!!qs&&qs<=87&&n===2&&c>=224e3&&A===0&&(a[e+3]=a[e+3]|128),{sampleRate:_,channelCount:w,frameLength:H,samplesPerFrame:G}}}function zA(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function Co(a,e){return e+1<a.length&&zA(a,e)}function _l(a,e){return zA(a,e)&&4<=a.length-e}function xo(a,e){if(e+1<a.length&&zA(a,e)){const n=_A(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||Co(a,i)}return!1}class vl extends VA{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=Aa(e,0);let r=(n==null?void 0:n.length)||0;if(xo(e,r))return!1;for(let i=e.length;r<i;r++)if(sl(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return yo(e,t)}appendFrame(e,t,n){HA(e,this.observer,t,n,e.manifestCodec);const r=wo(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const So=(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 Fo extends VA{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=To(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=Aa(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&GA(t)!==void 0&&So(e,n)<16}}function To(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,p=[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+p>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,H=e[t+5]>>3,ue=e[t+5]&7,Ie=new Uint8Array([i<<6|H<<1|ue>>2,(ue&3)<<6|_<<3|I<<2|f>>4,f<<4&224]),xe=1536/A*9e4,Ye=n+r*xe,lt=e.subarray(t,t+p);return a.config=Ie,a.channelCount=G,a.samplerate=A,a.samples.push({unit:lt,pts:Ye}),p}class yl extends VA{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=Aa(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&GA(t)!==void 0&&So(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(xo(e,n))return pe.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return _l(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return Da(e,t,n,this.basePTS,this.frameIndex)}}const wl=/\/emsg[-/]ID3/i;class Ya{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=Gs("video",1),s=this.audioTrack=Gs("audio",1),A=this.txtTrack=Gs("text",1);if(this.id3Track=Gs("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const f=X(e);if(f.video){const{id:c,timescale:p,codec:_,supplemental:w}=f.video;i.id=c,i.timescale=A.timescale=p,i.codec=_,i.supplemental=w}if(f.audio){const{id:c,timescale:p,codec:_}=f.audio;s.id=c,s.timescale=p,s.codec=_}A.id=je.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=vt(this.remainderData,e));const A=Lt(n);this.remainderData=A.remainder,r.samples=A.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=Ct(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=Ct(e,t),{videoTrack:t,audioTrack:Gs(),id3Track:r,textTrack:Gs()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=v(e.samples,["emsg"]);r&&r.forEach(i=>{const s=fn(i);if(wl.test(s.schemeIdUri)){const A=Io(s,t);let f=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;f<=.001&&(f=Number.POSITIVE_INFINITY);const c=s.payload;n.samples.push({data:c,len:c.byteLength,dts:A,pts:A,type:hs.emsg,duration:f})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const A=Io(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:A,pts:A,type:hs.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 Io(a,e){return te(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class El{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Lr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Ln.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 ZA{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,c,p,_,w=-1,I=0;for(i===-1&&(w=0,I=this.getNALuType(t,0),i=0,f=1);f<r;){if(c=t[f++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(p=f-i-1,w>=0){const D={data:t.subarray(w,p),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)),p>0&&(D.data=vt(D.data,t.subarray(0,p)),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=vt(D.data,t))}return e.naluState=i,A}}class ja{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&&pe.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 Bl extends ZA{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(c=>{var p,_;switch(c.type){case 1:{let G=!1;A=!0;const H=c.data;if(f&&H.length>4){const ue=this.readSliceType(H);(ue===2||ue===4||ue===7||ue===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,(p=s)!=null&&p.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(c.data,1,n.pts,t.samples);break}case 7:{var I,D;A=!0,f=!0;const G=c.data,H=this.readSPS(G);if(!e.sps||e.width!==H.width||e.height!==H.height||((I=e.pixelRatio)==null?void 0:I[0])!==H.pixelRatio[0]||((D=e.pixelRatio)==null?void 0:D[1])!==H.pixelRatio[1]){e.width=H.width,e.height=H.height,e.pixelRatio=H.pixelRatio,e.sps=[G];const ue=G.subarray(1,4);let Ie="avc1.";for(let xe=0;xe<3;xe++){let Ye=ue[xe].toString(16);Ye.length<2&&(Ye="0"+Ye),Ie+=Ye}e.codec=Ie}break}case 8:A=!0,e.pps=[c.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(c)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new ja(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 ja(e);let n=0,r=0,i=0,s=0,A,f,c;const p=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),H=t.skipUEG.bind(t),ue=this.skipScalingList.bind(this);p();const Ie=p();if(_(5),D(3),p(),H(),Ie===100||Ie===110||Ie===122||Ie===244||Ie===44||Ie===83||Ie===86||Ie===118||Ie===128){const wt=w();if(wt===3&&D(1),H(),H(),D(1),I())for(f=wt!==3?8:12,c=0;c<f;c++)I()&&(c<6?ue(16,t):ue(64,t))}H();const xe=w();if(xe===0)w();else if(xe===1)for(D(1),G(),G(),A=w(),c=0;c<A;c++)G();H(),D(1);const Ye=w(),lt=w(),kt=_(1);kt===0&&D(1),D(1),I()&&(n=w(),r=w(),i=w(),s=w());let it=[1,1];if(I()&&I())switch(p()){case 1:it=[1,1];break;case 2:it=[12,11];break;case 3:it=[10,11];break;case 4:it=[16,11];break;case 5:it=[40,33];break;case 6:it=[24,11];break;case 7:it=[20,11];break;case 8:it=[32,11];break;case 9:it=[80,33];break;case 10:it=[18,11];break;case 11:it=[15,11];break;case 12:it=[64,33];break;case 13:it=[160,99];break;case 14:it=[4,3];break;case 15:it=[3,2];break;case 16:it=[2,1];break;case 255:{it=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil((Ye+1)*16-n*2-r*2),height:(2-kt)*(lt+1)*16-(kt?2:4)*(i+s),pixelRatio:it}}}class bl extends ZA{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(c=>{var p,_;switch(c.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,(p=s)!=null&&p.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(c.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(c.data)),this.initVPS=c.data),e.vps=[c.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],c.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const I=this.readSPS(c.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,c.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(c.data);for(const D in I)e.params[D]=I[D]}this.pushParameterSet(e.pps,c.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(c)}),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 ja(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 ja(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(),c=t.readUByte(),p=t.readUByte(),_=t.readUByte(),w=t.readUByte(),I=t.readUByte(),D=t.readUByte(),G=t.readUByte(),H=t.readUByte(),ue=t.readUByte(),Ie=[],xe=[];for(let _i=0;_i<n;_i++)Ie.push(t.readBoolean()),xe.push(t.readBoolean());if(n>0)for(let _i=n;_i<8;_i++)t.readBits(2);for(let _i=0;_i<n;_i++)Ie[_i]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),xe[_i]&&t.readUByte();t.readUEG();const Ye=t.readUEG();Ye==3&&t.skipBits(1);const lt=t.readUEG(),kt=t.readUEG(),it=t.readBoolean();let wt=0,Bt=0,st=0,Vt=0;it&&(wt+=t.readUEG(),Bt+=t.readUEG(),st+=t.readUEG(),Vt+=t.readUEG());const Cn=t.readUEG(),Zn=t.readUEG(),ar=t.readUEG(),Yn=t.readBoolean();for(let _i=Yn?0:n;_i<=n;_i++)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 Is=0;Is<4;Is++)for(let pa=0;pa<(Is===3?2:6);pa++)if(!t.readBoolean())t.readUEG();else{const ba=Math.min(64,1<<4+(Is<<1));Is>1&&t.readEG();for(let il=0;il<ba;il++)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 _i=0;_i<Hn;_i++){let Is=!1;if(_i!==0&&(Is=t.readBoolean()),Is){_i===Hn&&t.readUEG(),t.readBoolean(),t.readUEG();let pa=0;for(let uo=0;uo<=nr;uo++){const ba=t.readBoolean();let il=!1;ba||(il=t.readBoolean()),(ba||il)&&pa++}nr=pa}else{const pa=t.readUEG(),uo=t.readUEG();nr=pa+uo;for(let ba=0;ba<pa;ba++)t.readUEG(),t.readBoolean();for(let ba=0;ba<uo;ba++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const _i=t.readUEG();for(let Is=0;Is<_i;Is++){for(let pa=0;pa<ar+4;pa++)t.readBits(1);t.readBits(1)}}let Bn=0,bn=1,$r=1,Bi=!0,Yr=1,oi=0;t.readBoolean(),t.readBoolean();let Ts=!1;if(t.readBoolean()){if(t.readBoolean()){const co=t.readUByte(),Ic=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Nu=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];co>0&&co<16?(bn=Ic[co-1],$r=Nu[co-1]):co===255&&(bn=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(),Ts=t.readBoolean(),Ts&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(Yr=t.readBits(32),oi=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const Nu=t.readBoolean(),Dc=t.readBoolean();let zl=!1;(Nu||Dc)&&(zl=t.readBoolean(),zl&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),zl&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let Lc=0;Lc<=n;Lc++){Bi=t.readBoolean();const Mc=Bi||t.readBoolean();let Uc=!1;Mc?t.readEG():Uc=t.readBoolean();const Rc=Uc?1:t.readUEG()+1;if(Nu)for(let Zl=0;Zl<Rc;Zl++)t.readUEG(),t.readUEG(),zl&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(Dc)for(let Zl=0;Zl<Rc;Zl++)t.readUEG(),t.readUEG(),zl&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Bn=t.readUEG())}let ga=lt,Ma=kt;if(it){let _i=1,Is=1;Ye===1?_i=Is=2:Ye==2&&(_i=2),ga=lt-_i*Bt-_i*wt,Ma=kt-Is*Vt-Is*st}const lo=r?["A","B","C"][r]:"",Pc=A<<24|f<<16|c<<8|p;let Cc=0;for(let _i=0;_i<32;_i++)Cc=(Cc|(Pc>>_i&1)<<31-_i)>>>0;let xc=Cc.toString(16);return s===1&&xc==="2"&&(xc="6"),{codecString:`hvc1.${lo}${s}.${xc}.${i?"H":"L"}${ue}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[A,f,c,p],general_constraint_indicator_flags:[_,w,I,D,G,H],general_level_idc:ue,bit_depth:Cn+8,bit_depth_luma_minus8:Cn,bit_depth_chroma_minus8:Zn,min_spatial_segmentation_idc:Bn,chroma_format_idc:Ye,frame_rate:{fixed:Bi,fps:oi/Yr}},width:ga,height:Ma,pixelRatio:[bn,$r]}}readPPS(e){const t=new ja(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 Yi=188;class la{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=la.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(Yi*5,t-Yi)+1,r=0;for(;r<n;){let i=!1,s=-1,A=0;for(let f=r;f<t;f+=Yi)if(e[f]===71&&(t-f===Yi||e[f+Yi]===71)){if(A++,s===-1&&(s=f,s!==0&&(n=Math.min(s+Yi*99,e.length-Yi)+1)),i||(i=Xa(e,f)===0),i&&A>1&&(s===0&&A>2||f+Yi>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:je[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=la.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=la.createTrack("audio",r),this._id3Track=la.createTrack("id3"),this._txtTrack=la.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,c=this._txtTrack;let p=s.pid,_=s.pesData,w=A.pid,I=f.pid,D=A.pesData,G=f.pesData,H=null,ue=this.pmtParsed,Ie=this._pmtId,xe=e.length;if(this.remainderData&&(e=vt(this.remainderData,e),xe=e.length,this.remainderData=null),xe<Yi&&!r)return this.remainderData=e,{audioTrack:A,videoTrack:s,id3Track:f,textTrack:c};const Ye=Math.max(0,la.syncOffset(e));xe-=(xe-Ye)%Yi,xe<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,xe,e.buffer.byteLength-xe));let lt=0;for(let it=Ye;it<xe;it+=Yi)if(e[it]===71){const wt=!!(e[it+1]&64),Bt=Xa(e,it),st=(e[it+3]&48)>>4;let Vt;if(st>1){if(Vt=it+5+e[it+4],Vt===it+Yi)continue}else Vt=it+4;switch(Bt){case p:wt&&(_&&(i=Ja(_,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),_={data:[],size:0}),_&&(_.data.push(e.subarray(Vt,it+Yi)),_.size+=it+Yi-Vt);break;case w:if(wt){if(D&&(i=Ja(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(Vt,it+Yi)),D.size+=it+Yi-Vt);break;case I:wt&&(G&&(i=Ja(G,this.logger))&&this.parseID3PES(f,i),G={data:[],size:0}),G&&(G.data.push(e.subarray(Vt,it+Yi)),G.size+=it+Yi-Vt);break;case 0:wt&&(Vt+=e[Vt]+1),Ie=this._pmtId=Do(e,Vt);break;case Ie:{wt&&(Vt+=e[Vt]+1);const Cn=Cl(e,Vt,this.typeSupported,n,this.observer,this.logger);p=Cn.videoPid,p>0&&(s.pid=p,s.segmentCodec=Cn.segmentVideoCodec),w=Cn.audioPid,w>0&&(A.pid=w,A.segmentCodec=Cn.segmentAudioCodec),I=Cn.id3Pid,I>0&&(f.pid=I),H!==null&&!ue&&(this.logger.warn(`MPEG-TS PMT found at ${it} after unknown PID '${H}'. Backtracking to sync byte @${Ye} to parse all TS packets.`),H=null,it=Ye-188),ue=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=Bt;break}}else lt++;lt>0&&Ni(this.observer,new Error(`Found ${lt} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=_,A.pesData=D,f.pesData=G;const kt={audioTrack:A,videoTrack:s,id3Track:f,textTrack:c};return r&&this.extractRemainingSamples(kt),kt}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 c;if(s&&(c=Ja(s,this.logger))?(this.readyVideoParser(n.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(n,i,c,!0),n.pesData=null)):n.pesData=s,A&&(c=Ja(A,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,c);break;case"mp3":this.parseMPEGPES(t,c);break;case"ac3":this.parseAC3PES(t,c);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&&(c=Ja(f,this.logger))?(this.parseID3PES(r,c),r.pesData=null):r.pesData=f}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new El(this.observer,this.config,t);return this.decrypt(r,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new Bl:e==="hevc"&&(this.videoParser=new bl))}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=vt(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&&!za(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",Ni(this.observer,new Error(_),w,this.logger),!w)return}HA(e,this.observer,i,s,this.audioCodec);let f;if(t.pts!==void 0)f=t.pts;else if(r){const _=wa(e.samplerate);f=r.sample.pts+_}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,p;for(;s<A;)if(p=wo(e,i,s,f,c),s+=p.length,p.missing){this.aacOverFlow=p;break}else for(c++;s<A-1&&!za(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(Co(n,s)){const f=Da(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=To(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?hs.emsg:hs.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function Xa(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Do(a,e){return(a[e+10]&31)<<8|a[e+11]}function Cl(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,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<f;){const p=Xa(a,e),_=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){YA("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=p);break;case 21:s.id3Pid===-1&&(s.id3Pid=p);break;case 219:if(!n){YA("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=p);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=p,s.segmentAudioCodec="mp3");break;case 193:if(!n){YA("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=p,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=p,s.segmentAudioCodec="ac3");break}const G=a[w+1]+2;w+=G,I-=G}}break;case 194:case 135:return Ni(r,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=p,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=_+5}return s}function Ni(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(y.ERROR,y.ERROR,{type:be.MEDIA_ERROR,details:ee.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function YA(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Ja(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]=vt(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 p=n[7];p&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,p&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 Lo{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 ea=Math.pow(2,32)-1;class ut{static init(){ut.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 ut.types)ut.types.hasOwnProperty(e)&&(ut.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]);ut.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]);ut.STTS=ut.STSC=ut.STCO=i,ut.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ut.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ut.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),ut.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]);ut.FTYP=ut.box(ut.types.ftyp,s,f,s,A),ut.DINF=ut.box(ut.types.dinf,ut.box(ut.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 ut.box(ut.types.hdlr,ut.HDLR_TYPES[e])}static mdat(e){return ut.box(ut.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(ea+1)),r=Math.floor(t%(ea+1));return ut.box(ut.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 ut.box(ut.types.mdia,ut.mdhd(e.timescale||0,e.duration||0),ut.hdlr(e.type),ut.minf(e))}static mfhd(e){return ut.box(ut.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"?ut.box(ut.types.minf,ut.box(ut.types.smhd,ut.SMHD),ut.DINF,ut.stbl(e)):ut.box(ut.types.minf,ut.box(ut.types.vmhd,ut.VMHD),ut.DINF,ut.stbl(e))}static moof(e,t,n){return ut.box(ut.types.moof,ut.mfhd(e),ut.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=ut.trak(e[t]);return ut.box.apply(null,[ut.types.moov,ut.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(ut.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=ut.trex(e[t]);return ut.box.apply(null,[ut.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(ea+1)),r=Math.floor(t%(ea+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 ut.box(ut.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 ut.box(ut.types.sdtp,n)}static stbl(e){return ut.box(ut.types.stbl,ut.stsd(e),ut.box(ut.types.stts,ut.STTS),ut.box(ut.types.stsc,ut.STSC),ut.box(ut.types.stsz,ut.STSZ),ut.box(ut.types.stco,ut.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=ut.box(ut.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,c=e.height,p=e.pixelRatio[0],_=e.pixelRatio[1];return ut.box(ut.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,c>>8&255,c&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,ut.box(ut.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ut.box(ut.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&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 ut.box(ut.types.mp4a,ut.audioStsd(e),ut.box(ut.types.esds,ut.esds(e)))}static mp3(e){return ut.box(ut.types[".mp3"],ut.audioStsd(e))}static ac3(e){return ut.box(ut.types["ac-3"],ut.audioStsd(e),ut.box(ut.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return ut.box(ut.types.stsd,ut.STSD,ut.mp4a(e));if(t==="ac3"&&e.config)return ut.box(ut.types.stsd,ut.STSD,ut.ac3(e));if(t==="mp3"&&e.codec==="mp3")return ut.box(ut.types.stsd,ut.STSD,ut.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return ut.box(ut.types.stsd,ut.STSD,ut.avc1(e));if(t==="hevc"&&e.vps)return ut.box(ut.types.stsd,ut.STSD,ut.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/(ea+1)),A=Math.floor(n%(ea+1));return ut.box(ut.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=ut.sdtp(e),r=e.id,i=Math.floor(t/(ea+1)),s=Math.floor(t%(ea+1));return ut.box(ut.types.traf,ut.box(ut.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),ut.box(ut.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])),ut.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,ut.box(ut.types.trak,ut.tkhd(e),ut.mdia(e))}static trex(e){const t=e.id;return ut.box(ut.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,c,p,_,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],c=f.duration,p=f.size,_=f.flags,w=f.cts,s.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,p>>>24&255,p>>>16&255,p>>>8&255,p&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 ut.box(ut.types.trun,s)}static initSegment(e){ut.types||ut.init();const t=ut.moov(e);return vt(ut.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 c=ut.box(ut.types.hvcC,A),p=e.width,_=e.height,w=e.pixelRatio[0],I=e.pixelRatio[1];return ut.box(ut.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,p>>8&255,p&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]),c,ut.box(ut.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ut.box(ut.types.pasp,new Uint8Array([w>>24,w>>16&255,w>>8&255,w&255,I>>24,I>>16&255,I>>8&255,I&255])))}}ut.types=void 0,ut.HDLR_TYPES=void 0,ut.STTS=void 0,ut.STSC=void 0,ut.STCO=void 0,ut.STSZ=void 0,ut.VMHD=void 0,ut.SMHD=void 0,ut.STSD=void 0,ut.FTYP=void 0,ut.DINF=void 0;const vA=9e4;function yA(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function Yl(a,e,t=1,n=!1){return yA(a,e,1/t,n)}function La(a,e=!1){return yA(a,1e3,1/vA,e)}function Uo(a,e=1){return yA(a,vA,1/e)}const Ro=10*1e3,ko=1024,jA=1152,Mn=1536;let Ua=null,XA=null;function JA(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 _s 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,Ua===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Ua=s?parseInt(s[1]):0}if(XA===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);XA=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=Fs(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 c,p,_,w,I,D,G=i,H=i;const ue=e.pid>-1,Ie=t.pid>-1,xe=t.samples.length,Ye=e.samples.length>0,lt=A&&xe>0||xe>1;if((!ue||Ye)&&(!Ie||lt)||this.ISGenerated||A){if(this.ISGenerated){var it,wt,Bt,st;const ar=this.videoTrackConfig;(ar&&(t.width!==ar.width||t.height!==ar.height||((it=t.pixelRatio)==null?void 0:it[0])!==((wt=ar.pixelRatio)==null?void 0:wt[0])||((Bt=t.pixelRatio)==null?void 0:Bt[1])!==((st=ar.pixelRatio)==null?void 0:st[1]))||!ar&<||this.nextAudioTs===null&&Ye)&&this.resetInitSegment()}this.ISGenerated||(_=this.generateIS(e,t,i,s));const Vt=this.isVideoContiguous;let Cn=-1,Zn;if(lt&&(Cn=Qo(t.samples),!Vt&&this.config.forceKeyFrameOnDiscontinuity))if(D=!0,Cn>0){this.warn(`Dropped ${Cn} out of ${xe} video samples due to a missing keyframe`);const ar=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Cn),t.dropped+=Cn,H+=(t.samples[0].pts-ar)/t.inputTimeScale,Zn=H}else Cn===-1&&(this.warn(`No keyframe found out of ${xe} video samples`),D=!1);if(this.ISGenerated){if(Ye&<){const ar=this.getVideoStartPts(t.samples),wn=(Fs(e.samples[0].pts,ar)-ar)/t.inputTimeScale;G+=Math.max(0,wn),H+=Math.max(0,-wn)}if(Ye){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),_=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,G,this.isAudioContiguous,s,Ie||lt||f===V.AUDIO?H:void 0),lt){const ar=p?p.endPTS-p.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),_=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,H,Vt,ar)}}else lt&&(c=this.remuxVideo(t,H,Vt,0));c&&(c.firstKeyFrame=Cn,c.independent=Cn!==-1,c.firstKeyFramePTS=Zn)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(I=Ra(n,i,this._initPTS,this._initDTS)),r.samples.length&&(w=wA(r,i,this._initPTS))),{audio:p,video:c,initSegment:_,independent:D,text:w,id3:I}}generateIS(e,t,n,r){const i=e.samples,s=t.samples,A=this.typeSupported,f={},c=this._initPTS;let p=!c||r,_="audio/mp4",w,I,D,G=-1;if(p&&(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):ut.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(G=e.id,D=e.inputTimeScale,!c||D!==c.timescale?w=I=i[0].pts-Math.round(D*n):p=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,f.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:ut.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(G=t.id,D=t.inputTimeScale,!c||D!==c.timescale){const H=this.getVideoStartPts(s),ue=Math.round(D*n);I=Math.min(I,Fs(s[0].dts,H)-ue),w=Math.min(w,H-ue)}else p=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(f).length)return this.ISGenerated=!0,p?(c&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${w/D} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.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,c=this._initPTS,p=c.baseTime*i/c.timescale;let _=this.nextVideoTs,w=8,I=this.videoSampleDuration,D,G,H=Number.POSITIVE_INFINITY,ue=Number.NEGATIVE_INFINITY,Ie=!1;if(!n||_===null){const Bn=p+t*i,bn=s[0].pts-Fs(s[0].dts,s[0].pts);Ua&&_!==null&&Math.abs(Bn-bn-(_+p))<15e3?n=!0:_=Bn-bn-p}const xe=_+p;for(let Bn=0;Bn<f;Bn++){const bn=s[Bn];bn.pts=Fs(bn.pts,xe),bn.dts=Fs(bn.dts,xe),bn.dts<s[Bn>0?Bn-1:Bn].dts&&(Ie=!0)}Ie&&s.sort(function(Bn,bn){const $r=Bn.dts-bn.dts,Bi=Bn.pts-bn.pts;return $r||Bi}),D=s[0].dts,G=s[s.length-1].dts;const Ye=G-D,lt=Ye?Math.round(Ye/(f-1)):I||e.inputTimeScale/30;if(n){const Bn=D-xe,bn=Bn>lt,$r=Bn<-1;if((bn||$r)&&(bn?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${La(Bn,!0)} ms (${Bn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${La(-Bn,!0)} ms (${Bn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!$r||xe>=s[0].pts||Ua)){D=xe;const Bi=s[0].pts-Bn;if(bn)s[0].dts=D,s[0].pts=Bi;else{let Yr=!0;for(let oi=0;oi<s.length&&!(s[oi].dts>Bi&&Yr);oi++){const Ts=s[oi].pts;if(s[oi].dts-=Bn,s[oi].pts-=Bn,oi<s.length-1){const ys=s[oi+1].pts,ga=s[oi].pts,Ma=ys<=ga,lo=ys<=Ts;Yr=Ma==lo}}}this.log(`Video: Initial PTS/DTS adjusted: ${La(Bi,!0)}/${La(D,!0)}, delta: ${La(Bn,!0)} ms`)}}D=Math.max(0,D);let kt=0,it=0,wt=D;for(let Bn=0;Bn<f;Bn++){const bn=s[Bn],$r=bn.units,Bi=$r.length;let Yr=0;for(let oi=0;oi<Bi;oi++)Yr+=$r[oi].data.length;it+=Yr,kt+=Bi,bn.length=Yr,bn.dts<wt?(bn.dts=wt,wt+=lt/4|0||1):wt=bn.dts,H=Math.min(bn.pts,H),ue=Math.max(bn.pts,ue)}G=s[f-1].dts;const Bt=it+4*kt+8;let st;try{st=new Uint8Array(Bt)}catch(Bn){this.observer.emit(y.ERROR,y.ERROR,{type:be.MUX_ERROR,details:ee.REMUX_ALLOC_ERROR,fatal:!1,error:Bn,bytes:Bt,reason:`fail allocating video mdat ${Bt}`});return}const Vt=new DataView(st.buffer);Vt.setUint32(0,Bt),st.set(ut.types.mdat,4);let Cn=!1,Zn=Number.POSITIVE_INFINITY,ar=Number.POSITIVE_INFINITY,Yn=Number.NEGATIVE_INFINITY,wn=Number.NEGATIVE_INFINITY;for(let Bn=0;Bn<f;Bn++){const bn=s[Bn],$r=bn.units;let Bi=0;for(let Ts=0,ys=$r.length;Ts<ys;Ts++){const ga=$r[Ts],Ma=ga.data,lo=ga.data.byteLength;Vt.setUint32(w,lo),w+=4,st.set(Ma,w),w+=lo,Bi+=4+lo}let Yr;if(Bn<f-1)I=s[Bn+1].dts-bn.dts,Yr=s[Bn+1].pts-bn.pts;else{const Ts=this.config,ys=Bn>0?bn.dts-s[Bn-1].dts:lt;if(Yr=Bn>0?bn.pts-s[Bn-1].pts:lt,Ts.stretchShortVideoTrack&&this.nextAudioTs!==null){const ga=Math.floor(Ts.maxBufferHole*i),Ma=(r?H+r*i:this.nextAudioTs+p)-bn.pts;Ma>ga?(I=Ma-ys,I<0?I=ys:Cn=!0,this.log(`It is approximately ${Ma/90} ms to the next segment; using duration ${I/90} ms for the last video frame.`)):I=ys}else I=ys}const oi=Math.round(bn.pts-bn.dts);Zn=Math.min(Zn,I),Yn=Math.max(Yn,I),ar=Math.min(ar,Yr),wn=Math.max(wn,Yr),A.push(JA(bn.key,I,Bi,oi))}if(A.length){if(Ua){if(Ua<70){const Bn=A[0].flags;Bn.dependsOn=2,Bn.isNonSync=0}}else if(XA&&wn-ar<Yn-Zn&</Yn<.025&&A[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Bn=D;for(let bn=0,$r=A.length;bn<$r;bn++){const Bi=Bn+A[bn].duration,Yr=Bn+A[bn].cts;if(bn<$r-1){const oi=Bi+A[bn+1].cts;A[bn].duration=oi-Yr}else A[bn].duration=bn?A[bn-1].duration:lt;A[bn].cts=0,Bn=Bi}}}I=Cn||!I?lt:I;const tr=G+I;this.nextVideoTs=_=tr-p,this.videoSampleDuration=I,this.isVideoContiguous=!0;const br={data1:ut.moof(e.sequenceNumber++,D,B(e,{samples:A})),data2:st,startPTS:(H-p)/i,endPTS:(ue+I-p)/i,startDTS:(D-p)/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 jA;case"ac3":return Mn;default:return ko}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,A=e.samplerate?e.samplerate:s,f=s/A,c=this.getSamplesPerFrame(e),p=c*f,_=this._initPTS,w=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,I=[],D=i!==void 0;let G=e.samples,H=w?0:8,ue=this.nextAudioTs||-1;const Ie=_.baseTime*s/_.timescale,xe=Ie+t*s;if(this.isAudioContiguous=n=n||G.length&&ue>0&&(r&&Math.abs(xe-(ue+Ie))<9e3||Math.abs(Fs(G[0].pts,xe)-(ue+Ie))<20*p),G.forEach(function(wn){wn.pts=Fs(wn.pts,xe)}),!n||ue<0){if(G=G.filter(wn=>wn.pts>=0),!G.length)return;i===0?ue=0:r&&!D?ue=Math.max(0,xe-Ie):ue=G[0].pts-Ie}if(e.segmentCodec==="aac"){const wn=this.config.maxAudioFramesDrift;for(let tr=0,Hn=ue+Ie;tr<G.length;tr++){const nr=G[tr],br=nr.pts,Bn=br-Hn,bn=Math.abs(1e3*Bn/s);if(Bn<=-wn*p&&D)tr===0&&(this.warn(`Audio frame @ ${(br/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*Bn/s)} ms.`),this.nextAudioTs=ue=br-Ie,Hn=br);else if(Bn>=wn*p&&bn<Ro&&D){let $r=Math.round(Bn/p);for(Hn=br-$r*p;Hn<0&&$r&&p;)$r--,Hn+=p;tr===0&&(this.nextAudioTs=ue=Hn-Ie),this.warn(`Injecting ${$r} audio frames @ ${((Hn-Ie)/s).toFixed(3)}s due to ${Math.round(1e3*Bn/s)} ms gap.`);for(let Bi=0;Bi<$r;Bi++){let Yr=Lo.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Yr||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Yr=nr.unit.subarray()),G.splice(tr,0,{unit:Yr,pts:Hn}),Hn+=p,tr++}}nr.pts=Hn,Hn+=p}}let Ye=null,lt=null,kt,it=0,wt=G.length;for(;wt--;)it+=G[wt].unit.byteLength;for(let wn=0,tr=G.length;wn<tr;wn++){const Hn=G[wn],nr=Hn.unit;let br=Hn.pts;if(lt!==null){const bn=I[wn-1];bn.duration=Math.round((br-lt)/f)}else if(n&&e.segmentCodec==="aac"&&(br=ue+Ie),Ye=br,it>0){it+=H;try{kt=new Uint8Array(it)}catch(bn){this.observer.emit(y.ERROR,y.ERROR,{type:be.MUX_ERROR,details:ee.REMUX_ALLOC_ERROR,fatal:!1,error:bn,bytes:it,reason:`fail allocating audio mdat ${it}`});return}w||(new DataView(kt.buffer).setUint32(0,it),kt.set(ut.types.mdat,4))}else return;kt.set(nr,H);const Bn=nr.byteLength;H+=Bn,I.push(JA(!0,c,Bn,0)),lt=br}const Bt=I.length;if(!Bt)return;const st=I[I.length-1];ue=lt-Ie,this.nextAudioTs=ue+f*st.duration;const Vt=w?new Uint8Array(0):ut.moof(e.sequenceNumber++,Ye/f,B({},e,{samples:I}));e.samples=[];const Cn=(Ye-Ie)/s,Zn=ue/s,Yn={data1:Vt,data2:kt,startPTS:Cn,endPTS:Zn,startDTS:Cn,endDTS:Zn,type:"audio",hasAudio:!0,hasVideo:!1,nb:Bt};return this.isAudioContiguous=!0,Yn}}function Fs(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 Qo(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function Ra(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=Fs(f.pts-t.baseTime*i/t.timescale,e*i)/i,f.dts=Fs(f.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function wA(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=Fs(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 xl 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)ft(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=ua(i,W.AUDIO,this)),s&&(r=ua(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:c,lastEndTime:p}=this;const _={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};te(p)||(p=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=_t(w,D,this),H=D.audio?G[D.audio.id]:null,ue=D.video?G[D.video.id]:null,Ie=EA(ue,1/0),xe=EA(H,1/0),Ye=EA(ue,0,!0),lt=EA(H,0,!0);let kt=i,it=0;const wt=H&&(!ue||!c&&xe<Ie||c&&c.trackId===D.audio.id),Bt=wt?H:ue;if(Bt){const Hn=Bt.timescale,nr=Bt.start-i*Hn,br=wt?D.audio.id:D.video.id;kt=Bt.start/Hn,it=wt?lt-xe:Ye-Ie,(s||!c)&&(Oo(c,kt,i,it)||Hn!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${nr/Hn} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${kt-i} (${nr}/${Hn}) trackId: ${br}`),c=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}`);c?(I.initPTS=c.baseTime,I.timescale=c.timescale,I.trackId=c.trackId):((!I.timescale||I.trackId===void 0||I.initPTS===void 0)&&(this.warn("Could not set initPTS"),I.initPTS=kt,I.timescale=1,I.trackId=-1),this.initPTS=c={baseTime:I.initPTS,timescale:I.timescale,trackId:I.trackId});const st=kt-c.baseTime/c.timescale,Vt=st+it;it>0?this.lastEndTime=Vt:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const Cn=!!D.audio,Zn=!!D.video;let ar="";Cn&&(ar+="audio"),Zn&&(ar+="video");const Yn=(D.audio?D.audio.encrypted:!1)||(D.video?D.video.encrypted:!1),wn={data1:w,startPTS:st,startDTS:st,endPTS:Vt,endDTS:Vt,type:ar,hasAudio:Cn,hasVideo:Zn,nb:1,dropped:0,encrypted:Yn};_.audio=Cn&&!Zn?wn:void 0,_.video=Zn?wn:void 0;const tr=ue==null?void 0:ue.sampleCount;if(tr){const Hn=ue.keyFrameIndex,nr=Hn!==-1;wn.nb=tr,wn.dropped=Hn===0||this.isVideoContiguous?0:nr?Hn:tr,wn.independent=nr,wn.firstKeyFrame=Hn,nr&&ue.keyFrameStart&&(wn.firstKeyFramePTS=(ue.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(_.independent=nr),this.isVideoContiguous||(this.isVideoContiguous=nr),wn.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${Hn}/${tr} dropped: ${wn.dropped} start: ${wn.firstKeyFramePTS||"NA"}`)}return _.initSegment=I,_.id3=Ra(n,i,c,c),r.samples.length&&(_.text=wA(r,i,c)),_}}function EA(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function Oo(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 ua(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"?me(n,!1):(t.warn(`Unhandled audio codec "${n}" in mp4 MAP`),n||"mp4a"):(t.warn(`Unhandled video codec "${n}" in mp4 MAP`),n||"avc1")}let As;try{As=self.performance.now.bind(self.performance)}catch(a){As=Date.now}const qa=[{demux:Ya,remux:xl},{demux:la,remux:_s},{demux:vl,remux:_s},{demux:yl,remux:_s}];qa.splice(2,0,{demux:Fo,remux:_s});class qA{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=As();let s=new Uint8Array(e);const{currentTransmuxState:A,transmuxConfig:f}=this;r&&(this.currentTransmuxState=r);const{contiguous:c,discontinuity:p,trackSwitch:_,accurateTimeOffset:w,timeOffset:I,initSegmentChange:D}=r||A,{audioCodec:G,videoCodec:H,defaultInitPts:ue,duration:Ie,initSegmentData:xe}=f,Ye=Po(s,t);if(Ye&&qi(Ye.method)){const wt=this.getDecrypter(),Bt=Ii(Ye.method);if(wt.isSync()){let st=wt.softwareDecrypt(s,Ye.key.buffer,Ye.iv.buffer,Bt);if(n.part>-1){const Cn=wt.flush();st=Cn&&Cn.buffer}if(!st)return i.executeEnd=As(),BA(n);s=new Uint8Array(st)}else return this.asyncResult=!0,this.decryptionPromise=wt.webCryptoDecrypt(s,Ye.key.buffer,Ye.iv.buffer,Bt).then(st=>{const Vt=this.push(st,null,n);return this.decryptionPromise=null,Vt}),this.decryptionPromise}const lt=this.needsProbing(p,_);if(lt){const wt=this.configureTransmuxer(s);if(wt)return this.logger.warn(`[transmuxer] ${wt.message}`),this.observer.emit(y.ERROR,y.ERROR,{type:be.MEDIA_ERROR,details:ee.FRAG_PARSING_ERROR,fatal:!1,error:wt,reason:wt.message}),i.executeEnd=As(),BA(n)}(p||_||D||lt)&&this.resetInitSegment(xe,G,H,Ie,t),(p||D||lt)&&this.resetInitialTimestamp(ue),c||this.resetContiguity();const kt=this.transmux(s,Ye,I,w,n);this.asyncResult=ca(kt);const it=this.currentTransmuxState;return it.contiguous=!0,it.discontinuity=!1,it.trackSwitch=!1,i.executeEnd=As(),kt}flush(e){const t=e.transmuxing;t.executeStart=As();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:c}=this;if(!f||!c){t.executeEnd=As();const _=[BA(e)];return this.asyncResult?Promise.resolve(_):_}const p=f.flush(A);return ca(p)?(this.asyncResult=!0,p.then(_=>(this.flushRemux(s,_,e),s))):(this.flushRemux(s,p,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:A}=t,{accurateTimeOffset:f,timeOffset:c}=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 p=this.remuxer.remux(r,i,s,A,c,f,!0,this.id);e.push({remuxResult:p,chunkMeta:n}),n.transmuxing.executeEnd=As()}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=qa.length;_<w;_++){var s;if((s=qa[_].demux)!=null&&s.probe(e,this.logger)){i=qa[_];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const A=this.demuxer,f=this.remuxer,c=i.remux,p=i.demux;(!f||!(f instanceof c))&&(this.remuxer=new c(n,t,r,this.logger)),(!A||!(A instanceof p))&&(this.demuxer=new p(n,t,r,this.logger),this.probe=p.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Lr(this.config)),e}}function Po(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 BA=a=>({remuxResult:{},chunkMeta:a});function ca(a){return"then"in a&&a.then instanceof Function}class Mo{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 No{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 Ho=0;class eo{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=Ho++,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 c=f.data,p=this.hls;if(!(!p||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var _;const w=(_=this.workerContext)==null?void 0:_.objectURL;w&&self.URL.revokeObjectURL(w);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}case"workerLog":{p.logger[c.data.logType]&&p.logger[c.data.logType](c.data.message);break}default:{c.data=c.data||{},c.data.frag=this.frag,c.data.part=this.part,c.data.id=this.id,p.trigger(c.event,c.data);break}}},this.onWorkerError=f=>{if(!this.hls)return;const c=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:be.OTHER_ERROR,details:ee.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(f,c)=>{c=c||{},c.frag=this.frag||void 0,f===y.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(f,c)};this.observer=new hA,this.observer.on(y.FRAG_DECRYPTED,s),this.observer.on(y.ERROR,s);const A=vn(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const f=this.hls.logger;if(i.workerPath||go()){try{i.workerPath?(f.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=Va(i.workerPath)):(f.log(`injecting Web Worker for "${t}"`),this.workerContext=Fi());const{worker:p}=this.workerContext;p.addEventListener("message",this.onWorkerMessage),p.addEventListener("error",this.onWorkerError),p.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:A,id:t,config:gr(i)})}catch(p){f.warn(`Error setting up "${t}" Web Worker, fallback to inline`,p),this.terminateWorker(),this.error=null,this.transmuxer=new qA(this.observer,A,i,"",t,e.logger)}return}}this.transmuxer=new qA(this.observer,A,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=Ho++;const t=this.hls.config,n=vn(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:gr(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),po(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,c,p){var _,w;c.transmuxing.start=self.performance.now();const{instanceNo:I,transmuxer:D}=this,G=s?s.start:i.start,H=i.decryptdata,ue=this.frag,Ie=!(ue&&i.cc===ue.cc),xe=!(ue&&c.level===ue.level),Ye=ue?c.sn-ue.sn:-1,lt=this.part?c.part-this.part.index:-1,kt=Ye===0&&c.id>1&&c.id===(ue==null?void 0:ue.stats.chunkCount),it=!xe&&(Ye===1||Ye===0&&(lt===1||kt&<<=0)),wt=self.performance.now();(xe||Ye||i.stats.parsing.start===0)&&(i.stats.parsing.start=wt),s&&(lt||!it)&&(s.stats.parsing.start=wt);const Bt=!(ue&&((_=i.initSegment)==null?void 0:_.url)===((w=ue.initSegment)==null?void 0:w.url)),st=new No(Ie,it,f,xe,G,Bt);if(!it||Ie||Bt){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===V.MAIN?"level":"track"}: ${c.level} id: ${c.id}
|
|
discontinuity: ${Ie}
|
|
trackSwitch: ${xe}
|
|
contiguous: ${it}
|
|
accurateTimeOffset: ${f}
|
|
timeOffset: ${G}
|
|
initSegmentChange: ${Bt}`);const Vt=new Mo(n,r,t,A,p);this.configureTransmuxer(Vt)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:I,cmd:"demux",data:e,decryptdata:H,chunkMeta:c,state:st},e instanceof ArrayBuffer?[e]:[]);else if(D){const Vt=D.push(e,H,c,st);ca(Vt)?Vt.then(Cn=>{this.handleTransmuxComplete(Cn)}).catch(Cn=>{this.transmuxerError(Cn,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(Vt)}}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);ca(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:be.MEDIA_ERROR,details:ee.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 Ko=100;class jl extends $s{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===Pt.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==A)&&this.syncWithAnchor(t,c==null?void 0:c.frag)}else!this.hls.hasEnoughToStart&&f&&f.cc!==A?(f.abortRequests(),this.syncWithAnchor(t,f)):this.state===Pt.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=tt(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===Pt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Pt.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(Ko),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=Pt.IDLE):this.state=Pt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Pt.IDLE:this.doTickIdle();break;case Pt.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=Pt.WAITING_INIT_PTS}break}case Pt.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case Pt.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=Pt.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=Pt.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=Pt.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,W.AUDIO,V.AUDIO));const p=this.getFwdBufferInfo(c,V.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,f)){t.trigger(y.BUFFER_EOS,{type:"audio"}),this.state=Pt.ENDED;return}const _=p.len,w=t.maxBufferLength,I=f.fragments,D=I[0].start,G=this.getLoadPosition(),H=this.flushing?G:p.end;if(this.switchingTrack&&r){const xe=G;f.PTSKnown&&xe<D&&(p.end>D||p.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&&H<I[I.length-1].start)return;let ue=this.getNextFragment(H,f);if(ue&&this.isLoopLoading(ue,H)&&(ue=this.getNextFragmentLoopLoading(ue,f,p,V.MAIN,w)),!ue){this.bufferFlushed=!0;return}let Ie=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&Ie&&Je(ue)&&!ue.endList&&(!f.live||!this.loadingParts&&H<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(Ie)===An.OK&&(this.mainFragLoading=Ie=null),Ie&&Je(Ie))){if(ue.start>Ie.end){const Ye=this.fragmentTracker.getFragAtPos(H,V.MAIN);Ye&&Ye.end>Ie.end&&(Ie=Ye,this.mainFragLoading={frag:Ye,targetBufferTime:null})}if(ue.start>Ie.end)return}this.loadFragment(ue,A,H)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new xr(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!==Pt.STOPPED&&(this.setInterval(Ko),this.state=Pt.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 c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==Pt.STOPPED&&(this.state=Pt.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 p=r[s];let _=0;if(i.live||(n=p.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(p.details){var w;_=this.alignPlaylists(i,p.details,(w=this.levelLastLoaded)==null?void 0:w.details)}i.alignedSliding||(Ci(i,c),i.alignedSliding||xs(i,c),_=i.fragmentStart)}p.details=i,this.levelLastLoaded=p,this.startFragRequested||this.setStartPosition(c,_),this.hls.trigger(y.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===Pt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Pt.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 c=f[A];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const p=c.details;if(!p){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const _=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let w=this.transmuxer;w||(w=this.transmuxer=new eo(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 H=r?r.index:-1,ue=H!==-1,Ie=new Hr(n.level,n.sn,n.stats.chunkCount,i.byteLength,H,ue);w.push(i,D,_,"",n,r,p.totalduration,!1,Ie,I)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${p.startSN} ,${p.endSN}],track ${A}`);const{cache:G}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Js,complete:!1};G.push(new Uint8Array(i)),this.state!==Pt.STOPPED&&(this.state=Pt.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&&Je(t.frag)&&(this.mainFragLoading=t,this.state===Pt.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(Je(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=Pt.ERROR;return}switch(t.details){case ee.FRAG_GAP:case ee.FRAG_PARSING_ERROR:case ee.FRAG_DECRYPT_ERROR:case ee.FRAG_LOAD_ERROR:case ee.FRAG_LOAD_TIMEOUT:case ee.KEY_LOAD_ERROR:case ee.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(V.AUDIO,t);break;case ee.AUDIO_TRACK_LOAD_ERROR:case ee.AUDIO_TRACK_LOAD_TIMEOUT:case ee.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Pt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===Ce.AUDIO_TRACK&&(this.state=Pt.IDLE);break;case ee.BUFFER_ADD_CODEC_ERROR:case ee.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case ee.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case ee.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===Pt.ENDED&&(this.state=Pt.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:c,level:p}=A,{details:_}=p,{audio:w,text:I,id3:D,initSegment:G}=i;if(this.fragContextChanged(f)||!_){this.fragmentTracker.removeFragment(f);return}if(this.state=Pt.PARSING,this.switchingTrack&&w&&this.completeAudioSwitch(this.switchingTrack),G!=null&&G.tracks){const H=f.initSegment||f;if(this.unhandledEncryptionError(G,f))return;this._bufferInitSegment(p,G.tracks,H,s),r.trigger(y.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:n,tracks:G.tracks})}if(w){const{startPTS:H,endPTS:ue,startDTS:Ie,endDTS:xe}=w;c&&(c.elementaryStreams[W.AUDIO]={startPTS:H,endPTS:ue,startDTS:Ie,endDTS:xe}),f.setElementaryStreamInfo(W.AUDIO,H,ue,Ie,xe),this.bufferFragmentData(w,f,c,s)}if(D!=null&&(t=D.samples)!=null&&t.length){const H=B({id:n,frag:f,details:_},D);r.trigger(y.FRAG_PARSING_METADATA,H)}if(I){const H=B({id:n,frag:f,details:_},I);r.trigger(y.FRAG_PARSING_USERDATA,H)}}_bufferInitSegment(e,t,n,r){if(this.state!==Pt.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===An.NOT_LOADED||r===An.PARTIAL){var i;if(!Je(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=Pt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&xs(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;Kt({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:A},e,qt)||(sr(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 bA 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(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),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 p=Math.min(t.age-t.partTarget,t.targetduration);f>=0&&p>t.partTarget&&(f+=1)}const c=n&&Xi(n);return new Fr(A,f>=0?f:void 0,c)}}}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 p=Math.max(f||0,0);r.appliedTimelineOffset=p,r.fragments.forEach(_=>{_.setStart(_.playlistOffset+p)})}if(r.live||n!=null&&n.live){const p="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){Qs(n,r,this);const Ie=r.playlistParsingError;if(Ie){this.warn(Ie);const xe=this.hls;if(!xe.config.ignorePlaylistParsingErrors){var c;const{networkDetails:Ye}=t;xe.trigger(y.ERROR,{type:be.NETWORK_ERROR,details:ee.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:Ie,reason:Ie.message,level:t.level||void 0,parent:(c=r.fragments[0])==null?void 0:c.type,networkDetails:Ye,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=Ha(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,H,ue;if(r.canBlockReload&&r.endSN&&r.advanced){const Ie=this.hls.config.lowLatencyMode,xe=r.lastPartSn,Ye=r.endSN,lt=r.lastPartIndex,kt=lt!==-1,it=xe===Ye;kt?it?(H=Ye+1,ue=Ie?0:lt):(H=xe,ue=Ie?lt+1:r.maxPartIndex):H=Ye+1;const wt=r.age,Bt=wt+r.ageHeader;let st=Math.min(Bt-r.partTarget,r.targetduration*1.5);if(st>0){if(Bt>r.targetduration*3)this.log(`Playlist last advanced ${wt.toFixed(2)}s ago. Omitting segment and part directives.`),H=void 0,ue=void 0;else if(n!=null&&n.tuneInGoal&&Bt-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${st} with playlist age: ${r.age}`),st=0;else{const Vt=Math.floor(st/r.targetduration);if(H+=Vt,ue!==void 0){const Cn=Math.round(st%r.targetduration/r.partTarget);ue+=Cn}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${wt.toFixed(2)}s goal: ${st} skip sn ${Vt} to part ${ue}`)}r.tuneInGoal=st}if(G=this.getDeliveryDirectives(r,t.deliveryDirectives,H,ue),Ie||!it){r.requestScheduled=s,this.loadingPlaylist(p,G);return}}else(r.canBlockReload||r.canSkipUntil)&&(G=this.getDeliveryDirectives(r,t.deliveryDirectives,H,ue));G&&H!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(D-A*2,D/2)),this.scheduleLoading(p,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=Xi(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=vi.No),new Fr(n,r,i)}checkRetry(e){const t=e.details,n=Et(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:A}=r||{},f=!!r&&!!A&&(i===rn.RetryRequest||!r.resolved&&i===rn.SendAlternateToPenaltyBox);if(f){var c;if(s>=A.maxNumRetry)return!1;if(n&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${A.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const p=$t(A,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),p),this.warn(`Retrying playlist loading ${s+1}/${A.maxNumRetry} after "${t}" in ${p}ms`)}e.levelRetry=!0,r.resolved=!0}return f}}function $o(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!ji(a[t].attrs,e[t].attrs))return!1;return!0}function ji(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 eA(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Go extends bA{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=yt(f,A,qt);if(w>-1)i=A[w];else{const I=yt(f,this.tracks);i=this.tracks[I]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const p={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,p);const _=this.trackId;if(c!==-1&&_===-1)this.setAudioTrack(c);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:be.MEDIA_ERROR,details:ee.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:w})}}}onError(e,t){t.fatal||!t.context||t.context.type===Ce.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&&Kt(e,r,qt))return r;const i=yt(e,this.tracksInGroup,qt);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=_n(e,t.levels,n,s,qt);if(A===-1)return null;t.nextLoadLevel=A}if(e.channels||e.audioCodec){const s=yt(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||Kt(e,r,qt)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:A,channels:f}=e;for(let c=0;c<t.length;c++){const p=t[c];if(Kt({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:A,channels:f},p,qt))return c}for(let c=0;c<t.length;c++){const p=t[c];if(ji(e.attrs,p.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const p=t[c];if(ji(e.attrs,p.attrs,["LANGUAGE"]))return c}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&sr(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 to{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 ka=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,CA="HlsJsTrackRemovedError";class xA extends Error{constructor(e){super(e),this.name=CA}}class Sl 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=Xe(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,SA(n),Vo(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: ${gr(n,(f,c)=>f==="initSegment"?void 0:c)};
|
|
transfer tracks: ${gr(r,(f,c)=>f==="initSegment"?void 0:c)}}`),!Ee(r,n)){t.mediaSource=null,t.tracks=void 0;const f=e.currentTime,c=this.details,p=Math.max(f,(c==null?void 0:c.fragments[0].start)||0);if(p-f>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${f} -> ${p}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${p} currentTime: ${f}`),this.onMediaDetaching(y.MEDIA_DETACHING,{}),this.onMediaAttaching(y.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(f=>{const c=f,p=r[c];if(p){const _=p.buffer;if(_){const w=this.fragmentTracker,I=p.id;if(w.hasFragments(I)||w.hasParts(I)){const H=Tn.getBuffered(_);w.detectEvictedFragments(c,H,I,null,!0)}const D=tA(c),G=[c,_];this.sourceBuffers[D]=G,_.updating&&this.operationQueue&&this.operationQueue.prependBlocker(c),this.trackSourceBuffer(c,p)}}}),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 c=f.length;c--;)A&&f[c].abort(),i.removeSourceBuffer(f[c]);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&&SA(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[tA(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new to(this.tracks)}onBufferCodecs(e,t){const n=this.tracks,r=Object.keys(t);this.log(`BUFFER_CODECS: "${r}" (current SB count ${this.sourceBufferCount})`);const i="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),s=!i&&this.sourceBufferCount&&this.media&&r.some(A=>!n[A]);if(i||s){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${r}" SourceBuffers`);return}r.forEach(A=>{var f,c;const p=t[A],{id:_,codec:w,levelCodec:I,container:D,metadata:G,supplemental:H}=p;let ue=n[A];const Ie=(f=this.transferData)==null||(f=f.tracks)==null?void 0:f[A],xe=Ie!=null&&Ie.buffer?Ie:ue,Ye=(xe==null?void 0:xe.pendingCodec)||(xe==null?void 0:xe.codec),lt=xe==null?void 0:xe.levelCodec;ue||(ue=n[A]={buffer:void 0,listeners:[],codec:w,supplemental:H,container:D,levelCodec:I,metadata:G,id:_});const kt=Qe(Ye,lt),it=kt==null?void 0:kt.replace(ka,"$1");let wt=Qe(w,I);const Bt=(c=wt)==null?void 0:c.replace(ka,"$1");wt&&kt&&it!==Bt&&(A.slice(0,5)==="audio"&&(wt=me(wt,this.appendSource)),this.log(`switching codec ${Ye} to ${wt}`),wt!==(ue.pendingCodec||ue.codec)&&(ue.pendingCodec=wt),ue.container=D,this.appendChangeType(A,D,wt))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,i={label:`change-type=${r}`,execute:()=>{const s=this.tracks[e];if(s){const 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&&Tn.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:c,offset:p}=t,_=c.buffering[i],{sn:w,cc:I}=A,D=self.performance.now();_.start=D;const G=A.stats.buffering,H=f?f.stats.buffering:null;G.start===0&&(G.start=D),H&&H.start===0&&(H.start=D);const ue=n.audio;let Ie=!1;i==="audio"&&(ue==null?void 0:ue.container)==="audio/mpeg"&&(Ie=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const xe=n.video,Ye=xe==null?void 0:xe.buffer;if(Ye&&w!=="initSegment"){const it=f||A,wt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(xe.ending||xe.ended)){const st=it.start+it.duration*.05,Vt=Ye.buffered,Cn=this.currentOp("video");!Vt.length&&!Cn?this.blockAudio(it):!Cn&&!Tn.isBuffered(Ye,st)&&this.lastVideoAppendEnd<st&&this.blockAudio(it)}else if(i==="video"){const Bt=it.end;if(wt){const st=wt.frag.start;(Bt>st||Bt<this.lastVideoAppendEnd||Tn.isBuffered(Ye,st))&&this.unblockAudio()}this.lastVideoAppendEnd=Bt}}const lt=(f||A).start,kt={label:`append-${i}`,execute:()=>{var it;_.executeStart=self.performance.now();const wt=(it=this.tracks[i])==null?void 0:it.buffer;wt&&(Ie?this.updateTimestampOffset(wt,lt,.1,i,w,I):p!==void 0&&te(p)&&this.updateTimestampOffset(wt,p,1e-6,i,w,I)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const it=self.performance.now();_.executeEnd=_.end=it,G.first===0&&(G.first=it),H&&H.first===0&&(H.first=it);const wt={};this.sourceBuffers.forEach(([Bt,st])=>{Bt&&(wt[Bt]=Tn.getBuffered(st))}),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:c,parent:A.type,timeRanges:wt})},onError:it=>{var wt;const Bt={type:be.MEDIA_ERROR,parent:A.type,details:ee.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:A,part:f,chunkMeta:c,error:it,err:it,fatal:!1},st=(wt=this.media)==null?void 0:wt.error;if(it.code===DOMException.QUOTA_EXCEEDED_ERR||it.name=="QuotaExceededError"||"quota"in it)Bt.details=ee.BUFFER_FULL_ERROR;else if(it.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!st)Bt.errorAction=an(!0);else if(it.name===CA&&this.sourceBufferCount===0)Bt.errorAction=an(!0);else{const Vt=++this.appendErrors[i];this.warn(`Failed ${Vt}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${st||"no media error"})`),(Vt>=this.hls.config.appendErrorMaxRetry||st)&&(Bt.fatal=!0)}this.hls.trigger(y.ERROR,Bt)}};this.append(kt,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 c=r?r.stats:n.stats;this.hls.trigger(y.FRAG_BUFFERED,{frag:n,part:r,stats:c,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===ee.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;te(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(te(A)&&A>=0){const c=Math.max(A,s),p=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,p)}const f=r.frontBufferFlushThreshold;if(te(f)&&f>0){const c=Math.max(r.maxBufferLength,f),p=Math.max(c,s),_=Math.floor(i/s)*s+p;this.flushFrontBuffer(i,s,_)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const A=Tn.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=Tn.getBuffered(i),A=s.length;if(A<2)return;const f=s.start(A-1),c=s.end(A-1);if(n>f||e>=f&&e<=c)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 c=Math.max(0,t.fragmentStart),p=Math.max(c,r);return{duration:1/0,start:c,end:p}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return te(i)?{duration:i}:null;const s=this.media.duration,A=te(n.duration)?n.duration:0;return r>A&&r>s||!te(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(te(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}) ${gr(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:be.MEDIA_ERROR,details:ee.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),c=`${A.container};codecs=${f}`;A.codec=f,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${gr(A)}`);try{const p=n.addSourceBuffer(c),_=tA(s),w=[s,p];t[_]=w,A.buffer=p}catch(p){var r;this.error(`error while trying to add sourceBuffer: ${p.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(y.ERROR,{type:be.MEDIA_ERROR,details:ee.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,sourceBufferName:s,mimeType:c,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")&&dr(n,"video")&&(r=Se(r,n));const i=Qe(r,e.levelCodec);return i?t.slice(0,5)==="audio"?me(i,this.appendSource):i:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(i,s)=>{const 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:be.MEDIA_ERROR,details:ee.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=te(r.duration)?r.duration:1/0,c=te(i.duration)?i.duration:1/0,p=Math.max(0,t),_=Math.min(n,f,c);_>p&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${p},${_}] from the ${e} SourceBuffer`),A.remove(p,_)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new xA(`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 SA(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function Vo(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function tA(a){return a==="audio"?1:0}class FA{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&&te(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,FA.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 os={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},TA={HLS:"h"};class Ms{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof Ms?n:new Ms(n))),this.value=e,this.params=t}}const Fl="Dict";function Tl(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 l(a,e,t,n){return new Error(`failed to ${a} "${Tl(e)}" as ${t}`,{cause:n})}function C(a,e,t){return l("serialize",a,e,t)}class m{constructor(e){this.description=e}}const R="Bare Item",j="Boolean";function Ae(a){if(typeof a!="boolean")throw C(a,j);return a?"?1":"?0"}function Ze(a){return btoa(String.fromCharCode(...a))}const Ne="Byte Sequence";function sn(a){if(ArrayBuffer.isView(a)===!1)throw C(a,Ne);return`:${Ze(a)}:`}const Oe="Integer";function nt(a){return a<-999999999999999||999999999999999<a}function Pn(a){if(nt(a))throw C(a,Oe);return a.toString()}function dn(a){return`@${Pn(a.getTime()/1e3)}`}function zt(a,e){if(a<0)return-zt(-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 Vn="Decimal";function ui(a){const e=zt(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw C(a,Vn);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Tr="String",_r=/[\x00-\x1f\x7f]+/;function Kr(a){if(_r.test(a))throw C(a,Tr);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function hr(a){return a.description||a.toString().slice(7,-1)}const cn="Token";function Dr(a){const e=hr(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw C(e,cn);return e}function wi(a){switch(typeof a){case"number":if(!te(a))throw C(a,R);return Number.isInteger(a)?Pn(a):ui(a);case"string":return Kr(a);case"symbol":return Dr(a);case"boolean":return Ae(a);case"object":if(a instanceof Date)return dn(a);if(a instanceof Uint8Array)return sn(a);if(a instanceof m)return Dr(a);default:throw C(a,R)}}const Ar="Key";function ci(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw C(a,Ar);return a}function Pr(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${ci(e)}`:`;${ci(e)}=${wi(t)}`).join("")}function Cr(a){return a instanceof Ms?`${wi(a.value)}${Pr(a.params)}`:wi(a)}function Zr(a){return`(${a.value.map(Cr).join(" ")})${Pr(a.params)}`}function Ea(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw C(a,Fl);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof Ms||(i=new Ms(i));let s=ci(r);return i.value===!0?s+=Pr(i.params):(s+="=",Array.isArray(i.value)?s+=Zr(i):s+=Cr(i)),s}).join(`,${n}`)}function no(a,e){return Ea(a,e)}const vs="CMCD-Object",xi="CMCD-Request",nA="CMCD-Session",Qa="CMCD-Status",Jl={br:vs,ab:vs,d:vs,ot:vs,tb:vs,tpb:vs,lb:vs,tab:vs,lab:vs,url:vs,pb:xi,bl:xi,tbl:xi,dl:xi,ltc:xi,mtp:xi,nor:xi,nrr:xi,rc:xi,sn:xi,sta:xi,su:xi,ttfb:xi,ttfbb:xi,ttlb:xi,cmsdd:xi,cmsds:xi,smrt:xi,df:xi,cs:xi,ts:xi,cid:nA,pr:nA,sf:nA,sid:nA,st:nA,v:nA,msd:nA,bs:Qa,bsd:Qa,cdn:Qa,rtp:Qa,bg:Qa,pt:Qa,ec:Qa,e:Qa},ql={REQUEST:xi};function eu(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 tu(a,e){const t={};if(!a)return t;const n=Object.keys(a),r=e?eu(e):{};return n.reduce((i,s)=>{var A;const f=Jl[s]||r[s]||ql.REQUEST,c=(A=i[f])!==null&&A!==void 0?A:i[f]={};return c[s]=a[s],i},t)}function Il(a){return["ot","sf","st","e","sta"].includes(a)}function Hu(a){return typeof a=="number"?te(a):a!=null&&a!==""&&a!==!1}const nu="event";function Ku(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 zo=a=>Math.round(a),IA=(a,e)=>Array.isArray(a)?a.map(t=>IA(t,e)):a instanceof Ms&&typeof a.value=="string"?new Ms(IA(a.value,e),a.params):(e.baseUrl&&(a=Ku(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),rA=a=>zo(a/100)*100,ru={br:zo,d:zo,bl:rA,dl:rA,mtp:rA,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof Ms&&typeof a.value=="string"?t=new Ms([a]):typeof a=="string"&&(t=[a])),IA(t,e)},rtp:rA,tb:zo},Zo="request",Dl="response",Yo=["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"],iu=["e"],$u=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function iA(a){return $u.test(a)}function su(a){return Yo.includes(a)||iu.includes(a)||iA(a)}const Ll=["d","dl","nor","ot","rtp","su"];function Gu(a){return Yo.includes(a)||Ll.includes(a)||iA(a)}const Vu=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function au(a){return Yo.includes(a)||Ll.includes(a)||Vu.includes(a)||iA(a)}const DA=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function Ul(a){return DA.includes(a)||iA(a)}const jo={[Dl]:au,[nu]:su,[Zo]:Gu};function Au(a,e={}){const t={};if(a==null||typeof a!="object")return t;const n=e.version||a.v||1,r=e.reportingMode||Zo,i=n===1?Ul:jo[r];let s=Object.keys(a).filter(i);const A=e.filter;typeof A=="function"&&(s=s.filter(A));const f=r===Dl||r===nu;f&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const c=B({},ru,e.formatters),p={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(_=>{let w=a[_];const I=c[_];if(typeof I=="function"&&(w=I(w,p)),_==="v"){if(n===1)return;w=n}_=="pr"&&w===1||(f&&_==="ts"&&!te(w)&&(w=Date.now()),Hu(w)&&(Il(_)&&typeof w=="string"&&(w=new m(w)),t[_]=w))}),t}function Wu(a,e={}){const t={};if(!a)return t;const n=Au(a,e),r=tu(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,A])=>{const f=no(A,{whitespace:!1});return f&&(i[s]=f),i},t)}function zu(a,e,t){return B(a,Wu(e,t))}const Zu="CMCD";function ou(a,e={}){return a?no(Au(a,e),{whitespace:!1}):""}function Rl(a,e={}){if(!a)return"";const t=ou(a,e);return encodeURIComponent(t)}function lu(a,e={}){if(!a)return"";const t=Rl(a,e);return`${Zu}=${t}`}const kl=/CMCD=[^&#]+/;function Ql(a,e,t){const n=lu(e,t);if(!n)return a;if(kl.test(a))return a.replace(kl,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class uu{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:os.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),c={d:(s||i).duration*1e3,ot:f};(f===os.VIDEO||f===os.AUDIO||f==os.MUXED)&&(c.br=A.bitrate/1e3,c.tb=this.getTopBandwidth(f)/1e3,c.bl=this.getBufferLength(f));const p=s?this.getNextPart(s):this.getNextFrag(i);p!=null&&p.url&&p.url!==i.url&&(c.nor=p.url),this.apply(r,c)}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:TA.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===os.INIT||t.ot===os.VIDEO||t.ot===os.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={}),zu(e.headers,t,i)):e.url=Ql(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 os.TIMED_TEXT;if(e.sn==="initSegment")return os.INIT;if(t==="audio")return os.AUDIO;if(t==="main")return this.hls.audioTracks.length?os.VIDEO:os.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===os.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===os.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:Tn.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 Yu 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)===rn.SendAlternateToPenaltyBox&&n.flags===un.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:A,pathwayId:f,type:c}=t.context;A&&r?s=this.getPathwayForGroupId(A,c,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===ee.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: ${gr(i)} penalized: ${gr(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,Ka(t),this.hls.trigger(y.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[A];f&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==f.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==f.bitrate&&this.log(`Unstable Pathways change from bitrate ${f.bitrate} to ${c.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===Ce.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===Ce.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(p=>p.pathwayId===s))return;const c=this.getLevelsForPathway(A).map(p=>{const _=new Er(p.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=io(p.uri,_["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",f),G=new xr({attrs:_,audioCodec:p.audioCodec,bitrate:p.bitrate,height:p.height,name:p.name,url:D,videoCodec:p.videoCodec,width:p.width});if(p.audioGroups)for(let H=1;H<p.audioGroups.length;H++)G.addGroupId("audio",`${p.audioGroups[H]}_clone_${s}`);if(p.subtitleGroups)for(let H=1;H<p.subtitleGroups.length;H++)G.addGroupId("text",`${p.subtitleGroups[H]}_clone_${s}`);return G});t.push(...c),ro(this.audioTracks,n,f,s),ro(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(p){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const p=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+p)}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},c={onSuccess:(p,_,w,I)=>{this.log(`Loaded steering manifest: "${r}"`);const D=p.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":H,"PATHWAY-PRIORITY":ue}=D;if(G)try{this.uri=new self.URL(G,r).href}catch(xe){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${G}`);return}this.scheduleRefresh(this.uri||w.url),H&&this.clonePathways(H);const Ie={steeringManifest:D,url:r.toString()};this.hls.trigger(y.STEERING_MANIFEST_LOADED,Ie),ue&&this.updatePathwayPriority(ue)},onError:(p,_,w,I)=>{if(this.log(`Error loading steering manifest: ${p.code} ${p.text} (${_.url})`),this.stopLoad(),p.code===410){this.enabled=!1,this.log(`Steering manifest ${_.url} no longer available`);return}let D=this.timeToLoad*1e3;if(p.code===429){const G=this.loader;if(typeof(G==null?void 0:G.getResponseHeader)=="function"){const H=G.getResponseHeader("Retry-After");H&&(D=parseFloat(H)*1e3)}this.log(`Steering manifest ${_.url} rate limited`);return}this.scheduleRefresh(this.uri||_.url,D)},onTimeout:(p,_,w)=>{this.log(`Timeout loading steering manifest (${_.url})`),this.scheduleRefresh(this.uri||_.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,f,c)}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 ro(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 Er(A.attrs),A.url=A.attrs.URI=io(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 io(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(c=>{c&&f.searchParams.set(c,i[c])}),f.href}class sA 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=sA.CDMCleanupPromise?[sA.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=Jn(this.config));const A=s.map(In).filter(f=>!!f);this.keyFormatPromise=this.getKeyFormatPromise(A)}this.keyFormatPromise.then(s=>{const A=Ir(s);if(n!=="sinf"||A!==ei.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${A}`);return}let f;try{const I=ht(new Uint8Array(r)),D=gi(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 c=ne(f),{keyIdToKeySessionPromise:p,mediaKeySessions:_}=this;let w=p[c];for(let I=0;I<_.length;I++){const D=_[I],G=D.decryptdata;if(!G.keyId)continue;const H=ne(G.keyId);if(c===H||G.uri.replace(/-/g,"").indexOf(c)!==-1){if(w=p[H],!w)continue;if(G.pssh)break;delete p[H],G.pssh=new Uint8Array(r),G.keyId=f,w=p[c]=w.then(()=>this.generateRequestWithPreferredKeySession(D,n,r,"encrypted-event-key-match")),w.catch(ue=>this.handleError(ue));break}}w||this.handleError(new Error(`Key ID ${c} 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===ei.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=c=>{const p=c.shift();this.getMediaKeysPromise(p,r,i).then(_=>s({keySystem:p,mediaKeys:_})).catch(_=>{c.length?f(c):_ instanceof Vs?A(_):A(new Vs({type:be.KEY_SYSTEM_ERROR,details:ee.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 ti===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=fi(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: ${gr(i)}`),A=this.requestMediaKeySystemAccess(e,i);const f=s=this.keySystemAccessPromises[e]={keySystemAccess:A};return A.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),A.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const p=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const _=f.mediaKeys=c.createMediaKeys().then(w=>(this.log(`Media-keys created for "${e}"`),f.hasMediaKeys=!0,p.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: ${ne(e.keyId||[])}`);const r=n.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t),i="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return ne(e.keyId)}updateKeySession(e,t){const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyId ${ne(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})=>In(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=In(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=Jn(this.config),n=e.map(Ir).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(n)}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),r=this.bannedKeyIds[n];if(r){const A=fu(r,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:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(f,c).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:f,mediaKeys:c,decryptdata:t}))))).then(f=>{const c="cenc",p=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(f,c,p,"playlist-key")});return A.catch(f=>this.handleError(f,e.frag)),this.keyIdToKeySessionPromise[n]=A,A}return s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){this.hls&&(this.error(e.message),e instanceof Vs?(t&&(e.data.frag=t),this.hls.trigger(y.ERROR,e.data)):this.hls.trigger(y.ERROR,{type:be.KEY_SYSTEM_ERROR,details:ee.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=Ir(e.keyFormat),i=r?[r]:Jn(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Jn(this.config)),e.length===0)throw new Vs({type:be.KEY_SYSTEM_ERROR,details:ee.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${gr({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 w=s.call(this.hls,t,n,e);if(!w)throw new Error("Invalid response from configured generateRequest filter");t=w.initDataType,n=w.initData?w.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(w){if(this.warn(w.message),this.hls&&this.hls.config.debug)throw w}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const A=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${A} (init data type: ${t} length: ${n.byteLength})`);const f=new hA,c=e._onmessage=w=>{const I=e.mediaKeysSession;if(!I){f.emit("error",new Error("invalid state"));return}const{messageType:D,message:G}=w;this.log(`"${D}" message event for session "${I.sessionId}" message size: ${G.byteLength}`),D==="license-request"||D==="license-renewal"?this.renewLicense(e,G).catch(H=>{f.eventNames().length?f.emit("error",H):this.handleError(H)}):D==="license-release"?e.keySystem===ei.FAIRPLAY&&(this.updateKeySession(e,Ri("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${D}"`)},p=e._onkeystatuseschange=w=>{if(!e.mediaKeysSession){f.emit("error",new Error("invalid state"));return}const D=e.keyStatus;this.onKeyStatusChange(e);const G=e.keyStatus;G!==D&&(f.emit("keyStatus",G,e),G==="expired"&&(this.log(`${e.keySystem} expired for key ${A}`),this.renewKeySession(e)))};Mi(e.mediaKeysSession,"message",c),Mi(e.mediaKeysSession,"keystatuseschange",p);const _=new Promise((w,I)=>{f.on("error",I),f.on("keyStatus",(D,{decryptdata:G})=>{D.startsWith("usable")?w():D==="internal-error"||D==="output-restricted"?I(fu(D,G)):D==="expired"?I(new Error(`key expired while generating request (keyId: ${A})`)):this.warn(`unhandled key status change "${D}" (keyId: ${A})`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${A}`)}).catch(w=>{throw new Vs({type:be.KEY_SYSTEM_ERROR,details:ee.KEY_SYSTEM_NO_SESSION,error:w,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${w}`)}).then(()=>_).catch(w=>{throw f.removeAllListeners(),this.removeSession(e),w}).then(()=>(f.removeAllListeners(),e))}onKeyStatusChange(e){const t=ne(new Uint8Array(e.decryptdata.keyId||[]));e.mediaKeysSession.keyStatuses.forEach((n,r)=>{if(typeof r=="string"&&typeof n=="object"){const A=r;r=n,n=A}const i=ne("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r));n==="internal-error"&&(this.bannedKeyIds[i]=n);const s=i===t;this.log(`${s?"":"un"}matched key status change "${n}" for keyStatuses keyId: ${i} session keyId: ${t} uri: ${e.decryptdata.uri}`),s&&(e.keyStatus=n)})}fetchServerCertificate(e){const t=this.config,n=t.loader,r=new n(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,A)=>{const f={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(w,I,D,G)=>{s(w.data)},onError:(w,I,D,G)=>{A(new Vs({type:be.KEY_SYSTEM_ERROR,details:ee.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 Vs({type:be.KEY_SYSTEM_ERROR,details:ee.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,p,_)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,i)=>{e.setServerCertificate(n).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new Vs({type:be.KEY_SYSTEM_ERROR,details:ee.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 Vs({type:be.KEY_SYSTEM_ERROR,details:ee.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 p;for(let _=0,w=i.length;_<w;_++){var s,A;p=i[_];const I=(s=p.querySelector("name"))==null?void 0:s.textContent,D=(A=p.querySelector("value"))==null?void 0:A.textContent;I&&D&&e.setRequestHeader(I,D)}}const f=r.querySelector("Challenge"),c=f==null?void 0:f.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Ri(atob(c))}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 c=this.config.licenseResponseCallback;if(c)try{f=c.call(this.hls,A,s,e)}catch(p){this.error(p)}r(f)}else{const f=n.errorRetry,c=f?f.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||A.status>=400&&A.status<500)i(new Vs({type:be.KEY_SYSTEM_ERROR,details:ee.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 p=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${p} 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:c})=>{e.keySystem==ei.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(f,c)),f.send(c)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,Mi(n,"encrypted",this.onMediaEncrypted),Mi(n,"waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(Wi(e,"encrypted",this.onMediaEncrypted),Wi(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,Es.clearKeyUriToKeyIdMap();const r=n.length;sA.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:be.OTHER_ERROR,details:ee.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${i}`)})}))).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}`),this.hls&&this.hls.trigger(y.ERROR,{type:be.OTHER_ERROR,details:ee.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: ${ne((r==null?void 0:r.keyId)||[])}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);i>-1&&this.mediaKeySessions.splice(i,1);const{drmSystemOptions:s}=this.config;return(Ys(s)?new Promise((f,c)=>{self.setTimeout(()=>c(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(f).catch(c)}):Promise.resolve()).catch(f=>{this.log(`Could not remove session: ${f}`),this.hls&&this.hls.trigger(y.ERROR,{type:be.OTHER_ERROR,details:ee.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${f}`)})}).then(()=>t.close()).catch(f=>{this.log(`Could not close session: ${f}`),this.hls&&this.hls.trigger(y.ERROR,{type:be.OTHER_ERROR,details:ee.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${f}`)})})}}}sA.CDMCleanupPromise=void 0;class Vs 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 fu(a,e){const t=a==="output-restricted",n=t?ee.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:ee.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new Vs({type:be.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class hu{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,c=this.hls;if(c.trigger(y.FPS_DROP,{currentDropped:s,currentDecoded:A,totalDroppedFrames:n}),f>0&&s>c.config.fpsDroppedMonitoringThreshold*A){let p=c.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+p),p>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=p)&&(p=p-1,c.trigger(y.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,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 Ol(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 du(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){pe.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){pe.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function LA(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 Oa(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=zi(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 gu(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 zi(a,e,t){const n=[],r=gu(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 fa(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 UA extends bA{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=fa(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;fa(n.textTracks).forEach(s=>{LA(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(p=>!n||n.indexOf(p.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(p=>p.default)&&(this.selectDefaultTrack=!1),s.forEach((p,_)=>{p.id=_});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const A=this.hls.config.subtitlePreference;if(!i&&A){this.selectDefaultTrack=!1;const p=yt(A,s);if(p>-1)i=s[p];else{const _=yt(A,this.tracks);i=this.tracks[_]}}let f=this.findTrackId(i);f===-1&&i&&(f=this.findTrackId(null));const c={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,c),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||Kt(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if(ji(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if(ji(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(eA(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===Ce.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&&Kt(e,n))return n;const r=yt(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=yt(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=fa(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>eA(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||!te(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:c,url:p}=r;this.hls.trigger(y.SUBTITLE_TRACK_SWITCH,{id:s,groupId:A,name:f,type:c,url:p});const _=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(_)}}function Pa(){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 Ws(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const ha=.025;let zs=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function pu(a,e,t){return`${a.identifier}-${t+1}-${Ws(e)}`}class mu{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 Xo(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=Xo(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=te(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 Xo(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)<ha))}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"?zs.Range:zs.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 _u(this)}}function Xo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<ha)?e.start:e.start+e.duration}function Jo(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function aA(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function _u(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function AA(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class so{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 p=this.bufferedEnd;this.reachedPlayout(p)&&(this._bufferedEosTime=p,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=Jo(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=Tn.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=Tn.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: ${AA(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const vu=.033;class ju 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(c=>!A.includes(c.identifier)):[];s.length&&s.sort((c,p)=>{const _=c.cue.pre,w=c.cue.post,I=p.cue.pre,D=p.cue.post;if(_&&!I)return-1;if(I&&!_||w&&!D)return 1;if(D&&!w)return-1;if(!_&&!I&&!w&&!D){const G=c.startTime,H=p.startTime;if(G!==H)return G-H}return c.dateRange.tagOrder-p.dateRange.tagOrder}),this.events=s,f.forEach(c=>{this.removeEvent(c)}),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,c)=>Math.abs(f.playout.start-i[c].playout.start)>.005||Math.abs(f.playout.end-i[c].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 c=this.eventMap[A];c?c.setDateRange(f):(c=new mu(f,t),this.eventMap[A]=c,n===!1&&(c.appendInPlace=n)),r.push(c)}}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,c=0;if(e.forEach((p,_)=>{const w=p.cue.pre,I=p.cue.post,D=e[_-1]||null,G=p.appendInPlace,H=I?i:p.startOffset,ue=p.duration,Ie=p.timelineOccupancy===zs.Range?ue:0,xe=p.resumptionOffset,Ye=(D==null?void 0:D.startTime)===H,lt=H+p.cumulativeDuration;let kt=G?lt+ue:H+xe;if(w||!I&&H<=0){const wt=c;c+=Ie,p.timelineStart=lt;const Bt=s;s+=ue,n.push({event:p,start:lt,end:kt,playout:{start:Bt,end:s},integrated:{start:wt,end:c}})}else if(H<=i){if(!Ye){const st=H-f;if(st>vu){const Vt=f,Cn=c;c+=st;const Zn=s;s+=st;const ar={previousEvent:e[_-1]||null,nextEvent:p,start:Vt,end:Vt+st,playout:{start:Zn,end:s},integrated:{start:Cn,end:c}};n.push(ar)}else st>0&&D&&(D.cumulativeDuration+=st,n[n.length-1].end=H)}I&&(kt=lt),p.timelineStart=lt;const wt=c;c+=Ie;const Bt=s;s+=ue,n.push({event:p,start:lt,end:kt,playout:{start:Bt,end:s},integrated:{start:wt,end:c}})}else return;const it=p.resumeTime;I||it>i?f=i:f=it}),f<i){var A;const p=f,_=c,w=i-f;c+=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:p+w,playout:{start:I,end:s},integrated:{start:_,end:c}})}this.setDurations(i,s,c)}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 c=A.cue.pre,p=A.cue.post,_=c?0:p?r:A.startTime;this.updateAssetDurations(A),s===_?A.cumulativeDuration=i:(i=0,s=_),!p&&A.snapOptions.in&&(A.resumeAnchor=N(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<vu&&(e[f+1].appendInPlace=!1,e[f+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${A}`));const I=te(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)>ha?(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 c=N(null,A.fragments,n);if(!c)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${s} playlist (${A.fragStart}-${A.fragmentEnd})`),!0;const p=s==="audio"?.175:0;return Math.abs(c.start-n)<ha+p||Math.abs(c.end-n)<ha+p?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${s} fragment bounds (${c.start}-${c.end} sn: ${c.sn} cc: ${c.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 c=A.error?0:A.duration||0;n+=c}r&&!i?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function ta(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class Xu{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=Jo(n,this.hls.sessionId,e.baseUrl)}catch(w){const I=this.assignAssetListError(e,ee.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},c=i.interstitialAssetListLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(w,I,D,G)=>{const H=w.data,ue=H==null?void 0:H.ASSETS;if(!Array.isArray(ue)){const Ie=this.assignAssetListError(e,ee.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),D.url,I,G);this.hls.trigger(y.ERROR,Ie);return}e.assetListResponse=H,this.hls.trigger(y.ASSET_LIST_LOADED,{event:e,assetListResponse:H,networkDetails:G})},onError:(w,I,D,G)=>{const H=this.assignAssetListError(e,ee.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,H)},onTimeout:(w,I,D)=>{const G=this.assignAssetListError(e,ee.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,p,_),this.hls.trigger(y.ASSET_LIST_LOADING,{event:e}),A}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:be.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function yu(a){a==null||a.play().catch(()=>{})}function RA(a,e){return`[${a}] Advancing timeline position to ${e}`}class Ju 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 c=this.playingAsset;if(!c){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 p=c.timelineStart,_=c.duration||0;if(s&&n<p||n>=p+_){var w;(w=A.event)!=null&&w.appendInPlace&&(this.clearInterstitial(A.event,A),this.flushFrontBuffer(n)),this.setScheduleToAssetAtTime(n,c)}},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||[],c=i.durations,p=n.map(G=>G.identifier),_=!!(A.length||p.length);(_||r)&&this.log(`INTERSTITIALS_UPDATED (${A.length}): ${A}
|
|
Schedule: ${f.map(G=>ta(G))} pos: ${this.timelinePos}`),p.length&&this.log(`Removed events ${p}`);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(H=>{this.clearAssetPlayer(H.identifier,null)})}),this.playerQueue.forEach(G=>{if(G.interstitial.appendInPlace){const H=G.assetItem.timelineStart,ue=G.timelineOffset-H;if(ue)try{G.timelineOffset=H}catch(Ie){Math.abs(ue)>ha&&this.warn(`${Ie} ("${G.assetId}" ${G.timelineOffset}->${H})`)}}}),_||r){if(this.hls.trigger(y.INTERSTITIALS_UPDATED,{events:A.slice(0),schedule:f.slice(0),durations:c,removedIds:p}),this.isInterstitial(s)&&p.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 Xu(e),this.schedule=new ju(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){Wi(e,"play",this.onPlay),Wi(e,"pause",this.onPause),Wi(e,"seeking",this.onSeeking),Wi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Mi(n,"seeking",this.onSeeking),Mi(n,"timeupdate",this.onTimeupdate),Mi(n,"play",this.onPlay),Mi(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 H=_[w].start;const ue=_.event;if(ue){if(w==="playout"||ue.timelineOccupancy!==zs.Point){const Ie=n(I);(Ie==null?void 0:Ie.interstitial)===ue&&(H+=Ie.assetItem.startOffset+Ie[G])}}else{const Ie=D==="bufferedPos"?s():e[D];H+=Ie-_.start}return H}return 0},i=(_,w)=>{var I;if(_!==0&&w!=="primary"&&(I=e.schedule)!=null&&I.length){var D;const G=e.schedule.findItemIndexAtTime(_),H=(D=e.schedule.items)==null?void 0:D[G];if(H){const ue=H[w].start-H.start;return _+ue}}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 H=e.effectivePlayingItem,ue=e.schedule.findItemIndexAtTime(_,w),Ie=(D=e.schedule.items)==null?void 0:D[ue],xe=e.getBufferingPlayer(),Ye=xe==null?void 0:xe.interstitial,lt=Ye==null?void 0:Ye.appendInPlace,kt=H&&e.itemsMatch(H,Ie);if(H&&(lt||kt)){const it=n(e.playingAsset),wt=(it==null?void 0:it.media)||e.primaryMedia;if(wt){const Bt=w==="primary"?wt.currentTime:r(H,w,e.playingAsset,"timelinePos","currentTime"),st=_-Bt,Vt=(lt?Bt:wt.currentTime)+st;if(Vt>=0&&(!it||lt||Vt<=it.duration)){wt.currentTime=Vt;return}}}if(Ie){let it=_;if(w!=="primary"){const Bt=Ie[w].start,st=_-Bt;it=Ie.start+st}const wt=!e.isInterstitial(Ie);if((!e.isInterstitial(H)||H.event.appendInPlace)&&(wt||Ie.event.appendInPlace)){const Bt=e.media||(lt?xe==null?void 0:xe.media:null);Bt&&(Bt.currentTime=it)}else if(H){const Bt=e.findItemIndex(H);if(ue>Bt){const Vt=e.schedule.findJumpRestrictedIndex(Bt+1,ue);if(Vt>Bt){e.setSchedulePosition(Vt);return}}let st=0;if(wt)e.timelinePos=it,e.checkBuffer();else{const Vt=Ie.event.assetList,Cn=_-(Ie[w]||Ie).start;for(let Zn=Vt.length;Zn--;){const ar=Vt[Zn];if(ar.duration&&Cn>=ar.startOffset&&Cn<ar.startOffset+ar.duration){st=Zn;break}}}e.setSchedulePosition(ue,st)}}},c=()=>{const _=e.effectivePlayingItem;if(e.isInterstitial(_))return _;const w=t();return e.isInterstitial(w)?w:null},p={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 _=c(),w=e.effectivePlayingItem;return w&&w===_?r(w,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-w.playout.start:0},set currentTime(_){const w=c(),I=e.effectivePlayingItem;I&&I===w&&f(_+I.playout.start,"playout")},get duration(){const _=c();return _?_.playout.end-_.playout.start:0},get assetPlayers(){var _;const w=(_=c())==null?void 0:_.event.assetList;return w?w.map(I=>e.getAssetPlayer(I.identifier)):[]},get playingIndex(){var _;const w=(_=c())==null?void 0:_.event;return w&&e.effectivePlayingAsset?w.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};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 c()?p: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||!te(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} ${gr(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,c=(n=this.detachedData)==null?void 0:n.mediaSource;let p;if(s.media)f&&(i=s.transferMedia(),this.detachedData=i),p="Primary";else if(c){const D=this.getBufferingPlayer();D?(i=D.transferMedia(),p=`${D}`):p="detached MediaSource"}else p="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${gr(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 H=G.interstitial;this.clearInterstitial(G.interstitial,null),H.appendInPlace=!1,H.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${H}`)}}),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 ${p} (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(RA("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=aA(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=aA(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(RA("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&&ta(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,A=this.playingLastItem;if(this.isInterstitial(s)){const p=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!==p.assetList[t].identifier)){var f;const D=p.findAssetIndex(_);if(this.log(`INTERSTITIAL_ASSET_ENDED ${D+1}/${p.assetList.length} ${AA(_)}`),this.endedAsset=_,this.playingAsset=null,this.hls.trigger(y.INTERSTITIAL_ASSET_ENDED,{asset:_,assetListIndex:D,event:p,schedule:r.slice(0),scheduleIndex:e,player:I}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(p,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 ${p} ${ta(s)}`),p.hasPlayed=!0,this.hls.trigger(y.INTERSTITIAL_ENDED,{event:p,schedule:r.slice(0),scheduleIndex:e}),p.cue.once)){var c;this.updateSchedule();const D=(c=this.schedule)==null?void 0:c.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,c=this.playerQueue;if(c.length&&c.forEach(p=>{const _=p.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 p=A.event;if(n===void 0){n=s.findAssetIndex(p,this.timelinePos);const D=aA(p,n-1);if(p.isAssetPastPlayoutLimit(D)||p.appendInPlace&&this.timelinePos===A.end){this.advanceAfterAssetEnded(p,e,n);return}n=D}const _=this.waitingItem;this.assetsBuffered(A,f)||this.setBufferingItem(A);let w=this.preloadAssets(p,n);if(this.eventItemsMatch(A,_||r)||(this.waitingItem=A,this.log(`INTERSTITIAL_STARTED ${ta(A)} ${p.appendInPlace?"append in place":""}`),this.hls.trigger(y.INTERSTITIAL_STARTED,{event:p,schedule:t.slice(0),scheduleIndex:e})),!p.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${p}`);return}if(p.assetListLoader&&(p.assetListLoader.destroy(),p.assetListLoader=void 0),!f){this.log(`Waiting for attachMedia to start Interstitial ${p}`);return}this.waitingItem=this.endedItem=null,this.playingItem=A;const I=p.assetList[n];if(!I){this.advanceAfterAssetEnded(p,e,n||0);return}if(w||(w=this.getAssetPlayer(I.identifier)),w===null||w.destroyed){const D=p.assetList.length;this.warn(`asset ${n+1}/${D} player destroyed ${p}`),w=this.createAssetPlayer(p,I,n),w.loadSource()}if(!this.eventItemsMatch(A,this.bufferingItem)&&p.appendInPlace&&this.isAssetBuffered(I))return;this.startAssetPlayer(w,n,t,e,f),this.shouldPlay&&yu(w.media)}else A?(this.resumePrimary(A,e,r),this.shouldPlay&&yu(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 ${ta(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let A=this.timelinePos;(A<e.start||A>=e.end)&&(A=this.getPrimaryResumption(e,t),this.log(RA("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 ${ta(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:Tn.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(RA("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],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=Nt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=Nt(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=Tn.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${ta(e)} (was ${ta(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=Tn.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 c;const p=this.findItemIndex(i),_=Math.min(p+1,t.length-1),w=t[_];if((f===-1&&i&&e>=i.end||(c=w.event)!=null&&c.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>p&&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 ${ta(e)}`+(t?` (${f.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((p,_)=>{const w=this.getAssetPlayer(p.identifier);w&&(_===c&&w.loadSource(),w.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.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 c,p=0;if(!this.playingItem&&this.primaryLive&&(p=this.hls.startPosition,p===-1&&(p=this.hls.liveSyncPosition||0)),p&&!(e.cue.pre||e.cue.post)){const w=p-f;w>0&&(c=Math.round(w*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${c?` live-start: ${p} start-offset: ${c}`:""}`),n)return this.createAsset(e,0,0,f,e.duration,n);const _=this.assetListLoader.loadAssetList(e,c);_&&(e.assetListLoader=_)}else if(!s&&r){for(let c=t;c<r;c++){const p=e.assetList[c],_=this.getAssetPlayerQueueIndex(p.identifier);(_===-1||this.playerQueue[_].destroyed)&&!p.error&&this.createAssetPlayer(e,p,c)}const f=e.assetList[t];if(f){const c=this.getAssetPlayer(f.identifier);return c&&c.loadSource(),c}}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:pu(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],c=r.subtitleTracks[r.subtitleTrack];let p=0;if(this.primaryLive||e.appendInPlace){const Ye=this.timelinePos-t.timelineStart;if(Ye>1){const lt=t.duration;lt&&Ye<lt&&(p=Ye)}}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:p,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:f||i.audioPreference,subtitlePreference:c||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:Ws(t.uri)})),this.getAssetPlayer(_)&&this.warn(`Duplicate date range identifier ${e} and asset ${_}`);const D=new so(this.HlsPlayerClass,w,e,t);this.playerQueue.push(D),e.assetList[n]=t;let G=!0;const H=Ye=>{if(Ye.live){var lt;const wt=new Error(`Interstitials MUST be VOD assets ${e}`),Bt={fatal:!0,type:be.OTHER_ERROR,details:ee.INTERSTITIAL_ASSET_ITEM_ERROR,error:wt},st=((lt=this.schedule)==null?void 0:lt.findEventIndex(e.identifier))||-1;this.handleAssetItemError(Bt,e,st,n,wt.message);return}const kt=Ye.edge-Ye.fragmentStart,it=t.duration;(G||it===null||kt>it)&&(G=!1,this.log(`Interstitial asset "${_}" duration change ${it} > ${kt}`),t.duration=kt,this.updateSchedule())};D.on(y.LEVEL_UPDATED,(Ye,{details:lt})=>H(lt)),D.on(y.LEVEL_PTS_UPDATED,(Ye,{details:lt})=>H(lt)),D.on(y.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const ue=(Ye,lt)=>{const kt=this.getAssetPlayer(_);if(kt&<.tracks){kt.off(y.BUFFER_CODECS,ue),kt.tracks=lt.tracks;const it=this.primaryMedia;this.bufferingAsset===kt.assetItem&&it&&!kt.media&&this.bufferAssetPlayer(kt,it)}};D.on(y.BUFFER_CODECS,ue);const Ie=()=>{var Ye;const lt=this.getAssetPlayer(_);if(this.log(`buffered to end of asset ${lt}`),!lt||!this.schedule)return;const kt=this.schedule.findEventIndex(e.identifier),it=(Ye=this.schedule.items)==null?void 0:Ye[kt];this.isInterstitial(it)&&this.advanceAssetBuffering(it,t)};D.on(y.BUFFERED_TO_END,Ie);const xe=Ye=>()=>{if(!this.getAssetPlayer(_)||!this.schedule)return;this.shouldPlay=!0;const kt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,kt,Ye)};return D.once(y.MEDIA_ENDED,xe(n)),D.once(y.PLAYOUT_LIMIT_REACHED,xe(1/0)),D.on(y.ERROR,(Ye,lt)=>{if(!this.schedule)return;const kt=this.getAssetPlayer(_);if(lt.details===ee.BUFFER_STALLED_ERROR){if(kt!=null&&kt.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(lt,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${lt.error} ${e}`)}),D.on(y.DESTROYING,()=>{if(!this.getAssetPlayer(_)||!this.schedule)return;const lt=new Error(`Asset player destroyed unexpectedly ${_}`),kt={fatal:!0,type:be.OTHER_ERROR,details:ee.INTERSTITIAL_ASSET_ITEM_ERROR,error:lt};this.handleAssetItemError(kt,e,this.schedule.findEventIndex(e.identifier),n,lt.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${AA(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&&ta(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,c=s.assetList.length,p=this.playingAsset;this.endedAsset=null,this.playingAsset=A,(!p||p.identifier!==f)&&(p&&(this.clearAssetPlayer(p.identifier,n[r]),delete p.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${AA(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 c=this.getBufferingPlayer();if(c===e)return;const p=i.appendInPlace;if(p&&(c==null?void 0:c.interstitial.appendInPlace)===!1)return;const _=(c==null?void 0:c.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(p&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(_&&!Ee(_,e.tracks)){const w=new Error(`Asset ${AA(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(_)}')`),I={fatal:!0,type:be.OTHER_ERROR,details:ee.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,c=A.duration-f;if(this.warn(`Stalled at ${f} of ${f+c} in ${A} ${e} (media.currentTime: ${r})`),f&&(c/n.playbackRate<.5||A.bufferedInPlaceToEnd(n))&&A.hls){const p=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,p,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,n,r,i){if(e.details===ee.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&AA(s)} ${e.error}`),!this.schedule)return;const A=(s==null?void 0:s.identifier)||"",f=this.getAssetPlayerQueueIndex(A),c=this.playerQueue[f]||null,p=this.schedule.items,_=B({},e,{fatal:!1,errorAction:an(!0),asset:s,assetListIndex:r,event:t,schedule:p,scheduleIndex:n,player:c});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: ${ta(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,c=i.duration;let p=0;A.forEach((G,H)=>{const ue=parseFloat(G.DURATION);this.createAsset(i,H,p,f+p,ue,G.URI),p+=ue}),i.duration=p,this.log(`Loaded asset-list with duration: ${p} (was: ${c}) ${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),H=(D=this.schedule.items)==null?void 0:D[G];if(H){if(!this.playingItem&&this.timelinePos>H.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(H)}this.setSchedulePosition(G)}else if((I==null?void 0:I.identifier)===s){const G=i.assetList[0];if(G){const H=this.getAssetPlayer(G.identifier);if(I.appendInPlace){const ue=this.primaryMedia;H&&ue&&this.bufferAssetPlayer(H,ue)}else H&&H.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case ee.ASSET_LIST_PARSING_ERROR:case ee.ASSET_LIST_LOAD_ERROR:case ee.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case ee.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 wu=500;class qu extends $s{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=Pt.IDLE,this.setInterval(wu),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)||(Je(n)&&(this.fragPrevious=n),this.state=Pt.IDLE),!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const A=n.start;for(let c=0;c<i.length;c++)if(A>=i[c].start&&A<=i[c].end){s=i[c];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===ee.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Pt.STOPPED&&(this.state=Pt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&$o(this.levels,t)){this.levels=t.map(n=>new xr(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new xr(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!==Pt.STOPPED&&this.setInterval(wu)}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 c=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?(xs(s,_),c=s.fragmentStart):w&&(c=w.start,Ta(s,c));else{var p;c=this.alignPlaylists(s,f.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&w&&(c=w.start,Ta(s,c))}_&&!this.startFragRequested&&this.setStartPosition(_,c)}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===Pt.IDLE&&(N(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&&qi(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Ii(r.method)).catch(A=>{throw i.trigger(y.ERROR,{type:be.MEDIA_ERROR,details:ee.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=Pt.IDLE})}}doTick(){if(!this.media){this.state=Pt.IDLE;return}if(this.state===Pt.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=Tn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:A,len:f}=s,c=n.details,p=this.hls.maxBufferLength+c.levelTargetDuration;if(f>p)return;const _=c.fragments,w=_.length,I=c.edge;let D=null;const G=this.fragPrevious;if(A<I){const Ie=r.maxFragLookUpTolerance,xe=A>I-Ie?0:Ie;D=N(G,_,Math.max(_[0].start,A),xe),!D&&G&&G.start<_[0].start&&(D=_[0])}else D=_[w-1];if(D=this.filterReplacedPrimary(D,n.details),!D)return;const H=D.sn-c.startSN,ue=_[H-1];if(ue&&ue.cc===D.cc&&this.fragmentTracker.getState(ue)===An.NOT_LOADED&&(D=ue),this.fragmentTracker.getState(D)===An.NOT_LOADED){const Ie=this.mapToInitFragWhenRequired(D);Ie&&this.loadFragment(Ie,n,A)}}}loadFragment(e,t,n){Je(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new ec(this.tracksBuffered[this.currentTrackId]||[])}}class ec{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 tc={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},qo=a=>String.fromCharCode(tc[a]||a),Ns=15,da=100,nc={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},rc={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Eu={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},ic={25:2,26:4,29:6,30:8,31:10,27:13,28:15},sc=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class ac{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;pe.log(`${this.time} [${e}] ${n}`)}}}const oA=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class Bu{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 Pl{constructor(){this.uchar=" ",this.penState=new Bu}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 Ac{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Bu,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<da;t++)this.chars.push(new Pl);this.logger=e}equals(e){for(let t=0;t<da;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<da;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<da;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>da&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=da)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=qo(e);if(this.pos>=da){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<da;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<da;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 ao{constructor(e){this.rows=[],this.currRow=Ns-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Ns;t++)this.rows.push(new Ac(e));this.logger=e}reset(){for(let e=0;e<Ns;e++)this.rows[e].clear();this.currRow=Ns-1}equals(e){let t=!0;for(let n=0;n<Ns;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<Ns;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Ns;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 = "+gr(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<Ns;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 c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(s.rows[i+c])}}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 = "+gr(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<Ns;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 bu{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 ao(n),this.nonDisplayedMemory=new ao(n),this.lastOutputScreen=new ao(n),this.currRollUpRow=this.displayedMemory.rows[Ns-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[Ns-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: "+gr(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 kn{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Zs(),this.logger=void 0;const r=this.logger=new ac;this.channels=[null,new bu(e,t,r),new bu(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,()=>"["+oA([t[n],t[n+1]])+"] -> ("+oA([r,i])+")");const f=this.cmdHistory;if(r>=16&&r<=31){if(el(r,i,f)){Ba(null,null,f),this.logger.log(3,()=>"Repeated command ("+oA([r,i])+") is dropped");continue}Ba(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 Ba(null,null,f);if(!s&&(A=this.parseChars(r,i),A)){const p=this.currentChannel;p&&p>0?this.channels[p].insertChars(A):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!A&&this.logger.log(2,()=>"Couldn't parse cleaned data "+oA([r,i])+" orig: "+oA([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 ("+oA([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?nc[e]:Eu[e]:n=s===1?rc[e]:ic[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 '"+qo(s)+"' in channel "+n),r=[s]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+oA(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=sc[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()}Ba(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 Ba(a,e,t){t.a=a,t.b=e}function el(a,e,t){return t.a===a&&t.b===e}function Zs(){return{a:null,b:null}}var Ml=function(){if(ws!=null&&ws.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 c=f.toLowerCase();return~A.indexOf(c)?c:!1}function n(A){return t(a,A)}function r(A){return t(e,A)}function i(A,...f){let c=1;for(;c<arguments.length;c++){const p=arguments[c];for(const _ in p)A[_]=p[_]}return A}function s(A,f,c){const p=this,_={enumerable:!0};p.hasBeenReset=!1;let w="",I=!1,D=A,G=f,H=c,ue=null,Ie="",xe=!0,Ye="auto",lt="start",kt=50,it="middle",wt=50,Bt="middle";Object.defineProperty(p,"id",i({},_,{get:function(){return w},set:function(st){w=""+st}})),Object.defineProperty(p,"pauseOnExit",i({},_,{get:function(){return I},set:function(st){I=!!st}})),Object.defineProperty(p,"startTime",i({},_,{get:function(){return D},set:function(st){if(typeof st!="number")throw new TypeError("Start time must be set to a number.");D=st,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},_,{get:function(){return G},set:function(st){if(typeof st!="number")throw new TypeError("End time must be set to a number.");G=st,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},_,{get:function(){return H},set:function(st){H=""+st,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},_,{get:function(){return ue},set:function(st){ue=st,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},_,{get:function(){return Ie},set:function(st){const Vt=n(st);if(Vt===!1)throw new SyntaxError("An invalid or illegal string was specified.");Ie=Vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},_,{get:function(){return xe},set:function(st){xe=!!st,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},_,{get:function(){return Ye},set:function(st){if(typeof st!="number"&&st!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");Ye=st,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},_,{get:function(){return lt},set:function(st){const Vt=r(st);if(!Vt)throw new SyntaxError("An invalid or illegal string was specified.");lt=Vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},_,{get:function(){return kt},set:function(st){if(st<0||st>100)throw new Error("Position must be between 0 and 100.");kt=st,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},_,{get:function(){return it},set:function(st){const Vt=r(st);if(!Vt)throw new SyntaxError("An invalid or illegal string was specified.");it=Vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},_,{get:function(){return wt},set:function(st){if(st<0||st>100)throw new Error("Size must be between 0 and 100.");wt=st,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},_,{get:function(){return Bt},set:function(st){const Vt=r(st);if(!Vt)throw new SyntaxError("An invalid or illegal string was specified.");Bt=Vt,this.hasBeenReset=!0}})),p.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class mi{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Li(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 tl{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 Cu(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 kA=new Ml(0,0,""),nl=kA.align==="middle"?"middle":"center";function rl(a,e,t){const n=a;function r(){const A=Li(a);if(A===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),A}function i(A,f){const c=new tl;Cu(A,function(w,I){let D;switch(w){case"region":for(let G=t.length-1;G>=0;G--)if(t[G].id===I){c.set(w,t[G].region);break}break;case"vertical":c.alt(w,I,["rl","lr"]);break;case"line":D=I.split(","),c.integer(w,D[0]),c.percent(w,D[0])&&c.set("snapToLines",!1),c.alt(w,D[0],["auto"]),D.length===2&&c.alt("lineAlign",D[1],["start",nl,"end"]);break;case"position":D=I.split(","),c.percent(w,D[0]),D.length===2&&c.alt("positionAlign",D[1],["start",nl,"end","line-left","line-right","auto"]);break;case"size":c.percent(w,I);break;case"align":c.alt(w,I,["start",nl,"end","left","right"]);break}},/:/,/\s/),f.region=c.get("region",null),f.vertical=c.get("vertical","");let p=c.get("line","auto");p==="auto"&&kA.line===-1&&(p=-1),f.line=p,f.lineAlign=c.get("lineAlign","start"),f.snapToLines=c.get("snapToLines",!0),f.size=c.get("size",100),f.align=c.get("align",nl);let _=c.get("position","auto");_==="auto"&&kA.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 xu(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
`)}class oc{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new mi,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=xu(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){Cu(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 Ml(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{rl(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 Su=/\r\n|\n\r|\n|\r/g,Nl=function(e,t,n=0){return e.slice(n,n+t.length)===t},Fu=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(!te(t)||!te(n)||!te(r)||!te(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function Hl(a,e,t){return Ws(a.toString())+Ws(e.toString())+Ws(t)}const Tu=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 Iu(a,e,t,n,r,i,s){const A=new oc,f=et(new Uint8Array(a)).trim().replace(Su,`
|
|
`).split(`
|
|
`),c=[],p=e?Uo(e.baseTime,e.timescale):0;let _="00:00.000",w=0,I=0,D,G=!0;A.oncue=function(H){const ue=t[n];let Ie=t.ccOffset;const xe=(w-p)/9e4;if(ue!=null&&ue.new&&(I!==void 0?Ie=t.ccOffset=ue.start:Tu(t,n,xe)),xe){if(!e){D=new Error("Missing initPTS for VTT MPEGTS");return}Ie=xe-t.presentationOffset}const Ye=H.endTime-H.startTime,lt=Fs((H.startTime+Ie-I)*9e4,r*9e4)/9e4;H.startTime=Math.max(lt,0),H.endTime=Math.max(lt+Ye,0);const kt=H.text.trim();H.text=decodeURIComponent(encodeURIComponent(kt)),H.id||(H.id=Hl(H.startTime,H.endTime,kt)),H.endTime>0&&c.push(H)},A.onparsingerror=function(H){D=H},A.onflush=function(){if(D){s(D);return}i(c)},f.forEach(H=>{if(G)if(Nl(H,"X-TIMESTAMP-MAP=")){G=!1,H.slice(16).split(",").forEach(ue=>{Nl(ue,"LOCAL:")?_=ue.slice(6):Nl(ue,"MPEGTS:")&&(w=parseInt(ue.slice(7)))});try{I=Fu(_)/1e3}catch(ue){D=ue}return}else H===""&&(G=!1);A.parse(H+`
|
|
`)}),A.flush()}const Ao="stpp.ttml.im1t",Kl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Du=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Lu={left:"start",center:"center",right:"end",start:"start",end:"end"};function Uu(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=>et(A)),s=Yl(e.baseTime,1,e.timescale);try{i.forEach(A=>t(lc(A,s)))}catch(A){n(A)}}function lc(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=oo($l(r,"styling","style")),c=oo($l(r,"layout","region")),p=$l(r,"body","[begin]");return[].map.call(p,_=>{const w=Hs(_,A);if(!w||!_.hasAttribute("begin"))return null;const I=Gl(_.getAttribute("begin"),s),D=Gl(_.getAttribute("dur"),s);let G=Gl(_.getAttribute("end"),s);if(I===null)throw ku(_);if(G===null){if(D===null)throw ku(_);G=I+D}const H=new Ml(I-e,G-e,w);H.id=Hl(H.startTime,H.endTime,H.text);const ue=c[_.getAttribute("region")],Ie=f[_.getAttribute("style")],xe=Ru(ue,Ie,f),{textAlign:Ye}=xe;if(Ye){const lt=Lu[Ye];lt&&(H.lineAlign=lt),H.align=Ye}return B(H,xe),H}).filter(_=>_!==null)}function $l(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function oo(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function Hs(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?Hs(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function Ru(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 c=QA(e,n,f)||QA(a,n,f)||QA(r,n,f);return c&&(A[f]=c),A},{})}function QA(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function ku(a){return new Error(`Could not parse ttml timestamp ${a}`)}function Gl(a,e){if(!a)return null;let t=Li(a);return t===null&&(Kl.test(a)?t=Vl(a,e):Du.test(a)&&(t=OA(a,e))),t}function Vl(a,e){const t=Kl.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 OA(a,e){const t=Du.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 lA{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 uc{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=Wl(),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 lA(this,"textTrack1"),t=new lA(this,"textTrack2"),n=new lA(this,"textTrack3"),r=new lA(this,"textTrack4");this.cea608Parser1=new kn(1,e,t),this.cea608Parser2=new kn(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let A=i.length;A--;){const f=i[A],c=cc(f[0],f[1],t,n);if(c>=0&&(f[0]=Math.min(f[0],t),f[1]=Math.max(f[1],n),s=!0,c/(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(Qu(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,LA(n[e]),Ol(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=>{LA(r[i]),delete r[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Wl(),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++)LA(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===Ao);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if($o(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,A=s?fa(s.textTracks):null;if(this.tracks.forEach((f,c)=>{let p;if(A){let _=null;for(let w=0;w<A.length;w++)if(A[w]&&Qu(A[w],f)){_=A[w],A[w]=null;break}_&&(p=_)}if(p)LA(p);else{const _=uA(f);p=this.createTextTrack(_,f.name,f.lang),p&&(p.mode="disabled")}p&&this.textTracks.push(p)}),A!=null&&A.length){const f=A.filter(c=>c!==null).map(c=>c.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:c}=t.frag,p=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(c!==A+1||c===A&&p!==this.lastPartIndex+1||f!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=f,this.lastSn=c,this.lastPartIndex=p}}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===Ao?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;Uu(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,c=(t=n.initSegment)!=null&&t.data?vt(n.initSegment.data,new Uint8Array(r)).buffer:r;Iu(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,p=>{this._appendCues(p,n.level),f.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},p=>{const _=p.message==="Missing initPTS for VTT MPEGTS";_?s.push(e):this._fallbackToIMSC1(n,r),f.logger.log(`Failed to parse VTT cue: ${p}`),!(_&&A>n.cc)&&f.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:p})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||Uu(t,this.initPTS[e.cc],()=>{n.textCodec=Ao,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=>du(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=>Oa(A[f],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:A}=this;Object.keys(A).forEach(f=>Oa(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 p=3&s;(p===0||p===1)&&(t[p].push(A),t[p].push(f))}}return t}}function uA(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function Qu(a,e){return!!a&&a.kind===uA(e)&&eA(e,a)}function cc(a,e,t,n){return Math.min(e,n)-Math.max(a,t)}function Wl(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const fc=/\s/,Ou={newCue(a,e,t,n){const r=[];let i,s,A,f,c;const p=self.VTTCue||self.TextTrackCue;for(let w=0;w<n.rows.length;w++)if(i=n.rows[w],A=!0,f=0,c="",!i.isEmpty()){var _;for(let G=0;G<i.chars.length;G++)fc.test(i.chars[G].uchar)&&A?f++:(c+=i.chars[G].uchar,A=!1);i.cueStartTime=e,e===t&&(t+=1e-4),f>=16?f--:f++;const I=xu(c.trim()),D=Hl(e,t,I);a!=null&&(_=a.cues)!=null&&_.getCueById(D)||(s=new p(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=>du(a,w))),r}};function hc(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const dc=/(\d+)-(\d+)\/(\d+)/;class Pu{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||_c,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=gc(e,this.controller.signal),s=e.responseType==="arraybuffer",A=s?"byteLength":"length",{maxTimeToFirstByteMs:f,maxLoadTimeMs:c}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=f&&te(f)?f:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(ca(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=c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},c-(I-r.loading.start)),!_.ok){const{status:G,statusText:H}=_;throw new vc(H||"fetch, bad network response",G,_)}r.loading.first=I,r.total=mc(_.headers)||r.total;const D=(w=this.callbacks)==null?void 0:w.onProgress;return D&&te(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 H={url:D.url,data:_,code:D.status},ue=(w=this.callbacks)==null?void 0:w.onProgress;ue&&!te(t.highWaterMark)&&ue(r,e,_,D),(I=this.callbacks)==null||I.onSuccess(H,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 Js,A=e.body.getReader(),f=()=>A.read().then(c=>{if(c.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const p=c.value,_=p.length;return t.loaded+=_,_<r||s.dataLength?(s.push(p),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,p.buffer,e),f()}).catch(()=>Promise.reject());return f()}}function gc(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 pc(a){const e=dc.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function mc(a){const e=a.get("Content-Range");if(e){const n=pc(e);if(te(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function _c(a,e){return new self.Request(a.url,e)}class vc extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const yc=/^age:\s*[\d.]+\s*$/im;class Mu{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&&te(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 c=t.status,p=t.responseType==="text"?t.responseText:null;if(c>=200&&c<300){const D=p!=null?p: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 H=(s=this.callbacks)==null?void 0:s.onProgress;H&&H(n,e,D,t);const ue={url:t.responseURL,data:D,code:c};(A=this.callbacks)==null||A.onSuccess(ue,n,e,t);return}}const _=i.loadPolicy.errorRetry,w=n.retry,I={url:e.url,data:void 0,code:c};if(Le(_,w,!1,I))this.retry(_);else{var f;pe.error(`${c} while loading ${e.url}`),(f=this.callbacks)==null||f.onError({code:c,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Le(e,t,!0))this.retry(e);else{var n;pe.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=$t(e,n.retry),n.retry++,pe.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&&yc.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 wc={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Ec=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:Mu,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Sn,bufferController:Sl,capLevelController:FA,errorController:en,fpsController:hu,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:ti,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:wc},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},Bc()),{},{subtitleStreamController:qu,subtitleTrackController:UA,timelineController:uc,audioStreamController:jl,audioTrackController:Go,emeController:sA,cmcdController:uu,contentSteeringController:Yu,interstitialsController:Ju});function Bc(){return{cueHandler:Ou,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 bc(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=h(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,c=[];i.forEach(p=>{const _=`${s}Loading${p}`,w=e[_];if(w!==void 0&&f){c.push(_);const I=n[A].default;switch(e[A]={default:I},p){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}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${A}": ${gr(e[A])}`)}),F(F({},n),e)}function h(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(h):Object.keys(a).reduce((e,t)=>(e[t]=h(a[t]),e),{}):a}function u(a,e){const t=a.loader;t!==Pu&&t!==Mu?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):hc()&&(a.loader=Pu,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const g=2,d=.1,x=.05,U=100;class se extends Ui{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(U),this.mediaSource=t.mediaSource;const n=this.media=t.media;Mi(n,"playing",this.onMediaPlaying),Mi(n,"waiting",this.onMediaWaiting),Mi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(Wi(n,"playing",this.onMediaPlaying),Wi(n,"waiting",this.onMediaWaiting),Wi(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,c=!this.seeking&&A,p=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&&!p&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(c||f){f&&this.stallResolved(e);return}if(p){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(!Tn.getBuffered(s).length){this.nudgeRetry=0;return}const _=Tn.bufferInfo(s,e,0),w=_.nextStart||0,I=this.fragmentTracker;if(A&&I&&this.hls){const kt=we(this.hls.inFlightFragments,e),it=_.len>g,wt=!w||kt||w-e>g&&!I.getPartialFragment(e);if(it||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 it=Math.max(w,_.start||0)-e,Bt=!!(D!=null&&D.live)?D.targetduration*2:g,st=Ve(e,I);if(it>0&&(it<=Bt||st)){s.paused||this._trySkipBufferHole(st);return}}const G=i.detectStallWithCurrentTimeMs,H=self.performance.now(),ue=this.waiting;let Ie=this.stalled;if(Ie===null)if(ue>0&&H-ue<G)Ie=this.stalled=ue;else{this.stalled=H;return}const xe=H-Ie;if(!A&&(xe>=G||ue)&&this.hls){var Ye;if(((Ye=this.mediaSource)==null?void 0:Ye.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 lt=Tn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(lt,xe,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=Tn.bufferedInfo(Tn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=Tn.timeRangesToArray(r),A=Tn.bufferedInfo(s,t,0).bufferedIndex;if(A>-1&&A<s.length-1){const f=Tn.bufferedInfo(s,e,0).bufferedIndex,c=s[A].end,p=s[A+1].start;if((f===-1||f>A)&&p-c<1&&e-c<2){const _=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${f}`);this.warn(_.message),this.media.currentTime+=1e-6;let w=Ve(e,this.fragmentTracker);w&&"fragment"in w?w=w.fragment:w||(w=void 0);const I=Tn.bufferInfo(this.media,e,0);this.hls.trigger(y.ERROR,{type:be.MEDIA_ERROR,details:ee.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 c=(i=this.hls)==null?void 0:i.latestLevelDetails,p=Ve(n,s);if((p||c!=null&&c.live&&n<c.fragmentStart)&&(this._trySkipBufferHole(p)||!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 (${gr(e)})`);this.warn(s.message),t.trigger(y.ERROR,{type:be.MEDIA_ERROR,details:ee.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=Tn.bufferInfo(r,s,0),f=s<A.start?A.start:A.nextStart;if(f&&this.hls){const p=A.len<=i.maxBufferHole,_=A.len>0&&A.len<1&&r.readyState<3,w=f-s;if(w>0&&(p||_)){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 c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||we(this.hls.inFlightFragments,f))return 0;let H=!1,ue=e.end;for(;ue<f;){const Ie=Ve(ue,n);if(Ie)ue+=Ie.duration;else{H=!0;break}}if(H)return 0}}const I=Math.max(f+x,s+d);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:be.MEDIA_ERROR,details:ee.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:be.MEDIA_ERROR,details:ee.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:be.MEDIA_ERROR,details:ee.BUFFER_STALLED_ERROR,error:A,fatal:!0,buffer:e.len,bufferInfo:e})}}}function we(a,e){const t=ye(a.main);if(t&&t.start<=e)return t;const n=ye(a.audio);return n&&n.start<=e?n:null}function ye(a){if(!a)return null;switch(a.state){case Pt.IDLE:case Pt.STOPPED:case Pt.ENDED:case Pt.ERROR:return null}return a.frag}function Ve(a,e){return e.getAppendedFrag(a,V.MAIN)||e.getPartialFragment(a)}const qe=.25;function dt(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function Mt(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,gr(r?F({type:r},n):n))}return i}const Qn=(()=>{const a=dt();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class pn{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&&LA(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 Ol(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=dt();if(s)for(let A=0;A<i.length;A++){const f=i[A].type;if(f===hs.emsg&&!n||!r)continue;const c=mA(i[A].data),p=i[A].pts;let _=p+i[A].duration;_>Qn&&(_=Qn),_-p<=0&&(_=p+qe);for(let I=0;I<c.length;I++){const D=c[I];if(!ms(D)){this.updateId3CueEnds(p,f);const G=Mt(s,p,_,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===Qn&&(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 c;r==="audio"?c=p=>p.type===hs.audioId3&&f:r==="video"?c=p=>p.type===hs.emsg&&A:c=p=>p.type===hs.audioId3&&f||p.type===hs.emsg&&A,Oa(i,t,n,c)}}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=dt();if(n&&r&&!s){const{fragmentStart:G,fragmentEnd:H}=e;let ue=this.assetCue;ue?(ue.startTime=G,ue.endTime=H):A&&(ue=this.assetCue=Mt(A,G,H,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),ue&&(ue.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(ue),ue.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:f}=this,{dateRanges:c}=e,p=Object.keys(c);let _=this.dateRangeCuesAppended;if(f&&t){var w;if((w=f.cues)!=null&&w.length){const G=Object.keys(_).filter(H=>!p.includes(H));for(let H=G.length;H--;){var I;const ue=G[H],Ie=(I=_[ue])==null?void 0:I.cues;delete _[ue],Ie&&Object.keys(Ie).forEach(xe=>{const Ye=Ie[xe];if(Ye){Ye.removeEventListener("enter",this.onEventCueEnter);try{f.removeCue(Ye)}catch(lt){}}})}}else _=this.dateRangeCuesAppended={}}const D=e.fragments[e.fragments.length-1];if(!(p.length===0||!te(D==null?void 0:D.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let G=0;G<p.length;G++){const H=p[G],ue=c[H],Ie=ue.startTime,xe=_[H],Ye=(xe==null?void 0:xe.cues)||{};let lt=(xe==null?void 0:xe.durationKnown)||!1,kt=Qn;const{duration:it,endDate:wt}=ue;if(wt&&it!==null)kt=Ie+it,lt=!0;else if(ue.endOnNext&&!lt){const st=p.reduce((Vt,Cn)=>{if(Cn!==ue.id){const Zn=c[Cn];if(Zn.class===ue.class&&Zn.startDate>ue.startDate&&(!Vt||ue.startDate<Vt.startDate))return Zn}return Vt},null);st&&(kt=st.startTime,lt=!0)}const Bt=Object.keys(ue.attr);for(let st=0;st<Bt.length;st++){const Vt=Bt[st];if(!gs(Vt))continue;const Cn=Ye[Vt];if(Cn)lt&&!(xe!=null&&xe.durationKnown)?Cn.endTime=kt:Math.abs(Cn.startTime-Ie)>.01&&(Cn.startTime=Ie,Cn.endTime=kt);else if(A){let Zn=ue.attr[Vt];Ds(Vt)&&(Zn=Q(Zn));const Yn=Mt(A,Ie,kt,{key:Vt,data:Zn},hs.dateRange);Yn&&(Yn.id=H,this.id3Track.addCue(Yn),Ye[Vt]=Yn,s&&(Vt==="X-ASSET-LIST"||Vt==="X-ASSET-URL")&&Yn.addEventListener("enter",this.onEventCueEnter))}}_[H]={cues:Ye,dateRange:ue,durationKnown:lt}}}}}class Dn{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,c=Math.min(this.maxLatency,A+n.targetduration);if(f<c&&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 c=A&&n||t;(this._targetLatencyUpdated||f.liveSyncDuration||f.liveSyncDurationCount||c===0)&&(c=i!==void 0?i:s*r);const p=r;return c+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,p)}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===ee.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 kr extends bA{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,c=!1;t.levels.forEach(p=>{const _=p.attrs;let{audioCodec:w,videoCodec:I}=p;w&&(p.audioCodec=w=me(w,n)||void 0),I&&(I=p.videoCodec=Wt(I));const{width:D,height:G,unknownCodecs:H}=p;let ue=H?H.length:0;if(H)for(let st=ue;st--;){const Vt=H[st];this.isAudioSupported(Vt)?(p.audioCodec=w=w?`${w},${Vt}`:Vt,ue--,yn.audio[w.substring(0,4)]=2):this.isVideoSupported(Vt)&&(p.videoCodec=I=I?`${I},${Vt}`:Vt,ue--,yn.video[I.substring(0,4)]=2)}if(A||(A=!!(D&&G)),f||(f=!!I),c||(c=!!w),ue||w&&!this.isAudioSupported(w)||I&&!this.isVideoSupported(I)){this.log(`Some or all CODECS not supported "${_.CODECS}"`);return}const{CODECS:Ie,"FRAME-RATE":xe,"HDCP-LEVEL":Ye,"PATHWAY-ID":lt,RESOLUTION:kt,"VIDEO-RANGE":it}=_,Bt=`${`${lt||"."}-`}${p.bitrate}-${kt}-${xe}-${Ie}-${it}-${Ye}`;if(i[Bt])if(i[Bt].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const st=s[Bt]+=1;p.attrs["PATHWAY-ID"]=new Array(st+1).join(".");const Vt=this.createLevel(p);i[Bt]=Vt,r.push(Vt)}else i[Bt].addGroupId("audio",_.AUDIO),i[Bt].addGroupId("text",_.SUBTITLES);else{const st=this.createLevel(p);i[Bt]=st,s[Bt]=1,r.push(st)}}),this.filterAndSortMediaOptions(r,t,A,f,c)}createLevel(e){const t=new xr(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=or(r,[])}return t}isAudioSupported(e){return dr(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return dr(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){let s=[],A=[],f=e;if((n||r)&&i&&(f=f.filter(({videoCodec:H,videoRange:ue,width:Ie,height:xe})=>(!!H||!!(Ie&&xe))&&si(ue))),f.length===0){Promise.resolve().then(()=>{if(this.hls){let H="no level with compatible codecs found in manifest",ue=H;t.levels.length&&(ue=`one or more CODECS in variant not supported: ${gr(t.levels.map(xe=>xe.attrs.CODECS).filter((xe,Ye,lt)=>lt.indexOf(xe)===Ye))}`,this.warn(ue),H+=` (${ue})`);const Ie=new Error(H);this.hls.trigger(y.ERROR,{type:be.MEDIA_ERROR,details:ee.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:Ie,reason:ue})}});return}t.audioTracks&&(s=t.audioTracks.filter(H=>!H.audioCodec||this.isAudioSupported(H.audioCodec)),qn(s)),t.subtitles&&(A=t.subtitles,qn(A));const c=f.slice(0);f.sort((H,ue)=>{if(H.attrs["HDCP-LEVEL"]!==ue.attrs["HDCP-LEVEL"])return(H.attrs["HDCP-LEVEL"]||"")>(ue.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&H.height!==ue.height)return H.height-ue.height;if(H.frameRate!==ue.frameRate)return H.frameRate-ue.frameRate;if(H.videoRange!==ue.videoRange)return bi.indexOf(H.videoRange)-bi.indexOf(ue.videoRange);if(H.videoCodec!==ue.videoCodec){const Ie=$e(H.videoCodec),xe=$e(ue.videoCodec);if(Ie!==xe)return xe-Ie}if(H.uri===ue.uri&&H.codecSet!==ue.codecSet){const Ie=Pe(H.codecSet),xe=Pe(ue.codecSet);if(Ie!==xe)return xe-Ie}return H.averageBitrate!==ue.averageBitrate?H.averageBitrate-ue.averageBitrate:0});let p=c[0];if(this.steering&&(f=this.steering.filterParsedLevels(f),f.length!==c.length)){for(let H=0;H<c.length;H++)if(c[H].pathwayId===f[0].pathwayId){p=c[H];break}}this._levels=f;for(let H=0;H<f.length;H++)if(f[H]===p){var _;this._firstLevel=H;const ue=p.bitrate,Ie=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${f.length} level(s) found, first bitrate: ${ue}`),((_=this.hls.userConfig)==null?void 0:_.abrEwmaDefaultEstimate)===void 0){const xe=Math.min(ue,this.hls.config.abrEwmaDefaultEstimateMax);xe>Ie&&Ie===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=xe)}break}const w=i&&!r,I=this.hls.config,D=!!(I.audioStreamController&&I.audioTrackController),G={levels:f,audioTracks:s,subtitleTracks:A,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:D&&!w&&s.some(H=>!!H.url)};this.hls.trigger(y.MANIFEST_PARSED,G)}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 p=new Error("invalid level idx"),_=e<0;if(this.hls.trigger(y.ERROR,{type:be.OTHER_ERROR,details:ee.LEVEL_SWITCH_ERROR,level:e,fatal:_,error:p,reason:p.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 c=s.details;if(!c||c.live){const p=this.switchParams(s.uri,r==null?void 0:r.details,c);this.loadPlaylist(p)}}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===Ce.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));Ka(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 qn(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function Wn(){return self.SourceBuffer||self.WebKitSourceBuffer}function Ai(){if(!Ue())return!1;const e=Wn();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Mr(){if(!Ai())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(En(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(En(e,"audio"))))}function Br(){var a;const e=Wn();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const Nn=100;class ri extends $s{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||!te(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(Nn),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=Pt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Pt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Pt.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=Pt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Pt.IDLE;break}break}case Pt.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===Pt.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=Pt.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 c=s.details;if(!c||this.state===Pt.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Pt.WAITING_LEVEL,this.startFragRequested=!1;return}const p=A.len,_=this.getMaxBufferLength(s.maxBitrate);if(p>=_)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,c);if(this.couldBacktrack&&!this.fragPrevious&&I&&Je(I)&&this.fragmentTracker.getState(I)!==An.OK){var D;const H=((D=this.backtrackFragment)!=null?D:I).sn-c.startSN,ue=c.fragments[H-1];ue&&I.cc===ue.cc&&(I=ue,this.fragmentTracker.removeFragment(ue))}else this.backtrackFragment&&A.len&&(this.backtrackFragment=null);if(I&&this.isLoopLoading(I,w)){if(!I.gap){const H=this.audioOnly&&!this.altAudio?W.AUDIO:W.VIDEO,ue=(H===W.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;ue&&this.afterBufferFlushed(ue,H,V.MAIN)}I=this.getNextFragmentLoopLoading(I,c,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===An.NOT_LOADED||r===An.PARTIAL?Je(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],c=this.fragLastKbps;c&&this.fragCurrent?n=this.fragCurrent.duration*f.maxBitrate/(1e3*c)+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,c=A.duration,p=Math.max(s.end,f+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(p,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 Pt.KEY_LOADING:case Pt.FRAG_LOADING:case Pt.FRAG_LOADING_WAITING_RETRY:case Pt.PARSING:case Pt.PARSED:this.state=Pt.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;Mi(n,"playing",this.onMediaPlaying),Mi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(Wi(n,"playing",this.onMediaPlaying),Wi(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&&!Br(),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!==Pt.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=Pt.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 c=t.levelInfo,p=this.fragCurrent;p&&(this.state===Pt.FRAG_LOADING||this.state===Pt.FRAG_LOADING_WAITING_RETRY)&&p.level!==t.level&&p.loader&&this.abortCurrentFrag();let _=0;if(A.live||(n=c.details)!=null&&n.live){var w;if(this.checkLiveUpdate(A),A.deltaUpdateFailed)return;_=this.alignPlaylists(A,c.details,(w=this.levelLastLoaded)==null?void 0:w.details)}if(c.details=A,this.levelLastLoaded=c,i||this.setStartPosition(A,_),this.hls.trigger(y.LEVEL_UPDATED,{details:A,level:s}),this.state===Pt.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=Pt.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 p=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!f&&n.readyState<4||i<A-p)&&(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 c;const _=Tn.bufferInfo(n,r,0);if(!((c=_.buffered)!=null&&c.length)){n.currentTime=r;return}if(_.start<=i){n.currentTime=r;return}const{nextStart:I}=Tn.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 c=A.videoCodec,p=f.PTSKnown||!f.live,_=(t=n.initSegment)==null?void 0:t.data,w=this._getAudioCodec(A),I=this.transmuxer=this.transmuxer||new eo(this.hls,V.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),D=r?r.index:-1,G=D!==-1,H=new Hr(n.level,n.sn,n.stats.chunkCount,i.byteLength,D,G),ue=this.initPTS[n.cc];I.push(i,_,w,c,n,r,f.totalduration,p,H,ue)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio===2;if(sr(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=sr(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 c=n[A];c&&(this.videoBuffer=c.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===Pt.PARSED&&(this.state=Pt.IDLE);return}const A=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*A.total/(A.buffering.end-A.loading.first)),Je(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&Tn.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=Pt.ERROR;return}switch(t.details){case ee.FRAG_GAP:case ee.FRAG_PARSING_ERROR:case ee.FRAG_DECRYPT_ERROR:case ee.FRAG_LOAD_ERROR:case ee.FRAG_LOAD_TIMEOUT:case ee.KEY_LOAD_ERROR:case ee.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(V.MAIN,t);break;case ee.LEVEL_LOAD_ERROR:case ee.LEVEL_LOAD_TIMEOUT:case ee.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Pt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===Ce.LEVEL&&(this.state=Pt.IDLE);break;case ee.BUFFER_ADD_CODEC_ERROR:case ee.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case ee.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 ee.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Pt.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=Tn.getBuffered(e),A=s.length?s.start(0):0,f=A-n,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||f>0&&(f<c||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=Pt.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===Pt.STOPPED||this.state===Pt.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:c}=s,{video:p,text:_,id3:w,initSegment:I}=r,{details:D}=c,G=this.altAudio?void 0:r.audio;if(this.fragContextChanged(A)){this.fragmentTracker.removeFragment(A);return}if(this.state=Pt.PARSING,I){const H=I.tracks;if(H){const Ye=A.initSegment||A;if(this.unhandledEncryptionError(I,A))return;this._bufferInitSegment(c,H,Ye,i),n.trigger(y.FRAG_PARSING_INIT_SEGMENT,{frag:Ye,id:t,tracks:H})}const ue=I.initPTS,Ie=I.timescale,xe=this.initPTS[A.cc];if(te(ue)&&(!xe||xe.baseTime!==ue||xe.timescale!==Ie)){const Ye=I.trackId;this.initPTS[A.cc]={baseTime:ue,timescale:Ie,trackId:Ye},n.trigger(y.INIT_PTS_FOUND,{frag:A,id:t,initPTS:ue,timescale:Ie,trackId:Ye})}}if(p&&D){G&&p.type==="audiovideo"&&this.logMuxedErr(A);const H=D.fragments[A.sn-1-D.startSN],ue=A.sn===D.startSN,Ie=!H||A.cc>H.cc;if(r.independent!==!1){const{startPTS:xe,endPTS:Ye,startDTS:lt,endDTS:kt}=p;if(f)f.elementaryStreams[p.type]={startPTS:xe,endPTS:Ye,startDTS:lt,endDTS:kt};else if(p.firstKeyFrame&&p.independent&&i.id===1&&!Ie&&(this.couldBacktrack=!0),p.dropped&&p.independent){const it=this.getMainFwdBufferInfo(),wt=(it?it.end:this.getLoadPosition())+this.config.maxBufferHole,Bt=p.firstKeyFramePTS?p.firstKeyFramePTS:xe;if(!ue&&wt<Bt-this.config.maxBufferHole&&!Ie){this.backtrack(A);return}else Ie&&(A.gap=!0);A.setElementaryStreamInfo(p.type,A.start,Ye,A.start,kt,!0)}else ue&&xe-(D.appliedTimelineOffset||0)>g&&(A.gap=!0);A.setElementaryStreamInfo(p.type,xe,Ye,lt,kt),this.backtrackFragment&&(this.backtrackFragment=A),this.bufferFragmentData(p,A,f,i,ue||Ie)}else if(ue||Ie)A.gap=!0;else{this.backtrack(A);return}}if(G){const{startPTS:H,endPTS:ue,startDTS:Ie,endDTS:xe}=G;f&&(f.elementaryStreams[W.AUDIO]={startPTS:H,endPTS:ue,startDTS:Ie,endDTS:xe}),A.setElementaryStreamInfo(W.AUDIO,H,ue,Ie,xe),this.bufferFragmentData(G,A,f,i)}if(D&&w!=null&&w.samples.length){const H={id:t,frag:A,details:D,samples:w.samples};n.trigger(y.FRAG_PARSING_METADATA,H)}if(D&&_){const H={id:t,frag:A,details:D,samples:_.samples};n.trigger(y.FRAG_PARSING_USERDATA,H)}}logMuxedErr(e){this.warn(`${Je(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==Pt.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 c=e.audioCodec;let p=Qe(i.codec,c);p==="mp4a"&&(p="mp4a.40.5");const _=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){p&&(p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5");const w=i.metadata;w&&"channelCount"in w&&(w.channelCount||1)!==1&&_.indexOf("firefox")===-1&&(p="mp4a.40.5")}p&&p.indexOf("mp4a.40.5")!==-1&&_.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(p="mp4a.40.2",this.log(`Android: force audio codec to ${p}`)),c&&c!==p&&this.log(`Swapping manifest audio codec "${c}" for "${p}"`),i.levelCodec=p,i.id=V.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${p||""}/${c||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=V.MAIN;const c=s.codec;if((c==null?void 0:c.length)===4)switch(c){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||""}/${c}]${s.codec!==c?" 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(c=>{const _=t[c].initSegment;_!=null&&_.byteLength&&this.hls.trigger(y.BUFFER_APPENDING,{type:c,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=Pt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(Tn.isBuffered(e,n)?t=this.getAppendedFrag(n):Tn.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 te(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(te(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?N(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 ii 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=ee.KEY_LOAD_ERROR,n,r,i){return new pr({type:be.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&&(!Je(e)||!Je(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=Ir(A);if(f)return this.emeController.getKeySystemAccess([f])})}if(this.config.requireKeySystemAccessOnStart){const r=Jn(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 p=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,ee.KEY_LOAD_ERROR,p))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,ee.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const A=vr(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((r=f)!=null&&r.keyLoadPromise){var c;switch((c=f.mediaKeySessionContext)==null?void 0:c.keyStatus){case"usable":case"usable-in-future":return f.keyLoadPromise.then(_=>{const{keyInfo:w}=_;return i.key=w.decryptdata.key,{frag:e,keyInfo:w}})}}switch(this.log(`Loading key ${ne(i.keyId||[])} 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,ee.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const r=this.emeController.loadKey(n);return(e.keyLoadPromise=r.then(i=>(e.mediaKeySessionContext=i,n))).catch(i=>{throw e.keyLoadPromise=null,i.data&&(i.data.frag=t),i})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,i=new r(n);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,A)=>{const f={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=n.keyLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(w,I,D,G)=>{const{frag:H,keyInfo:ue,url:Ie}=D,xe=vr(ue.decryptdata)||Ie;if(!H.decryptdata||ue!==this.keyIdToKeyInfo[xe])return A(this.createKeyLoadError(H,ee.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),G));ue.decryptdata.key=H.decryptdata.key=new Uint8Array(w.data),H.keyLoader=null,ue.loader=null,s({frag:H,keyInfo:ue})},onError:(w,I,D,G)=>{this.resetLoader(I),A(this.createKeyLoadError(t,ee.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,ee.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),D))},onAbort:(w,I,D)=>{this.resetLoader(I),A(this.createKeyLoadError(t,ee.INTERNAL_ABORTED,new Error("key loading aborted"),D))}};i.load(f,p,_)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null);const s=vr(n.decryptdata)||r;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function vr(a){const e=a.keyId;return e?ne(e):a.uri}function Zi(a){const{type:e}=a;switch(e){case Ce.AUDIO_TRACK:return V.AUDIO;case Ce.SUBTITLE_TRACK:return V.SUBTITLE;default:return V.MAIN}}function ds(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Ks{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:Ce.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:Ce.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:Ce.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:Ce.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:A})}onLevelsUpdated(e,t){const n=this.loaders[Ce.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[Ce.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const c=this.hls.logger,p=r.context;if(p&&p.levelOrTrack===e.levelOrTrack&&(p.url===e.url||p.deliveryDirectives&&!e.deliveryDirectives)){p.url===e.url?c.log(`[playlist-loader]: ignore ${e.url} ongoing request`):c.log(`[playlist-loader]: ignore ${e.url} in favor of ${p.url}`);return}c.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===Ce.MANIFEST?i=n.manifestLoadPolicy.default:i=B({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),te((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===Ce.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===Ce.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===Ce.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,_=c.targetduration;if(p&&_){const w=Math.max(p*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:(c,p,_,w)=>{const I=this.getInternalLoader(_);this.resetInternalLoader(_.type);const D=c.data;if(D.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,_,new Error("no EXTM3U delimiter"),w||null,p);return}p.parsing.start=performance.now(),cs.isMediaPlaylist(D)||_.type!==Ce.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,_,w||null,I):this.handleMasterPlaylist(c,p,_,w)},onError:(c,p,_,w)=>{this.handleNetworkError(p,_,!1,c,w)},onTimeout:(c,p,_)=>{this.handleNetworkError(p,_,!0,void 0,c)}};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=ds(e,n),f=cs.parseMasterPlaylist(s,A);if(f.playlistParsingError){this.handleManifestParsingError(e,n,f.playlistParsingError,r,t);return}const{contentSteering:c,levels:p,sessionData:_,sessionKeys:w,startTimeOffset:I,variableList:D}=f;this.variableList=D;const{AUDIO:G=[],SUBTITLES:H,"CLOSED-CAPTIONS":ue}=cs.parseMasterPlaylistMedia(s,A,f);G.length&&!G.some(xe=>!xe.url)&&p[0].audioCodec&&!p[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 Er({}),bitrate:0,url:""})),i.trigger(y.MANIFEST_LOADED,{levels:p,audioTracks:G,subtitles:H,captions:ue,contentSteering:c,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:c}=n,p=ds(e,n),_=te(f)?f:te(A)?A:0,w=Zi(n),I=cs.parseLevelPlaylist(e.data,p,_,w,0,this.variableList);if(c===Ce.MANIFEST){const D={attrs:new Er({}),bitrate:0,details:I,name:"",url:p};I.requestScheduled=t.loading.start+Ha(I,0),s.trigger(y.MANIFEST_LOADED,{levels:[D],audioTracks:[],url:p,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:be.NETWORK_ERROR,details:ee.MANIFEST_PARSING_ERROR,fatal:t.type===Ce.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===Ce.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===Ce.AUDIO_TRACK||e.type===Ce.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const A=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let f=ee.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case Ce.MANIFEST:f=n?ee.MANIFEST_LOAD_TIMEOUT:ee.MANIFEST_LOAD_ERROR,c=!0;break;case Ce.LEVEL:f=n?ee.LEVEL_LOAD_TIMEOUT:ee.LEVEL_LOAD_ERROR,c=!1;break;case Ce.AUDIO_TRACK:f=n?ee.AUDIO_TRACK_LOAD_TIMEOUT:ee.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case Ce.SUBTITLE_TRACK:f=n?ee.SUBTITLE_TRACK_LOAD_TIMEOUT:ee.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const _={type:be.NETWORK_ERROR,details:f,fatal:c,url:e.url,loader:p,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:c,id:p,groupId:_,deliveryDirectives:w}=r,I=ds(t,r),D=Zi(r),G=typeof r.level=="number"&&D===V.MAIN?c:void 0;if(!e.fragments.length){const ue=e.playlistParsingError=new Error("No Segments found in Playlist");A.trigger(y.ERROR,{type:be.NETWORK_ERROR,details:ee.LEVEL_EMPTY_ERROR,fatal:!1,url:I,error:ue,reason:ue.message,response:t,context:r,level:G,parent:D,networkDetails:i,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const H=e.playlistParsingError;if(H){if(this.hls.logger.warn(`${H} ${e.url}`),!A.config.ignorePlaylistParsingErrors){A.trigger(y.ERROR,{type:be.NETWORK_ERROR,details:ee.LEVEL_PARSING_ERROR,fatal:!1,url:I,error:H,reason:H.message,response:t,context:r,level:G,parent:D,networkDetails:i,stats:n});return}e.playlistParsingError=null}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),f){case Ce.MANIFEST:case Ce.LEVEL:A.trigger(y.LEVEL_LOADED,{details:e,levelInfo:r.levelOrTrack||A.levels[0],level:G||0,id:p||0,stats:n,networkDetails:i,deliveryDirectives:w,withoutMultiVariant:f===Ce.MANIFEST});break;case Ce.AUDIO_TRACK:A.trigger(y.AUDIO_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:p||0,groupId:_||"",stats:n,networkDetails:i,deliveryDirectives:w});break;case Ce.SUBTITLE_TRACK:A.trigger(y.SUBTITLE_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:p||0,groupId:_||"",stats:n,networkDetails:i,deliveryDirectives:w});break}}}class Xr{static get version(){return ya}static isMSESupported(){return Ai()}static isSupported(){return Mr()}static getMediaSource(){return Ue()}static get Events(){return y}static get MetadataSchema(){return hs}static get ErrorTypes(){return be}static get ErrorDetails(){return ee}static get DefaultConfig(){return Xr.defaultConfig?Xr.defaultConfig:Ec}static set DefaultConfig(e){Xr.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 hA,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=bc(Xr.DefaultConfig,e,t);this.userConfig=e,n.progressive&&u(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:A,fpsController:f}=n,c=new A(this),p=this.abrController=new r(this),_=new Kn(this),w=n.interstitialsController,I=w?this.interstitialsController=new w(this,Xr):null,D=this.bufferController=new i(this,_),G=this.capLevelController=new s(this),H=new f(this),ue=new Ks(this),Ie=n.contentSteeringController,xe=Ie?new Ie(this):null,Ye=this.levelController=new kr(this,xe),lt=new pn(this),kt=new ii(this.config,this.logger),it=this.streamController=new ri(this,_,kt),wt=this.gapController=new se(this,_);G.setStreamController(it),H.setStreamController(it);const Bt=[ue,Ye,it];I&&Bt.splice(1,0,I),xe&&Bt.splice(1,0,xe),this.networkControllers=Bt;const st=[p,D,wt,G,H,lt,_];this.audioTrackController=this.createController(n.audioTrackController,Bt);const Vt=n.audioStreamController;Vt&&Bt.push(this.audioStreamController=new Vt(this,_,kt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,Bt);const Cn=n.subtitleStreamController;Cn&&Bt.push(this.subtititleStreamController=new Cn(this,_,kt)),this.createController(n.timelineController,st),kt.emeController=this.emeController=this.createController(n.emeController,st),this.cmcdController=this.createController(n.cmcdController,st),this.latencyController=this.createController(Dn,st),this.coreComponents=st,Bt.push(c);const Zn=c.onErrorOut;typeof Zn=="function"&&this.on(y.ERROR,Zn,c),this.on(y.MANIFEST_LOADED,ue.onManifestLoaded,ue)}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:be.OTHER_ERROR,details:ee.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:be.OTHER_ERROR,details:ee.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=Pa()),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){Gr(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=ze(t);return Ge(e,n,navigator.mediaCapabilities)}}Xr.defaultConfig=void 0}}]);
|
|
}()); |