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

162 lines
1.2 MiB

!(function(){var nc=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[2303],{95869:function(gr,mt,K){"use strict";K.d(mt,{Z:function(){return O}});var V=K(71409),me=K(59301),Fe={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"},he=Fe,W=K(7657),m=function(J,D){return me.createElement(W.Z,(0,V.Z)({},J,{ref:D,icon:he}))},ge=me.forwardRef(m),O=ge},65352:function(gr,mt,K){"use strict";K.d(mt,{Z:function(){return Lt}});var V=K(89490),me=K(11036),Fe=K(39224),he=K(43403),W=K(92310),m=K.n(W),ge=K(29301),O=K(76846),u=K(96452),J=K(6089),D=K(80402),B=K(34280),_=K(49658),w=K(59301),x=K(71409),Y=K(77900),M=K(8654);function H(Be){var L=Be.prefixCls,g=Be.align,C=Be.arrow,N=Be.arrowPos,T=C||{},k=T.className,ee=T.content,be=N.x,Ue=be===void 0?0:be,Ye=N.y,We=Ye===void 0?0:Ye,St=w.useRef();if(!g||!g.points)return null;var Xe={position:"absolute"};if(g.autoArrow!==!1){var ut=g.points[0],At=g.points[1],it=ut[0],Ne=ut[1],Ze=At[0],lt=At[1];it===Ze||!["t","b"].includes(it)?Xe.top=We:it==="t"?Xe.top=0:Xe.bottom=0,Ne===lt||!["l","r"].includes(Ne)?Xe.left=Ue:Ne==="l"?Xe.left=0:Xe.right=0}return w.createElement("div",{ref:St,className:m()("".concat(L,"-arrow"),k),style:Xe},ee)}function Q(Be){var L=Be.prefixCls,g=Be.open,C=Be.zIndex,N=Be.mask,T=Be.motion;return N?w.createElement(Y.default,(0,x.Z)({},T,{motionAppear:!0,visible:g,removeOnLeave:!0}),function(k){var ee=k.className;return w.createElement("div",{style:{zIndex:C},className:m()("".concat(L,"-mask"),ee)})}):null}var P=w.memo(function(Be){var L=Be.children;return L},function(Be,L){return L.cache}),X=P,ce=w.forwardRef(function(Be,L){var g=Be.popup,C=Be.className,N=Be.prefixCls,T=Be.style,k=Be.target,ee=Be.onVisibleChanged,be=Be.open,Ue=Be.keepDom,Ye=Be.fresh,We=Be.onClick,St=Be.mask,Xe=Be.arrow,ut=Be.arrowPos,At=Be.align,it=Be.motion,Ne=Be.maskMotion,Ze=Be.forceRender,lt=Be.getPopupContainer,vt=Be.autoDestroy,Ot=Be.portal,Ct=Be.zIndex,Wt=Be.onMouseEnter,Nt=Be.onMouseLeave,Xt=Be.onPointerEnter,fr=Be.onPointerDownCapture,Rr=Be.ready,It=Be.offsetX,jt=Be.offsetY,Re=Be.offsetR,Ce=Be.offsetB,Ee=Be.onAlign,j=Be.onPrepare,ie=Be.stretch,ae=Be.targetWidth,de=Be.targetHeight,Se=typeof g=="function"?g():g,xt=be||Ue,gt=(lt==null?void 0:lt.length)>0,qe=w.useState(!lt||!gt),Ht=(0,me.Z)(qe,2),Cr=Ht[0],Nr=Ht[1];if((0,B.Z)(function(){!Cr&&gt&&k&&Nr(!0)},[Cr,gt,k]),!Cr)return null;var Gt="auto",Kt={left:"-1000vw",top:"-1000vh",right:Gt,bottom:Gt};if(Rr||!be){var Sr,$r=At.points,De=At.dynamicInset||((Sr=At._experimental)===null||Sr===void 0?void 0:Sr.dynamicInset),Ir=De&&$r[0][1]==="r",Er=De&&$r[0][0]==="b";Ir?(Kt.right=Re,Kt.left=Gt):(Kt.left=It,Kt.right=Gt),Er?(Kt.bottom=Ce,Kt.top=Gt):(Kt.top=jt,Kt.bottom=Gt)}var Br={};return ie&&(ie.includes("height")&&de?Br.height=de:ie.includes("minHeight")&&de&&(Br.minHeight=de),ie.includes("width")&&ae?Br.width=ae:ie.includes("minWidth")&&ae&&(Br.minWidth=ae)),be||(Br.pointerEvents="none"),w.createElement(Ot,{open:Ze||xt,getContainer:lt&&function(){return lt(k)},autoDestroy:vt},w.createElement(Q,{prefixCls:N,open:be,zIndex:Ct,mask:St,motion:Ne}),w.createElement(ge.Z,{onResize:Ee,disabled:!be},function(vn){return w.createElement(Y.default,(0,x.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Ze,leavedClassName:"".concat(N,"-hidden")},it,{onAppearPrepare:j,onEnterPrepare:j,visible:be,onVisibleChanged:function(Jr){var An;it==null||(An=it.onVisibleChanged)===null||An===void 0||An.call(it,Jr),ee(Jr)}}),function(Or,Jr){var An=Or.className,Cn=Or.style,an=m()(N,An,C);return w.createElement("div",{ref:(0,M.sQ)(vn,L,Jr),className:an,style:(0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)({"--arrow-x":"".concat(ut.x||0,"px"),"--arrow-y":"".concat(ut.y||0,"px")},Kt),Br),Cn),{},{boxSizing:"border-box",zIndex:Ct},T),onMouseEnter:Wt,onMouseLeave:Nt,onPointerEnter:Xt,onClick:We,onPointerDownCapture:fr},Xe&&w.createElement(H,{prefixCls:N,arrow:Xe,arrowPos:ut,align:At}),w.createElement(X,{cache:!be&&!Ye},Se))})}))}),_e=ce,we=w.forwardRef(function(Be,L){var g=Be.children,C=Be.getTriggerDOMNode,N=(0,M.Yr)(g),T=w.useCallback(function(ee){(0,M.mH)(L,C?C(ee):ee)},[C]),k=(0,M.x1)(T,(0,M.C4)(g));return N?w.cloneElement(g,{ref:k}):g}),ne=we,ve=w.createContext(null),Oe=ve;function le(Be){return Be?Array.isArray(Be)?Be:[Be]:[]}function Me(Be,L,g,C){return w.useMemo(function(){var N=le(g!=null?g:L),T=le(C!=null?C:L),k=new Set(N),ee=new Set(T);return Be&&(k.has("hover")&&(k.delete("hover"),k.add("click")),ee.has("hover")&&(ee.delete("hover"),ee.add("click"))),[k,ee]},[Be,L,g,C])}var Z=K(29194);function I(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],g=arguments.length>2?arguments[2]:void 0;return g?Be[0]===L[0]:Be[0]===L[0]&&Be[1]===L[1]}function G(Be,L,g,C){for(var N=g.points,T=Object.keys(Be),k=0;k<T.length;k+=1){var ee,be=T[k];if(I((ee=Be[be])===null||ee===void 0?void 0:ee.points,N,C))return"".concat(L,"-placement-").concat(be)}return""}function z(Be,L,g,C){return L||(g?{motionName:"".concat(Be,"-").concat(g)}:C?{motionName:C}:null)}function se(Be){return Be.ownerDocument.defaultView}function re(Be){for(var L=[],g=Be==null?void 0:Be.parentElement,C=["hidden","scroll","clip","auto"];g;){var N=se(g).getComputedStyle(g),T=N.overflowX,k=N.overflowY,ee=N.overflow;[T,k,ee].some(function(be){return C.includes(be)})&&L.push(g),g=g.parentElement}return L}function E(Be){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Be)?L:Be}function y(Be){return E(parseFloat(Be),0)}function $(Be,L){var g=(0,V.Z)({},Be);return(L||[]).forEach(function(C){if(!(C instanceof HTMLBodyElement||C instanceof HTMLHtmlElement)){var N=se(C).getComputedStyle(C),T=N.overflow,k=N.overflowClipMargin,ee=N.borderTopWidth,be=N.borderBottomWidth,Ue=N.borderLeftWidth,Ye=N.borderRightWidth,We=C.getBoundingClientRect(),St=C.offsetHeight,Xe=C.clientHeight,ut=C.offsetWidth,At=C.clientWidth,it=y(ee),Ne=y(be),Ze=y(Ue),lt=y(Ye),vt=E(Math.round(We.width/ut*1e3)/1e3),Ot=E(Math.round(We.height/St*1e3)/1e3),Ct=(ut-At-Ze-lt)*vt,Wt=(St-Xe-it-Ne)*Ot,Nt=it*Ot,Xt=Ne*Ot,fr=Ze*vt,Rr=lt*vt,It=0,jt=0;if(T==="clip"){var Re=y(k);It=Re*vt,jt=Re*Ot}var Ce=We.x+fr-It,Ee=We.y+Nt-jt,j=Ce+We.width+2*It-fr-Rr-Ct,ie=Ee+We.height+2*jt-Nt-Xt-Wt;g.left=Math.max(g.left,Ce),g.top=Math.max(g.top,Ee),g.right=Math.min(g.right,j),g.bottom=Math.min(g.bottom,ie)}}),g}function Ae(Be){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,g="".concat(L),C=g.match(/^(.*)\%$/);return C?Be*(parseFloat(C[1])/100):parseFloat(g)}function Ge(Be,L){var g=L||[],C=(0,me.Z)(g,2),N=C[0],T=C[1];return[Ae(Be.width,N),Ae(Be.height,T)]}function Je(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Be[0],Be[1]]}function yt(Be,L){var g=L[0],C=L[1],N,T;return g==="t"?T=Be.y:g==="b"?T=Be.y+Be.height:T=Be.y+Be.height/2,C==="l"?N=Be.x:C==="r"?N=Be.x+Be.width:N=Be.x+Be.width/2,{x:N,y:T}}function dt(Be,L){var g={t:"b",b:"t",l:"r",r:"l"};return Be.map(function(C,N){return N===L?g[C]||"c":C}).join("")}function Rt(Be,L,g,C,N,T,k){var ee=w.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:N[C]||{}}),be=(0,me.Z)(ee,2),Ue=be[0],Ye=be[1],We=w.useRef(0),St=w.useMemo(function(){return L?re(L):[]},[L]),Xe=w.useRef({}),ut=function(){Xe.current={}};Be||ut();var At=(0,J.Z)(function(){if(L&&g&&Be){let Pn=function(Bn,yn){var kr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qn,Fn=qe.x+Bn,ci=qe.y+yn,vi=Fn+Ir,ai=ci+De,Yn=Math.max(Fn,kr.left),Qt=Math.max(ci,kr.top),xr=Math.min(vi,kr.right),sn=Math.min(ai,kr.bottom);return Math.max(0,(xr-Yn)*(sn-Qt))},Ai=function(){Mt=qe.y+ue,Yt=Mt+De,sr=qe.x+q,ir=sr+Ir};var Ze,lt,vt,Ot,Ct=L,Wt=Ct.ownerDocument,Nt=se(Ct),Xt=Nt.getComputedStyle(Ct),fr=Xt.width,Rr=Xt.height,It=Xt.position,jt=Ct.style.left,Re=Ct.style.top,Ce=Ct.style.right,Ee=Ct.style.bottom,j=Ct.style.overflow,ie=(0,V.Z)((0,V.Z)({},N[C]),T),ae=Wt.createElement("div");(Ze=Ct.parentElement)===null||Ze===void 0||Ze.appendChild(ae),ae.style.left="".concat(Ct.offsetLeft,"px"),ae.style.top="".concat(Ct.offsetTop,"px"),ae.style.position=It,ae.style.height="".concat(Ct.offsetHeight,"px"),ae.style.width="".concat(Ct.offsetWidth,"px"),Ct.style.left="0",Ct.style.top="0",Ct.style.right="auto",Ct.style.bottom="auto",Ct.style.overflow="hidden";var de;if(Array.isArray(g))de={x:g[0],y:g[1],width:0,height:0};else{var Se,xt,gt=g.getBoundingClientRect();gt.x=(Se=gt.x)!==null&&Se!==void 0?Se:gt.left,gt.y=(xt=gt.y)!==null&&xt!==void 0?xt:gt.top,de={x:gt.x,y:gt.y,width:gt.width,height:gt.height}}var qe=Ct.getBoundingClientRect();qe.x=(lt=qe.x)!==null&&lt!==void 0?lt:qe.left,qe.y=(vt=qe.y)!==null&&vt!==void 0?vt:qe.top;var Ht=Wt.documentElement,Cr=Ht.clientWidth,Nr=Ht.clientHeight,Gt=Ht.scrollWidth,Kt=Ht.scrollHeight,Sr=Ht.scrollTop,$r=Ht.scrollLeft,De=qe.height,Ir=qe.width,Er=de.height,Br=de.width,vn={left:0,top:0,right:Cr,bottom:Nr},Or={left:-$r,top:-Sr,right:Gt-$r,bottom:Kt-Sr},Jr=ie.htmlRegion,An="visible",Cn="visibleFirst";Jr!=="scroll"&&Jr!==Cn&&(Jr=An);var an=Jr===Cn,Rn=$(Or,St),Pr=$(vn,St),Qn=Jr===An?Pr:Rn,Mr=an?Pr:Qn;Ct.style.left="auto",Ct.style.top="auto",Ct.style.right="0",Ct.style.bottom="0";var en=Ct.getBoundingClientRect();Ct.style.left=jt,Ct.style.top=Re,Ct.style.right=Ce,Ct.style.bottom=Ee,Ct.style.overflow=j,(Ot=Ct.parentElement)===null||Ot===void 0||Ot.removeChild(ae);var Dn=E(Math.round(Ir/parseFloat(fr)*1e3)/1e3),br=E(Math.round(De/parseFloat(Rr)*1e3)/1e3);if(Dn===0||br===0||(0,O.Sh)(g)&&!(0,Z.Z)(g))return;var jn=ie.offset,on=ie.targetOffset,lr=Ge(qe,jn),_r=(0,me.Z)(lr,2),ke=_r[0],ze=_r[1],_t=Ge(de,on),at=(0,me.Z)(_t,2),Tt=at[0],tt=at[1];de.x-=Tt,de.y-=tt;var ot=ie.points||[],Ut=(0,me.Z)(ot,2),Zt=Ut[0],Ar=Ut[1],yr=Je(Ar),hr=Je(Zt),Tr=yt(de,yr),U=yt(qe,hr),R=(0,V.Z)({},ie),q=Tr.x-U.x+ke,ue=Tr.y-U.y+ze,Qe=Pn(q,ue),He=Pn(q,ue,Pr),rt=yt(de,["t","l"]),et=yt(qe,["t","l"]),Ft=yt(de,["b","r"]),pt=yt(qe,["b","r"]),ye=ie.overflow||{},je=ye.adjustX,ct=ye.adjustY,zt=ye.shiftX,Vt=ye.shiftY,Et=function(yn){return typeof yn=="boolean"?yn:yn>=0},Mt,Yt,sr,ir;Ai();var $t=Et(ct),mr=hr[0]===yr[0];if($t&&hr[0]==="t"&&(Yt>Mr.bottom||Xe.current.bt)){var ur=ue;mr?ur-=De-Er:ur=rt.y-pt.y-ze;var Dr=Pn(q,ur),pr=Pn(q,ur,Pr);Dr>Qe||Dr===Qe&&(!an||pr>=He)?(Xe.current.bt=!0,ue=ur,ze=-ze,R.points=[dt(hr,0),dt(yr,0)]):Xe.current.bt=!1}if($t&&hr[0]==="b"&&(Mt<Mr.top||Xe.current.tb)){var tr=ue;mr?tr+=De-Er:tr=Ft.y-et.y-ze;var Hr=Pn(q,tr),vr=Pn(q,tr,Pr);Hr>Qe||Hr===Qe&&(!an||vr>=He)?(Xe.current.tb=!0,ue=tr,ze=-ze,R.points=[dt(hr,0),dt(yr,0)]):Xe.current.tb=!1}var Lr=Et(je),zr=hr[1]===yr[1];if(Lr&&hr[1]==="l"&&(ir>Mr.right||Xe.current.rl)){var Gr=q;zr?Gr-=Ir-Br:Gr=rt.x-pt.x-ke;var jr=Pn(Gr,ue),Vr=Pn(Gr,ue,Pr);jr>Qe||jr===Qe&&(!an||Vr>=He)?(Xe.current.rl=!0,q=Gr,ke=-ke,R.points=[dt(hr,1),dt(yr,1)]):Xe.current.rl=!1}if(Lr&&hr[1]==="r"&&(sr<Mr.left||Xe.current.lr)){var dr=q;zr?dr+=Ir-Br:dr=Ft.x-et.x-ke;var Yr=Pn(dr,ue),Kr=Pn(dr,ue,Pr);Yr>Qe||Yr===Qe&&(!an||Kr>=He)?(Xe.current.lr=!0,q=dr,ke=-ke,R.points=[dt(hr,1),dt(yr,1)]):Xe.current.lr=!1}Ai();var gn=zt===!0?0:zt;typeof gn=="number"&&(sr<Pr.left&&(q-=sr-Pr.left-ke,de.x+Br<Pr.left+gn&&(q+=de.x-Pr.left+Br-gn)),ir>Pr.right&&(q-=ir-Pr.right-ke,de.x>Pr.right-gn&&(q+=de.x-Pr.right+gn)));var qr=Vt===!0?0:Vt;typeof qr=="number"&&(Mt<Pr.top&&(ue-=Mt-Pr.top-ze,de.y+Er<Pr.top+qr&&(ue+=de.y-Pr.top+Er-qr)),Yt>Pr.bottom&&(ue-=Yt-Pr.bottom-ze,de.y>Pr.bottom-qr&&(ue+=de.y-Pr.bottom+qr)));var qt=qe.x+q,hn=qt+Ir,ln=qe.y+ue,tn=ln+De,xn=de.x,$n=xn+Br,On=de.y,Xn=On+Er,Xr=Math.max(qt,xn),Gn=Math.min(hn,$n),Ln=(Xr+Gn)/2,Zn=Ln-qt,ri=Math.max(ln,On),_i=Math.min(tn,Xn),xi=(ri+_i)/2,Mn=xi-ln;k==null||k(L,R);var zn=en.right-qe.x-(q+qe.width),Un=en.bottom-qe.y-(ue+qe.height);Dn===1&&(q=Math.round(q),zn=Math.round(zn)),br===1&&(ue=Math.round(ue),Un=Math.round(Un));var Jn={ready:!0,offsetX:q/Dn,offsetY:ue/br,offsetR:zn/Dn,offsetB:Un/br,arrowX:Zn/Dn,arrowY:Mn/br,scaleX:Dn,scaleY:br,align:R};Ye(Jn)}}),it=function(){We.current+=1;var lt=We.current;Promise.resolve().then(function(){We.current===lt&&At()})},Ne=function(){Ye(function(lt){return(0,V.Z)((0,V.Z)({},lt),{},{ready:!1})})};return(0,B.Z)(Ne,[C]),(0,B.Z)(function(){Be||Ne()},[Be]),[Ue.ready,Ue.offsetX,Ue.offsetY,Ue.offsetR,Ue.offsetB,Ue.arrowX,Ue.arrowY,Ue.scaleX,Ue.scaleY,Ue.align,it]}var bt=K(62730);function ht(Be,L,g,C,N){(0,B.Z)(function(){if(Be&&L&&g){let We=function(){C(),N()};var T=L,k=g,ee=re(T),be=re(k),Ue=se(k),Ye=new Set([Ue].concat((0,bt.Z)(ee),(0,bt.Z)(be)));return Ye.forEach(function(St){St.addEventListener("scroll",We,{passive:!0})}),Ue.addEventListener("resize",We,{passive:!0}),C(),function(){Ye.forEach(function(St){St.removeEventListener("scroll",We),Ue.removeEventListener("resize",We)})}}},[Be,L,g])}var Le=K(48736);function nt(Be,L,g,C,N,T,k,ee){var be=w.useRef(Be);be.current=Be;var Ue=w.useRef(!1);w.useEffect(function(){if(L&&C&&(!N||T)){var We=function(){Ue.current=!1},St=function(vt){var Ot;be.current&&!k(((Ot=vt.composedPath)===null||Ot===void 0||(Ot=Ot.call(vt))===null||Ot===void 0?void 0:Ot[0])||vt.target)&&!Ue.current&&ee(!1)},Xe=se(C);Xe.addEventListener("pointerdown",We,!0),Xe.addEventListener("mousedown",St,!0),Xe.addEventListener("contextmenu",St,!0);var ut=(0,u.A)(g);if(ut&&(ut.addEventListener("mousedown",St,!0),ut.addEventListener("contextmenu",St,!0)),0)var At,it,Ne,Ze;return function(){Xe.removeEventListener("pointerdown",We,!0),Xe.removeEventListener("mousedown",St,!0),Xe.removeEventListener("contextmenu",St,!0),ut&&(ut.removeEventListener("mousedown",St,!0),ut.removeEventListener("contextmenu",St,!0))}}},[L,g,C,N,T]);function Ye(){Ue.current=!0}return Ye}var Ie=["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 wt(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:he.Z,L=w.forwardRef(function(g,C){var N=g.prefixCls,T=N===void 0?"rc-trigger-popup":N,k=g.children,ee=g.action,be=ee===void 0?"hover":ee,Ue=g.showAction,Ye=g.hideAction,We=g.popupVisible,St=g.defaultPopupVisible,Xe=g.onPopupVisibleChange,ut=g.afterPopupVisibleChange,At=g.mouseEnterDelay,it=g.mouseLeaveDelay,Ne=it===void 0?.1:it,Ze=g.focusDelay,lt=g.blurDelay,vt=g.mask,Ot=g.maskClosable,Ct=Ot===void 0?!0:Ot,Wt=g.getPopupContainer,Nt=g.forceRender,Xt=g.autoDestroy,fr=g.destroyPopupOnHide,Rr=g.popup,It=g.popupClassName,jt=g.popupStyle,Re=g.popupPlacement,Ce=g.builtinPlacements,Ee=Ce===void 0?{}:Ce,j=g.popupAlign,ie=g.zIndex,ae=g.stretch,de=g.getPopupClassNameFromAlign,Se=g.fresh,xt=g.alignPoint,gt=g.onPopupClick,qe=g.onPopupAlign,Ht=g.arrow,Cr=g.popupMotion,Nr=g.maskMotion,Gt=g.popupTransitionName,Kt=g.popupAnimation,Sr=g.maskTransitionName,$r=g.maskAnimation,De=g.className,Ir=g.getTriggerDOMNode,Er=(0,Fe.Z)(g,Ie),Br=Xt||fr||!1,vn=w.useState(!1),Or=(0,me.Z)(vn,2),Jr=Or[0],An=Or[1];(0,B.Z)(function(){An((0,_.Z)())},[]);var Cn=w.useRef({}),an=w.useContext(Oe),Rn=w.useMemo(function(){return{registerSubPopup:function(xr,sn){Cn.current[xr]=sn,an==null||an.registerSubPopup(xr,sn)}}},[an]),Pr=(0,D.Z)(),Qn=w.useState(null),Mr=(0,me.Z)(Qn,2),en=Mr[0],Dn=Mr[1],br=w.useRef(null),jn=(0,J.Z)(function(Qt){br.current=Qt,(0,O.Sh)(Qt)&&en!==Qt&&Dn(Qt),an==null||an.registerSubPopup(Pr,Qt)}),on=w.useState(null),lr=(0,me.Z)(on,2),_r=lr[0],ke=lr[1],ze=w.useRef(null),_t=(0,J.Z)(function(Qt){(0,O.Sh)(Qt)&&_r!==Qt&&(ke(Qt),ze.current=Qt)}),at=w.Children.only(k),Tt=(at==null?void 0:at.props)||{},tt={},ot=(0,J.Z)(function(Qt){var xr,sn,En=_r;return(En==null?void 0:En.contains(Qt))||((xr=(0,u.A)(En))===null||xr===void 0?void 0:xr.host)===Qt||Qt===En||(en==null?void 0:en.contains(Qt))||((sn=(0,u.A)(en))===null||sn===void 0?void 0:sn.host)===Qt||Qt===en||Object.values(Cn.current).some(function(un){return(un==null?void 0:un.contains(Qt))||Qt===un})}),Ut=z(T,Cr,Kt,Gt),Zt=z(T,Nr,$r,Sr),Ar=w.useState(St||!1),yr=(0,me.Z)(Ar,2),hr=yr[0],Tr=yr[1],U=We!=null?We:hr,R=(0,J.Z)(function(Qt){We===void 0&&Tr(Qt)});(0,B.Z)(function(){Tr(We||!1)},[We]);var q=w.useRef(U);q.current=U;var ue=w.useRef([]);ue.current=[];var Qe=(0,J.Z)(function(Qt){var xr;R(Qt),((xr=ue.current[ue.current.length-1])!==null&&xr!==void 0?xr:U)!==Qt&&(ue.current.push(Qt),Xe==null||Xe(Qt))}),He=w.useRef(),rt=function(){clearTimeout(He.current)},et=function(xr){var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;rt(),sn===0?Qe(xr):He.current=setTimeout(function(){Qe(xr)},sn*1e3)};w.useEffect(function(){return rt},[]);var Ft=w.useState(!1),pt=(0,me.Z)(Ft,2),ye=pt[0],je=pt[1];(0,B.Z)(function(Qt){(!Qt||U)&&je(!0)},[U]);var ct=w.useState(null),zt=(0,me.Z)(ct,2),Vt=zt[0],Et=zt[1],Mt=w.useState(null),Yt=(0,me.Z)(Mt,2),sr=Yt[0],ir=Yt[1],$t=function(xr){ir([xr.clientX,xr.clientY])},mr=Rt(U,en,xt&&sr!==null?sr:_r,Re,Ee,j,qe),ur=(0,me.Z)(mr,11),Dr=ur[0],pr=ur[1],tr=ur[2],Hr=ur[3],vr=ur[4],Lr=ur[5],zr=ur[6],Gr=ur[7],jr=ur[8],Vr=ur[9],dr=ur[10],Yr=Me(Jr,be,Ue,Ye),Kr=(0,me.Z)(Yr,2),gn=Kr[0],qr=Kr[1],qt=gn.has("click"),hn=qr.has("click")||qr.has("contextMenu"),ln=(0,J.Z)(function(){ye||dr()}),tn=function(){q.current&&xt&&hn&&et(!1)};ht(U,_r,en,ln,tn),(0,B.Z)(function(){ln()},[sr,Re]),(0,B.Z)(function(){U&&!(Ee!=null&&Ee[Re])&&ln()},[JSON.stringify(j)]);var xn=w.useMemo(function(){var Qt=G(Ee,T,Vr,xt);return m()(Qt,de==null?void 0:de(Vr))},[Vr,de,Ee,T,xt]);w.useImperativeHandle(C,function(){return{nativeElement:ze.current,popupElement:br.current,forceAlign:ln}});var $n=w.useState(0),On=(0,me.Z)($n,2),Xn=On[0],Xr=On[1],Gn=w.useState(0),Ln=(0,me.Z)(Gn,2),Zn=Ln[0],ri=Ln[1],_i=function(){if(ae&&_r){var xr=_r.getBoundingClientRect();Xr(xr.width),ri(xr.height)}},xi=function(){_i(),ln()},Mn=function(xr){je(!1),dr(),ut==null||ut(xr)},zn=function(){return new Promise(function(xr){_i(),Et(function(){return xr})})};(0,B.Z)(function(){Vt&&(dr(),Vt(),Et(null))},[Vt]);function Un(Qt,xr,sn,En){tt[Qt]=function(un){var Nn;En==null||En(un),et(xr,sn);for(var Bi=arguments.length,Sn=new Array(Bi>1?Bi-1:0),mn=1;mn<Bi;mn++)Sn[mn-1]=arguments[mn];(Nn=Tt[Qt])===null||Nn===void 0||Nn.call.apply(Nn,[Tt,un].concat(Sn))}}(qt||hn)&&(tt.onClick=function(Qt){var xr;q.current&&hn?et(!1):!q.current&&qt&&($t(Qt),et(!0));for(var sn=arguments.length,En=new Array(sn>1?sn-1:0),un=1;un<sn;un++)En[un-1]=arguments[un];(xr=Tt.onClick)===null||xr===void 0||xr.call.apply(xr,[Tt,Qt].concat(En))});var Jn=nt(U,hn,_r,en,vt,Ct,ot,et),Pn=gn.has("hover"),Ai=qr.has("hover"),Bn,yn;Pn&&(Un("onMouseEnter",!0,At,function(Qt){$t(Qt)}),Un("onPointerEnter",!0,At,function(Qt){$t(Qt)}),Bn=function(xr){(U||ye)&&en!==null&&en!==void 0&&en.contains(xr.target)&&et(!0,At)},xt&&(tt.onMouseMove=function(Qt){var xr;(xr=Tt.onMouseMove)===null||xr===void 0||xr.call(Tt,Qt)})),Ai&&(Un("onMouseLeave",!1,Ne),Un("onPointerLeave",!1,Ne),yn=function(){et(!1,Ne)}),gn.has("focus")&&Un("onFocus",!0,Ze),qr.has("focus")&&Un("onBlur",!1,lt),gn.has("contextMenu")&&(tt.onContextMenu=function(Qt){var xr;q.current&&qr.has("contextMenu")?et(!1):($t(Qt),et(!0)),Qt.preventDefault();for(var sn=arguments.length,En=new Array(sn>1?sn-1:0),un=1;un<sn;un++)En[un-1]=arguments[un];(xr=Tt.onContextMenu)===null||xr===void 0||xr.call.apply(xr,[Tt,Qt].concat(En))}),De&&(tt.className=m()(Tt.className,De));var kr=(0,V.Z)((0,V.Z)({},Tt),tt),Fn={},ci=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];ci.forEach(function(Qt){Er[Qt]&&(Fn[Qt]=function(){for(var xr,sn=arguments.length,En=new Array(sn),un=0;un<sn;un++)En[un]=arguments[un];(xr=kr[Qt])===null||xr===void 0||xr.call.apply(xr,[kr].concat(En)),Er[Qt].apply(Er,En)})});var vi=w.cloneElement(at,(0,V.Z)((0,V.Z)({},kr),Fn)),ai={x:Lr,y:zr},Yn=Ht?(0,V.Z)({},Ht!==!0?Ht:{}):null;return w.createElement(w.Fragment,null,w.createElement(ge.Z,{disabled:!U,ref:_t,onResize:xi},w.createElement(ne,{getTriggerDOMNode:Ir},vi)),w.createElement(Oe.Provider,{value:Rn},w.createElement(_e,{portal:Be,ref:jn,prefixCls:T,popup:Rr,className:m()(It,xn),style:jt,target:_r,onMouseEnter:Bn,onMouseLeave:yn,onPointerEnter:Bn,zIndex:ie,open:U,keepDom:ye,fresh:Se,onClick:gt,onPointerDownCapture:Jn,mask:vt,motion:Ut,maskMotion:Zt,onVisibleChanged:Mn,onPrepare:zn,forceRender:Nt,autoDestroy:Br,getPopupContainer:Wt,align:Vr,arrow:Yn,arrowPos:ai,ready:Dr,offsetX:pr,offsetY:tr,offsetR:Hr,offsetB:vr,onAlign:ln,stretch:ae,targetWidth:Xn/Gr,targetHeight:Zn/jr})))});return L}var Lt=wt(he.Z)},63437:function(gr,mt,K){"use strict";K.r(mt),K.d(mt,{default:function(){return At}});var V=K(59301),me=K(61186),Fe=K.n(me),he=K(86129),W=K.n(he),m=K(38986),ge=K(25690),O=K(62957),u=K(6767),J=K(77019),D=K(5269),B=K(99571),_=K(458),w=K(91882),x=K(37285),Y=K(54172),M=K(71114),H=K(82326),Q=K(29787),P=K(27812),X=K(95869),ce=K(87169),_e=K(26227),we=K(346),ne=K(48790),ve=K(51257),Oe=K(28284),le=K(71051),Me=K(37568),Z=({defaultValue:it,onBlur:Ne,max:Ze,className:lt="game-score"})=>{const[vt,Ot]=(0,V.useState)(it);(0,V.useEffect)(()=>{Ot(it)},[it]);function Ct(Nt){Ot(Nt)}function Wt(){vt&&(Ne(vt>Ze?Ze:vt),Ot(null))}return V.createElement(le.Z,{max:Ze,min:0,className:lt,value:vt,onChange:Ct,onBlur:Wt})},I={greyText:"greyText___lvEE6",info:"info___El01Z",label:"label___GmvST",blackContent:"blackContent___FYo0Z",orangeContent:"orangeContent____uYQ3",inputLabel:"inputLabel___ruiZm",tableTitle:"tableTitle___ir3x7",scoreTable:"scoreTable___b9Z37"},G=K(61209),z=K(18638),se=K(59301),re=Object.defineProperty,E=Object.defineProperties,y=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Je=(it,Ne,Ze)=>Ne in it?re(it,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):it[Ne]=Ze,yt=(it,Ne)=>{for(var Ze in Ne||(Ne={}))Ae.call(Ne,Ze)&&Je(it,Ze,Ne[Ze]);if($)for(var Ze of $(Ne))Ge.call(Ne,Ze)&&Je(it,Ze,Ne[Ze]);return it},dt=(it,Ne)=>E(it,y(Ne)),Rt=(it,Ne,Ze)=>new Promise((lt,vt)=>{var Ot=Nt=>{try{Wt(Ze.next(Nt))}catch(Xt){vt(Xt)}},Ct=Nt=>{try{Wt(Ze.throw(Nt))}catch(Xt){vt(Xt)}},Wt=Nt=>Nt.done?lt(Nt.value):Promise.resolve(Nt.value).then(Ot,Ct);Wt((Ze=Ze.apply(it,Ne)).next())});const bt=({shixunHomeworks:it,dispatch:Ne,classroomList:Ze,gethomeworkreport:lt,homeWorkReport:vt})=>{var Ot,Ct;const{shixunWorkReport:Wt}=it,Nt=(0,ge.useParams)(),[Xt,fr]=(0,V.useState)(!1),[Rr,It]=(0,V.useState)(!1),[jt,Re]=(0,V.useState)(""),[Ce]=Oe.default.useForm(),Ee=Oe.default.useWatch("comment",Ce),j=Oe.default.useWatch("hidden_comment",Ce),[ie,ae]=(0,V.useState)(!1),de=(0,V.useRef)({}),[Se,xt]=O.default.useModal(),gt=()=>Rt(void 0,null,function*(){It(!0);const Gt=Ce.getFieldsValue();(yield(0,m.ZP)(`/api/student_works/${Nt.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:Gt.hidden_comment,comment:Gt.comment}})).status===0&&(u.ZP.success("\u70B9\u8BC4\u6210\u529F"),Ce.resetFields(),Ne({type:"classroomList/setActionTabs",payload:{}}),lt()),It(!1)}),qe=()=>Rt(void 0,null,function*(){if(!jt){u.ZP.warning("\u8BF7\u586B\u5199\u5206\u6570");return}It(!0);const Gt=Ce.getFieldsValue();(yield(0,m.ZP)(`/api/student_works/${Nt.homeworkId}/add_score.json`,{method:"post",body:{comment:Gt.comment,score:jt}})).status===0&&(u.ZP.success("\u70B9\u8BC4\u6210\u529F"),Ne({type:"classroomList/setActionTabs",payload:{}}),lt()),It(!1)}),Ht=Gt=>Rt(void 0,null,function*(){const{mes:Kt,setChatData:Sr,setTyping:$r}=Gt,De=yield(0,m.ZP)("/api/intelligent_reviews/large_model_intelligent_qa.json",{method:"post",body:yt({query:Kt,student_work_id:Nt.homeworkId},de.current)});De.answer=(De==null?void 0:De.status)==-3?De.message:De==null?void 0:De.answer,De!=null&&De.answer&&Sr(Ir=>[...Ir].map((Er,Br)=>Br===Ir.length-1?dt(yt({},Er),{text:De==null?void 0:De.answer,loading:!1,response:De}):Er))}),Cr=({chatData:Gt,setChatData:Kt,setLoading:Sr,getData:$r,renderChatItems:De})=>{Ne({type:"shixunHomeworks/setActionTabs",payload:{key:"\u667A\u80FD\u8BC4\u9605\u914D\u7F6E",onOk:Ir=>{de.current=Ir,ae(!0),Sr(!0);const Er=De();Er[0].show=!1,Kt(Er),$r()}}})},Nr=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:160,render:Gt=>Gt||"--"},{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:Gt=>Gt||"--"},{title:"\u5F97\u5206",dataIndex:"score",width:90,render:(Gt,Kt)=>se.createElement("div",null,se.createElement("span",{style:{color:parseFloat(Kt.score_full)!==parseFloat(Gt)?"#E30000":"#53C41B"}},Gt),"/",Kt.score_full)},{title:"\u8C03\u5206",width:100,dataIndex:"action",render:(Gt,Kt)=>(0,ne.GJ)()?se.createElement(Z,{max:Kt.score_full,onBlur:Sr=>Rt(void 0,null,function*(){var $r;if((0,ne.Rm)()&&!(($r=Ze.AssistantObject.practice)!=null&&$r.can_appraise)){u.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 De=yield(0,m.ZP)(`/api/student_works/${Nt.homeworkId}/adjust_score.json`,{method:"post",body:{score:Sr}});lt(),De.status===0&&u.ZP.success("\u8C03\u5206\u6210\u529F")})}):vt!=null&&vt.is_anonymous?se.createElement(le.Z,{min:0,value:jt,onChange:Sr=>Re(Sr),max:Kt.score_full}):Gt}].filter(Gt=>vt!=null&&vt.is_anonymous?!["late_penalty","score","absence_penalty"].includes(Gt.dataIndex):!0);return se.createElement(se.Fragment,null,se.createElement(O.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",afterClose:()=>{Ce.resetFields(),Re("")},confirmLoading:Rr,open:Ze.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Rt(void 0,null,function*(){var Gt;if((0,ne.Rm)()&&!((Gt=Ze.AssistantObject.practice)!=null&&Gt.can_appraise)){u.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(vt!=null&&vt.is_anonymous){qe();return}const Kt=Ce.getFieldsValue();JSON.stringify(Kt)==="{}"||Kt.hidden_comment===""&&Kt.comment===""?fr(!0):gt()}),onCancel:()=>{Ne({type:"classroomList/setActionTabs",payload:{}})}},se.createElement(J.Z,{className:I.info},se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u59D3\u540D"),se.createElement("span",{className:I.blackContent},vt==null?void 0:vt.username)),se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u5B66\u53F7"),se.createElement("span",{className:I.blackContent},(vt==null?void 0:vt.student_id)||"--")),!(vt!=null&&vt.is_anonymous)&&se.createElement(se.Fragment,null,se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u73ED\u7EA7"),se.createElement("span",{className:I.blackContent},(vt==null?void 0:vt.group_name)||"--")),se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u8865\u4EA4\u6263\u5206"),se.createElement("span",{className:I.orangeContent},((Ot=vt==null?void 0:vt.stage_list[0])==null?void 0:Ot.late_penalty)||"--")),se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u7F3A\u8BC4\u6263\u5206"),se.createElement("span",{className:I.orangeContent},((Ct=vt==null?void 0:vt.stage_list[0])==null?void 0:Ct.absence_penalty)||"--")),se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u603B\u6210\u7EE9"),se.createElement("span",{className:I.orangeContent},(vt==null?void 0:vt.stage_list[0].score)||"--")))),se.createElement(Oe.default,{form:Ce,onChange:()=>{Xt&&fr(!1)}},se.createElement("div",{className:"w-full flex justify-between item-center"},se.createElement("div",{className:`${I.inputLabel} ${I.greyText}`,style:{marginBottom:0}},vt!=null&&vt.is_anonymous?"\u8BC4\u8BED":"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),se.createElement("div",{className:"mb10"},se.createElement(G.Z,{title:"\u667A\u80FD\u8BC4\u9605",visible:ie,onOpen:Cr,onClose:()=>{ae(!1)},loadingOption:{text:"AI\u8BC4\u9605\u4E2D..."},hideUpload:!0,showDefaultTips:!1,hideInputBox:!0,customRequest:Ht,extraAnswerAction:Gt=>{var Kt;return!Gt.loading&&![-1,-3].includes((Kt=Gt==null?void 0:Gt.response)==null?void 0:Kt.status)&&se.createElement("div",{className:I.apply,onClick:()=>{const Sr=()=>{var $r,De,Ir;Ce.setFieldsValue({comment:($r=Gt==null?void 0:Gt.response)==null?void 0:$r.remarks,hidden_comment:(De=Gt==null?void 0:Gt.response)==null?void 0:De.remarks}),Re((Ir=Gt==null?void 0:Gt.response)==null?void 0:Ir.score),ae(!1)};if(jt||Ee||j){Se.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:Sr});return}Sr()}},se.createElement("i",{style:{color:"#3061D0"},className:"iconfont icon-yijianyingyong1 font12 mr5"}),"\u4E00\u952E\u5E94\u7528")}},se.createElement(B.ZP,{icon:se.createElement("img",{src:K(11689)}),type:"link"},"\u667A\u80FD\u8BC4\u9605")))),se.createElement(Oe.default.Item,{name:"comment"},se.createElement(Me.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),!(vt!=null&&vt.is_anonymous)&&se.createElement(se.Fragment,null,se.createElement("div",{className:`${I.inputLabel} ${I.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),se.createElement(Oe.default.Item,{name:"hidden_comment"},se.createElement(Me.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))," ")),Xt&&se.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),se.createElement("div",{className:I.tableTitle},"\u5173\u5361\u6210\u7EE9"),se.createElement(Y.default,{className:I.scoreTable,dataSource:vt==null?void 0:vt.stage_list,rowKey:"challenge_id",pagination:!1,columns:Nr})),se.createElement(z.Z,null))};var ht=(0,ge.connect)(({shixunHomeworks:it,classroomList:Ne})=>({shixunHomeworks:it,classroomList:Ne}))(bt),Le={},nt=(it,Ne,Ze)=>new Promise((lt,vt)=>{var Ot=Nt=>{try{Wt(Ze.next(Nt))}catch(Xt){vt(Xt)}},Ct=Nt=>{try{Wt(Ze.throw(Nt))}catch(Xt){vt(Xt)}},Wt=Nt=>Nt.done?lt(Nt.value):Promise.resolve(Nt.value).then(Ot,Ct);Wt((Ze=Ze.apply(it,Ne)).next())});const Ie=({shixunHomeworks:it,dispatch:Ne,gethomeworkreport:Ze,homeWorkReport:lt})=>{var vt,Ot;const{shixunWorkReport:Ct}=it;console.log(lt,"homeWorkReport");const Wt=(0,ge.useParams)(),[Nt,Xt]=(0,V.useState)(!1),[fr]=Oe.default.useForm(),{user_name:Rr,score:It,comment_time:jt,content:Re,score_id:Ce,user_id:Ee}=((Ot=(vt=it==null?void 0:it.actionTabs)==null?void 0:vt.selectArrs)==null?void 0:Ot.data)||{},j=()=>nt(void 0,null,function*(){yield fr.validateFields(),Xt(!0);const ie=fr.getFieldsValue();(yield(0,m.ZP)(`/api/student_works/${Wt.homeworkId}/appeal_anonymous_score.json`,{method:"post",body:{comment:ie.comment,score_id:Ce,userId:Ee}})).status===0&&(u.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ne({type:"shixunHomeworks/setActionTabs",payload:{}}),Ze()),Xt(!1)});return V.createElement(O.default,{centered:!0,width:600,title:"\u533F\u8BC4\u7533\u8BC9",afterClose:()=>{fr.resetFields()},confirmLoading:Nt,open:it.actionTabs.key==="\u533F\u8BC4\u7533\u8BC9",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:j,onCancel:()=>{Ne({type:"shixunHomeworks/setActionTabs",payload:{}})}},V.createElement("div",{className:"p20",style:{background:"#F7F8F9",padding:15,marginBottom:20}},V.createElement(J.Z,{justify:"space-between",className:Le.info},V.createElement("span",null,V.createElement("span",{className:"c-grey-666"},Rr),V.createElement("span",{className:"c-grey-333 ml5"},"\u8C03\u5206\u4E3A"),V.createElement("span",{className:"c-orange ml5"},It,"\u5206")),V.createElement("span",{className:"c-grey-333"},jt)),V.createElement("div",{className:"c-grey-333 mt5"},Re)),V.createElement(Oe.default,{form:fr,className:"mt15",layout:"vertical"},V.createElement(Oe.default.Item,{name:"comment",label:"\u7533\u8BC9",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0"}]},V.createElement(Me.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0",rows:3}))))};var wt=(0,ge.connect)(({shixunHomeworks:it})=>({shixunHomeworks:it}))(Ie),Lt=K(16143),Be={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"},L=K(76902),g=K(1247),C=K(44164),N=K.n(C),T=K(59301),k=Object.defineProperty,ee=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,Ye=(it,Ne,Ze)=>Ne in it?k(it,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):it[Ne]=Ze,We=(it,Ne)=>{for(var Ze in Ne||(Ne={}))be.call(Ne,Ze)&&Ye(it,Ze,Ne[Ze]);if(ee)for(var Ze of ee(Ne))Ue.call(Ne,Ze)&&Ye(it,Ze,Ne[Ze]);return it},St=(it,Ne)=>{var Ze={};for(var lt in it)be.call(it,lt)&&Ne.indexOf(lt)<0&&(Ze[lt]=it[lt]);if(it!=null&&ee)for(var lt of ee(it))Ne.indexOf(lt)<0&&Ue.call(it,lt)&&(Ze[lt]=it[lt]);return Ze},Xe=(it,Ne,Ze)=>new Promise((lt,vt)=>{var Ot=Nt=>{try{Wt(Ze.next(Nt))}catch(Xt){vt(Xt)}},Ct=Nt=>{try{Wt(Ze.throw(Nt))}catch(Xt){vt(Xt)}},Wt=Nt=>Nt.done?lt(Nt.value):Promise.resolve(Nt.value).then(Ot,Ct);Wt((Ze=Ze.apply(it,Ne)).next())});const ut=it=>{var Ne=it,{shixunHomeworks:Ze,classroomList:lt,globalSetting:vt,loading:Ot,user:Ct,dispatch:Wt}=Ne,Nt=St(Ne,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),Xt,fr,Rr,It,jt,Re,Ce;const[Ee,j]=(0,V.useState)(We({},(0,ge.useParams)())),ie=(0,ge.useParams)(),ae=(0,ge.useLocation)(),[]=(0,V.useState)([]),[de,Se]=(0,V.useState)({last:!1}),[xt,gt]=(0,V.useState)({last:!1}),qe=(0,V.useRef)(),Ht=(0,V.useRef)(),[Cr,Nr]=(0,V.useState)(!1),[Gt,Kt]=(0,V.useState)(!1),[Sr,$r]=(0,V.useState)(!1),[De,Ir]=(0,V.useState)(),[Er,Br]=(0,V.useState)(),[vn,Or]=(0,V.useState)(!0),[Jr,An]=(0,V.useState)(),Cn=(0,ne.GJ)(),[an,Rn]=(0,V.useState)(new(W())),[Pr,Qn]=(0,V.useState)(0),[Mr,en]=(0,V.useState)([]),[Dn,br]=(0,V.useState)(!1),[jn,on]=(0,V.useState)(!1),[lr,_r]=(0,V.useState)(""),[ke,ze]=(0,V.useState)(!1),[_t,at]=(0,V.useState)(!0),[Tt,tt]=(0,V.useState)(0),[ot]=(0,ge.useSearchParams)(),Ut=()=>Xe(void 0,null,function*(){(Ct.userInfo.is_teacher||Ct.userInfo.admin)&&(ze(!0),at(!1))});(0,V.useEffect)(()=>{Ut(),console.log("\u6253\u5370\u7684------",De),console.log(Ze),_r(De==null?void 0:De.repeat_minus_score)},[De,Ct]),(0,V.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",De==null?void 0:De.work_score),tt(De==null?void 0:De.work_score)},[De==null?void 0:De.work_score,lr]),(0,V.useEffect)(()=>(Wt({type:"globalSetting/footerToggle",payload:!1}),()=>{Wt({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,V.useEffect)(()=>{var ye;if(De){let je=[];(ye=De==null?void 0:De.target_test_sets)==null||ye.map((ct,zt)=>{var Vt;(Vt=ct==null?void 0:ct.targets)==null||Vt.map((Et,Mt)=>{var Yt;Et.name=ct==null?void 0:ct.name,Et.total_target_score=ct==null?void 0:ct.total_target_score,Et.actual_target_score=ct==null?void 0:ct.actual_target_score,Et.rowSpan=Mt===0?(Yt=ct==null?void 0:ct.targets)==null?void 0:Yt.length:0,Et.order=zt+1,je.push(Et)})}),An(je),Wt({type:"classroomList/getAssistantPermissions",payload:{course_id:Ee.coursesId}})}},[De]),(0,V.useEffect)(()=>{Ze.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&Mr.length>0&&De!=null&&De.course_name&&hr("all")},[De==null?void 0:De.course_name]),(0,V.useEffect)(()=>{console.log(ie),j(We({},ie))},[ae.pathname]);const Zt=()=>{document.body.scrollIntoView()};function Ar(){return Xe(this,null,function*(){var ye,je,ct,zt;const Vt=JSON.parse(localStorage.all_student_works_param||"{}"),Et=yield Wt({type:"shixunHomeworks/getAllStudentWorks",payload:We(We({},Ee),Vt)});en(Et.all_student_works);const Mt=(ye=Et.all_student_works)==null?void 0:ye.map(Yt=>String(Yt.student_work_id)).indexOf(Ee.homeworkId);Mt===((je=Et.all_student_works)==null?void 0:je.length)-1?Se({last:!0}):Se((ct=Et.all_student_works)==null?void 0:ct[Mt+1]),gt(Mt===0?{last:!0}:(zt=Et.all_student_works)==null?void 0:zt[Mt-1])})}const yr=()=>{document.querySelectorAll("canvas").forEach(ye=>{(!ye.clientWidth||!ye.clientHeight)&&ye.remove()})},hr=ye=>Xe(void 0,null,function*(){let je=0,ct;ct=O.default.info({width:460,title:T.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",T.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:T.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",T.createElement("span",{className:"c-blue"},je+1),"/",ye!=="all"?1:Mr==null?void 0:Mr.length,T.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:Be.modal,onOk:()=>{}});const zt={margin:[0,0],filename:`${De==null?void 0:De.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}};function Vt(){return Xe(this,null,function*(){Zt(),je++,setTimeout(()=>Xe(this,null,function*(){var Mt;yr();const Yt=an.folder(`${(Mt=De==null?void 0:De.stage_list[0])==null?void 0:Mt.shixun_name}`),sr=document.querySelector("#export-all").children;let ir=N()();for(let $t=0;$t<sr.length;$t++)yield ir.set(zt).from(sr[$t]).toContainer().toCanvas().toPdf().get("pdf").then(mr=>Xe(this,null,function*(){$t<sr.length-1&&(yield mr.addPage())}));Yt.file(`${Mr[je-1].student_work_user_name}.pdf`,ir.output("blob")),ct.update({content:T.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",T.createElement("span",{className:"c-blue"},je),"/",Mr==null?void 0:Mr.length,T.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),je==(Mr==null?void 0:Mr.length)?(ct.destroy(),Tr()):Et()}),2200)})}function Et(){return Xe(this,null,function*(){var Mt,Yt,sr,ir,$t;const mr=yield(0,m.ZP)(`/api/student_works/${Mr[je].student_work_id}/jupyter_work_report.json`,{method:"get"});if((mr==null?void 0:mr.status)===0)if(Ir(mr.data),(Yt=(Mt=mr==null?void 0:mr.data)==null?void 0:Mt.shixun_detail[0])!=null&&Yt.myshixun_identifier){Or(!0);const ur=yield(0,m.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(ir=(sr=mr==null?void 0:mr.data)==null?void 0:sr.shixun_detail[0])==null?void 0:ir.myshixun_identifier,student_work_id:($t=mr==null?void 0:mr.data)==null?void 0:$t.work_id}});ur.status===0&&(Br(ur.html_content),Or(!1),ue(),Vt())}else Vt()})}if(ye!=="all"||(Mr==null?void 0:Mr.length)<2){yr(),Zt();const Mt=Ht.current.children;let Yt=N()();const sr=an.folder(`${De==null?void 0:De.username}`);for(let ir=0;ir<Mt.length;ir++)yield Yt.set(zt).from(Mt[ir]).toContainer().toCanvas().toPdf().get("pdf").then($t=>Xe(void 0,null,function*(){ir<Mt.length-1&&(yield $t.addPage())}));Nr(!1),sr.file(`${De==null?void 0:De.username}.pdf`,Yt.output("blob"),{base64:!1}),ct.destroy(),Tr();return}else Et()}),Tr=()=>{an.generateAsync({type:"blob"}).then(function(ye){const je=document.createElement("a");je.href=window.URL.createObjectURL(ye),je.download=(De==null?void 0:De.course_name)+".zip",document.body.appendChild(je);const ct=document.createEvent("MouseEvents");ct.initEvent("click",!1,!1),je.dispatchEvent(ct),document.body.removeChild(je),Rn(new(W()))}),$r(!1)};(0,V.useEffect)(()=>{Qe()},[Ee.homeworkId]),(0,V.useEffect)(()=>{De!=null&&De.work_id&&((0,ne.GJ)()||De!=null&&De.is_anonymous)&&Ar()},[De==null?void 0:De.work_id]),(0,V.useEffect)(()=>{console.log(De)},[De]);const U=()=>Xe(void 0,null,function*(){const ye=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/jupyter_work_report.json`,{method:"get"});(ye==null?void 0:ye.status)===0&&Ir(ye.data)}),R=()=>Xe(void 0,null,function*(){var ye,je,ct,zt,Vt;const Et=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/jupyter_work_report.json`,{method:"get"});if((Et==null?void 0:Et.status)===0&&(Ir(Et.data),(je=(ye=Et==null?void 0:Et.data)==null?void 0:ye.shixun_detail[0])!=null&&je.myshixun_identifier)){Or(!0);const Mt=yield(0,m.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(zt=(ct=Et==null?void 0:Et.data)==null?void 0:ct.shixun_detail[0])==null?void 0:zt.myshixun_identifier,student_work_id:(Vt=Et==null?void 0:Et.data)==null?void 0:Vt.work_id}});if(Mt.status===0){Br(Mt.html_content),Or(!1),q(Mt.html_content);return}}}),q=ye=>{var je,ct;(ct=(je=ye==null?void 0:ye.match)==null?void 0:je.call(ye,/<script [^>]*src=['"]([^'"]+)[^>]*>/gi))==null||ct.map(zt=>{const Vt=document.createElement("script");Vt.src=/<script [^>]*src=['"]([^'"]+)[^>]*>/gi.exec(zt)[1],document.body.appendChild(Vt)}),ue()},ue=()=>{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(ye){}},Qe=()=>Xe(void 0,null,function*(){Kt(!0),R(),Kt(!1)}),He=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0,render:(ye,je,ct)=>ye},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:De!=null&&De.is_anonymous?220:170,render:ye=>ye||"--"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",width:De!=null&&De.is_anonymous?140:90},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time",width:De!=null&&De.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:ye=>ye||"--"},{title:"\u7F3A\u8BC4\u6263\u5206",dataIndex:"absence_penalty",width:90,render:ye=>ye||"--"},{title:"\u5F97\u5206",dataIndex:"score",width:100,render:(ye,je)=>T.createElement("div",null,T.createElement("span",{style:{color:parseFloat(je.score_full)!==parseFloat(ye)?"red":"green"}},ye||0),"/",je.score_full)},{title:"\u8C03\u5206",dataIndex:"action",width:110,render:(ye,je)=>Cn?T.createElement(Z,{max:je.score_full,onBlur:ct=>Xe(void 0,null,function*(){var zt;if((0,ne.Rm)()&&!((zt=lt.AssistantObject.practice)!=null&&zt.can_appraise)){u.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 Vt=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/adjust_score.json`,{method:"post",body:{score:ct}});U(),Vt.status===0&&u.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):ye}].filter(ye=>De!=null&&De.is_anonymous?!["late_penalty","absence_penalty","score","action"].includes(ye.dataIndex):!0),rt=De==null?void 0:De.comment_scores.map(ye=>{var je,ct,zt;return{children:T.createElement(J.Z,null,T.createElement(D.Z,{span:24},T.createElement(J.Z,null,T.createElement(D.Z,{flex:1},T.createElement("span",{className:"c-light-black mr10"},ye.user_name),T.createElement("span",null,"\u8C03\u5206\u4E3A"),T.createElement("span",{className:"ml10 c-orange"},ye.score?ye.score:0,"\u5206")),T.createElement(D.Z,null,T.createElement("span",{className:"c-light-black ml10"},ye.comment_time)))),T.createElement(D.Z,{span:24,className:"mt8"},T.createElement(J.Z,{className:"mt8"},T.createElement(D.Z,{span:22},ye.content?T.createElement(L.Z,{value:ye.content,style:{fontSize:14}}):T.createElement("span",{className:"c-light-black"},"\u6682\u672A\u5199\u8BC4\u8BED")),T.createElement(D.Z,{className:"tr",span:2},(ye==null?void 0:ye.can_appeal)&&!(ye!=null&&ye.is_invalid)&&T.createElement(B.ZP,{size:"small",type:"primary",onClick:()=>{Wt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u533F\u8BC4\u7533\u8BC9",selectArrs:{data:We({},ye)}}})}},"\u7533\u8BC9")))),!!(ye!=null&&ye.appeal_info)&&T.createElement(D.Z,{span:24,className:"mt8"},T.createElement("div",{className:"p20",style:{background:"#F7F8F9",padding:15}},T.createElement(J.Z,{justify:"space-between"},T.createElement("span",null,T.createElement("span",{className:"c-grey-333"},(je=ye==null?void 0:ye.appeal_info)==null?void 0:je.user_name),T.createElement("span",null,(ye==null?void 0:ye.appeal_status)===1&&T.createElement("span",{className:`tag-style bg-orange ml10 ${Be.tag}`},"\u7533\u8BC9\u4E2D"),(ye==null?void 0:ye.appeal_status)===2&&T.createElement("span",{className:`tag-style bg-grey-ede c-light-black ml10 ${Be.tag}`},"\u7533\u8BC9\u5DF2\u64A4\u9500"),(ye==null?void 0:ye.appeal_status)===3&&T.createElement("span",{className:`tag-style ml10 ${Be.tag}`,style:{background:"#57BE40"}},"\u7533\u8BC9\u6210\u529F"),(ye==null?void 0:ye.appeal_status)===4&&T.createElement("span",{className:`tag-style bg-grey-ede c-light-black ml10 ${Be.tag}`},"\u7533\u8BC9\u88AB\u62D2\u7EDD"),(ye==null?void 0:ye.appeal_status)===5&&T.createElement("span",{className:`tag-style c-light-black ml10 ${Be.tag}`,style:{background:"#E9EAED"}},"\u7533\u8BC9\u5931\u8D25"))),T.createElement("span",{className:"c-light-black"}," ",Fe()((ct=ye==null?void 0:ye.appeal_info)==null?void 0:ct.time).format("YYYY-MM-DD HH:mm:ss"))),T.createElement(J.Z,{justify:"space-between",className:"mt10"},T.createElement(D.Z,{flex:1},(zt=ye.appeal_info)==null?void 0:zt.content),T.createElement(D.Z,{style:{flexShrink:0,marginLeft:"auto"}},(ye==null?void 0:ye.appeal_status)===1&&(0,ne.GJ)()&&T.createElement("span",{onClick:()=>{O.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:()=>Xe(void 0,null,function*(){const Vt=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:ye.score_id,status:3}});(Vt==null?void 0:Vt.status)===0&&U()})})},className:"c-red current"},"\u63A5\u53D7\u7533\u8BC9"),(ye==null?void 0:ye.appeal_status)===1&&(0,ne.GJ)()&&T.createElement("span",{onClick:()=>{O.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:()=>Xe(void 0,null,function*(){const Vt=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:ye.score_id,status:4}});(Vt==null?void 0:Vt.status)===0&&U()})})},className:"c-light-black current ml10"},"\u62D2\u7EDD\u7533\u8BC9"))))))}}),et=ye=>{Br(null),Wt({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{ye==="next"?ge.history.push(`/classrooms/${Ee.coursesId}/common_homework/${Ee.categoryId}/${de==null?void 0:de.student_work_id}/comment?page=${ot.get("page")}`):ge.history.push(`/classrooms/${Ee.coursesId}/common_homework/${Ee.categoryId}/${xt==null?void 0:xt.student_work_id}/comment?page=${ot.get("page")}`)},200)},Ft=ye=>{_r(""),ye.target.value&&(console.log("\u8FDB\u6765",De),ye.target.value=ye.target.value>(De==null?void 0:De.repeat_setting_score)?De==null?void 0:De.repeat_setting_score:ye.target.value,_r(ye.target.value))},pt=()=>Xe(void 0,null,function*(){const ye=yield(0,m.ZP)(`/api/student_works/${De==null?void 0:De.work_id}/update_repeat_score`,{method:"put",body:{score:lr}});yield Wt({type:"shixunHomeworks/gethomeWorkReport",payload:We({},Ee)}),ye.status===0&&u.ZP.info("\u64CD\u4F5C\u6210\u529F")});return console.log(!!(De!=null&&De.category),De==null?void 0:De.course_id,"homeWorkReport"),T.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},T.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},T.createElement(_.Z,{loading:Gt,active:!0,avatar:{size:40},paragraph:{rows:5}},T.createElement("div",{className:"edu-container"},(De==null?void 0:De.course_id)&&T.createElement("section",{className:"animated fadeIn"},T.createElement("aside",{className:""},(De==null?void 0:De.category)&&T.createElement(w.Z,{separator:">"},T.createElement(w.Z.Item,null,T.createElement(ge.Link,{to:`/classrooms/${De==null?void 0:De.course_id}/common_homework`},De==null?void 0:De.course_name)),T.createElement(w.Z.Item,null,T.createElement(ge.Link,{to:`/classrooms/${De==null?void 0:De.course_id}/common_homework/${De!=null&&De.category.main?"":De==null?void 0:De.category.category_id}`},De==null?void 0:De.category.category_name)),T.createElement(w.Z.Item,null,T.createElement(ge.Link,{to:`/classrooms/${De==null?void 0:De.course_id}/common_homework/${De==null?void 0:De.homework_common_id}/detail`},"\u4F5C\u4E1A\u8BE6\u60C5")),T.createElement(w.Z.Item,null,De==null?void 0:De.username))),T.createElement("aside",{className:[Be.title1,"mt20"].join(" ")},T.createElement(J.Z,{align:"middle"},T.createElement(D.Z,{flex:1},T.createElement(ge.Link,{to:`/classrooms/${De==null?void 0:De.course_id}/common_homework/${De==null?void 0:De.homework_common_id}/detail?page=${ot.get("page")}`},T.createElement(P.Z,{className:"font16 c-black"})),T.createElement("strong",{style:{fontWeight:700},className:"font20 ml5"},De==null?void 0:De.shixun_name),T.createElement(ve.VV,{status:De==null?void 0:De.homework_status})),T.createElement(D.Z,{className:Be.title1_right},!(De!=null&&De.is_anonymous)&&!!(De!=null&&De.work_status)&&T.createElement(B.ZP,null,T.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),T.createElement(ge.Link,{className:"c-black",target:"_blank",to:`/tasks/${(fr=(Xt=De==null?void 0:De.shixun_detail)==null?void 0:Xt[0])==null?void 0:fr.myshixun_identifier}/jupyter${(0,ne.GJ)()?"":`?homework_common_id=${ie.categoryId}`}`},(0,ne.GJ)()?"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD":"\u67E5\u770B\u5B9E\u8BAD")),(0,ne.GJ)()&&!((Rr=De==null?void 0:De.homework_status)!=null&&Rr.includes("\u5DF2\u622A\u6B62"))&&T.createElement(B.ZP,{className:"ml10",onClick:()=>Xe(void 0,null,function*(){yield Wt({type:"shixunHomeworks/setActionTabs",payload:{key:"redoShixunModal",homework_common_id:ie.categoryId,student_work_id:ie.homeworkId}})})},T.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),!(De!=null&&De.is_anonymous)&&T.createElement(B.ZP,{className:"ml10",onClick:()=>{var ye;if((0,ne.Rm)()&&!((ye=lt.AssistantObject.normal)!=null&&ye.can_download)){u.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}hr("")},loading:Cr},T.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,ne.GJ)()&&(Mr==null?void 0:Mr.length)>1&&T.createElement(B.ZP,{className:"ml10",onClick:()=>{var ye;if((0,ne.Rm)()&&!((ye=lt.AssistantObject.normal)!=null&&ye.can_download)){u.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}hr("all")}},T.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),T.createElement("aside",{className:"mt30 relative"})),T.createElement("aside",{className:"edu-container bg-white",ref:qe},T.createElement("div",{id:"export-all",ref:Ht},T.createElement("div",{id:"export-all-1"},T.createElement("div",{className:Be.title},T.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),T.createElement("div",null,!((It=De==null?void 0:De.homework_status)!=null&&It.includes("\u5DF2\u622A\u6B62")&&(0,ne.dE)())&&((0,ne.GJ)()||(De==null?void 0:De.is_anonymous))&&T.createElement(B.ZP,{className:"mr20",type:"primary",onClick:()=>{Wt({type:"classroomList/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:De==null?void 0:De.user_id,data:We({},De)}}})}},T.createElement(X.Z,null),De!=null&&De.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),T.createElement(x.Z,{style:{marginTop:0}}),T.createElement(J.Z,{className:"pl30 pr30"},T.createElement(D.Z,null,T.createElement("img",{className:Be.userPic,src:`${we.Z.IMG_SERVER}/images/${De==null?void 0:De.image_url}`,alt:De==null?void 0:De.username})),T.createElement(D.Z,{className:"pt20"},T.createElement("span",{className:"font16 ml40"},De==null?void 0:De.username),T.createElement(ve.Y,{status:De==null?void 0:De.work_status}),T.createElement("ul",{className:Be.userInfo},T.createElement("li",null,"\u5B66\u53F7\uFF1A",(De==null?void 0:De.student_id)||"--"),((0,ne.GJ)()||!(De!=null&&De.is_anonymous))&&T.createElement("li",null,"\u5206\u73ED\uFF1A",(De==null?void 0:De.group_name)||"--"),T.createElement("br",null)))),T.createElement("aside",{className:"pl30 pr30 mt30 mb10"},T.createElement(Y.default,{dataSource:De==null?void 0:De.stage_list,rowKey:ye=>ye==null?void 0:ye.challenge_id,pagination:!1,columns:He})),((De==null?void 0:De.work_comment_hidden)||(De==null?void 0:De.work_comment))&&T.createElement("div",null,T.createElement(J.Z,{align:"middle"},T.createElement(D.Z,{flex:1},T.createElement("h1",{className:Be.title},"\u70B9\u8BC4\u5185\u5BB9")),T.createElement(D.Z,{className:"pr30"},(0,ne.GJ)()&&T.createElement(B.ZP,{onClick:()=>Xe(void 0,null,function*(){O.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:T.createElement(ce.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return Xe(this,null,function*(){(yield(0,g.gZ)({comment_id:De==null?void 0:De.comment_id,homeworkId:Ee.homeworkId})).status===0&&(u.ZP.success("\u5220\u9664\u6210\u529F"),U())})}})})},T.createElement(_e.Z,null),"\u5220\u9664"))),(De==null?void 0:De.work_comment)&&T.createElement("aside",{className:"pl30 pr30",style:{marginTop:"-5px"}},T.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),T.createElement("br",null),T.createElement(L.Z,{value:De==null?void 0:De.work_comment,className:"font14"})),(De==null?void 0:De.work_comment_hidden)&&T.createElement("aside",{className:"pl30 pr30 mt15"},T.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),T.createElement("br",null),T.createElement(L.Z,{value:De==null?void 0:De.work_comment_hidden,className:"font14"}))),(De==null?void 0:De.comment_scores.length)>0&&T.createElement(T.Fragment,null,T.createElement("h1",{className:Be.title},"\u8C03\u5206\u539F\u56E0"),T.createElement("aside",{className:"pl30 pr30",style:{marginTop:"4px"}},T.createElement(M.Z,{items:rt}))),((jt=De==null?void 0:De.shixun_detail[0])==null?void 0:jt.myshixun_identifier)&&T.createElement(T.Fragment,null,T.createElement("h1",{className:Be.title,style:{marginTop:"-20px"}},"\u5B9E\u8BAD\u8BE6\u60C5"),T.createElement("aside",{className:"pl30 pr30"},T.createElement("div",{className:Be.shixunWrp},T.createElement("h2",null,T.createElement("span",null,"\u8BC4\u6D4B\u4EE3\u7801",T.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")),T.createElement("span",null,T.createElement(H.default,{style:{width:200},value:(Re=De==null?void 0:De.shixun_detail[0])==null?void 0:Re.path}," ",De==null?void 0:De.shixun_detail.map(ye=>T.createElement(Option,{value:ye.path},ye.path))," "))),T.createElement(Q.Z,{spinning:vn},T.createElement("div",{style:{width:"100%",minHeight:"550px",padding:"16px"},dangerouslySetInnerHTML:{__html:Er}})))))))),((0,ne.GJ)()||(De==null?void 0:De.is_anonymous))&&T.createElement("aside",{className:`${Be.footerBar} ${Cr?Be.footerBarStatic:""}`},T.createElement("aside",{className:"edu-container"},T.createElement(J.Z,{align:"middle"},T.createElement(D.Z,{flex:"1"},T.createElement(ge.Link,{className:Be.exitComment,to:`/classrooms/${Ee.coursesId}/common_homework/${Ee.categoryId}/detail?page=${ot.get("page")}`},"\u8FD4\u56DE\u5217\u8868")),T.createElement(D.Z,{flex:"1",className:"tr"},T.createElement(B.ZP,{type:"default",disabled:xt==null?void 0:xt.last,onClick:()=>et()},"\u4E0A\u4E00\u4E2A"),T.createElement(B.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:de==null?void 0:de.last,onClick:()=>et("next")},"\u4E0B\u4E00\u4E2A"),!((Ce=De==null?void 0:De.homework_status)!=null&&Ce.includes("\u5DF2\u622A\u6B62")&&(0,ne.dE)())&&((0,ne.GJ)()||(De==null?void 0:De.is_anonymous))&&T.createElement(B.ZP,{type:"primary",onClick:()=>Xe(void 0,null,function*(){Wt({type:"classroomList/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:De==null?void 0:De.user_id,data:We({},De)}}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),T.createElement(wt,{gethomeworkreport:U,homeWorkReport:De}),T.createElement(ht,{gethomeworkreport:U,homeWorkReport:De}),T.createElement(Lt.Z,{getData:U}),T.createElement(O.default,{open:Dn,width:860,centered:!0,onCancel:()=>{br(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},T.createElement("div",{style:{color:"#333333",fontWeight:400}},T.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),T.createElement("br",null),T.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"),T.createElement("br",null),T.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"),T.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 "),T.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")),T.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},T.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),T.createElement("br",null),T.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 "),T.createElement("br",null),T.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"),T.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 "),T.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"),T.createElement("br",null),T.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")),T.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},T.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),T.createElement("br",null),T.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")),T.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},T.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),T.createElement("br",null),T.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"))),T.createElement(O.default,{open:jn,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{on(!1)},width:600},T.createElement("div",{style:{fontWeight:400,color:"#333333"}},T.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",T.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"),T.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",T.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"),T.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",T.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 At=(0,ge.connect)(({shixunHomeworks:it,classroomList:Ne,loading:Ze,globalSetting:lt,user:vt})=>({shixunHomeworks:it,classroomList:Ne,globalSetting:lt,loading:Ze.effects,user:vt}))(ut)},16143:function(gr,mt,K){"use strict";var V=K(62957),me=K(6767),Fe=K(38986),he=K(25690),W=K(48790),m=K(59301),ge=(u,J,D)=>new Promise((B,_)=>{var w=M=>{try{Y(D.next(M))}catch(H){_(H)}},x=M=>{try{Y(D.throw(M))}catch(H){_(H)}},Y=M=>M.done?B(M.value):Promise.resolve(M.value).then(w,x);Y((D=D.apply(u,J)).next())});const O=({shixunHomeworks:u,dispatch:J,classroomList:D,getData:B})=>m.createElement(V.default,{centered:!0,title:"\u63D0\u793A",open:u.actionTabs.key==="redoShixunModal",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>ge(void 0,null,function*(){var _;if((0,W.Rm)()&&!((_=D.AssistantObject.normal)!=null&&_.can_redo)){me.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,Fe.ZP)(`/api/homework_commons/${u.actionTabs.homework_common_id}/batch_redo_modal.json`,{method:"post",body:{student_work_id:u.actionTabs.student_work_id}})).status===0&&(me.ZP.success("\u64CD\u4F5C\u6210\u529F"),J({type:"shixunHomeworks/setActionTabs",payload:{}}),B())}),onCancel:()=>{J({type:"shixunHomeworks/setActionTabs",payload:{}})}},m.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C",u.actionTabs.isshixun?"\u5B66\u751F\u5B9E\u8BAD":"\u5B66\u751F\u4F5C\u54C1\u63D0\u4EA4","\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),m.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"));mt.Z=(0,he.connect)(({shixunHomeworks:u,classroomList:J})=>({shixunHomeworks:u,classroomList:J}))(O)},71114:function(gr,mt,K){"use strict";K.d(mt,{Z:function(){return Oe}});var V=K(59301),me=K(92310),Fe=K.n(me),he=K(48755),W=K(83397),m=K(93083),ge=K(63356),O=K(16931),u=K(51636);const J=le=>{const{componentCls:Me,calc:Z}=le;return{[Me]:Object.assign(Object.assign({},(0,ge.Wf)(le)),{margin:0,padding:0,listStyle:"none",[`${Me}-item`]:{position:"relative",margin:0,paddingBottom:le.itemPaddingBottom,fontSize:le.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:le.itemHeadSize,insetInlineStart:Z(Z(le.itemHeadSize).sub(le.tailWidth)).div(2).equal(),height:`calc(100% - ${(0,m.unit)(le.itemHeadSize)})`,borderInlineStart:`${(0,m.unit)(le.tailWidth)} ${le.lineType} ${le.tailColor}`},"&-pending":{[`${Me}-item-head`]:{fontSize:le.fontSizeSM,backgroundColor:"transparent"},[`${Me}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:le.itemHeadSize,height:le.itemHeadSize,backgroundColor:le.dotBg,border:`${(0,m.unit)(le.dotBorderWidth)} ${le.lineType} transparent`,borderRadius:"50%","&-blue":{color:le.colorPrimary,borderColor:le.colorPrimary},"&-red":{color:le.colorError,borderColor:le.colorError},"&-green":{color:le.colorSuccess,borderColor:le.colorSuccess},"&-gray":{color:le.colorTextDisabled,borderColor:le.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:Z(le.itemHeadSize).div(2).equal(),insetInlineStart:Z(le.itemHeadSize).div(2).equal(),width:"auto",height:"auto",marginBlockStart:0,paddingBlock:le.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:Z(Z(le.fontSize).mul(le.lineHeight).sub(le.fontSize)).mul(-1).add(le.lineWidth).equal(),marginInlineStart:Z(le.margin).add(le.itemHeadSize).equal(),marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${Me}-item-tail`]:{display:"none"},[`> ${Me}-item-content`]:{minHeight:Z(le.controlHeightLG).mul(1.2).equal()}}},[`&${Me}-alternate,
&${Me}-right,
&${Me}-label`]:{[`${Me}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:Z(le.marginXXS).mul(-1).equal(),"&-custom":{marginInlineStart:Z(le.tailWidth).div(2).equal()}},"&-left":{[`${Me}-item-content`]:{insetInlineStart:`calc(50% - ${(0,m.unit)(le.marginXXS)})`,width:`calc(50% - ${(0,m.unit)(le.marginSM)})`,textAlign:"start"}},"&-right":{[`${Me}-item-content`]:{width:`calc(50% - ${(0,m.unit)(le.marginSM)})`,margin:0,textAlign:"end"}}}},[`&${Me}-right`]:{[`${Me}-item-right`]:{[`${Me}-item-tail,
${Me}-item-head,
${Me}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(0,m.unit)(Z(Z(le.itemHeadSize).add(le.tailWidth)).div(2).equal())})`},[`${Me}-item-content`]:{width:`calc(100% - ${(0,m.unit)(Z(le.itemHeadSize).add(le.marginXS).equal())})`}}},[`&${Me}-pending
${Me}-item-last
${Me}-item-tail`]:{display:"block",height:`calc(100% - ${(0,m.unit)(le.margin)})`,borderInlineStart:`${(0,m.unit)(le.tailWidth)} dotted ${le.tailColor}`},[`&${Me}-reverse
${Me}-item-last
${Me}-item-tail`]:{display:"none"},[`&${Me}-reverse ${Me}-item-pending`]:{[`${Me}-item-tail`]:{insetBlockStart:le.margin,display:"block",height:`calc(100% - ${(0,m.unit)(le.margin)})`,borderInlineStart:`${(0,m.unit)(le.tailWidth)} dotted ${le.tailColor}`},[`${Me}-item-content`]:{minHeight:Z(le.controlHeightLG).mul(1.2).equal()}},[`&${Me}-label`]:{[`${Me}-item-label`]:{position:"absolute",insetBlockStart:Z(Z(le.fontSize).mul(le.lineHeight).sub(le.fontSize)).mul(-1).add(le.tailWidth).equal(),width:`calc(50% - ${(0,m.unit)(le.marginSM)})`,textAlign:"end"},[`${Me}-item-right`]:{[`${Me}-item-label`]:{insetInlineStart:`calc(50% + ${(0,m.unit)(le.marginSM)})`,width:`calc(50% - ${(0,m.unit)(le.marginSM)})`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${Me}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},D=le=>({tailColor:le.colorSplit,tailWidth:le.lineWidthBold,dotBorderWidth:le.wireframe?le.lineWidthBold:le.lineWidth*3,dotBg:le.colorBgContainer,itemPaddingBottom:le.padding*1.25});var B=(0,O.I$)("Timeline",le=>{const Me=(0,u.mergeToken)(le,{itemHeadSize:10,customHeadPaddingVertical:le.paddingXXS,paddingInlineEnd:2});return[J(Me)]},D),_=function(le,Me){var Z={};for(var I in le)Object.prototype.hasOwnProperty.call(le,I)&&Me.indexOf(I)<0&&(Z[I]=le[I]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,I=Object.getOwnPropertySymbols(le);G<I.length;G++)Me.indexOf(I[G])<0&&Object.prototype.propertyIsEnumerable.call(le,I[G])&&(Z[I[G]]=le[I[G]]);return Z},x=le=>{var{prefixCls:Me,className:Z,color:I="blue",dot:G,pending:z=!1,position:se,label:re,children:E}=le,y=_(le,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:$}=V.useContext(he.E_),Ae=$("timeline",Me),Ge=Fe()(`${Ae}-item`,{[`${Ae}-item-pending`]:z},Z),Je=/blue|red|green|gray/.test(I||"")?void 0:I,yt=Fe()(`${Ae}-item-head`,{[`${Ae}-item-head-custom`]:!!G,[`${Ae}-item-head-${I}`]:!Je});return V.createElement("li",Object.assign({},y,{className:Ge}),re&&V.createElement("div",{className:`${Ae}-item-label`},re),V.createElement("div",{className:`${Ae}-item-tail`}),V.createElement("div",{className:yt,style:{borderColor:Je,color:Je}},G),V.createElement("div",{className:`${Ae}-item-content`},E))},Y=K(62730),M=K(58617),H=function(le,Me){var Z={};for(var I in le)Object.prototype.hasOwnProperty.call(le,I)&&Me.indexOf(I)<0&&(Z[I]=le[I]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,I=Object.getOwnPropertySymbols(le);G<I.length;G++)Me.indexOf(I[G])<0&&Object.prototype.propertyIsEnumerable.call(le,I[G])&&(Z[I[G]]=le[I[G]]);return Z},P=le=>{var{prefixCls:Me,className:Z,pending:I=!1,children:G,items:z,rootClassName:se,reverse:re=!1,direction:E,hashId:y,pendingDot:$,mode:Ae=""}=le,Ge=H(le,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const Je=(Ie,wt)=>Ae==="alternate"?Ie==="right"?`${Me}-item-right`:Ie==="left"?`${Me}-item-left`:wt%2===0?`${Me}-item-left`:`${Me}-item-right`:Ae==="left"?`${Me}-item-left`:Ae==="right"?`${Me}-item-right`:Ie==="right"?`${Me}-item-right`:"",yt=(0,Y.Z)(z||[]),dt=typeof I=="boolean"?null:I;I&&yt.push({pending:!!I,dot:$||V.createElement(M.Z,null),children:dt}),re&&yt.reverse();const Rt=yt.length,bt=`${Me}-item-last`,ht=yt.filter(Ie=>!!Ie).map((Ie,wt)=>{var Lt;const Be=wt===Rt-2?bt:"",L=wt===Rt-1?bt:"",{className:g}=Ie,C=H(Ie,["className"]);return V.createElement(x,Object.assign({},C,{className:Fe()([g,!re&&I?Be:L,Je((Lt=Ie==null?void 0:Ie.position)!==null&&Lt!==void 0?Lt:"",wt)]),key:(Ie==null?void 0:Ie.key)||wt}))}),Le=yt.some(Ie=>!!(Ie!=null&&Ie.label)),nt=Fe()(Me,{[`${Me}-pending`]:!!I,[`${Me}-reverse`]:!!re,[`${Me}-${Ae}`]:!!Ae&&!Le,[`${Me}-label`]:Le,[`${Me}-rtl`]:E==="rtl"},Z,se,y);return V.createElement("ul",Object.assign({},Ge,{className:nt}),ht)},X=K(11592);function ce(le,Me){return le&&Array.isArray(le)?le:(0,X.Z)(Me).map(Z=>{var I,G;return Object.assign({children:(G=(I=Z==null?void 0:Z.props)===null||I===void 0?void 0:I.children)!==null&&G!==void 0?G:""},Z.props)})}var _e=ce,we=function(le,Me){var Z={};for(var I in le)Object.prototype.hasOwnProperty.call(le,I)&&Me.indexOf(I)<0&&(Z[I]=le[I]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,I=Object.getOwnPropertySymbols(le);G<I.length;G++)Me.indexOf(I[G])<0&&Object.prototype.propertyIsEnumerable.call(le,I[G])&&(Z[I[G]]=le[I[G]]);return Z};const ne=le=>{const{getPrefixCls:Me,direction:Z,timeline:I}=V.useContext(he.E_),{prefixCls:G,children:z,items:se,className:re,style:E}=le,y=we(le,["prefixCls","children","items","className","style"]),$=Me("timeline",G),Ae=(0,W.Z)($),[Ge,Je,yt]=B($,Ae),dt=_e(se,z);return Ge(V.createElement(P,Object.assign({},y,{className:Fe()(I==null?void 0:I.className,re,yt,Ae),style:Object.assign(Object.assign({},I==null?void 0:I.style),E),prefixCls:$,direction:Z,items:dt,hashId:Je})))};ne.Item=x;var ve=ne,Oe=ve},86251:function(gr,mt){"use strict";mt.byteLength=ge,mt.toByteArray=u,mt.fromByteArray=B;for(var K=[],V=[],me=typeof Uint8Array!="undefined"?Uint8Array:Array,Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he=0,W=Fe.length;he<W;++he)K[he]=Fe[he],V[Fe.charCodeAt(he)]=he;V[45]=62,V[95]=63;function m(_){var w=_.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var x=_.indexOf("=");x===-1&&(x=w);var Y=x===w?0:4-x%4;return[x,Y]}function ge(_){var w=m(_),x=w[0],Y=w[1];return(x+Y)*3/4-Y}function O(_,w,x){return(w+x)*3/4-x}function u(_){var w,x=m(_),Y=x[0],M=x[1],H=new me(O(_,Y,M)),Q=0,P=M>0?Y-4:Y,X;for(X=0;X<P;X+=4)w=V[_.charCodeAt(X)]<<18|V[_.charCodeAt(X+1)]<<12|V[_.charCodeAt(X+2)]<<6|V[_.charCodeAt(X+3)],H[Q++]=w>>16&255,H[Q++]=w>>8&255,H[Q++]=w&255;return M===2&&(w=V[_.charCodeAt(X)]<<2|V[_.charCodeAt(X+1)]>>4,H[Q++]=w&255),M===1&&(w=V[_.charCodeAt(X)]<<10|V[_.charCodeAt(X+1)]<<4|V[_.charCodeAt(X+2)]>>2,H[Q++]=w>>8&255,H[Q++]=w&255),H}function J(_){return K[_>>18&63]+K[_>>12&63]+K[_>>6&63]+K[_&63]}function D(_,w,x){for(var Y,M=[],H=w;H<x;H+=3)Y=(_[H]<<16&16711680)+(_[H+1]<<8&65280)+(_[H+2]&255),M.push(J(Y));return M.join("")}function B(_){for(var w,x=_.length,Y=x%3,M=[],H=16383,Q=0,P=x-Y;Q<P;Q+=H)M.push(D(_,Q,Q+H>P?P:Q+H));return Y===1?(w=_[x-1],M.push(K[w>>2]+K[w<<4&63]+"==")):Y===2&&(w=(_[x-2]<<8)+_[x-1],M.push(K[w>>10]+K[w>>4&63]+K[w<<2&63]+"=")),M.join("")}},19208:function(gr,mt,K){"use strict";var V;var me=K(86251),Fe=K(67467),he=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;mt.lW=O,V=Q,mt.h2=50;var W=2147483647;V=W,O.TYPED_ARRAY_SUPPORT=m(),!O.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 m(){try{var L=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(L,g),L.foo()===42}catch(C){return!1}}Object.defineProperty(O.prototype,"parent",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.buffer}}),Object.defineProperty(O.prototype,"offset",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.byteOffset}});function ge(L){if(L>W)throw new RangeError('The value "'+L+'" is invalid for option "size"');var g=new Uint8Array(L);return Object.setPrototypeOf(g,O.prototype),g}function O(L,g,C){if(typeof L=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(L)}return u(L,g,C)}O.poolSize=8192;function u(L,g,C){if(typeof L=="string")return _(L,g);if(ArrayBuffer.isView(L))return x(L);if(L==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L);if(wt(L,ArrayBuffer)||L&&wt(L.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(wt(L,SharedArrayBuffer)||L&&wt(L.buffer,SharedArrayBuffer)))return Y(L,g,C);if(typeof L=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var N=L.valueOf&&L.valueOf();if(N!=null&&N!==L)return O.from(N,g,C);var T=M(L);if(T)return T;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof L[Symbol.toPrimitive]=="function")return O.from(L[Symbol.toPrimitive]("string"),g,C);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L)}O.from=function(L,g,C){return u(L,g,C)},Object.setPrototypeOf(O.prototype,Uint8Array.prototype),Object.setPrototypeOf(O,Uint8Array);function J(L){if(typeof L!="number")throw new TypeError('"size" argument must be of type number');if(L<0)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function D(L,g,C){return J(L),L<=0?ge(L):g!==void 0?typeof C=="string"?ge(L).fill(g,C):ge(L).fill(g):ge(L)}O.alloc=function(L,g,C){return D(L,g,C)};function B(L){return J(L),ge(L<0?0:H(L)|0)}O.allocUnsafe=function(L){return B(L)},O.allocUnsafeSlow=function(L){return B(L)};function _(L,g){if((typeof g!="string"||g==="")&&(g="utf8"),!O.isEncoding(g))throw new TypeError("Unknown encoding: "+g);var C=P(L,g)|0,N=ge(C),T=N.write(L,g);return T!==C&&(N=N.slice(0,T)),N}function w(L){for(var g=L.length<0?0:H(L.length)|0,C=ge(g),N=0;N<g;N+=1)C[N]=L[N]&255;return C}function x(L){if(wt(L,Uint8Array)){var g=new Uint8Array(L);return Y(g.buffer,g.byteOffset,g.byteLength)}return w(L)}function Y(L,g,C){if(g<0||L.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(L.byteLength<g+(C||0))throw new RangeError('"length" is outside of buffer bounds');var N;return g===void 0&&C===void 0?N=new Uint8Array(L):C===void 0?N=new Uint8Array(L,g):N=new Uint8Array(L,g,C),Object.setPrototypeOf(N,O.prototype),N}function M(L){if(O.isBuffer(L)){var g=H(L.length)|0,C=ge(g);return C.length===0||L.copy(C,0,0,g),C}if(L.length!==void 0)return typeof L.length!="number"||Lt(L.length)?ge(0):w(L);if(L.type==="Buffer"&&Array.isArray(L.data))return w(L.data)}function H(L){if(L>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return L|0}function Q(L){return+L!=L&&(L=0),O.alloc(+L)}O.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==O.prototype},O.compare=function(g,C){if(wt(g,Uint8Array)&&(g=O.from(g,g.offset,g.byteLength)),wt(C,Uint8Array)&&(C=O.from(C,C.offset,C.byteLength)),!O.isBuffer(g)||!O.isBuffer(C))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===C)return 0;for(var N=g.length,T=C.length,k=0,ee=Math.min(N,T);k<ee;++k)if(g[k]!==C[k]){N=g[k],T=C[k];break}return N<T?-1:T<N?1:0},O.isEncoding=function(g){switch(String(g).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}},O.concat=function(g,C){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return O.alloc(0);var N;if(C===void 0)for(C=0,N=0;N<g.length;++N)C+=g[N].length;var T=O.allocUnsafe(C),k=0;for(N=0;N<g.length;++N){var ee=g[N];if(wt(ee,Uint8Array))k+ee.length>T.length?O.from(ee).copy(T,k):Uint8Array.prototype.set.call(T,ee,k);else if(O.isBuffer(ee))ee.copy(T,k);else throw new TypeError('"list" argument must be an Array of Buffers');k+=ee.length}return T};function P(L,g){if(O.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||wt(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);var C=L.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&C===0)return 0;for(var T=!1;;)switch(g){case"ascii":case"latin1":case"binary":return C;case"utf8":case"utf-8":return bt(L).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C*2;case"hex":return C>>>1;case"base64":return nt(L).length;default:if(T)return N?-1:bt(L).length;g=(""+g).toLowerCase(),T=!0}}O.byteLength=P;function X(L,g,C){var N=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((C===void 0||C>this.length)&&(C=this.length),C<=0)||(C>>>=0,g>>>=0,C<=g))return"";for(L||(L="utf8");;)switch(L){case"hex":return E(this,g,C);case"utf8":case"utf-8":return I(this,g,C);case"ascii":return se(this,g,C);case"latin1":case"binary":return re(this,g,C);case"base64":return Z(this,g,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,g,C);default:if(N)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),N=!0}}O.prototype._isBuffer=!0;function ce(L,g,C){var N=L[g];L[g]=L[C],L[C]=N}O.prototype.swap16=function(){var g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var C=0;C<g;C+=2)ce(this,C,C+1);return this},O.prototype.swap32=function(){var g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var C=0;C<g;C+=4)ce(this,C,C+3),ce(this,C+1,C+2);return this},O.prototype.swap64=function(){var g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var C=0;C<g;C+=8)ce(this,C,C+7),ce(this,C+1,C+6),ce(this,C+2,C+5),ce(this,C+3,C+4);return this},O.prototype.toString=function(){var g=this.length;return g===0?"":arguments.length===0?I(this,0,g):X.apply(this,arguments)},O.prototype.toLocaleString=O.prototype.toString,O.prototype.equals=function(g){if(!O.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:O.compare(this,g)===0},O.prototype.inspect=function(){var g="",C=mt.h2;return g=this.toString("hex",0,C).replace(/(.{2})/g,"$1 ").trim(),this.length>C&&(g+=" ... "),"<Buffer "+g+">"},he&&(O.prototype[he]=O.prototype.inspect),O.prototype.compare=function(g,C,N,T,k){if(wt(g,Uint8Array)&&(g=O.from(g,g.offset,g.byteLength)),!O.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(C===void 0&&(C=0),N===void 0&&(N=g?g.length:0),T===void 0&&(T=0),k===void 0&&(k=this.length),C<0||N>g.length||T<0||k>this.length)throw new RangeError("out of range index");if(T>=k&&C>=N)return 0;if(T>=k)return-1;if(C>=N)return 1;if(C>>>=0,N>>>=0,T>>>=0,k>>>=0,this===g)return 0;for(var ee=k-T,be=N-C,Ue=Math.min(ee,be),Ye=this.slice(T,k),We=g.slice(C,N),St=0;St<Ue;++St)if(Ye[St]!==We[St]){ee=Ye[St],be=We[St];break}return ee<be?-1:be<ee?1:0};function _e(L,g,C,N,T){if(L.length===0)return-1;if(typeof C=="string"?(N=C,C=0):C>2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),C=+C,Lt(C)&&(C=T?0:L.length-1),C<0&&(C=L.length+C),C>=L.length){if(T)return-1;C=L.length-1}else if(C<0)if(T)C=0;else return-1;if(typeof g=="string"&&(g=O.from(g,N)),O.isBuffer(g))return g.length===0?-1:we(L,g,C,N,T);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(L,g,C):Uint8Array.prototype.lastIndexOf.call(L,g,C):we(L,[g],C,N,T);throw new TypeError("val must be string, number or Buffer")}function we(L,g,C,N,T){var k=1,ee=L.length,be=g.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(L.length<2||g.length<2)return-1;k=2,ee/=2,be/=2,C/=2}function Ue(ut,At){return k===1?ut[At]:ut.readUInt16BE(At*k)}var Ye;if(T){var We=-1;for(Ye=C;Ye<ee;Ye++)if(Ue(L,Ye)===Ue(g,We===-1?0:Ye-We)){if(We===-1&&(We=Ye),Ye-We+1===be)return We*k}else We!==-1&&(Ye-=Ye-We),We=-1}else for(C+be>ee&&(C=ee-be),Ye=C;Ye>=0;Ye--){for(var St=!0,Xe=0;Xe<be;Xe++)if(Ue(L,Ye+Xe)!==Ue(g,Xe)){St=!1;break}if(St)return Ye}return-1}O.prototype.includes=function(g,C,N){return this.indexOf(g,C,N)!==-1},O.prototype.indexOf=function(g,C,N){return _e(this,g,C,N,!0)},O.prototype.lastIndexOf=function(g,C,N){return _e(this,g,C,N,!1)};function ne(L,g,C,N){C=Number(C)||0;var T=L.length-C;N?(N=Number(N),N>T&&(N=T)):N=T;var k=g.length;N>k/2&&(N=k/2);for(var ee=0;ee<N;++ee){var be=parseInt(g.substr(ee*2,2),16);if(Lt(be))return ee;L[C+ee]=be}return ee}function ve(L,g,C,N){return Ie(bt(g,L.length-C),L,C,N)}function Oe(L,g,C,N){return Ie(ht(g),L,C,N)}function le(L,g,C,N){return Ie(nt(g),L,C,N)}function Me(L,g,C,N){return Ie(Le(g,L.length-C),L,C,N)}O.prototype.write=function(g,C,N,T){if(C===void 0)T="utf8",N=this.length,C=0;else if(N===void 0&&typeof C=="string")T=C,N=this.length,C=0;else if(isFinite(C))C=C>>>0,isFinite(N)?(N=N>>>0,T===void 0&&(T="utf8")):(T=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var k=this.length-C;if((N===void 0||N>k)&&(N=k),g.length>0&&(N<0||C<0)||C>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var ee=!1;;)switch(T){case"hex":return ne(this,g,C,N);case"utf8":case"utf-8":return ve(this,g,C,N);case"ascii":case"latin1":case"binary":return Oe(this,g,C,N);case"base64":return le(this,g,C,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Me(this,g,C,N);default:if(ee)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),ee=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(L,g,C){return g===0&&C===L.length?me.fromByteArray(L):me.fromByteArray(L.slice(g,C))}function I(L,g,C){C=Math.min(L.length,C);for(var N=[],T=g;T<C;){var k=L[T],ee=null,be=k>239?4:k>223?3:k>191?2:1;if(T+be<=C){var Ue,Ye,We,St;switch(be){case 1:k<128&&(ee=k);break;case 2:Ue=L[T+1],(Ue&192)===128&&(St=(k&31)<<6|Ue&63,St>127&&(ee=St));break;case 3:Ue=L[T+1],Ye=L[T+2],(Ue&192)===128&&(Ye&192)===128&&(St=(k&15)<<12|(Ue&63)<<6|Ye&63,St>2047&&(St<55296||St>57343)&&(ee=St));break;case 4:Ue=L[T+1],Ye=L[T+2],We=L[T+3],(Ue&192)===128&&(Ye&192)===128&&(We&192)===128&&(St=(k&15)<<18|(Ue&63)<<12|(Ye&63)<<6|We&63,St>65535&&St<1114112&&(ee=St))}}ee===null?(ee=65533,be=1):ee>65535&&(ee-=65536,N.push(ee>>>10&1023|55296),ee=56320|ee&1023),N.push(ee),T+=be}return z(N)}var G=4096;function z(L){var g=L.length;if(g<=G)return String.fromCharCode.apply(String,L);for(var C="",N=0;N<g;)C+=String.fromCharCode.apply(String,L.slice(N,N+=G));return C}function se(L,g,C){var N="";C=Math.min(L.length,C);for(var T=g;T<C;++T)N+=String.fromCharCode(L[T]&127);return N}function re(L,g,C){var N="";C=Math.min(L.length,C);for(var T=g;T<C;++T)N+=String.fromCharCode(L[T]);return N}function E(L,g,C){var N=L.length;(!g||g<0)&&(g=0),(!C||C<0||C>N)&&(C=N);for(var T="",k=g;k<C;++k)T+=Be[L[k]];return T}function y(L,g,C){for(var N=L.slice(g,C),T="",k=0;k<N.length-1;k+=2)T+=String.fromCharCode(N[k]+N[k+1]*256);return T}O.prototype.slice=function(g,C){var N=this.length;g=~~g,C=C===void 0?N:~~C,g<0?(g+=N,g<0&&(g=0)):g>N&&(g=N),C<0?(C+=N,C<0&&(C=0)):C>N&&(C=N),C<g&&(C=g);var T=this.subarray(g,C);return Object.setPrototypeOf(T,O.prototype),T};function $(L,g,C){if(L%1!==0||L<0)throw new RangeError("offset is not uint");if(L+g>C)throw new RangeError("Trying to access beyond buffer length")}O.prototype.readUintLE=O.prototype.readUIntLE=function(g,C,N){g=g>>>0,C=C>>>0,N||$(g,C,this.length);for(var T=this[g],k=1,ee=0;++ee<C&&(k*=256);)T+=this[g+ee]*k;return T},O.prototype.readUintBE=O.prototype.readUIntBE=function(g,C,N){g=g>>>0,C=C>>>0,N||$(g,C,this.length);for(var T=this[g+--C],k=1;C>0&&(k*=256);)T+=this[g+--C]*k;return T},O.prototype.readUint8=O.prototype.readUInt8=function(g,C){return g=g>>>0,C||$(g,1,this.length),this[g]},O.prototype.readUint16LE=O.prototype.readUInt16LE=function(g,C){return g=g>>>0,C||$(g,2,this.length),this[g]|this[g+1]<<8},O.prototype.readUint16BE=O.prototype.readUInt16BE=function(g,C){return g=g>>>0,C||$(g,2,this.length),this[g]<<8|this[g+1]},O.prototype.readUint32LE=O.prototype.readUInt32LE=function(g,C){return g=g>>>0,C||$(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},O.prototype.readUint32BE=O.prototype.readUInt32BE=function(g,C){return g=g>>>0,C||$(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},O.prototype.readIntLE=function(g,C,N){g=g>>>0,C=C>>>0,N||$(g,C,this.length);for(var T=this[g],k=1,ee=0;++ee<C&&(k*=256);)T+=this[g+ee]*k;return k*=128,T>=k&&(T-=Math.pow(2,8*C)),T},O.prototype.readIntBE=function(g,C,N){g=g>>>0,C=C>>>0,N||$(g,C,this.length);for(var T=C,k=1,ee=this[g+--T];T>0&&(k*=256);)ee+=this[g+--T]*k;return k*=128,ee>=k&&(ee-=Math.pow(2,8*C)),ee},O.prototype.readInt8=function(g,C){return g=g>>>0,C||$(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},O.prototype.readInt16LE=function(g,C){g=g>>>0,C||$(g,2,this.length);var N=this[g]|this[g+1]<<8;return N&32768?N|4294901760:N},O.prototype.readInt16BE=function(g,C){g=g>>>0,C||$(g,2,this.length);var N=this[g+1]|this[g]<<8;return N&32768?N|4294901760:N},O.prototype.readInt32LE=function(g,C){return g=g>>>0,C||$(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},O.prototype.readInt32BE=function(g,C){return g=g>>>0,C||$(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},O.prototype.readFloatLE=function(g,C){return g=g>>>0,C||$(g,4,this.length),Fe.read(this,g,!0,23,4)},O.prototype.readFloatBE=function(g,C){return g=g>>>0,C||$(g,4,this.length),Fe.read(this,g,!1,23,4)},O.prototype.readDoubleLE=function(g,C){return g=g>>>0,C||$(g,8,this.length),Fe.read(this,g,!0,52,8)},O.prototype.readDoubleBE=function(g,C){return g=g>>>0,C||$(g,8,this.length),Fe.read(this,g,!1,52,8)};function Ae(L,g,C,N,T,k){if(!O.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>T||g<k)throw new RangeError('"value" argument is out of bounds');if(C+N>L.length)throw new RangeError("Index out of range")}O.prototype.writeUintLE=O.prototype.writeUIntLE=function(g,C,N,T){if(g=+g,C=C>>>0,N=N>>>0,!T){var k=Math.pow(2,8*N)-1;Ae(this,g,C,N,k,0)}var ee=1,be=0;for(this[C]=g&255;++be<N&&(ee*=256);)this[C+be]=g/ee&255;return C+N},O.prototype.writeUintBE=O.prototype.writeUIntBE=function(g,C,N,T){if(g=+g,C=C>>>0,N=N>>>0,!T){var k=Math.pow(2,8*N)-1;Ae(this,g,C,N,k,0)}var ee=N-1,be=1;for(this[C+ee]=g&255;--ee>=0&&(be*=256);)this[C+ee]=g/be&255;return C+N},O.prototype.writeUint8=O.prototype.writeUInt8=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,1,255,0),this[C]=g&255,C+1},O.prototype.writeUint16LE=O.prototype.writeUInt16LE=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,2,65535,0),this[C]=g&255,this[C+1]=g>>>8,C+2},O.prototype.writeUint16BE=O.prototype.writeUInt16BE=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,2,65535,0),this[C]=g>>>8,this[C+1]=g&255,C+2},O.prototype.writeUint32LE=O.prototype.writeUInt32LE=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,4,4294967295,0),this[C+3]=g>>>24,this[C+2]=g>>>16,this[C+1]=g>>>8,this[C]=g&255,C+4},O.prototype.writeUint32BE=O.prototype.writeUInt32BE=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,4,4294967295,0),this[C]=g>>>24,this[C+1]=g>>>16,this[C+2]=g>>>8,this[C+3]=g&255,C+4},O.prototype.writeIntLE=function(g,C,N,T){if(g=+g,C=C>>>0,!T){var k=Math.pow(2,8*N-1);Ae(this,g,C,N,k-1,-k)}var ee=0,be=1,Ue=0;for(this[C]=g&255;++ee<N&&(be*=256);)g<0&&Ue===0&&this[C+ee-1]!==0&&(Ue=1),this[C+ee]=(g/be>>0)-Ue&255;return C+N},O.prototype.writeIntBE=function(g,C,N,T){if(g=+g,C=C>>>0,!T){var k=Math.pow(2,8*N-1);Ae(this,g,C,N,k-1,-k)}var ee=N-1,be=1,Ue=0;for(this[C+ee]=g&255;--ee>=0&&(be*=256);)g<0&&Ue===0&&this[C+ee+1]!==0&&(Ue=1),this[C+ee]=(g/be>>0)-Ue&255;return C+N},O.prototype.writeInt8=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,1,127,-128),g<0&&(g=255+g+1),this[C]=g&255,C+1},O.prototype.writeInt16LE=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,2,32767,-32768),this[C]=g&255,this[C+1]=g>>>8,C+2},O.prototype.writeInt16BE=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,2,32767,-32768),this[C]=g>>>8,this[C+1]=g&255,C+2},O.prototype.writeInt32LE=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,4,2147483647,-2147483648),this[C]=g&255,this[C+1]=g>>>8,this[C+2]=g>>>16,this[C+3]=g>>>24,C+4},O.prototype.writeInt32BE=function(g,C,N){return g=+g,C=C>>>0,N||Ae(this,g,C,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[C]=g>>>24,this[C+1]=g>>>16,this[C+2]=g>>>8,this[C+3]=g&255,C+4};function Ge(L,g,C,N,T,k){if(C+N>L.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("Index out of range")}function Je(L,g,C,N,T){return g=+g,C=C>>>0,T||Ge(L,g,C,4,34028234663852886e22,-34028234663852886e22),Fe.write(L,g,C,N,23,4),C+4}O.prototype.writeFloatLE=function(g,C,N){return Je(this,g,C,!0,N)},O.prototype.writeFloatBE=function(g,C,N){return Je(this,g,C,!1,N)};function yt(L,g,C,N,T){return g=+g,C=C>>>0,T||Ge(L,g,C,8,17976931348623157e292,-17976931348623157e292),Fe.write(L,g,C,N,52,8),C+8}O.prototype.writeDoubleLE=function(g,C,N){return yt(this,g,C,!0,N)},O.prototype.writeDoubleBE=function(g,C,N){return yt(this,g,C,!1,N)},O.prototype.copy=function(g,C,N,T){if(!O.isBuffer(g))throw new TypeError("argument should be a Buffer");if(N||(N=0),!T&&T!==0&&(T=this.length),C>=g.length&&(C=g.length),C||(C=0),T>0&&T<N&&(T=N),T===N||g.length===0||this.length===0)return 0;if(C<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),g.length-C<T-N&&(T=g.length-C+N);var k=T-N;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(C,N,T):Uint8Array.prototype.set.call(g,this.subarray(N,T),C),k},O.prototype.fill=function(g,C,N,T){if(typeof g=="string"){if(typeof C=="string"?(T=C,C=0,N=this.length):typeof N=="string"&&(T=N,N=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!O.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(g.length===1){var k=g.charCodeAt(0);(T==="utf8"&&k<128||T==="latin1")&&(g=k)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(C<0||this.length<C||this.length<N)throw new RangeError("Out of range index");if(N<=C)return this;C=C>>>0,N=N===void 0?this.length:N>>>0,g||(g=0);var ee;if(typeof g=="number")for(ee=C;ee<N;++ee)this[ee]=g;else{var be=O.isBuffer(g)?g:O.from(g,T),Ue=be.length;if(Ue===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(ee=0;ee<N-C;++ee)this[ee+C]=be[ee%Ue]}return this};var dt=/[^+/0-9A-Za-z-_]/g;function Rt(L){if(L=L.split("=")[0],L=L.trim().replace(dt,""),L.length<2)return"";for(;L.length%4!==0;)L=L+"=";return L}function bt(L,g){g=g||1/0;for(var C,N=L.length,T=null,k=[],ee=0;ee<N;++ee){if(C=L.charCodeAt(ee),C>55295&&C<57344){if(!T){if(C>56319){(g-=3)>-1&&k.push(239,191,189);continue}else if(ee+1===N){(g-=3)>-1&&k.push(239,191,189);continue}T=C;continue}if(C<56320){(g-=3)>-1&&k.push(239,191,189),T=C;continue}C=(T-55296<<10|C-56320)+65536}else T&&(g-=3)>-1&&k.push(239,191,189);if(T=null,C<128){if((g-=1)<0)break;k.push(C)}else if(C<2048){if((g-=2)<0)break;k.push(C>>6|192,C&63|128)}else if(C<65536){if((g-=3)<0)break;k.push(C>>12|224,C>>6&63|128,C&63|128)}else if(C<1114112){if((g-=4)<0)break;k.push(C>>18|240,C>>12&63|128,C>>6&63|128,C&63|128)}else throw new Error("Invalid code point")}return k}function ht(L){for(var g=[],C=0;C<L.length;++C)g.push(L.charCodeAt(C)&255);return g}function Le(L,g){for(var C,N,T,k=[],ee=0;ee<L.length&&!((g-=2)<0);++ee)C=L.charCodeAt(ee),N=C>>8,T=C%256,k.push(T),k.push(N);return k}function nt(L){return me.toByteArray(Rt(L))}function Ie(L,g,C,N){for(var T=0;T<N&&!(T+C>=g.length||T>=L.length);++T)g[T+C]=L[T];return T}function wt(L,g){return L instanceof g||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===g.name}function Lt(L){return L!==L}var Be=function(){for(var L="0123456789abcdef",g=new Array(256),C=0;C<16;++C)for(var N=C*16,T=0;T<16;++T)g[N+T]=L[C]+L[T];return g}()},64018:function(){var gr,mt,K,V=!1,me,Fe;window.PR_SHOULD_USE_CONTINUATION=!0;var he,W;(function(){var m=window,ge=["break,continue,do,else,for,if,return,while"],O=[ge,"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"],u=[O,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],J=[u,"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"],D=[u,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],B=[u,"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"],_="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",w=[u,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],x="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",Y=[ge,"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"],M=[ge,"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"],H=[ge,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=[J,B,D,w,x,Y,M,H],P=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,X="str",ce="kwd",_e="com",we="typ",ne="lit",ve="pun",Oe="pln",le="tag",Me="dec",Z="src",I="atn",G="atv",z="nocode",se="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function re(L){for(var g=0,C=!1,N=!1,T=0,k=L.length;T<k;++T){var ee=L[T];if(ee.ignoreCase)N=!0;else if(/[a-z]/i.test(ee.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){C=!0,N=!1;break}}var be={b:8,t:9,n:10,v:11,f:12,r:13};function Ue(ut){var At=ut.charCodeAt(0);if(At!==92)return At;var it=ut.charAt(1);return At=be[it],At||("0"<=it&&it<="7"?parseInt(ut.substring(1),8):it==="u"||it==="x"?parseInt(ut.substring(2),16):ut.charCodeAt(1))}function Ye(ut){if(ut<32)return(ut<16?"\\x0":"\\x")+ut.toString(16);var At=String.fromCharCode(ut);return At==="\\"||At==="-"||At==="]"||At==="^"?"\\"+At:At}function We(ut){var At=ut.substring(1,ut.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")),it=[],Ne=At[0]==="^",Ze=["["];Ne&&Ze.push("^");for(var lt=Ne?1:0,vt=At.length;lt<vt;++lt){var Ot=At[lt];if(/\\[bdsw]/i.test(Ot))Ze.push(Ot);else{var Ct=Ue(Ot),Wt;lt+2<vt&&At[lt+1]==="-"?(Wt=Ue(At[lt+2]),lt+=2):Wt=Ct,it.push([Ct,Wt]),Wt<65||Ct>122||(Wt<65||Ct>90||it.push([Math.max(65,Ct)|32,Math.min(Wt,90)|32]),Wt<97||Ct>122||it.push([Math.max(97,Ct)&-33,Math.min(Wt,122)&-33]))}}it.sort(function(Rr,It){return Rr[0]-It[0]||It[1]-Rr[1]});for(var Nt=[],Xt=[],lt=0;lt<it.length;++lt){var fr=it[lt];fr[0]<=Xt[1]+1?Xt[1]=Math.max(Xt[1],fr[1]):Nt.push(Xt=fr)}for(var lt=0;lt<Nt.length;++lt){var fr=Nt[lt];Ze.push(Ye(fr[0])),fr[1]>fr[0]&&(fr[1]+1>fr[0]&&Ze.push("-"),Ze.push(Ye(fr[1])))}return Ze.push("]"),Ze.join("")}function St(ut){for(var At=ut.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")),it=At.length,Ne=[],Ze=0,lt=0;Ze<it;++Ze){var vt=At[Ze];if(vt==="(")++lt;else if(vt.charAt(0)==="\\"){var Ot=+vt.substring(1);Ot&&(Ot<=lt?Ne[Ot]=-1:At[Ze]=Ye(Ot))}}for(var Ze=1;Ze<Ne.length;++Ze)Ne[Ze]===-1&&(Ne[Ze]=++g);for(var Ze=0,lt=0;Ze<it;++Ze){var vt=At[Ze];if(vt==="(")++lt,Ne[lt]||(At[Ze]="(?:");else if(vt.charAt(0)==="\\"){var Ot=+vt.substring(1);Ot&&Ot<=lt&&(At[Ze]="\\"+Ne[Ot])}}for(var Ze=0;Ze<it;++Ze)At[Ze]==="^"&&At[Ze+1]!=="^"&&(At[Ze]="");if(ut.ignoreCase&&C)for(var Ze=0;Ze<it;++Ze){var vt=At[Ze],Ct=vt.charAt(0);vt.length>=2&&Ct==="["?At[Ze]=We(vt):Ct!=="\\"&&(At[Ze]=vt.replace(/[a-zA-Z]/g,function(Xt){var fr=Xt.charCodeAt(0);return"["+String.fromCharCode(fr&-33,fr|32)+"]"}))}return At.join("")}for(var Xe=[],T=0,k=L.length;T<k;++T){var ee=L[T];if(ee.global||ee.multiline)throw new Error(""+ee);Xe.push("(?:"+St(ee)+")")}return new RegExp(Xe.join("|"),N?"gi":"g")}function E(L,g){var C=/(?:^|\s)nocode(?:\s|$)/,N=[],T=0,k=[],ee=0;function be(Ue){var Ye=Ue.nodeType;if(Ye==1){if(C.test(Ue.className))return;for(var We=Ue.firstChild;We;We=We.nextSibling)be(We);var St=Ue.nodeName.toLowerCase();(St==="br"||St==="li")&&(N[ee]=`
`,k[ee<<1]=T++,k[ee++<<1|1]=Ue)}else if(Ye==3||Ye==4){var Xe=Ue.nodeValue;Xe.length&&(g?Xe=Xe.replace(/\r\n?/g,`
`):Xe=Xe.replace(/[ \t\r\n]+/g," "),N[ee]=Xe,k[ee<<1]=T,T+=Xe.length,k[ee++<<1|1]=Ue)}}return be(L),{sourceCode:N.join("").replace(/\n$/,""),spans:k}}function y(L,g,C,N,T){if(C){var k={sourceNode:L,pre:1,langExtension:null,numberLines:null,sourceCode:C,spans:null,basePos:g,decorations:null};N(k),T.push.apply(T,k.decorations)}}var $=/\S/;function Ae(L){for(var g=void 0,C=L.firstChild;C;C=C.nextSibling){var N=C.nodeType;g=N===1?g?L:C:N===3&&$.test(C.nodeValue)?L:g}return g===L?void 0:g}function Ge(L,g){var C={},N;(function(){for(var ee=L.concat(g),be=[],Ue={},Ye=0,We=ee.length;Ye<We;++Ye){var St=ee[Ye],Xe=St[3];if(Xe)for(var ut=Xe.length;--ut>=0;)C[Xe.charAt(ut)]=St;var At=St[1],it=""+At;Ue.hasOwnProperty(it)||(be.push(At),Ue[it]=null)}be.push(/[\0-\uffff]/),N=re(be)})();var T=g.length,k=function(ee){for(var be=ee.sourceCode,Ue=ee.basePos,Ye=ee.sourceNode,We=[Ue,Oe],St=0,Xe=be.match(N)||[],ut={},At=0,it=Xe.length;At<it;++At){var Ne=Xe[At],Ze=ut[Ne],lt=void 0,vt;if(typeof Ze=="string")vt=!1;else{var Ot=C[Ne.charAt(0)];if(Ot)lt=Ne.match(Ot[1]),Ze=Ot[0];else{for(var Ct=0;Ct<T;++Ct)if(Ot=g[Ct],lt=Ne.match(Ot[1]),lt){Ze=Ot[0];break}lt||(Ze=Oe)}vt=Ze.length>=5&&Ze.substring(0,5)==="lang-",vt&&!(lt&&typeof lt[1]=="string")&&(vt=!1,Ze=Z),vt||(ut[Ne]=Ze)}var Wt=St;if(St+=Ne.length,!vt)We.push(Ue+Wt,Ze);else{var Nt=lt[1],Xt=Ne.indexOf(Nt),fr=Xt+Nt.length;lt[2]&&(fr=Ne.length-lt[2].length,Xt=fr-Nt.length);var Rr=Ze.substring(5);y(Ye,Ue+Wt,Ne.substring(0,Xt),k,We),y(Ye,Ue+Wt+Xt,Nt,Le(Rr,Nt),We),y(Ye,Ue+Wt+fr,Ne.substring(fr),k,We)}}ee.decorations=We};return k}function Je(L){var g=[],C=[];L.tripleQuotedStrings?g.push([X,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):L.multiLineStrings?g.push([X,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):g.push([X,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),L.verbatimStrings&&C.push([X,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var N=L.hashComments;N&&(L.cStyleComments?(N>1?g.push([_e,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):g.push([_e,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),C.push([X,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):g.push([_e,/^#[^\r\n]*/,null,"#"])),L.cStyleComments&&(C.push([_e,/^\/\/[^\r\n]*/,null]),C.push([_e,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var T=L.regexLiterals;if(T){var k=T>1?"":`
\r`,ee=k?".":"[\\S\\s]",be="/(?=[^/*"+k+"])(?:[^/\\x5B\\x5C"+k+"]|\\x5C"+ee+"|\\x5B(?:[^\\x5C\\x5D"+k+"]|\\x5C"+ee+")*(?:\\x5D|$))+/";C.push(["lang-regex",RegExp("^"+se+"("+be+")")])}var Ue=L.types;Ue&&C.push([we,Ue]);var Ye=(""+L.keywords).replace(/^ | $/g,"");Ye.length&&C.push([ce,new RegExp("^(?:"+Ye.replace(/[\s,]+/g,"|")+")\\b"),null]),g.push([Oe,/^\s+/,null,` \r
\xA0`]);var We="^.[^\\s\\w.$@'\"`/\\\\]*";return L.regexLiterals&&(We+="(?!s*/)"),C.push([ne,/^@[a-z_$][a-z_$@0-9]*/i,null],[we,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Oe,/^[a-z_$][a-z_$@0-9]*/i,null],[ne,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Oe,/^\\[\s\S]?/,null],[ve,new RegExp(We),null]),Ge(g,C)}var yt=Je({keywords:Q,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function dt(L,g,C){for(var N=/(?:^|\s)nocode(?:\s|$)/,T=/\r\n?|\n/,k=L.ownerDocument,ee=k.createElement("li");L.firstChild;)ee.appendChild(L.firstChild);var be=[ee];function Ue(At){var it=At.nodeType;if(it==1&&!N.test(At.className))if(At.nodeName==="br")Ye(At),At.parentNode&&At.parentNode.removeChild(At);else for(var Ne=At.firstChild;Ne;Ne=Ne.nextSibling)Ue(Ne);else if((it==3||it==4)&&C){var Ze=At.nodeValue,lt=Ze.match(T);if(lt){var vt=Ze.substring(0,lt.index);At.nodeValue=vt;var Ot=Ze.substring(lt.index+lt[0].length);if(Ot){var Ct=At.parentNode;Ct.insertBefore(k.createTextNode(Ot),At.nextSibling)}Ye(At),vt||At.parentNode.removeChild(At)}}}function Ye(At){for(;!At.nextSibling;)if(At=At.parentNode,!At)return;function it(lt,vt){var Ot=vt?lt.cloneNode(!1):lt,Ct=lt.parentNode;if(Ct){var Wt=it(Ct,1),Nt=lt.nextSibling;Wt.appendChild(Ot);for(var Xt=Nt;Xt;Xt=Nt)Nt=Xt.nextSibling,Wt.appendChild(Xt)}return Ot}for(var Ne=it(At.nextSibling,0),Ze;(Ze=Ne.parentNode)&&Ze.nodeType===1;)Ne=Ze;be.push(Ne)}for(var We=0;We<be.length;++We)Ue(be[We]);g===(g|0)&&be[0].setAttribute("value",g);var St=k.createElement("ol");St.className="linenums";for(var Xe=Math.max(0,g-1|0)||0,We=0,ut=be.length;We<ut;++We)ee=be[We],ee.className="L"+(We+Xe)%10,ee.firstChild||ee.appendChild(k.createTextNode("\xA0")),St.appendChild(ee);L.appendChild(St)}function Rt(L){var g=/\bMSIE\s(\d+)/.exec(navigator.userAgent);g=g&&+g[1]<=8;var C=/\n/g,N=L.sourceCode,T=N.length,k=0,ee=L.spans,be=ee.length,Ue=0,Ye=L.decorations,We=Ye.length,St=0;Ye[We]=T;var Xe,ut;for(ut=Xe=0;ut<We;)Ye[ut]!==Ye[ut+2]?(Ye[Xe++]=Ye[ut++],Ye[Xe++]=Ye[ut++]):ut+=2;for(We=Xe,ut=Xe=0;ut<We;){for(var At=Ye[ut],it=Ye[ut+1],Ne=ut+2;Ne+2<=We&&Ye[Ne+1]===it;)Ne+=2;Ye[Xe++]=At,Ye[Xe++]=it,ut=Ne}We=Ye.length=Xe;var Ze=L.sourceNode,lt="";Ze&&(lt=Ze.style.display,Ze.style.display="none");try{for(var vt=null;Ue<be;){var Ot=ee[Ue],Ct=ee[Ue+2]||T,Wt=Ye[St+2]||T,Ne=Math.min(Ct,Wt),Nt=ee[Ue+1],Xt;if(Nt.nodeType!==1&&(Xt=N.substring(k,Ne))){g&&(Xt=Xt.replace(C,"\r")),Nt.nodeValue=Xt;var fr=Nt.ownerDocument,Rr=fr.createElement("span");Rr.className=Ye[St+1];var It=Nt.parentNode;It.replaceChild(Rr,Nt),Rr.appendChild(Nt),k<Ct&&(ee[Ue+1]=Nt=fr.createTextNode(N.substring(Ne,Ct)),It.insertBefore(Nt,Rr.nextSibling))}k=Ne,k>=Ct&&(Ue+=2),k>=Wt&&(St+=2)}}finally{Ze&&(Ze.style.display=lt)}}var bt={};function ht(L,g){for(var C=g.length;--C>=0;){var N=g[C];bt.hasOwnProperty(N)?m.console&&console.warn("cannot override language handler %s",N):bt[N]=L}}function Le(L,g){return L&&bt.hasOwnProperty(L)||(L=/^\s*</.test(g)?"default-markup":"default-code"),bt[L]}ht(yt,["default-code"]),ht(Ge([],[[Oe,/^[^<?]+/],[Me,/^<!\w[^>]*(?:>|$)/],[_e,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ve,/^(?:<[%?]|[%?]>)/],["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"]),ht(Ge([[Oe,/^[\s]+/,null,` \r
`],[G,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[le,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ve,/^[=<>\/]+/],["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"]),ht(Ge([],[[G,/^[\s\S]+/]]),["uq.val"]),ht(Je({keywords:J,hashComments:!0,cStyleComments:!0,types:P}),["c","cc","cpp","cxx","cyc","m"]),ht(Je({keywords:"null,true,false"}),["json"]),ht(Je({keywords:B,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:P}),["cs"]),ht(Je({keywords:D,cStyleComments:!0}),["java"]),ht(Je({keywords:H,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ht(Je({keywords:Y,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ht(Je({keywords:x,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ht(Je({keywords:M,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ht(Je({keywords:w,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ht(Je({keywords:_,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ht(Ge([],[[X,/^[\s\S]+/]]),["regex"]);function nt(L){var g=L.langExtension;try{var C=E(L.sourceNode,L.pre),N=C.sourceCode;L.sourceCode=N,L.spans=C.spans,L.basePos=0,Le(g,N)(L),Rt(L)}catch(T){m.console&&console.log(T&&T.stack||T)}}function Ie(L,g,C){var N=C||!1,T=g||null,k=document.createElement("div");k.innerHTML="<pre>"+L+"</pre>",k=k.firstChild,N&&dt(k,N,!0);var ee={langExtension:T,numberLines:N,sourceNode:k,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return nt(ee),k.innerHTML}function wt(L,g){var C=g||document.body,N=C.ownerDocument||document;function T(Ot){return C.getElementsByTagName(Ot)}for(var k=[T("pre"),T("code"),T("xmp")],ee=[],be=0;be<k.length;++be)for(var Ue=0,Ye=k[be].length;Ue<Ye;++Ue)ee.push(k[be][Ue]);k=null;var We=Date;We.now||(We={now:function(){return+new Date}});var St=0,Xe=/\blang(?:uage)?-([\w.]+)(?!\S)/,ut=/\bprettyprint\b/,At=/\bprettyprinted\b/,it=/pre|xmp/i,Ne=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,lt={};function vt(){for(var Ot=m.PR_SHOULD_USE_CONTINUATION?We.now()+250:1/0;St<ee.length&&We.now()<Ot;St++){for(var Ct=ee[St],Wt=lt,Nt=Ct;Nt=Nt.previousSibling;){var Xt=Nt.nodeType,fr=(Xt===7||Xt===8)&&Nt.nodeValue;if(fr?!/^\??prettify\b/.test(fr):Xt!==3||/\S/.test(Nt.nodeValue))break;if(fr){Wt={},fr.replace(/\b(\w+)=([\w:.%+-]+)/g,function(gt,qe,Ht){Wt[qe]=Ht});break}}var Rr=Ct.className;if((Wt!==lt||ut.test(Rr))&&!At.test(Rr)){for(var It=!1,jt=Ct.parentNode;jt;jt=jt.parentNode){var Re=jt.tagName;if(Ze.test(Re)&&jt.className&&ut.test(jt.className)){It=!0;break}}if(!It){Ct.className+=" prettyprinted";var Ce=Wt.lang;if(!Ce){Ce=Rr.match(Xe);var Ee;!Ce&&(Ee=Ae(Ct))&&Ne.test(Ee.tagName)&&(Ce=Ee.className.match(Xe)),Ce&&(Ce=Ce[1])}var j;if(it.test(Ct.tagName))j=1;else{var ie=Ct.currentStyle,ae=N.defaultView,de=ie?ie.whiteSpace:ae&&ae.getComputedStyle?ae.getComputedStyle(Ct,null).getPropertyValue("white-space"):0;j=de&&de.substring(0,3)==="pre"}var Se=Wt.linenums;(Se=Se==="true"||+Se)||(Se=Rr.match(/\blinenums\b(?::(\d+))?/),Se=Se?Se[1]&&Se[1].length?+Se[1]:!0:!1),Se&&dt(Ct,Se,j);var xt={langExtension:Ce,sourceNode:Ct,numberLines:Se,pre:j,sourceCode:null,basePos:null,spans:null,decorations:null};nt(xt)}}}St<ee.length?m.setTimeout(vt,250):typeof L=="function"&&L()}vt()}var Lt=m.PR={createSimpleLexer:Ge,registerLangHandler:ht,sourceDecorator:Je,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:G,PR_COMMENT:_e,PR_DECLARATION:Me,PR_KEYWORD:ce,PR_LITERAL:ne,PR_NOCODE:z,PR_PLAIN:Oe,PR_PUNCTUATION:ve,PR_SOURCE:Z,PR_STRING:X,PR_TAG:le,PR_TYPE:we,prettyPrintOne:V?m.prettyPrintOne=Ie:he=Ie,prettyPrint:W=V?m.prettyPrint=wt:W=wt},Be=m.define;typeof Be=="function"&&Be.amd&&Be("google-code-prettify",[],function(){return Lt})})()},25769:function(gr,mt,K){"use strict";var V=K(98040),me={"text/plain":"Text","text/html":"Url",default:"Text"},Fe="Copy to clipboard: #{key}, Enter";function he(m){var ge=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return m.replace(/#{\s*key\s*}/g,ge)}function W(m,ge){var O,u,J,D,B,_,w=!1;ge||(ge={}),O=ge.debug||!1;try{J=V(),D=document.createRange(),B=document.getSelection(),_=document.createElement("span"),_.textContent=m,_.ariaHidden="true",_.style.all="unset",_.style.position="fixed",_.style.top=0,_.style.clip="rect(0, 0, 0, 0)",_.style.whiteSpace="pre",_.style.webkitUserSelect="text",_.style.MozUserSelect="text",_.style.msUserSelect="text",_.style.userSelect="text",_.addEventListener("copy",function(Y){if(Y.stopPropagation(),ge.format)if(Y.preventDefault(),typeof Y.clipboardData=="undefined"){O&&console.warn("unable to use e.clipboardData"),O&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var M=me[ge.format]||me.default;window.clipboardData.setData(M,m)}else Y.clipboardData.clearData(),Y.clipboardData.setData(ge.format,m);ge.onCopy&&(Y.preventDefault(),ge.onCopy(Y.clipboardData))}),document.body.appendChild(_),D.selectNodeContents(_),B.addRange(D);var x=document.execCommand("copy");if(!x)throw new Error("copy command was unsuccessful");w=!0}catch(Y){O&&console.error("unable to copy using execCommand: ",Y),O&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ge.format||"text",m),ge.onCopy&&ge.onCopy(window.clipboardData),w=!0}catch(M){O&&console.error("unable to copy using clipboardData: ",M),O&&console.error("falling back to prompt"),u=he("message"in ge?ge.message:Fe),window.prompt(u,m)}}finally{B&&(typeof B.removeRange=="function"?B.removeRange(D):B.removeAllRanges()),_&&document.body.removeChild(_),J()}return w}gr.exports=W},6330:function(gr,mt,K){"use strict";K.d(mt,{HT:function(){return De},iZ:function(){return Gt}});var V={},me=function(U,R,q,ue,Qe){var He=new Worker(V[R]||(V[R]=URL.createObjectURL(new Blob([U+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return He.onmessage=function(rt){var et=rt.data,Ft=et.$e$;if(Ft){var pt=new Error(Ft[0]);pt.code=Ft[1],pt.stack=Ft[2],Qe(pt,null)}else Qe(null,et)},He.postMessage(q,ue),He},Fe=Uint8Array,he=Uint16Array,W=Int32Array,m=new Fe([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]),ge=new Fe([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]),O=new Fe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(U,R){for(var q=new he(31),ue=0;ue<31;++ue)q[ue]=R+=1<<U[ue-1];for(var Qe=new W(q[30]),ue=1;ue<30;++ue)for(var He=q[ue];He<q[ue+1];++He)Qe[He]=He-q[ue]<<5|ue;return{b:q,r:Qe}},J=u(m,2),D=J.b,B=J.r;D[28]=258,B[258]=28;for(var _=u(ge,0),w=_.b,x=_.r,Y=new he(32768),M=0;M<32768;++M){var H=(M&43690)>>1|(M&21845)<<1;H=(H&52428)>>2|(H&13107)<<2,H=(H&61680)>>4|(H&3855)<<4,Y[M]=((H&65280)>>8|(H&255)<<8)>>1}for(var Q=function(U,R,q){for(var ue=U.length,Qe=0,He=new he(R);Qe<ue;++Qe)U[Qe]&&++He[U[Qe]-1];var rt=new he(R);for(Qe=1;Qe<R;++Qe)rt[Qe]=rt[Qe-1]+He[Qe-1]<<1;var et;if(q){et=new he(1<<R);var Ft=15-R;for(Qe=0;Qe<ue;++Qe)if(U[Qe])for(var pt=Qe<<4|U[Qe],ye=R-U[Qe],je=rt[U[Qe]-1]++<<ye,ct=je|(1<<ye)-1;je<=ct;++je)et[Y[je]>>Ft]=pt}else for(et=new he(ue),Qe=0;Qe<ue;++Qe)U[Qe]&&(et[Qe]=Y[rt[U[Qe]-1]++]>>15-U[Qe]);return et},P=new Fe(288),M=0;M<144;++M)P[M]=8;for(var M=144;M<256;++M)P[M]=9;for(var M=256;M<280;++M)P[M]=7;for(var M=280;M<288;++M)P[M]=8;for(var X=new Fe(32),M=0;M<32;++M)X[M]=5;var ce=Q(P,9,0),_e=Q(P,9,1),we=Q(X,5,0),ne=Q(X,5,1),ve=function(U){for(var R=U[0],q=1;q<U.length;++q)U[q]>R&&(R=U[q]);return R},Oe=function(U,R,q){var ue=R/8|0;return(U[ue]|U[ue+1]<<8)>>(R&7)&q},le=function(U,R){var q=R/8|0;return(U[q]|U[q+1]<<8|U[q+2]<<16)>>(R&7)},Me=function(U){return(U+7)/8|0},Z=function(U,R,q){return(R==null||R<0)&&(R=0),(q==null||q>U.length)&&(q=U.length),new Fe(U.subarray(R,q))},I={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},G=["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"],z=function(U,R,q){var ue=new Error(R||G[U]);if(ue.code=U,Error.captureStackTrace&&Error.captureStackTrace(ue,z),!q)throw ue;return ue},se=function(U,R,q,ue){var Qe=U.length,He=ue?ue.length:0;if(!Qe||R.f&&!R.l)return q||new Fe(0);var rt=!q,et=rt||R.i!=2,Ft=R.i;rt&&(q=new Fe(Qe*3));var pt=function(Gn){var Ln=q.length;if(Gn>Ln){var Zn=new Fe(Math.max(Ln*2,Gn));Zn.set(q),q=Zn}},ye=R.f||0,je=R.p||0,ct=R.b||0,zt=R.l,Vt=R.d,Et=R.m,Mt=R.n,Yt=Qe*8;do{if(!zt){ye=Oe(U,je,1);var sr=Oe(U,je+1,3);if(je+=3,sr)if(sr==1)zt=_e,Vt=ne,Et=9,Mt=5;else if(sr==2){var ur=Oe(U,je,31)+257,Dr=Oe(U,je+10,15)+4,pr=ur+Oe(U,je+5,31)+1;je+=14;for(var tr=new Fe(pr),Hr=new Fe(19),vr=0;vr<Dr;++vr)Hr[O[vr]]=Oe(U,je+vr*3,7);je+=Dr*3;for(var Lr=ve(Hr),zr=(1<<Lr)-1,Gr=Q(Hr,Lr,1),vr=0;vr<pr;){var jr=Gr[Oe(U,je,zr)];je+=jr&15;var ir=jr>>4;if(ir<16)tr[vr++]=ir;else{var Vr=0,dr=0;for(ir==16?(dr=3+Oe(U,je,3),je+=2,Vr=tr[vr-1]):ir==17?(dr=3+Oe(U,je,7),je+=3):ir==18&&(dr=11+Oe(U,je,127),je+=7);dr--;)tr[vr++]=Vr}}var Yr=tr.subarray(0,ur),Kr=tr.subarray(ur);Et=ve(Yr),Mt=ve(Kr),zt=Q(Yr,Et,1),Vt=Q(Kr,Mt,1)}else z(1);else{var ir=Me(je)+4,$t=U[ir-4]|U[ir-3]<<8,mr=ir+$t;if(mr>Qe){Ft&&z(0);break}et&&pt(ct+$t),q.set(U.subarray(ir,mr),ct),R.b=ct+=$t,R.p=je=mr*8,R.f=ye;continue}if(je>Yt){Ft&&z(0);break}}et&&pt(ct+131072);for(var gn=(1<<Et)-1,qr=(1<<Mt)-1,qt=je;;qt=je){var Vr=zt[le(U,je)&gn],hn=Vr>>4;if(je+=Vr&15,je>Yt){Ft&&z(0);break}if(Vr||z(2),hn<256)q[ct++]=hn;else if(hn==256){qt=je,zt=null;break}else{var ln=hn-254;if(hn>264){var vr=hn-257,tn=m[vr];ln=Oe(U,je,(1<<tn)-1)+D[vr],je+=tn}var xn=Vt[le(U,je)&qr],$n=xn>>4;xn||z(3),je+=xn&15;var Kr=w[$n];if($n>3){var tn=ge[$n];Kr+=le(U,je)&(1<<tn)-1,je+=tn}if(je>Yt){Ft&&z(0);break}et&&pt(ct+131072);var On=ct+ln;if(ct<Kr){var Xn=He-Kr,Xr=Math.min(Kr,On);for(Xn+ct<0&&z(3);ct<Xr;++ct)q[ct]=ue[Xn+ct]}for(;ct<On;++ct)q[ct]=q[ct-Kr]}}R.l=zt,R.p=qt,R.b=ct,R.f=ye,zt&&(ye=1,R.m=Et,R.d=Vt,R.n=Mt)}while(!ye);return ct!=q.length&&rt?Z(q,0,ct):q.subarray(0,ct)},re=function(U,R,q){q<<=R&7;var ue=R/8|0;U[ue]|=q,U[ue+1]|=q>>8},E=function(U,R,q){q<<=R&7;var ue=R/8|0;U[ue]|=q,U[ue+1]|=q>>8,U[ue+2]|=q>>16},y=function(U,R){for(var q=[],ue=0;ue<U.length;++ue)U[ue]&&q.push({s:ue,f:U[ue]});var Qe=q.length,He=q.slice();if(!Qe)return{t:Rt,l:0};if(Qe==1){var rt=new Fe(q[0].s+1);return rt[q[0].s]=1,{t:rt,l:1}}q.sort(function(mr,ur){return mr.f-ur.f}),q.push({s:-1,f:25001});var et=q[0],Ft=q[1],pt=0,ye=1,je=2;for(q[0]={s:-1,f:et.f+Ft.f,l:et,r:Ft};ye!=Qe-1;)et=q[q[pt].f<q[je].f?pt++:je++],Ft=q[pt!=ye&&q[pt].f<q[je].f?pt++:je++],q[ye++]={s:-1,f:et.f+Ft.f,l:et,r:Ft};for(var ct=He[0].s,ue=1;ue<Qe;++ue)He[ue].s>ct&&(ct=He[ue].s);var zt=new he(ct+1),Vt=$(q[ye-1],zt,0);if(Vt>R){var ue=0,Et=0,Mt=Vt-R,Yt=1<<Mt;for(He.sort(function(ur,Dr){return zt[Dr.s]-zt[ur.s]||ur.f-Dr.f});ue<Qe;++ue){var sr=He[ue].s;if(zt[sr]>R)Et+=Yt-(1<<Vt-zt[sr]),zt[sr]=R;else break}for(Et>>=Mt;Et>0;){var ir=He[ue].s;zt[ir]<R?Et-=1<<R-zt[ir]++-1:++ue}for(;ue>=0&&Et;--ue){var $t=He[ue].s;zt[$t]==R&&(--zt[$t],++Et)}Vt=R}return{t:new Fe(zt),l:Vt}},$=function(U,R,q){return U.s==-1?Math.max($(U.l,R,q+1),$(U.r,R,q+1)):R[U.s]=q},Ae=function(U){for(var R=U.length;R&&!U[--R];);for(var q=new he(++R),ue=0,Qe=U[0],He=1,rt=function(Ft){q[ue++]=Ft},et=1;et<=R;++et)if(U[et]==Qe&&et!=R)++He;else{if(!Qe&&He>2){for(;He>138;He-=138)rt(32754);He>2&&(rt(He>10?He-11<<5|28690:He-3<<5|12305),He=0)}else if(He>3){for(rt(Qe),--He;He>6;He-=6)rt(8304);He>2&&(rt(He-3<<5|8208),He=0)}for(;He--;)rt(Qe);He=1,Qe=U[et]}return{c:q.subarray(0,ue),n:R}},Ge=function(U,R){for(var q=0,ue=0;ue<R.length;++ue)q+=U[ue]*R[ue];return q},Je=function(U,R,q){var ue=q.length,Qe=Me(R+2);U[Qe]=ue&255,U[Qe+1]=ue>>8,U[Qe+2]=U[Qe]^255,U[Qe+3]=U[Qe+1]^255;for(var He=0;He<ue;++He)U[Qe+He+4]=q[He];return(Qe+4+ue)*8},yt=function(U,R,q,ue,Qe,He,rt,et,Ft,pt,ye){re(R,ye++,q),++Qe[256];for(var je=y(Qe,15),ct=je.t,zt=je.l,Vt=y(He,15),Et=Vt.t,Mt=Vt.l,Yt=Ae(ct),sr=Yt.c,ir=Yt.n,$t=Ae(Et),mr=$t.c,ur=$t.n,Dr=new he(19),pr=0;pr<sr.length;++pr)++Dr[sr[pr]&31];for(var pr=0;pr<mr.length;++pr)++Dr[mr[pr]&31];for(var tr=y(Dr,7),Hr=tr.t,vr=tr.l,Lr=19;Lr>4&&!Hr[O[Lr-1]];--Lr);var zr=pt+5<<3,Gr=Ge(Qe,P)+Ge(He,X)+rt,jr=Ge(Qe,ct)+Ge(He,Et)+rt+14+3*Lr+Ge(Dr,Hr)+2*Dr[16]+3*Dr[17]+7*Dr[18];if(Ft>=0&&zr<=Gr&&zr<=jr)return Je(R,ye,U.subarray(Ft,Ft+pt));var Vr,dr,Yr,Kr;if(re(R,ye,1+(jr<Gr)),ye+=2,jr<Gr){Vr=Q(ct,zt,0),dr=ct,Yr=Q(Et,Mt,0),Kr=Et;var gn=Q(Hr,vr,0);re(R,ye,ir-257),re(R,ye+5,ur-1),re(R,ye+10,Lr-4),ye+=14;for(var pr=0;pr<Lr;++pr)re(R,ye+3*pr,Hr[O[pr]]);ye+=3*Lr;for(var qr=[sr,mr],qt=0;qt<2;++qt)for(var hn=qr[qt],pr=0;pr<hn.length;++pr){var ln=hn[pr]&31;re(R,ye,gn[ln]),ye+=Hr[ln],ln>15&&(re(R,ye,hn[pr]>>5&127),ye+=hn[pr]>>12)}}else Vr=ce,dr=P,Yr=we,Kr=X;for(var pr=0;pr<et;++pr){var tn=ue[pr];if(tn>255){var ln=tn>>18&31;E(R,ye,Vr[ln+257]),ye+=dr[ln+257],ln>7&&(re(R,ye,tn>>23&31),ye+=m[ln]);var xn=tn&31;E(R,ye,Yr[xn]),ye+=Kr[xn],xn>3&&(E(R,ye,tn>>5&8191),ye+=ge[xn])}else E(R,ye,Vr[tn]),ye+=dr[tn]}return E(R,ye,Vr[256]),ye+dr[256]},dt=new W([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Rt=new Fe(0),bt=function(U,R,q,ue,Qe,He){var rt=He.z||U.length,et=new Fe(ue+rt+5*(1+Math.ceil(rt/7e3))+Qe),Ft=et.subarray(ue,et.length-Qe),pt=He.l,ye=(He.r||0)&7;if(R){ye&&(Ft[0]=He.r>>3);for(var je=dt[R-1],ct=je>>13,zt=je&8191,Vt=(1<<q)-1,Et=He.p||new he(32768),Mt=He.h||new he(Vt+1),Yt=Math.ceil(q/3),sr=2*Yt,ir=function(ri){return(U[ri]^U[ri+1]<<Yt^U[ri+2]<<sr)&Vt},$t=new W(25e3),mr=new he(288),ur=new he(32),Dr=0,pr=0,tr=He.i||0,Hr=0,vr=He.w||0,Lr=0;tr+2<rt;++tr){var zr=ir(tr),Gr=tr&32767,jr=Mt[zr];if(Et[Gr]=jr,Mt[zr]=Gr,vr<=tr){var Vr=rt-tr;if((Dr>7e3||Hr>24576)&&(Vr>423||!pt)){ye=yt(U,Ft,0,$t,mr,ur,pr,Hr,Lr,tr-Lr,ye),Hr=Dr=pr=0,Lr=tr;for(var dr=0;dr<286;++dr)mr[dr]=0;for(var dr=0;dr<30;++dr)ur[dr]=0}var Yr=2,Kr=0,gn=zt,qr=Gr-jr&32767;if(Vr>2&&zr==ir(tr-qr))for(var qt=Math.min(ct,Vr)-1,hn=Math.min(32767,tr),ln=Math.min(258,Vr);qr<=hn&&--gn&&Gr!=jr;){if(U[tr+Yr]==U[tr+Yr-qr]){for(var tn=0;tn<ln&&U[tr+tn]==U[tr+tn-qr];++tn);if(tn>Yr){if(Yr=tn,Kr=qr,tn>qt)break;for(var xn=Math.min(qr,tn-2),$n=0,dr=0;dr<xn;++dr){var On=tr-qr+dr&32767,Xn=Et[On],Xr=On-Xn&32767;Xr>$n&&($n=Xr,jr=On)}}}Gr=jr,jr=Et[Gr],qr+=Gr-jr&32767}if(Kr){$t[Hr++]=268435456|B[Yr]<<18|x[Kr];var Gn=B[Yr]&31,Ln=x[Kr]&31;pr+=m[Gn]+ge[Ln],++mr[257+Gn],++ur[Ln],vr=tr+Yr,++Dr}else $t[Hr++]=U[tr],++mr[U[tr]]}}for(tr=Math.max(tr,vr);tr<rt;++tr)$t[Hr++]=U[tr],++mr[U[tr]];ye=yt(U,Ft,pt,$t,mr,ur,pr,Hr,Lr,tr-Lr,ye),pt||(He.r=ye&7|Ft[ye/8|0]<<3,ye-=7,He.h=Mt,He.p=Et,He.i=tr,He.w=vr)}else{for(var tr=He.w||0;tr<rt+pt;tr+=65535){var Zn=tr+65535;Zn>=rt&&(Ft[ye/8|0]=pt,Zn=rt),ye=Je(Ft,ye+1,U.subarray(tr,Zn))}He.i=rt}return Z(et,0,ue+Me(ye)+Qe)},ht=null,Le=function(){var U=-1;return{p:function(R){for(var q=U,ue=0;ue<R.length;++ue)q=ht[q&255^R[ue]]^q>>>8;U=q},d:function(){return~U}}},nt=function(){var U=1,R=0;return{p:function(q){for(var ue=U,Qe=R,He=q.length|0,rt=0;rt!=He;){for(var et=Math.min(rt+2655,He);rt<et;++rt)Qe+=ue+=q[rt];ue=(ue&65535)+15*(ue>>16),Qe=(Qe&65535)+15*(Qe>>16)}U=ue,R=Qe},d:function(){return U%=65521,R%=65521,(U&255)<<24|(U&65280)<<8|(R&255)<<8|R>>8}}},Ie=function(U,R,q,ue,Qe){if(!Qe&&(Qe={l:1},R.dictionary)){var He=R.dictionary.subarray(-32768),rt=new Fe(He.length+U.length);rt.set(He),rt.set(U,He.length),U=rt,Qe.w=He.length}return bt(U,R.level==null?6:R.level,R.mem==null?Qe.l?Math.ceil(Math.max(8,Math.min(13,Math.log(U.length)))*1.5):20:12+R.mem,q,ue,Qe)},wt=function(U,R){var q={};for(var ue in U)q[ue]=U[ue];for(var ue in R)q[ue]=R[ue];return q},Lt=function(U,R,q){for(var ue=U(),Qe=U.toString(),He=Qe.slice(Qe.indexOf("[")+1,Qe.lastIndexOf("]")).replace(/\s+/g,"").split(","),rt=0;rt<ue.length;++rt){var et=ue[rt],Ft=He[rt];if(typeof et=="function"){R+=";"+Ft+"=";var pt=et.toString();if(et.prototype)if(pt.indexOf("[native code]")!=-1){var ye=pt.indexOf(" ",8)+1;R+=pt.slice(ye,pt.indexOf("(",ye))}else{R+=pt;for(var je in et.prototype)R+=";"+Ft+".prototype."+je+"="+et.prototype[je].toString()}else R+=pt}else q[Ft]=et}return R},Be=null,L=function(U){var R=[];for(var q in U)U[q].buffer&&R.push((U[q]=new U[q].constructor(U[q])).buffer);return R},g=function(U,R,q,ue){if(!Be[q]){for(var Qe="",He={},rt=U.length-1,et=0;et<rt;++et)Qe=Lt(U[et],Qe,He);Be[q]={c:Lt(U[rt],Qe,He),e:He}}var Ft=wt({},Be[q].e);return me(Be[q].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+R.toString()+"}",q,Ft,L(Ft),ue)},C=function(){return[Fe,he,W,m,ge,O,D,w,_e,ne,Y,G,Q,ve,Oe,le,Me,Z,z,se,Ee,Ue,Ye]},N=function(){return[Fe,he,W,m,ge,O,B,x,ce,P,we,X,Y,dt,Rt,Q,re,E,y,$,Ae,Ge,Je,yt,Me,Z,bt,Ie,It,Ue]},T=function(){return[Ze,Ot,Ne,Le,ht]},k=function(){return[lt,vt]},ee=function(){return[Ct,Ne,nt]},be=function(){return[Wt]},Ue=function(U){return postMessage(U,[U.buffer])},Ye=function(U){return U&&{out:U.size&&new Fe(U.size),dictionary:U.dictionary}},We=function(U,R,q,ue,Qe,He){var rt=g(q,ue,Qe,function(et,Ft){rt.terminate(),He(et,Ft)});return rt.postMessage([U,R],R.consume?[U.buffer]:[]),function(){rt.terminate()}},St=function(U){return U.ondata=function(R,q){return postMessage([R,q],[R.buffer])},function(R){R.data.length?(U.push(R.data[0],R.data[1]),postMessage([R.data[0].length])):U.flush()}},Xe=function(U,R,q,ue,Qe,He,rt){var et,Ft=g(U,ue,Qe,function(pt,ye){pt?(Ft.terminate(),R.ondata.call(R,pt)):Array.isArray(ye)?ye.length==1?(R.queuedSize-=ye[0],R.ondrain&&R.ondrain(ye[0])):(ye[1]&&Ft.terminate(),R.ondata.call(R,pt,ye[0],ye[1])):rt(ye)});Ft.postMessage(q),R.queuedSize=0,R.push=function(pt,ye){R.ondata||z(5),et&&R.ondata(z(4,0,1),null,!!ye),R.queuedSize+=pt.length,Ft.postMessage([pt,et=ye],[pt.buffer])},R.terminate=function(){Ft.terminate()},He&&(R.flush=function(){Ft.postMessage([])})},ut=function(U,R){return U[R]|U[R+1]<<8},At=function(U,R){return(U[R]|U[R+1]<<8|U[R+2]<<16|U[R+3]<<24)>>>0},it=function(U,R){return At(U,R)+At(U,R+4)*4294967296},Ne=function(U,R,q){for(;q;++R)U[R]=q,q>>>=8},Ze=function(U,R){var q=R.filename;if(U[0]=31,U[1]=139,U[2]=8,U[8]=R.level<2?4:R.level==9?2:0,U[9]=3,R.mtime!=0&&Ne(U,4,Math.floor(new Date(R.mtime||Date.now())/1e3)),q){U[3]=8;for(var ue=0;ue<=q.length;++ue)U[ue+10]=q.charCodeAt(ue)}},lt=function(U){(U[0]!=31||U[1]!=139||U[2]!=8)&&z(6,"invalid gzip data");var R=U[3],q=10;R&4&&(q+=(U[10]|U[11]<<8)+2);for(var ue=(R>>3&1)+(R>>4&1);ue>0;ue-=!U[q++]);return q+(R&2)},vt=function(U){var R=U.length;return(U[R-4]|U[R-3]<<8|U[R-2]<<16|U[R-1]<<24)>>>0},Ot=function(U){return 10+(U.filename?U.filename.length+1:0)},Ct=function(U,R){var q=R.level,ue=q==0?0:q<6?1:q==9?3:2;if(U[0]=120,U[1]=ue<<6|(R.dictionary&&32),U[1]|=31-(U[0]<<8|U[1])%31,R.dictionary){var Qe=nt();Qe.p(R.dictionary),Ne(U,2,Qe.d())}},Wt=function(U,R){return((U[0]&15)!=8||U[0]>>4>7||(U[0]<<8|U[1])%31)&&z(6,"invalid zlib data"),(U[1]>>5&1)==+!R&&z(6,"invalid zlib data: "+(U[1]&32?"need":"unexpected")+" dictionary"),(U[1]>>3&4)+2};function Nt(U,R){return typeof U=="function"&&(R=U,U={}),this.ondata=R,U}var Xt=null,fr=null;function Rr(U,R,q){return q||(q=R,R={}),typeof q!="function"&&z(7),We(U,R,[N],function(ue){return Ue(It(ue.data[0],ue.data[1]))},0,q)}function It(U,R){return Ie(U,R||{},0,0)}var jt=null,Re=null;function Ce(U,R,q){return q||(q=R,R={}),typeof q!="function"&&z(7),We(U,R,[C],function(ue){return Ue(Ee(ue.data[0],Ye(ue.data[1])))},1,q)}function Ee(U,R){return se(U,{i:2},R&&R.out,R&&R.dictionary)}var j=null,ie=null;function ae(U,R,q){return q||(q=R,R={}),typeof q!="function"&&z(7),We(U,R,[N,T,function(){return[de]}],function(ue){return Ue(de(ue.data[0],ue.data[1]))},2,q)}function de(U,R){R||(R={});var q=Le(),ue=U.length;q.p(U);var Qe=Ie(U,R,Ot(R),8),He=Qe.length;return Ze(Qe,R),Ne(Qe,He-8,q.d()),Ne(Qe,He-4,ue),Qe}var Se=null,xt=null;function gt(U,R,q){return q||(q=R,R={}),typeof q!="function"&&z(7),We(U,R,[C,k,function(){return[qe]}],function(ue){return Ue(qe(ue.data[0],ue.data[1]))},3,q)}function qe(U,R){var q=lt(U);return q+8>U.length&&z(6,"invalid gzip data"),se(U.subarray(q,-8),{i:2},R&&R.out||new Fe(vt(U)),R&&R.dictionary)}var Ht=null,Cr=null;function Nr(U,R,q){return q||(q=R,R={}),typeof q!="function"&&z(7),We(U,R,[N,ee,function(){return[Gt]}],function(ue){return Ue(Gt(ue.data[0],ue.data[1]))},4,q)}function Gt(U,R){R||(R={});var q=nt();q.p(U);var ue=Ie(U,R,R.dictionary?6:2,4);return Ct(ue,R),Ne(ue,ue.length-4,q.d()),ue}var Kt=null,Sr=null;function $r(U,R,q){return q||(q=R,R={}),typeof q!="function"&&z(7),We(U,R,[C,be,function(){return[De]}],function(ue){return Ue(De(ue.data[0],Ye(ue.data[1])))},5,q)}function De(U,R){return se(U.subarray(Wt(U,R&&R.dictionary),-4),{i:2},R&&R.out,R&&R.dictionary)}var Ir=null,Er=null;function Br(U,R,q){return q||(q=R,R={}),typeof q!="function"&&z(7),U[0]==31&&U[1]==139&&U[2]==8?gt(U,R,q):(U[0]&15)!=8||U[0]>>4>7||(U[0]<<8|U[1])%31?Ce(U,R,q):$r(U,R,q)}function vn(U,R){return U[0]==31&&U[1]==139&&U[2]==8?qe(U,R):(U[0]&15)!=8||U[0]>>4>7||(U[0]<<8|U[1])%31?Ee(U,R):De(U,R)}var Or=function(U,R,q,ue){for(var Qe in U){var He=U[Qe],rt=R+Qe,et=ue;Array.isArray(He)&&(et=wt(ue,He[1]),He=He[0]),He instanceof Fe?q[rt]=[He,et]:(q[rt+="/"]=[new Fe(0),et],Or(He,rt,q,ue))}},Jr=typeof TextEncoder!="undefined"&&new TextEncoder,An=typeof TextDecoder!="undefined"&&new TextDecoder,Cn=0;try{An.decode(Rt,{stream:!0}),Cn=1}catch(U){}var an=function(U){for(var R="",q=0;;){var ue=U[q++],Qe=(ue>127)+(ue>223)+(ue>239);if(q+Qe>U.length)return{s:R,r:Z(U,q-1)};Qe?Qe==3?(ue=((ue&15)<<18|(U[q++]&63)<<12|(U[q++]&63)<<6|U[q++]&63)-65536,R+=String.fromCharCode(55296|ue>>10,56320|ue&1023)):Qe&1?R+=String.fromCharCode((ue&31)<<6|U[q++]&63):R+=String.fromCharCode((ue&15)<<12|(U[q++]&63)<<6|U[q++]&63):R+=String.fromCharCode(ue)}},Rn=null,Pr=null;function Qn(U,R){if(R){for(var q=new Fe(U.length),ue=0;ue<U.length;++ue)q[ue]=U.charCodeAt(ue);return q}if(Jr)return Jr.encode(U);for(var Qe=U.length,He=new Fe(U.length+(U.length>>1)),rt=0,et=function(ye){He[rt++]=ye},ue=0;ue<Qe;++ue){if(rt+5>He.length){var Ft=new Fe(rt+8+(Qe-ue<<1));Ft.set(He),He=Ft}var pt=U.charCodeAt(ue);pt<128||R?et(pt):pt<2048?(et(192|pt>>6),et(128|pt&63)):pt>55295&&pt<57344?(pt=65536+(pt&1047552)|U.charCodeAt(++ue)&1023,et(240|pt>>18),et(128|pt>>12&63),et(128|pt>>6&63),et(128|pt&63)):(et(224|pt>>12),et(128|pt>>6&63),et(128|pt&63))}return Z(He,0,rt)}function Mr(U,R){if(R){for(var q="",ue=0;ue<U.length;ue+=16384)q+=String.fromCharCode.apply(null,U.subarray(ue,ue+16384));return q}else{if(An)return An.decode(U);var Qe=an(U),He=Qe.s,q=Qe.r;return q.length&&z(8),He}}var en=function(U){return U==1?3:U<6?2:U==9?1:0},Dn=function(U,R){return R+30+ut(U,R+26)+ut(U,R+28)},br=function(U,R,q){var ue=ut(U,R+28),Qe=Mr(U.subarray(R+46,R+46+ue),!(ut(U,R+8)&2048)),He=R+46+ue,rt=At(U,R+20),et=q&&rt==4294967295?jn(U,He):[rt,At(U,R+24),At(U,R+42)],Ft=et[0],pt=et[1],ye=et[2];return[ut(U,R+10),Ft,pt,Qe,He+ut(U,R+30)+ut(U,R+32),ye]},jn=function(U,R){for(;ut(U,R)!=1;R+=4+ut(U,R+2));return[it(U,R+12),it(U,R+4),it(U,R+20)]},on=function(U){var R=0;if(U)for(var q in U){var ue=U[q].length;ue>65535&&z(9),R+=ue+4}return R},lr=function(U,R,q,ue,Qe,He,rt,et){var Ft=ue.length,pt=q.extra,ye=et&&et.length,je=on(pt);Ne(U,R,rt!=null?33639248:67324752),R+=4,rt!=null&&(U[R++]=20,U[R++]=q.os),U[R]=20,R+=2,U[R++]=q.flag<<1|(He<0&&8),U[R++]=Qe&&8,U[R++]=q.compression&255,U[R++]=q.compression>>8;var ct=new Date(q.mtime==null?Date.now():q.mtime),zt=ct.getFullYear()-1980;if((zt<0||zt>119)&&z(10),Ne(U,R,zt<<25|ct.getMonth()+1<<21|ct.getDate()<<16|ct.getHours()<<11|ct.getMinutes()<<5|ct.getSeconds()>>1),R+=4,He!=-1&&(Ne(U,R,q.crc),Ne(U,R+4,He<0?-He-2:He),Ne(U,R+8,q.size)),Ne(U,R+12,Ft),Ne(U,R+14,je),R+=16,rt!=null&&(Ne(U,R,ye),Ne(U,R+6,q.attrs),Ne(U,R+10,rt),R+=14),U.set(ue,R),R+=Ft,je)for(var Vt in pt){var Et=pt[Vt],Mt=Et.length;Ne(U,R,+Vt),Ne(U,R+2,Mt),U.set(Et,R+4),R+=4+Mt}return ye&&(U.set(et,R),R+=ye),R},_r=function(U,R,q,ue,Qe){Ne(U,R,101010256),Ne(U,R+8,q),Ne(U,R+10,q),Ne(U,R+12,ue),Ne(U,R+16,Qe)},ke=null,ze=null,_t=null,at=null;function Tt(U,R,q){q||(q=R,R={}),typeof q!="function"&&z(7);var ue={};Or(U,"",ue,R);var Qe=Object.keys(ue),He=Qe.length,rt=0,et=0,Ft=He,pt=new Array(He),ye=[],je=function(){for(var Mt=0;Mt<ye.length;++Mt)ye[Mt]()},ct=function(Mt,Yt){yr(function(){q(Mt,Yt)})};yr(function(){ct=q});var zt=function(){var Mt=new Fe(et+22),Yt=rt,sr=et-rt;et=0;for(var ir=0;ir<Ft;++ir){var $t=pt[ir];try{var mr=$t.c.length;lr(Mt,et,$t,$t.f,$t.u,mr);var ur=30+$t.f.length+on($t.extra),Dr=et+ur;Mt.set($t.c,Dr),lr(Mt,rt,$t,$t.f,$t.u,mr,et,$t.m),rt+=16+ur+($t.m?$t.m.length:0),et=Dr+mr}catch(pr){return ct(pr,null)}}_r(Mt,rt,pt.length,sr,Yt),ct(null,Mt)};He||zt();for(var Vt=function(Mt){var Yt=Qe[Mt],sr=ue[Yt],ir=sr[0],$t=sr[1],mr=Le(),ur=ir.length;mr.p(ir);var Dr=Qn(Yt),pr=Dr.length,tr=$t.comment,Hr=tr&&Qn(tr),vr=Hr&&Hr.length,Lr=on($t.extra),zr=$t.level==0?0:8,Gr=function(jr,Vr){if(jr)je(),ct(jr,null);else{var dr=Vr.length;pt[Mt]=wt($t,{size:ur,crc:mr.d(),c:Vr,f:Dr,m:Hr,u:pr!=Yt.length||Hr&&tr.length!=vr,compression:zr}),rt+=30+pr+Lr+dr,et+=76+2*(pr+Lr)+(vr||0)+dr,--He||zt()}};if(pr>65535&&Gr(z(11,0,1),null),!zr)Gr(null,ir);else if(ur<16e4)try{Gr(null,It(ir,$t))}catch(jr){Gr(jr,null)}else ye.push(Rr(ir,$t,Gr))},Et=0;Et<Ft;++Et)Vt(Et);return je}function tt(U,R){R||(R={});var q={},ue=[];Or(U,"",q,R);var Qe=0,He=0;for(var rt in q){var et=q[rt],Ft=et[0],pt=et[1],ye=pt.level==0?0:8,je=Qn(rt),ct=je.length,zt=pt.comment,Vt=zt&&Qn(zt),Et=Vt&&Vt.length,Mt=on(pt.extra);ct>65535&&z(11);var Yt=ye?It(Ft,pt):Ft,sr=Yt.length,ir=Le();ir.p(Ft),ue.push(wt(pt,{size:Ft.length,crc:ir.d(),c:Yt,f:je,m:Vt,u:ct!=rt.length||Vt&&zt.length!=Et,o:Qe,compression:ye})),Qe+=30+ct+Mt+sr,He+=76+2*(ct+Mt)+(Et||0)+sr}for(var $t=new Fe(He+22),mr=Qe,ur=He-Qe,Dr=0;Dr<ue.length;++Dr){var je=ue[Dr];lr($t,je.o,je,je.f,je.u,je.c.length);var pr=30+je.f.length+on(je.extra);$t.set(je.c,je.o+pr),lr($t,Qe,je,je.f,je.u,je.c.length,je.o,je.m),Qe+=16+pr+(je.m?je.m.length:0)}return _r($t,Qe,ue.length,ur,mr),$t}var ot=null,Ut=null,Zt=null,Ar=null,yr=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(U){U()};function hr(U,R,q){q||(q=R,R={}),typeof q!="function"&&z(7);var ue=[],Qe=function(){for(var Mt=0;Mt<ue.length;++Mt)ue[Mt]()},He={},rt=function(Mt,Yt){yr(function(){q(Mt,Yt)})};yr(function(){rt=q});for(var et=U.length-22;At(U,et)!=101010256;--et)if(!et||U.length-et>65558)return rt(z(13,0,1),null),Qe;var Ft=ut(U,et+8);if(Ft){var pt=Ft,ye=At(U,et+16),je=ye==4294967295||pt==65535;if(je){var ct=At(U,et-12);je=At(U,ct)==101075792,je&&(pt=Ft=At(U,ct+32),ye=At(U,ct+48))}for(var zt=R&&R.filter,Vt=function(Mt){var Yt=br(U,ye,je),sr=Yt[0],ir=Yt[1],$t=Yt[2],mr=Yt[3],ur=Yt[4],Dr=Yt[5],pr=Dn(U,Dr);ye=ur;var tr=function(vr,Lr){vr?(Qe(),rt(vr,null)):(Lr&&(He[mr]=Lr),--Ft||rt(null,He))};if(!zt||zt({name:mr,size:ir,originalSize:$t,compression:sr}))if(!sr)tr(null,Z(U,pr,pr+ir));else if(sr==8){var Hr=U.subarray(pr,pr+ir);if($t<524288||ir>.8*$t)try{tr(null,Ee(Hr,{out:new Fe($t)}))}catch(vr){tr(vr,null)}else ue.push(Ce(Hr,{size:$t},tr))}else tr(z(14,"unknown compression type "+sr,1),null);else tr(null,null)},Et=0;Et<pt;++Et)Vt(Et)}else rt(null,{});return Qe}function Tr(U,R){for(var q={},ue=U.length-22;At(U,ue)!=101010256;--ue)(!ue||U.length-ue>65558)&&z(13);var Qe=ut(U,ue+8);if(!Qe)return{};var He=At(U,ue+16),rt=He==4294967295||Qe==65535;if(rt){var et=At(U,ue-12);rt=At(U,et)==101075792,rt&&(Qe=At(U,et+32),He=At(U,et+48))}for(var Ft=R&&R.filter,pt=0;pt<Qe;++pt){var ye=br(U,He,rt),je=ye[0],ct=ye[1],zt=ye[2],Vt=ye[3],Et=ye[4],Mt=ye[5],Yt=Dn(U,Mt);He=Et,(!Ft||Ft({name:Vt,size:ct,originalSize:zt,compression:je}))&&(je?je==8?q[Vt]=Ee(U.subarray(Yt,Yt+ct),{out:new Fe(zt)}):z(14,"unknown compression type "+je):q[Vt]=Z(U,Yt,Yt+ct))}return q}},64270:function(gr){(function(mt,K){gr.exports=K()})(this,function(){"use strict";var mt=function(f,c){return mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,e){i.__proto__=e}||function(i,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])},mt(f,c)};function K(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");mt(f,c);function i(){this.constructor=f}f.prototype=c===null?Object.create(c):(i.prototype=c.prototype,new i)}var V=function(){return V=Object.assign||function(c){for(var i,e=1,t=arguments.length;e<t;e++){i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(c[r]=i[r])}return c},V.apply(this,arguments)};function me(f,c,i,e){function t(r){return r instanceof i?r:new i(function(n){n(r)})}return new(i||(i=Promise))(function(r,n){function s(l){try{a(e.next(l))}catch(o){n(o)}}function A(l){try{a(e.throw(l))}catch(o){n(o)}}function a(l){l.done?r(l.value):t(l.value).then(s,A)}a((e=e.apply(f,c||[])).next())})}function Fe(f,c){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,t,r,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(a){return function(l){return A([a,l])}}function A(a){if(e)throw new TypeError("Generator is already executing.");for(;i;)try{if(e=1,t&&(r=a[0]&2?t.return:a[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,a[1])).done)return r;switch(t=0,r&&(a=[a[0]&2,r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,t=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(r=i.trys,!(r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=c.call(f,i)}catch(l){a=[6,l],t=0}finally{e=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function he(f,c,i){if(i||arguments.length===2)for(var e=0,t=c.length,r;e<t;e++)(r||!(e in c))&&(r||(r=Array.prototype.slice.call(c,0,e)),r[e]=c[e]);return f.concat(r||c)}for(var W=function(){function f(c,i,e,t){this.left=c,this.top=i,this.width=e,this.height=t}return f.prototype.add=function(c,i,e,t){return new f(this.left+c,this.top+i,this.width+e,this.height+t)},f.fromClientRect=function(c,i){return new f(i.left+c.windowBounds.left,i.top+c.windowBounds.top,i.width,i.height)},f.fromDOMRectList=function(c,i){var e=Array.from(i).find(function(t){return t.width!==0});return e?new f(e.left+c.windowBounds.left,e.top+c.windowBounds.top,e.width,e.height):f.EMPTY},f.EMPTY=new f(0,0,0,0),f}(),m=function(f,c){return W.fromClientRect(f,c.getBoundingClientRect())},ge=function(f){var c=f.body,i=f.documentElement;if(!c||!i)throw new Error("Unable to get document size");var e=Math.max(Math.max(c.scrollWidth,i.scrollWidth),Math.max(c.offsetWidth,i.offsetWidth),Math.max(c.clientWidth,i.clientWidth)),t=Math.max(Math.max(c.scrollHeight,i.scrollHeight),Math.max(c.offsetHeight,i.offsetHeight),Math.max(c.clientHeight,i.clientHeight));return new W(0,0,e,t)},O=function(f){for(var c=[],i=0,e=f.length;i<e;){var t=f.charCodeAt(i++);if(t>=55296&&t<=56319&&i<e){var r=f.charCodeAt(i++);(r&64512)===56320?c.push(((t&1023)<<10)+(r&1023)+65536):(c.push(t),i--)}else c.push(t)}return c},u=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,f);var i=f.length;if(!i)return"";for(var e=[],t=-1,r="";++t<i;){var n=f[t];n<=65535?e.push(n):(n-=65536,e.push((n>>10)+55296,n%1024+56320)),(t+1===i||e.length>16384)&&(r+=String.fromCharCode.apply(String,e),e.length=0)}return r},J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),B=0;B<J.length;B++)D[J.charCodeAt(B)]=B;for(var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),x=0;x<_.length;x++)w[_.charCodeAt(x)]=x;for(var Y=function(f){var c=f.length*.75,i=f.length,e,t=0,r,n,s,A;f[f.length-1]==="="&&(c--,f[f.length-2]==="="&&c--);var a=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),l=Array.isArray(a)?a:new Uint8Array(a);for(e=0;e<i;e+=4)r=w[f.charCodeAt(e)],n=w[f.charCodeAt(e+1)],s=w[f.charCodeAt(e+2)],A=w[f.charCodeAt(e+3)],l[t++]=r<<2|n>>4,l[t++]=(n&15)<<4|s>>2,l[t++]=(s&3)<<6|A&63;return a},M=function(f){for(var c=f.length,i=[],e=0;e<c;e+=2)i.push(f[e+1]<<8|f[e]);return i},H=function(f){for(var c=f.length,i=[],e=0;e<c;e+=4)i.push(f[e+3]<<24|f[e+2]<<16|f[e+1]<<8|f[e]);return i},Q=5,P=11,X=2,ce=P-Q,_e=65536>>Q,we=1<<Q,ne=we-1,ve=1024>>Q,Oe=_e+ve,le=Oe,Me=32,Z=le+Me,I=65536>>P,G=1<<ce,z=G-1,se=function(f,c,i){return f.slice?f.slice(c,i):new Uint16Array(Array.prototype.slice.call(f,c,i))},re=function(f,c,i){return f.slice?f.slice(c,i):new Uint32Array(Array.prototype.slice.call(f,c,i))},E=function(f,c){var i=Y(f),e=Array.isArray(i)?H(i):new Uint32Array(i),t=Array.isArray(i)?M(i):new Uint16Array(i),r=24,n=se(t,r/2,e[4]/2),s=e[5]===2?se(t,(r+e[4])/2):re(e,Math.ceil((r+e[4])/4));return new y(e[0],e[1],e[2],e[3],n,s)},y=function(){function f(c,i,e,t,r,n){this.initialValue=c,this.errorValue=i,this.highStart=e,this.highValueIndex=t,this.index=r,this.data=n}return f.prototype.get=function(c){var i;if(c>=0){if(c<55296||c>56319&&c<=65535)return i=this.index[c>>Q],i=(i<<X)+(c&ne),this.data[i];if(c<=65535)return i=this.index[_e+(c-55296>>Q)],i=(i<<X)+(c&ne),this.data[i];if(c<this.highStart)return i=Z-I+(c>>P),i=this.index[i],i+=c>>Q&z,i=this.index[i],i=(i<<X)+(c&ne),this.data[i];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},f}(),$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ae=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ge=0;Ge<$.length;Ge++)Ae[$.charCodeAt(Ge)]=Ge;var Je="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==",yt=50,dt=1,Rt=2,bt=3,ht=4,Le=5,nt=7,Ie=8,wt=9,Lt=10,Be=11,L=12,g=13,C=14,N=15,T=16,k=17,ee=18,be=19,Ue=20,Ye=21,We=22,St=23,Xe=24,ut=25,At=26,it=27,Ne=28,Ze=29,lt=30,vt=31,Ot=32,Ct=33,Wt=34,Nt=35,Xt=36,fr=37,Rr=38,It=39,jt=40,Re=41,Ce=42,Ee=43,j=[9001,65288],ie="!",ae="\xD7",de="\xF7",Se=E(Je),xt=[lt,Xt],gt=[dt,Rt,bt,Le],qe=[Lt,Ie],Ht=[it,At],Cr=gt.concat(qe),Nr=[Rr,It,jt,Wt,Nt],Gt=[N,g],Kt=function(f,c){c===void 0&&(c="strict");var i=[],e=[],t=[];return f.forEach(function(r,n){var s=Se.get(r);if(s>yt?(t.push(!0),s-=yt):t.push(!1),["normal","auto","loose"].indexOf(c)!==-1&&[8208,8211,12316,12448].indexOf(r)!==-1)return e.push(n),i.push(T);if(s===ht||s===Be){if(n===0)return e.push(n),i.push(lt);var A=i[n-1];return Cr.indexOf(A)===-1?(e.push(e[n-1]),i.push(A)):(e.push(n),i.push(lt))}if(e.push(n),s===vt)return i.push(c==="strict"?Ye:fr);if(s===Ce||s===Ze)return i.push(lt);if(s===Ee)return r>=131072&&r<=196605||r>=196608&&r<=262141?i.push(fr):i.push(lt);i.push(s)}),[e,i,t]},Sr=function(f,c,i,e){var t=e[i];if(Array.isArray(f)?f.indexOf(t)!==-1:f===t)for(var r=i;r<=e.length;){r++;var n=e[r];if(n===c)return!0;if(n!==Lt)break}if(t===Lt)for(var r=i;r>0;){r--;var s=e[r];if(Array.isArray(f)?f.indexOf(s)!==-1:f===s)for(var A=i;A<=e.length;){A++;var n=e[A];if(n===c)return!0;if(n!==Lt)break}if(s!==Lt)break}return!1},$r=function(f,c){for(var i=f;i>=0;){var e=c[i];if(e===Lt)i--;else return e}return 0},De=function(f,c,i,e,t){if(i[e]===0)return ae;var r=e-1;if(Array.isArray(t)&&t[r]===!0)return ae;var n=r-1,s=r+1,A=c[r],a=n>=0?c[n]:0,l=c[s];if(A===Rt&&l===bt)return ae;if(gt.indexOf(A)!==-1)return ie;if(gt.indexOf(l)!==-1||qe.indexOf(l)!==-1)return ae;if($r(r,c)===Ie)return de;if(Se.get(f[r])===Be||(A===Ot||A===Ct)&&Se.get(f[s])===Be||A===nt||l===nt||A===wt||[Lt,g,N].indexOf(A)===-1&&l===wt||[k,ee,be,Xe,Ne].indexOf(l)!==-1||$r(r,c)===We||Sr(St,We,r,c)||Sr([k,ee],Ye,r,c)||Sr(L,L,r,c))return ae;if(A===Lt)return de;if(A===St||l===St)return ae;if(l===T||A===T)return de;if([g,N,Ye].indexOf(l)!==-1||A===C||a===Xt&&Gt.indexOf(A)!==-1||A===Ne&&l===Xt||l===Ue||xt.indexOf(l)!==-1&&A===ut||xt.indexOf(A)!==-1&&l===ut||A===it&&[fr,Ot,Ct].indexOf(l)!==-1||[fr,Ot,Ct].indexOf(A)!==-1&&l===At||xt.indexOf(A)!==-1&&Ht.indexOf(l)!==-1||Ht.indexOf(A)!==-1&&xt.indexOf(l)!==-1||[it,At].indexOf(A)!==-1&&(l===ut||[We,N].indexOf(l)!==-1&&c[s+1]===ut)||[We,N].indexOf(A)!==-1&&l===ut||A===ut&&[ut,Ne,Xe].indexOf(l)!==-1)return ae;if([ut,Ne,Xe,k,ee].indexOf(l)!==-1)for(var o=r;o>=0;){var h=c[o];if(h===ut)return ae;if([Ne,Xe].indexOf(h)!==-1)o--;else break}if([it,At].indexOf(l)!==-1)for(var o=[k,ee].indexOf(A)!==-1?n:r;o>=0;){var h=c[o];if(h===ut)return ae;if([Ne,Xe].indexOf(h)!==-1)o--;else break}if(Rr===A&&[Rr,It,Wt,Nt].indexOf(l)!==-1||[It,Wt].indexOf(A)!==-1&&[It,jt].indexOf(l)!==-1||[jt,Nt].indexOf(A)!==-1&&l===jt||Nr.indexOf(A)!==-1&&[Ue,At].indexOf(l)!==-1||Nr.indexOf(l)!==-1&&A===it||xt.indexOf(A)!==-1&&xt.indexOf(l)!==-1||A===Xe&&xt.indexOf(l)!==-1||xt.concat(ut).indexOf(A)!==-1&&l===We&&j.indexOf(f[s])===-1||xt.concat(ut).indexOf(l)!==-1&&A===ee)return ae;if(A===Re&&l===Re){for(var d=i[r],p=1;d>0&&(d--,c[d]===Re);)p++;if(p%2!==0)return ae}return A===Ot&&l===Ct?ae:de},Ir=function(f,c){c||(c={lineBreak:"normal",wordBreak:"normal"});var i=Kt(f,c.lineBreak),e=i[0],t=i[1],r=i[2];(c.wordBreak==="break-all"||c.wordBreak==="break-word")&&(t=t.map(function(s){return[ut,lt,Ce].indexOf(s)!==-1?fr:s}));var n=c.wordBreak==="keep-all"?r.map(function(s,A){return s&&f[A]>=19968&&f[A]<=40959}):void 0;return[e,t,n]},Er=function(){function f(c,i,e,t){this.codePoints=c,this.required=i===ie,this.start=e,this.end=t}return f.prototype.slice=function(){return u.apply(void 0,this.codePoints.slice(this.start,this.end))},f}(),Br=function(f,c){var i=O(f),e=Ir(i,c),t=e[0],r=e[1],n=e[2],s=i.length,A=0,a=0;return{next:function(){if(a>=s)return{done:!0,value:null};for(var l=ae;a<s&&(l=De(i,r,t,++a,n))===ae;);if(l!==ae||a===s){var o=new Er(i,l,A,a);return A=a,{value:o,done:!1}}return{done:!0,value:null}}}},vn=1,Or=2,Jr=4,An=8,Cn=10,an=47,Rn=92,Pr=9,Qn=32,Mr=34,en=61,Dn=35,br=36,jn=37,on=39,lr=40,_r=41,ke=95,ze=45,_t=33,at=60,Tt=62,tt=64,ot=91,Ut=93,Zt=61,Ar=123,yr=63,hr=125,Tr=124,U=126,R=128,q=65533,ue=42,Qe=43,He=44,rt=58,et=59,Ft=46,pt=0,ye=8,je=11,ct=14,zt=31,Vt=127,Et=-1,Mt=48,Yt=97,sr=101,ir=102,$t=117,mr=122,ur=65,Dr=69,pr=70,tr=85,Hr=90,vr=function(f){return f>=Mt&&f<=57},Lr=function(f){return f>=55296&&f<=57343},zr=function(f){return vr(f)||f>=ur&&f<=pr||f>=Yt&&f<=ir},Gr=function(f){return f>=Yt&&f<=mr},jr=function(f){return f>=ur&&f<=Hr},Vr=function(f){return Gr(f)||jr(f)},dr=function(f){return f>=R},Yr=function(f){return f===Cn||f===Pr||f===Qn},Kr=function(f){return Vr(f)||dr(f)||f===ke},gn=function(f){return Kr(f)||vr(f)||f===ze},qr=function(f){return f>=pt&&f<=ye||f===je||f>=ct&&f<=zt||f===Vt},qt=function(f,c){return f!==Rn?!1:c!==Cn},hn=function(f,c,i){return f===ze?Kr(c)||qt(c,i):Kr(f)?!0:!!(f===Rn&&qt(f,c))},ln=function(f,c,i){return f===Qe||f===ze?vr(c)?!0:c===Ft&&vr(i):vr(f===Ft?c:f)},tn=function(f){var c=0,i=1;(f[c]===Qe||f[c]===ze)&&(f[c]===ze&&(i=-1),c++);for(var e=[];vr(f[c]);)e.push(f[c++]);var t=e.length?parseInt(u.apply(void 0,e),10):0;f[c]===Ft&&c++;for(var r=[];vr(f[c]);)r.push(f[c++]);var n=r.length,s=n?parseInt(u.apply(void 0,r),10):0;(f[c]===Dr||f[c]===sr)&&c++;var A=1;(f[c]===Qe||f[c]===ze)&&(f[c]===ze&&(A=-1),c++);for(var a=[];vr(f[c]);)a.push(f[c++]);var l=a.length?parseInt(u.apply(void 0,a),10):0;return i*(t+s*Math.pow(10,-n))*Math.pow(10,A*l)},xn={type:2},$n={type:3},On={type:4},Xn={type:13},Xr={type:8},Gn={type:21},Ln={type:9},Zn={type:10},ri={type:11},_i={type:12},xi={type:14},Mn={type:23},zn={type:1},Un={type:25},Jn={type:24},Pn={type:26},Ai={type:27},Bn={type:28},yn={type:29},kr={type:31},Fn={type:32},ci=function(){function f(){this._value=[]}return f.prototype.write=function(c){this._value=this._value.concat(O(c))},f.prototype.read=function(){for(var c=[],i=this.consumeToken();i!==Fn;)c.push(i),i=this.consumeToken();return c},f.prototype.consumeToken=function(){var c=this.consumeCodePoint();switch(c){case Mr:return this.consumeStringToken(Mr);case Dn:var i=this.peekCodePoint(0),e=this.peekCodePoint(1),t=this.peekCodePoint(2);if(gn(i)||qt(e,t)){var r=hn(i,e,t)?Or:vn,n=this.consumeName();return{type:5,value:n,flags:r}}break;case br:if(this.peekCodePoint(0)===en)return this.consumeCodePoint(),Xn;break;case on:return this.consumeStringToken(on);case lr:return xn;case _r:return $n;case ue:if(this.peekCodePoint(0)===en)return this.consumeCodePoint(),xi;break;case Qe:if(ln(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case He:return On;case ze:var s=c,A=this.peekCodePoint(0),a=this.peekCodePoint(1);if(ln(s,A,a))return this.reconsumeCodePoint(c),this.consumeNumericToken();if(hn(s,A,a))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();if(A===ze&&a===Tt)return this.consumeCodePoint(),this.consumeCodePoint(),Jn;break;case Ft:if(ln(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case an:if(this.peekCodePoint(0)===ue)for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(l===ue&&(l=this.consumeCodePoint(),l===an))return this.consumeToken();if(l===Et)return this.consumeToken()}break;case rt:return Pn;case et:return Ai;case at:if(this.peekCodePoint(0)===_t&&this.peekCodePoint(1)===ze&&this.peekCodePoint(2)===ze)return this.consumeCodePoint(),this.consumeCodePoint(),Un;break;case tt:var o=this.peekCodePoint(0),h=this.peekCodePoint(1),d=this.peekCodePoint(2);if(hn(o,h,d)){var n=this.consumeName();return{type:7,value:n}}break;case ot:return Bn;case Rn:if(qt(c,this.peekCodePoint(0)))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();break;case Ut:return yn;case Zt:if(this.peekCodePoint(0)===en)return this.consumeCodePoint(),Xr;break;case Ar:return ri;case hr:return _i;case $t:case tr:var p=this.peekCodePoint(0),v=this.peekCodePoint(1);return p===Qe&&(zr(v)||v===yr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(c),this.consumeIdentLikeToken();case Tr:if(this.peekCodePoint(0)===en)return this.consumeCodePoint(),Ln;if(this.peekCodePoint(0)===Tr)return this.consumeCodePoint(),Gn;break;case U:if(this.peekCodePoint(0)===en)return this.consumeCodePoint(),Zn;break;case Et:return Fn}return Yr(c)?(this.consumeWhiteSpace(),kr):vr(c)?(this.reconsumeCodePoint(c),this.consumeNumericToken()):Kr(c)?(this.reconsumeCodePoint(c),this.consumeIdentLikeToken()):{type:6,value:u(c)}},f.prototype.consumeCodePoint=function(){var c=this._value.shift();return typeof c=="undefined"?-1:c},f.prototype.reconsumeCodePoint=function(c){this._value.unshift(c)},f.prototype.peekCodePoint=function(c){return c>=this._value.length?-1:this._value[c]},f.prototype.consumeUnicodeRangeToken=function(){for(var c=[],i=this.consumeCodePoint();zr(i)&&c.length<6;)c.push(i),i=this.consumeCodePoint();for(var e=!1;i===yr&&c.length<6;)c.push(i),i=this.consumeCodePoint(),e=!0;if(e){var t=parseInt(u.apply(void 0,c.map(function(A){return A===yr?Mt:A})),16),r=parseInt(u.apply(void 0,c.map(function(A){return A===yr?pr:A})),16);return{type:30,start:t,end:r}}var n=parseInt(u.apply(void 0,c),16);if(this.peekCodePoint(0)===ze&&zr(this.peekCodePoint(1))){this.consumeCodePoint(),i=this.consumeCodePoint();for(var s=[];zr(i)&&s.length<6;)s.push(i),i=this.consumeCodePoint();var r=parseInt(u.apply(void 0,s),16);return{type:30,start:n,end:r}}else return{type:30,start:n,end:n}},f.prototype.consumeIdentLikeToken=function(){var c=this.consumeName();return c.toLowerCase()==="url"&&this.peekCodePoint(0)===lr?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===lr?(this.consumeCodePoint(),{type:19,value:c}):{type:20,value:c}},f.prototype.consumeUrlToken=function(){var c=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Et)return{type:22,value:""};var i=this.peekCodePoint(0);if(i===on||i===Mr){var e=this.consumeStringToken(this.consumeCodePoint());return e.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Et||this.peekCodePoint(0)===_r)?(this.consumeCodePoint(),{type:22,value:e.value}):(this.consumeBadUrlRemnants(),Mn)}for(;;){var t=this.consumeCodePoint();if(t===Et||t===_r)return{type:22,value:u.apply(void 0,c)};if(Yr(t))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Et||this.peekCodePoint(0)===_r?(this.consumeCodePoint(),{type:22,value:u.apply(void 0,c)}):(this.consumeBadUrlRemnants(),Mn);if(t===Mr||t===on||t===lr||qr(t))return this.consumeBadUrlRemnants(),Mn;if(t===Rn)if(qt(t,this.peekCodePoint(0)))c.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Mn;else c.push(t)}},f.prototype.consumeWhiteSpace=function(){for(;Yr(this.peekCodePoint(0));)this.consumeCodePoint()},f.prototype.consumeBadUrlRemnants=function(){for(;;){var c=this.consumeCodePoint();if(c===_r||c===Et)return;qt(c,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},f.prototype.consumeStringSlice=function(c){for(var i=5e4,e="";c>0;){var t=Math.min(i,c);e+=u.apply(void 0,this._value.splice(0,t)),c-=t}return this._value.shift(),e},f.prototype.consumeStringToken=function(c){var i="",e=0;do{var t=this._value[e];if(t===Et||t===void 0||t===c)return i+=this.consumeStringSlice(e),{type:0,value:i};if(t===Cn)return this._value.splice(0,e),zn;if(t===Rn){var r=this._value[e+1];r!==Et&&r!==void 0&&(r===Cn?(i+=this.consumeStringSlice(e),e=-1,this._value.shift()):qt(t,r)&&(i+=this.consumeStringSlice(e),i+=u(this.consumeEscapedCodePoint()),e=-1))}e++}while(!0)},f.prototype.consumeNumber=function(){var c=[],i=Jr,e=this.peekCodePoint(0);for((e===Qe||e===ze)&&c.push(this.consumeCodePoint());vr(this.peekCodePoint(0));)c.push(this.consumeCodePoint());e=this.peekCodePoint(0);var t=this.peekCodePoint(1);if(e===Ft&&vr(t))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),i=An;vr(this.peekCodePoint(0));)c.push(this.consumeCodePoint());e=this.peekCodePoint(0),t=this.peekCodePoint(1);var r=this.peekCodePoint(2);if((e===Dr||e===sr)&&((t===Qe||t===ze)&&vr(r)||vr(t)))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),i=An;vr(this.peekCodePoint(0));)c.push(this.consumeCodePoint());return[tn(c),i]},f.prototype.consumeNumericToken=function(){var c=this.consumeNumber(),i=c[0],e=c[1],t=this.peekCodePoint(0),r=this.peekCodePoint(1),n=this.peekCodePoint(2);if(hn(t,r,n)){var s=this.consumeName();return{type:15,number:i,flags:e,unit:s}}return t===jn?(this.consumeCodePoint(),{type:16,number:i,flags:e}):{type:17,number:i,flags:e}},f.prototype.consumeEscapedCodePoint=function(){var c=this.consumeCodePoint();if(zr(c)){for(var i=u(c);zr(this.peekCodePoint(0))&&i.length<6;)i+=u(this.consumeCodePoint());Yr(this.peekCodePoint(0))&&this.consumeCodePoint();var e=parseInt(i,16);return e===0||Lr(e)||e>1114111?q:e}return c===Et?q:c},f.prototype.consumeName=function(){for(var c="";;){var i=this.consumeCodePoint();if(gn(i))c+=u(i);else if(qt(i,this.peekCodePoint(0)))c+=u(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(i),c}},f}(),vi=function(){function f(c){this._tokens=c}return f.create=function(c){var i=new ci;return i.write(c),new f(i.read())},f.parseValue=function(c){return f.create(c).parseComponentValue()},f.parseValues=function(c){return f.create(c).parseComponentValues()},f.prototype.parseComponentValue=function(){for(var c=this.consumeToken();c.type===31;)c=this.consumeToken();if(c.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(c);var i=this.consumeComponentValue();do c=this.consumeToken();while(c.type===31);if(c.type===32)return i;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},f.prototype.parseComponentValues=function(){for(var c=[];;){var i=this.consumeComponentValue();if(i.type===32)return c;c.push(i),c.push()}},f.prototype.consumeComponentValue=function(){var c=this.consumeToken();switch(c.type){case 11:case 28:case 2:return this.consumeSimpleBlock(c.type);case 19:return this.consumeFunction(c)}return c},f.prototype.consumeSimpleBlock=function(c){for(var i={type:c,values:[]},e=this.consumeToken();;){if(e.type===32||Bi(e,c))return i;this.reconsumeToken(e),i.values.push(this.consumeComponentValue()),e=this.consumeToken()}},f.prototype.consumeFunction=function(c){for(var i={name:c.value,values:[],type:18};;){var e=this.consumeToken();if(e.type===32||e.type===3)return i;this.reconsumeToken(e),i.values.push(this.consumeComponentValue())}},f.prototype.consumeToken=function(){var c=this._tokens.shift();return typeof c=="undefined"?Fn:c},f.prototype.reconsumeToken=function(c){this._tokens.unshift(c)},f}(),ai=function(f){return f.type===15},Yn=function(f){return f.type===17},Qt=function(f){return f.type===20},xr=function(f){return f.type===0},sn=function(f,c){return Qt(f)&&f.value===c},En=function(f){return f.type!==31},un=function(f){return f.type!==31&&f.type!==4},Nn=function(f){var c=[],i=[];return f.forEach(function(e){if(e.type===4){if(i.length===0)throw new Error("Error parsing function args, zero tokens for arg");c.push(i),i=[];return}e.type!==31&&i.push(e)}),i.length&&c.push(i),c},Bi=function(f,c){return c===11&&f.type===12||c===28&&f.type===29?!0:c===2&&f.type===3},Sn=function(f){return f.type===17||f.type===15},mn=function(f){return f.type===16||Sn(f)},xs=function(f){return f.length>1?[f[0],f[1]]:[f[0]]},kn={type:17,number:0,flags:Jr},Fs={type:16,number:50,flags:Jr},fi={type:16,number:100,flags:Jr},Yi=function(f,c,i){var e=f[0],t=f[1];return[Wr(e,c),Wr(typeof t!="undefined"?t:e,i)]},Wr=function(f,c){if(f.type===16)return f.number/100*c;if(ai(f))switch(f.unit){case"rem":case"em":return 16*f.number;case"px":default:return f.number}return f.number},ki="deg",tA="grad",ji="rad",yi="turn",Oi={name:"angle",parse:function(f,c){if(c.type===15)switch(c.unit){case ki:return Math.PI*c.number/180;case tA:return Math.PI/200*c.number;case ji:return c.number;case yi:return Math.PI*2*c.number}throw new Error("Unsupported angle type")}},ls=function(f){return f.type===15&&(f.unit===ki||f.unit===tA||f.unit===ji||f.unit===yi)},rA=function(f){var c=f.filter(Qt).map(function(i){return i.value}).join(" ");switch(c){case"to bottom right":case"to right bottom":case"left top":case"top left":return[kn,kn];case"to top":case"bottom":return Vn(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[kn,fi];case"to right":case"left":return Vn(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[fi,fi];case"to bottom":case"top":return Vn(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[fi,kn];case"to left":case"right":return Vn(270)}return 0},Vn=function(f){return Math.PI*f/180},Ei={name:"color",parse:function(f,c){if(c.type===18){var i=Ts[c.name];if(typeof i=="undefined")throw new Error('Attempting to parse an unsupported color function "'+c.name+'"');return i(f,c.values)}if(c.type===5){if(c.value.length===3){var e=c.value.substring(0,1),t=c.value.substring(1,2),r=c.value.substring(2,3);return wi(parseInt(e+e,16),parseInt(t+t,16),parseInt(r+r,16),1)}if(c.value.length===4){var e=c.value.substring(0,1),t=c.value.substring(1,2),r=c.value.substring(2,3),n=c.value.substring(3,4);return wi(parseInt(e+e,16),parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16)/255)}if(c.value.length===6){var e=c.value.substring(0,2),t=c.value.substring(2,4),r=c.value.substring(4,6);return wi(parseInt(e,16),parseInt(t,16),parseInt(r,16),1)}if(c.value.length===8){var e=c.value.substring(0,2),t=c.value.substring(2,4),r=c.value.substring(4,6),n=c.value.substring(6,8);return wi(parseInt(e,16),parseInt(t,16),parseInt(r,16),parseInt(n,16)/255)}}if(c.type===20){var s=di[c.value.toUpperCase()];if(typeof s!="undefined")return s}return di.TRANSPARENT}},hi=function(f){return(255&f)===0},pn=function(f){var c=255&f,i=255&f>>8,e=255&f>>16,t=255&f>>24;return c<255?"rgba("+t+","+e+","+i+","+c/255+")":"rgb("+t+","+e+","+i+")"},wi=function(f,c,i,e){return(f<<24|c<<16|i<<8|Math.round(e*255)<<0)>>>0},us=function(f,c){if(f.type===17)return f.number;if(f.type===16){var i=c===3?1:255;return c===3?f.number/100*i:Math.round(f.number/100*i)}return 0},Ss=function(f,c){var i=c.filter(un);if(i.length===3){var e=i.map(us),t=e[0],r=e[1],n=e[2];return wi(t,r,n,1)}if(i.length===4){var s=i.map(us),t=s[0],r=s[1],n=s[2],A=s[3];return wi(t,r,n,A)}return 0};function cs(f,c,i){return i<0&&(i+=1),i>=1&&(i-=1),i<1/6?(c-f)*i*6+f:i<1/2?c:i<2/3?(c-f)*6*(2/3-i)+f:f}var Pi=function(f,c){var i=c.filter(un),e=i[0],t=i[1],r=i[2],n=i[3],s=(e.type===17?Vn(e.number):Oi.parse(f,e))/(Math.PI*2),A=mn(t)?t.number/100:0,a=mn(r)?r.number/100:0,l=typeof n!="undefined"&&mn(n)?Wr(n,1):1;if(A===0)return wi(a*255,a*255,a*255,1);var o=a<=.5?a*(A+1):a+A-a*A,h=a*2-o,d=cs(h,o,s+1/3),p=cs(h,o,s),v=cs(h,o,s-1/3);return wi(d*255,p*255,v*255,l)},Ts={hsl:Pi,hsla:Pi,rgb:Ss,rgba:Ss},Xi=function(f,c){return Ei.parse(f,vi.create(c).parseComponentValue())},di={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},nA={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(f,c){return c.map(function(i){if(Qt(i))switch(i.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},fs={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Fi=function(f,c){var i=Ei.parse(f,c[0]),e=c[1];return e&&mn(e)?{color:i,stop:e}:{color:i,stop:null}},Is=function(f,c){var i=f[0],e=f[f.length-1];i.stop===null&&(i.stop=kn),e.stop===null&&(e.stop=fi);for(var t=[],r=0,n=0;n<f.length;n++){var s=f[n].stop;if(s!==null){var A=Wr(s,c);A>r?t.push(A):t.push(r),r=A}else t.push(null)}for(var a=null,n=0;n<t.length;n++){var l=t[n];if(l===null)a===null&&(a=n);else if(a!==null){for(var o=n-a,h=t[a-1],d=(l-h)/(o+1),p=1;p<=o;p++)t[a+p-1]=d*p;a=null}}return f.map(function(v,b){var S=v.color;return{color:S,stop:Math.max(Math.min(1,t[b]/c),0)}})},iA=function(f,c,i){var e=c/2,t=i/2,r=Wr(f[0],c)-e,n=t-Wr(f[1],i);return(Math.atan2(n,r)+Math.PI*2)%(Math.PI*2)},sA=function(f,c,i){var e=typeof f=="number"?f:iA(f,c,i),t=Math.abs(c*Math.sin(e))+Math.abs(i*Math.cos(e)),r=c/2,n=i/2,s=t/2,A=Math.sin(e-Math.PI/2)*s,a=Math.cos(e-Math.PI/2)*s;return[t,r-a,r+a,n-A,n+A]},qn=function(f,c){return Math.sqrt(f*f+c*c)},Mi=function(f,c,i,e,t){var r=[[0,0],[0,c],[f,0],[f,c]];return r.reduce(function(n,s){var A=s[0],a=s[1],l=qn(i-A,e-a);return(t?l<n.optimumDistance:l>n.optimumDistance)?{optimumCorner:s,optimumDistance:l}:n},{optimumDistance:t?1/0:-1/0,optimumCorner:null}).optimumCorner},GA=function(f,c,i,e,t){var r=0,n=0;switch(f.size){case 0:f.shape===0?r=n=Math.min(Math.abs(c),Math.abs(c-e),Math.abs(i),Math.abs(i-t)):f.shape===1&&(r=Math.min(Math.abs(c),Math.abs(c-e)),n=Math.min(Math.abs(i),Math.abs(i-t)));break;case 2:if(f.shape===0)r=n=Math.min(qn(c,i),qn(c,i-t),qn(c-e,i),qn(c-e,i-t));else if(f.shape===1){var s=Math.min(Math.abs(i),Math.abs(i-t))/Math.min(Math.abs(c),Math.abs(c-e)),A=Mi(e,t,c,i,!0),a=A[0],l=A[1];r=qn(a-c,(l-i)/s),n=s*r}break;case 1:f.shape===0?r=n=Math.max(Math.abs(c),Math.abs(c-e),Math.abs(i),Math.abs(i-t)):f.shape===1&&(r=Math.max(Math.abs(c),Math.abs(c-e)),n=Math.max(Math.abs(i),Math.abs(i-t)));break;case 3:if(f.shape===0)r=n=Math.max(qn(c,i),qn(c,i-t),qn(c-e,i),qn(c-e,i-t));else if(f.shape===1){var s=Math.max(Math.abs(i),Math.abs(i-t))/Math.max(Math.abs(c),Math.abs(c-e)),o=Mi(e,t,c,i,!1),a=o[0],l=o[1];r=qn(a-c,(l-i)/s),n=s*r}break}return Array.isArray(f.size)&&(r=Wr(f.size[0],e),n=f.size.length===2?Wr(f.size[1],t):r),[r,n]},AA=function(f,c){var i=Vn(180),e=[];return Nn(c).forEach(function(t,r){if(r===0){var n=t[0];if(n.type===20&&n.value==="to"){i=rA(t);return}else if(ls(n)){i=Oi.parse(f,n);return}}var s=Fi(f,t);e.push(s)}),{angle:i,stops:e,type:1}},Ji=function(f,c){var i=Vn(180),e=[];return Nn(c).forEach(function(t,r){if(r===0){var n=t[0];if(n.type===20&&["top","left","right","bottom"].indexOf(n.value)!==-1){i=rA(t);return}else if(ls(n)){i=(Oi.parse(f,n)+Vn(270))%Vn(360);return}}var s=Fi(f,t);e.push(s)}),{angle:i,stops:e,type:1}},VA=function(f,c){var i=Vn(180),e=[],t=1,r=0,n=3,s=[];return Nn(c).forEach(function(A,a){var l=A[0];if(a===0){if(Qt(l)&&l.value==="linear"){t=1;return}else if(Qt(l)&&l.value==="radial"){t=2;return}}if(l.type===18){if(l.name==="from"){var o=Ei.parse(f,l.values[0]);e.push({stop:kn,color:o})}else if(l.name==="to"){var o=Ei.parse(f,l.values[0]);e.push({stop:fi,color:o})}else if(l.name==="color-stop"){var h=l.values.filter(un);if(h.length===2){var o=Ei.parse(f,h[1]),d=h[0];Yn(d)&&e.push({stop:{type:16,number:d.number*100,flags:d.flags},color:o})}}}}),t===1?{angle:(i+Vn(180))%Vn(360),stops:e,type:t}:{size:n,shape:r,stops:e,position:s,type:t}},wn="closest-side",rn="farthest-side",_n="closest-corner",ft="farthest-corner",Hn="circle",Ni="ellipse",qi="cover",aA="contain",hs=function(f,c){var i=0,e=3,t=[],r=[];return Nn(c).forEach(function(n,s){var A=!0;if(s===0){var a=!1;A=n.reduce(function(o,h){if(a)if(Qt(h))switch(h.value){case"center":return r.push(Fs),o;case"top":case"left":return r.push(kn),o;case"right":case"bottom":return r.push(fi),o}else(mn(h)||Sn(h))&&r.push(h);else if(Qt(h))switch(h.value){case Hn:return i=0,!1;case Ni:return i=1,!1;case"at":return a=!0,!1;case wn:return e=0,!1;case qi:case rn:return e=1,!1;case aA:case _n:return e=2,!1;case ft:return e=3,!1}else if(Sn(h)||mn(h))return Array.isArray(e)||(e=[]),e.push(h),!1;return o},A)}if(A){var l=Fi(f,n);t.push(l)}}),{size:e,shape:i,stops:t,position:r,type:2}},Hi=function(f,c){var i=0,e=3,t=[],r=[];return Nn(c).forEach(function(n,s){var A=!0;if(s===0?A=n.reduce(function(l,o){if(Qt(o))switch(o.value){case"center":return r.push(Fs),!1;case"top":case"left":return r.push(kn),!1;case"right":case"bottom":return r.push(fi),!1}else if(mn(o)||Sn(o))return r.push(o),!1;return l},A):s===1&&(A=n.reduce(function(l,o){if(Qt(o))switch(o.value){case Hn:return i=0,!1;case Ni:return i=1,!1;case aA:case wn:return e=0,!1;case rn:return e=1,!1;case _n:return e=2,!1;case qi:case ft:return e=3,!1}else if(Sn(o)||mn(o))return Array.isArray(e)||(e=[]),e.push(o),!1;return l},A)),A){var a=Fi(f,n);t.push(a)}}),{size:e,shape:i,stops:t,position:r,type:2}},es=function(f){return f.type===1},Ds=function(f){return f.type===2},ts={name:"image",parse:function(f,c){if(c.type===22){var i={url:c.value,type:0};return f.cache.addImage(c.value),i}if(c.type===18){var e=rs[c.name];if(typeof e=="undefined")throw new Error('Attempting to parse an unsupported image function "'+c.name+'"');return e(f,c.values)}throw new Error("Unsupported image type "+c.type)}};function Ls(f){return!(f.type===20&&f.value==="none")&&(f.type!==18||!!rs[f.name])}var rs={"linear-gradient":AA,"-moz-linear-gradient":Ji,"-ms-linear-gradient":Ji,"-o-linear-gradient":Ji,"-webkit-linear-gradient":Ji,"radial-gradient":hs,"-moz-radial-gradient":Hi,"-ms-radial-gradient":Hi,"-o-radial-gradient":Hi,"-webkit-radial-gradient":Hi,"-webkit-gradient":VA},ol={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(f,c){if(c.length===0)return[];var i=c[0];return i.type===20&&i.value==="none"?[]:c.filter(function(e){return un(e)&&Ls(e)}).map(function(e){return ts.parse(f,e)})}},ll={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(f,c){return c.map(function(i){if(Qt(i))switch(i.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ul={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(f,c){return Nn(c).map(function(i){return i.filter(mn)}).map(xs)}},cl={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(f,c){return Nn(c).map(function(i){return i.filter(Qt).map(function(e){return e.value}).join(" ")}).map(Pa)}},Pa=function(f){switch(f){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}},Ki;(function(f){f.AUTO="auto",f.CONTAIN="contain",f.COVER="cover"})(Ki||(Ki={}));var oA={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(f,c){return Nn(c).map(function(i){return i.filter(Us)})}},Us=function(f){return Qt(f)||mn(f)},lA=function(f){return{name:"border-"+f+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Ma=lA("top"),Na=lA("right"),WA=lA("bottom"),fl=lA("left"),ns=function(f){return{name:"border-radius-"+f,initialValue:"0 0",prefix:!1,type:1,parse:function(c,i){return xs(i.filter(mn))}}},hl=ns("top-left"),dl=ns("top-right"),Ha=ns("bottom-right"),Ka=ns("bottom-left"),uA=function(f){return{name:"border-"+f+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(c,i){switch(i){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},$a=uA("top"),gl=uA("right"),pl=uA("bottom"),ml=uA("left"),cA=function(f){return{name:"border-"+f+"-width",initialValue:"0",type:0,prefix:!1,parse:function(c,i){return ai(i)?i.number:0}}},_l=cA("top"),Ga=cA("right"),vl=cA("bottom"),Bl=cA("left"),yl={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ZA={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(f,c){switch(c){case"rtl":return 1;case"ltr":default:return 0}}},El={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(f,c){return c.filter(Qt).reduce(function(i,e){return i|wl(e.value)},0)}},wl=function(f){switch(f){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},Cl={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},bl={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(f,c){return c.type===20&&c.value==="normal"?0:c.type===17||c.type===15?c.number:0}},fA;(function(f){f.NORMAL="normal",f.STRICT="strict"})(fA||(fA={}));var xl={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"strict":return fA.STRICT;case"normal":default:return fA.NORMAL}}},hA={name:"line-height",initialValue:"normal",prefix:!1,type:4},Va=function(f,c){return Qt(f)&&f.value==="normal"?1.2*c:f.type===17?c*f.number:mn(f)?Wr(f,c):c},Wa={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(f,c){return c.type===20&&c.value==="none"?null:ts.parse(f,c)}},Za={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(f,c){switch(c){case"inside":return 0;case"outside":default:return 1}}},zA={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},ds=function(f){return{name:"margin-"+f,initialValue:"0",prefix:!1,type:4}},oi=ds("top"),Si=ds("right"),YA=ds("bottom"),Fl=ds("left"),dA={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(f,c){return c.filter(Qt).map(function(i){switch(i.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Sl={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"break-word":return"break-word";case"normal":default:return"normal"}}},gA=function(f){return{name:"padding-"+f,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Tl=gA("top"),Il=gA("right"),za=gA("bottom"),Ya=gA("left"),jA={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(f,c){switch(c){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},ja={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(f,c){switch(c){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Dl={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(f,c){return c.length===1&&sn(c[0],"none")?[]:Nn(c).map(function(i){for(var e={color:di.TRANSPARENT,offsetX:kn,offsetY:kn,blur:kn},t=0,r=0;r<i.length;r++){var n=i[r];Sn(n)?(t===0?e.offsetX=n:t===1?e.offsetY=n:e.blur=n,t++):e.color=Ei.parse(f,n)}return e})}},Xa={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Ll={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(f,c){if(c.type===20&&c.value==="none")return null;if(c.type===18){var i=qa[c.name];if(typeof i=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+c.name+'"');return i(c.values)}return null}},Ja=function(f){var c=f.filter(function(i){return i.type===17}).map(function(i){return i.number});return c.length===6?c:null},Ul=function(f){var c=f.filter(function(A){return A.type===17}).map(function(A){return A.number}),i=c[0],e=c[1];c[2],c[3];var t=c[4],r=c[5];c[6],c[7],c[8],c[9],c[10],c[11];var n=c[12],s=c[13];return c[14],c[15],c.length===16?[i,e,t,r,n,s]:null},qa={matrix:Ja,matrix3d:Ul},eo={type:16,number:50,flags:Jr},Rl=[eo,eo],Ql={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(f,c){var i=c.filter(mn);return i.length!==2?Rl:[i[0],i[1]]}},to={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Rs;(function(f){f.NORMAL="normal",f.BREAK_ALL="break-all",f.KEEP_ALL="keep-all"})(Rs||(Rs={}));for(var ro={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"break-all":return Rs.BREAK_ALL;case"keep-all":return Rs.KEEP_ALL;case"normal":default:return Rs.NORMAL}}},Qs={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(f,c){if(c.type===20)return{auto:!0,order:0};if(Yn(c))return{auto:!1,order:c.number};throw new Error("Invalid z-index number parsed")}},XA={name:"time",parse:function(f,c){if(c.type===15)switch(c.unit.toLowerCase()){case"s":return 1e3*c.number;case"ms":return c.number}throw new Error("Unsupported time type")}},no={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(f,c){return Yn(c)?c.number:1}},Kn={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},$i={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(f,c){return c.filter(Qt).map(function(i){switch(i.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(i){return i!==0})}},JA={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(f,c){var i=[],e=[];return c.forEach(function(t){switch(t.type){case 20:case 0:i.push(t.value);break;case 17:i.push(t.number.toString());break;case 4:e.push(i.join(" ")),i.length=0;break}}),i.length&&e.push(i.join(" ")),e.map(function(t){return t.indexOf(" ")===-1?t:"'"+t+"'"})}},kl={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Ol={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(f,c){if(Yn(c))return c.number;if(Qt(c))switch(c.value){case"bold":return 700;case"normal":default:return 400}return 400}},qA={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(f,c){return c.filter(Qt).map(function(i){return i.value})}},ea={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Tn=function(f,c){return(f&c)!==0},Pl={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(f,c){if(c.length===0)return[];var i=c[0];return i.type===20&&i.value==="none"?[]:c}},Gi={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(f,c){if(c.length===0)return null;var i=c[0];if(i.type===20&&i.value==="none")return null;for(var e=[],t=c.filter(En),r=0;r<t.length;r++){var n=t[r],s=t[r+1];if(n.type===20){var A=s&&Yn(s)?s.number:1;e.push({counter:n.value,increment:A})}}return e}},Ve={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(f,c){if(c.length===0)return[];for(var i=[],e=c.filter(En),t=0;t<e.length;t++){var r=e[t],n=e[t+1];if(Qt(r)&&r.value!=="none"){var s=n&&Yn(n)?n.number:0;i.push({counter:r.value,reset:s})}}return i}},io={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(f,c){return c.filter(ai).map(function(i){return XA.parse(f,i)})}},ta={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(f,c){if(c.length===0)return null;var i=c[0];if(i.type===20&&i.value==="none")return null;var e=[],t=c.filter(xr);if(t.length%2!==0)return null;for(var r=0;r<t.length;r+=2){var n=t[r].value,s=t[r+1].value;e.push({open:n,close:s})}return e}},so=function(f,c,i){if(!f)return"";var e=f[Math.min(c,f.length-1)];return e?i?e.open:e.close:""},ks={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(f,c){return c.length===1&&sn(c[0],"none")?[]:Nn(c).map(function(i){for(var e={color:255,offsetX:kn,offsetY:kn,blur:kn,spread:kn,inset:!1},t=0,r=0;r<i.length;r++){var n=i[r];sn(n,"inset")?e.inset=!0:Sn(n)?(t===0?e.offsetX=n:t===1?e.offsetY=n:t===2?e.blur=n:e.spread=n,t++):e.color=Ei.parse(f,n)}return e})}},Ml={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(f,c){var i=[0,1,2],e=[];return c.filter(Qt).forEach(function(t){switch(t.value){case"stroke":e.push(1);break;case"fill":e.push(0);break;case"markers":e.push(2);break}}),i.forEach(function(t){e.indexOf(t)===-1&&e.push(t)}),e}},Nl={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Hl={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(f,c){return ai(c)?c.number:0}},Kl=function(){function f(c,i){var e,t;this.animationDuration=rr(c,io,i.animationDuration),this.backgroundClip=rr(c,nA,i.backgroundClip),this.backgroundColor=rr(c,fs,i.backgroundColor),this.backgroundImage=rr(c,ol,i.backgroundImage),this.backgroundOrigin=rr(c,ll,i.backgroundOrigin),this.backgroundPosition=rr(c,ul,i.backgroundPosition),this.backgroundRepeat=rr(c,cl,i.backgroundRepeat),this.backgroundSize=rr(c,oA,i.backgroundSize),this.borderTopColor=rr(c,Ma,i.borderTopColor),this.borderRightColor=rr(c,Na,i.borderRightColor),this.borderBottomColor=rr(c,WA,i.borderBottomColor),this.borderLeftColor=rr(c,fl,i.borderLeftColor),this.borderTopLeftRadius=rr(c,hl,i.borderTopLeftRadius),this.borderTopRightRadius=rr(c,dl,i.borderTopRightRadius),this.borderBottomRightRadius=rr(c,Ha,i.borderBottomRightRadius),this.borderBottomLeftRadius=rr(c,Ka,i.borderBottomLeftRadius),this.borderTopStyle=rr(c,$a,i.borderTopStyle),this.borderRightStyle=rr(c,gl,i.borderRightStyle),this.borderBottomStyle=rr(c,pl,i.borderBottomStyle),this.borderLeftStyle=rr(c,ml,i.borderLeftStyle),this.borderTopWidth=rr(c,_l,i.borderTopWidth),this.borderRightWidth=rr(c,Ga,i.borderRightWidth),this.borderBottomWidth=rr(c,vl,i.borderBottomWidth),this.borderLeftWidth=rr(c,Bl,i.borderLeftWidth),this.boxShadow=rr(c,ks,i.boxShadow),this.color=rr(c,yl,i.color),this.direction=rr(c,ZA,i.direction),this.display=rr(c,El,i.display),this.float=rr(c,Cl,i.cssFloat),this.fontFamily=rr(c,JA,i.fontFamily),this.fontSize=rr(c,kl,i.fontSize),this.fontStyle=rr(c,ea,i.fontStyle),this.fontVariant=rr(c,qA,i.fontVariant),this.fontWeight=rr(c,Ol,i.fontWeight),this.letterSpacing=rr(c,bl,i.letterSpacing),this.lineBreak=rr(c,xl,i.lineBreak),this.lineHeight=rr(c,hA,i.lineHeight),this.listStyleImage=rr(c,Wa,i.listStyleImage),this.listStylePosition=rr(c,Za,i.listStylePosition),this.listStyleType=rr(c,zA,i.listStyleType),this.marginTop=rr(c,oi,i.marginTop),this.marginRight=rr(c,Si,i.marginRight),this.marginBottom=rr(c,YA,i.marginBottom),this.marginLeft=rr(c,Fl,i.marginLeft),this.opacity=rr(c,no,i.opacity);var r=rr(c,dA,i.overflow);this.overflowX=r[0],this.overflowY=r[r.length>1?1:0],this.overflowWrap=rr(c,Sl,i.overflowWrap),this.paddingTop=rr(c,Tl,i.paddingTop),this.paddingRight=rr(c,Il,i.paddingRight),this.paddingBottom=rr(c,za,i.paddingBottom),this.paddingLeft=rr(c,Ya,i.paddingLeft),this.paintOrder=rr(c,Ml,i.paintOrder),this.position=rr(c,ja,i.position),this.textAlign=rr(c,jA,i.textAlign),this.textDecorationColor=rr(c,Kn,(e=i.textDecorationColor)!==null&&e!==void 0?e:i.color),this.textDecorationLine=rr(c,$i,(t=i.textDecorationLine)!==null&&t!==void 0?t:i.textDecoration),this.textShadow=rr(c,Dl,i.textShadow),this.textTransform=rr(c,Xa,i.textTransform),this.transform=rr(c,Ll,i.transform),this.transformOrigin=rr(c,Ql,i.transformOrigin),this.visibility=rr(c,to,i.visibility),this.webkitTextStrokeColor=rr(c,Nl,i.webkitTextStrokeColor),this.webkitTextStrokeWidth=rr(c,Hl,i.webkitTextStrokeWidth),this.wordBreak=rr(c,ro,i.wordBreak),this.zIndex=rr(c,Qs,i.zIndex)}return f.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},f.prototype.isTransparent=function(){return hi(this.backgroundColor)},f.prototype.isTransformed=function(){return this.transform!==null},f.prototype.isPositioned=function(){return this.position!==0},f.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},f.prototype.isFloating=function(){return this.float!==0},f.prototype.isInlineLevel=function(){return Tn(this.display,4)||Tn(this.display,33554432)||Tn(this.display,268435456)||Tn(this.display,536870912)||Tn(this.display,67108864)||Tn(this.display,134217728)},f}(),$l=function(){function f(c,i){this.content=rr(c,Pl,i.content),this.quotes=rr(c,ta,i.quotes)}return f}(),is=function(){function f(c,i){this.counterIncrement=rr(c,Gi,i.counterIncrement),this.counterReset=rr(c,Ve,i.counterReset)}return f}(),rr=function(f,c,i){var e=new ci,t=i!==null&&typeof i!="undefined"?i.toString():c.initialValue;e.write(t);var r=new vi(e.read());switch(c.type){case 2:var n=r.parseComponentValue();return c.parse(f,Qt(n)?n.value:c.initialValue);case 0:return c.parse(f,r.parseComponentValue());case 1:return c.parse(f,r.parseComponentValues());case 4:return r.parseComponentValue();case 3:switch(c.format){case"angle":return Oi.parse(f,r.parseComponentValue());case"color":return Ei.parse(f,r.parseComponentValue());case"image":return ts.parse(f,r.parseComponentValue());case"length":var s=r.parseComponentValue();return Sn(s)?s:kn;case"length-percentage":var A=r.parseComponentValue();return mn(A)?A:kn;case"time":return XA.parse(f,r.parseComponentValue())}break}},Ao="data-html2canvas-debug",pA=function(f){var c=f.getAttribute(Ao);switch(c){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ni=function(f,c){var i=pA(f);return i===1||c===i},Ti=function(){function f(c,i){if(this.context=c,this.textNodes=[],this.elements=[],this.flags=0,ni(i,3))debugger;this.styles=new Kl(c,window.getComputedStyle(i,null)),_s(i)&&(this.styles.animationDuration.some(function(e){return e>0})&&(i.style.animationDuration="0s"),this.styles.transform!==null&&(i.style.transform="none")),this.bounds=m(this.context,i),ni(i,4)&&(this.flags|=16)}return f}(),ao="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Os=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),mA=0;mA<ra.length;mA++)Os[ra.charCodeAt(mA)]=mA;for(var oo=function(f){var c=f.length*.75,i=f.length,e,t=0,r,n,s,A;f[f.length-1]==="="&&(c--,f[f.length-2]==="="&&c--);var a=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),l=Array.isArray(a)?a:new Uint8Array(a);for(e=0;e<i;e+=4)r=Os[f.charCodeAt(e)],n=Os[f.charCodeAt(e+1)],s=Os[f.charCodeAt(e+2)],A=Os[f.charCodeAt(e+3)],l[t++]=r<<2|n>>4,l[t++]=(n&15)<<4|s>>2,l[t++]=(s&3)<<6|A&63;return a},Ui=function(f){for(var c=f.length,i=[],e=0;e<c;e+=2)i.push(f[e+1]<<8|f[e]);return i},_A=function(f){for(var c=f.length,i=[],e=0;e<c;e+=4)i.push(f[e+3]<<24|f[e+2]<<16|f[e+1]<<8|f[e]);return i},Vi=5,na=11,Ps=2,Ms=na-Vi,lo=65536>>Vi,Gl=1<<Vi,vA=Gl-1,uo=1024>>Vi,co=lo+uo,Vl=co,ia=32,fo=Vl+ia,Ns=65536>>na,sa=1<<Ms,Wl=sa-1,ho=function(f,c,i){return f.slice?f.slice(c,i):new Uint16Array(Array.prototype.slice.call(f,c,i))},go=function(f,c,i){return f.slice?f.slice(c,i):new Uint32Array(Array.prototype.slice.call(f,c,i))},po=function(f,c){var i=oo(f),e=Array.isArray(i)?_A(i):new Uint32Array(i),t=Array.isArray(i)?Ui(i):new Uint16Array(i),r=24,n=ho(t,r/2,e[4]/2),s=e[5]===2?ho(t,(r+e[4])/2):go(e,Math.ceil((r+e[4])/4));return new Zl(e[0],e[1],e[2],e[3],n,s)},Zl=function(){function f(c,i,e,t,r,n){this.initialValue=c,this.errorValue=i,this.highStart=e,this.highValueIndex=t,this.index=r,this.data=n}return f.prototype.get=function(c){var i;if(c>=0){if(c<55296||c>56319&&c<=65535)return i=this.index[c>>Vi],i=(i<<Ps)+(c&vA),this.data[i];if(c<=65535)return i=this.index[lo+(c-55296>>Vi)],i=(i<<Ps)+(c&vA),this.data[i];if(c<this.highStart)return i=fo-Ns+(c>>na),i=this.index[i],i+=c>>Vi&Wl,i=this.index[i],i=(i<<Ps)+(c&vA),this.data[i];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},f}(),mo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_o=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),BA=0;BA<mo.length;BA++)_o[mo.charCodeAt(BA)]=BA;var Aa=1,Hs=2,vo=3,ei=4,zl=5,Yl=7,jl=8,Bo=9,yo=10,Xl=11,gs=12,Eo=13,ss=14,aa=15,Jl=function(f){for(var c=[],i=0,e=f.length;i<e;){var t=f.charCodeAt(i++);if(t>=55296&&t<=56319&&i<e){var r=f.charCodeAt(i++);(r&64512)===56320?c.push(((t&1023)<<10)+(r&1023)+65536):(c.push(t),i--)}else c.push(t)}return c},ql=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,f);var i=f.length;if(!i)return"";for(var e=[],t=-1,r="";++t<i;){var n=f[t];n<=65535?e.push(n):(n-=65536,e.push((n>>10)+55296,n%1024+56320)),(t+1===i||e.length>16384)&&(r+=String.fromCharCode.apply(String,e),e.length=0)}return r},Ii=po(ao),li="\xD7",yA="\xF7",eu=function(f){return Ii.get(f)},tu=function(f,c,i){var e=i-2,t=c[e],r=c[i-1],n=c[i];if(r===Hs&&n===vo)return li;if(r===Hs||r===vo||r===ei||n===Hs||n===vo||n===ei)return yA;if(r===jl&&[jl,Bo,Xl,gs].indexOf(n)!==-1||(r===Xl||r===Bo)&&(n===Bo||n===yo)||(r===gs||r===yo)&&n===yo||n===Eo||n===zl||n===Yl||r===Aa)return li;if(r===Eo&&n===ss){for(;t===zl;)t=c[--e];if(t===ss)return li}if(r===aa&&n===aa){for(var s=0;t===aa;)s++,t=c[--e];if(s%2===0)return li}return yA},ru=function(f){var c=Jl(f),i=c.length,e=0,t=0,r=c.map(eu);return{next:function(){if(e>=i)return{done:!0,value:null};for(var n=li;e<i&&(n=tu(c,r,++e))===li;);if(n!==li||e===i){var s=ql.apply(null,c.slice(t,e));return t=e,{value:s,done:!1}}return{done:!0,value:null}}}},nu=function(f){for(var c=ru(f),i=[],e;!(e=c.next()).done;)e.value&&i.push(e.value.slice());return i},iu=function(f){var c=123;if(f.createRange){var i=f.createRange();if(i.getBoundingClientRect){var e=f.createElement("boundtest");e.style.height=c+"px",e.style.display="block",f.body.appendChild(e),i.selectNode(e);var t=i.getBoundingClientRect(),r=Math.round(t.height);if(f.body.removeChild(e),r===c)return!0}}return!1},su=function(f){var c=f.createElement("boundtest");c.style.width="50px",c.style.display="block",c.style.fontSize="12px",c.style.letterSpacing="0px",c.style.wordSpacing="0px",f.body.appendChild(c);var i=f.createRange();c.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var e=c.firstChild,t=O(e.data).map(function(A){return u(A)}),r=0,n={},s=t.every(function(A,a){i.setStart(e,r),i.setEnd(e,r+A.length);var l=i.getBoundingClientRect();r+=A.length;var o=l.x>n.x||l.y>n.y;return n=l,a===0?!0:o});return f.body.removeChild(c),s},wo=function(){return typeof new Image().crossOrigin!="undefined"},Au=function(){return typeof new XMLHttpRequest().responseType=="string"},au=function(f){var c=new Image,i=f.createElement("canvas"),e=i.getContext("2d");if(!e)return!1;c.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{e.drawImage(c,0,0),i.toDataURL()}catch(t){return!1}return!0},Co=function(f){return f[0]===0&&f[1]===255&&f[2]===0&&f[3]===255},ou=function(f){var c=f.createElement("canvas"),i=100;c.width=i,c.height=i;var e=c.getContext("2d");if(!e)return Promise.reject(!1);e.fillStyle="rgb(0, 255, 0)",e.fillRect(0,0,i,i);var t=new Image,r=c.toDataURL();t.src=r;var n=oa(i,i,0,0,t);return e.fillStyle="red",e.fillRect(0,0,i,i),bo(n).then(function(s){e.drawImage(s,0,0);var A=e.getImageData(0,0,i,i).data;e.fillStyle="red",e.fillRect(0,0,i,i);var a=f.createElement("div");return a.style.backgroundImage="url("+r+")",a.style.height=i+"px",Co(A)?bo(oa(i,i,0,0,a)):Promise.reject(!1)}).then(function(s){return e.drawImage(s,0,0),Co(e.getImageData(0,0,i,i).data)}).catch(function(){return!1})},oa=function(f,c,i,e,t){var r="http://www.w3.org/2000/svg",n=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return n.setAttributeNS(null,"width",f.toString()),n.setAttributeNS(null,"height",c.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",i.toString()),s.setAttributeNS(null,"y",e.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),n.appendChild(s),s.appendChild(t),n},bo=function(f){return new Promise(function(c,i){var e=new Image;e.onload=function(){return c(e)},e.onerror=i,e.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(f))})},Wn={get SUPPORT_RANGE_BOUNDS(){var f=iu(document);return Object.defineProperty(Wn,"SUPPORT_RANGE_BOUNDS",{value:f}),f},get SUPPORT_WORD_BREAKING(){var f=Wn.SUPPORT_RANGE_BOUNDS&&su(document);return Object.defineProperty(Wn,"SUPPORT_WORD_BREAKING",{value:f}),f},get SUPPORT_SVG_DRAWING(){var f=au(document);return Object.defineProperty(Wn,"SUPPORT_SVG_DRAWING",{value:f}),f},get SUPPORT_FOREIGNOBJECT_DRAWING(){var f=typeof Array.from=="function"&&typeof window.fetch=="function"?ou(document):Promise.resolve(!1);return Object.defineProperty(Wn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:f}),f},get SUPPORT_CORS_IMAGES(){var f=wo();return Object.defineProperty(Wn,"SUPPORT_CORS_IMAGES",{value:f}),f},get SUPPORT_RESPONSE_TYPE(){var f=Au();return Object.defineProperty(Wn,"SUPPORT_RESPONSE_TYPE",{value:f}),f},get SUPPORT_CORS_XHR(){var f="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Wn,"SUPPORT_CORS_XHR",{value:f}),f},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var f=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Wn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:f}),f}},Ks=function(){function f(c,i){this.text=c,this.bounds=i}return f}(),xo=function(f,c,i,e){var t=So(c,i),r=[],n=0;return t.forEach(function(s){if(i.textDecorationLine.length||s.trim().length>0)if(Wn.SUPPORT_RANGE_BOUNDS){var A=Fo(e,n,s.length).getClientRects();if(A.length>1){var a=$s(s),l=0;a.forEach(function(h){r.push(new Ks(h,W.fromDOMRectList(f,Fo(e,l+n,h.length).getClientRects()))),l+=h.length})}else r.push(new Ks(s,W.fromDOMRectList(f,A)))}else{var o=e.splitText(s.length);r.push(new Ks(s,la(f,e))),e=o}else Wn.SUPPORT_RANGE_BOUNDS||(e=e.splitText(s.length));n+=s.length}),r},la=function(f,c){var i=c.ownerDocument;if(i){var e=i.createElement("html2canvaswrapper");e.appendChild(c.cloneNode(!0));var t=c.parentNode;if(t){t.replaceChild(e,c);var r=m(f,e);return e.firstChild&&t.replaceChild(e.firstChild,e),r}}return W.EMPTY},Fo=function(f,c,i){var e=f.ownerDocument;if(!e)throw new Error("Node has no owner document");var t=e.createRange();return t.setStart(f,c),t.setEnd(f,c+i),t},$s=function(f){if(Wn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var c=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(c.segment(f)).map(function(i){return i.segment})}return nu(f)},ua=function(f,c){if(Wn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(i.segment(f)).map(function(e){return e.segment})}return uu(f,c)},So=function(f,c){return c.letterSpacing!==0?$s(f):ua(f,c)},lu=[32,160,4961,65792,65793,4153,4241],uu=function(f,c){for(var i=Br(f,{lineBreak:c.lineBreak,wordBreak:c.overflowWrap==="break-word"?"break-word":c.wordBreak}),e=[],t,r=function(){if(t.value){var n=t.value.slice(),s=O(n),A="";s.forEach(function(a){lu.indexOf(a)===-1?A+=u(a):(A.length&&e.push(A),e.push(u(a)),A="")}),A.length&&e.push(A)}};!(t=i.next()).done;)r();return e},cu=function(){function f(c,i,e){this.text=fu(i.data,e.textTransform),this.textBounds=xo(c,this.text,e,i)}return f}(),fu=function(f,c){switch(c){case 1:return f.toLowerCase();case 3:return f.replace(hu,EA);case 2:return f.toUpperCase();default:return f}},hu=/(^|\s|:|-|\(|\))([a-z])/g,EA=function(f,c,i){return f.length>0?c+i.toUpperCase():f},To=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.src=e.currentSrc||e.src,t.intrinsicWidth=e.naturalWidth,t.intrinsicHeight=e.naturalHeight,t.context.cache.addImage(t.src),t}return c}(Ti),Gs=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.canvas=e,t.intrinsicWidth=e.width,t.intrinsicHeight=e.height,t}return c}(Ti),Io=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this,r=new XMLSerializer,n=m(i,e);return e.setAttribute("width",n.width+"px"),e.setAttribute("height",n.height+"px"),t.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(e)),t.intrinsicWidth=e.width.baseVal.value,t.intrinsicHeight=e.height.baseVal.value,t.context.cache.addImage(t.svg),t}return c}(Ti),Do=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.value=e.value,t}return c}(Ti),wA=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.start=e.start,t.reversed=typeof e.reversed=="boolean"&&e.reversed===!0,t}return c}(Ti),du=[{type:15,flags:0,unit:"px",number:3}],gu=[{type:16,flags:0,number:50}],pu=function(f){return f.width>f.height?new W(f.left+(f.width-f.height)/2,f.top,f.height,f.height):f.width<f.height?new W(f.left,f.top+(f.height-f.width)/2,f.width,f.width):f},mu=function(f){var c=f.type===_u?new Array(f.value.length+1).join("\u2022"):f.value;return c.length===0?f.placeholder||"":c},Vs="checkbox",CA="radio",_u="password",Lo=707406591,ca=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;switch(t.type=e.type.toLowerCase(),t.checked=e.checked,t.value=mu(e),(t.type===Vs||t.type===CA)&&(t.styles.backgroundColor=3739148031,t.styles.borderTopColor=t.styles.borderRightColor=t.styles.borderBottomColor=t.styles.borderLeftColor=2779096575,t.styles.borderTopWidth=t.styles.borderRightWidth=t.styles.borderBottomWidth=t.styles.borderLeftWidth=1,t.styles.borderTopStyle=t.styles.borderRightStyle=t.styles.borderBottomStyle=t.styles.borderLeftStyle=1,t.styles.backgroundClip=[0],t.styles.backgroundOrigin=[0],t.bounds=pu(t.bounds)),t.type){case Vs:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=du;break;case CA:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=gu;break}return t}return c}(Ti),fa=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this,r=e.options[e.selectedIndex||0];return t.value=r&&r.text||"",t}return c}(Ti),ha=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.value=e.value,t}return c}(Ti),As=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;t.src=e.src,t.width=parseInt(e.width,10)||0,t.height=parseInt(e.height,10)||0,t.backgroundColor=t.styles.backgroundColor;try{if(e.contentWindow&&e.contentWindow.document&&e.contentWindow.document.documentElement){t.tree=ga(i,e.contentWindow.document.documentElement);var r=e.contentWindow.document.documentElement?Xi(i,getComputedStyle(e.contentWindow.document.documentElement).backgroundColor):di.TRANSPARENT,n=e.contentWindow.document.body?Xi(i,getComputedStyle(e.contentWindow.document.body).backgroundColor):di.TRANSPARENT;t.backgroundColor=hi(r)?hi(n)?t.styles.backgroundColor:n:r}}catch(s){}return t}return c}(Ti),gi=["OL","UL","MENU"],bA=function(f,c,i,e){for(var t=c.firstChild,r=void 0;t;t=r)if(r=t.nextSibling,Uo(t)&&t.data.trim().length>0)i.textNodes.push(new cu(f,t,i.styles));else if(ms(t))if(Di(t)&&t.assignedNodes)t.assignedNodes().forEach(function(s){return bA(f,s,i,e)});else{var n=da(f,t);n.styles.isVisible()&&(ps(t,n,e)?n.flags|=4:pa(n.styles)&&(n.flags|=2),gi.indexOf(t.tagName)!==-1&&(n.flags|=8),i.elements.push(n),t.slot,t.shadowRoot?bA(f,t.shadowRoot,n,e):!Ci(t)&&!Ro(t)&&!SA(t)&&bA(f,t,n,e))}},da=function(f,c){return zs(c)?new To(f,c):ma(c)?new Gs(f,c):Ro(c)?new Io(f,c):Ws(c)?new Do(f,c):vs(c)?new wA(f,c):FA(c)?new ca(f,c):SA(c)?new fa(f,c):Ci(c)?new ha(f,c):ko(c)?new As(f,c):new Ti(f,c)},ga=function(f,c){var i=da(f,c);return i.flags|=4,bA(f,c,i,i),i},ps=function(f,c,i){return c.styles.isPositionedWithZIndex()||c.styles.opacity<1||c.styles.isTransformed()||Zs(f)&&i.styles.isTransparent()},pa=function(f){return f.isPositioned()||f.isFloating()},Uo=function(f){return f.nodeType===Node.TEXT_NODE},ms=function(f){return f.nodeType===Node.ELEMENT_NODE},_s=function(f){return ms(f)&&typeof f.style!="undefined"&&!xA(f)},xA=function(f){return typeof f.className=="object"},Ws=function(f){return f.tagName==="LI"},vs=function(f){return f.tagName==="OL"},FA=function(f){return f.tagName==="INPUT"},vu=function(f){return f.tagName==="HTML"},Ro=function(f){return f.tagName==="svg"},Zs=function(f){return f.tagName==="BODY"},ma=function(f){return f.tagName==="CANVAS"},Qo=function(f){return f.tagName==="VIDEO"},zs=function(f){return f.tagName==="IMG"},ko=function(f){return f.tagName==="IFRAME"},_a=function(f){return f.tagName==="STYLE"},Bu=function(f){return f.tagName==="SCRIPT"},Ci=function(f){return f.tagName==="TEXTAREA"},SA=function(f){return f.tagName==="SELECT"},Di=function(f){return f.tagName==="SLOT"},bi=function(f){return f.tagName.indexOf("-")>0},Oo=function(){function f(){this.counters={}}return f.prototype.getCounterValue=function(c){var i=this.counters[c];return i&&i.length?i[i.length-1]:1},f.prototype.getCounterValues=function(c){var i=this.counters[c];return i||[]},f.prototype.pop=function(c){var i=this;c.forEach(function(e){return i.counters[e].pop()})},f.prototype.parse=function(c){var i=this,e=c.counterIncrement,t=c.counterReset,r=!0;e!==null&&e.forEach(function(s){var A=i.counters[s.counter];A&&s.increment!==0&&(r=!1,A.length||A.push(1),A[Math.max(0,A.length-1)]+=s.increment)});var n=[];return r&&t.forEach(function(s){var A=i.counters[s.counter];n.push(s.counter),A||(A=i.counters[s.counter]=[]),A.push(s.reset)}),n},f}(),Po={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"]},va={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"]},yu={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"]},Eu={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"]},Bs=function(f,c,i,e,t,r){return f<c||f>i?js(f,t,r.length>0):e.integers.reduce(function(n,s,A){for(;f>=s;)f-=s,n+=e.values[A];return n},"")+r},Ba=function(f,c,i,e){var t="";do i||f--,t=e(f)+t,f/=c;while(f*c>=c);return t},fn=function(f,c,i,e,t){var r=i-c+1;return(f<0?"-":"")+(Ba(Math.abs(f),r,e,function(n){return u(Math.floor(n%r)+c)})+t)},ti=function(f,c,i){i===void 0&&(i=". ");var e=c.length;return Ba(Math.abs(f),e,!1,function(t){return c[Math.floor(t%e)]})+i},ys=1,Wi=2,Zi=4,Ys=8,Ri=function(f,c,i,e,t,r){if(f<-9999||f>9999)return js(f,4,t.length>0);var n=Math.abs(f),s=t;if(n===0)return c[0]+s;for(var A=0;n>0&&A<=4;A++){var a=n%10;a===0&&Tn(r,ys)&&s!==""?s=c[a]+s:a>1||a===1&&A===0||a===1&&A===1&&Tn(r,Wi)||a===1&&A===1&&Tn(r,Zi)&&f>100||a===1&&A>1&&Tn(r,Ys)?s=c[a]+(A>0?i[A-1]:"")+s:a===1&&A>0&&(s=i[A-1]+s),n=Math.floor(n/10)}return(f<0?e:"")+s},Mo="\u5341\u767E\u5343\u842C",zi="\u62FE\u4F70\u4EDF\u842C",ya="\u30DE\u30A4\u30CA\u30B9",Ea="\uB9C8\uC774\uB108\uC2A4",js=function(f,c,i){var e=i?". ":"",t=i?"\u3001":"",r=i?", ":"",n=i?" ":"";switch(c){case 0:return"\u2022"+n;case 1:return"\u25E6"+n;case 2:return"\u25FE"+n;case 5:var s=fn(f,48,57,!0,e);return s.length<4?"0"+s:s;case 4:return ti(f,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",t);case 6:return Bs(f,1,3999,Po,3,e).toLowerCase();case 7:return Bs(f,1,3999,Po,3,e);case 8:return fn(f,945,969,!1,e);case 9:return fn(f,97,122,!1,e);case 10:return fn(f,65,90,!1,e);case 11:return fn(f,1632,1641,!0,e);case 12:case 49:return Bs(f,1,9999,va,3,e);case 35:return Bs(f,1,9999,va,3,e).toLowerCase();case 13:return fn(f,2534,2543,!0,e);case 14:case 30:return fn(f,6112,6121,!0,e);case 15:return ti(f,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",t);case 16:return ti(f,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",t);case 17:case 48:return Ri(f,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Mo,"\u8CA0",t,Wi|Zi|Ys);case 47:return Ri(f,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",zi,"\u8CA0",t,ys|Wi|Zi|Ys);case 42:return Ri(f,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Mo,"\u8D1F",t,Wi|Zi|Ys);case 41:return Ri(f,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",zi,"\u8D1F",t,ys|Wi|Zi|Ys);case 26:return Ri(f,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",ya,t,0);case 25:return Ri(f,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",ya,t,ys|Wi|Zi);case 31:return Ri(f,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Ea,r,ys|Wi|Zi);case 33:return Ri(f,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Ea,r,0);case 32:return Ri(f,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Ea,r,ys|Wi|Zi);case 18:return fn(f,2406,2415,!0,e);case 20:return Bs(f,1,19999,Eu,3,e);case 21:return fn(f,2790,2799,!0,e);case 22:return fn(f,2662,2671,!0,e);case 22:return Bs(f,1,10999,yu,3,e);case 23:return ti(f,"\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 ti(f,"\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 fn(f,3302,3311,!0,e);case 28:return ti(f,"\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",t);case 29:return ti(f,"\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",t);case 34:return fn(f,3792,3801,!0,e);case 37:return fn(f,6160,6169,!0,e);case 38:return fn(f,4160,4169,!0,e);case 39:return fn(f,2918,2927,!0,e);case 40:return fn(f,1776,1785,!0,e);case 43:return fn(f,3046,3055,!0,e);case 44:return fn(f,3174,3183,!0,e);case 45:return fn(f,3664,3673,!0,e);case 46:return fn(f,3872,3881,!0,e);case 3:default:return fn(f,48,57,!0,e)}},TA="data-html2canvas-ignore",wa=function(){function f(c,i,e){if(this.context=c,this.options=e,this.scrolledElements=[],this.referenceElement=i,this.counters=new Oo,this.quoteDepth=0,!i.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(i.ownerDocument.documentElement,!1)}return f.prototype.toIFrame=function(c,i){var e=this,t=IA(c,i);if(!t.contentWindow)return Promise.reject("Unable to find iframe window");var r=c.defaultView.pageXOffset,n=c.defaultView.pageYOffset,s=t.contentWindow,A=s.document,a=Ca(t).then(function(){return me(e,void 0,void 0,function(){var l,o;return Fe(this,function(h){switch(h.label){case 0:return this.scrolledElements.forEach(ba),s&&(s.scrollTo(i.left,i.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(s.scrollY!==i.top||s.scrollX!==i.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-i.left,s.scrollY-i.top,0,0))),l=this.options.onclone,o=this.clonedReferenceElement,typeof o=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:A.fonts&&A.fonts.ready?[4,A.fonts.ready]:[3,2];case 1:h.sent(),h.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Cu(A)]:[3,4];case 3:h.sent(),h.label=4;case 4:return typeof l=="function"?[2,Promise.resolve().then(function(){return l(A,o)}).then(function(){return t})]:[2,t]}})})});return A.open(),A.write(xu(document.doctype)+"<html></html>"),No(this.referenceElement.ownerDocument,r,n),A.replaceChild(A.adoptNode(this.documentElement),A.documentElement),A.close(),a},f.prototype.createElementClone=function(c){if(ni(c,2))debugger;if(ma(c))return this.createCanvasClone(c);if(Qo(c))return this.createVideoClone(c);if(_a(c))return this.createStyleClone(c);var i=c.cloneNode(!1);return zs(i)&&(zs(c)&&c.currentSrc&&c.currentSrc!==c.src&&(i.src=c.currentSrc,i.srcset=""),i.loading==="lazy"&&(i.loading="eager")),bi(i)?this.createCustomElementClone(i):i},f.prototype.createCustomElementClone=function(c){var i=document.createElement("html2canvascustomelement");return DA(c.style,i),i},f.prototype.createStyleClone=function(c){try{var i=c.sheet;if(i&&i.cssRules){var e=[].slice.call(i.cssRules,0).reduce(function(r,n){return n&&typeof n.cssText=="string"?r+n.cssText:r},""),t=c.cloneNode(!1);return t.textContent=e,t}}catch(r){if(this.context.logger.error("Unable to access cssRules property",r),r.name!=="SecurityError")throw r}return c.cloneNode(!1)},f.prototype.createCanvasClone=function(c){var i;if(this.options.inlineImages&&c.ownerDocument){var e=c.ownerDocument.createElement("img");try{return e.src=c.toDataURL(),e}catch(a){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",c)}}var t=c.cloneNode(!1);try{t.width=c.width,t.height=c.height;var r=c.getContext("2d"),n=t.getContext("2d");if(n)if(!this.options.allowTaint&&r)n.putImageData(r.getImageData(0,0,c.width,c.height),0,0);else{var s=(i=c.getContext("webgl2"))!==null&&i!==void 0?i:c.getContext("webgl");if(s){var A=s.getContextAttributes();(A==null?void 0:A.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",c)}n.drawImage(c,0,0)}return t}catch(a){this.context.logger.info("Unable to clone canvas as it is tainted",c)}return t},f.prototype.createVideoClone=function(c){var i=c.ownerDocument.createElement("canvas");i.width=c.offsetWidth,i.height=c.offsetHeight;var e=i.getContext("2d");try{return e&&(e.drawImage(c,0,0,i.width,i.height),this.options.allowTaint||e.getImageData(0,0,i.width,i.height)),i}catch(r){this.context.logger.info("Unable to clone video as it is tainted",c)}var t=c.ownerDocument.createElement("canvas");return t.width=c.offsetWidth,t.height=c.offsetHeight,t},f.prototype.appendChildNode=function(c,i,e){(!ms(i)||!Bu(i)&&!i.hasAttribute(TA)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(i)))&&(!this.options.copyStyles||!ms(i)||!_a(i))&&c.appendChild(this.cloneNode(i,e))},f.prototype.cloneChildNodes=function(c,i,e){for(var t=this,r=c.shadowRoot?c.shadowRoot.firstChild:c.firstChild;r;r=r.nextSibling)if(ms(r)&&Di(r)&&typeof r.assignedNodes=="function"){var n=r.assignedNodes();n.length&&n.forEach(function(s){return t.appendChildNode(i,s,e)})}else this.appendChildNode(i,r,e)},f.prototype.cloneNode=function(c,i){if(Uo(c))return document.createTextNode(c.data);if(!c.ownerDocument)return c.cloneNode(!1);var e=c.ownerDocument.defaultView;if(e&&ms(c)&&(_s(c)||xA(c))){var t=this.createElementClone(c);t.style.transitionProperty="none";var r=e.getComputedStyle(c),n=e.getComputedStyle(c,":before"),s=e.getComputedStyle(c,":after");this.referenceElement===c&&_s(t)&&(this.clonedReferenceElement=t),Zs(t)&&Fa(t);var A=this.counters.parse(new is(this.context,r)),a=this.resolvePseudoContent(c,t,n,Es.BEFORE);bi(c)&&(i=!0),Qo(c)||this.cloneChildNodes(c,t,i),a&&t.insertBefore(a,t.firstChild);var l=this.resolvePseudoContent(c,t,s,Es.AFTER);return l&&t.appendChild(l),this.counters.pop(A),(r&&(this.options.copyStyles||xA(c))&&!ko(c)||i)&&DA(r,t),(c.scrollTop!==0||c.scrollLeft!==0)&&this.scrolledElements.push([t,c.scrollLeft,c.scrollTop]),(Ci(c)||SA(c))&&(Ci(t)||SA(t))&&(t.value=c.value),t}return c.cloneNode(!1)},f.prototype.resolvePseudoContent=function(c,i,e,t){var r=this;if(e){var n=e.content,s=i.ownerDocument;if(!(!s||!n||n==="none"||n==="-moz-alt-content"||e.display==="none")){this.counters.parse(new is(this.context,e));var A=new $l(this.context,e),a=s.createElement("html2canvaspseudoelement");DA(e,a),A.content.forEach(function(o){if(o.type===0)a.appendChild(s.createTextNode(o.value));else if(o.type===22){var h=s.createElement("img");h.src=o.value,h.style.opacity="1",a.appendChild(h)}else if(o.type===18){if(o.name==="attr"){var d=o.values.filter(Qt);d.length&&a.appendChild(s.createTextNode(c.getAttribute(d[0].value)||""))}else if(o.name==="counter"){var p=o.values.filter(un),v=p[0],b=p[1];if(v&&Qt(v)){var S=r.counters.getCounterValue(v.value),F=b&&Qt(b)?zA.parse(r.context,b.value):3;a.appendChild(s.createTextNode(js(S,F,!1)))}}else if(o.name==="counters"){var te=o.values.filter(un),v=te[0],fe=te[1],b=te[2];if(v&&Qt(v)){var oe=r.counters.getCounterValues(v.value),pe=b&&Qt(b)?zA.parse(r.context,b.value):3,Te=fe&&fe.type===0?fe.value:"",Ke=oe.map(function(st){return js(st,pe,!1)}).join(Te);a.appendChild(s.createTextNode(Ke))}}}else if(o.type===20)switch(o.value){case"open-quote":a.appendChild(s.createTextNode(so(A.quotes,r.quoteDepth++,!0)));break;case"close-quote":a.appendChild(s.createTextNode(so(A.quotes,--r.quoteDepth,!1)));break;default:a.appendChild(s.createTextNode(o.value))}}),a.className=UA+" "+xa;var l=t===Es.BEFORE?" "+UA:" "+xa;return xA(i)?i.className.baseValue+=l:i.className+=l,a}}},f.destroy=function(c){return c.parentNode?(c.parentNode.removeChild(c),!0):!1},f}(),Es;(function(f){f[f.BEFORE=0]="BEFORE",f[f.AFTER=1]="AFTER"})(Es||(Es={}));var IA=function(f,c){var i=f.createElement("iframe");return i.className="html2canvas-container",i.style.visibility="hidden",i.style.position="fixed",i.style.left="-10000px",i.style.top="0px",i.style.border="0",i.width=c.width.toString(),i.height=c.height.toString(),i.scrolling="no",i.setAttribute(TA,"true"),f.body.appendChild(i),i},wu=function(f){return new Promise(function(c){if(f.complete){c();return}if(!f.src){c();return}f.onload=c,f.onerror=c})},Cu=function(f){return Promise.all([].slice.call(f.images,0).map(wu))},Ca=function(f){return new Promise(function(c,i){var e=f.contentWindow;if(!e)return i("No window assigned for iframe");var t=e.document;e.onload=f.onload=function(){e.onload=f.onload=null;var r=setInterval(function(){t.body.childNodes.length>0&&t.readyState==="complete"&&(clearInterval(r),c(f))},50)}})},bu=["all","d","content"],DA=function(f,c){for(var i=f.length-1;i>=0;i--){var e=f.item(i);bu.indexOf(e)===-1&&c.style.setProperty(e,f.getPropertyValue(e))}return c},xu=function(f){var c="";return f&&(c+="<!DOCTYPE ",f.name&&(c+=f.name),f.internalSubset&&(c+=f.internalSubset),f.publicId&&(c+='"'+f.publicId+'"'),f.systemId&&(c+='"'+f.systemId+'"'),c+=">"),c},No=function(f,c,i){f&&f.defaultView&&(c!==f.defaultView.pageXOffset||i!==f.defaultView.pageYOffset)&&f.defaultView.scrollTo(c,i)},ba=function(f){var c=f[0],i=f[1],e=f[2];c.scrollLeft=i,c.scrollTop=e},LA=":before",Fu=":after",UA="___html2canvas___pseudoelement_before",xa="___html2canvas___pseudoelement_after",Ho=`{
content: "" !important;
display: none !important;
}`,Fa=function(f){Su(f,"."+UA+LA+Ho+`
.`+xa+Fu+Ho)},Su=function(f,c){var i=f.ownerDocument;if(i){var e=i.createElement("style");e.textContent=c,f.appendChild(e)}},RA=function(){function f(){}return f.getOrigin=function(c){var i=f._link;return i?(i.href=c,i.href=i.href,i.protocol+i.hostname+i.port):"about:blank"},f.isSameOrigin=function(c){return f.getOrigin(c)===f._origin},f.setContext=function(c){f._link=c.document.createElement("a"),f._origin=f.getOrigin(c.location.href)},f._origin="about:blank",f}(),Tu=function(){function f(c,i){this.context=c,this._options=i,this._cache={}}return f.prototype.addImage=function(c){var i=Promise.resolve();return this.has(c)||(Ia(c)||$o(c))&&(this._cache[c]=this.loadImage(c)).catch(function(){}),i},f.prototype.match=function(c){return this._cache[c]},f.prototype.loadImage=function(c){return me(this,void 0,void 0,function(){var i,e,t,r,n=this;return Fe(this,function(s){switch(s.label){case 0:return i=RA.isSameOrigin(c),e=!Ta(c)&&this._options.useCORS===!0&&Wn.SUPPORT_CORS_IMAGES&&!i,t=!Ta(c)&&!i&&!Ia(c)&&typeof this._options.proxy=="string"&&Wn.SUPPORT_CORS_XHR&&!e,!i&&this._options.allowTaint===!1&&!Ta(c)&&!Ia(c)&&!t&&!e?[2]:(r=c,t?[4,this.proxy(r)]:[3,2]);case 1:r=s.sent(),s.label=2;case 2:return this.context.logger.debug("Added image "+c.substring(0,256)),[4,new Promise(function(A,a){var l=new Image;l.onload=function(){return A(l)},l.onerror=a,(Go(r)||e)&&(l.crossOrigin="anonymous"),l.src=r,l.complete===!0&&setTimeout(function(){return A(l)},500),n._options.imageTimeout>0&&setTimeout(function(){return a("Timed out ("+n._options.imageTimeout+"ms) loading image")},n._options.imageTimeout)})];case 3:return[2,s.sent()]}})})},f.prototype.has=function(c){return typeof this._cache[c]!="undefined"},f.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},f.prototype.proxy=function(c){var i=this,e=this._options.proxy;if(!e)throw new Error("No proxy defined");var t=c.substring(0,256);return new Promise(function(r,n){var s=Wn.SUPPORT_RESPONSE_TYPE?"blob":"text",A=new XMLHttpRequest;A.onload=function(){if(A.status===200)if(s==="text")r(A.response);else{var o=new FileReader;o.addEventListener("load",function(){return r(o.result)},!1),o.addEventListener("error",function(h){return n(h)},!1),o.readAsDataURL(A.response)}else n("Failed to proxy resource "+t+" with status code "+A.status)},A.onerror=n;var a=e.indexOf("?")>-1?"&":"?";if(A.open("GET",""+e+a+"url="+encodeURIComponent(c)+"&responseType="+s),s!=="text"&&A instanceof XMLHttpRequest&&(A.responseType=s),i._options.imageTimeout){var l=i._options.imageTimeout;A.timeout=l,A.ontimeout=function(){return n("Timed out ("+l+"ms) proxying "+t)}}A.send()})},f}(),Iu=/^data:image\/svg\+xml/i,Sa=/^data:image\/.*;base64,/i,Ko=/^data:image\/.*/i,$o=function(f){return Wn.SUPPORT_SVG_DRAWING||!Da(f)},Ta=function(f){return Ko.test(f)},Go=function(f){return Sa.test(f)},Ia=function(f){return f.substr(0,4)==="blob"},Da=function(f){return f.substr(-3).toLowerCase()==="svg"||Iu.test(f)},er=function(){function f(c,i){this.type=0,this.x=c,this.y=i}return f.prototype.add=function(c,i){return new f(this.x+c,this.y+i)},f}(),as=function(f,c,i){return new er(f.x+(c.x-f.x)*i,f.y+(c.y-f.y)*i)},QA=function(){function f(c,i,e,t){this.type=1,this.start=c,this.startControl=i,this.endControl=e,this.end=t}return f.prototype.subdivide=function(c,i){var e=as(this.start,this.startControl,c),t=as(this.startControl,this.endControl,c),r=as(this.endControl,this.end,c),n=as(e,t,c),s=as(t,r,c),A=as(n,s,c);return i?new f(this.start,e,n,A):new f(A,s,r,this.end)},f.prototype.add=function(c,i){return new f(this.start.add(c,i),this.startControl.add(c,i),this.endControl.add(c,i),this.end.add(c,i))},f.prototype.reverse=function(){return new f(this.end,this.endControl,this.startControl,this.start)},f}(),ii=function(f){return f.type===1},Vo=function(){function f(c){var i=c.styles,e=c.bounds,t=Yi(i.borderTopLeftRadius,e.width,e.height),r=t[0],n=t[1],s=Yi(i.borderTopRightRadius,e.width,e.height),A=s[0],a=s[1],l=Yi(i.borderBottomRightRadius,e.width,e.height),o=l[0],h=l[1],d=Yi(i.borderBottomLeftRadius,e.width,e.height),p=d[0],v=d[1],b=[];b.push((r+A)/e.width),b.push((p+o)/e.width),b.push((n+v)/e.height),b.push((a+h)/e.height);var S=Math.max.apply(Math,b);S>1&&(r/=S,n/=S,A/=S,a/=S,o/=S,h/=S,p/=S,v/=S);var F=e.width-A,te=e.height-h,fe=e.width-o,oe=e.height-v,pe=i.borderTopWidth,Te=i.borderRightWidth,Ke=i.borderBottomWidth,xe=i.borderLeftWidth,$e=Wr(i.paddingTop,c.bounds.width),st=Wr(i.paddingRight,c.bounds.width),Pe=Wr(i.paddingBottom,c.bounds.width),Bt=Wr(i.paddingLeft,c.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||n>0?In(e.left+xe/3,e.top+pe/3,r-xe/3,n-pe/3,cn.TOP_LEFT):new er(e.left+xe/3,e.top+pe/3),this.topRightBorderDoubleOuterBox=r>0||n>0?In(e.left+F,e.top+pe/3,A-Te/3,a-pe/3,cn.TOP_RIGHT):new er(e.left+e.width-Te/3,e.top+pe/3),this.bottomRightBorderDoubleOuterBox=o>0||h>0?In(e.left+fe,e.top+te,o-Te/3,h-Ke/3,cn.BOTTOM_RIGHT):new er(e.left+e.width-Te/3,e.top+e.height-Ke/3),this.bottomLeftBorderDoubleOuterBox=p>0||v>0?In(e.left+xe/3,e.top+oe,p-xe/3,v-Ke/3,cn.BOTTOM_LEFT):new er(e.left+xe/3,e.top+e.height-Ke/3),this.topLeftBorderDoubleInnerBox=r>0||n>0?In(e.left+xe*2/3,e.top+pe*2/3,r-xe*2/3,n-pe*2/3,cn.TOP_LEFT):new er(e.left+xe*2/3,e.top+pe*2/3),this.topRightBorderDoubleInnerBox=r>0||n>0?In(e.left+F,e.top+pe*2/3,A-Te*2/3,a-pe*2/3,cn.TOP_RIGHT):new er(e.left+e.width-Te*2/3,e.top+pe*2/3),this.bottomRightBorderDoubleInnerBox=o>0||h>0?In(e.left+fe,e.top+te,o-Te*2/3,h-Ke*2/3,cn.BOTTOM_RIGHT):new er(e.left+e.width-Te*2/3,e.top+e.height-Ke*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||v>0?In(e.left+xe*2/3,e.top+oe,p-xe*2/3,v-Ke*2/3,cn.BOTTOM_LEFT):new er(e.left+xe*2/3,e.top+e.height-Ke*2/3),this.topLeftBorderStroke=r>0||n>0?In(e.left+xe/2,e.top+pe/2,r-xe/2,n-pe/2,cn.TOP_LEFT):new er(e.left+xe/2,e.top+pe/2),this.topRightBorderStroke=r>0||n>0?In(e.left+F,e.top+pe/2,A-Te/2,a-pe/2,cn.TOP_RIGHT):new er(e.left+e.width-Te/2,e.top+pe/2),this.bottomRightBorderStroke=o>0||h>0?In(e.left+fe,e.top+te,o-Te/2,h-Ke/2,cn.BOTTOM_RIGHT):new er(e.left+e.width-Te/2,e.top+e.height-Ke/2),this.bottomLeftBorderStroke=p>0||v>0?In(e.left+xe/2,e.top+oe,p-xe/2,v-Ke/2,cn.BOTTOM_LEFT):new er(e.left+xe/2,e.top+e.height-Ke/2),this.topLeftBorderBox=r>0||n>0?In(e.left,e.top,r,n,cn.TOP_LEFT):new er(e.left,e.top),this.topRightBorderBox=A>0||a>0?In(e.left+F,e.top,A,a,cn.TOP_RIGHT):new er(e.left+e.width,e.top),this.bottomRightBorderBox=o>0||h>0?In(e.left+fe,e.top+te,o,h,cn.BOTTOM_RIGHT):new er(e.left+e.width,e.top+e.height),this.bottomLeftBorderBox=p>0||v>0?In(e.left,e.top+oe,p,v,cn.BOTTOM_LEFT):new er(e.left,e.top+e.height),this.topLeftPaddingBox=r>0||n>0?In(e.left+xe,e.top+pe,Math.max(0,r-xe),Math.max(0,n-pe),cn.TOP_LEFT):new er(e.left+xe,e.top+pe),this.topRightPaddingBox=A>0||a>0?In(e.left+Math.min(F,e.width-Te),e.top+pe,F>e.width+Te?0:Math.max(0,A-Te),Math.max(0,a-pe),cn.TOP_RIGHT):new er(e.left+e.width-Te,e.top+pe),this.bottomRightPaddingBox=o>0||h>0?In(e.left+Math.min(fe,e.width-xe),e.top+Math.min(te,e.height-Ke),Math.max(0,o-Te),Math.max(0,h-Ke),cn.BOTTOM_RIGHT):new er(e.left+e.width-Te,e.top+e.height-Ke),this.bottomLeftPaddingBox=p>0||v>0?In(e.left+xe,e.top+Math.min(oe,e.height-Ke),Math.max(0,p-xe),Math.max(0,v-Ke),cn.BOTTOM_LEFT):new er(e.left+xe,e.top+e.height-Ke),this.topLeftContentBox=r>0||n>0?In(e.left+xe+Bt,e.top+pe+$e,Math.max(0,r-(xe+Bt)),Math.max(0,n-(pe+$e)),cn.TOP_LEFT):new er(e.left+xe+Bt,e.top+pe+$e),this.topRightContentBox=A>0||a>0?In(e.left+Math.min(F,e.width+xe+Bt),e.top+pe+$e,F>e.width+xe+Bt?0:A-xe+Bt,a-(pe+$e),cn.TOP_RIGHT):new er(e.left+e.width-(Te+st),e.top+pe+$e),this.bottomRightContentBox=o>0||h>0?In(e.left+Math.min(fe,e.width-(xe+Bt)),e.top+Math.min(te,e.height+pe+$e),Math.max(0,o-(Te+st)),h-(Ke+Pe),cn.BOTTOM_RIGHT):new er(e.left+e.width-(Te+st),e.top+e.height-(Ke+Pe)),this.bottomLeftContentBox=p>0||v>0?In(e.left+xe+Bt,e.top+oe,Math.max(0,p-(xe+Bt)),v-(Ke+Pe),cn.BOTTOM_LEFT):new er(e.left+xe+Bt,e.top+e.height-(Ke+Pe))}return f}(),cn;(function(f){f[f.TOP_LEFT=0]="TOP_LEFT",f[f.TOP_RIGHT=1]="TOP_RIGHT",f[f.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",f[f.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(cn||(cn={}));var In=function(f,c,i,e,t){var r=4*((Math.sqrt(2)-1)/3),n=i*r,s=e*r,A=f+i,a=c+e;switch(t){case cn.TOP_LEFT:return new QA(new er(f,a),new er(f,a-s),new er(A-n,c),new er(A,c));case cn.TOP_RIGHT:return new QA(new er(f,c),new er(f+n,c),new er(A,a-s),new er(A,a));case cn.BOTTOM_RIGHT:return new QA(new er(A,c),new er(A,c+s),new er(f+n,a),new er(f,a));case cn.BOTTOM_LEFT:default:return new QA(new er(A,a),new er(A-n,a),new er(f,c+s),new er(f,c))}},kA=function(f){return[f.topLeftBorderBox,f.topRightBorderBox,f.bottomRightBorderBox,f.bottomLeftBorderBox]},OA=function(f){return[f.topLeftContentBox,f.topRightContentBox,f.bottomRightContentBox,f.bottomLeftContentBox]},PA=function(f){return[f.topLeftPaddingBox,f.topRightPaddingBox,f.bottomRightPaddingBox,f.bottomLeftPaddingBox]},Wo=function(){function f(c,i,e){this.offsetX=c,this.offsetY=i,this.matrix=e,this.type=0,this.target=6}return f}(),Xs=function(){function f(c,i){this.path=c,this.target=i,this.type=1}return f}(),Du=function(){function f(c){this.opacity=c,this.type=2,this.target=6}return f}(),Zo=function(f){return f.type===0},zo=function(f){return f.type===1},Lu=function(f){return f.type===2},Yo=function(f,c){return f.length===c.length?f.some(function(i,e){return i===c[e]}):!1},Uu=function(f,c,i,e,t){return f.map(function(r,n){switch(n){case 0:return r.add(c,i);case 1:return r.add(c+e,i);case 2:return r.add(c+e,i+t);case 3:return r.add(c,i+t)}return r})},La=function(){function f(c){this.element=c,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return f}(),jo=function(){function f(c,i){if(this.container=c,this.parent=i,this.effects=[],this.curves=new Vo(this.container),this.container.styles.opacity<1&&this.effects.push(new Du(this.container.styles.opacity)),this.container.styles.transform!==null){var e=this.container.bounds.left+this.container.styles.transformOrigin[0].number,t=this.container.bounds.top+this.container.styles.transformOrigin[1].number,r=this.container.styles.transform;this.effects.push(new Wo(e,t,r))}if(this.container.styles.overflowX!==0){var n=kA(this.curves),s=PA(this.curves);Yo(n,s)?this.effects.push(new Xs(n,6)):(this.effects.push(new Xs(n,2)),this.effects.push(new Xs(s,4)))}}return f.prototype.getEffects=function(c){for(var i=[2,3].indexOf(this.container.styles.position)===-1,e=this.parent,t=this.effects.slice(0);e;){var r=e.effects.filter(function(A){return!zo(A)});if(i||e.container.styles.position!==0||!e.parent){if(t.unshift.apply(t,r),i=[2,3].indexOf(e.container.styles.position)===-1,e.container.styles.overflowX!==0){var n=kA(e.curves),s=PA(e.curves);Yo(n,s)||t.unshift(new Xs(s,6))}}else t.unshift.apply(t,r);e=e.parent}return t.filter(function(A){return Tn(A.target,c)})},f}(),Ua=function(f,c,i,e){f.container.elements.forEach(function(t){var r=Tn(t.flags,4),n=Tn(t.flags,2),s=new jo(t,f);Tn(t.styles.display,2048)&&e.push(s);var A=Tn(t.flags,8)?[]:e;if(r||n){var a=r||t.styles.isPositioned()?i:c,l=new La(s);if(t.styles.isPositioned()||t.styles.opacity<1||t.styles.isTransformed()){var o=t.styles.zIndex.order;if(o<0){var h=0;a.negativeZIndex.some(function(p,v){return o>p.element.container.styles.zIndex.order?(h=v,!1):h>0}),a.negativeZIndex.splice(h,0,l)}else if(o>0){var d=0;a.positiveZIndex.some(function(p,v){return o>=p.element.container.styles.zIndex.order?(d=v+1,!1):d>0}),a.positiveZIndex.splice(d,0,l)}else a.zeroOrAutoZIndexOrTransformedOrOpacity.push(l)}else t.styles.isFloating()?a.nonPositionedFloats.push(l):a.nonPositionedInlineLevel.push(l);Ua(s,l,r?l:i,A)}else t.styles.isInlineLevel()?c.inlineLevel.push(s):c.nonInlineLevel.push(s),Ua(s,c,i,A);Tn(t.flags,8)&&Xo(t,A)})},Xo=function(f,c){for(var i=f instanceof wA?f.start:1,e=f instanceof wA?f.reversed:!1,t=0;t<c.length;t++){var r=c[t];r.container instanceof Do&&typeof r.container.value=="number"&&r.container.value!==0&&(i=r.container.value),r.listValue=js(i,r.container.styles.listStyleType,!0),i+=e?-1:1}},Ru=function(f){var c=new jo(f,null),i=new La(c),e=[];return Ua(c,i,i,e),Xo(c.container,e),i},Jo=function(f,c){switch(c){case 0:return pi(f.topLeftBorderBox,f.topLeftPaddingBox,f.topRightBorderBox,f.topRightPaddingBox);case 1:return pi(f.topRightBorderBox,f.topRightPaddingBox,f.bottomRightBorderBox,f.bottomRightPaddingBox);case 2:return pi(f.bottomRightBorderBox,f.bottomRightPaddingBox,f.bottomLeftBorderBox,f.bottomLeftPaddingBox);case 3:default:return pi(f.bottomLeftBorderBox,f.bottomLeftPaddingBox,f.topLeftBorderBox,f.topLeftPaddingBox)}},Qu=function(f,c){switch(c){case 0:return pi(f.topLeftBorderBox,f.topLeftBorderDoubleOuterBox,f.topRightBorderBox,f.topRightBorderDoubleOuterBox);case 1:return pi(f.topRightBorderBox,f.topRightBorderDoubleOuterBox,f.bottomRightBorderBox,f.bottomRightBorderDoubleOuterBox);case 2:return pi(f.bottomRightBorderBox,f.bottomRightBorderDoubleOuterBox,f.bottomLeftBorderBox,f.bottomLeftBorderDoubleOuterBox);case 3:default:return pi(f.bottomLeftBorderBox,f.bottomLeftBorderDoubleOuterBox,f.topLeftBorderBox,f.topLeftBorderDoubleOuterBox)}},qo=function(f,c){switch(c){case 0:return pi(f.topLeftBorderDoubleInnerBox,f.topLeftPaddingBox,f.topRightBorderDoubleInnerBox,f.topRightPaddingBox);case 1:return pi(f.topRightBorderDoubleInnerBox,f.topRightPaddingBox,f.bottomRightBorderDoubleInnerBox,f.bottomRightPaddingBox);case 2:return pi(f.bottomRightBorderDoubleInnerBox,f.bottomRightPaddingBox,f.bottomLeftBorderDoubleInnerBox,f.bottomLeftPaddingBox);case 3:default:return pi(f.bottomLeftBorderDoubleInnerBox,f.bottomLeftPaddingBox,f.topLeftBorderDoubleInnerBox,f.topLeftPaddingBox)}},ku=function(f,c){switch(c){case 0:return MA(f.topLeftBorderStroke,f.topRightBorderStroke);case 1:return MA(f.topRightBorderStroke,f.bottomRightBorderStroke);case 2:return MA(f.bottomRightBorderStroke,f.bottomLeftBorderStroke);case 3:default:return MA(f.bottomLeftBorderStroke,f.topLeftBorderStroke)}},MA=function(f,c){var i=[];return ii(f)?i.push(f.subdivide(.5,!1)):i.push(f),ii(c)?i.push(c.subdivide(.5,!0)):i.push(c),i},pi=function(f,c,i,e){var t=[];return ii(f)?t.push(f.subdivide(.5,!1)):t.push(f),ii(i)?t.push(i.subdivide(.5,!0)):t.push(i),ii(e)?t.push(e.subdivide(.5,!0).reverse()):t.push(e),ii(c)?t.push(c.subdivide(.5,!1).reverse()):t.push(c),t},el=function(f){var c=f.bounds,i=f.styles;return c.add(i.borderLeftWidth,i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth),-(i.borderTopWidth+i.borderBottomWidth))},ws=function(f){var c=f.styles,i=f.bounds,e=Wr(c.paddingLeft,i.width),t=Wr(c.paddingRight,i.width),r=Wr(c.paddingTop,i.width),n=Wr(c.paddingBottom,i.width);return i.add(e+c.borderLeftWidth,r+c.borderTopWidth,-(c.borderRightWidth+c.borderLeftWidth+e+t),-(c.borderTopWidth+c.borderBottomWidth+r+n))},Ou=function(f,c){return f===0?c.bounds:f===2?ws(c):el(c)},NA=function(f,c){return f===0?c.bounds:f===2?ws(c):el(c)},Ra=function(f,c,i){var e=Ou(os(f.styles.backgroundOrigin,c),f),t=NA(os(f.styles.backgroundClip,c),f),r=Pu(os(f.styles.backgroundSize,c),i,e),n=r[0],s=r[1],A=Yi(os(f.styles.backgroundPosition,c),e.width-n,e.height-s),a=tl(os(f.styles.backgroundRepeat,c),A,r,e,t),l=Math.round(e.left+A[0]),o=Math.round(e.top+A[1]);return[a,l,o,n,s]},Cs=function(f){return Qt(f)&&f.value===Ki.AUTO},HA=function(f){return typeof f=="number"},Pu=function(f,c,i){var e=c[0],t=c[1],r=c[2],n=f[0],s=f[1];if(!n)return[0,0];if(mn(n)&&s&&mn(s))return[Wr(n,i.width),Wr(s,i.height)];var A=HA(r);if(Qt(n)&&(n.value===Ki.CONTAIN||n.value===Ki.COVER)){if(HA(r)){var a=i.width/i.height;return a<r!=(n.value===Ki.COVER)?[i.width,i.width/r]:[i.height*r,i.height]}return[i.width,i.height]}var l=HA(e),o=HA(t),h=l||o;if(Cs(n)&&(!s||Cs(s))){if(l&&o)return[e,t];if(!A&&!h)return[i.width,i.height];if(h&&A){var d=l?e:t*r,p=o?t:e/r;return[d,p]}var v=l?e:i.width,b=o?t:i.height;return[v,b]}if(A){var S=0,F=0;return mn(n)?S=Wr(n,i.width):mn(s)&&(F=Wr(s,i.height)),Cs(n)?S=F*r:(!s||Cs(s))&&(F=S/r),[S,F]}var te=null,fe=null;if(mn(n)?te=Wr(n,i.width):s&&mn(s)&&(fe=Wr(s,i.height)),te!==null&&(!s||Cs(s))&&(fe=l&&o?te/e*t:i.height),fe!==null&&Cs(n)&&(te=l&&o?fe/t*e:i.width),te!==null&&fe!==null)return[te,fe];throw new Error("Unable to calculate background-size for element")},os=function(f,c){var i=f[c];return typeof i=="undefined"?f[0]:i},tl=function(f,c,i,e,t){var r=c[0],n=c[1],s=i[0],A=i[1];switch(f){case 2:return[new er(Math.round(e.left),Math.round(e.top+n)),new er(Math.round(e.left+e.width),Math.round(e.top+n)),new er(Math.round(e.left+e.width),Math.round(A+e.top+n)),new er(Math.round(e.left),Math.round(A+e.top+n))];case 3:return[new er(Math.round(e.left+r),Math.round(e.top)),new er(Math.round(e.left+r+s),Math.round(e.top)),new er(Math.round(e.left+r+s),Math.round(e.height+e.top)),new er(Math.round(e.left+r),Math.round(e.height+e.top))];case 1:return[new er(Math.round(e.left+r),Math.round(e.top+n)),new er(Math.round(e.left+r+s),Math.round(e.top+n)),new er(Math.round(e.left+r+s),Math.round(e.top+n+A)),new er(Math.round(e.left+r),Math.round(e.top+n+A))];default:return[new er(Math.round(t.left),Math.round(t.top)),new er(Math.round(t.left+t.width),Math.round(t.top)),new er(Math.round(t.left+t.width),Math.round(t.height+t.top)),new er(Math.round(t.left),Math.round(t.height+t.top))]}},Mu="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",KA="Hidden Text",rl=function(){function f(c){this._data={},this._document=c}return f.prototype.parseMetrics=function(c,i){var e=this._document.createElement("div"),t=this._document.createElement("img"),r=this._document.createElement("span"),n=this._document.body;e.style.visibility="hidden",e.style.fontFamily=c,e.style.fontSize=i,e.style.margin="0",e.style.padding="0",e.style.whiteSpace="nowrap",n.appendChild(e),t.src=Mu,t.width=1,t.height=1,t.style.margin="0",t.style.padding="0",t.style.verticalAlign="baseline",r.style.fontFamily=c,r.style.fontSize=i,r.style.margin="0",r.style.padding="0",r.appendChild(this._document.createTextNode(KA)),e.appendChild(r),e.appendChild(t);var s=t.offsetTop-r.offsetTop+2;e.removeChild(r),e.appendChild(this._document.createTextNode(KA)),e.style.lineHeight="normal",t.style.verticalAlign="super";var A=t.offsetTop-e.offsetTop+2;return n.removeChild(e),{baseline:s,middle:A}},f.prototype.getMetrics=function(c,i){var e=c+" "+i;return typeof this._data[e]=="undefined"&&(this._data[e]=this.parseMetrics(c,i)),this._data[e]},f}(),Js=function(){function f(c,i){this.context=c,this.options=i}return f}(),Nu=1e4,Hu=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t._activeEffects=[],t.canvas=e.canvas?e.canvas:document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),e.canvas||(t.canvas.width=Math.floor(e.width*e.scale),t.canvas.height=Math.floor(e.height*e.scale),t.canvas.style.width=e.width+"px",t.canvas.style.height=e.height+"px"),t.fontMetrics=new rl(document),t.ctx.scale(t.options.scale,t.options.scale),t.ctx.translate(-e.x,-e.y),t.ctx.textBaseline="bottom",t._activeEffects=[],t.context.logger.debug("Canvas renderer initialized ("+e.width+"x"+e.height+") with scale "+e.scale),t}return c.prototype.applyEffects=function(i){for(var e=this;this._activeEffects.length;)this.popEffect();i.forEach(function(t){return e.applyEffect(t)})},c.prototype.applyEffect=function(i){this.ctx.save(),Lu(i)&&(this.ctx.globalAlpha=i.opacity),Zo(i)&&(this.ctx.translate(i.offsetX,i.offsetY),this.ctx.transform(i.matrix[0],i.matrix[1],i.matrix[2],i.matrix[3],i.matrix[4],i.matrix[5]),this.ctx.translate(-i.offsetX,-i.offsetY)),zo(i)&&(this.path(i.path),this.ctx.clip()),this._activeEffects.push(i)},c.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},c.prototype.renderStack=function(i){return me(this,void 0,void 0,function(){var e;return Fe(this,function(t){switch(t.label){case 0:return e=i.element.container.styles,e.isVisible()?[4,this.renderStackContent(i)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},c.prototype.renderNode=function(i){return me(this,void 0,void 0,function(){return Fe(this,function(e){switch(e.label){case 0:if(Tn(i.container.flags,16))debugger;return i.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(i)]:[3,3];case 1:return e.sent(),[4,this.renderNodeContent(i)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},c.prototype.renderTextWithLetterSpacing=function(i,e,t){var r=this;if(e===0)this.ctx.fillText(i.text,i.bounds.left,i.bounds.top+t);else{var n=$s(i.text);n.reduce(function(s,A){return r.ctx.fillText(A,s,i.bounds.top+t),s+r.ctx.measureText(A).width},i.bounds.left)}},c.prototype.createFontStyle=function(i){var e=i.fontVariant.filter(function(n){return n==="normal"||n==="small-caps"}).join(""),t=sl(i.fontFamily).join(", "),r=ai(i.fontSize)?""+i.fontSize.number+i.fontSize.unit:i.fontSize.number+"px";return[[i.fontStyle,e,i.fontWeight,r,t].join(" "),t,r]},c.prototype.renderTextNode=function(i,e){return me(this,void 0,void 0,function(){var t,r,n,s,A,a,l,o,h=this;return Fe(this,function(d){return t=this.createFontStyle(e),r=t[0],n=t[1],s=t[2],this.ctx.font=r,this.ctx.direction=e.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",A=this.fontMetrics.getMetrics(n,s),a=A.baseline,l=A.middle,o=e.paintOrder,i.textBounds.forEach(function(p){o.forEach(function(v){switch(v){case 0:h.ctx.fillStyle=pn(e.color),h.renderTextWithLetterSpacing(p,e.letterSpacing,a);var b=e.textShadow;b.length&&p.text.trim().length&&(b.slice(0).reverse().forEach(function(S){h.ctx.shadowColor=pn(S.color),h.ctx.shadowOffsetX=S.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=S.offsetY.number*h.options.scale,h.ctx.shadowBlur=S.blur.number,h.renderTextWithLetterSpacing(p,e.letterSpacing,a)}),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),e.textDecorationLine.length&&(h.ctx.fillStyle=pn(e.textDecorationColor||e.color),e.textDecorationLine.forEach(function(S){switch(S){case 1:h.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+a),p.bounds.width,1);break;case 2:h.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:h.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+l),p.bounds.width,1);break}}));break;case 1:e.webkitTextStrokeWidth&&p.text.trim().length&&(h.ctx.strokeStyle=pn(e.webkitTextStrokeColor),h.ctx.lineWidth=e.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+a)),h.ctx.strokeStyle="",h.ctx.lineWidth=0,h.ctx.lineJoin="miter";break}})}),[2]})})},c.prototype.renderReplacedElement=function(i,e,t){if(t&&i.intrinsicWidth>0&&i.intrinsicHeight>0){var r=ws(i),n=PA(e);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,i.intrinsicWidth,i.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},c.prototype.renderNodeContent=function(i){return me(this,void 0,void 0,function(){var e,t,r,n,s,A,F,F,a,l,o,h,fe,d,p,oe,v,b,S,F,te,fe,oe;return Fe(this,function(pe){switch(pe.label){case 0:this.applyEffects(i.getEffects(4)),e=i.container,t=i.curves,r=e.styles,n=0,s=e.textNodes,pe.label=1;case 1:return n<s.length?(A=s[n],[4,this.renderTextNode(A,r)]):[3,4];case 2:pe.sent(),pe.label=3;case 3:return n++,[3,1];case 4:if(!(e instanceof To))return[3,8];pe.label=5;case 5:return pe.trys.push([5,7,,8]),[4,this.context.cache.match(e.src)];case 6:return F=pe.sent(),this.renderReplacedElement(e,t,F),[3,8];case 7:return pe.sent(),this.context.logger.error("Error loading image "+e.src),[3,8];case 8:if(e instanceof Gs&&this.renderReplacedElement(e,t,e.canvas),!(e instanceof Io))return[3,12];pe.label=9;case 9:return pe.trys.push([9,11,,12]),[4,this.context.cache.match(e.svg)];case 10:return F=pe.sent(),this.renderReplacedElement(e,t,F),[3,12];case 11:return pe.sent(),this.context.logger.error("Error loading svg "+e.svg.substring(0,255)),[3,12];case 12:return e instanceof As&&e.tree?(a=new c(this.context,{scale:this.options.scale,backgroundColor:e.backgroundColor,x:0,y:0,width:e.width,height:e.height}),[4,a.render(e.tree)]):[3,14];case 13:l=pe.sent(),e.width&&e.height&&this.ctx.drawImage(l,0,0,e.width,e.height,e.bounds.left,e.bounds.top,e.bounds.width,e.bounds.height),pe.label=14;case 14:if(e instanceof ca&&(o=Math.min(e.bounds.width,e.bounds.height),e.type===Vs?e.checked&&(this.ctx.save(),this.path([new er(e.bounds.left+o*.39363,e.bounds.top+o*.79),new er(e.bounds.left+o*.16,e.bounds.top+o*.5549),new er(e.bounds.left+o*.27347,e.bounds.top+o*.44071),new er(e.bounds.left+o*.39694,e.bounds.top+o*.5649),new er(e.bounds.left+o*.72983,e.bounds.top+o*.23),new er(e.bounds.left+o*.84,e.bounds.top+o*.34085),new er(e.bounds.left+o*.39363,e.bounds.top+o*.79)]),this.ctx.fillStyle=pn(Lo),this.ctx.fill(),this.ctx.restore()):e.type===CA&&e.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(e.bounds.left+o/2,e.bounds.top+o/2,o/4,0,Math.PI*2,!0),this.ctx.fillStyle=pn(Lo),this.ctx.fill(),this.ctx.restore())),Ku(e)&&e.value.length){switch(h=this.createFontStyle(r),fe=h[0],d=h[1],p=this.fontMetrics.getMetrics(fe,d).baseline,this.ctx.font=fe,this.ctx.fillStyle=pn(r.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=nl(e.styles.textAlign),oe=ws(e),v=0,e.styles.textAlign){case 1:v+=oe.width/2;break;case 2:v+=oe.width;break}b=oe.add(v,0,0,-oe.height/2+1),this.ctx.save(),this.path([new er(oe.left,oe.top),new er(oe.left+oe.width,oe.top),new er(oe.left+oe.width,oe.top+oe.height),new er(oe.left,oe.top+oe.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ks(e.value,b),r.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Tn(e.styles.display,2048))return[3,20];if(e.styles.listStyleImage===null)return[3,19];if(S=e.styles.listStyleImage,S.type!==0)return[3,18];F=void 0,te=S.url,pe.label=15;case 15:return pe.trys.push([15,17,,18]),[4,this.context.cache.match(te)];case 16:return F=pe.sent(),this.ctx.drawImage(F,e.bounds.left-(F.width+10),e.bounds.top),[3,18];case 17:return pe.sent(),this.context.logger.error("Error loading list-style-image "+te),[3,18];case 18:return[3,20];case 19:i.listValue&&e.styles.listStyleType!==-1&&(fe=this.createFontStyle(r)[0],this.ctx.font=fe,this.ctx.fillStyle=pn(r.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",oe=new W(e.bounds.left,e.bounds.top+Wr(e.styles.paddingTop,e.bounds.width),e.bounds.width,Va(r.lineHeight,r.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ks(i.listValue,oe),r.letterSpacing,Va(r.lineHeight,r.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),pe.label=20;case 20:return[2]}})})},c.prototype.renderStackContent=function(i){return me(this,void 0,void 0,function(){var e,t,S,r,n,S,s,A,S,a,l,S,o,h,S,d,p,S,v,b,S;return Fe(this,function(F){switch(F.label){case 0:if(Tn(i.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(i.element)];case 1:F.sent(),e=0,t=i.negativeZIndex,F.label=2;case 2:return e<t.length?(S=t[e],[4,this.renderStack(S)]):[3,5];case 3:F.sent(),F.label=4;case 4:return e++,[3,2];case 5:return[4,this.renderNodeContent(i.element)];case 6:F.sent(),r=0,n=i.nonInlineLevel,F.label=7;case 7:return r<n.length?(S=n[r],[4,this.renderNode(S)]):[3,10];case 8:F.sent(),F.label=9;case 9:return r++,[3,7];case 10:s=0,A=i.nonPositionedFloats,F.label=11;case 11:return s<A.length?(S=A[s],[4,this.renderStack(S)]):[3,14];case 12:F.sent(),F.label=13;case 13:return s++,[3,11];case 14:a=0,l=i.nonPositionedInlineLevel,F.label=15;case 15:return a<l.length?(S=l[a],[4,this.renderStack(S)]):[3,18];case 16:F.sent(),F.label=17;case 17:return a++,[3,15];case 18:o=0,h=i.inlineLevel,F.label=19;case 19:return o<h.length?(S=h[o],[4,this.renderNode(S)]):[3,22];case 20:F.sent(),F.label=21;case 21:return o++,[3,19];case 22:d=0,p=i.zeroOrAutoZIndexOrTransformedOrOpacity,F.label=23;case 23:return d<p.length?(S=p[d],[4,this.renderStack(S)]):[3,26];case 24:F.sent(),F.label=25;case 25:return d++,[3,23];case 26:v=0,b=i.positiveZIndex,F.label=27;case 27:return v<b.length?(S=b[v],[4,this.renderStack(S)]):[3,30];case 28:F.sent(),F.label=29;case 29:return v++,[3,27];case 30:return[2]}})})},c.prototype.mask=function(i){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(i.slice(0).reverse()),this.ctx.closePath()},c.prototype.path=function(i){this.ctx.beginPath(),this.formatPath(i),this.ctx.closePath()},c.prototype.formatPath=function(i){var e=this;i.forEach(function(t,r){var n=ii(t)?t.start:t;r===0?e.ctx.moveTo(n.x,n.y):e.ctx.lineTo(n.x,n.y),ii(t)&&e.ctx.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)})},c.prototype.renderRepeat=function(i,e,t,r){this.path(i),this.ctx.fillStyle=e,this.ctx.translate(t,r),this.ctx.fill(),this.ctx.translate(-t,-r)},c.prototype.resizeImage=function(i,e,t){var r;if(i.width===e&&i.height===t)return i;var n=(r=this.canvas.ownerDocument)!==null&&r!==void 0?r:document,s=n.createElement("canvas");s.width=Math.max(1,e),s.height=Math.max(1,t);var A=s.getContext("2d");return A.drawImage(i,0,0,i.width,i.height,0,0,e,t),s},c.prototype.renderBackgroundImage=function(i){return me(this,void 0,void 0,function(){var e,t,r,n,s,A;return Fe(this,function(a){switch(a.label){case 0:e=i.styles.backgroundImage.length-1,t=function(l){var o,h,d,$e,cr,nr,Bt,kt,Ke,p,$e,cr,nr,Bt,kt,v,b,S,F,te,fe,oe,pe,Te,Ke,xe,$e,st,Pe,Bt,kt,Qr,cr,nr,Jt,ar,or,Dt,Pt,Fr,wr,Ur;return Fe(this,function(Zr){switch(Zr.label){case 0:if(l.type!==0)return[3,5];o=void 0,h=l.url,Zr.label=1;case 1:return Zr.trys.push([1,3,,4]),[4,r.context.cache.match(h)];case 2:return o=Zr.sent(),[3,4];case 3:return Zr.sent(),r.context.logger.error("Error loading background-image "+h),[3,4];case 4:return o&&(d=Ra(i,e,[o.width,o.height,o.width/o.height]),$e=d[0],cr=d[1],nr=d[2],Bt=d[3],kt=d[4],Ke=r.ctx.createPattern(r.resizeImage(o,Bt,kt),"repeat"),r.renderRepeat($e,Ke,cr,nr)),[3,6];case 5:es(l)?(p=Ra(i,e,[null,null,null]),$e=p[0],cr=p[1],nr=p[2],Bt=p[3],kt=p[4],v=sA(l.angle,Bt,kt),b=v[0],S=v[1],F=v[2],te=v[3],fe=v[4],oe=document.createElement("canvas"),oe.width=Bt,oe.height=kt,pe=oe.getContext("2d"),Te=pe.createLinearGradient(S,te,F,fe),Is(l.stops,b).forEach(function(nn){return Te.addColorStop(nn.stop,pn(nn.color))}),pe.fillStyle=Te,pe.fillRect(0,0,Bt,kt),Bt>0&&kt>0&&(Ke=r.ctx.createPattern(oe,"repeat"),r.renderRepeat($e,Ke,cr,nr))):Ds(l)&&(xe=Ra(i,e,[null,null,null]),$e=xe[0],st=xe[1],Pe=xe[2],Bt=xe[3],kt=xe[4],Qr=l.position.length===0?[Fs]:l.position,cr=Wr(Qr[0],Bt),nr=Wr(Qr[Qr.length-1],kt),Jt=GA(l,cr,nr,Bt,kt),ar=Jt[0],or=Jt[1],ar>0&&or>0&&(Dt=r.ctx.createRadialGradient(st+cr,Pe+nr,0,st+cr,Pe+nr,ar),Is(l.stops,ar*2).forEach(function(nn){return Dt.addColorStop(nn.stop,pn(nn.color))}),r.path($e),r.ctx.fillStyle=Dt,ar!==or?(Pt=i.bounds.left+.5*i.bounds.width,Fr=i.bounds.top+.5*i.bounds.height,wr=or/ar,Ur=1/wr,r.ctx.save(),r.ctx.translate(Pt,Fr),r.ctx.transform(1,0,0,wr,0,0),r.ctx.translate(-Pt,-Fr),r.ctx.fillRect(st,Ur*(Pe-Fr)+Fr,Bt,kt*Ur),r.ctx.restore()):r.ctx.fill())),Zr.label=6;case 6:return e--,[2]}})},r=this,n=0,s=i.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return n<s.length?(A=s[n],[5,t(A)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},c.prototype.renderSolidBorder=function(i,e,t){return me(this,void 0,void 0,function(){return Fe(this,function(r){return this.path(Jo(t,e)),this.ctx.fillStyle=pn(i),this.ctx.fill(),[2]})})},c.prototype.renderDoubleBorder=function(i,e,t,r){return me(this,void 0,void 0,function(){var n,s;return Fe(this,function(A){switch(A.label){case 0:return e<3?[4,this.renderSolidBorder(i,t,r)]:[3,2];case 1:return A.sent(),[2];case 2:return n=Qu(r,t),this.path(n),this.ctx.fillStyle=pn(i),this.ctx.fill(),s=qo(r,t),this.path(s),this.ctx.fill(),[2]}})})},c.prototype.renderNodeBackgroundAndBorders=function(i){return me(this,void 0,void 0,function(){var e,t,r,n,s,A,a,l,o=this;return Fe(this,function(h){switch(h.label){case 0:return this.applyEffects(i.getEffects(2)),e=i.container.styles,t=!hi(e.backgroundColor)||e.backgroundImage.length,r=[{style:e.borderTopStyle,color:e.borderTopColor,width:e.borderTopWidth},{style:e.borderRightStyle,color:e.borderRightColor,width:e.borderRightWidth},{style:e.borderBottomStyle,color:e.borderBottomColor,width:e.borderBottomWidth},{style:e.borderLeftStyle,color:e.borderLeftColor,width:e.borderLeftWidth}],n=$u(os(e.backgroundClip,0),i.curves),t||e.boxShadow.length?(this.ctx.save(),this.path(n),this.ctx.clip(),hi(e.backgroundColor)||(this.ctx.fillStyle=pn(e.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(i.container)]):[3,2];case 1:h.sent(),this.ctx.restore(),e.boxShadow.slice(0).reverse().forEach(function(d){o.ctx.save();var p=kA(i.curves),v=d.inset?0:Nu,b=Uu(p,-v+(d.inset?1:-1)*d.spread.number,(d.inset?1:-1)*d.spread.number,d.spread.number*(d.inset?-2:2),d.spread.number*(d.inset?-2:2));d.inset?(o.path(p),o.ctx.clip(),o.mask(b)):(o.mask(p),o.ctx.clip(),o.path(b)),o.ctx.shadowOffsetX=d.offsetX.number+v,o.ctx.shadowOffsetY=d.offsetY.number,o.ctx.shadowColor=pn(d.color),o.ctx.shadowBlur=d.blur.number,o.ctx.fillStyle=d.inset?pn(d.color):"rgba(0,0,0,1)",o.ctx.fill(),o.ctx.restore()}),h.label=2;case 2:s=0,A=0,a=r,h.label=3;case 3:return A<a.length?(l=a[A],l.style!==0&&!hi(l.color)&&l.width>0?l.style!==2?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,s,i.curves,2)]:[3,11]):[3,13];case 4:return h.sent(),[3,11];case 5:return l.style!==3?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,s,i.curves,3)];case 6:return h.sent(),[3,11];case 7:return l.style!==4?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,s,i.curves)];case 8:return h.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,s,i.curves)];case 10:h.sent(),h.label=11;case 11:s++,h.label=12;case 12:return A++,[3,3];case 13:return[2]}})})},c.prototype.renderDashedDottedBorder=function(i,e,t,r,n){return me(this,void 0,void 0,function(){var s,A,a,l,o,h,d,p,v,b,S,F,te,fe,oe,pe,oe,pe;return Fe(this,function(Te){return this.ctx.save(),s=ku(r,t),A=Jo(r,t),n===2&&(this.path(A),this.ctx.clip()),ii(A[0])?(a=A[0].start.x,l=A[0].start.y):(a=A[0].x,l=A[0].y),ii(A[1])?(o=A[1].end.x,h=A[1].end.y):(o=A[1].x,h=A[1].y),t===0||t===2?d=Math.abs(a-o):d=Math.abs(l-h),this.ctx.beginPath(),n===3?this.formatPath(s):this.formatPath(A.slice(0,2)),p=e<3?e*3:e*2,v=e<3?e*2:e,n===3&&(p=e,v=e),b=!0,d<=p*2?b=!1:d<=p*2+v?(S=d/(2*p+v),p*=S,v*=S):(F=Math.floor((d+v)/(p+v)),te=(d-F*p)/(F-1),fe=(d-(F+1)*p)/F,v=fe<=0||Math.abs(v-te)<Math.abs(v-fe)?te:fe),b&&(n===3?this.ctx.setLineDash([0,p+v]):this.ctx.setLineDash([p,v])),n===3?(this.ctx.lineCap="round",this.ctx.lineWidth=e):this.ctx.lineWidth=e*2+1.1,this.ctx.strokeStyle=pn(i),this.ctx.stroke(),this.ctx.setLineDash([]),n===2&&(ii(A[0])&&(oe=A[3],pe=A[0],this.ctx.beginPath(),this.formatPath([new er(oe.end.x,oe.end.y),new er(pe.start.x,pe.start.y)]),this.ctx.stroke()),ii(A[1])&&(oe=A[1],pe=A[2],this.ctx.beginPath(),this.formatPath([new er(oe.end.x,oe.end.y),new er(pe.start.x,pe.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},c.prototype.render=function(i){return me(this,void 0,void 0,function(){var e;return Fe(this,function(t){switch(t.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=pn(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),e=Ru(i),[4,this.renderStack(e)];case 1:return t.sent(),this.applyEffects([]),[2,this.canvas]}})})},c}(Js),Ku=function(f){return f instanceof ha||f instanceof fa?!0:f instanceof ca&&f.type!==CA&&f.type!==Vs},$u=function(f,c){switch(f){case 0:return kA(c);case 2:return OA(c);case 1:default:return PA(c)}},nl=function(f){switch(f){case 1:return"center";case 2:return"right";case 0:default:return"left"}},il=["-apple-system","system-ui"],sl=function(f){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?f.filter(function(c){return il.indexOf(c)===-1}):f},Gu=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.canvas=e.canvas?e.canvas:document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),t.options=e,t.canvas.width=Math.floor(e.width*e.scale),t.canvas.height=Math.floor(e.height*e.scale),t.canvas.style.width=e.width+"px",t.canvas.style.height=e.height+"px",t.ctx.scale(t.options.scale,t.options.scale),t.ctx.translate(-e.x,-e.y),t.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+e.width+"x"+e.height+" at "+e.x+","+e.y+") with scale "+e.scale),t}return c.prototype.render=function(i){return me(this,void 0,void 0,function(){var e,t;return Fe(this,function(r){switch(r.label){case 0:return e=oa(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,i),[4,Vu(e)];case 1:return t=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=pn(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(t,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},c}(Js),Vu=function(f){return new Promise(function(c,i){var e=new Image;e.onload=function(){c(e)},e.onerror=i,e.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(f))})},Wu=function(){function f(c){var i=c.id,e=c.enabled;this.id=i,this.enabled=e,this.start=Date.now()}return f.prototype.debug=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,he([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},f.prototype.getTime=function(){return Date.now()-this.start},f.prototype.info=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,he([this.id,this.getTime()+"ms"],c))},f.prototype.warn=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,he([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},f.prototype.error=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,he([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},f.instances={},f}(),Zu=function(){function f(c,i){var e;this.windowBounds=i,this.instanceName="#"+f.instanceCount++,this.logger=new Wu({id:this.instanceName,enabled:c.logging}),this.cache=(e=c.cache)!==null&&e!==void 0?e:new Tu(this,c)}return f.instanceCount=1,f}(),zu=function(f,c){return c===void 0&&(c={}),Al(f,c)};typeof window!="undefined"&&RA.setContext(window);var Al=function(f,c){return me(void 0,void 0,void 0,function(){var i,e,t,r,n,s,A,a,l,o,h,d,p,v,b,S,F,te,fe,oe,Te,pe,Te,Ke,xe,$e,st,Pe,Bt,kt,Qr,cr,nr,Jt,ar,or,Dt,Pt,Fr,wr;return Fe(this,function(Ur){switch(Ur.label){case 0:if(!f||typeof f!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(i=f.ownerDocument,!i)throw new Error("Element is not attached to a Document");if(e=i.defaultView,!e)throw new Error("Document is not attached to a Window");return t={allowTaint:(Ke=c.allowTaint)!==null&&Ke!==void 0?Ke:!1,imageTimeout:(xe=c.imageTimeout)!==null&&xe!==void 0?xe:15e3,proxy:c.proxy,useCORS:($e=c.useCORS)!==null&&$e!==void 0?$e:!1},r=V({logging:(st=c.logging)!==null&&st!==void 0?st:!0,cache:c.cache},t),n={windowWidth:(Pe=c.windowWidth)!==null&&Pe!==void 0?Pe:e.innerWidth,windowHeight:(Bt=c.windowHeight)!==null&&Bt!==void 0?Bt:e.innerHeight,scrollX:(kt=c.scrollX)!==null&&kt!==void 0?kt:e.pageXOffset,scrollY:(Qr=c.scrollY)!==null&&Qr!==void 0?Qr:e.pageYOffset},s=new W(n.scrollX,n.scrollY,n.windowWidth,n.windowHeight),A=new Zu(r,s),a=(cr=c.foreignObjectRendering)!==null&&cr!==void 0?cr:!1,l={allowTaint:(nr=c.allowTaint)!==null&&nr!==void 0?nr:!1,onclone:c.onclone,ignoreElements:c.ignoreElements,inlineImages:a,copyStyles:a},A.logger.debug("Starting document clone with size "+s.width+"x"+s.height+" scrolled to "+-s.left+","+-s.top),o=new wa(A,f,l),h=o.clonedReferenceElement,h?[4,o.toIFrame(i,s)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return d=Ur.sent(),p=Zs(h)||vu(h)?ge(h.ownerDocument):m(A,h),v=p.width,b=p.height,S=p.left,F=p.top,te=Qa(A,h,c.backgroundColor),fe={canvas:c.canvas,backgroundColor:te,scale:(ar=(Jt=c.scale)!==null&&Jt!==void 0?Jt:e.devicePixelRatio)!==null&&ar!==void 0?ar:1,x:((or=c.x)!==null&&or!==void 0?or:0)+S,y:((Dt=c.y)!==null&&Dt!==void 0?Dt:0)+F,width:(Pt=c.width)!==null&&Pt!==void 0?Pt:Math.ceil(v),height:(Fr=c.height)!==null&&Fr!==void 0?Fr:Math.ceil(b)},a?(A.logger.debug("Document cloned, using foreign object rendering"),Te=new Gu(A,fe),[4,Te.render(h)]):[3,3];case 2:return oe=Ur.sent(),[3,5];case 3:return A.logger.debug("Document cloned, element located at "+S+","+F+" with size "+v+"x"+b+" using computed rendering"),A.logger.debug("Starting DOM parsing"),pe=ga(A,h),te===pe.styles.backgroundColor&&(pe.styles.backgroundColor=di.TRANSPARENT),A.logger.debug("Starting renderer for element at "+fe.x+","+fe.y+" with size "+fe.width+"x"+fe.height),Te=new Hu(A,fe),[4,Te.render(pe)];case 4:oe=Ur.sent(),Ur.label=5;case 5:return(!((wr=c.removeContainer)!==null&&wr!==void 0)||wr)&&(wa.destroy(d)||A.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),A.logger.debug("Finished rendering"),[2,oe]}})})},Qa=function(f,c,i){var e=c.ownerDocument,t=e.documentElement?Xi(f,getComputedStyle(e.documentElement).backgroundColor):di.TRANSPARENT,r=e.body?Xi(f,getComputedStyle(e.body).backgroundColor):di.TRANSPARENT,n=typeof i=="string"?Xi(f,i):i===null?di.TRANSPARENT:4294967295;return c===e.documentElement?hi(t)?hi(r)?n:r:t:n};return zu})},67467:function(gr,mt){mt.read=function(K,V,me,Fe,he){var W,m,ge=he*8-Fe-1,O=(1<<ge)-1,u=O>>1,J=-7,D=me?he-1:0,B=me?-1:1,_=K[V+D];for(D+=B,W=_&(1<<-J)-1,_>>=-J,J+=ge;J>0;W=W*256+K[V+D],D+=B,J-=8);for(m=W&(1<<-J)-1,W>>=-J,J+=Fe;J>0;m=m*256+K[V+D],D+=B,J-=8);if(W===0)W=1-u;else{if(W===O)return m?NaN:(_?-1:1)*(1/0);m=m+Math.pow(2,Fe),W=W-u}return(_?-1:1)*m*Math.pow(2,W-Fe)},mt.write=function(K,V,me,Fe,he,W){var m,ge,O,u=W*8-he-1,J=(1<<u)-1,D=J>>1,B=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=Fe?0:W-1,w=Fe?1:-1,x=V<0||V===0&&1/V<0?1:0;for(V=Math.abs(V),isNaN(V)||V===1/0?(ge=isNaN(V)?1:0,m=J):(m=Math.floor(Math.log(V)/Math.LN2),V*(O=Math.pow(2,-m))<1&&(m--,O*=2),m+D>=1?V+=B/O:V+=B*Math.pow(2,1-D),V*O>=2&&(m++,O/=2),m+D>=J?(ge=0,m=J):m+D>=1?(ge=(V*O-1)*Math.pow(2,he),m=m+D):(ge=V*Math.pow(2,D-1)*Math.pow(2,he),m=0));he>=8;K[me+_]=ge&255,_+=w,ge/=256,he-=8);for(m=m<<he|ge,u+=he;u>0;K[me+_]=m&255,_+=w,m/=256,u-=8);K[me+_-w]|=x*128}},53184:function(gr,mt,K){"use strict";var V,me;function Fe(he,W,m){var ge=function(O,u){return he.js_beautify(O,u)};return ge.js=he.js_beautify,ge.css=W.css_beautify,ge.html=m.html_beautify,ge.js_beautify=he.js_beautify,ge.css_beautify=W.css_beautify,ge.html_beautify=m.html_beautify,ge}V=[K(58553),K(87804),K(40998)],me=function(he,W,m){return Fe(he,W,m)}.apply(mt,V),me!==void 0&&(gr.exports=me)},87804:function(gr,mt){var K,V;(function(){var me;(function(){"use strict";var he=[,,function(O){function u(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=[]}u.prototype.clone_empty=function(){var B=new u(this.__parent);return B.set_indent(this.__indent_count,this.__alignment_count),B},u.prototype.item=function(B){return B<0?this.__items[this.__items.length+B]:this.__items[B]},u.prototype.has_match=function(B){for(var _=this.__items.length-1;_>=0;_--)if(this.__items[_].match(B))return!0;return!1},u.prototype.set_indent=function(B,_){this.is_empty()&&(this.__indent_count=B||0,this.__alignment_count=_||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},u.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)},u.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},u.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},u.prototype.is_empty=function(){return this.__items.length===0},u.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},u.prototype.push=function(B){this.__items.push(B);var _=B.lastIndexOf(`
`);_!==-1?this.__character_count=B.length-_:this.__character_count+=B.length},u.prototype.pop=function(){var B=null;return this.is_empty()||(B=this.__items.pop(),this.__character_count-=B.length),B},u.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},u.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},u.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},u.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 J(B,_){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)),_=_||"",B.indent_level>0&&(_=new Array(B.indent_level+1).join(this.__indent_string)),this.__base_string=_,this.__base_string_length=_.length}J.prototype.get_indent_size=function(B,_){var w=this.__base_string_length;return _=_||0,B<0&&(w=0),w+=B*this.__indent_size,w+=_,w},J.prototype.get_indent_string=function(B,_){var w=this.__base_string;return _=_||0,B<0&&(B=0,w=""),_+=B*this.__indent_size,this.__ensure_cache(_),w+=this.__cache[_],w},J.prototype.__ensure_cache=function(B){for(;B>=this.__cache.length;)this.__add_column()},J.prototype.__add_column=function(){var B=this.__cache.length,_=0,w="";this.__indent_size&&B>=this.__indent_size&&(_=Math.floor(B/this.__indent_size),B-=_*this.__indent_size,w=new Array(_+1).join(this.__indent_string)),B&&(w+=new Array(B+1).join(" ")),this.__cache.push(w)};function D(B,_){this.__indent_cache=new J(B,_),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 u(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}D.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},D.prototype.get_line_number=function(){return this.__lines.length},D.prototype.get_indent_string=function(B,_){return this.__indent_cache.get_indent_string(B,_)},D.prototype.get_indent_size=function(B,_){return this.__indent_cache.get_indent_size(B,_)},D.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},D.prototype.add_new_line=function(B){return this.is_empty()||!B&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},D.prototype.get_code=function(B){this.trim(!0);var _=this.current_line.pop();_&&(_[_.length-1]===`
`&&(_=_.replace(/\n+$/g,"")),this.current_line.push(_)),this._end_with_newline&&this.__add_outputline();var w=this.__lines.join(`
`);return B!==`
`&&(w=w.replace(/[\n]/g,B)),w},D.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},D.prototype.set_indent=function(B,_){return B=B||0,_=_||0,this.next_line.set_indent(B,_),this.__lines.length>1?(this.current_line.set_indent(B,_),!0):(this.current_line.set_indent(),!1)},D.prototype.add_raw_token=function(B){for(var _=0;_<B.newlines;_++)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},D.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()},D.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(" "))},D.prototype.remove_indent=function(B){for(var _=this.__lines.length;B<_;)this.__lines[B]._remove_indent(),B++;this.current_line._remove_wrap_indent()},D.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},D.prototype.just_added_newline=function(){return this.current_line.is_empty()},D.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},D.prototype.ensure_empty_line_above=function(B,_){for(var w=this.__lines.length-2;w>=0;){var x=this.__lines[w];if(x.is_empty())break;if(x.item(0).indexOf(B)!==0&&x.item(-1)!==_){this.__lines.splice(w+1,0,new u(this)),this.previous_line=this.__lines[this.__lines.length-2];break}w--}},O.exports.Output=D},,,,function(O){function u(B,_){this.raw_options=J(B,_),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"])}u.prototype._get_array=function(B,_){var w=this.raw_options[B],x=_||[];return typeof w=="object"?w!==null&&typeof w.concat=="function"&&(x=w.concat()):typeof w=="string"&&(x=w.split(/[^a-zA-Z0-9_\/\-]+/)),x},u.prototype._get_boolean=function(B,_){var w=this.raw_options[B],x=w===void 0?!!_:!!w;return x},u.prototype._get_characters=function(B,_){var w=this.raw_options[B],x=_||"";return typeof w=="string"&&(x=w.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),x},u.prototype._get_number=function(B,_){var w=this.raw_options[B];_=parseInt(_,10),isNaN(_)&&(_=0);var x=parseInt(w,10);return isNaN(x)&&(x=_),x},u.prototype._get_selection=function(B,_,w){var x=this._get_selection_list(B,_,w);if(x.length!==1)throw new Error("Invalid Option Value: The option '"+B+`' can only be one of the following values:
`+_+`
You passed in: '`+this.raw_options[B]+"'");return x[0]},u.prototype._get_selection_list=function(B,_,w){if(!_||_.length===0)throw new Error("Selection list cannot be empty.");if(w=w||[_[0]],!this._is_valid_selection(w,_))throw new Error("Invalid Default Value!");var x=this._get_array(B,w);if(!this._is_valid_selection(x,_))throw new Error("Invalid Option Value: The option '"+B+`' can contain only the following values:
`+_+`
You passed in: '`+this.raw_options[B]+"'");return x},u.prototype._is_valid_selection=function(B,_){return B.length&&_.length&&!B.some(function(w){return _.indexOf(w)===-1})};function J(B,_){var w={};B=D(B);var x;for(x in B)x!==_&&(w[x]=B[x]);if(_&&B[_])for(x in B[_])w[x]=B[_][x];return w}function D(B){var _={},w;for(w in B){var x=w.replace(/-/g,"_");_[x]=B[w]}return _}O.exports.Options=u,O.exports.normalizeOpts=D,O.exports.mergeOpts=J},,function(O){var u=RegExp.prototype.hasOwnProperty("sticky");function J(D){this.__input=D||"",this.__input_length=this.__input.length,this.__position=0}J.prototype.restart=function(){this.__position=0},J.prototype.back=function(){this.__position>0&&(this.__position-=1)},J.prototype.hasNext=function(){return this.__position<this.__input_length},J.prototype.next=function(){var D=null;return this.hasNext()&&(D=this.__input.charAt(this.__position),this.__position+=1),D},J.prototype.peek=function(D){var B=null;return D=D||0,D+=this.__position,D>=0&&D<this.__input_length&&(B=this.__input.charAt(D)),B},J.prototype.__match=function(D,B){D.lastIndex=B;var _=D.exec(this.__input);return _&&!(u&&D.sticky)&&_.index!==B&&(_=null),_},J.prototype.test=function(D,B){return B=B||0,B+=this.__position,B>=0&&B<this.__input_length?!!this.__match(D,B):!1},J.prototype.testChar=function(D,B){var _=this.peek(B);return D.lastIndex=0,_!==null&&D.test(_)},J.prototype.match=function(D){var B=this.__match(D,this.__position);return B?this.__position+=B[0].length:B=null,B},J.prototype.read=function(D,B,_){var w="",x;return D&&(x=this.match(D),x&&(w+=x[0])),B&&(x||!D)&&(w+=this.readUntil(B,_)),w},J.prototype.readUntil=function(D,B){var _="",w=this.__position;D.lastIndex=this.__position;var x=D.exec(this.__input);return x?(w=x.index,B&&(w+=x[0].length)):w=this.__input_length,_=this.__input.substring(this.__position,w),this.__position=w,_},J.prototype.readUntilAfter=function(D){return this.readUntil(D,!0)},J.prototype.get_regexp=function(D,B){var _=null,w="g";return B&&u&&(w="y"),typeof D=="string"&&D!==""?_=new RegExp(D,w):D&&(_=new RegExp(D.source,w)),_},J.prototype.get_literal_regexp=function(D){return RegExp(D.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},J.prototype.peekUntilAfter=function(D){var B=this.__position,_=this.readUntilAfter(D);return this.__position=B,_},J.prototype.lookBack=function(D){var B=this.__position-1;return B>=D.length&&this.__input.substring(B-D.length,B).toLowerCase()===D},O.exports.InputScanner=J},,,,,function(O){function u(J,D){J=typeof J=="string"?J:J.source,D=typeof D=="string"?D:D.source,this.__directives_block_pattern=new RegExp(J+/ beautify( \w+[:]\w+)+ /.source+D,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(J+/\sbeautify\signore:end\s/.source+D,"g")}u.prototype.get_directives=function(J){if(!J.match(this.__directives_block_pattern))return null;var D={};this.__directive_pattern.lastIndex=0;for(var B=this.__directive_pattern.exec(J);B;)D[B[1]]=B[2],B=this.__directive_pattern.exec(J);return D},u.prototype.readIgnored=function(J){return J.readUntilAfter(this.__directives_end_ignore_pattern)},O.exports.Directives=u},,function(O,u,J){var D=J(16).Beautifier,B=J(17).Options;function _(w,x){var Y=new D(w,x);return Y.beautify()}O.exports=_,O.exports.defaultOptions=function(){return new B}},function(O,u,J){var D=J(17).Options,B=J(2).Output,_=J(8).InputScanner,w=J(13).Directives,x=new w(/\/\*/,/\*\//),Y=/\r\n|[\r\n]/,M=/\r\n|[\r\n]/g,H=/\s/,Q=/(?:\s|\n)+/g,P=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,X=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function ce(_e,we){this._source_text=_e||"",this._options=new D(we),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"]}ce.prototype.eatString=function(_e){var we="";for(this._ch=this._input.next();this._ch;){if(we+=this._ch,this._ch==="\\")we+=this._input.next();else if(_e.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return we},ce.prototype.eatWhitespace=function(_e){for(var we=H.test(this._input.peek()),ne=0;H.test(this._input.peek());)this._ch=this._input.next(),_e&&this._ch===`
`&&(ne===0||ne<this._options.max_preserve_newlines)&&(ne++,this._output.add_new_line(!0));return we},ce.prototype.foundNestedPseudoClass=function(){for(var _e=0,we=1,ne=this._input.peek(we);ne;){if(ne==="{")return!0;if(ne==="(")_e+=1;else if(ne===")"){if(_e===0)return!1;_e-=1}else if(ne===";"||ne==="}")return!1;we++,ne=this._input.peek(we)}return!1},ce.prototype.print_string=function(_e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(_e)},ce.prototype.preserveSingleSpace=function(_e){_e&&(this._output.space_before_token=!0)},ce.prototype.indent=function(){this._indentLevel++},ce.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},ce.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _e=this._source_text,we=this._options.eol;we==="auto"&&(we=`
`,_e&&Y.test(_e||"")&&(we=_e.match(Y)[0])),_e=_e.replace(M,`
`);var ne=_e.match(/^[\t ]*/)[0];this._output=new B(this._options,ne),this._input=new _(_e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var ve=0,Oe=!1,le=!1,Me=!1,Z=!1,I=!1,G=this._ch,z=!1,se,re,E;se=this._input.read(Q),re=se!=="",E=G,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),G=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var y=this._input.read(P),$=x.get_directives(y);$&&$.ignore==="start"&&(y+=x.readIgnored(this._input)),this.print_string(y),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(X)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(re),this.print_string(this._ch);var Ae=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Ae.match(/[ :]$/)&&(Ae=this.eatString(": ").replace(/\s+$/,""),this.print_string(Ae),this._output.space_before_token=!0),ve===0&&Ae.indexOf(":")!==-1&&(le=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(re),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Ge=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Ge.match(/[ :]$/)&&(Ge=this.eatString(": ").replace(/\s+$/,""),this.print_string(Ge),this._output.space_before_token=!0),ve===0&&Ge.indexOf(":")!==-1?(le=!0,this.indent()):Ge in this.NESTED_AT_RULE?(this._nestedLevel+=1,Ge in this.CONDITIONAL_GROUP_RULE&&(Me=!0)):ve===0&&!le&&(Z=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(re),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")le&&(le=!1,this.outdent()),Z=!1,Me?(Me=!1,Oe=this._indentLevel>=this._nestedLevel):Oe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Oe&&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)):(E==="("?this._output.space_before_token=!1:E!==","&&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(),E==="{"&&this._output.trim(!0),le&&(this.outdent(),le=!1),this.print_string(this._ch),Oe=!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 Je=0;Je<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Je++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Je])){z=!0;break}(Oe||Me)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!Z&&ve===0?(this.print_string(":"),le||(le=!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 yt=E==='"'||E==="'";this.preserveSingleSpace(yt||re),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")z=!1,ve===0?(le&&(this.outdent(),le=!1),Z=!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(),ve++,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(")")),ve&&(ve--,this.outdent()));else{var dt=!1;this._input.lookBack("with")&&(dt=!0),this.preserveSingleSpace(re||dt),this.print_string(this._ch),le&&E==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),I=!0):(this.eatWhitespace(),ve++,this.indent())}else if(this._ch===")")ve&&(ve--,this.outdent()),I&&this._input.peek()===";"&&this._options.selector_separator_newline&&(I=!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&&(!le||I)&&ve===0&&!Z?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!le&&ve===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&&H.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(re),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),H.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 Rt=E==='"'||E==="'";this.preserveSingleSpace(Rt||re),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&z&&this._output.add_new_line()}var bt=this._output.get_code(we);return bt},O.exports.Beautifier=ce},function(O,u,J){var D=J(6).Options;function B(_){D.call(this,_,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var w=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||w;var x=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var Y=0;Y<x.length;Y++)x[Y]!=="expand"?this.brace_style="collapse":this.brace_style=x[Y]}B.prototype=new D,O.exports.Options=B}],W={};function m(O){var u=W[O];if(u!==void 0)return u.exports;var J=W[O]={exports:{}};return he[O](J,J.exports,m),J.exports}var ge=m(15);me=ge})();var Fe=me;K=[],V=function(){return{css_beautify:Fe}}.apply(mt,K),V!==void 0&&(gr.exports=V)})()},40998:function(gr,mt,K){var V,me;(function(){var Fe;(function(){"use strict";var ge=[,,function(D){function B(x){this.__parent=x,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 x=new B(this.__parent);return x.set_indent(this.__indent_count,this.__alignment_count),x},B.prototype.item=function(x){return x<0?this.__items[this.__items.length+x]:this.__items[x]},B.prototype.has_match=function(x){for(var Y=this.__items.length-1;Y>=0;Y--)if(this.__items[Y].match(x))return!0;return!1},B.prototype.set_indent=function(x,Y){this.is_empty()&&(this.__indent_count=x||0,this.__alignment_count=Y||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 x=this.__parent.current_line;return x.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),x.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),x.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,x.__items[0]===" "&&(x.__items.splice(0,1),x.__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(x){this.__items.push(x);var Y=x.lastIndexOf(`
`);Y!==-1?this.__character_count=x.length-Y:this.__character_count+=x.length},B.prototype.pop=function(){var x=null;return this.is_empty()||(x=this.__items.pop(),this.__character_count-=x.length),x},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 x="";return this.is_empty()?this.__parent.indent_empty_lines&&(x=this.__parent.get_indent_string(this.__indent_count)):(x=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),x+=this.__items.join("")),x};function _(x,Y){this.__cache=[""],this.__indent_size=x.indent_size,this.__indent_string=x.indent_char,x.indent_with_tabs||(this.__indent_string=new Array(x.indent_size+1).join(x.indent_char)),Y=Y||"",x.indent_level>0&&(Y=new Array(x.indent_level+1).join(this.__indent_string)),this.__base_string=Y,this.__base_string_length=Y.length}_.prototype.get_indent_size=function(x,Y){var M=this.__base_string_length;return Y=Y||0,x<0&&(M=0),M+=x*this.__indent_size,M+=Y,M},_.prototype.get_indent_string=function(x,Y){var M=this.__base_string;return Y=Y||0,x<0&&(x=0,M=""),Y+=x*this.__indent_size,this.__ensure_cache(Y),M+=this.__cache[Y],M},_.prototype.__ensure_cache=function(x){for(;x>=this.__cache.length;)this.__add_column()},_.prototype.__add_column=function(){var x=this.__cache.length,Y=0,M="";this.__indent_size&&x>=this.__indent_size&&(Y=Math.floor(x/this.__indent_size),x-=Y*this.__indent_size,M=new Array(Y+1).join(this.__indent_string)),x&&(M+=new Array(x+1).join(" ")),this.__cache.push(M)};function w(x,Y){this.__indent_cache=new _(x,Y),this.raw=!1,this._end_with_newline=x.end_with_newline,this.indent_size=x.indent_size,this.wrap_line_length=x.wrap_line_length,this.indent_empty_lines=x.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()}w.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},w.prototype.get_line_number=function(){return this.__lines.length},w.prototype.get_indent_string=function(x,Y){return this.__indent_cache.get_indent_string(x,Y)},w.prototype.get_indent_size=function(x,Y){return this.__indent_cache.get_indent_size(x,Y)},w.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},w.prototype.add_new_line=function(x){return this.is_empty()||!x&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},w.prototype.get_code=function(x){this.trim(!0);var Y=this.current_line.pop();Y&&(Y[Y.length-1]===`
`&&(Y=Y.replace(/\n+$/g,"")),this.current_line.push(Y)),this._end_with_newline&&this.__add_outputline();var M=this.__lines.join(`
`);return x!==`
`&&(M=M.replace(/[\n]/g,x)),M},w.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},w.prototype.set_indent=function(x,Y){return x=x||0,Y=Y||0,this.next_line.set_indent(x,Y),this.__lines.length>1?(this.current_line.set_indent(x,Y),!0):(this.current_line.set_indent(),!1)},w.prototype.add_raw_token=function(x){for(var Y=0;Y<x.newlines;Y++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(x.whitespace_before),this.current_line.push(x.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},w.prototype.add_token=function(x){this.__add_space_before_token(),this.current_line.push(x),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},w.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(" "))},w.prototype.remove_indent=function(x){for(var Y=this.__lines.length;x<Y;)this.__lines[x]._remove_indent(),x++;this.current_line._remove_wrap_indent()},w.prototype.trim=function(x){for(x=x===void 0?!1:x,this.current_line.trim();x&&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},w.prototype.just_added_newline=function(){return this.current_line.is_empty()},w.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},w.prototype.ensure_empty_line_above=function(x,Y){for(var M=this.__lines.length-2;M>=0;){var H=this.__lines[M];if(H.is_empty())break;if(H.item(0).indexOf(x)!==0&&H.item(-1)!==Y){this.__lines.splice(M+1,0,new B(this)),this.previous_line=this.__lines[this.__lines.length-2];break}M--}},D.exports.Output=w},function(D){function B(_,w,x,Y){this.type=_,this.text=w,this.comments_before=null,this.newlines=x||0,this.whitespace_before=Y||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}D.exports.Token=B},,,function(D){function B(x,Y){this.raw_options=_(x,Y),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(x,Y){var M=this.raw_options[x],H=Y||[];return typeof M=="object"?M!==null&&typeof M.concat=="function"&&(H=M.concat()):typeof M=="string"&&(H=M.split(/[^a-zA-Z0-9_\/\-]+/)),H},B.prototype._get_boolean=function(x,Y){var M=this.raw_options[x],H=M===void 0?!!Y:!!M;return H},B.prototype._get_characters=function(x,Y){var M=this.raw_options[x],H=Y||"";return typeof M=="string"&&(H=M.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),H},B.prototype._get_number=function(x,Y){var M=this.raw_options[x];Y=parseInt(Y,10),isNaN(Y)&&(Y=0);var H=parseInt(M,10);return isNaN(H)&&(H=Y),H},B.prototype._get_selection=function(x,Y,M){var H=this._get_selection_list(x,Y,M);if(H.length!==1)throw new Error("Invalid Option Value: The option '"+x+`' can only be one of the following values:
`+Y+`
You passed in: '`+this.raw_options[x]+"'");return H[0]},B.prototype._get_selection_list=function(x,Y,M){if(!Y||Y.length===0)throw new Error("Selection list cannot be empty.");if(M=M||[Y[0]],!this._is_valid_selection(M,Y))throw new Error("Invalid Default Value!");var H=this._get_array(x,M);if(!this._is_valid_selection(H,Y))throw new Error("Invalid Option Value: The option '"+x+`' can contain only the following values:
`+Y+`
You passed in: '`+this.raw_options[x]+"'");return H},B.prototype._is_valid_selection=function(x,Y){return x.length&&Y.length&&!x.some(function(M){return Y.indexOf(M)===-1})};function _(x,Y){var M={};x=w(x);var H;for(H in x)H!==Y&&(M[H]=x[H]);if(Y&&x[Y])for(H in x[Y])M[H]=x[Y][H];return M}function w(x){var Y={},M;for(M in x){var H=M.replace(/-/g,"_");Y[H]=x[M]}return Y}D.exports.Options=B,D.exports.normalizeOpts=w,D.exports.mergeOpts=_},,function(D){var B=RegExp.prototype.hasOwnProperty("sticky");function _(w){this.__input=w||"",this.__input_length=this.__input.length,this.__position=0}_.prototype.restart=function(){this.__position=0},_.prototype.back=function(){this.__position>0&&(this.__position-=1)},_.prototype.hasNext=function(){return this.__position<this.__input_length},_.prototype.next=function(){var w=null;return this.hasNext()&&(w=this.__input.charAt(this.__position),this.__position+=1),w},_.prototype.peek=function(w){var x=null;return w=w||0,w+=this.__position,w>=0&&w<this.__input_length&&(x=this.__input.charAt(w)),x},_.prototype.__match=function(w,x){w.lastIndex=x;var Y=w.exec(this.__input);return Y&&!(B&&w.sticky)&&Y.index!==x&&(Y=null),Y},_.prototype.test=function(w,x){return x=x||0,x+=this.__position,x>=0&&x<this.__input_length?!!this.__match(w,x):!1},_.prototype.testChar=function(w,x){var Y=this.peek(x);return w.lastIndex=0,Y!==null&&w.test(Y)},_.prototype.match=function(w){var x=this.__match(w,this.__position);return x?this.__position+=x[0].length:x=null,x},_.prototype.read=function(w,x,Y){var M="",H;return w&&(H=this.match(w),H&&(M+=H[0])),x&&(H||!w)&&(M+=this.readUntil(x,Y)),M},_.prototype.readUntil=function(w,x){var Y="",M=this.__position;w.lastIndex=this.__position;var H=w.exec(this.__input);return H?(M=H.index,x&&(M+=H[0].length)):M=this.__input_length,Y=this.__input.substring(this.__position,M),this.__position=M,Y},_.prototype.readUntilAfter=function(w){return this.readUntil(w,!0)},_.prototype.get_regexp=function(w,x){var Y=null,M="g";return x&&B&&(M="y"),typeof w=="string"&&w!==""?Y=new RegExp(w,M):w&&(Y=new RegExp(w.source,M)),Y},_.prototype.get_literal_regexp=function(w){return RegExp(w.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},_.prototype.peekUntilAfter=function(w){var x=this.__position,Y=this.readUntilAfter(w);return this.__position=x,Y},_.prototype.lookBack=function(w){var x=this.__position-1;return x>=w.length&&this.__input.substring(x-w.length,x).toLowerCase()===w},D.exports.InputScanner=_},function(D,B,_){var w=_(8).InputScanner,x=_(3).Token,Y=_(10).TokenStream,M=_(11).WhitespacePattern,H={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},Q=function(P,X){this._input=new w(P),this._options=X||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new M(this._input)};Q.prototype.tokenize=function(){this._input.restart(),this.__tokens=new Y,this._reset();for(var P,X=new x(H.START,""),ce=null,_e=[],we=new Y;X.type!==H.EOF;){for(P=this._get_next_token(X,ce);this._is_comment(P);)we.add(P),P=this._get_next_token(X,ce);we.isEmpty()||(P.comments_before=we,we=new Y),P.parent=ce,this._is_opening(P)?(_e.push(ce),ce=P):ce&&this._is_closing(P,ce)&&(P.opened=ce,ce.closed=P,ce=_e.pop(),P.parent=ce),P.previous=X,X.next=P,this.__tokens.add(P),X=P}return this.__tokens},Q.prototype._is_first_token=function(){return this.__tokens.isEmpty()},Q.prototype._reset=function(){},Q.prototype._get_next_token=function(P,X){this._readWhitespace();var ce=this._input.read(/.+/g);return ce?this._create_token(H.RAW,ce):this._create_token(H.EOF,"")},Q.prototype._is_comment=function(P){return!1},Q.prototype._is_opening=function(P){return!1},Q.prototype._is_closing=function(P,X){return!1},Q.prototype._create_token=function(P,X){var ce=new x(P,X,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return ce},Q.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},D.exports.Tokenizer=Q,D.exports.TOKEN=H},function(D){function B(_){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=_}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 _=null;return this.hasNext()&&(_=this.__tokens[this.__position],this.__position+=1),_},B.prototype.peek=function(_){var w=null;return _=_||0,_+=this.__position,_>=0&&_<this.__tokens_length&&(w=this.__tokens[_]),w},B.prototype.add=function(_){this.__parent_token&&(_.parent=this.__parent_token),this.__tokens.push(_),this.__tokens_length+=1},D.exports.TokenStream=B},function(D,B,_){var w=_(12).Pattern;function x(Y,M){w.call(this,Y,M),M?this._line_regexp=this._input.get_regexp(M._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}x.prototype=new w,x.prototype.__set_whitespace_patterns=function(Y,M){Y+="\\t ",M+="\\n\\r",this._match_pattern=this._input.get_regexp("["+Y+M+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+M+"]")},x.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var Y=this._input.read(this._match_pattern);if(Y===" ")this.whitespace_before_token=" ";else if(Y){var M=this.__split(this._newline_regexp,Y);this.newline_count=M.length-1,this.whitespace_before_token=M[this.newline_count]}return Y},x.prototype.matching=function(Y,M){var H=this._create();return H.__set_whitespace_patterns(Y,M),H._update(),H},x.prototype._create=function(){return new x(this._input,this)},x.prototype.__split=function(Y,M){Y.lastIndex=0;for(var H=0,Q=[],P=Y.exec(M);P;)Q.push(M.substring(H,P.index)),H=P.index+P[0].length,P=Y.exec(M);return H<M.length?Q.push(M.substring(H,M.length)):Q.push(""),Q},D.exports.WhitespacePattern=x},function(D){function B(_,w){this._input=_,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,w&&(this._starting_pattern=this._input.get_regexp(w._starting_pattern,!0),this._match_pattern=this._input.get_regexp(w._match_pattern,!0),this._until_pattern=this._input.get_regexp(w._until_pattern),this._until_after=w._until_after)}B.prototype.read=function(){var _=this._input.read(this._starting_pattern);return(!this._starting_pattern||_)&&(_+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),_},B.prototype.read_match=function(){return this._input.match(this._match_pattern)},B.prototype.until_after=function(_){var w=this._create();return w._until_after=!0,w._until_pattern=this._input.get_regexp(_),w._update(),w},B.prototype.until=function(_){var w=this._create();return w._until_after=!1,w._until_pattern=this._input.get_regexp(_),w._update(),w},B.prototype.starting_with=function(_){var w=this._create();return w._starting_pattern=this._input.get_regexp(_,!0),w._update(),w},B.prototype.matching=function(_){var w=this._create();return w._match_pattern=this._input.get_regexp(_,!0),w._update(),w},B.prototype._create=function(){return new B(this._input,this)},B.prototype._update=function(){},D.exports.Pattern=B},function(D){function B(_,w){_=typeof _=="string"?_:_.source,w=typeof w=="string"?w:w.source,this.__directives_block_pattern=new RegExp(_+/ beautify( \w+[:]\w+)+ /.source+w,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(_+/\sbeautify\signore:end\s/.source+w,"g")}B.prototype.get_directives=function(_){if(!_.match(this.__directives_block_pattern))return null;var w={};this.__directive_pattern.lastIndex=0;for(var x=this.__directive_pattern.exec(_);x;)w[x[1]]=x[2],x=this.__directive_pattern.exec(_);return w},B.prototype.readIgnored=function(_){return _.readUntilAfter(this.__directives_end_ignore_pattern)},D.exports.Directives=B},function(D,B,_){var w=_(12).Pattern,x={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function Y(M,H){w.call(this,M,H),this.__template_pattern=null,this._disabled=Object.assign({},x),this._excluded=Object.assign({},x),H&&(this.__template_pattern=this._input.get_regexp(H.__template_pattern),this._excluded=Object.assign(this._excluded,H._excluded),this._disabled=Object.assign(this._disabled,H._disabled));var Q=new w(M);this.__patterns={handlebars_comment:Q.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:Q.starting_with(/{{{/).until_after(/}}}/),handlebars:Q.starting_with(/{{/).until_after(/}}/),php:Q.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:Q.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:Q.starting_with(/{%/).until_after(/%}/),django_value:Q.starting_with(/{{/).until_after(/}}/),django_comment:Q.starting_with(/{#/).until_after(/#}/),smarty:Q.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:Q.starting_with(/{\*/).until_after(/\*}/),smarty_literal:Q.starting_with(/{literal}/).until_after(/{\/literal}/)}}Y.prototype=new w,Y.prototype._create=function(){return new Y(this._input,this)},Y.prototype._update=function(){this.__set_templated_pattern()},Y.prototype.disable=function(M){var H=this._create();return H._disabled[M]=!0,H._update(),H},Y.prototype.read_options=function(M){var H=this._create();for(var Q in x)H._disabled[Q]=M.templating.indexOf(Q)===-1;return H._update(),H},Y.prototype.exclude=function(M){var H=this._create();return H._excluded[M]=!0,H._update(),H},Y.prototype.read=function(){var M="";this._match_pattern?M=this._input.read(this._starting_pattern):M=this._input.read(this._starting_pattern,this.__template_pattern);for(var H=this._read_template();H;)this._match_pattern?H+=this._input.read(this._match_pattern):H+=this._input.readUntil(this.__template_pattern),M+=H,H=this._read_template();return this._until_after&&(M+=this._input.readUntilAfter(this._until_pattern)),M},Y.prototype.__set_templated_pattern=function(){var M=[];this._disabled.php||M.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||M.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||M.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||M.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(M.push(this.__patterns.django._starting_pattern.source),M.push(this.__patterns.django_value._starting_pattern.source),M.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||M.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&M.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+M.join("|")+")")},Y.prototype._read_template=function(){var M="",H=this._input.peek();if(H==="<"){var Q=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&Q==="?"&&(M=M||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&Q==="%"&&(M=M||this.__patterns.erb.read())}else H==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(M=M||this.__patterns.handlebars_comment.read(),M=M||this.__patterns.handlebars_unescaped.read(),M=M||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(M=M||this.__patterns.django_value.read()),this._excluded.django||(M=M||this.__patterns.django_comment.read(),M=M||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(M=M||this.__patterns.smarty_comment.read(),M=M||this.__patterns.smarty_literal.read(),M=M||this.__patterns.smarty.read()));return M},D.exports.TemplatablePattern=Y},,,,function(D,B,_){var w=_(19).Beautifier,x=_(20).Options;function Y(M,H,Q,P){var X=new w(M,H,Q,P);return X.beautify()}D.exports=Y,D.exports.defaultOptions=function(){return new x}},function(D,B,_){var w=_(20).Options,x=_(2).Output,Y=_(21).Tokenizer,M=_(21).TOKEN,H=/\r\n|[\r\n]/,Q=/\r\n|[\r\n]/g,P=function(Z,I){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=Z.max_preserve_newlines,this.preserve_newlines=Z.preserve_newlines,this._output=new x(Z,I)};P.prototype.current_line_has_match=function(Z){return this._output.current_line.has_match(Z)},P.prototype.set_space_before_token=function(Z,I){this._output.space_before_token=Z,this._output.non_breaking_space=I},P.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},P.prototype.add_raw_token=function(Z){this._output.add_raw_token(Z)},P.prototype.print_preserved_newlines=function(Z){var I=0;Z.type!==M.TEXT&&Z.previous.type!==M.TEXT&&(I=Z.newlines?1:0),this.preserve_newlines&&(I=Z.newlines<this.max_preserve_newlines+1?Z.newlines:this.max_preserve_newlines+1);for(var G=0;G<I;G++)this.print_newline(G>0);return I!==0},P.prototype.traverse_whitespace=function(Z){return Z.whitespace_before||Z.newlines?(this.print_preserved_newlines(Z)||(this._output.space_before_token=!0),!0):!1},P.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},P.prototype.print_newline=function(Z){this._output.add_new_line(Z)},P.prototype.print_token=function(Z){Z.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(Z.text))},P.prototype.indent=function(){this.indent_level++},P.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},P.prototype.get_full_indent=function(Z){return Z=this.indent_level+(Z||0),Z<1?"":this._output.get_indent_string(Z)};var X=function(Z){for(var I=null,G=Z.next;G.type!==M.EOF&&Z.closed!==G;){if(G.type===M.ATTRIBUTE&&G.text==="type"){G.next&&G.next.type===M.EQUALS&&G.next.next&&G.next.next.type===M.VALUE&&(I=G.next.next.text);break}G=G.next}return I},ce=function(Z,I){var G=null,z=null;return I.closed?(Z==="script"?G="text/javascript":Z==="style"&&(G="text/css"),G=X(I)||G,G.search("text/css")>-1?z="css":G.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?z="javascript":G.search(/(text|application|dojo)\/(x-)?(html)/)>-1?z="html":G.search(/test\/null/)>-1&&(z="null"),z):null};function _e(Z,I){return I.indexOf(Z)!==-1}function we(Z,I,G){this.parent=Z||null,this.tag=I?I.tag_name:"",this.indent_level=G||0,this.parser_token=I||null}function ne(Z){this._printer=Z,this._current_frame=null}ne.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ne.prototype.record_tag=function(Z){var I=new we(this._current_frame,Z,this._printer.indent_level);this._current_frame=I},ne.prototype._try_pop_frame=function(Z){var I=null;return Z&&(I=Z.parser_token,this._printer.indent_level=Z.indent_level,this._current_frame=Z.parent),I},ne.prototype._get_frame=function(Z,I){for(var G=this._current_frame;G&&Z.indexOf(G.tag)===-1;){if(I&&I.indexOf(G.tag)!==-1){G=null;break}G=G.parent}return G},ne.prototype.try_pop=function(Z,I){var G=this._get_frame([Z],I);return this._try_pop_frame(G)},ne.prototype.indent_to_tag=function(Z){var I=this._get_frame(Z);I&&(this._printer.indent_level=I.indent_level)};function ve(Z,I,G,z){this._source_text=Z||"",I=I||{},this._js_beautify=G,this._css_beautify=z,this._tag_stack=null;var se=new w(I,"html");this._options=se,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"}ve.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var Z=this._source_text,I=this._options.eol;this._options.eol==="auto"&&(I=`
`,Z&&H.test(Z)&&(I=Z.match(H)[0])),Z=Z.replace(Q,`
`);var G=Z.match(/^[\t ]*/)[0],z={text:"",type:""},se=new Oe(this._options),re=new P(this._options,G),E=new Y(Z,this._options).tokenize();this._tag_stack=new ne(re);for(var y=null,$=E.next();$.type!==M.EOF;)$.type===M.TAG_OPEN||$.type===M.COMMENT?(y=this._handle_tag_open(re,$,se,z,E),se=y):$.type===M.ATTRIBUTE||$.type===M.EQUALS||$.type===M.VALUE||$.type===M.TEXT&&!se.tag_complete?y=this._handle_inside_tag(re,$,se,z):$.type===M.TAG_CLOSE?y=this._handle_tag_close(re,$,se):$.type===M.TEXT?y=this._handle_text(re,$,se):$.type===M.CONTROL_FLOW_OPEN?y=this._handle_control_flow_open(re,$):$.type===M.CONTROL_FLOW_CLOSE?y=this._handle_control_flow_close(re,$):re.add_raw_token($),z=y,$=E.next();var Ae=re._output.get_code(I);return Ae},ve.prototype._handle_control_flow_open=function(Z,I){var G={text:I.text,type:I.type};return Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),I.newlines?Z.print_preserved_newlines(I):Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),Z.print_token(I),Z.indent(),G},ve.prototype._handle_control_flow_close=function(Z,I){var G={text:I.text,type:I.type};return Z.deindent(),I.newlines?Z.print_preserved_newlines(I):Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),Z.print_token(I),G},ve.prototype._handle_tag_close=function(Z,I,G){var z={text:I.text,type:I.type};return Z.alignment_size=0,G.tag_complete=!0,Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),G.is_unformatted?Z.add_raw_token(I):(G.tag_start_char==="<"&&(Z.set_space_before_token(I.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&G.has_wrapped_attrs&&Z.print_newline(!1)),Z.print_token(I)),G.indent_content&&!(G.is_unformatted||G.is_content_unformatted)&&(Z.indent(),G.indent_content=!1),!G.is_inline_element&&!(G.is_unformatted||G.is_content_unformatted)&&Z.set_wrap_point(),z},ve.prototype._handle_inside_tag=function(Z,I,G,z){var se=G.has_wrapped_attrs,re={text:I.text,type:I.type};return Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),G.is_unformatted?Z.add_raw_token(I):G.tag_start_char==="{"&&I.type===M.TEXT?Z.print_preserved_newlines(I)?(I.newlines=0,Z.add_raw_token(I)):Z.print_token(I):(I.type===M.ATTRIBUTE?Z.set_space_before_token(!0):(I.type===M.EQUALS||I.type===M.VALUE&&I.previous.type===M.EQUALS)&&Z.set_space_before_token(!1),I.type===M.ATTRIBUTE&&G.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(Z.traverse_whitespace(I),se=se||I.newlines!==0),this._is_wrap_attributes_force&&G.attr_count>=this._options.wrap_attributes_min_attrs&&(z.type!==M.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(Z.print_newline(!1),se=!0)),Z.print_token(I),se=se||Z.previous_token_wrapped(),G.has_wrapped_attrs=se),re},ve.prototype._handle_text=function(Z,I,G){var z={text:I.text,type:"TK_CONTENT"};return G.custom_beautifier_name?this._print_custom_beatifier_text(Z,I,G):G.is_unformatted||G.is_content_unformatted?Z.add_raw_token(I):(Z.traverse_whitespace(I),Z.print_token(I)),z},ve.prototype._print_custom_beatifier_text=function(Z,I,G){var z=this;if(I.text!==""){var se=I.text,re,E=1,y="",$="";G.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?re=this._js_beautify:G.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?re=this._css_beautify:G.custom_beautifier_name==="html"&&(re=function(Rt,bt){var ht=new ve(Rt,bt,z._js_beautify,z._css_beautify);return ht.beautify()}),this._options.indent_scripts==="keep"?E=0:this._options.indent_scripts==="separate"&&(E=-Z.indent_level);var Ae=Z.get_full_indent(E);if(se=se.replace(/\n[ \t]*$/,""),G.custom_beautifier_name!=="html"&&se[0]==="<"&&se.match(/^(<!--|<!\[CDATA\[)/)){var Ge=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(se);if(!Ge){Z.add_raw_token(I);return}y=Ae+Ge[1]+`
`,se=Ge[4],Ge[5]&&($=Ae+Ge[5]),se=se.replace(/\n[ \t]*$/,""),(Ge[2]||Ge[3].indexOf(`
`)!==-1)&&(Ge=Ge[3].match(/[ \t]+$/),Ge&&(I.whitespace_before=Ge[0]))}if(se)if(re){var Je=function(){this.eol=`
`};Je.prototype=this._options.raw_options;var yt=new Je;se=re(Ae+se,yt)}else{var dt=I.whitespace_before;dt&&(se=se.replace(new RegExp(`
(`+dt+")?","g"),`
`)),se=Ae+se.replace(/\n/g,`
`+Ae)}y&&(se?se=y+se+`
`+$:se=y+$),Z.print_newline(!1),se&&(I.text=se,I.whitespace_before="",I.newlines=0,Z.add_raw_token(I),Z.print_newline(!0))}},ve.prototype._handle_tag_open=function(Z,I,G,z,se){var re=this._get_tag_open_token(I);if((G.is_unformatted||G.is_content_unformatted)&&!G.is_empty_element&&I.type===M.TAG_OPEN&&!re.is_start_tag?(Z.add_raw_token(I),re.start_tag_token=this._tag_stack.try_pop(re.tag_name)):(Z.traverse_whitespace(I),this._set_tag_position(Z,I,re,G,z),re.is_inline_element||Z.set_wrap_point(),Z.print_token(I)),re.is_start_tag&&this._is_wrap_attributes_force){var E=0,y;do y=se.peek(E),y.type===M.ATTRIBUTE&&(re.attr_count+=1),E+=1;while(y.type!==M.EOF&&y.type!==M.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(re.alignment_size=I.text.length+1),!re.tag_complete&&!re.is_unformatted&&(Z.alignment_size=re.alignment_size),re};var Oe=function(Z,I,G){if(this.parent=I||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="",!G)this.tag_complete=!0;else{var z;this.tag_start_char=G.text[0],this.text=G.text,this.tag_start_char==="<"?(z=G.text.match(/^<([^\s>]*)/),this.tag_check=z?z[1]:""):(z=G.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=z?z[1]:"",(G.text.startsWith("{{#>")||G.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&G.next!==null?this.tag_check=G.next.text.split(" ")[0]:this.tag_check=G.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),G.type===M.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||G.closed&&G.closed.text==="/>";var se=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(se=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!Z.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(se)))}};ve.prototype._get_tag_open_token=function(Z){var I=new Oe(this._options,this._tag_stack.get_parser_token(),Z);return I.alignment_size=this._options.wrap_attributes_indent_size,I.is_end_tag=I.is_end_tag||_e(I.tag_check,this._options.void_elements),I.is_empty_element=I.tag_complete||I.is_start_tag&&I.is_end_tag,I.is_unformatted=!I.tag_complete&&_e(I.tag_check,this._options.unformatted),I.is_content_unformatted=!I.is_empty_element&&_e(I.tag_check,this._options.content_unformatted),I.is_inline_element=_e(I.tag_name,this._options.inline)||this._options.inline_custom_elements&&I.tag_name.includes("-")||I.tag_start_char==="{",I},ve.prototype._set_tag_position=function(Z,I,G,z,se){if(G.is_empty_element||(G.is_end_tag?G.start_tag_token=this._tag_stack.try_pop(G.tag_name):(this._do_optional_end_element(G)&&(G.is_inline_element||Z.print_newline(!1)),this._tag_stack.record_tag(G),(G.tag_name==="script"||G.tag_name==="style")&&!(G.is_unformatted||G.is_content_unformatted)&&(G.custom_beautifier_name=ce(G.tag_check,I)))),_e(G.tag_check,this._options.extra_liners)&&(Z.print_newline(!1),Z._output.just_added_blankline()||Z.print_newline(!0)),G.is_empty_element){if(G.tag_start_char==="{"&&G.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),G.indent_content=!0;var re=Z.current_line_has_match(/{{#if/);re||Z.print_newline(!1)}G.tag_name==="!--"&&se.type===M.TAG_CLOSE&&z.is_end_tag&&G.text.indexOf(`
`)===-1||(G.is_inline_element||G.is_unformatted||Z.print_newline(!1),this._calcluate_parent_multiline(Z,G))}else if(G.is_end_tag){var E=!1;E=G.start_tag_token&&G.start_tag_token.multiline_content,E=E||!G.is_inline_element&&!(z.is_inline_element||z.is_unformatted)&&!(se.type===M.TAG_CLOSE&&G.start_tag_token===z)&&se.type!=="TK_CONTENT",(G.is_content_unformatted||G.is_unformatted)&&(E=!1),E&&Z.print_newline(!1)}else G.indent_content=!G.custom_beautifier_name,G.tag_start_char==="<"&&(G.tag_name==="html"?G.indent_content=this._options.indent_inner_html:G.tag_name==="head"?G.indent_content=this._options.indent_head_inner_html:G.tag_name==="body"&&(G.indent_content=this._options.indent_body_inner_html)),!(G.is_inline_element||G.is_unformatted)&&(se.type!=="TK_CONTENT"||G.is_content_unformatted)&&Z.print_newline(!1),this._calcluate_parent_multiline(Z,G)},ve.prototype._calcluate_parent_multiline=function(Z,I){I.parent&&Z._output.just_added_newline()&&!((I.is_inline_element||I.is_unformatted)&&I.parent.is_inline_element)&&(I.parent.multiline_content=!0)};var le=["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"],Me=["a","audio","del","ins","map","noscript","video"];ve.prototype._do_optional_end_element=function(Z){var I=null;if(!(Z.is_empty_element||!Z.is_start_tag||!Z.parent)){if(Z.tag_name==="body")I=I||this._tag_stack.try_pop("head");else if(Z.tag_name==="li")I=I||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(Z.tag_name==="dd"||Z.tag_name==="dt")I=I||this._tag_stack.try_pop("dt",["dl"]),I=I||this._tag_stack.try_pop("dd",["dl"]);else if(Z.parent.tag_name==="p"&&le.indexOf(Z.tag_name)!==-1){var G=Z.parent.parent;(!G||Me.indexOf(G.tag_name)===-1)&&(I=I||this._tag_stack.try_pop("p"))}else Z.tag_name==="rp"||Z.tag_name==="rt"?(I=I||this._tag_stack.try_pop("rt",["ruby","rtc"]),I=I||this._tag_stack.try_pop("rp",["ruby","rtc"])):Z.tag_name==="optgroup"?I=I||this._tag_stack.try_pop("optgroup",["select"]):Z.tag_name==="option"?I=I||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):Z.tag_name==="colgroup"?I=I||this._tag_stack.try_pop("caption",["table"]):Z.tag_name==="thead"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"])):Z.tag_name==="tbody"||Z.tag_name==="tfoot"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("thead",["table"]),I=I||this._tag_stack.try_pop("tbody",["table"])):Z.tag_name==="tr"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(Z.tag_name==="th"||Z.tag_name==="td")&&(I=I||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),I=I||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return Z.parent=this._tag_stack.get_parser_token(),I}},D.exports.Beautifier=ve},function(D,B,_){var w=_(6).Options;function x(Y){w.call(this,Y,"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"])}x.prototype=new w,D.exports.Options=x},function(D,B,_){var w=_(9).Tokenizer,x=_(9).TOKEN,Y=_(13).Directives,M=_(14).TemplatablePattern,H=_(12).Pattern,Q={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:x.START,RAW:x.RAW,EOF:x.EOF},P=new Y(/<\!--/,/-->/),X=function(ce,_e){w.call(this,ce,_e),this._current_tag_name="";var we=new M(this._input).read_options(this._options),ne=new H(this._input);if(this.__patterns={word:we.until(/[\n\r\t <]/),word_control_flow_close_excluded:we.until(/[\n\r\t <}]/),single_quote:we.until_after(/'/),double_quote:we.until_after(/"/),attribute:we.until(/[\n\r\t =>]|\/>/),element_name:we.until(/[\n\r\t >\/]/),angular_control_flow_start:ne.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ne.starting_with(/{{!--/).until_after(/--}}/),handlebars:ne.starting_with(/{{/).until_after(/}}/),handlebars_open:ne.until(/[\n\r\t }]/),handlebars_raw_close:ne.until(/}}/),comment:ne.starting_with(/<!--/).until_after(/-->/),cdata:ne.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ne.starting_with(/<!\[/).until_after(/]>/),processing:ne.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 ve=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ne.matching(ve).until_after(ve)}};X.prototype=new w,X.prototype._is_comment=function(ce){return!1},X.prototype._is_opening=function(ce){return ce.type===Q.TAG_OPEN||ce.type===Q.CONTROL_FLOW_OPEN},X.prototype._is_closing=function(ce,_e){return ce.type===Q.TAG_CLOSE&&_e&&((ce.text===">"||ce.text==="/>")&&_e.text[0]==="<"||ce.text==="}}"&&_e.text[0]==="{"&&_e.text[1]==="{")||ce.type===Q.CONTROL_FLOW_CLOSE&&ce.text==="}"&&_e.text.endsWith("{")},X.prototype._reset=function(){this._current_tag_name=""},X.prototype._get_next_token=function(ce,_e){var we=null;this._readWhitespace();var ne=this._input.peek();return ne===null?this._create_token(Q.EOF,""):(we=we||this._read_open_handlebars(ne,_e),we=we||this._read_attribute(ne,ce,_e),we=we||this._read_close(ne,_e),we=we||this._read_script_and_style(ne,ce),we=we||this._read_control_flows(ne,_e),we=we||this._read_raw_content(ne,ce,_e),we=we||this._read_content_word(ne,_e),we=we||this._read_comment_or_cdata(ne),we=we||this._read_processing(ne),we=we||this._read_open(ne,_e),we=we||this._create_token(Q.UNKNOWN,this._input.next()),we)},X.prototype._read_comment_or_cdata=function(ce){var _e=null,we=null,ne=null;if(ce==="<"){var ve=this._input.peek(1);ve==="!"&&(we=this.__patterns.comment.read(),we?(ne=P.get_directives(we),ne&&ne.ignore==="start"&&(we+=P.readIgnored(this._input))):we=this.__patterns.cdata.read()),we&&(_e=this._create_token(Q.COMMENT,we),_e.directives=ne)}return _e},X.prototype._read_processing=function(ce){var _e=null,we=null,ne=null;if(ce==="<"){var ve=this._input.peek(1);(ve==="!"||ve==="?")&&(we=this.__patterns.conditional_comment.read(),we=we||this.__patterns.processing.read()),we&&(_e=this._create_token(Q.COMMENT,we),_e.directives=ne)}return _e},X.prototype._read_open=function(ce,_e){var we=null,ne=null;return(!_e||_e.type===Q.CONTROL_FLOW_OPEN)&&ce==="<"&&(we=this._input.next(),this._input.peek()==="/"&&(we+=this._input.next()),we+=this.__patterns.element_name.read(),ne=this._create_token(Q.TAG_OPEN,we)),ne},X.prototype._read_open_handlebars=function(ce,_e){var we=null,ne=null;return(!_e||_e.type===Q.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&ce==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(we=this.__patterns.handlebars_comment.read(),we=we||this.__patterns.handlebars.read(),ne=this._create_token(Q.COMMENT,we)):(we=this.__patterns.handlebars_open.read(),ne=this._create_token(Q.TAG_OPEN,we))),ne},X.prototype._read_control_flows=function(ce,_e){var we="",ne=null;if(!this._options.templating.includes("angular"))return ne;if(ce==="@"){if(we=this.__patterns.angular_control_flow_start.read(),we==="")return ne;for(var ve=we.endsWith("(")?1:0,Oe=0;!(we.endsWith("{")&&ve===Oe);){var le=this._input.next();if(le===null)break;le==="("?ve++:le===")"&&Oe++,we+=le}ne=this._create_token(Q.CONTROL_FLOW_OPEN,we)}else ce==="}"&&_e&&_e.type===Q.CONTROL_FLOW_OPEN&&(we=this._input.next(),ne=this._create_token(Q.CONTROL_FLOW_CLOSE,we));return ne},X.prototype._read_close=function(ce,_e){var we=null,ne=null;return _e&&_e.type===Q.TAG_OPEN&&(_e.text[0]==="<"&&(ce===">"||ce==="/"&&this._input.peek(1)===">")?(we=this._input.next(),ce==="/"&&(we+=this._input.next()),ne=this._create_token(Q.TAG_CLOSE,we)):_e.text[0]==="{"&&ce==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ne=this._create_token(Q.TAG_CLOSE,"}}"))),ne},X.prototype._read_attribute=function(ce,_e,we){var ne=null,ve="";if(we&&we.text[0]==="<")if(ce==="=")ne=this._create_token(Q.EQUALS,this._input.next());else if(ce==='"'||ce==="'"){var Oe=this._input.next();ce==='"'?Oe+=this.__patterns.double_quote.read():Oe+=this.__patterns.single_quote.read(),ne=this._create_token(Q.VALUE,Oe)}else ve=this.__patterns.attribute.read(),ve&&(_e.type===Q.EQUALS?ne=this._create_token(Q.VALUE,ve):ne=this._create_token(Q.ATTRIBUTE,ve));return ne},X.prototype._is_content_unformatted=function(ce){return this._options.void_elements.indexOf(ce)===-1&&(this._options.content_unformatted.indexOf(ce)!==-1||this._options.unformatted.indexOf(ce)!==-1)},X.prototype._read_raw_content=function(ce,_e,we){var ne="";if(we&&we.text[0]==="{")ne=this.__patterns.handlebars_raw_close.read();else if(_e.type===Q.TAG_CLOSE&&_e.opened.text[0]==="<"&&_e.text[0]!=="/"){var ve=_e.opened.text.substr(1).toLowerCase();this._is_content_unformatted(ve)&&(ne=this._input.readUntil(new RegExp("</"+ve+"[\\n\\r\\t ]*?>","ig")))}return ne?this._create_token(Q.TEXT,ne):null},X.prototype._read_script_and_style=function(ce,_e){if(_e.type===Q.TAG_CLOSE&&_e.opened.text[0]==="<"&&_e.text[0]!=="/"){var we=_e.opened.text.substr(1).toLowerCase();if(we==="script"||we==="style"){var ne=this._read_comment_or_cdata(ce);if(ne)return ne.type=Q.TEXT,ne;var ve=this._input.readUntil(new RegExp("</"+we+"[\\n\\r\\t ]*?>","ig"));if(ve)return this._create_token(Q.TEXT,ve)}}return null},X.prototype._read_content_word=function(ce,_e){var we="";return this._options.unformatted_content_delimiter&&ce===this._options.unformatted_content_delimiter[0]&&(we=this.__patterns.unformatted_content_delimiter.read()),we||(we=_e&&_e.type===Q.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),we?this._create_token(Q.TEXT,we):null},D.exports.Tokenizer=X,D.exports.TOKEN=Q}],O={};function u(D){var B=O[D];if(B!==void 0)return B.exports;var _=O[D]={exports:{}};return ge[D](_,_.exports,u),_.exports}var J=u(18);Fe=J})();var he=Fe;if(1)V=[K,K(58553),K(87804)],me=function(ge){var O=K(58553),u=K(87804);return{html_beautify:function(J,D){return he(J,D,O.js_beautify,u.css_beautify)}}}.apply(mt,V),me!==void 0&&(gr.exports=me);else var W,m})()},58553:function(gr,mt){var K,V;(function(){var me;(function(){"use strict";var he=[function(O,u,J){var D=J(1).Beautifier,B=J(5).Options;function _(w,x){var Y=new D(w,x);return Y.beautify()}O.exports=_,O.exports.defaultOptions=function(){return new B}},function(O,u,J){var D=J(2).Output,B=J(3).Token,_=J(4),w=J(5).Options,x=J(7).Tokenizer,Y=J(7).line_starters,M=J(7).positionable_operators,H=J(7).TOKEN;function Q(y,$){return $.indexOf(y)!==-1}function P(y){return y.replace(/^\s+/g,"")}function X(y){for(var $={},Ae=0;Ae<y.length;Ae++)$[y[Ae].replace(/-/g,"_")]=y[Ae];return $}function ce(y,$){return y&&y.type===H.RESERVED&&y.text===$}function _e(y,$){return y&&y.type===H.RESERVED&&Q(y.text,$)}var we=["case","return","do","if","throw","else","await","break","continue","async"],ne=["before-newline","after-newline","preserve-newline"],ve=X(ne),Oe=[ve.before_newline,ve.preserve_newline],le={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Me(y,$){$.multiline_frame||$.mode===le.ForInitializer||$.mode===le.Conditional||y.remove_indent($.start_line_index)}function Z(y){y=y.replace(_.allLineBreaks,`
`);for(var $=[],Ae=y.indexOf(`
`);Ae!==-1;)$.push(y.substring(0,Ae)),y=y.substring(Ae+1),Ae=y.indexOf(`
`);return y.length&&$.push(y),$}function I(y){return y===le.ArrayLiteral}function G(y){return Q(y,[le.Expression,le.ForInitializer,le.Conditional])}function z(y,$){for(var Ae=0;Ae<y.length;Ae++){var Ge=y[Ae].trim();if(Ge.charAt(0)!==$)return!1}return!0}function se(y,$){for(var Ae=0,Ge=y.length,Je;Ae<Ge;Ae++)if(Je=y[Ae],Je&&Je.indexOf($)!==0)return!1;return!0}function re(y,$){$=$||{},this._source_text=y||"",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 w($)}re.prototype.create_flags=function(y,$){var Ae=0;y&&(Ae=y.indentation_level,!this._output.just_added_newline()&&y.line_indent_level>Ae&&(Ae=y.line_indent_level));var Ge={mode:$,parent:y,last_token:y?y.last_token:new B(H.START_BLOCK,""),last_word:y?y.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:Ae,alignment:0,line_indent_level:y?y.line_indent_level:Ae,start_line_index:this._output.get_line_number(),ternary_depth:0};return Ge},re.prototype._reset=function(y){var $=y.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new D(this._options,$),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(le.BlockStatement);var Ae=new x(y,this._options);return this._tokens=Ae.tokenize(),y},re.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var y,$=this._reset(this._source_text),Ae=this._options.eol;this._options.eol==="auto"&&(Ae=`
`,$&&_.lineBreak.test($||"")&&(Ae=$.match(_.lineBreak)[0]));for(var Ge=this._tokens.next();Ge;)this.handle_token(Ge),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Ge,Ge=this._tokens.next();return y=this._output.get_code(Ae),y},re.prototype.handle_token=function(y,$){y.type===H.START_EXPR?this.handle_start_expr(y):y.type===H.END_EXPR?this.handle_end_expr(y):y.type===H.START_BLOCK?this.handle_start_block(y):y.type===H.END_BLOCK?this.handle_end_block(y):y.type===H.WORD?this.handle_word(y):y.type===H.RESERVED?this.handle_word(y):y.type===H.SEMICOLON?this.handle_semicolon(y):y.type===H.STRING?this.handle_string(y):y.type===H.EQUALS?this.handle_equals(y):y.type===H.OPERATOR?this.handle_operator(y):y.type===H.COMMA?this.handle_comma(y):y.type===H.BLOCK_COMMENT?this.handle_block_comment(y,$):y.type===H.COMMENT?this.handle_comment(y,$):y.type===H.DOT?this.handle_dot(y):y.type===H.EOF?this.handle_eof(y):y.type===H.UNKNOWN?this.handle_unknown(y,$):this.handle_unknown(y,$)},re.prototype.handle_whitespace_and_comments=function(y,$){var Ae=y.newlines,Ge=this._options.keep_array_indentation&&I(this._flags.mode);if(y.comments_before)for(var Je=y.comments_before.next();Je;)this.handle_whitespace_and_comments(Je,$),this.handle_token(Je,$),Je=y.comments_before.next();if(Ge)for(var yt=0;yt<Ae;yt+=1)this.print_newline(yt>0,$);else if(this._options.max_preserve_newlines&&Ae>this._options.max_preserve_newlines&&(Ae=this._options.max_preserve_newlines),this._options.preserve_newlines&&Ae>1){this.print_newline(!1,$);for(var dt=1;dt<Ae;dt+=1)this.print_newline(!0,$)}};var E=["async","break","continue","return","throw","yield"];re.prototype.allow_wrap_or_preserved_newline=function(y,$){if($=$===void 0?!1:$,!this._output.just_added_newline()){var Ae=this._options.preserve_newlines&&y.newlines||$,Ge=Q(this._flags.last_token.text,M)||Q(y.text,M);if(Ge){var Je=Q(this._flags.last_token.text,M)&&Q(this._options.operator_position,Oe)||Q(y.text,M);Ae=Ae&&Je}if(Ae)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(_e(this._flags.last_token,E))return;this._output.set_wrap_point()}}},re.prototype.print_newline=function(y,$){if(!$&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==H.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var Ae=this._tokens.peek();this._flags.mode===le.Statement&&!(this._flags.if_block&&ce(Ae,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(y)&&(this._flags.multiline_frame=!0)},re.prototype.print_token_line_indentation=function(y){this._output.just_added_newline()&&(this._options.keep_array_indentation&&y.newlines&&(y.text==="["||I(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(y.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))},re.prototype.print_token=function(y){if(this._output.raw){this._output.add_raw_token(y);return}if(this._options.comma_first&&y.previous&&y.previous.type===H.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var $=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push($),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(y),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(y),this._output.non_breaking_space=!0,this._output.add_token(y.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},re.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},re.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))},re.prototype.set_mode=function(y){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,y),this._flags=this.create_flags(this._previous_flags,y),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},re.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===le.Statement&&Me(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},re.prototype.start_of_object_property=function(){return this._flags.parent.mode===le.ObjectLiteral&&this._flags.mode===le.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||_e(this._flags.last_token,["get","set"]))},re.prototype.start_of_statement=function(y){var $=!1;return $=$||_e(this._flags.last_token,["var","let","const"])&&y.type===H.WORD,$=$||ce(this._flags.last_token,"do"),$=$||!(this._flags.parent.mode===le.ObjectLiteral&&this._flags.mode===le.Statement)&&_e(this._flags.last_token,E)&&!y.newlines,$=$||ce(this._flags.last_token,"else")&&!(ce(y,"if")&&!y.comments_before),$=$||this._flags.last_token.type===H.END_EXPR&&(this._previous_flags.mode===le.ForInitializer||this._previous_flags.mode===le.Conditional),$=$||this._flags.last_token.type===H.WORD&&this._flags.mode===le.BlockStatement&&!this._flags.in_case&&!(y.text==="--"||y.text==="++")&&this._last_last_text!=="function"&&y.type!==H.WORD&&y.type!==H.RESERVED,$=$||this._flags.mode===le.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||_e(this._flags.last_token,["get","set"])),$?(this.set_mode(le.Statement),this.indent(),this.handle_whitespace_and_comments(y,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(y,_e(y,["do","for","if","while"])),!0):!1},re.prototype.handle_start_expr=function(y){this.start_of_statement(y)||this.handle_whitespace_and_comments(y);var $=le.Expression;if(y.text==="["){if(this._flags.last_token.type===H.WORD||this._flags.last_token.text===")"){_e(this._flags.last_token,Y)&&(this._output.space_before_token=!0),this.print_token(y),this.set_mode($),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}$=le.ArrayLiteral,I(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()),Q(this._flags.last_token.type,[H.START_EXPR,H.END_EXPR,H.WORD,H.OPERATOR,H.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===H.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,$=le.ForInitializer):Q(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,$=le.Conditional):Q(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&y.whitespace_before===""?this._output.space_before_token=!1:(Q(this._flags.last_token.text,Y)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(y);else if(this._flags.last_token.type===H.WORD){this._output.space_before_token=!1;var Ae=this._tokens.peek(-3);if(this._options.space_after_named_function&&Ae){var Ge=this._tokens.peek(-4);_e(Ae,["async","function"])||Ae.text==="*"&&_e(Ge,["async","function"])?this._output.space_before_token=!0:this._flags.mode===le.ObjectLiteral?(Ae.text==="{"||Ae.text===","||Ae.text==="*"&&(Ge.text==="{"||Ge.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(y);(this._flags.last_token.type===H.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(Q(this._last_last_text,["function","yield"])||this._flags.mode===le.ObjectLiteral&&Q(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===H.START_BLOCK?this.print_newline():(this._flags.last_token.type===H.END_EXPR||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===H.COMMA)&&this.allow_wrap_or_preserved_newline(y,y.newlines),this.print_token(y),this.set_mode($),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},re.prototype.handle_end_expr=function(y){for(;this._flags.mode===le.Statement;)this.restore_mode();this.handle_whitespace_and_comments(y),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(y,y.text==="]"&&I(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===H.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(y),this.restore_mode(),Me(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===le.Conditional&&(this._previous_flags.mode=le.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},re.prototype.handle_start_block=function(y){this.handle_whitespace_and_comments(y);var $=this._tokens.peek(),Ae=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===H.END_EXPR?(this.set_mode(le.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(le.BlockStatement):Ae&&(Q(Ae.text,[":",","])&&Q($.type,[H.STRING,H.WORD,H.RESERVED])||Q($.text,["get","set","..."])&&Q(Ae.type,[H.WORD,H.RESERVED]))?Q(this._last_last_text,["class","interface"])&&!Q(Ae.text,[":",","])?this.set_mode(le.BlockStatement):this.set_mode(le.ObjectLiteral):this._flags.last_token.type===H.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(le.BlockStatement):Q(this._flags.last_token.type,[H.EQUALS,H.START_EXPR,H.COMMA,H.OPERATOR])||_e(this._flags.last_token,["return","throw","import","default"])?this.set_mode(le.ObjectLiteral):this.set_mode(le.BlockStatement),this._flags.last_token&&_e(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Ge=!$.comments_before&&$.text==="}",Je=Ge&&this._flags.last_word==="function"&&this._flags.last_token.type===H.END_EXPR;if(this._options.brace_preserve_inline){var yt=0,dt=null;this._flags.inline_frame=!0;do if(yt+=1,dt=this._tokens.peek(yt-1),dt.newlines){this._flags.inline_frame=!1;break}while(dt.type!==H.EOF&&!(dt.type===H.END_BLOCK&&dt.opened===y))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&y.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==H.OPERATOR&&(Je||this._flags.last_token.type===H.EQUALS||_e(this._flags.last_token,we)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(I(this._previous_flags.mode)&&(this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.COMMA)&&((this._flags.last_token.type===H.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(y),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==H.OPERATOR&&this._flags.last_token.type!==H.START_EXPR&&(Q(this._flags.last_token.type,[H.START_BLOCK,H.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(y),this.indent(),!Ge&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},re.prototype.handle_end_block=function(y){for(this.handle_whitespace_and_comments(y);this._flags.mode===le.Statement;)this.restore_mode();var $=this._flags.last_token.type===H.START_BLOCK;this._flags.inline_frame&&!$?this._output.space_before_token=!0:this._options.brace_style==="expand"?$||this.print_newline():$||(I(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(y)},re.prototype.handle_word=function(y){if(y.type===H.RESERVED){if(Q(y.text,["set","get"])&&this._flags.mode!==le.ObjectLiteral)y.type=H.WORD;else if(y.text==="import"&&Q(this._tokens.peek().text,["(","."]))y.type=H.WORD;else if(Q(y.text,["as","from"])&&!this._flags.import_block)y.type=H.WORD;else if(this._flags.mode===le.ObjectLiteral){var $=this._tokens.peek();$.text===":"&&(y.type=H.WORD)}}if(this.start_of_statement(y)?_e(this._flags.last_token,["var","let","const"])&&y.type===H.WORD&&(this._flags.declaration_statement=!0):y.newlines&&!G(this._flags.mode)&&(this._flags.last_token.type!==H.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==H.EQUALS&&(this._options.preserve_newlines||!_e(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(y),this.print_newline()):this.handle_whitespace_and_comments(y),this._flags.do_block&&!this._flags.do_while)if(ce(y,"while")){this._output.space_before_token=!0,this.print_token(y),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&&ce(y,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===le.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&_e(y,["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(y),this._flags.in_case=!0;return}if((this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR)&&!this.start_of_object_property()&&!(Q(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===le.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(y),ce(y,"function")){(Q(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(Q(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===H.OPERATOR))&&!this._output.just_added_blankline()&&!y.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD?_e(this._flags.last_token,["get","set","new","export"])||_e(this._flags.last_token,E)?this._output.space_before_token=!0:ce(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===H.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(G(this._flags.mode)||I(this._flags.mode))||this.print_newline(),this.print_token(y),this._flags.last_word=y.text;return}var Ae="NONE";if(this._flags.last_token.type===H.END_BLOCK?this._previous_flags.inline_frame?Ae="SPACE":_e(y,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&y.newlines?Ae="NEWLINE":(Ae="SPACE",this._output.space_before_token=!0):Ae="NEWLINE":this._flags.last_token.type===H.SEMICOLON&&this._flags.mode===le.BlockStatement?Ae="NEWLINE":this._flags.last_token.type===H.SEMICOLON&&G(this._flags.mode)?Ae="SPACE":this._flags.last_token.type===H.STRING?Ae="NEWLINE":this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD||this._flags.last_token.text==="*"&&(Q(this._last_last_text,["function","yield"])||this._flags.mode===le.ObjectLiteral&&Q(this._last_last_text,["{",","]))?Ae="SPACE":this._flags.last_token.type===H.START_BLOCK?this._flags.inline_frame?Ae="SPACE":Ae="NEWLINE":this._flags.last_token.type===H.END_EXPR&&(this._output.space_before_token=!0,Ae="NEWLINE"),_e(y,Y)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Ae="SPACE":Ae="NEWLINE"),_e(y,["else","catch","finally"]))if((!(this._flags.last_token.type===H.END_BLOCK&&this._previous_flags.mode===le.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&y.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Ge=this._output.current_line;Ge.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Ae==="NEWLINE"?_e(this._flags.last_token,we)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&_e(y,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==H.END_EXPR?(this._flags.last_token.type!==H.START_EXPR||!_e(y,["var","let","const"]))&&this._flags.last_token.text!==":"&&(ce(y,"if")&&ce(y.previous,"else")?this._output.space_before_token=!0:this.print_newline()):_e(y,Y)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&I(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Ae==="SPACE"&&(this._output.space_before_token=!0);y.previous&&(y.previous.type===H.WORD||y.previous.type===H.RESERVED)&&(this._output.space_before_token=!0),this.print_token(y),this._flags.last_word=y.text,y.type===H.RESERVED&&(y.text==="do"?this._flags.do_block=!0:y.text==="if"?this._flags.if_block=!0:y.text==="import"?this._flags.import_block=!0:this._flags.import_block&&ce(y,"from")&&(this._flags.import_block=!1))},re.prototype.handle_semicolon=function(y){this.start_of_statement(y)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(y);for(var $=this._tokens.peek();this._flags.mode===le.Statement&&!(this._flags.if_block&&ce($,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(y)},re.prototype.handle_string=function(y){y.text.startsWith("`")&&y.newlines===0&&y.whitespace_before===""&&(y.previous.text===")"||this._flags.last_token.type===H.WORD)||(this.start_of_statement(y)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(y),this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(y):y.text.startsWith("`")&&this._flags.last_token.type===H.END_EXPR&&(y.previous.text==="]"||y.previous.text===")")&&y.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(y)},re.prototype.handle_equals=function(y){this.start_of_statement(y)||this.handle_whitespace_and_comments(y),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(y),this._output.space_before_token=!0},re.prototype.handle_comma=function(y){this.handle_whitespace_and_comments(y,!0),this.print_token(y),this._output.space_before_token=!0,this._flags.declaration_statement?(G(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(y)):this._flags.mode===le.ObjectLiteral||this._flags.mode===le.Statement&&this._flags.parent.mode===le.ObjectLiteral?(this._flags.mode===le.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(y)},re.prototype.handle_operator=function(y){var $=y.text==="*"&&(_e(this._flags.last_token,["function","yield"])||Q(this._flags.last_token.type,[H.START_BLOCK,H.COMMA,H.END_BLOCK,H.SEMICOLON])),Ae=Q(y.text,["-","+"])&&(Q(this._flags.last_token.type,[H.START_BLOCK,H.START_EXPR,H.EQUALS,H.OPERATOR])||Q(this._flags.last_token.text,Y)||this._flags.last_token.text===",");if(!this.start_of_statement(y)){var Ge=!$;this.handle_whitespace_and_comments(y,Ge)}if(y.text==="*"&&this._flags.last_token.type===H.DOT){this.print_token(y);return}if(y.text==="::"){this.print_token(y);return}if(Q(y.text,["-","+"])&&this.start_of_object_property()){this.print_token(y);return}if(this._flags.last_token.type===H.OPERATOR&&Q(this._options.operator_position,Oe)&&this.allow_wrap_or_preserved_newline(y),y.text===":"&&this._flags.in_case){this.print_token(y),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==H.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 Je=!0,yt=!0,dt=!1;if(y.text===":"?this._flags.ternary_depth===0?Je=!1:(this._flags.ternary_depth-=1,dt=!0):y.text==="?"&&(this._flags.ternary_depth+=1),!Ae&&!$&&this._options.preserve_newlines&&Q(y.text,M)){var Rt=y.text===":",bt=Rt&&dt,ht=Rt&&!dt;switch(this._options.operator_position){case ve.before_newline:this._output.space_before_token=!ht,this.print_token(y),(!Rt||bt)&&this.allow_wrap_or_preserved_newline(y),this._output.space_before_token=!0;return;case ve.after_newline:this._output.space_before_token=!0,!Rt||bt?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(y):this._output.space_before_token=!1,this.print_token(y),this._output.space_before_token=!0;return;case ve.preserve_newline:ht||this.allow_wrap_or_preserved_newline(y),Je=!(this._output.just_added_newline()||ht),this._output.space_before_token=Je,this.print_token(y),this._output.space_before_token=!0;return}}if($){this.allow_wrap_or_preserved_newline(y),Je=!1;var Le=this._tokens.peek();yt=Le&&Q(Le.type,[H.WORD,H.RESERVED])}else if(y.text==="...")this.allow_wrap_or_preserved_newline(y),Je=this._flags.last_token.type===H.START_BLOCK,yt=!1;else if(Q(y.text,["--","++","!","~"])||Ae){if((this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR)&&this.allow_wrap_or_preserved_newline(y),Je=!1,yt=!1,y.newlines&&(y.text==="--"||y.text==="++"||y.text==="~")){var nt=_e(this._flags.last_token,we)&&y.newlines;nt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(nt,!0)}this._flags.last_token.text===";"&&G(this._flags.mode)&&(Je=!0),this._flags.last_token.type===H.RESERVED?Je=!0:this._flags.last_token.type===H.END_EXPR?Je=!(this._flags.last_token.text==="]"&&(y.text==="--"||y.text==="++")):this._flags.last_token.type===H.OPERATOR&&(Je=Q(y.text,["--","-","++","+"])&&Q(this._flags.last_token.text,["--","-","++","+"]),Q(y.text,["+","-"])&&Q(this._flags.last_token.text,["--","++"])&&(yt=!0)),(this._flags.mode===le.BlockStatement&&!this._flags.inline_frame||this._flags.mode===le.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Je,this.print_token(y),this._output.space_before_token=yt},re.prototype.handle_block_comment=function(y,$){if(this._output.raw){this._output.add_raw_token(y),y.directives&&y.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(y.directives){this.print_newline(!1,$),this.print_token(y),y.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!_.newline.test(y.text)&&!y.newlines){this._output.space_before_token=!0,this.print_token(y),this._output.space_before_token=!0;return}else this.print_block_commment(y,$)},re.prototype.print_block_commment=function(y,$){var Ae=Z(y.text),Ge,Je=!1,yt=!1,dt=y.whitespace_before,Rt=dt.length;if(this.print_newline(!1,$),this.print_token_line_indentation(y),this._output.add_token(Ae[0]),this.print_newline(!1,$),Ae.length>1){for(Ae=Ae.slice(1),Je=z(Ae,"*"),yt=se(Ae,dt),Je&&(this._flags.alignment=1),Ge=0;Ge<Ae.length;Ge++)Je?(this.print_token_line_indentation(y),this._output.add_token(P(Ae[Ge]))):yt&&Ae[Ge]?(this.print_token_line_indentation(y),this._output.add_token(Ae[Ge].substring(Rt))):(this._output.current_line.set_indent(-1),this._output.add_token(Ae[Ge])),this.print_newline(!1,$);this._flags.alignment=0}},re.prototype.handle_comment=function(y,$){y.newlines?this.print_newline(!1,$):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(y),this.print_newline(!1,$)},re.prototype.handle_dot=function(y){this.start_of_statement(y)||this.handle_whitespace_and_comments(y,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),_e(this._flags.last_token,we)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(y,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(y)},re.prototype.handle_unknown=function(y,$){this.print_token(y),y.text[y.text.length-1]===`
`&&this.print_newline(!1,$)},re.prototype.handle_eof=function(y){for(;this._flags.mode===le.Statement;)this.restore_mode();this.handle_whitespace_and_comments(y)},O.exports.Beautifier=re},function(O){function u(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=[]}u.prototype.clone_empty=function(){var B=new u(this.__parent);return B.set_indent(this.__indent_count,this.__alignment_count),B},u.prototype.item=function(B){return B<0?this.__items[this.__items.length+B]:this.__items[B]},u.prototype.has_match=function(B){for(var _=this.__items.length-1;_>=0;_--)if(this.__items[_].match(B))return!0;return!1},u.prototype.set_indent=function(B,_){this.is_empty()&&(this.__indent_count=B||0,this.__alignment_count=_||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},u.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)},u.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},u.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},u.prototype.is_empty=function(){return this.__items.length===0},u.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},u.prototype.push=function(B){this.__items.push(B);var _=B.lastIndexOf(`
`);_!==-1?this.__character_count=B.length-_:this.__character_count+=B.length},u.prototype.pop=function(){var B=null;return this.is_empty()||(B=this.__items.pop(),this.__character_count-=B.length),B},u.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},u.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},u.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},u.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 J(B,_){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)),_=_||"",B.indent_level>0&&(_=new Array(B.indent_level+1).join(this.__indent_string)),this.__base_string=_,this.__base_string_length=_.length}J.prototype.get_indent_size=function(B,_){var w=this.__base_string_length;return _=_||0,B<0&&(w=0),w+=B*this.__indent_size,w+=_,w},J.prototype.get_indent_string=function(B,_){var w=this.__base_string;return _=_||0,B<0&&(B=0,w=""),_+=B*this.__indent_size,this.__ensure_cache(_),w+=this.__cache[_],w},J.prototype.__ensure_cache=function(B){for(;B>=this.__cache.length;)this.__add_column()},J.prototype.__add_column=function(){var B=this.__cache.length,_=0,w="";this.__indent_size&&B>=this.__indent_size&&(_=Math.floor(B/this.__indent_size),B-=_*this.__indent_size,w=new Array(_+1).join(this.__indent_string)),B&&(w+=new Array(B+1).join(" ")),this.__cache.push(w)};function D(B,_){this.__indent_cache=new J(B,_),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 u(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}D.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},D.prototype.get_line_number=function(){return this.__lines.length},D.prototype.get_indent_string=function(B,_){return this.__indent_cache.get_indent_string(B,_)},D.prototype.get_indent_size=function(B,_){return this.__indent_cache.get_indent_size(B,_)},D.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},D.prototype.add_new_line=function(B){return this.is_empty()||!B&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},D.prototype.get_code=function(B){this.trim(!0);var _=this.current_line.pop();_&&(_[_.length-1]===`
`&&(_=_.replace(/\n+$/g,"")),this.current_line.push(_)),this._end_with_newline&&this.__add_outputline();var w=this.__lines.join(`
`);return B!==`
`&&(w=w.replace(/[\n]/g,B)),w},D.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},D.prototype.set_indent=function(B,_){return B=B||0,_=_||0,this.next_line.set_indent(B,_),this.__lines.length>1?(this.current_line.set_indent(B,_),!0):(this.current_line.set_indent(),!1)},D.prototype.add_raw_token=function(B){for(var _=0;_<B.newlines;_++)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},D.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()},D.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(" "))},D.prototype.remove_indent=function(B){for(var _=this.__lines.length;B<_;)this.__lines[B]._remove_indent(),B++;this.current_line._remove_wrap_indent()},D.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},D.prototype.just_added_newline=function(){return this.current_line.is_empty()},D.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},D.prototype.ensure_empty_line_above=function(B,_){for(var w=this.__lines.length-2;w>=0;){var x=this.__lines[w];if(x.is_empty())break;if(x.item(0).indexOf(B)!==0&&x.item(-1)!==_){this.__lines.splice(w+1,0,new u(this)),this.previous_line=this.__lines[this.__lines.length-2];break}w--}},O.exports.Output=D},function(O){function u(J,D,B,_){this.type=J,this.text=D,this.comments_before=null,this.newlines=B||0,this.whitespace_before=_||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}O.exports.Token=u},function(O,u){var J="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",D="\\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",_="\\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",w="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",x="(?:"+w+"|["+J+B+"])",Y="(?:"+w+"|["+D+B+_+"])*";u.identifier=new RegExp(x+Y,"g"),u.identifierStart=new RegExp(x),u.identifierMatch=new RegExp("(?:"+w+"|["+D+B+_+"])+");var M=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;u.newline=/[\n\r\u2028\u2029]/,u.lineBreak=new RegExp(`\r
|`+u.newline.source),u.allLineBreaks=new RegExp(u.lineBreak.source,"g")},function(O,u,J){var D=J(6).Options,B=["before-newline","after-newline","preserve-newline"];function _(w){D.call(this,w,"js");var x=this.raw_options.brace_style||null;x==="expand-strict"?this.raw_options.brace_style="expand":x==="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 Y=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var M=0;M<Y.length;M++)Y[M]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=Y[M];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)}_.prototype=new D,O.exports.Options=_},function(O){function u(B,_){this.raw_options=J(B,_),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"])}u.prototype._get_array=function(B,_){var w=this.raw_options[B],x=_||[];return typeof w=="object"?w!==null&&typeof w.concat=="function"&&(x=w.concat()):typeof w=="string"&&(x=w.split(/[^a-zA-Z0-9_\/\-]+/)),x},u.prototype._get_boolean=function(B,_){var w=this.raw_options[B],x=w===void 0?!!_:!!w;return x},u.prototype._get_characters=function(B,_){var w=this.raw_options[B],x=_||"";return typeof w=="string"&&(x=w.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),x},u.prototype._get_number=function(B,_){var w=this.raw_options[B];_=parseInt(_,10),isNaN(_)&&(_=0);var x=parseInt(w,10);return isNaN(x)&&(x=_),x},u.prototype._get_selection=function(B,_,w){var x=this._get_selection_list(B,_,w);if(x.length!==1)throw new Error("Invalid Option Value: The option '"+B+`' can only be one of the following values:
`+_+`
You passed in: '`+this.raw_options[B]+"'");return x[0]},u.prototype._get_selection_list=function(B,_,w){if(!_||_.length===0)throw new Error("Selection list cannot be empty.");if(w=w||[_[0]],!this._is_valid_selection(w,_))throw new Error("Invalid Default Value!");var x=this._get_array(B,w);if(!this._is_valid_selection(x,_))throw new Error("Invalid Option Value: The option '"+B+`' can contain only the following values:
`+_+`
You passed in: '`+this.raw_options[B]+"'");return x},u.prototype._is_valid_selection=function(B,_){return B.length&&_.length&&!B.some(function(w){return _.indexOf(w)===-1})};function J(B,_){var w={};B=D(B);var x;for(x in B)x!==_&&(w[x]=B[x]);if(_&&B[_])for(x in B[_])w[x]=B[_][x];return w}function D(B){var _={},w;for(w in B){var x=w.replace(/-/g,"_");_[x]=B[w]}return _}O.exports.Options=u,O.exports.normalizeOpts=D,O.exports.mergeOpts=J},function(O,u,J){var D=J(8).InputScanner,B=J(9).Tokenizer,_=J(9).TOKEN,w=J(13).Directives,x=J(4),Y=J(12).Pattern,M=J(14).TemplatablePattern;function H(z,se){return se.indexOf(z)!==-1}var Q={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:_.START,RAW:_.RAW,EOF:_.EOF},P=new w(/\/\*/,/\*\//),X=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,ce=/[0-9]/,_e=/[^\d\.]/,we=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ne=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ne=ne.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ne="\\?\\.(?!\\d) "+ne,ne=ne.replace(/ /g,"|");var ve=new RegExp(ne),Oe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),le=Oe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Me=new RegExp("^(?:"+le.join("|")+")$"),Z,I=function(z,se){B.call(this,z,se),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var re=new Y(this._input),E=new M(this._input).read_options(this._options);this.__patterns={template:E,identifier:E.starting_with(x.identifier).matching(x.identifierMatch),number:re.matching(X),punct:re.matching(ve),comment:re.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:re.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:re.matching(/<!--/),html_comment_end:re.matching(/-->/),include:re.starting_with(/#include/).until_after(x.lineBreak),shebang:re.starting_with(/#!/).until_after(x.lineBreak),xml:re.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:E.until(/['\\\n\r\u2028\u2029]/),double_quote:E.until(/["\\\n\r\u2028\u2029]/),template_text:E.until(/[`\\$]/),template_expression:E.until(/[`}\\]/)}};I.prototype=new B,I.prototype._is_comment=function(z){return z.type===Q.COMMENT||z.type===Q.BLOCK_COMMENT||z.type===Q.UNKNOWN},I.prototype._is_opening=function(z){return z.type===Q.START_BLOCK||z.type===Q.START_EXPR},I.prototype._is_closing=function(z,se){return(z.type===Q.END_BLOCK||z.type===Q.END_EXPR)&&se&&(z.text==="]"&&se.text==="["||z.text===")"&&se.text==="("||z.text==="}"&&se.text==="{")},I.prototype._reset=function(){Z=!1},I.prototype._get_next_token=function(z,se){var re=null;this._readWhitespace();var E=this._input.peek();return E===null?this._create_token(Q.EOF,""):(re=re||this._read_non_javascript(E),re=re||this._read_string(E),re=re||this._read_pair(E,this._input.peek(1)),re=re||this._read_word(z),re=re||this._read_singles(E),re=re||this._read_comment(E),re=re||this._read_regexp(E,z),re=re||this._read_xml(E,z),re=re||this._read_punctuation(),re=re||this._create_token(Q.UNKNOWN,this._input.next()),re)},I.prototype._read_word=function(z){var se;if(se=this.__patterns.identifier.read(),se!=="")return se=se.replace(x.allLineBreaks,`
`),!(z.type===Q.DOT||z.type===Q.RESERVED&&(z.text==="set"||z.text==="get"))&&Me.test(se)?(se==="in"||se==="of")&&(z.type===Q.WORD||z.type===Q.STRING)?this._create_token(Q.OPERATOR,se):this._create_token(Q.RESERVED,se):this._create_token(Q.WORD,se);if(se=this.__patterns.number.read(),se!=="")return this._create_token(Q.WORD,se)},I.prototype._read_singles=function(z){var se=null;return z==="("||z==="["?se=this._create_token(Q.START_EXPR,z):z===")"||z==="]"?se=this._create_token(Q.END_EXPR,z):z==="{"?se=this._create_token(Q.START_BLOCK,z):z==="}"?se=this._create_token(Q.END_BLOCK,z):z===";"?se=this._create_token(Q.SEMICOLON,z):z==="."&&_e.test(this._input.peek(1))?se=this._create_token(Q.DOT,z):z===","&&(se=this._create_token(Q.COMMA,z)),se&&this._input.next(),se},I.prototype._read_pair=function(z,se){var re=null;return z==="#"&&se==="{"&&(re=this._create_token(Q.START_BLOCK,z+se)),re&&(this._input.next(),this._input.next()),re},I.prototype._read_punctuation=function(){var z=this.__patterns.punct.read();if(z!=="")return z==="="?this._create_token(Q.EQUALS,z):z==="?."?this._create_token(Q.DOT,z):this._create_token(Q.OPERATOR,z)},I.prototype._read_non_javascript=function(z){var se="";if(z==="#"){if(this._is_first_token()&&(se=this.__patterns.shebang.read(),se))return this._create_token(Q.UNKNOWN,se.trim()+`
`);if(se=this.__patterns.include.read(),se)return this._create_token(Q.UNKNOWN,se.trim()+`
`);z=this._input.next();var re="#";if(this._input.hasNext()&&this._input.testChar(ce)){do z=this._input.next(),re+=z;while(this._input.hasNext()&&z!=="#"&&z!=="=");return z==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(re+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(re+="{}",this._input.next(),this._input.next())),this._create_token(Q.WORD,re)}this._input.back()}else if(z==="<"&&this._is_first_token()){if(se=this.__patterns.html_comment_start.read(),se){for(;this._input.hasNext()&&!this._input.testChar(x.newline);)se+=this._input.next();return Z=!0,this._create_token(Q.COMMENT,se)}}else if(Z&&z==="-"&&(se=this.__patterns.html_comment_end.read(),se))return Z=!1,this._create_token(Q.COMMENT,se);return null},I.prototype._read_comment=function(z){var se=null;if(z==="/"){var re="";if(this._input.peek(1)==="*"){re=this.__patterns.block_comment.read();var E=P.get_directives(re);E&&E.ignore==="start"&&(re+=P.readIgnored(this._input)),re=re.replace(x.allLineBreaks,`
`),se=this._create_token(Q.BLOCK_COMMENT,re),se.directives=E}else this._input.peek(1)==="/"&&(re=this.__patterns.comment.read(),se=this._create_token(Q.COMMENT,re))}return se},I.prototype._read_string=function(z){if(z==="`"||z==="'"||z==='"'){var se=this._input.next();return this.has_char_escapes=!1,z==="`"?se+=this._read_string_recursive("`",!0,"${"):se+=this._read_string_recursive(z),this.has_char_escapes&&this._options.unescape_strings&&(se=G(se)),this._input.peek()===z&&(se+=this._input.next()),se=se.replace(x.allLineBreaks,`
`),this._create_token(Q.STRING,se)}return null},I.prototype._allow_regexp_or_xml=function(z){return z.type===Q.RESERVED&&H(z.text,["return","case","throw","else","do","typeof","yield"])||z.type===Q.END_EXPR&&z.text===")"&&z.opened.previous.type===Q.RESERVED&&H(z.opened.previous.text,["if","while","for"])||H(z.type,[Q.COMMENT,Q.START_EXPR,Q.START_BLOCK,Q.START,Q.END_BLOCK,Q.OPERATOR,Q.EQUALS,Q.EOF,Q.SEMICOLON,Q.COMMA])},I.prototype._read_regexp=function(z,se){if(z==="/"&&this._allow_regexp_or_xml(se)){for(var re=this._input.next(),E=!1,y=!1;this._input.hasNext()&&(E||y||this._input.peek()!==z)&&!this._input.testChar(x.newline);)re+=this._input.peek(),E?E=!1:(E=this._input.peek()==="\\",this._input.peek()==="["?y=!0:this._input.peek()==="]"&&(y=!1)),this._input.next();return this._input.peek()===z&&(re+=this._input.next(),re+=this._input.read(x.identifier)),this._create_token(Q.STRING,re)}return null},I.prototype._read_xml=function(z,se){if(this._options.e4x&&z==="<"&&this._allow_regexp_or_xml(se)){var re="",E=this.__patterns.xml.read_match();if(E){for(var y=E[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),$=y.indexOf("{")===0,Ae=0;E;){var Ge=!!E[1],Je=E[2],yt=!!E[E.length-1]||Je.slice(0,8)==="![CDATA[";if(!yt&&(Je===y||$&&Je.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Ge?--Ae:++Ae),re+=E[0],Ae<=0)break;E=this.__patterns.xml.read_match()}return E||(re+=this._input.match(/[\s\S]*/g)[0]),re=re.replace(x.allLineBreaks,`
`),this._create_token(Q.STRING,re)}}return null};function G(z){for(var se="",re=0,E=new D(z),y=null;E.hasNext();)if(y=E.match(/([\s]|[^\\]|\\\\)+/g),y&&(se+=y[0]),E.peek()==="\\"){if(E.next(),E.peek()==="x")y=E.match(/x([0-9A-Fa-f]{2})/g);else if(E.peek()==="u")y=E.match(/u([0-9A-Fa-f]{4})/g),y||(y=E.match(/u\{([0-9A-Fa-f]+)\}/g));else{se+="\\",E.hasNext()&&(se+=E.next());continue}if(!y||(re=parseInt(y[1],16),re>126&&re<=255&&y[0].indexOf("x")===0))return z;re>=0&&re<32||re>1114111?se+="\\"+y[0]:re===34||re===39||re===92?se+="\\"+String.fromCharCode(re):se+=String.fromCharCode(re)}return se}I.prototype._read_string_recursive=function(z,se,re){var E,y;z==="'"?y=this.__patterns.single_quote:z==='"'?y=this.__patterns.double_quote:z==="`"?y=this.__patterns.template_text:z==="}"&&(y=this.__patterns.template_expression);for(var $=y.read(),Ae="";this._input.hasNext();){if(Ae=this._input.next(),Ae===z||!se&&x.newline.test(Ae)){this._input.back();break}else Ae==="\\"&&this._input.hasNext()?(E=this._input.peek(),E==="x"||E==="u"?this.has_char_escapes=!0:E==="\r"&&this._input.peek(1)===`
`&&this._input.next(),Ae+=this._input.next()):re&&(re==="${"&&Ae==="$"&&this._input.peek()==="{"&&(Ae+=this._input.next()),re===Ae&&(z==="`"?Ae+=this._read_string_recursive("}",se,"`"):Ae+=this._read_string_recursive("`",se,"${"),this._input.hasNext()&&(Ae+=this._input.next())));Ae+=y.read(),$+=Ae}return $},O.exports.Tokenizer=I,O.exports.TOKEN=Q,O.exports.positionable_operators=we.slice(),O.exports.line_starters=Oe.slice()},function(O){var u=RegExp.prototype.hasOwnProperty("sticky");function J(D){this.__input=D||"",this.__input_length=this.__input.length,this.__position=0}J.prototype.restart=function(){this.__position=0},J.prototype.back=function(){this.__position>0&&(this.__position-=1)},J.prototype.hasNext=function(){return this.__position<this.__input_length},J.prototype.next=function(){var D=null;return this.hasNext()&&(D=this.__input.charAt(this.__position),this.__position+=1),D},J.prototype.peek=function(D){var B=null;return D=D||0,D+=this.__position,D>=0&&D<this.__input_length&&(B=this.__input.charAt(D)),B},J.prototype.__match=function(D,B){D.lastIndex=B;var _=D.exec(this.__input);return _&&!(u&&D.sticky)&&_.index!==B&&(_=null),_},J.prototype.test=function(D,B){return B=B||0,B+=this.__position,B>=0&&B<this.__input_length?!!this.__match(D,B):!1},J.prototype.testChar=function(D,B){var _=this.peek(B);return D.lastIndex=0,_!==null&&D.test(_)},J.prototype.match=function(D){var B=this.__match(D,this.__position);return B?this.__position+=B[0].length:B=null,B},J.prototype.read=function(D,B,_){var w="",x;return D&&(x=this.match(D),x&&(w+=x[0])),B&&(x||!D)&&(w+=this.readUntil(B,_)),w},J.prototype.readUntil=function(D,B){var _="",w=this.__position;D.lastIndex=this.__position;var x=D.exec(this.__input);return x?(w=x.index,B&&(w+=x[0].length)):w=this.__input_length,_=this.__input.substring(this.__position,w),this.__position=w,_},J.prototype.readUntilAfter=function(D){return this.readUntil(D,!0)},J.prototype.get_regexp=function(D,B){var _=null,w="g";return B&&u&&(w="y"),typeof D=="string"&&D!==""?_=new RegExp(D,w):D&&(_=new RegExp(D.source,w)),_},J.prototype.get_literal_regexp=function(D){return RegExp(D.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},J.prototype.peekUntilAfter=function(D){var B=this.__position,_=this.readUntilAfter(D);return this.__position=B,_},J.prototype.lookBack=function(D){var B=this.__position-1;return B>=D.length&&this.__input.substring(B-D.length,B).toLowerCase()===D},O.exports.InputScanner=J},function(O,u,J){var D=J(8).InputScanner,B=J(3).Token,_=J(10).TokenStream,w=J(11).WhitespacePattern,x={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},Y=function(M,H){this._input=new D(M),this._options=H||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new w(this._input)};Y.prototype.tokenize=function(){this._input.restart(),this.__tokens=new _,this._reset();for(var M,H=new B(x.START,""),Q=null,P=[],X=new _;H.type!==x.EOF;){for(M=this._get_next_token(H,Q);this._is_comment(M);)X.add(M),M=this._get_next_token(H,Q);X.isEmpty()||(M.comments_before=X,X=new _),M.parent=Q,this._is_opening(M)?(P.push(Q),Q=M):Q&&this._is_closing(M,Q)&&(M.opened=Q,Q.closed=M,Q=P.pop(),M.parent=Q),M.previous=H,H.next=M,this.__tokens.add(M),H=M}return this.__tokens},Y.prototype._is_first_token=function(){return this.__tokens.isEmpty()},Y.prototype._reset=function(){},Y.prototype._get_next_token=function(M,H){this._readWhitespace();var Q=this._input.read(/.+/g);return Q?this._create_token(x.RAW,Q):this._create_token(x.EOF,"")},Y.prototype._is_comment=function(M){return!1},Y.prototype._is_opening=function(M){return!1},Y.prototype._is_closing=function(M,H){return!1},Y.prototype._create_token=function(M,H){var Q=new B(M,H,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return Q},Y.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},O.exports.Tokenizer=Y,O.exports.TOKEN=x},function(O){function u(J){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=J}u.prototype.restart=function(){this.__position=0},u.prototype.isEmpty=function(){return this.__tokens_length===0},u.prototype.hasNext=function(){return this.__position<this.__tokens_length},u.prototype.next=function(){var J=null;return this.hasNext()&&(J=this.__tokens[this.__position],this.__position+=1),J},u.prototype.peek=function(J){var D=null;return J=J||0,J+=this.__position,J>=0&&J<this.__tokens_length&&(D=this.__tokens[J]),D},u.prototype.add=function(J){this.__parent_token&&(J.parent=this.__parent_token),this.__tokens.push(J),this.__tokens_length+=1},O.exports.TokenStream=u},function(O,u,J){var D=J(12).Pattern;function B(_,w){D.call(this,_,w),w?this._line_regexp=this._input.get_regexp(w._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}B.prototype=new D,B.prototype.__set_whitespace_patterns=function(_,w){_+="\\t ",w+="\\n\\r",this._match_pattern=this._input.get_regexp("["+_+w+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+w+"]")},B.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var _=this._input.read(this._match_pattern);if(_===" ")this.whitespace_before_token=" ";else if(_){var w=this.__split(this._newline_regexp,_);this.newline_count=w.length-1,this.whitespace_before_token=w[this.newline_count]}return _},B.prototype.matching=function(_,w){var x=this._create();return x.__set_whitespace_patterns(_,w),x._update(),x},B.prototype._create=function(){return new B(this._input,this)},B.prototype.__split=function(_,w){_.lastIndex=0;for(var x=0,Y=[],M=_.exec(w);M;)Y.push(w.substring(x,M.index)),x=M.index+M[0].length,M=_.exec(w);return x<w.length?Y.push(w.substring(x,w.length)):Y.push(""),Y},O.exports.WhitespacePattern=B},function(O){function u(J,D){this._input=J,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,D&&(this._starting_pattern=this._input.get_regexp(D._starting_pattern,!0),this._match_pattern=this._input.get_regexp(D._match_pattern,!0),this._until_pattern=this._input.get_regexp(D._until_pattern),this._until_after=D._until_after)}u.prototype.read=function(){var J=this._input.read(this._starting_pattern);return(!this._starting_pattern||J)&&(J+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),J},u.prototype.read_match=function(){return this._input.match(this._match_pattern)},u.prototype.until_after=function(J){var D=this._create();return D._until_after=!0,D._until_pattern=this._input.get_regexp(J),D._update(),D},u.prototype.until=function(J){var D=this._create();return D._until_after=!1,D._until_pattern=this._input.get_regexp(J),D._update(),D},u.prototype.starting_with=function(J){var D=this._create();return D._starting_pattern=this._input.get_regexp(J,!0),D._update(),D},u.prototype.matching=function(J){var D=this._create();return D._match_pattern=this._input.get_regexp(J,!0),D._update(),D},u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){},O.exports.Pattern=u},function(O){function u(J,D){J=typeof J=="string"?J:J.source,D=typeof D=="string"?D:D.source,this.__directives_block_pattern=new RegExp(J+/ beautify( \w+[:]\w+)+ /.source+D,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(J+/\sbeautify\signore:end\s/.source+D,"g")}u.prototype.get_directives=function(J){if(!J.match(this.__directives_block_pattern))return null;var D={};this.__directive_pattern.lastIndex=0;for(var B=this.__directive_pattern.exec(J);B;)D[B[1]]=B[2],B=this.__directive_pattern.exec(J);return D},u.prototype.readIgnored=function(J){return J.readUntilAfter(this.__directives_end_ignore_pattern)},O.exports.Directives=u},function(O,u,J){var D=J(12).Pattern,B={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function _(w,x){D.call(this,w,x),this.__template_pattern=null,this._disabled=Object.assign({},B),this._excluded=Object.assign({},B),x&&(this.__template_pattern=this._input.get_regexp(x.__template_pattern),this._excluded=Object.assign(this._excluded,x._excluded),this._disabled=Object.assign(this._disabled,x._disabled));var Y=new D(w);this.__patterns={handlebars_comment:Y.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:Y.starting_with(/{{{/).until_after(/}}}/),handlebars:Y.starting_with(/{{/).until_after(/}}/),php:Y.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:Y.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:Y.starting_with(/{%/).until_after(/%}/),django_value:Y.starting_with(/{{/).until_after(/}}/),django_comment:Y.starting_with(/{#/).until_after(/#}/),smarty:Y.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:Y.starting_with(/{\*/).until_after(/\*}/),smarty_literal:Y.starting_with(/{literal}/).until_after(/{\/literal}/)}}_.prototype=new D,_.prototype._create=function(){return new _(this._input,this)},_.prototype._update=function(){this.__set_templated_pattern()},_.prototype.disable=function(w){var x=this._create();return x._disabled[w]=!0,x._update(),x},_.prototype.read_options=function(w){var x=this._create();for(var Y in B)x._disabled[Y]=w.templating.indexOf(Y)===-1;return x._update(),x},_.prototype.exclude=function(w){var x=this._create();return x._excluded[w]=!0,x._update(),x},_.prototype.read=function(){var w="";this._match_pattern?w=this._input.read(this._starting_pattern):w=this._input.read(this._starting_pattern,this.__template_pattern);for(var x=this._read_template();x;)this._match_pattern?x+=this._input.read(this._match_pattern):x+=this._input.readUntil(this.__template_pattern),w+=x,x=this._read_template();return this._until_after&&(w+=this._input.readUntilAfter(this._until_pattern)),w},_.prototype.__set_templated_pattern=function(){var w=[];this._disabled.php||w.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||w.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||w.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||w.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(w.push(this.__patterns.django._starting_pattern.source),w.push(this.__patterns.django_value._starting_pattern.source),w.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||w.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&w.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+w.join("|")+")")},_.prototype._read_template=function(){var w="",x=this._input.peek();if(x==="<"){var Y=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&Y==="?"&&(w=w||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&Y==="%"&&(w=w||this.__patterns.erb.read())}else x==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(w=w||this.__patterns.handlebars_comment.read(),w=w||this.__patterns.handlebars_unescaped.read(),w=w||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(w=w||this.__patterns.django_value.read()),this._excluded.django||(w=w||this.__patterns.django_comment.read(),w=w||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(w=w||this.__patterns.smarty_comment.read(),w=w||this.__patterns.smarty_literal.read(),w=w||this.__patterns.smarty.read()));return w},O.exports.TemplatablePattern=_}],W={};function m(O){var u=W[O];if(u!==void 0)return u.exports;var J=W[O]={exports:{}};return he[O](J,J.exports,m),J.exports}var ge=m(0);me=ge})();var Fe=me;K=[],V=function(){return{js_beautify:Fe}}.apply(mt,K),V!==void 0&&(gr.exports=V)})()},32834:function(gr){(function(mt,K){gr.exports=K()})(this,function(){"use strict";function mt(Re,Ce){for(var Ee=0;Ee<Ce.length;Ee++){var j=Ce[Ee];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(Re,j.key,j)}}function K(Re,Ce,Ee){return Ce&&mt(Re.prototype,Ce),Ee&&mt(Re,Ee),Re}function V(Re,Ce){if(Re){if(typeof Re=="string")return me(Re,Ce);var Ee=Object.prototype.toString.call(Re).slice(8,-1);if(Ee==="Object"&&Re.constructor&&(Ee=Re.constructor.name),Ee==="Map"||Ee==="Set")return Array.from(Re);if(Ee==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ee))return me(Re,Ce)}}function me(Re,Ce){(Ce==null||Ce>Re.length)&&(Ce=Re.length);for(var Ee=0,j=new Array(Ce);Ee<Ce;Ee++)j[Ee]=Re[Ee];return j}function Fe(Re,Ce){var Ee=typeof Symbol!="undefined"&&Re[Symbol.iterator]||Re["@@iterator"];if(Ee)return(Ee=Ee.call(Re)).next.bind(Ee);if(Array.isArray(Re)||(Ee=V(Re))||Ce&&Re&&typeof Re.length=="number"){Ee&&(Re=Ee);var j=0;return function(){return j>=Re.length?{done:!0}:{done:!1,value:Re[j++]}}}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 he={exports:{}};function W(){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 m(Re){he.exports.defaults=Re}he.exports={defaults:W(),getDefaults:W,changeDefaults:m};var ge=/[&<>"']/,O=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,J=/[<>"']|&(?!#?\w+;)/g,D={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},B=function(Ce){return D[Ce]};function _(Re,Ce){if(Ce){if(ge.test(Re))return Re.replace(O,B)}else if(u.test(Re))return Re.replace(J,B);return Re}var w=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function x(Re){return Re.replace(w,function(Ce,Ee){return Ee=Ee.toLowerCase(),Ee==="colon"?":":Ee.charAt(0)==="#"?Ee.charAt(1)==="x"?String.fromCharCode(parseInt(Ee.substring(2),16)):String.fromCharCode(+Ee.substring(1)):""})}var Y=/(^|[^\[])\^/g;function M(Re,Ce){Re=Re.source||Re,Ce=Ce||"";var Ee={replace:function(ie,ae){return ae=ae.source||ae,ae=ae.replace(Y,"$1"),Re=Re.replace(ie,ae),Ee},getRegex:function(){return new RegExp(Re,Ce)}};return Ee}var H=/[^\w:]/g,Q=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function P(Re,Ce,Ee){if(Re){var j;try{j=decodeURIComponent(x(Ee)).replace(H,"").toLowerCase()}catch(ie){return null}if(j.indexOf("javascript:")===0||j.indexOf("vbscript:")===0||j.indexOf("data:")===0)return null}Ce&&!Q.test(Ee)&&(Ee=ne(Ce,Ee));try{Ee=encodeURI(Ee).replace(/%25/g,"%")}catch(ie){return null}return Ee}var X={},ce=/^[^:]+:\/*[^/]*$/,_e=/^([^:]+:)[\s\S]*$/,we=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ne(Re,Ce){X[" "+Re]||(ce.test(Re)?X[" "+Re]=Re+"/":X[" "+Re]=Me(Re,"/",!0)),Re=X[" "+Re];var Ee=Re.indexOf(":")===-1;return Ce.substring(0,2)==="//"?Ee?Ce:Re.replace(_e,"$1")+Ce:Ce.charAt(0)==="/"?Ee?Ce:Re.replace(we,"$1")+Ce:Re+Ce}var ve={exec:function(){}};function Oe(Re){for(var Ce=1,Ee,j;Ce<arguments.length;Ce++){Ee=arguments[Ce];for(j in Ee)Object.prototype.hasOwnProperty.call(Ee,j)&&(Re[j]=Ee[j])}return Re}function le(Re,Ce){var Ee=Re.replace(/\|/g,function(ae,de,Se){for(var xt=!1,gt=de;--gt>=0&&Se[gt]==="\\";)xt=!xt;return xt?"|":" |"}),j=Ee.split(/ \|/),ie=0;if(j.length>Ce)j.splice(Ce);else for(;j.length<Ce;)j.push("");for(;ie<j.length;ie++)j[ie]=j[ie].trim().replace(/\\\|/g,"|");return j}function Me(Re,Ce,Ee){var j=Re.length;if(j===0)return"";for(var ie=0;ie<j;){var ae=Re.charAt(j-ie-1);if(ae===Ce&&!Ee)ie++;else if(ae!==Ce&&Ee)ie++;else break}return Re.substr(0,j-ie)}function Z(Re,Ce){if(Re.indexOf(Ce[1])===-1)return-1;for(var Ee=Re.length,j=0,ie=0;ie<Ee;ie++)if(Re[ie]==="\\")ie++;else if(Re[ie]===Ce[0])j++;else if(Re[ie]===Ce[1]&&(j--,j<0))return ie;return-1}function I(Re){Re&&Re.sanitize&&!Re.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 G(Re,Ce){if(Ce<1)return"";for(var Ee="";Ce>1;)Ce&1&&(Ee+=Re),Ce>>=1,Re+=Re;return Ee+Re}var z={escape:_,unescape:x,edit:M,cleanUrl:P,resolveUrl:ne,noopTest:ve,merge:Oe,splitCells:le,rtrim:Me,findClosingBracket:Z,checkSanitizeDeprecation:I,repeatString:G},se=he.exports.defaults,re=z.rtrim,E=z.splitCells,y=z.escape,$=z.findClosingBracket;function Ae(Re,Ce,Ee){var j=Ce.href,ie=Ce.title?y(Ce.title):null,ae=Re[1].replace(/\\([\[\]])/g,"$1");return Re[0].charAt(0)!=="!"?{type:"link",raw:Ee,href:j,title:ie,text:ae}:{type:"image",raw:Ee,href:j,title:ie,text:y(ae)}}function Ge(Re,Ce){var Ee=Re.match(/^(\s+)(?:```)/);if(Ee===null)return Ce;var j=Ee[1];return Ce.split(`
`).map(function(ie){var ae=ie.match(/^\s+/);if(ae===null)return ie;var de=ae[0];return de.length>=j.length?ie.slice(j.length):ie}).join(`
`)}var Je=function(){function Re(Ee){this.options=Ee||se}var Ce=Re.prototype;return Ce.space=function(j){var ie=this.rules.block.newline.exec(j);if(ie)return ie[0].length>1?{type:"space",raw:ie[0]}:{raw:`
`}},Ce.code=function(j){var ie=this.rules.block.code.exec(j);if(ie){var ae=ie[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ie[0],codeBlockStyle:"indented",text:this.options.pedantic?ae:re(ae,`
`)}}},Ce.fences=function(j){var ie=this.rules.block.fences.exec(j);if(ie){var ae=ie[0],de=Ge(ae,ie[3]||"");return{type:"code",raw:ae,lang:ie[2]?ie[2].trim():ie[2],text:de}}},Ce.heading=function(j){var ie=this.rules.block.heading.exec(j);if(ie){var ae=ie[2].trim();if(/#$/.test(ae)){var de=re(ae,"#");(this.options.pedantic||!de||/ $/.test(de))&&(ae=de.trim())}return{type:"heading",raw:ie[0],depth:ie[1].length,text:ae}}},Ce.nptable=function(j){var ie=this.rules.block.nptable.exec(j);if(ie){var ae={type:"table",header:E(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[],raw:ie[0]};if(ae.header.length===ae.align.length){var de=ae.align.length,Se;for(Se=0;Se<de;Se++)/^ *-+: *$/.test(ae.align[Se])?ae.align[Se]="right":/^ *:-+: *$/.test(ae.align[Se])?ae.align[Se]="center":/^ *:-+ *$/.test(ae.align[Se])?ae.align[Se]="left":ae.align[Se]=null;for(de=ae.cells.length,Se=0;Se<de;Se++)ae.cells[Se]=E(ae.cells[Se],ae.header.length);return ae}}},Ce.hr=function(j){var ie=this.rules.block.hr.exec(j);if(ie)return{type:"hr",raw:ie[0]}},Ce.blockquote=function(j){var ie=this.rules.block.blockquote.exec(j);if(ie){var ae=ie[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ie[0],text:ae}}},Ce.list=function(j){var ie=this.rules.block.list.exec(j);if(ie){var ae=ie[0],de=ie[2],Se=de.length>1,xt={type:"list",raw:ae,ordered:Se,start:Se?+de.slice(0,-1):"",loose:!1,items:[]},gt=ie[0].match(this.rules.block.item),qe=!1,Ht,Cr,Nr,Gt,Kt,Sr,$r,De,Ir,Er=gt.length;Nr=this.rules.block.listItemStart.exec(gt[0]);for(var Br=0;Br<Er;Br++){if(Ht=gt[Br],ae=Ht,this.options.pedantic||(Ir=Ht.match(new RegExp("\\n\\s*\\n {0,"+(Nr[0].length-1)+"}\\S")),Ir&&(Kt=Ht.length-Ir.index+gt.slice(Br+1).join(`
`).length,xt.raw=xt.raw.substring(0,xt.raw.length-Kt),Ht=Ht.substring(0,Ir.index),ae=Ht,Er=Br+1)),Br!==Er-1){if(Gt=this.rules.block.listItemStart.exec(gt[Br+1]),this.options.pedantic?Gt[1].length>Nr[1].length:Gt[1].length>=Nr[0].length||Gt[1].length>3){gt.splice(Br,2,gt[Br]+(!this.options.pedantic&&Gt[1].length<Nr[0].length&&!gt[Br].match(/\n$/)?"":`
`)+gt[Br+1]),Br--,Er--;continue}else(!this.options.pedantic||this.options.smartLists?Gt[2][Gt[2].length-1]!==de[de.length-1]:Se===(Gt[2].length===1))&&(Kt=gt.slice(Br+1).join(`
`).length,xt.raw=xt.raw.substring(0,xt.raw.length-Kt),Br=Er-1);Nr=Gt}Cr=Ht.length,Ht=Ht.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Ht.indexOf(`
`)&&(Cr-=Ht.length,Ht=this.options.pedantic?Ht.replace(/^ {1,4}/gm,""):Ht.replace(new RegExp("^ {1,"+Cr+"}","gm"),"")),Ht=re(Ht,`
`),Br!==Er-1&&(ae=ae+`
`),Sr=qe||/\n\n(?!\s*$)/.test(ae),Br!==Er-1&&(qe=ae.slice(-2)===`
`,Sr||(Sr=qe)),Sr&&(xt.loose=!0),this.options.gfm&&($r=/^\[[ xX]\] /.test(Ht),De=void 0,$r&&(De=Ht[1]!==" ",Ht=Ht.replace(/^\[[ xX]\] +/,""))),xt.items.push({type:"list_item",raw:ae,task:$r,checked:De,loose:Sr,text:Ht})}return xt}},Ce.html=function(j){var ie=this.rules.block.html.exec(j);if(ie)return{type:this.options.sanitize?"paragraph":"html",raw:ie[0],pre:!this.options.sanitizer&&(ie[1]==="pre"||ie[1]==="script"||ie[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):y(ie[0]):ie[0]}},Ce.def=function(j){var ie=this.rules.block.def.exec(j);if(ie){ie[3]&&(ie[3]=ie[3].substring(1,ie[3].length-1));var ae=ie[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:ae,raw:ie[0],href:ie[2],title:ie[3]}}},Ce.table=function(j){var ie=this.rules.block.table.exec(j);if(ie){var ae={type:"table",header:E(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[]};if(ae.header.length===ae.align.length){ae.raw=ie[0];var de=ae.align.length,Se;for(Se=0;Se<de;Se++)/^ *-+: *$/.test(ae.align[Se])?ae.align[Se]="right":/^ *:-+: *$/.test(ae.align[Se])?ae.align[Se]="center":/^ *:-+ *$/.test(ae.align[Se])?ae.align[Se]="left":ae.align[Se]=null;for(de=ae.cells.length,Se=0;Se<de;Se++)ae.cells[Se]=E(ae.cells[Se].replace(/^ *\| *| *\| *$/g,""),ae.header.length);return ae}}},Ce.lheading=function(j){var ie=this.rules.block.lheading.exec(j);if(ie)return{type:"heading",raw:ie[0],depth:ie[2].charAt(0)==="="?1:2,text:ie[1]}},Ce.paragraph=function(j){var ie=this.rules.block.paragraph.exec(j);if(ie)return{type:"paragraph",raw:ie[0],text:ie[1].charAt(ie[1].length-1)===`
`?ie[1].slice(0,-1):ie[1]}},Ce.text=function(j){var ie=this.rules.block.text.exec(j);if(ie)return{type:"text",raw:ie[0],text:ie[0]}},Ce.escape=function(j){var ie=this.rules.inline.escape.exec(j);if(ie)return{type:"escape",raw:ie[0],text:y(ie[1])}},Ce.tag=function(j,ie,ae){var de=this.rules.inline.tag.exec(j);if(de)return!ie&&/^<a /i.test(de[0])?ie=!0:ie&&/^<\/a>/i.test(de[0])&&(ie=!1),!ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(de[0])?ae=!0:ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(de[0])&&(ae=!1),{type:this.options.sanitize?"text":"html",raw:de[0],inLink:ie,inRawBlock:ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):y(de[0]):de[0]}},Ce.link=function(j){var ie=this.rules.inline.link.exec(j);if(ie){var ae=ie[2].trim();if(!this.options.pedantic&&/^</.test(ae)){if(!/>$/.test(ae))return;var de=re(ae.slice(0,-1),"\\");if((ae.length-de.length)%2===0)return}else{var Se=$(ie[2],"()");if(Se>-1){var xt=ie[0].indexOf("!")===0?5:4,gt=xt+ie[1].length+Se;ie[2]=ie[2].substring(0,Se),ie[0]=ie[0].substring(0,gt).trim(),ie[3]=""}}var qe=ie[2],Ht="";if(this.options.pedantic){var Cr=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(qe);Cr&&(qe=Cr[1],Ht=Cr[3])}else Ht=ie[3]?ie[3].slice(1,-1):"";return qe=qe.trim(),/^</.test(qe)&&(this.options.pedantic&&!/>$/.test(ae)?qe=qe.slice(1):qe=qe.slice(1,-1)),Ae(ie,{href:qe&&qe.replace(this.rules.inline._escapes,"$1"),title:Ht&&Ht.replace(this.rules.inline._escapes,"$1")},ie[0])}},Ce.reflink=function(j,ie){var ae;if((ae=this.rules.inline.reflink.exec(j))||(ae=this.rules.inline.nolink.exec(j))){var de=(ae[2]||ae[1]).replace(/\s+/g," ");if(de=ie[de.toLowerCase()],!de||!de.href){var Se=ae[0].charAt(0);return{type:"text",raw:Se,text:Se}}return Ae(ae,de,ae[0])}},Ce.emStrong=function(j,ie,ae){ae===void 0&&(ae="");var de=this.rules.inline.emStrong.lDelim.exec(j);if(de&&!(de[3]&&ae.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 Se=de[1]||de[2]||"";if(!Se||Se&&(ae===""||this.rules.inline.punctuation.exec(ae))){var xt=de[0].length-1,gt,qe,Ht=xt,Cr=0,Nr=de[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Nr.lastIndex=0,ie=ie.slice(-1*j.length+xt);(de=Nr.exec(ie))!=null;)if(gt=de[1]||de[2]||de[3]||de[4]||de[5]||de[6],!!gt){if(qe=gt.length,de[3]||de[4]){Ht+=qe;continue}else if((de[5]||de[6])&&xt%3&&!((xt+qe)%3)){Cr+=qe;continue}if(Ht-=qe,!(Ht>0))return qe=Math.min(qe,qe+Ht+Cr),Math.min(xt,qe)%2?{type:"em",raw:j.slice(0,xt+de.index+qe+1),text:j.slice(1,xt+de.index+qe)}:{type:"strong",raw:j.slice(0,xt+de.index+qe+1),text:j.slice(2,xt+de.index+qe-1)}}}}},Ce.codespan=function(j){var ie=this.rules.inline.code.exec(j);if(ie){var ae=ie[2].replace(/\n/g," "),de=/[^ ]/.test(ae),Se=/^ /.test(ae)&&/ $/.test(ae);return de&&Se&&(ae=ae.substring(1,ae.length-1)),ae=y(ae,!0),{type:"codespan",raw:ie[0],text:ae}}},Ce.br=function(j){var ie=this.rules.inline.br.exec(j);if(ie)return{type:"br",raw:ie[0]}},Ce.del=function(j){var ie=this.rules.inline.del.exec(j);if(ie)return{type:"del",raw:ie[0],text:ie[2]}},Ce.autolink=function(j,ie){var ae=this.rules.inline.autolink.exec(j);if(ae){var de,Se;return ae[2]==="@"?(de=y(this.options.mangle?ie(ae[1]):ae[1]),Se="mailto:"+de):(de=y(ae[1]),Se=de),{type:"link",raw:ae[0],text:de,href:Se,tokens:[{type:"text",raw:de,text:de}]}}},Ce.url=function(j,ie){var ae;if(ae=this.rules.inline.url.exec(j)){var de,Se;if(ae[2]==="@")de=y(this.options.mangle?ie(ae[0]):ae[0]),Se="mailto:"+de;else{var xt;do xt=ae[0],ae[0]=this.rules.inline._backpedal.exec(ae[0])[0];while(xt!==ae[0]);de=y(ae[0]),ae[1]==="www."?Se="http://"+de:Se=de}return{type:"link",raw:ae[0],text:de,href:Se,tokens:[{type:"text",raw:de,text:de}]}}},Ce.inlineText=function(j,ie,ae){var de=this.rules.inline.text.exec(j);if(de){var Se;return ie?Se=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):y(de[0]):de[0]:Se=y(this.options.smartypants?ae(de[0]):de[0]),{type:"text",raw:de[0],text:Se}}},Re}(),yt=z.noopTest,dt=z.edit,Rt=z.merge,bt={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:yt,table:yt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};bt._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,bt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,bt.def=dt(bt.def).replace("label",bt._label).replace("title",bt._title).getRegex(),bt.bullet=/(?:[*+-]|\d{1,9}[.)])/,bt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,bt.item=dt(bt.item,"gm").replace(/bull/g,bt.bullet).getRegex(),bt.listItemStart=dt(/^( *)(bull) */).replace("bull",bt.bullet).getRegex(),bt.list=dt(bt.list).replace(/bull/g,bt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+bt.def.source+")").getRegex(),bt._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",bt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,bt.html=dt(bt.html,"i").replace("comment",bt._comment).replace("tag",bt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bt.paragraph=dt(bt._paragraph).replace("hr",bt.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",bt._tag).getRegex(),bt.blockquote=dt(bt.blockquote).replace("paragraph",bt.paragraph).getRegex(),bt.normal=Rt({},bt),bt.gfm=Rt({},bt.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*|$)"}),bt.gfm.nptable=dt(bt.gfm.nptable).replace("hr",bt.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",bt._tag).getRegex(),bt.gfm.table=dt(bt.gfm.table).replace("hr",bt.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",bt._tag).getRegex(),bt.pedantic=Rt({},bt.normal,{html:dt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bt._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:yt,paragraph:dt(bt.normal._paragraph).replace("hr",bt.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",bt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ht={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:yt,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:yt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ht._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ht.punctuation=dt(ht.punctuation).replace(/punctuation/g,ht._punctuation).getRegex(),ht.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ht.escapedEmSt=/\\\*|\\_/g,ht._comment=dt(bt._comment).replace("(?:-->|$)","-->").getRegex(),ht.emStrong.lDelim=dt(ht.emStrong.lDelim).replace(/punct/g,ht._punctuation).getRegex(),ht.emStrong.rDelimAst=dt(ht.emStrong.rDelimAst,"g").replace(/punct/g,ht._punctuation).getRegex(),ht.emStrong.rDelimUnd=dt(ht.emStrong.rDelimUnd,"g").replace(/punct/g,ht._punctuation).getRegex(),ht._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ht._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ht._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])?)+(?![-_])/,ht.autolink=dt(ht.autolink).replace("scheme",ht._scheme).replace("email",ht._email).getRegex(),ht._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ht.tag=dt(ht.tag).replace("comment",ht._comment).replace("attribute",ht._attribute).getRegex(),ht._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ht._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ht._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ht.link=dt(ht.link).replace("label",ht._label).replace("href",ht._href).replace("title",ht._title).getRegex(),ht.reflink=dt(ht.reflink).replace("label",ht._label).getRegex(),ht.reflinkSearch=dt(ht.reflinkSearch,"g").replace("reflink",ht.reflink).replace("nolink",ht.nolink).getRegex(),ht.normal=Rt({},ht),ht.pedantic=Rt({},ht.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:dt(/^!?\[(label)\]\((.*?)\)/).replace("label",ht._label).getRegex(),reflink:dt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ht._label).getRegex()}),ht.gfm=Rt({},ht.normal,{escape:dt(ht.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ht.gfm.url=dt(ht.gfm.url,"i").replace("email",ht.gfm._extended_email).getRegex(),ht.breaks=Rt({},ht.gfm,{br:dt(ht.br).replace("{2,}","*").getRegex(),text:dt(ht.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Le={block:bt,inline:ht},nt=Je,Ie=he.exports.defaults,wt=Le.block,Lt=Le.inline,Be=z.repeatString;function L(Re){return Re.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 g(Re){var Ce="",Ee,j,ie=Re.length;for(Ee=0;Ee<ie;Ee++)j=Re.charCodeAt(Ee),Math.random()>.5&&(j="x"+j.toString(16)),Ce+="&#"+j+";";return Ce}var C=function(){function Re(Ee){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ee||Ie,this.options.tokenizer=this.options.tokenizer||new nt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var j={block:wt.normal,inline:Lt.normal};this.options.pedantic?(j.block=wt.pedantic,j.inline=Lt.pedantic):this.options.gfm&&(j.block=wt.gfm,this.options.breaks?j.inline=Lt.breaks:j.inline=Lt.gfm),this.tokenizer.rules=j}Re.lex=function(j,ie){var ae=new Re(ie);return ae.lex(j)},Re.lexInline=function(j,ie){var ae=new Re(ie);return ae.inlineTokens(j)};var Ce=Re.prototype;return Ce.lex=function(j){return j=j.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(j,this.tokens,!0),this.inline(this.tokens),this.tokens},Ce.blockTokens=function(j,ie,ae){ie===void 0&&(ie=[]),ae===void 0&&(ae=!0),this.options.pedantic&&(j=j.replace(/^ +$/gm,""));for(var de,Se,xt,gt;j;){if(de=this.tokenizer.space(j)){j=j.substring(de.raw.length),de.type&&ie.push(de);continue}if(de=this.tokenizer.code(j)){j=j.substring(de.raw.length),gt=ie[ie.length-1],gt&&gt.type==="paragraph"?(gt.raw+=`
`+de.raw,gt.text+=`
`+de.text):ie.push(de);continue}if(de=this.tokenizer.fences(j)){j=j.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.heading(j)){j=j.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.nptable(j)){j=j.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.hr(j)){j=j.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.blockquote(j)){j=j.substring(de.raw.length),de.tokens=this.blockTokens(de.text,[],ae),ie.push(de);continue}if(de=this.tokenizer.list(j)){for(j=j.substring(de.raw.length),xt=de.items.length,Se=0;Se<xt;Se++)de.items[Se].tokens=this.blockTokens(de.items[Se].text,[],!1);ie.push(de);continue}if(de=this.tokenizer.html(j)){j=j.substring(de.raw.length),ie.push(de);continue}if(ae&&(de=this.tokenizer.def(j))){j=j.substring(de.raw.length),this.tokens.links[de.tag]||(this.tokens.links[de.tag]={href:de.href,title:de.title});continue}if(de=this.tokenizer.table(j)){j=j.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.lheading(j)){j=j.substring(de.raw.length),ie.push(de);continue}if(ae&&(de=this.tokenizer.paragraph(j))){j=j.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.text(j)){j=j.substring(de.raw.length),gt=ie[ie.length-1],gt&&gt.type==="text"?(gt.raw+=`
`+de.raw,gt.text+=`
`+de.text):ie.push(de);continue}if(j){var qe="Infinite loop on byte: "+j.charCodeAt(0);if(this.options.silent){console.error(qe);break}else throw new Error(qe)}}return ie},Ce.inline=function(j){var ie,ae,de,Se,xt,gt,qe=j.length;for(ie=0;ie<qe;ie++)switch(gt=j[ie],gt.type){case"paragraph":case"text":case"heading":{gt.tokens=[],this.inlineTokens(gt.text,gt.tokens);break}case"table":{for(gt.tokens={header:[],cells:[]},Se=gt.header.length,ae=0;ae<Se;ae++)gt.tokens.header[ae]=[],this.inlineTokens(gt.header[ae],gt.tokens.header[ae]);for(Se=gt.cells.length,ae=0;ae<Se;ae++)for(xt=gt.cells[ae],gt.tokens.cells[ae]=[],de=0;de<xt.length;de++)gt.tokens.cells[ae][de]=[],this.inlineTokens(xt[de],gt.tokens.cells[ae][de]);break}case"blockquote":{this.inline(gt.tokens);break}case"list":{for(Se=gt.items.length,ae=0;ae<Se;ae++)this.inline(gt.items[ae].tokens);break}}return j},Ce.inlineTokens=function(j,ie,ae,de){ie===void 0&&(ie=[]),ae===void 0&&(ae=!1),de===void 0&&(de=!1);var Se,xt,gt=j,qe,Ht,Cr;if(this.tokens.links){var Nr=Object.keys(this.tokens.links);if(Nr.length>0)for(;(qe=this.tokenizer.rules.inline.reflinkSearch.exec(gt))!=null;)Nr.includes(qe[0].slice(qe[0].lastIndexOf("[")+1,-1))&&(gt=gt.slice(0,qe.index)+"["+Be("a",qe[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(qe=this.tokenizer.rules.inline.blockSkip.exec(gt))!=null;)gt=gt.slice(0,qe.index)+"["+Be("a",qe[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(qe=this.tokenizer.rules.inline.escapedEmSt.exec(gt))!=null;)gt=gt.slice(0,qe.index)+"++"+gt.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;j;){if(Ht||(Cr=""),Ht=!1,Se=this.tokenizer.escape(j)){j=j.substring(Se.raw.length),ie.push(Se);continue}if(Se=this.tokenizer.tag(j,ae,de)){j=j.substring(Se.raw.length),ae=Se.inLink,de=Se.inRawBlock;var Gt=ie[ie.length-1];Gt&&Se.type==="text"&&Gt.type==="text"?(Gt.raw+=Se.raw,Gt.text+=Se.text):ie.push(Se);continue}if(Se=this.tokenizer.link(j)){j=j.substring(Se.raw.length),Se.type==="link"&&(Se.tokens=this.inlineTokens(Se.text,[],!0,de)),ie.push(Se);continue}if(Se=this.tokenizer.reflink(j,this.tokens.links)){j=j.substring(Se.raw.length);var Kt=ie[ie.length-1];Se.type==="link"?(Se.tokens=this.inlineTokens(Se.text,[],!0,de),ie.push(Se)):Kt&&Se.type==="text"&&Kt.type==="text"?(Kt.raw+=Se.raw,Kt.text+=Se.text):ie.push(Se);continue}if(Se=this.tokenizer.emStrong(j,gt,Cr)){j=j.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],ae,de),ie.push(Se);continue}if(Se=this.tokenizer.codespan(j)){j=j.substring(Se.raw.length),ie.push(Se);continue}if(Se=this.tokenizer.br(j)){j=j.substring(Se.raw.length),ie.push(Se);continue}if(Se=this.tokenizer.del(j)){j=j.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],ae,de),ie.push(Se);continue}if(Se=this.tokenizer.autolink(j,g)){j=j.substring(Se.raw.length),ie.push(Se);continue}if(!ae&&(Se=this.tokenizer.url(j,g))){j=j.substring(Se.raw.length),ie.push(Se);continue}if(Se=this.tokenizer.inlineText(j,de,L)){j=j.substring(Se.raw.length),Se.raw.slice(-1)!=="_"&&(Cr=Se.raw.slice(-1)),Ht=!0,xt=ie[ie.length-1],xt&&xt.type==="text"?(xt.raw+=Se.raw,xt.text+=Se.text):ie.push(Se);continue}if(j){var Sr="Infinite loop on byte: "+j.charCodeAt(0);if(this.options.silent){console.error(Sr);break}else throw new Error(Sr)}}return ie},K(Re,null,[{key:"rules",get:function(){return{block:wt,inline:Lt}}}]),Re}(),N=he.exports.defaults,T=z.cleanUrl,k=z.escape,ee=function(){function Re(Ee){this.options=Ee||N}var Ce=Re.prototype;return Ce.code=function(j,ie,ae){var de=(ie||"").match(/\S*/)[0];if(this.options.highlight){var Se=this.options.highlight(j,de);Se!=null&&Se!==j&&(ae=!0,j=Se)}return j=j.replace(/\n$/,"")+`
`,de?'<pre><code class="'+this.options.langPrefix+k(de,!0)+'">'+(ae?j:k(j,!0))+`</code></pre>
`:"<pre><code>"+(ae?j:k(j,!0))+`</code></pre>
`},Ce.blockquote=function(j){return`<blockquote>
`+j+`</blockquote>
`},Ce.html=function(j){return j},Ce.heading=function(j,ie,ae,de){return this.options.headerIds?"<h"+ie+' id="'+this.options.headerPrefix+de.slug(ae)+'">'+j+"</h"+ie+`>
`:"<h"+ie+">"+j+"</h"+ie+`>
`},Ce.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Ce.list=function(j,ie,ae){var de=ie?"ol":"ul",Se=ie&&ae!==1?' start="'+ae+'"':"";return"<"+de+Se+`>
`+j+"</"+de+`>
`},Ce.listitem=function(j){return"<li>"+j+`</li>
`},Ce.checkbox=function(j){return"<input "+(j?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ce.paragraph=function(j){return"<p>"+j+`</p>
`},Ce.table=function(j,ie){return ie&&(ie="<tbody>"+ie+"</tbody>"),`<table>
<thead>
`+j+`</thead>
`+ie+`</table>
`},Ce.tablerow=function(j){return`<tr>
`+j+`</tr>
`},Ce.tablecell=function(j,ie){var ae=ie.header?"th":"td",de=ie.align?"<"+ae+' align="'+ie.align+'">':"<"+ae+">";return de+j+"</"+ae+`>
`},Ce.strong=function(j){return"<strong>"+j+"</strong>"},Ce.em=function(j){return"<em>"+j+"</em>"},Ce.codespan=function(j){return"<code>"+j+"</code>"},Ce.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ce.del=function(j){return"<del>"+j+"</del>"},Ce.link=function(j,ie,ae){if(j=T(this.options.sanitize,this.options.baseUrl,j),j===null)return ae;var de='<a href="'+k(j)+'"';return ie&&(de+=' title="'+ie+'"'),de+=">"+ae+"</a>",de},Ce.image=function(j,ie,ae){if(j=T(this.options.sanitize,this.options.baseUrl,j),j===null)return ae;var de='<img src="'+j+'" alt="'+ae+'"';return ie&&(de+=' title="'+ie+'"'),de+=this.options.xhtml?"/>":">",de},Ce.text=function(j){return j},Re}(),be=function(){function Re(){}var Ce=Re.prototype;return Ce.strong=function(j){return j},Ce.em=function(j){return j},Ce.codespan=function(j){return j},Ce.del=function(j){return j},Ce.html=function(j){return j},Ce.text=function(j){return j},Ce.link=function(j,ie,ae){return""+ae},Ce.image=function(j,ie,ae){return""+ae},Ce.br=function(){return""},Re}(),Ue=function(){function Re(){this.seen={}}var Ce=Re.prototype;return Ce.serialize=function(j){return j.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Ce.getNextSafeSlug=function(j,ie){var ae=j,de=0;if(this.seen.hasOwnProperty(ae)){de=this.seen[j];do de++,ae=j+"-"+de;while(this.seen.hasOwnProperty(ae))}return ie||(this.seen[j]=de,this.seen[ae]=0),ae},Ce.slug=function(j,ie){ie===void 0&&(ie={});var ae=this.serialize(j);return this.getNextSafeSlug(ae,ie.dryrun)},Re}(),Ye=ee,We=be,St=Ue,Xe=he.exports.defaults,ut=z.unescape,At=function(){function Re(Ee){this.options=Ee||Xe,this.options.renderer=this.options.renderer||new Ye,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new We,this.slugger=new St}Re.parse=function(j,ie){var ae=new Re(ie);return ae.parse(j)},Re.parseInline=function(j,ie){var ae=new Re(ie);return ae.parseInline(j)};var Ce=Re.prototype;return Ce.parse=function(j,ie){ie===void 0&&(ie=!0);var ae="",de,Se,xt,gt,qe,Ht,Cr,Nr,Gt,Kt,Sr,$r,De,Ir,Er,Br,vn,Or,Jr=j.length;for(de=0;de<Jr;de++)switch(Kt=j[de],Kt.type){case"space":continue;case"hr":{ae+=this.renderer.hr();continue}case"heading":{ae+=this.renderer.heading(this.parseInline(Kt.tokens),Kt.depth,ut(this.parseInline(Kt.tokens,this.textRenderer)),this.slugger);continue}case"code":{ae+=this.renderer.code(Kt.text,Kt.lang,Kt.escaped);continue}case"table":{for(Nr="",Cr="",gt=Kt.header.length,Se=0;Se<gt;Se++)Cr+=this.renderer.tablecell(this.parseInline(Kt.tokens.header[Se]),{header:!0,align:Kt.align[Se]});for(Nr+=this.renderer.tablerow(Cr),Gt="",gt=Kt.cells.length,Se=0;Se<gt;Se++){for(Ht=Kt.tokens.cells[Se],Cr="",qe=Ht.length,xt=0;xt<qe;xt++)Cr+=this.renderer.tablecell(this.parseInline(Ht[xt]),{header:!1,align:Kt.align[xt]});Gt+=this.renderer.tablerow(Cr)}ae+=this.renderer.table(Nr,Gt);continue}case"blockquote":{Gt=this.parse(Kt.tokens),ae+=this.renderer.blockquote(Gt);continue}case"list":{for(Sr=Kt.ordered,$r=Kt.start,De=Kt.loose,gt=Kt.items.length,Gt="",Se=0;Se<gt;Se++)Er=Kt.items[Se],Br=Er.checked,vn=Er.task,Ir="",Er.task&&(Or=this.renderer.checkbox(Br),De?Er.tokens.length>0&&Er.tokens[0].type==="text"?(Er.tokens[0].text=Or+" "+Er.tokens[0].text,Er.tokens[0].tokens&&Er.tokens[0].tokens.length>0&&Er.tokens[0].tokens[0].type==="text"&&(Er.tokens[0].tokens[0].text=Or+" "+Er.tokens[0].tokens[0].text)):Er.tokens.unshift({type:"text",text:Or}):Ir+=Or),Ir+=this.parse(Er.tokens,De),Gt+=this.renderer.listitem(Ir,vn,Br);ae+=this.renderer.list(Gt,Sr,$r);continue}case"html":{ae+=this.renderer.html(Kt.text);continue}case"paragraph":{ae+=this.renderer.paragraph(this.parseInline(Kt.tokens));continue}case"text":{for(Gt=Kt.tokens?this.parseInline(Kt.tokens):Kt.text;de+1<Jr&&j[de+1].type==="text";)Kt=j[++de],Gt+=`
`+(Kt.tokens?this.parseInline(Kt.tokens):Kt.text);ae+=ie?this.renderer.paragraph(Gt):Gt;continue}default:{var An='Token with "'+Kt.type+'" type was not found.';if(this.options.silent){console.error(An);return}else throw new Error(An)}}return ae},Ce.parseInline=function(j,ie){ie=ie||this.renderer;var ae="",de,Se,xt=j.length;for(de=0;de<xt;de++)switch(Se=j[de],Se.type){case"escape":{ae+=ie.text(Se.text);break}case"html":{ae+=ie.html(Se.text);break}case"link":{ae+=ie.link(Se.href,Se.title,this.parseInline(Se.tokens,ie));break}case"image":{ae+=ie.image(Se.href,Se.title,Se.text);break}case"strong":{ae+=ie.strong(this.parseInline(Se.tokens,ie));break}case"em":{ae+=ie.em(this.parseInline(Se.tokens,ie));break}case"codespan":{ae+=ie.codespan(Se.text);break}case"br":{ae+=ie.br();break}case"del":{ae+=ie.del(this.parseInline(Se.tokens,ie));break}case"text":{ae+=ie.text(Se.text);break}default:{var gt='Token with "'+Se.type+'" type was not found.';if(this.options.silent){console.error(gt);return}else throw new Error(gt)}}return ae},Re}(),it=C,Ne=At,Ze=Je,lt=ee,vt=be,Ot=Ue,Ct=z.merge,Wt=z.checkSanitizeDeprecation,Nt=z.escape,Xt=he.exports.getDefaults,fr=he.exports.changeDefaults,Rr=he.exports.defaults;function It(Re,Ce,Ee){if(typeof Re=="undefined"||Re===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Re!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Re)+", string expected");if(typeof Ce=="function"&&(Ee=Ce,Ce=null),Ce=Ct({},It.defaults,Ce||{}),Wt(Ce),Ee){var j=Ce.highlight,ie;try{ie=it.lex(Re,Ce)}catch(xt){return Ee(xt)}var ae=function(gt){var qe;if(!gt)try{Ce.walkTokens&&It.walkTokens(ie,Ce.walkTokens),qe=Ne.parse(ie,Ce)}catch(Ht){gt=Ht}return Ce.highlight=j,gt?Ee(gt):Ee(null,qe)};if(!j||j.length<3||(delete Ce.highlight,!ie.length))return ae();var de=0;It.walkTokens(ie,function(xt){xt.type==="code"&&(de++,setTimeout(function(){j(xt.text,xt.lang,function(gt,qe){if(gt)return ae(gt);qe!=null&&qe!==xt.text&&(xt.text=qe,xt.escaped=!0),de--,de===0&&ae()})},0))}),de===0&&ae();return}try{var Se=it.lex(Re,Ce);return Ce.walkTokens&&It.walkTokens(Se,Ce.walkTokens),Ne.parse(Se,Ce)}catch(xt){if(xt.message+=`
Please report this to https://github.com/markedjs/marked.`,Ce.silent)return"<p>An error occurred:</p><pre>"+Nt(xt.message+"",!0)+"</pre>";throw xt}}It.options=It.setOptions=function(Re){return Ct(It.defaults,Re),fr(It.defaults),It},It.getDefaults=Xt,It.defaults=Rr,It.use=function(Re){var Ce=Ct({},Re);if(Re.renderer&&function(){var j=It.defaults.renderer||new lt,ie=function(Se){var xt=j[Se];j[Se]=function(){for(var gt=arguments.length,qe=new Array(gt),Ht=0;Ht<gt;Ht++)qe[Ht]=arguments[Ht];var Cr=Re.renderer[Se].apply(j,qe);return Cr===!1&&(Cr=xt.apply(j,qe)),Cr}};for(var ae in Re.renderer)ie(ae);Ce.renderer=j}(),Re.tokenizer&&function(){var j=It.defaults.tokenizer||new Ze,ie=function(Se){var xt=j[Se];j[Se]=function(){for(var gt=arguments.length,qe=new Array(gt),Ht=0;Ht<gt;Ht++)qe[Ht]=arguments[Ht];var Cr=Re.tokenizer[Se].apply(j,qe);return Cr===!1&&(Cr=xt.apply(j,qe)),Cr}};for(var ae in Re.tokenizer)ie(ae);Ce.tokenizer=j}(),Re.walkTokens){var Ee=It.defaults.walkTokens;Ce.walkTokens=function(j){Re.walkTokens(j),Ee&&Ee(j)}}It.setOptions(Ce)},It.walkTokens=function(Re,Ce){for(var Ee=Fe(Re),j;!(j=Ee()).done;){var ie=j.value;switch(Ce(ie),ie.type){case"table":{for(var ae=Fe(ie.tokens.header),de;!(de=ae()).done;){var Se=de.value;It.walkTokens(Se,Ce)}for(var xt=Fe(ie.tokens.cells),gt;!(gt=xt()).done;)for(var qe=gt.value,Ht=Fe(qe),Cr;!(Cr=Ht()).done;){var Nr=Cr.value;It.walkTokens(Nr,Ce)}break}case"list":{It.walkTokens(ie.items,Ce);break}default:ie.tokens&&It.walkTokens(ie.tokens,Ce)}}},It.parseInline=function(Re,Ce){if(typeof Re=="undefined"||Re===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Re!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Re)+", string expected");Ce=Ct({},It.defaults,Ce||{}),Wt(Ce);try{var Ee=it.lexInline(Re,Ce);return Ce.walkTokens&&It.walkTokens(Ee,Ce.walkTokens),Ne.parseInline(Ee,Ce)}catch(j){if(j.message+=`
Please report this to https://github.com/markedjs/marked.`,Ce.silent)return"<p>An error occurred:</p><pre>"+Nt(j.message+"",!0)+"</pre>";throw j}},It.Parser=Ne,It.parser=Ne.parse,It.Renderer=lt,It.TextRenderer=vt,It.Lexer=it,It.lexer=it.lex,It.Tokenizer=Ze,It.Slugger=Ot,It.parse=It;var jt=It;return jt})},11690:function(gr){const mt=/[&<>"']/,K=/[&<>"']/g,V=/[<>"']|&(?!#?\w+;)/,me=/[<>"']|&(?!#?\w+;)/g,Fe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},he=ne=>Fe[ne];function W(ne,ve){if(ve){if(mt.test(ne))return ne.replace(K,he)}else if(V.test(ne))return ne.replace(me,he);return ne}const m=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ge(ne){return ne.replace(m,(ve,Oe)=>(Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""))}const O=/(^|[^\[])\^/g;function u(ne,ve){ne=ne.source||ne,ve=ve||"";const Oe={replace:(le,Me)=>(Me=Me.source||Me,Me=Me.replace(O,"$1"),ne=ne.replace(le,Me),Oe),getRegex:()=>new RegExp(ne,ve)};return Oe}const J=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function B(ne,ve,Oe){if(ne){let le;try{le=decodeURIComponent(ge(Oe)).replace(J,"").toLowerCase()}catch(Me){return null}if(le.indexOf("javascript:")===0||le.indexOf("vbscript:")===0||le.indexOf("data:")===0)return null}ve&&!D.test(Oe)&&(Oe=M(ve,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(le){return null}return Oe}const _={},w=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,Y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function M(ne,ve){_[" "+ne]||(w.test(ne)?_[" "+ne]=ne+"/":_[" "+ne]=X(ne,"/",!0)),ne=_[" "+ne];const Oe=ne.indexOf(":")===-1;return ve.substring(0,2)==="//"?Oe?ve:ne.replace(x,"$1")+ve:ve.charAt(0)==="/"?Oe?ve:ne.replace(Y,"$1")+ve:ne+ve}const H={exec:function(){}};function Q(ne){let ve=1,Oe,le;for(;ve<arguments.length;ve++){Oe=arguments[ve];for(le in Oe)Object.prototype.hasOwnProperty.call(Oe,le)&&(ne[le]=Oe[le])}return ne}function P(ne,ve){const Oe=ne.replace(/\|/g,(Z,I,G)=>{let z=!1,se=I;for(;--se>=0&&G[se]==="\\";)z=!z;return z?"|":" |"}),le=Oe.split(/ \|/);let Me=0;if(le.length>ve)le.splice(ve);else for(;le.length<ve;)le.push("");for(;Me<le.length;Me++)le[Me]=le[Me].trim().replace(/\\\|/g,"|");return le}function X(ne,ve,Oe){const le=ne.length;if(le===0)return"";let Me=0;for(;Me<le;){const Z=ne.charAt(le-Me-1);if(Z===ve&&!Oe)Me++;else if(Z!==ve&&Oe)Me++;else break}return ne.substr(0,le-Me)}function ce(ne,ve){if(ne.indexOf(ve[1])===-1)return-1;const Oe=ne.length;let le=0,Me=0;for(;Me<Oe;Me++)if(ne[Me]==="\\")Me++;else if(ne[Me]===ve[0])le++;else if(ne[Me]===ve[1]&&(le--,le<0))return Me;return-1}function _e(ne){ne&&ne.sanitize&&!ne.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 we(ne,ve){if(ve<1)return"";let Oe="";for(;ve>1;)ve&1&&(Oe+=ne),ve>>=1,ne+=ne;return Oe+ne}gr.exports={escape:W,unescape:ge,edit:u,cleanUrl:B,resolveUrl:M,noopTest:H,merge:Q,splitCells:P,rtrim:X,findClosingBracket:ce,checkSanitizeDeprecation:_e,repeatString:we}},75918:function(gr,mt,K){"use strict";K.d(mt,{Wi:function(){return m},Z0:function(){return ge},aU:function(){return W},eZ:function(){return u},wY:function(){return O}});var V=K(4348),me=K(69323),Fe=K(13268),he=function(J,D,B,_){function w(x){return x instanceof B?x:new B(function(Y){Y(x)})}return new(B||(B=Promise))(function(x,Y){function M(P){try{Q(_.next(P))}catch(X){Y(X)}}function H(P){try{Q(_.throw(P))}catch(X){Y(X)}}function Q(P){P.done?x(P.value):w(P.value).then(M,H)}Q((_=_.apply(J,D||[])).next())})};class W extends me.JT{constructor(D,B="",_="",w=!0,x){super(),this._onDidChange=this._register(new V.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=D,this._label=B,this._cssClass=_,this._enabled=w,this._actionCallback=x}get id(){return this._id}get label(){return this._label}set label(D){this._setLabel(D)}_setLabel(D){this._label!==D&&(this._label=D,this._onDidChange.fire({label:D}))}get tooltip(){return this._tooltip||""}set tooltip(D){this._setTooltip(D)}_setTooltip(D){this._tooltip!==D&&(this._tooltip=D,this._onDidChange.fire({tooltip:D}))}get class(){return this._cssClass}set class(D){this._setClass(D)}_setClass(D){this._cssClass!==D&&(this._cssClass=D,this._onDidChange.fire({class:D}))}get enabled(){return this._enabled}set enabled(D){this._setEnabled(D)}_setEnabled(D){this._enabled!==D&&(this._enabled=D,this._onDidChange.fire({enabled:D}))}get checked(){return this._checked}set checked(D){this._setChecked(D)}_setChecked(D){this._checked!==D&&(this._checked=D,this._onDidChange.fire({checked:D}))}run(D,B){return he(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(D))})}}class m extends me.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new V.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new V.Q5),this.onDidRun=this._onDidRun.event}run(D,B){return he(this,void 0,void 0,function*(){if(!D.enabled)return;this._onBeforeRun.fire({action:D});let _;try{yield this.runAction(D,B)}catch(w){_=w}this._onDidRun.fire({action:D,error:_})})}runAction(D,B){return he(this,void 0,void 0,function*(){yield D.run(B)})}}class ge extends W{constructor(D){super(ge.ID,D,D?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ge.ID="vs.actions.separator";class O{constructor(D,B,_,w){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=D,this.label=B,this.class=w,this._actions=_}get actions(){return this._actions}dispose(){}run(){return he(this,void 0,void 0,function*(){})}}class u extends W{constructor(){super(u.ID,Fe.N("submenu.empty","(empty)"),void 0,!1)}}u.ID="vs.actions.empty"},76068:function(gr,mt,K){"use strict";K.d(mt,{ok:function(){return V}});function V(me,Fe){if(!me)throw new Error(Fe?`Assertion failed (${Fe})`:"Assertion Failed")}},52615:function(gr,mt,K){"use strict";K.d(mt,{CM:function(){return W},JL:function(){return m},dT:function(){return O},fK:function(){return he},lA:function(){return ge}});var V=K(4348);class me{constructor(){this._icons=new Map,this._onDidRegister=new V.Q5}add(J){const D=this._icons.get(J.id);D?J.description?D.description=J.description:console.error(`Duplicate registration of codicon ${J.id}`):(this._icons.set(J.id,J),this._onDidRegister.fire(J))}get(J){return this._icons.get(J)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Fe=new me,he=Fe;function W(u,J){return new ge(u,J)}function m(u){return u?u.replace(/\$\((.*?)\)/g,(J,D)=>` ${D} `).trim():""}class ge{constructor(J,D,B){this.id=J,this.definition=D,this.description=B,Fe.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var O;(function(u){u.iconNameSegment="[A-Za-z0-9]+",u.iconNameExpression="[A-Za-z0-9\\-]+",u.iconModifierExpression="~[A-Za-z]+";const J=new RegExp(`^(${u.iconNameExpression})(${u.iconModifierExpression})?$`);function D(w){if(w instanceof ge)return["codicon","codicon-"+w.id];const x=J.exec(w.id);if(!x)return D(ge.error);let[,Y,M]=x;const H=["codicon","codicon-"+Y];return M&&H.push("codicon-modifier-"+M.substr(1)),H}u.asClassNameArray=D;function B(w){return D(w).join(" ")}u.asClassName=B;function _(w){return"."+D(w).join(".")}u.asCSSSelector=_})(O||(O={})),function(u){u.add=new u("add",{fontCharacter:"\\ea60"}),u.plus=new u("plus",u.add.definition),u.gistNew=new u("gist-new",u.add.definition),u.repoCreate=new u("repo-create",u.add.definition),u.lightbulb=new u("lightbulb",{fontCharacter:"\\ea61"}),u.lightBulb=new u("light-bulb",{fontCharacter:"\\ea61"}),u.repo=new u("repo",{fontCharacter:"\\ea62"}),u.repoDelete=new u("repo-delete",{fontCharacter:"\\ea62"}),u.gistFork=new u("gist-fork",{fontCharacter:"\\ea63"}),u.repoForked=new u("repo-forked",{fontCharacter:"\\ea63"}),u.gitPullRequest=new u("git-pull-request",{fontCharacter:"\\ea64"}),u.gitPullRequestAbandoned=new u("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),u.recordKeys=new u("record-keys",{fontCharacter:"\\ea65"}),u.keyboard=new u("keyboard",{fontCharacter:"\\ea65"}),u.tag=new u("tag",{fontCharacter:"\\ea66"}),u.tagAdd=new u("tag-add",{fontCharacter:"\\ea66"}),u.tagRemove=new u("tag-remove",{fontCharacter:"\\ea66"}),u.person=new u("person",{fontCharacter:"\\ea67"}),u.personFollow=new u("person-follow",{fontCharacter:"\\ea67"}),u.personOutline=new u("person-outline",{fontCharacter:"\\ea67"}),u.personFilled=new u("person-filled",{fontCharacter:"\\ea67"}),u.gitBranch=new u("git-branch",{fontCharacter:"\\ea68"}),u.gitBranchCreate=new u("git-branch-create",{fontCharacter:"\\ea68"}),u.gitBranchDelete=new u("git-branch-delete",{fontCharacter:"\\ea68"}),u.sourceControl=new u("source-control",{fontCharacter:"\\ea68"}),u.mirror=new u("mirror",{fontCharacter:"\\ea69"}),u.mirrorPublic=new u("mirror-public",{fontCharacter:"\\ea69"}),u.star=new u("star",{fontCharacter:"\\ea6a"}),u.starAdd=new u("star-add",{fontCharacter:"\\ea6a"}),u.starDelete=new u("star-delete",{fontCharacter:"\\ea6a"}),u.starEmpty=new u("star-empty",{fontCharacter:"\\ea6a"}),u.comment=new u("comment",{fontCharacter:"\\ea6b"}),u.commentAdd=new u("comment-add",{fontCharacter:"\\ea6b"}),u.alert=new u("alert",{fontCharacter:"\\ea6c"}),u.warning=new u("warning",{fontCharacter:"\\ea6c"}),u.search=new u("search",{fontCharacter:"\\ea6d"}),u.searchSave=new u("search-save",{fontCharacter:"\\ea6d"}),u.logOut=new u("log-out",{fontCharacter:"\\ea6e"}),u.signOut=new u("sign-out",{fontCharacter:"\\ea6e"}),u.logIn=new u("log-in",{fontCharacter:"\\ea6f"}),u.signIn=new u("sign-in",{fontCharacter:"\\ea6f"}),u.eye=new u("eye",{fontCharacter:"\\ea70"}),u.eyeUnwatch=new u("eye-unwatch",{fontCharacter:"\\ea70"}),u.eyeWatch=new u("eye-watch",{fontCharacter:"\\ea70"}),u.circleFilled=new u("circle-filled",{fontCharacter:"\\ea71"}),u.primitiveDot=new u("primitive-dot",{fontCharacter:"\\ea71"}),u.closeDirty=new u("close-dirty",{fontCharacter:"\\ea71"}),u.debugBreakpoint=new u("debug-breakpoint",{fontCharacter:"\\ea71"}),u.debugBreakpointDisabled=new u("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),u.debugHint=new u("debug-hint",{fontCharacter:"\\ea71"}),u.primitiveSquare=new u("primitive-square",{fontCharacter:"\\ea72"}),u.edit=new u("edit",{fontCharacter:"\\ea73"}),u.pencil=new u("pencil",{fontCharacter:"\\ea73"}),u.info=new u("info",{fontCharacter:"\\ea74"}),u.issueOpened=new u("issue-opened",{fontCharacter:"\\ea74"}),u.gistPrivate=new u("gist-private",{fontCharacter:"\\ea75"}),u.gitForkPrivate=new u("git-fork-private",{fontCharacter:"\\ea75"}),u.lock=new u("lock",{fontCharacter:"\\ea75"}),u.mirrorPrivate=new u("mirror-private",{fontCharacter:"\\ea75"}),u.close=new u("close",{fontCharacter:"\\ea76"}),u.removeClose=new u("remove-close",{fontCharacter:"\\ea76"}),u.x=new u("x",{fontCharacter:"\\ea76"}),u.repoSync=new u("repo-sync",{fontCharacter:"\\ea77"}),u.sync=new u("sync",{fontCharacter:"\\ea77"}),u.clone=new u("clone",{fontCharacter:"\\ea78"}),u.desktopDownload=new u("desktop-download",{fontCharacter:"\\ea78"}),u.beaker=new u("beaker",{fontCharacter:"\\ea79"}),u.microscope=new u("microscope",{fontCharacter:"\\ea79"}),u.vm=new u("vm",{fontCharacter:"\\ea7a"}),u.deviceDesktop=new u("device-desktop",{fontCharacter:"\\ea7a"}),u.file=new u("file",{fontCharacter:"\\ea7b"}),u.fileText=new u("file-text",{fontCharacter:"\\ea7b"}),u.more=new u("more",{fontCharacter:"\\ea7c"}),u.ellipsis=new u("ellipsis",{fontCharacter:"\\ea7c"}),u.kebabHorizontal=new u("kebab-horizontal",{fontCharacter:"\\ea7c"}),u.mailReply=new u("mail-reply",{fontCharacter:"\\ea7d"}),u.reply=new u("reply",{fontCharacter:"\\ea7d"}),u.organization=new u("organization",{fontCharacter:"\\ea7e"}),u.organizationFilled=new u("organization-filled",{fontCharacter:"\\ea7e"}),u.organizationOutline=new u("organization-outline",{fontCharacter:"\\ea7e"}),u.newFile=new u("new-file",{fontCharacter:"\\ea7f"}),u.fileAdd=new u("file-add",{fontCharacter:"\\ea7f"}),u.newFolder=new u("new-folder",{fontCharacter:"\\ea80"}),u.fileDirectoryCreate=new u("file-directory-create",{fontCharacter:"\\ea80"}),u.trash=new u("trash",{fontCharacter:"\\ea81"}),u.trashcan=new u("trashcan",{fontCharacter:"\\ea81"}),u.history=new u("history",{fontCharacter:"\\ea82"}),u.clock=new u("clock",{fontCharacter:"\\ea82"}),u.folder=new u("folder",{fontCharacter:"\\ea83"}),u.fileDirectory=new u("file-directory",{fontCharacter:"\\ea83"}),u.symbolFolder=new u("symbol-folder",{fontCharacter:"\\ea83"}),u.logoGithub=new u("logo-github",{fontCharacter:"\\ea84"}),u.markGithub=new u("mark-github",{fontCharacter:"\\ea84"}),u.github=new u("github",{fontCharacter:"\\ea84"}),u.terminal=new u("terminal",{fontCharacter:"\\ea85"}),u.console=new u("console",{fontCharacter:"\\ea85"}),u.repl=new u("repl",{fontCharacter:"\\ea85"}),u.zap=new u("zap",{fontCharacter:"\\ea86"}),u.symbolEvent=new u("symbol-event",{fontCharacter:"\\ea86"}),u.error=new u("error",{fontCharacter:"\\ea87"}),u.stop=new u("stop",{fontCharacter:"\\ea87"}),u.variable=new u("variable",{fontCharacter:"\\ea88"}),u.symbolVariable=new u("symbol-variable",{fontCharacter:"\\ea88"}),u.array=new u("array",{fontCharacter:"\\ea8a"}),u.symbolArray=new u("symbol-array",{fontCharacter:"\\ea8a"}),u.symbolModule=new u("symbol-module",{fontCharacter:"\\ea8b"}),u.symbolPackage=new u("symbol-package",{fontCharacter:"\\ea8b"}),u.symbolNamespace=new u("symbol-namespace",{fontCharacter:"\\ea8b"}),u.symbolObject=new u("symbol-object",{fontCharacter:"\\ea8b"}),u.symbolMethod=new u("symbol-method",{fontCharacter:"\\ea8c"}),u.symbolFunction=new u("symbol-function",{fontCharacter:"\\ea8c"}),u.symbolConstructor=new u("symbol-constructor",{fontCharacter:"\\ea8c"}),u.symbolBoolean=new u("symbol-boolean",{fontCharacter:"\\ea8f"}),u.symbolNull=new u("symbol-null",{fontCharacter:"\\ea8f"}),u.symbolNumeric=new u("symbol-numeric",{fontCharacter:"\\ea90"}),u.symbolNumber=new u("symbol-number",{fontCharacter:"\\ea90"}),u.symbolStructure=new u("symbol-structure",{fontCharacter:"\\ea91"}),u.symbolStruct=new u("symbol-struct",{fontCharacter:"\\ea91"}),u.symbolParameter=new u("symbol-parameter",{fontCharacter:"\\ea92"}),u.symbolTypeParameter=new u("symbol-type-parameter",{fontCharacter:"\\ea92"}),u.symbolKey=new u("symbol-key",{fontCharacter:"\\ea93"}),u.symbolText=new u("symbol-text",{fontCharacter:"\\ea93"}),u.symbolReference=new u("symbol-reference",{fontCharacter:"\\ea94"}),u.goToFile=new u("go-to-file",{fontCharacter:"\\ea94"}),u.symbolEnum=new u("symbol-enum",{fontCharacter:"\\ea95"}),u.symbolValue=new u("symbol-value",{fontCharacter:"\\ea95"}),u.symbolRuler=new u("symbol-ruler",{fontCharacter:"\\ea96"}),u.symbolUnit=new u("symbol-unit",{fontCharacter:"\\ea96"}),u.activateBreakpoints=new u("activate-breakpoints",{fontCharacter:"\\ea97"}),u.archive=new u("archive",{fontCharacter:"\\ea98"}),u.arrowBoth=new u("arrow-both",{fontCharacter:"\\ea99"}),u.arrowDown=new u("arrow-down",{fontCharacter:"\\ea9a"}),u.arrowLeft=new u("arrow-left",{fontCharacter:"\\ea9b"}),u.arrowRight=new u("arrow-right",{fontCharacter:"\\ea9c"}),u.arrowSmallDown=new u("arrow-small-down",{fontCharacter:"\\ea9d"}),u.arrowSmallLeft=new u("arrow-small-left",{fontCharacter:"\\ea9e"}),u.arrowSmallRight=new u("arrow-small-right",{fontCharacter:"\\ea9f"}),u.arrowSmallUp=new u("arrow-small-up",{fontCharacter:"\\eaa0"}),u.arrowUp=new u("arrow-up",{fontCharacter:"\\eaa1"}),u.bell=new u("bell",{fontCharacter:"\\eaa2"}),u.bold=new u("bold",{fontCharacter:"\\eaa3"}),u.book=new u("book",{fontCharacter:"\\eaa4"}),u.bookmark=new u("bookmark",{fontCharacter:"\\eaa5"}),u.debugBreakpointConditionalUnverified=new u("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),u.debugBreakpointConditional=new u("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),u.debugBreakpointConditionalDisabled=new u("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),u.debugBreakpointDataUnverified=new u("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),u.debugBreakpointData=new u("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),u.debugBreakpointDataDisabled=new u("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),u.debugBreakpointLogUnverified=new u("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),u.debugBreakpointLog=new u("debug-breakpoint-log",{fontCharacter:"\\eaab"}),u.debugBreakpointLogDisabled=new u("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),u.briefcase=new u("briefcase",{fontCharacter:"\\eaac"}),u.broadcast=new u("broadcast",{fontCharacter:"\\eaad"}),u.browser=new u("browser",{fontCharacter:"\\eaae"}),u.bug=new u("bug",{fontCharacter:"\\eaaf"}),u.calendar=new u("calendar",{fontCharacter:"\\eab0"}),u.caseSensitive=new u("case-sensitive",{fontCharacter:"\\eab1"}),u.check=new u("check",{fontCharacter:"\\eab2"}),u.checklist=new u("checklist",{fontCharacter:"\\eab3"}),u.chevronDown=new u("chevron-down",{fontCharacter:"\\eab4"}),u.dropDownButton=new u("drop-down-button",u.chevronDown.definition),u.chevronLeft=new u("chevron-left",{fontCharacter:"\\eab5"}),u.chevronRight=new u("chevron-right",{fontCharacter:"\\eab6"}),u.chevronUp=new u("chevron-up",{fontCharacter:"\\eab7"}),u.chromeClose=new u("chrome-close",{fontCharacter:"\\eab8"}),u.chromeMaximize=new u("chrome-maximize",{fontCharacter:"\\eab9"}),u.chromeMinimize=new u("chrome-minimize",{fontCharacter:"\\eaba"}),u.chromeRestore=new u("chrome-restore",{fontCharacter:"\\eabb"}),u.circleOutline=new u("circle-outline",{fontCharacter:"\\eabc"}),u.debugBreakpointUnverified=new u("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),u.circleSlash=new u("circle-slash",{fontCharacter:"\\eabd"}),u.circuitBoard=new u("circuit-board",{fontCharacter:"\\eabe"}),u.clearAll=new u("clear-all",{fontCharacter:"\\eabf"}),u.clippy=new u("clippy",{fontCharacter:"\\eac0"}),u.closeAll=new u("close-all",{fontCharacter:"\\eac1"}),u.cloudDownload=new u("cloud-download",{fontCharacter:"\\eac2"}),u.cloudUpload=new u("cloud-upload",{fontCharacter:"\\eac3"}),u.code=new u("code",{fontCharacter:"\\eac4"}),u.collapseAll=new u("collapse-all",{fontCharacter:"\\eac5"}),u.colorMode=new u("color-mode",{fontCharacter:"\\eac6"}),u.commentDiscussion=new u("comment-discussion",{fontCharacter:"\\eac7"}),u.compareChanges=new u("compare-changes",{fontCharacter:"\\eafd"}),u.creditCard=new u("credit-card",{fontCharacter:"\\eac9"}),u.dash=new u("dash",{fontCharacter:"\\eacc"}),u.dashboard=new u("dashboard",{fontCharacter:"\\eacd"}),u.database=new u("database",{fontCharacter:"\\eace"}),u.debugContinue=new u("debug-continue",{fontCharacter:"\\eacf"}),u.debugDisconnect=new u("debug-disconnect",{fontCharacter:"\\ead0"}),u.debugPause=new u("debug-pause",{fontCharacter:"\\ead1"}),u.debugRestart=new u("debug-restart",{fontCharacter:"\\ead2"}),u.debugStart=new u("debug-start",{fontCharacter:"\\ead3"}),u.debugStepInto=new u("debug-step-into",{fontCharacter:"\\ead4"}),u.debugStepOut=new u("debug-step-out",{fontCharacter:"\\ead5"}),u.debugStepOver=new u("debug-step-over",{fontCharacter:"\\ead6"}),u.debugStop=new u("debug-stop",{fontCharacter:"\\ead7"}),u.debug=new u("debug",{fontCharacter:"\\ead8"}),u.deviceCameraVideo=new u("device-camera-video",{fontCharacter:"\\ead9"}),u.deviceCamera=new u("device-camera",{fontCharacter:"\\eada"}),u.deviceMobile=new u("device-mobile",{fontCharacter:"\\eadb"}),u.diffAdded=new u("diff-added",{fontCharacter:"\\eadc"}),u.diffIgnored=new u("diff-ignored",{fontCharacter:"\\eadd"}),u.diffModified=new u("diff-modified",{fontCharacter:"\\eade"}),u.diffRemoved=new u("diff-removed",{fontCharacter:"\\eadf"}),u.diffRenamed=new u("diff-renamed",{fontCharacter:"\\eae0"}),u.diff=new u("diff",{fontCharacter:"\\eae1"}),u.discard=new u("discard",{fontCharacter:"\\eae2"}),u.editorLayout=new u("editor-layout",{fontCharacter:"\\eae3"}),u.emptyWindow=new u("empty-window",{fontCharacter:"\\eae4"}),u.exclude=new u("exclude",{fontCharacter:"\\eae5"}),u.extensions=new u("extensions",{fontCharacter:"\\eae6"}),u.eyeClosed=new u("eye-closed",{fontCharacter:"\\eae7"}),u.fileBinary=new u("file-binary",{fontCharacter:"\\eae8"}),u.fileCode=new u("file-code",{fontCharacter:"\\eae9"}),u.fileMedia=new u("file-media",{fontCharacter:"\\eaea"}),u.filePdf=new u("file-pdf",{fontCharacter:"\\eaeb"}),u.fileSubmodule=new u("file-submodule",{fontCharacter:"\\eaec"}),u.fileSymlinkDirectory=new u("file-symlink-directory",{fontCharacter:"\\eaed"}),u.fileSymlinkFile=new u("file-symlink-file",{fontCharacter:"\\eaee"}),u.fileZip=new u("file-zip",{fontCharacter:"\\eaef"}),u.files=new u("files",{fontCharacter:"\\eaf0"}),u.filter=new u("filter",{fontCharacter:"\\eaf1"}),u.flame=new u("flame",{fontCharacter:"\\eaf2"}),u.foldDown=new u("fold-down",{fontCharacter:"\\eaf3"}),u.foldUp=new u("fold-up",{fontCharacter:"\\eaf4"}),u.fold=new u("fold",{fontCharacter:"\\eaf5"}),u.folderActive=new u("folder-active",{fontCharacter:"\\eaf6"}),u.folderOpened=new u("folder-opened",{fontCharacter:"\\eaf7"}),u.gear=new u("gear",{fontCharacter:"\\eaf8"}),u.gift=new u("gift",{fontCharacter:"\\eaf9"}),u.gistSecret=new u("gist-secret",{fontCharacter:"\\eafa"}),u.gist=new u("gist",{fontCharacter:"\\eafb"}),u.gitCommit=new u("git-commit",{fontCharacter:"\\eafc"}),u.gitCompare=new u("git-compare",{fontCharacter:"\\eafd"}),u.gitMerge=new u("git-merge",{fontCharacter:"\\eafe"}),u.githubAction=new u("github-action",{fontCharacter:"\\eaff"}),u.githubAlt=new u("github-alt",{fontCharacter:"\\eb00"}),u.globe=new u("globe",{fontCharacter:"\\eb01"}),u.grabber=new u("grabber",{fontCharacter:"\\eb02"}),u.graph=new u("graph",{fontCharacter:"\\eb03"}),u.gripper=new u("gripper",{fontCharacter:"\\eb04"}),u.heart=new u("heart",{fontCharacter:"\\eb05"}),u.home=new u("home",{fontCharacter:"\\eb06"}),u.horizontalRule=new u("horizontal-rule",{fontCharacter:"\\eb07"}),u.hubot=new u("hubot",{fontCharacter:"\\eb08"}),u.inbox=new u("inbox",{fontCharacter:"\\eb09"}),u.issueClosed=new u("issue-closed",{fontCharacter:"\\eba4"}),u.issueReopened=new u("issue-reopened",{fontCharacter:"\\eb0b"}),u.issues=new u("issues",{fontCharacter:"\\eb0c"}),u.italic=new u("italic",{fontCharacter:"\\eb0d"}),u.jersey=new u("jersey",{fontCharacter:"\\eb0e"}),u.json=new u("json",{fontCharacter:"\\eb0f"}),u.kebabVertical=new u("kebab-vertical",{fontCharacter:"\\eb10"}),u.key=new u("key",{fontCharacter:"\\eb11"}),u.law=new u("law",{fontCharacter:"\\eb12"}),u.lightbulbAutofix=new u("lightbulb-autofix",{fontCharacter:"\\eb13"}),u.linkExternal=new u("link-external",{fontCharacter:"\\eb14"}),u.link=new u("link",{fontCharacter:"\\eb15"}),u.listOrdered=new u("list-ordered",{fontCharacter:"\\eb16"}),u.listUnordered=new u("list-unordered",{fontCharacter:"\\eb17"}),u.liveShare=new u("live-share",{fontCharacter:"\\eb18"}),u.loading=new u("loading",{fontCharacter:"\\eb19"}),u.location=new u("location",{fontCharacter:"\\eb1a"}),u.mailRead=new u("mail-read",{fontCharacter:"\\eb1b"}),u.mail=new u("mail",{fontCharacter:"\\eb1c"}),u.markdown=new u("markdown",{fontCharacter:"\\eb1d"}),u.megaphone=new u("megaphone",{fontCharacter:"\\eb1e"}),u.mention=new u("mention",{fontCharacter:"\\eb1f"}),u.milestone=new u("milestone",{fontCharacter:"\\eb20"}),u.mortarBoard=new u("mortar-board",{fontCharacter:"\\eb21"}),u.move=new u("move",{fontCharacter:"\\eb22"}),u.multipleWindows=new u("multiple-windows",{fontCharacter:"\\eb23"}),u.mute=new u("mute",{fontCharacter:"\\eb24"}),u.noNewline=new u("no-newline",{fontCharacter:"\\eb25"}),u.note=new u("note",{fontCharacter:"\\eb26"}),u.octoface=new u("octoface",{fontCharacter:"\\eb27"}),u.openPreview=new u("open-preview",{fontCharacter:"\\eb28"}),u.package_=new u("package",{fontCharacter:"\\eb29"}),u.paintcan=new u("paintcan",{fontCharacter:"\\eb2a"}),u.pin=new u("pin",{fontCharacter:"\\eb2b"}),u.play=new u("play",{fontCharacter:"\\eb2c"}),u.run=new u("run",{fontCharacter:"\\eb2c"}),u.plug=new u("plug",{fontCharacter:"\\eb2d"}),u.preserveCase=new u("preserve-case",{fontCharacter:"\\eb2e"}),u.preview=new u("preview",{fontCharacter:"\\eb2f"}),u.project=new u("project",{fontCharacter:"\\eb30"}),u.pulse=new u("pulse",{fontCharacter:"\\eb31"}),u.question=new u("question",{fontCharacter:"\\eb32"}),u.quote=new u("quote",{fontCharacter:"\\eb33"}),u.radioTower=new u("radio-tower",{fontCharacter:"\\eb34"}),u.reactions=new u("reactions",{fontCharacter:"\\eb35"}),u.references=new u("references",{fontCharacter:"\\eb36"}),u.refresh=new u("refresh",{fontCharacter:"\\eb37"}),u.regex=new u("regex",{fontCharacter:"\\eb38"}),u.remoteExplorer=new u("remote-explorer",{fontCharacter:"\\eb39"}),u.remote=new u("remote",{fontCharacter:"\\eb3a"}),u.remove=new u("remove",{fontCharacter:"\\eb3b"}),u.replaceAll=new u("replace-all",{fontCharacter:"\\eb3c"}),u.replace=new u("replace",{fontCharacter:"\\eb3d"}),u.repoClone=new u("repo-clone",{fontCharacter:"\\eb3e"}),u.repoForcePush=new u("repo-force-push",{fontCharacter:"\\eb3f"}),u.repoPull=new u("repo-pull",{fontCharacter:"\\eb40"}),u.repoPush=new u("repo-push",{fontCharacter:"\\eb41"}),u.report=new u("report",{fontCharacter:"\\eb42"}),u.requestChanges=new u("request-changes",{fontCharacter:"\\eb43"}),u.rocket=new u("rocket",{fontCharacter:"\\eb44"}),u.rootFolderOpened=new u("root-folder-opened",{fontCharacter:"\\eb45"}),u.rootFolder=new u("root-folder",{fontCharacter:"\\eb46"}),u.rss=new u("rss",{fontCharacter:"\\eb47"}),u.ruby=new u("ruby",{fontCharacter:"\\eb48"}),u.saveAll=new u("save-all",{fontCharacter:"\\eb49"}),u.saveAs=new u("save-as",{fontCharacter:"\\eb4a"}),u.save=new u("save",{fontCharacter:"\\eb4b"}),u.screenFull=new u("screen-full",{fontCharacter:"\\eb4c"}),u.screenNormal=new u("screen-normal",{fontCharacter:"\\eb4d"}),u.searchStop=new u("search-stop",{fontCharacter:"\\eb4e"}),u.server=new u("server",{fontCharacter:"\\eb50"}),u.settingsGear=new u("settings-gear",{fontCharacter:"\\eb51"}),u.settings=new u("settings",{fontCharacter:"\\eb52"}),u.shield=new u("shield",{fontCharacter:"\\eb53"}),u.smiley=new u("smiley",{fontCharacter:"\\eb54"}),u.sortPrecedence=new u("sort-precedence",{fontCharacter:"\\eb55"}),u.splitHorizontal=new u("split-horizontal",{fontCharacter:"\\eb56"}),u.splitVertical=new u("split-vertical",{fontCharacter:"\\eb57"}),u.squirrel=new u("squirrel",{fontCharacter:"\\eb58"}),u.starFull=new u("star-full",{fontCharacter:"\\eb59"}),u.starHalf=new u("star-half",{fontCharacter:"\\eb5a"}),u.symbolClass=new u("symbol-class",{fontCharacter:"\\eb5b"}),u.symbolColor=new u("symbol-color",{fontCharacter:"\\eb5c"}),u.symbolConstant=new u("symbol-constant",{fontCharacter:"\\eb5d"}),u.symbolEnumMember=new u("symbol-enum-member",{fontCharacter:"\\eb5e"}),u.symbolField=new u("symbol-field",{fontCharacter:"\\eb5f"}),u.symbolFile=new u("symbol-file",{fontCharacter:"\\eb60"}),u.symbolInterface=new u("symbol-interface",{fontCharacter:"\\eb61"}),u.symbolKeyword=new u("symbol-keyword",{fontCharacter:"\\eb62"}),u.symbolMisc=new u("symbol-misc",{fontCharacter:"\\eb63"}),u.symbolOperator=new u("symbol-operator",{fontCharacter:"\\eb64"}),u.symbolProperty=new u("symbol-property",{fontCharacter:"\\eb65"}),u.wrench=new u("wrench",{fontCharacter:"\\eb65"}),u.wrenchSubaction=new u("wrench-subaction",{fontCharacter:"\\eb65"}),u.symbolSnippet=new u("symbol-snippet",{fontCharacter:"\\eb66"}),u.tasklist=new u("tasklist",{fontCharacter:"\\eb67"}),u.telescope=new u("telescope",{fontCharacter:"\\eb68"}),u.textSize=new u("text-size",{fontCharacter:"\\eb69"}),u.threeBars=new u("three-bars",{fontCharacter:"\\eb6a"}),u.thumbsdown=new u("thumbsdown",{fontCharacter:"\\eb6b"}),u.thumbsup=new u("thumbsup",{fontCharacter:"\\eb6c"}),u.tools=new u("tools",{fontCharacter:"\\eb6d"}),u.triangleDown=new u("triangle-down",{fontCharacter:"\\eb6e"}),u.triangleLeft=new u("triangle-left",{fontCharacter:"\\eb6f"}),u.triangleRight=new u("triangle-right",{fontCharacter:"\\eb70"}),u.triangleUp=new u("triangle-up",{fontCharacter:"\\eb71"}),u.twitter=new u("twitter",{fontCharacter:"\\eb72"}),u.unfold=new u("unfold",{fontCharacter:"\\eb73"}),u.unlock=new u("unlock",{fontCharacter:"\\eb74"}),u.unmute=new u("unmute",{fontCharacter:"\\eb75"}),u.unverified=new u("unverified",{fontCharacter:"\\eb76"}),u.verified=new u("verified",{fontCharacter:"\\eb77"}),u.versions=new u("versions",{fontCharacter:"\\eb78"}),u.vmActive=new u("vm-active",{fontCharacter:"\\eb79"}),u.vmOutline=new u("vm-outline",{fontCharacter:"\\eb7a"}),u.vmRunning=new u("vm-running",{fontCharacter:"\\eb7b"}),u.watch=new u("watch",{fontCharacter:"\\eb7c"}),u.whitespace=new u("whitespace",{fontCharacter:"\\eb7d"}),u.wholeWord=new u("whole-word",{fontCharacter:"\\eb7e"}),u.window=new u("window",{fontCharacter:"\\eb7f"}),u.wordWrap=new u("word-wrap",{fontCharacter:"\\eb80"}),u.zoomIn=new u("zoom-in",{fontCharacter:"\\eb81"}),u.zoomOut=new u("zoom-out",{fontCharacter:"\\eb82"}),u.listFilter=new u("list-filter",{fontCharacter:"\\eb83"}),u.listFlat=new u("list-flat",{fontCharacter:"\\eb84"}),u.listSelection=new u("list-selection",{fontCharacter:"\\eb85"}),u.selection=new u("selection",{fontCharacter:"\\eb85"}),u.listTree=new u("list-tree",{fontCharacter:"\\eb86"}),u.debugBreakpointFunctionUnverified=new u("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),u.debugBreakpointFunction=new u("debug-breakpoint-function",{fontCharacter:"\\eb88"}),u.debugBreakpointFunctionDisabled=new u("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),u.debugStackframeActive=new u("debug-stackframe-active",{fontCharacter:"\\eb89"}),u.debugStackframeDot=new u("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),u.debugStackframe=new u("debug-stackframe",{fontCharacter:"\\eb8b"}),u.debugStackframeFocused=new u("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),u.debugBreakpointUnsupported=new u("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),u.symbolString=new u("symbol-string",{fontCharacter:"\\eb8d"}),u.debugReverseContinue=new u("debug-reverse-continue",{fontCharacter:"\\eb8e"}),u.debugStepBack=new u("debug-step-back",{fontCharacter:"\\eb8f"}),u.debugRestartFrame=new u("debug-restart-frame",{fontCharacter:"\\eb90"}),u.callIncoming=new u("call-incoming",{fontCharacter:"\\eb92"}),u.callOutgoing=new u("call-outgoing",{fontCharacter:"\\eb93"}),u.menu=new u("menu",{fontCharacter:"\\eb94"}),u.expandAll=new u("expand-all",{fontCharacter:"\\eb95"}),u.feedback=new u("feedback",{fontCharacter:"\\eb96"}),u.groupByRefType=new u("group-by-ref-type",{fontCharacter:"\\eb97"}),u.ungroupByRefType=new u("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),u.account=new u("account",{fontCharacter:"\\eb99"}),u.bellDot=new u("bell-dot",{fontCharacter:"\\eb9a"}),u.debugConsole=new u("debug-console",{fontCharacter:"\\eb9b"}),u.library=new u("library",{fontCharacter:"\\eb9c"}),u.output=new u("output",{fontCharacter:"\\eb9d"}),u.runAll=new u("run-all",{fontCharacter:"\\eb9e"}),u.syncIgnored=new u("sync-ignored",{fontCharacter:"\\eb9f"}),u.pinned=new u("pinned",{fontCharacter:"\\eba0"}),u.githubInverted=new u("github-inverted",{fontCharacter:"\\eba1"}),u.debugAlt=new u("debug-alt",{fontCharacter:"\\eb91"}),u.serverProcess=new u("server-process",{fontCharacter:"\\eba2"}),u.serverEnvironment=new u("server-environment",{fontCharacter:"\\eba3"}),u.pass=new u("pass",{fontCharacter:"\\eba4"}),u.stopCircle=new u("stop-circle",{fontCharacter:"\\eba5"}),u.playCircle=new u("play-circle",{fontCharacter:"\\eba6"}),u.record=new u("record",{fontCharacter:"\\eba7"}),u.debugAltSmall=new u("debug-alt-small",{fontCharacter:"\\eba8"}),u.vmConnect=new u("vm-connect",{fontCharacter:"\\eba9"}),u.cloud=new u("cloud",{fontCharacter:"\\ebaa"}),u.merge=new u("merge",{fontCharacter:"\\ebab"}),u.exportIcon=new u("export",{fontCharacter:"\\ebac"}),u.graphLeft=new u("graph-left",{fontCharacter:"\\ebad"}),u.magnet=new u("magnet",{fontCharacter:"\\ebae"}),u.notebook=new u("notebook",{fontCharacter:"\\ebaf"}),u.redo=new u("redo",{fontCharacter:"\\ebb0"}),u.checkAll=new u("check-all",{fontCharacter:"\\ebb1"}),u.pinnedDirty=new u("pinned-dirty",{fontCharacter:"\\ebb2"}),u.passFilled=new u("pass-filled",{fontCharacter:"\\ebb3"}),u.circleLargeFilled=new u("circle-large-filled",{fontCharacter:"\\ebb4"}),u.circleLargeOutline=new u("circle-large-outline",{fontCharacter:"\\ebb5"}),u.combine=new u("combine",{fontCharacter:"\\ebb6"}),u.gather=new u("gather",{fontCharacter:"\\ebb6"}),u.table=new u("table",{fontCharacter:"\\ebb7"}),u.variableGroup=new u("variable-group",{fontCharacter:"\\ebb8"}),u.typeHierarchy=new u("type-hierarchy",{fontCharacter:"\\ebb9"}),u.typeHierarchySub=new u("type-hierarchy-sub",{fontCharacter:"\\ebba"}),u.typeHierarchySuper=new u("type-hierarchy-super",{fontCharacter:"\\ebbb"}),u.gitPullRequestCreate=new u("git-pull-request-create",{fontCharacter:"\\ebbc"}),u.runAbove=new u("run-above",{fontCharacter:"\\ebbd"}),u.runBelow=new u("run-below",{fontCharacter:"\\ebbe"}),u.notebookTemplate=new u("notebook-template",{fontCharacter:"\\ebbf"}),u.debugRerun=new u("debug-rerun",{fontCharacter:"\\ebc0"}),u.workspaceTrusted=new u("workspace-trusted",{fontCharacter:"\\ebc1"}),u.workspaceUntrusted=new u("workspace-untrusted",{fontCharacter:"\\ebc2"}),u.workspaceUnspecified=new u("workspace-unspecified",{fontCharacter:"\\ebc3"}),u.terminalCmd=new u("terminal-cmd",{fontCharacter:"\\ebc4"}),u.terminalDebian=new u("terminal-debian",{fontCharacter:"\\ebc5"}),u.terminalLinux=new u("terminal-linux",{fontCharacter:"\\ebc6"}),u.terminalPowershell=new u("terminal-powershell",{fontCharacter:"\\ebc7"}),u.terminalTmux=new u("terminal-tmux",{fontCharacter:"\\ebc8"}),u.terminalUbuntu=new u("terminal-ubuntu",{fontCharacter:"\\ebc9"}),u.terminalBash=new u("terminal-bash",{fontCharacter:"\\ebca"}),u.arrowSwap=new u("arrow-swap",{fontCharacter:"\\ebcb"}),u.copy=new u("copy",{fontCharacter:"\\ebcc"}),u.personAdd=new u("person-add",{fontCharacter:"\\ebcd"}),u.filterFilled=new u("filter-filled",{fontCharacter:"\\ebce"}),u.wand=new u("wand",{fontCharacter:"\\ebcf"}),u.debugLineByLine=new u("debug-line-by-line",{fontCharacter:"\\ebd0"}),u.inspect=new u("inspect",{fontCharacter:"\\ebd1"}),u.layers=new u("layers",{fontCharacter:"\\ebd2"}),u.layersDot=new u("layers-dot",{fontCharacter:"\\ebd3"}),u.layersActive=new u("layers-active",{fontCharacter:"\\ebd4"}),u.compass=new u("compass",{fontCharacter:"\\ebd5"}),u.compassDot=new u("compass-dot",{fontCharacter:"\\ebd6"}),u.compassActive=new u("compass-active",{fontCharacter:"\\ebd7"}),u.azure=new u("azure",{fontCharacter:"\\ebd8"}),u.issueDraft=new u("issue-draft",{fontCharacter:"\\ebd9"}),u.gitPullRequestClosed=new u("git-pull-request-closed",{fontCharacter:"\\ebda"}),u.gitPullRequestDraft=new u("git-pull-request-draft",{fontCharacter:"\\ebdb"}),u.debugAll=new u("debug-all",{fontCharacter:"\\ebdc"}),u.debugCoverage=new u("debug-coverage",{fontCharacter:"\\ebdd"}),u.runErrors=new u("run-errors",{fontCharacter:"\\ebde"}),u.folderLibrary=new u("folder-library",{fontCharacter:"\\ebdf"}),u.debugContinueSmall=new u("debug-continue-small",{fontCharacter:"\\ebe0"}),u.beakerStop=new u("beaker-stop",{fontCharacter:"\\ebe1"}),u.graphLine=new u("graph-line",{fontCharacter:"\\ebe2"}),u.graphScatter=new u("graph-scatter",{fontCharacter:"\\ebe3"}),u.pieChart=new u("pie-chart",{fontCharacter:"\\ebe4"}),u.bracket=new u("bracket",u.json.definition),u.bracketDot=new u("bracket-dot",{fontCharacter:"\\ebe5"}),u.bracketError=new u("bracket-error",{fontCharacter:"\\ebe6"}),u.lockSmall=new u("lock-small",{fontCharacter:"\\ebe7"}),u.azureDevops=new u("azure-devops",{fontCharacter:"\\ebe8"}),u.verifiedFilled=new u("verified-filled",{fontCharacter:"\\ebe9"})}(ge||(ge={}))},79881:function(gr,mt,K){"use strict";K.d(mt,{B8:function(){return D},Cp:function(){return he},F0:function(){return O},L6:function(){return J},VV:function(){return ge},b1:function(){return u},dL:function(){return Fe},ri:function(){return W}});class V{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(_){setTimeout(()=>{throw _.stack?new Error(_.message+`
`+_.stack):_},0)}}emit(_){this.listeners.forEach(w=>{w(_)})}onUnexpectedError(_){this.unexpectedErrorHandler(_),this.emit(_)}onUnexpectedExternalError(_){this.unexpectedErrorHandler(_)}}const me=new V;function Fe(B){ge(B)||me.onUnexpectedError(B)}function he(B){ge(B)||me.onUnexpectedExternalError(B)}function W(B){if(B instanceof Error){let{name:_,message:w}=B;const x=B.stacktrace||B.stack;return{$isError:!0,name:_,message:w,stack:x}}return B}const m="Canceled";function ge(B){return B instanceof Error&&B.name===m&&B.message===m}function O(){const B=new Error(m);return B.name=B.message,B}function u(B){return B?new Error(`Illegal argument: ${B}`):new Error("Illegal argument")}function J(B){return B?new Error(`Illegal state: ${B}`):new Error("Illegal state")}class D extends Error{constructor(_){super("NotSupported"),_&&(this.message=_)}}},4348:function(gr,mt,K){"use strict";K.d(mt,{D0:function(){return D},E7:function(){return B},K3:function(){return J},Q5:function(){return u},ZD:function(){return _},ju:function(){return W}});var V=K(79881),me=K(69323),Fe=K(34502),he=K(95830),W;(function(w){w.None=()=>me.JT.None;function x(G){return(z,se=null,re)=>{let E=!1,y;return y=G($=>{if(!E)return y?y.dispose():E=!0,z.call(se,$)},null,re),E&&y.dispose(),y}}w.once=x;function Y(G,z){return ce((se,re=null,E)=>G(y=>se.call(re,z(y)),null,E))}w.map=Y;function M(G,z){return ce((se,re=null,E)=>G(y=>{z(y),se.call(re,y)},null,E))}w.forEach=M;function H(G,z){return ce((se,re=null,E)=>G(y=>z(y)&&se.call(re,y),null,E))}w.filter=H;function Q(G){return G}w.signal=Q;function P(...G){return(z,se=null,re)=>(0,me.F8)(...G.map(E=>E(y=>z.call(se,y),null,re)))}w.any=P;function X(G,z,se){let re=se;return Y(G,E=>(re=z(re,E),re))}w.reduce=X;function ce(G){let z;const se=new u({onFirstListenerAdd(){z=G(se.fire,se)},onLastListenerRemove(){z.dispose()}});return se.event}function _e(G,z,se=100,re=!1,E){let y,$,Ae,Ge=0;const Je=new u({leakWarningThreshold:E,onFirstListenerAdd(){y=G(yt=>{Ge++,$=z($,yt),re&&!Ae&&(Je.fire($),$=void 0),clearTimeout(Ae),Ae=setTimeout(()=>{const dt=$;$=void 0,Ae=void 0,(!re||Ge>1)&&Je.fire(dt),Ge=0},se)})},onLastListenerRemove(){y.dispose()}});return Je.event}w.debounce=_e;function we(G,z=(se,re)=>se===re){let se=!0,re;return H(G,E=>{const y=se||!z(E,re);return se=!1,re=E,y})}w.latch=we;function ne(G,z){return[w.filter(G,z),w.filter(G,se=>!z(se))]}w.split=ne;function ve(G,z=!1,se=[]){let re=se.slice(),E=G(Ae=>{re?re.push(Ae):$.fire(Ae)});const y=()=>{re&&re.forEach(Ae=>$.fire(Ae)),re=null},$=new u({onFirstListenerAdd(){E||(E=G(Ae=>$.fire(Ae)))},onFirstListenerDidAdd(){re&&(z?setTimeout(y):y())},onLastListenerRemove(){E&&E.dispose(),E=null}});return $.event}w.buffer=ve;class Oe{constructor(z){this.event=z}map(z){return new Oe(Y(this.event,z))}forEach(z){return new Oe(M(this.event,z))}filter(z){return new Oe(H(this.event,z))}reduce(z,se){return new Oe(X(this.event,z,se))}latch(){return new Oe(we(this.event))}debounce(z,se=100,re=!1,E){return new Oe(_e(this.event,z,se,re,E))}on(z,se,re){return this.event(z,se,re)}once(z,se,re){return x(this.event)(z,se,re)}}function le(G){return new Oe(G)}w.chain=le;function Me(G,z,se=re=>re){const re=(...Ae)=>$.fire(se(...Ae)),E=()=>G.on(z,re),y=()=>G.removeListener(z,re),$=new u({onFirstListenerAdd:E,onLastListenerRemove:y});return $.event}w.fromNodeEventEmitter=Me;function Z(G,z,se=re=>re){const re=(...Ae)=>$.fire(se(...Ae)),E=()=>G.addEventListener(z,re),y=()=>G.removeEventListener(z,re),$=new u({onFirstListenerAdd:E,onLastListenerRemove:y});return $.event}w.fromDOMEventEmitter=Z;function I(G){return new Promise(z=>x(G)(z))}w.toPromise=I})(W||(W={}));class m{constructor(x){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${x}_${m._idPool++}`}start(x){this._stopWatch=new he.G(!0),this._listenerCount=x}stop(){if(this._stopWatch){const x=this._stopWatch.elapsed();this._elapsedOverall+=x,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${x.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let ge=-1;class O{constructor(x,Y=Math.random().toString(18).slice(2,5)){this.customThreshold=x,this.name=Y,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(x){let Y=ge;if(typeof this.customThreshold=="number"&&(Y=this.customThreshold),Y<=0||x<Y)return;this._stacks||(this._stacks=new Map);const M=new Error().stack.split(`
`).slice(3).join(`
`),H=this._stacks.get(M)||0;if(this._stacks.set(M,H+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=Y*.5;let Q,P=0;for(const[X,ce]of this._stacks)(!Q||P<ce)&&(Q=X,P=ce);console.warn(`[${this.name}] potential listener LEAK detected, having ${x} listeners already. MOST frequent listener (${P}):`),console.warn(Q)}return()=>{const Q=this._stacks.get(M)||0;this._stacks.set(M,Q-1)}}}class u{constructor(x){var Y;this._disposed=!1,this._options=x,this._leakageMon=ge>0?new O(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((Y=this._options)===null||Y===void 0)&&Y._profName?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(x,Y,M)=>{var H;this._listeners||(this._listeners=new Fe.S);const Q=this._listeners.isEmpty();Q&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const P=this._listeners.push(Y?[x,Y]:x);Q&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,x,Y);const X=(H=this._leakageMon)===null||H===void 0?void 0:H.check(this._listeners.size),ce=(0,me.OF)(()=>{X&&X(),this._disposed||(P(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return M instanceof me.SL?M.add(ce):Array.isArray(M)&&M.push(ce),ce}),this._event}fire(x){var Y,M;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Fe.S);for(let H of this._listeners)this._deliveryQueue.push([H,x]);for((Y=this._perfMon)===null||Y===void 0||Y.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[H,Q]=this._deliveryQueue.shift();try{typeof H=="function"?H.call(void 0,Q):H[0].call(H[1],Q)}catch(P){(0,V.dL)(P)}}(M=this._perfMon)===null||M===void 0||M.stop()}}dispose(){var x,Y,M,H,Q;this._disposed||(this._disposed=!0,(x=this._listeners)===null||x===void 0||x.clear(),(Y=this._deliveryQueue)===null||Y===void 0||Y.clear(),(H=(M=this._options)===null||M===void 0?void 0:M.onLastListenerRemove)===null||H===void 0||H.call(M),(Q=this._leakageMon)===null||Q===void 0||Q.dispose())}}class J extends u{constructor(x){super(x),this._isPaused=0,this._eventQueue=new Fe.S,this._mergeFn=x==null?void 0:x.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const x=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(x))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(x){this._listeners&&(this._isPaused!==0?this._eventQueue.push(x):super.fire(x))}}class D extends J{constructor(x){var Y;super(x),this._delay=(Y=x.delay)!==null&&Y!==void 0?Y:100}fire(x){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(x)}}class B{constructor(){this.buffers=[]}wrapEvent(x){return(Y,M,H)=>x(Q=>{const P=this.buffers[this.buffers.length-1];P?P.push(()=>Y.call(M,Q)):Y.call(M,Q)},void 0,H)}bufferEvents(x){const Y=[];this.buffers.push(Y);const M=x();return this.buffers.pop(),Y.forEach(H=>H()),M}}class _{constructor(){this.listening=!1,this.inputEvent=W.None,this.inputEventListener=me.JT.None,this.emitter=new u({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(x){this.inputEvent=x,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=x(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(gr,mt,K){"use strict";K.d(mt,{I:function(){return V}});function V(me){const Fe=this;let he=!1,W;return function(){return he||(he=!0,W=me.apply(Fe,arguments)),W}}},88226:function(gr,mt,K){"use strict";K.d(mt,{$:function(){return V}});var V;(function(me){function Fe(P){return P&&typeof P=="object"&&typeof P[Symbol.iterator]=="function"}me.is=Fe;const he=Object.freeze([]);function W(){return he}me.empty=W;function*m(P){yield P}me.single=m;function ge(P){return P||he}me.from=ge;function O(P){return!P||P[Symbol.iterator]().next().done===!0}me.isEmpty=O;function u(P){return P[Symbol.iterator]().next().value}me.first=u;function J(P,X){for(const ce of P)if(X(ce))return!0;return!1}me.some=J;function D(P,X){for(const ce of P)if(X(ce))return ce}me.find=D;function*B(P,X){for(const ce of P)X(ce)&&(yield ce)}me.filter=B;function*_(P,X){let ce=0;for(const _e of P)yield X(_e,ce++)}me.map=_;function*w(...P){for(const X of P)for(const ce of X)yield ce}me.concat=w;function*x(P){for(const X of P)for(const ce of X)yield ce}me.concatNested=x;function Y(P,X,ce){let _e=ce;for(const we of P)_e=X(_e,we);return _e}me.reduce=Y;function*M(P,X,ce=P.length){for(X<0&&(X+=P.length),ce<0?ce+=P.length:ce>P.length&&(ce=P.length);X<ce;X++)yield P[X]}me.slice=M;function H(P,X=Number.POSITIVE_INFINITY){const ce=[];if(X===0)return[ce,P];const _e=P[Symbol.iterator]();for(let we=0;we<X;we++){const ne=_e.next();if(ne.done)return[ce,me.empty()];ce.push(ne.value)}return[ce,{[Symbol.iterator](){return _e}}]}me.consume=H;function Q(P,X,ce=(_e,we)=>_e===we){const _e=P[Symbol.iterator](),we=X[Symbol.iterator]();for(;;){const ne=_e.next(),ve=we.next();if(ne.done!==ve.done)return!1;if(ne.done)return!0;if(!ce(ne.value,ve.value))return!1}}me.equals=Q})(V||(V={}))},69323:function(gr,mt,K){"use strict";K.d(mt,{B9:function(){return _},F8:function(){return w},JT:function(){return M},Jz:function(){return Q},OF:function(){return x},SL:function(){return Y},Wf:function(){return B},XK:function(){return H},dk:function(){return J}});var V=K(17845),me=K(88226);const Fe=!1;let he=null;function W(P){he=P}if(Fe){const P="__is_disposable_tracked__";W(new class{trackDisposable(X){const ce=new Error("Potentially leaked disposable").stack;setTimeout(()=>{X[P]||console.log(ce)},3e3)}setParent(X,ce){if(X&&X!==M.None)try{X[P]=!0}catch(_e){}}markAsDisposed(X){if(X&&X!==M.None)try{X[P]=!0}catch(ce){}}markAsSingleton(X){}})}function m(P){return he==null||he.trackDisposable(P),P}function ge(P){he==null||he.markAsDisposed(P)}function O(P,X){he==null||he.setParent(P,X)}function u(P,X){if(he)for(const ce of P)he.setParent(ce,X)}function J(P){return he==null||he.markAsSingleton(P),P}class D extends Error{constructor(X){super(`Encountered errors while disposing of store. Errors: [${X.join(", ")}]`),this.errors=X}}function B(P){return typeof P.dispose=="function"&&P.dispose.length===0}function _(P){if(me.$.is(P)){let X=[];for(const ce of P)if(ce)try{ce.dispose()}catch(_e){X.push(_e)}if(X.length===1)throw X[0];if(X.length>1)throw new D(X);return Array.isArray(P)?[]:P}else if(P)return P.dispose(),P}function w(...P){const X=x(()=>_(P));return u(P,X),X}function x(P){const X=m({dispose:(0,V.I)(()=>{ge(X),P()})});return X}class Y{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){this._isDisposed||(ge(this),this._isDisposed=!0,this.clear())}clear(){try{_(this._toDispose.values())}finally{this._toDispose.clear()}}add(X){if(!X)return X;if(X===this)throw new Error("Cannot register a disposable on itself!");return O(X,this),this._isDisposed?Y.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(X),X}}Y.DISABLE_DISPOSED_WARNING=!1;class M{constructor(){this._store=new Y,m(this),O(this._store,this)}dispose(){ge(this),this._store.dispose()}_register(X){if(X===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(X)}}M.None=Object.freeze({dispose(){}});class H{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(X){var ce;this._isDisposed||X===this._value||((ce=this._value)===null||ce===void 0||ce.dispose(),X&&O(X,this),this._value=X)}clear(){this.value=void 0}dispose(){var X;this._isDisposed=!0,ge(this),(X=this._value)===null||X===void 0||X.dispose(),this._value=void 0}clearAndLeak(){const X=this._value;return this._value=void 0,X&&O(X,null),X}}class Q{constructor(X){this.object=X}dispose(){}}},34502:function(gr,mt,K){"use strict";K.d(mt,{S:function(){return me}});class V{constructor(he){this.element=he,this.next=V.Undefined,this.prev=V.Undefined}}V.Undefined=new V(void 0);class me{constructor(){this._first=V.Undefined,this._last=V.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===V.Undefined}clear(){let he=this._first;for(;he!==V.Undefined;){const W=he.next;he.prev=V.Undefined,he.next=V.Undefined,he=W}this._first=V.Undefined,this._last=V.Undefined,this._size=0}unshift(he){return this._insert(he,!1)}push(he){return this._insert(he,!0)}_insert(he,W){const m=new V(he);if(this._first===V.Undefined)this._first=m,this._last=m;else if(W){const O=this._last;this._last=m,m.prev=O,O.next=m}else{const O=this._first;this._first=m,m.next=O,O.prev=m}this._size+=1;let ge=!1;return()=>{ge||(ge=!0,this._remove(m))}}shift(){if(this._first!==V.Undefined){const he=this._first.element;return this._remove(this._first),he}}pop(){if(this._last!==V.Undefined){const he=this._last.element;return this._remove(this._last),he}}_remove(he){if(he.prev!==V.Undefined&&he.next!==V.Undefined){const W=he.prev;W.next=he.next,he.next.prev=W}else he.prev===V.Undefined&&he.next===V.Undefined?(this._first=V.Undefined,this._last=V.Undefined):he.next===V.Undefined?(this._last=this._last.prev,this._last.next=V.Undefined):he.prev===V.Undefined&&(this._first=this._first.next,this._first.prev=V.Undefined);this._size-=1}*[Symbol.iterator](){let he=this._first;for(;he!==V.Undefined;)yield he.element,he=he.next}}},23345:function(gr,mt,K){"use strict";K.d(mt,{$L:function(){return _e},ED:function(){return Q},IJ:function(){return X},OS:function(){return Oe},WE:function(){return ne},dz:function(){return P},gn:function(){return we},li:function(){return x},r:function(){return Z},tY:function(){return ce},xS:function(){return ve}});var V=K(97671),me;const Fe="en";let he=!1,W=!1,m=!1,ge=!1,O=!1,u=!1,J=!1,D,B=null,_=null,w;const x=typeof self=="object"?self:typeof K.g=="object"?K.g:{};let Y;typeof x.vscode!="undefined"&&typeof x.vscode.process!="undefined"?Y=x.vscode.process:typeof V!="undefined"&&(Y=V);const M=typeof((me=Y==null?void 0:Y.versions)===null||me===void 0?void 0:me.electron)=="string"&&Y.type==="renderer";if(typeof navigator=="object"&&!M)w=navigator.userAgent,he=w.indexOf("Windows")>=0,W=w.indexOf("Macintosh")>=0,J=(w.indexOf("Macintosh")>=0||w.indexOf("iPad")>=0||w.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,m=w.indexOf("Linux")>=0,u=!0,D=navigator.language,B=D;else if(typeof Y=="object"){he=Y.platform==="win32",W=Y.platform==="darwin",m=Y.platform==="linux",ge=m&&!!Y.env.SNAP&&!!Y.env.SNAP_REVISION,D=Fe,B=Fe;const I=Y.env.VSCODE_NLS_CONFIG;if(I)try{const G=JSON.parse(I),z=G.availableLanguages["*"];D=G.locale,B=z||Fe,_=G._translationsConfigFile}catch(G){}O=!0}else console.error("Unable to resolve platform.");let H=0;W?H=1:he?H=3:m&&(H=2);const Q=he,P=W,X=m,ce=O,_e=u,we=J,ne=w,ve=function(){if(x.setImmediate)return x.setImmediate.bind(x);if(typeof x.postMessage=="function"&&!x.importScripts){let z=[];x.addEventListener("message",re=>{if(re.data&&re.data.vscodeSetImmediateId)for(let E=0,y=z.length;E<y;E++){const $=z[E];if($.id===re.data.vscodeSetImmediateId){z.splice(E,1),$.callback();return}}});let se=0;return re=>{const E=++se;z.push({id:E,callback:re}),x.postMessage({vscodeSetImmediateId:E},"*")}}if(typeof(Y==null?void 0:Y.nextTick)=="function")return Y.nextTick.bind(Y);const G=Promise.resolve();return z=>G.then(z)}(),Oe=W||J?2:he?1:3;let le=!0,Me=!1;function Z(){if(!Me){Me=!0;const I=new Uint8Array(2);I[0]=1,I[1]=2,le=new Uint16Array(I.buffer)[0]===513}return le}},95830:function(gr,mt,K){"use strict";K.d(mt,{G:function(){return Fe}});var V=K(23345);const me=V.li.performance&&typeof V.li.performance.now=="function";class Fe{constructor(W){this._highResolution=me&&W,this._startTime=this._now(),this._stopTime=-1}static create(W=!0){return new Fe(W)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?V.li.performance.now():Date.now()}}},82983:function(gr,mt,K){"use strict";K.d(mt,{$i:function(){return Ge},C8:function(){return bt},GF:function(){return D},HO:function(){return se},IO:function(){return B},K7:function(){return Rt},Kw:function(){return nt},LC:function(){return x},Mh:function(){return ve},P1:function(){return Oe},PJ:function(){return Ie},Qe:function(){return Je},R1:function(){return J},RP:function(){return $},S6:function(){return wt},TT:function(){return Q},Ut:function(){return E},V8:function(){return Y},WU:function(){return Fe},YK:function(){return Me},YU:function(){return he},ZG:function(){return le},ZH:function(){return I},ab:function(){return yt},c1:function(){return ht},df:function(){return _e},ec:function(){return W},fi:function(){return Lt},fy:function(){return m},j3:function(){return ge},j_:function(){return X},m5:function(){return V},mK:function(){return ce},mr:function(){return _},oH:function(){return g},oL:function(){return O},ok:function(){return ne},ow:function(){return M},qq:function(){return we},qu:function(){return H},rL:function(){return Z},uS:function(){return Le},un:function(){return u},uq:function(){return w},vH:function(){return z},xe:function(){return dt},zY:function(){return P}});function V(k){return!k||typeof k!="string"?!0:k.trim().length===0}const me=/{(\d+)}/g;function Fe(k,...ee){return ee.length===0?k:k.replace(me,function(be,Ue){const Ye=parseInt(Ue,10);return isNaN(Ye)||Ye<0||Ye>=ee.length?be:ee[Ye]})}function he(k){return k.replace(/[<>&]/g,function(ee){switch(ee){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ee}})}function W(k){return k.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(k,ee=" "){const be=ge(k,ee);return O(be,ee)}function ge(k,ee){if(!k||!ee)return k;const be=ee.length;if(be===0||k.length===0)return k;let Ue=0;for(;k.indexOf(ee,Ue)===Ue;)Ue=Ue+be;return k.substring(Ue)}function O(k,ee){if(!k||!ee)return k;const be=ee.length,Ue=k.length;if(be===0||Ue===0)return k;let Ye=Ue,We=-1;for(;We=k.lastIndexOf(ee,Ye-1),!(We===-1||We+be!==Ye);){if(We===0)return"";Ye=We}return k.substring(0,Ye)}function u(k){return k.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function J(k){return k.replace(/\*/g,"")}function D(k,ee,be={}){if(!k)throw new Error("Cannot create regex from empty string");ee||(k=W(k)),be.wholeWord&&(/\B/.test(k.charAt(0))||(k="\\b"+k),/\B/.test(k.charAt(k.length-1))||(k=k+"\\b"));let Ue="";return be.global&&(Ue+="g"),be.matchCase||(Ue+="i"),be.multiline&&(Ue+="m"),be.unicode&&(Ue+="u"),new RegExp(k,Ue)}function B(k){return k.source==="^"||k.source==="^$"||k.source==="$"||k.source==="^\\s*$"?!1:!!(k.exec("")&&k.lastIndex===0)}function _(k){return(k.global?"g":"")+(k.ignoreCase?"i":"")+(k.multiline?"m":"")+(k.unicode?"u":"")}function w(k){return k.split(/\r\n|\r|\n/)}function x(k){for(let ee=0,be=k.length;ee<be;ee++){const Ue=k.charCodeAt(ee);if(Ue!==32&&Ue!==9)return ee}return-1}function Y(k,ee=0,be=k.length){for(let Ue=ee;Ue<be;Ue++){const Ye=k.charCodeAt(Ue);if(Ye!==32&&Ye!==9)return k.substring(ee,Ue)}return k.substring(ee,be)}function M(k,ee=k.length-1){for(let be=ee;be>=0;be--){const Ue=k.charCodeAt(be);if(Ue!==32&&Ue!==9)return be}return-1}function H(k,ee){return k<ee?-1:k>ee?1:0}function Q(k,ee,be=0,Ue=k.length,Ye=0,We=ee.length){for(;be<Ue&&Ye<We;be++,Ye++){let ut=k.charCodeAt(be),At=ee.charCodeAt(Ye);if(ut<At)return-1;if(ut>At)return 1}const St=Ue-be,Xe=We-Ye;return St<Xe?-1:St>Xe?1:0}function P(k,ee){return X(k,ee,0,k.length,0,ee.length)}function X(k,ee,be=0,Ue=k.length,Ye=0,We=ee.length){for(;be<Ue&&Ye<We;be++,Ye++){let ut=k.charCodeAt(be),At=ee.charCodeAt(Ye);if(ut===At)continue;if(ut>=128||At>=128)return Q(k.toLowerCase(),ee.toLowerCase(),be,Ue,Ye,We);ce(ut)&&(ut-=32),ce(At)&&(At-=32);const it=ut-At;if(it!==0)return it}const St=Ue-be,Xe=We-Ye;return St<Xe?-1:St>Xe?1:0}function ce(k){return k>=97&&k<=122}function _e(k){return k>=65&&k<=90}function we(k,ee){return k.length===ee.length&&X(k,ee)===0}function ne(k,ee){const be=ee.length;return ee.length>k.length?!1:X(k,ee,0,be)===0}function ve(k,ee){let be,Ue=Math.min(k.length,ee.length);for(be=0;be<Ue;be++)if(k.charCodeAt(be)!==ee.charCodeAt(be))return be;return Ue}function Oe(k,ee){let be,Ue=Math.min(k.length,ee.length);const Ye=k.length-1,We=ee.length-1;for(be=0;be<Ue;be++)if(k.charCodeAt(Ye-be)!==ee.charCodeAt(We-be))return be;return Ue}function le(k){return 55296<=k&&k<=56319}function Me(k){return 56320<=k&&k<=57343}function Z(k,ee){return(k-55296<<10)+(ee-56320)+65536}function I(k,ee,be){const Ue=k.charCodeAt(be);if(le(Ue)&&be+1<ee){const Ye=k.charCodeAt(be+1);if(Me(Ye))return Z(Ue,Ye)}return Ue}function G(k,ee){const be=k.charCodeAt(ee-1);if(Me(be)&&ee>1){const Ue=k.charCodeAt(ee-2);if(le(Ue))return Z(Ue,be)}return be}function z(k,ee){const be=Be.getInstance(),Ue=ee,Ye=k.length,We=I(k,Ye,ee);ee+=We>=65536?2:1;let St=be.getGraphemeBreakType(We);for(;ee<Ye;){const Xe=I(k,Ye,ee),ut=be.getGraphemeBreakType(Xe);if(Lt(St,ut))break;ee+=Xe>=65536?2:1,St=ut}return ee-Ue}function se(k,ee){const be=Be.getInstance(),Ue=ee,Ye=G(k,ee);ee-=Ye>=65536?2:1;let We=be.getGraphemeBreakType(Ye);for(;ee>0;){const St=G(k,ee),Xe=be.getGraphemeBreakType(St);if(Lt(Xe,We))break;ee-=St>=65536?2:1,We=Xe}return Ue-ee}const re=/(?:[\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 E(k){return re.test(k)}const y=/(?:[\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 $(k){return y.test(k)}const Ae=/^[\t\n\r\x20-\x7E]*$/;function Ge(k){return Ae.test(k)}const Je=/[\u2028\u2029]/;function yt(k){return Je.test(k)}function dt(k){for(let ee=0,be=k.length;ee<be;ee++)if(Rt(k.charCodeAt(ee)))return!0;return!1}function Rt(k){return k=+k,k>=11904&&k<=55215||k>=63744&&k<=64255||k>=65281&&k<=65374}function bt(k){return k>=127462&&k<=127487||k===8986||k===8987||k===9200||k===9203||k>=9728&&k<=10175||k===11088||k===11093||k>=127744&&k<=128591||k>=128640&&k<=128764||k>=128992&&k<=129003||k>=129280&&k<=129535||k>=129648&&k<=129750}const ht="\uFEFF";function Le(k){return!!(k&&k.length>0&&k.charCodeAt(0)===65279)}function nt(k,ee=!1){return k?(ee&&(k=k.replace(/\\./g,"")),k.toLowerCase()!==k):!1}function Ie(k){return k=k%(2*26),k<26?String.fromCharCode(97+k):String.fromCharCode(65+k-26)}function wt(k){return Be.getInstance().getGraphemeBreakType(k)}function Lt(k,ee){return k===0?ee!==5&&ee!==7:k===2&&ee===3?!1:k===4||k===2||k===3||ee===4||ee===2||ee===3?!0:!(k===8&&(ee===8||ee===9||ee===11||ee===12)||(k===11||k===9)&&(ee===9||ee===10)||(k===12||k===10)&&ee===10||ee===5||ee===13||ee===7||k===1||k===13&&ee===14||k===6&&ee===6)}class Be{constructor(){this._data=L()}static getInstance(){return Be._INSTANCE||(Be._INSTANCE=new Be),Be._INSTANCE}getGraphemeBreakType(ee){if(ee<32)return ee===10?3:ee===13?2:4;if(ee<127)return 0;const be=this._data,Ue=be.length/3;let Ye=1;for(;Ye<=Ue;)if(ee<be[3*Ye])Ye=2*Ye;else if(ee>be[3*Ye+1])Ye=2*Ye+1;else return be[3*Ye+2];return 0}}Be._INSTANCE=null;function L(){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 g(k,ee){if(k===0)return 0;const be=C(k,ee);if(be!==void 0)return be;const Ue=G(ee,k);return k-=N(Ue),k}function C(k,ee){let be=G(ee,k);for(k-=N(be);T(be)||be===65039||be===8419;){if(k===0)return;be=G(ee,k),k-=N(be)}if(bt(be)){if(k>=0){const Ue=G(ee,k);Ue===8205&&(k-=N(Ue))}return k}}function N(k){return k>=65536?2:1}function T(k){return 127995<=k&&k<=127999}},72999:function(gr,mt,K){"use strict";K.d(mt,{$E:function(){return x},$K:function(){return ge},D8:function(){return B},HD:function(){return me},IU:function(){return Y},Jp:function(){return O},Kn:function(){return Fe},cW:function(){return J},f6:function(){return M},hj:function(){return he},jn:function(){return W},kJ:function(){return V},mf:function(){return D},o8:function(){return m},p_:function(){return u},vE:function(){return H}});function V(Q){return Array.isArray(Q)}function me(Q){return typeof Q=="string"}function Fe(Q){return typeof Q=="object"&&Q!==null&&!Array.isArray(Q)&&!(Q instanceof RegExp)&&!(Q instanceof Date)}function he(Q){return typeof Q=="number"&&!isNaN(Q)}function W(Q){return Q===!0||Q===!1}function m(Q){return typeof Q=="undefined"}function ge(Q){return!O(Q)}function O(Q){return m(Q)||Q===null}function u(Q,P){if(!Q)throw new Error(P?`Unexpected type, expected '${P}'`:"Unexpected type")}function J(Q){if(O(Q))throw new Error("Assertion Failed: argument is undefined or null");return Q}function D(Q){return typeof Q=="function"}function B(Q,P){const X=Math.min(Q.length,P.length);for(let ce=0;ce<X;ce++)_(Q[ce],P[ce])}function _(Q,P){if(me(P)){if(typeof Q!==P)throw new Error(`argument does not match constraint: typeof ${P}`)}else if(D(P)){try{if(Q instanceof P)return}catch(X){}if(!O(Q)&&Q.constructor===P||P.length===1&&P.call(void 0,Q)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function w(Q){let P=[],X=Object.getPrototypeOf(Q);for(;Object.prototype!==X;)P=P.concat(Object.getOwnPropertyNames(X)),X=Object.getPrototypeOf(X);return P}function x(Q){const P=[];for(const X of w(Q))typeof Q[X]=="function"&&P.push(X);return P}function Y(Q,P){const X=_e=>function(){const we=Array.prototype.slice.call(arguments,0);return P(_e,we)};let ce={};for(const _e of Q)ce[_e]=X(_e);return ce}function M(Q){return Q===null?void 0:Q}function H(Q,P="Unreachable"){throw new Error(P)}},13268:function(gr,mt,K){"use strict";K.d(mt,{N:function(){return me}});function V(Fe,he){let W;return he.length===0?W=Fe:W=Fe.replace(/\{(\d+)\}/g,function(m,ge){const O=ge[0];return typeof he[O]!="undefined"?he[O]:m}),W}function me(Fe,he,...W){return V(he,W)}},96236:function(gr,mt,K){"use strict";K.d(mt,{BH:function(){return Y},NZ:function(){return M},U8:function(){return H},co:function(){return x},eH:function(){return w},vr:function(){return _}});var V=K(75918),me=K(52615),Fe=K(4348),he=K(88226),W=K(69323),m=K(34502),ge=K(35884),O=K(90689),u=K(16925),J=K(49055),D=function(Q,P,X,ce){var _e=arguments.length,we=_e<3?P:ce===null?ce=Object.getOwnPropertyDescriptor(P,X):ce,ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")we=Reflect.decorate(Q,P,X,ce);else for(var ve=Q.length-1;ve>=0;ve--)(ne=Q[ve])&&(we=(_e<3?ne(we):_e>3?ne(P,X,we):ne(P,X))||we);return _e>3&&we&&Object.defineProperty(P,X,we),we},B=function(Q,P){return function(X,ce){P(X,ce,Q)}};function _(Q){return Q.command!==void 0}class w{constructor(P){this.id=w._idPool++,this._debugName=P}}w._idPool=0,w.CommandPalette=new w("CommandPalette"),w.EditorContext=new w("EditorContext"),w.SimpleEditorContext=new w("SimpleEditorContext"),w.EditorContextCopy=new w("EditorContextCopy"),w.EditorContextPeek=new w("EditorContextPeek"),w.MenubarEditMenu=new w("MenubarEditMenu"),w.MenubarCopy=new w("MenubarCopy"),w.MenubarGoMenu=new w("MenubarGoMenu"),w.MenubarSelectionMenu=new w("MenubarSelectionMenu"),w.InlineCompletionsActions=new w("InlineCompletionsActions");const x=(0,u.yh)("menuService"),Y=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Fe.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:Q=>Q===w.CommandPalette}}addCommand(Q){return this.addCommands(he.$.single(Q))}addCommands(Q){for(const P of Q)this._commands.set(P.id,P);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,W.OF)(()=>{let P=!1;for(const X of Q)P=this._commands.delete(X.id)||P;P&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(Q){return this._commands.get(Q)}getCommands(){const Q=new Map;return this._commands.forEach((P,X)=>Q.set(X,P)),Q}appendMenuItem(Q,P){return this.appendMenuItems(he.$.single({id:Q,item:P}))}appendMenuItems(Q){const P=new Set,X=new m.S;for(const{id:ce,item:_e}of Q){let we=this._menuItems.get(ce);we||(we=new m.S,this._menuItems.set(ce,we)),X.push(we.push(_e)),P.add(ce)}return this._onDidChangeMenu.fire(P),(0,W.OF)(()=>{if(X.size>0){for(let ce of X)ce();this._onDidChangeMenu.fire(P),X.clear()}})}getMenuItems(Q){let P;return this._menuItems.has(Q)?P=[...this._menuItems.get(Q)]:P=[],Q===w.CommandPalette&&this._appendImplicitItems(P),P}_appendImplicitItems(Q){const P=new Set;for(const X of Q)_(X)&&(P.add(X.command.id),X.alt&&P.add(X.alt.id));this._commands.forEach((X,ce)=>{P.has(ce)||Q.push({command:X})})}};class M extends V.wY{constructor(P,X,ce,_e){super(`submenuitem.${P.submenu.id}`,typeof P.title=="string"?P.title:P.title.value,[],"submenu"),this.item=P,this._menuService=X,this._contextKeyService=ce,this._options=_e}get actions(){const P=[],X=this._menuService.createMenu(this.item.submenu,this._contextKeyService),ce=X.getActions(this._options);X.dispose();for(const[,_e]of ce)_e.length>0&&(P.push(..._e),P.push(new V.Z0));return P.length&&P.pop(),P}}let H=class ic{constructor(P,X,ce,_e,we){var ne,ve;if(this._commandService=we,this.id=P.id,this.label=ce!=null&&ce.renderShortTitle&&P.shortTitle?typeof P.shortTitle=="string"?P.shortTitle:P.shortTitle.value:typeof P.title=="string"?P.title:P.title.value,this.tooltip=(ve=typeof P.tooltip=="string"?P.tooltip:(ne=P.tooltip)===null||ne===void 0?void 0:ne.value)!==null&&ve!==void 0?ve:"",this.enabled=!P.precondition||_e.contextMatchesRules(P.precondition),this.checked=void 0,P.toggled){const Oe=P.toggled.condition?P.toggled:{condition:P.toggled};this.checked=_e.contextMatchesRules(Oe.condition),this.checked&&Oe.tooltip&&(this.tooltip=typeof Oe.tooltip=="string"?Oe.tooltip:Oe.tooltip.value),Oe.title&&(this.label=typeof Oe.title=="string"?Oe.title:Oe.title.value)}this.item=P,this.alt=X?new ic(X,void 0,ce,_e,we):void 0,this._options=ce,J.kS.isThemeIcon(P.icon)&&(this.class=me.dT.asClassName(P.icon))}dispose(){}run(...P){var X,ce;let _e=[];return!((X=this._options)===null||X===void 0)&&X.arg&&(_e=[..._e,this._options.arg]),!((ce=this._options)===null||ce===void 0)&&ce.shouldForwardArgs&&(_e=[..._e,...P]),this._commandService.executeCommand(this.id,..._e)}};H=D([B(3,O.i6),B(4,ge.H)],H)},35884:function(gr,mt,K){"use strict";K.d(mt,{H:function(){return ge},P:function(){return O}});var V=K(4348),me=K(88226),Fe=K(69323),he=K(34502),W=K(72999),m=K(16925);const ge=(0,m.yh)("commandService"),O=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new V.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(u,J){if(!u)throw new Error("invalid command");if(typeof u=="string"){if(!J)throw new Error("invalid command");return this.registerCommand({id:u,handler:J})}if(u.description){const x=[];for(let M of u.description.args)x.push(M.constraint);const Y=u.handler;u.handler=function(M,...H){return(0,W.D8)(H,x),Y(M,...H)}}const{id:D}=u;let B=this._commands.get(D);B||(B=new he.S,this._commands.set(D,B));let _=B.unshift(u),w=(0,Fe.OF)(()=>{_();const x=this._commands.get(D);x!=null&&x.isEmpty()&&this._commands.delete(D)});return this._onDidRegisterCommand.fire(D),w}registerCommandAlias(u,J){return O.registerCommand(u,(D,...B)=>D.get(ge).executeCommand(J,...B))}getCommand(u){const J=this._commands.get(u);if(!(!J||J.isEmpty()))return me.$.first(J)}getCommands(){const u=new Map;for(const J of this._commands.keys()){const D=this.getCommand(J);D&&u.set(J,D)}return u}};O.registerCommand("noop",()=>{})},90689:function(gr,mt,K){"use strict";K.d(mt,{Ao:function(){return ge},Eq:function(){return Z},Fb:function(){return O},K8:function(){return z},i6:function(){return Me},uy:function(){return le}});var V=K(23345),me=K(82983),Fe=K(16925);let he=V.WE||"";const W=new Map;W.set("false",!1),W.set("true",!0),W.set("isMac",V.dz),W.set("isLinux",V.IJ),W.set("isWindows",V.ED),W.set("isWeb",V.$L),W.set("isMacNative",V.dz&&!V.$L),W.set("isEdge",he.indexOf("Edg/")>=0),W.set("isFirefox",he.indexOf("Firefox")>=0),W.set("isChrome",he.indexOf("Chrome")>=0),W.set("isSafari",he.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class ge{static has(E){return B.create(E)}static equals(E,y){return _.create(E,y)}static regex(E,y){return _e.create(E,y)}static not(E){return M.create(E)}static and(...E){return ve.create(E,null)}static or(...E){return Oe.create(E,null,!0)}static deserialize(E,y=!1){if(E)return this._deserializeOrExpression(E,y)}static _deserializeOrExpression(E,y){let $=E.split("||");return Oe.create($.map(Ae=>this._deserializeAndExpression(Ae,y)),null,!0)}static _deserializeAndExpression(E,y){let $=E.split("&&");return ve.create($.map(Ae=>this._deserializeOne(Ae,y)),null)}static _deserializeOne(E,y){if(E=E.trim(),E.indexOf("!=")>=0){let $=E.split("!=");return Y.create($[0].trim(),this._deserializeValue($[1],y))}if(E.indexOf("==")>=0){let $=E.split("==");return _.create($[0].trim(),this._deserializeValue($[1],y))}if(E.indexOf("=~")>=0){let $=E.split("=~");return _e.create($[0].trim(),this._deserializeRegexValue($[1],y))}if(E.indexOf(" in ")>=0){let $=E.split(" in ");return w.create($[0].trim(),$[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(E)){const $=E.split(">=");return P.create($[0].trim(),$[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(E)){const $=E.split(">");return Q.create($[0].trim(),$[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(E)){const $=E.split("<=");return ce.create($[0].trim(),$[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(E)){const $=E.split("<");return X.create($[0].trim(),$[1].trim())}return/^\!\s*/.test(E)?M.create(E.substr(1).trim()):B.create(E)}static _deserializeValue(E,y){if(E=E.trim(),E==="true")return!0;if(E==="false")return!1;let $=/^'([^']*)'$/.exec(E);return $?$[1].trim():E}static _deserializeRegexValue(E,y){if((0,me.m5)(E)){if(y)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let $=E.indexOf("/"),Ae=E.lastIndexOf("/");if($===Ae||$<0){if(y)throw new Error(`bad regexp-value '${E}', missing /-enclosure`);return console.warn(`bad regexp-value '${E}', missing /-enclosure`),null}let Ge=E.slice($+1,Ae),Je=E[Ae+1]==="i"?"i":"";try{return new RegExp(Ge,Je)}catch(yt){if(y)throw new Error(`bad regexp-value '${E}', parse error: ${yt}`);return console.warn(`bad regexp-value '${E}', parse error: ${yt}`),null}}}function O(re,E){const y=re?re.substituteConstants():void 0,$=E?E.substituteConstants():void 0;return!y&&!$?!0:!y||!$?!1:y.equals($)}function u(re,E){return re.cmp(E)}class J{constructor(){this.type=0}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!1}serialize(){return"false"}keys(){return[]}negate(){return D.INSTANCE}}J.INSTANCE=new J;class D{constructor(){this.type=1}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!0}serialize(){return"true"}keys(){return[]}negate(){return J.INSTANCE}}D.INSTANCE=new D;class B{constructor(E,y){this.key=E,this.negated=y,this.type=2}static create(E,y=null){const $=W.get(E);return typeof $=="boolean"?$?D.INSTANCE:J.INSTANCE:new B(E,y)}cmp(E){return E.type!==this.type?this.type-E.type:I(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=W.get(this.key);return typeof E=="boolean"?E?D.INSTANCE:J.INSTANCE:this}evaluate(E){return!!E.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this)),this.negated}}class _{constructor(E,y,$){this.key=E,this.value=y,this.negated=$,this.type=4}static create(E,y,$=null){if(typeof y=="boolean")return y?B.create(E,$):M.create(E,$);const Ae=W.get(E);return typeof Ae=="boolean"?y===(Ae?"true":"false")?D.INSTANCE:J.INSTANCE:new _(E,y,$)}cmp(E){return E.type!==this.type?this.type-E.type:G(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=W.get(this.key);if(typeof E=="boolean"){const y=E?"true":"false";return this.value===y?D.INSTANCE:J.INSTANCE}return this}evaluate(E){return E.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Y.create(this.key,this.value,this)),this.negated}}class w{constructor(E,y){this.key=E,this.valueKey=y,this.type=10,this.negated=null}static create(E,y){return new w(E,y)}cmp(E){return E.type!==this.type?this.type-E.type:G(this.key,this.valueKey,E.key,E.valueKey)}equals(E){return E.type===this.type?this.key===E.key&&this.valueKey===E.valueKey:!1}substituteConstants(){return this}evaluate(E){const y=E.getValue(this.valueKey),$=E.getValue(this.key);return Array.isArray(y)?y.indexOf($)>=0:typeof $=="string"&&typeof y=="object"&&y!==null?m.call(y,$):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=x.create(this)),this.negated}}class x{constructor(E){this._actual=E,this.type=11}static create(E){return new x(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class Y{constructor(E,y,$){this.key=E,this.value=y,this.negated=$,this.type=5}static create(E,y,$=null){if(typeof y=="boolean")return y?M.create(E,$):B.create(E,$);const Ae=W.get(E);return typeof Ae=="boolean"?y===(Ae?"true":"false")?J.INSTANCE:D.INSTANCE:new Y(E,y,$)}cmp(E){return E.type!==this.type?this.type-E.type:G(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=W.get(this.key);if(typeof E=="boolean"){const y=E?"true":"false";return this.value===y?J.INSTANCE:D.INSTANCE}return this}evaluate(E){return E.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class M{constructor(E,y){this.key=E,this.negated=y,this.type=3}static create(E,y=null){const $=W.get(E);return typeof $=="boolean"?$?J.INSTANCE:D.INSTANCE:new M(E,y)}cmp(E){return E.type!==this.type?this.type-E.type:I(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=W.get(this.key);return typeof E=="boolean"?E?J.INSTANCE:D.INSTANCE:this}evaluate(E){return!E.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 H(re,E){if(typeof re=="string"){const y=parseFloat(re);isNaN(y)||(re=y)}return typeof re=="string"||typeof re=="number"?E(re):J.INSTANCE}class Q{constructor(E,y,$){this.key=E,this.value=y,this.negated=$,this.type=12}static create(E,y,$=null){return H(y,Ae=>new Q(E,Ae,$))}cmp(E){return E.type!==this.type?this.type-E.type:G(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ce.create(this.key,this.value,this)),this.negated}}class P{constructor(E,y,$){this.key=E,this.value=y,this.negated=$,this.type=13}static create(E,y,$=null){return H(y,Ae=>new P(E,Ae,$))}cmp(E){return E.type!==this.type?this.type-E.type:G(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=X.create(this.key,this.value,this)),this.negated}}class X{constructor(E,y,$){this.key=E,this.value=y,this.negated=$,this.type=14}static create(E,y,$=null){return H(y,Ae=>new X(E,Ae,$))}cmp(E){return E.type!==this.type?this.type-E.type:G(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class ce{constructor(E,y,$){this.key=E,this.value=y,this.negated=$,this.type=15}static create(E,y,$=null){return H(y,Ae=>new ce(E,Ae,$))}cmp(E){return E.type!==this.type?this.type-E.type:G(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Q.create(this.key,this.value,this)),this.negated}}class _e{constructor(E,y){this.key=E,this.regexp=y,this.type=7,this.negated=null}static create(E,y){return new _e(E,y)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.key<E.key)return-1;if(this.key>E.key)return 1;const y=this.regexp?this.regexp.source:"",$=E.regexp?E.regexp.source:"";return y<$?-1:y>$?1:0}equals(E){if(E.type===this.type){const y=this.regexp?this.regexp.source:"",$=E.regexp?E.regexp.source:"";return this.key===E.key&&y===$}return!1}substituteConstants(){return this}evaluate(E){let y=E.getValue(this.key);return this.regexp?this.regexp.test(y):!1}serialize(){const E=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${E}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=we.create(this)),this.negated}}class we{constructor(E){this._actual=E,this.type=8}static create(E){return new we(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ne(re){let E=null;for(let y=0,$=re.length;y<$;y++){const Ae=re[y].substituteConstants();if(re[y]!==Ae&&E===null){E=[];for(let Ge=0;Ge<y;Ge++)E[Ge]=re[Ge]}E!==null&&(E[y]=Ae)}return E===null?re:E}class ve{constructor(E,y){this.expr=E,this.negated=y,this.type=6}static create(E,y){return ve._normalizeArr(E,y)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let y=0,$=this.expr.length;y<$;y++){const Ae=u(this.expr[y],E.expr[y]);if(Ae!==0)return Ae}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let y=0,$=this.expr.length;y<$;y++)if(!this.expr[y].equals(E.expr[y]))return!1;return!0}return!1}substituteConstants(){const E=ne(this.expr);return E===this.expr?this:ve.create(E,this.negated)}evaluate(E){for(let y=0,$=this.expr.length;y<$;y++)if(!this.expr[y].evaluate(E))return!1;return!0}static _normalizeArr(E,y){const $=[];let Ae=!1;for(const Ge of E)if(Ge){if(Ge.type===1){Ae=!0;continue}if(Ge.type===0)return J.INSTANCE;if(Ge.type===6){$.push(...Ge.expr);continue}$.push(Ge)}if($.length===0&&Ae)return D.INSTANCE;if($.length!==0){if($.length===1)return $[0];$.sort(u);for(let Ge=1;Ge<$.length;Ge++)$[Ge-1].equals($[Ge])&&($.splice(Ge,1),Ge--);if($.length===1)return $[0];for(;$.length>1;){const Ge=$[$.length-1];if(Ge.type!==9)break;$.pop();const Je=$.pop(),yt=$.length===0,dt=Oe.create(Ge.expr.map(Rt=>ve.create([Rt,Je],null)),null,yt);dt&&($.push(dt),$.sort(u))}return $.length===1?$[0]:new ve($,y)}}serialize(){return this.expr.map(E=>E.serialize()).join(" && ")}keys(){const E=[];for(let y of this.expr)E.push(...y.keys());return E}negate(){if(!this.negated){const E=[];for(let y of this.expr)E.push(y.negate());this.negated=Oe.create(E,this,!0)}return this.negated}}class Oe{constructor(E,y){this.expr=E,this.negated=y,this.type=9}static create(E,y,$){return Oe._normalizeArr(E,y,$)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let y=0,$=this.expr.length;y<$;y++){const Ae=u(this.expr[y],E.expr[y]);if(Ae!==0)return Ae}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let y=0,$=this.expr.length;y<$;y++)if(!this.expr[y].equals(E.expr[y]))return!1;return!0}return!1}substituteConstants(){const E=ne(this.expr);return E===this.expr?this:Oe.create(E,this.negated,!1)}evaluate(E){for(let y=0,$=this.expr.length;y<$;y++)if(this.expr[y].evaluate(E))return!0;return!1}static _normalizeArr(E,y,$){let Ae=[],Ge=!1;if(E){for(let Je=0,yt=E.length;Je<yt;Je++){const dt=E[Je];if(dt){if(dt.type===0){Ge=!0;continue}if(dt.type===1)return D.INSTANCE;if(dt.type===9){Ae=Ae.concat(dt.expr);continue}Ae.push(dt)}}if(Ae.length===0&&Ge)return J.INSTANCE;Ae.sort(u)}if(Ae.length!==0){if(Ae.length===1)return Ae[0];for(let Je=1;Je<Ae.length;Je++)Ae[Je-1].equals(Ae[Je])&&(Ae.splice(Je,1),Je--);if(Ae.length===1)return Ae[0];if($){for(let Je=0;Je<Ae.length;Je++)for(let yt=Je+1;yt<Ae.length;yt++)z(Ae[Je],Ae[yt])&&(Ae.splice(yt,1),yt--);if(Ae.length===1)return Ae[0]}return new Oe(Ae,y)}}serialize(){return this.expr.map(E=>E.serialize()).join(" || ")}keys(){const E=[];for(let y of this.expr)E.push(...y.keys());return E}negate(){if(!this.negated){let E=[];for(let y of this.expr)E.push(y.negate());for(;E.length>1;){const y=E.shift(),$=E.shift(),Ae=[];for(const Je of se(y))for(const yt of se($))Ae.push(ve.create([Je,yt],null));const Ge=E.length===0;E.unshift(Oe.create(Ae,null,Ge))}this.negated=E[0]}return this.negated}}class le extends B{constructor(E,y,$){super(E,null),this._defaultValue=y,typeof $=="object"?le._info.push(Object.assign(Object.assign({},$),{key:E})):$!==!0&&le._info.push({key:E,description:$,type:y!=null?typeof y:void 0})}static all(){return le._info.values()}bindTo(E){return E.createKey(this.key,this._defaultValue)}getValue(E){return E.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(E){return _.create(this.key,E)}}le._info=[];const Me=(0,Fe.yh)("contextKeyService"),Z="setContext";function I(re,E){return re<E?-1:re>E?1:0}function G(re,E,y,$){return re<y?-1:re>y?1:E<$?-1:E>$?1:0}function z(re,E){if(E.type===6&&re.type!==9&&re.type!==6){for(const Ae of E.expr)if(re.equals(Ae))return!0}const y=re.negate(),$=se(y).concat(se(E));$.sort(u);for(let Ae=0;Ae<$.length;Ae++){const Je=$[Ae].negate();for(let yt=Ae+1;yt<$.length;yt++){const dt=$[yt];if(Je.equals(dt))return!0}}return!1}function se(re){return re.type===9?re.expr:[re]}},16925:function(gr,mt,K){"use strict";K.d(mt,{I8:function(){return V},TG:function(){return me},jt:function(){return W},yh:function(){return he}});var V;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function ge(O){return O[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=ge})(V||(V={}));const me=he("instantiationService");function Fe(m,ge,O,u){ge[V.DI_TARGET]===ge?ge[V.DI_DEPENDENCIES].push({id:m,index:O,optional:u}):(ge[V.DI_DEPENDENCIES]=[{id:m,index:O,optional:u}],ge[V.DI_TARGET]=ge)}function he(m){if(V.serviceIds.has(m))return V.serviceIds.get(m);const ge=function(O,u,J){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Fe(ge,O,J,!1)};return ge.toString=()=>m,V.serviceIds.set(m,ge),ge}function W(m){return function(ge,O,u){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Fe(m,ge,u,!0)}}},44650:function(gr,mt,K){"use strict";K.d(mt,{B:function(){return he}});var V=K(76068),me=K(72999);class Fe{constructor(){this.data=new Map}add(m,ge){V.ok(me.HD(m)),V.ok(me.Kn(ge)),V.ok(!this.data.has(m),"There is already an extension with this id"),this.data.set(m,ge)}as(m){return this.data.get(m)||null}}const he=new Fe},66213:function(gr,mt,K){"use strict";K.d(mt,{e:function(){return V}});var V;(function(me){me.DARK="dark",me.LIGHT="light",me.HIGH_CONTRAST="hc"})(V||(V={}))},49055:function(gr,mt,K){"use strict";K.d(mt,{EN:function(){return u},IP:function(){return B},Ic:function(){return x},XE:function(){return ge},bB:function(){return Y},kS:function(){return J},m6:function(){return D}});var V=K(52615),me=K(4348),Fe=K(69323),he=K(16925),W=K(44650),m=K(66213);const ge=(0,he.yh)("themeService");var O;(function(M){function H(Q){return Q&&typeof Q=="object"&&typeof Q.id=="string"}M.isThemeColor=H})(O||(O={}));function u(M){return{id:M}}var J;(function(M){function H(we){return we&&typeof we=="object"&&typeof we.id=="string"&&(typeof we.color=="undefined"||O.isThemeColor(we.color))}M.isThemeIcon=H;const Q=new RegExp(`^\\$\\((${V.dT.iconNameExpression}(?:${V.dT.iconModifierExpression})?)\\)$`);function P(we){const ne=Q.exec(we);if(!ne)return;let[,ve]=ne;return{id:ve}}M.fromString=P;function X(we,ne){let ve=we.id;const Oe=ve.lastIndexOf("~");return Oe!==-1&&(ve=ve.substring(0,Oe)),ne&&(ve=`${ve}~${ne}`),{id:ve}}M.modify=X;function ce(we,ne){var ve,Oe;return we.id===ne.id&&((ve=we.color)===null||ve===void 0?void 0:ve.id)===((Oe=ne.color)===null||Oe===void 0?void 0:Oe.id)}M.isEqual=ce;function _e(we,ne){return{id:we.id,color:ne?u(ne):void 0}}M.asThemeIcon=_e,M.asClassNameArray=V.dT.asClassNameArray,M.asClassName=V.dT.asClassName,M.asCSSSelector=V.dT.asCSSSelector})(J||(J={}));function D(M){switch(M){case m.e.DARK:return"vs-dark";case m.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const B={ThemingContribution:"base.contributions.theming"};class _{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new me.Q5}onColorThemeChange(H){return this.themingParticipants.push(H),this.onThemingParticipantAddedEmitter.fire(H),(0,Fe.OF)(()=>{const Q=this.themingParticipants.indexOf(H);this.themingParticipants.splice(Q,1)})}getThemingParticipants(){return this.themingParticipants}}let w=new _;W.B.add(B.ThemingContribution,w);function x(M){return w.onColorThemeChange(M)}class Y extends Fe.JT{constructor(H){super(),this.themeService=H,this.theme=H.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(Q=>this.onThemeChange(Q)))}onThemeChange(H){this.theme=H,this.updateStyles()}updateStyles(){}}},16632:function(gr,mt,K){"use strict";var V=K(71409),me=K(89490),Fe=K(87075),he=K(11036),W=K(39224),m=K(92310),ge=K.n(m),O=K(18929),u=K(59301),J=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],D=(0,u.forwardRef)(function(B,_){var w=B.prefixCls,x=w===void 0?"rc-checkbox":w,Y=B.className,M=B.style,H=B.checked,Q=B.disabled,P=B.defaultChecked,X=P===void 0?!1:P,ce=B.type,_e=ce===void 0?"checkbox":ce,we=B.title,ne=B.onChange,ve=(0,W.Z)(B,J),Oe=(0,u.useRef)(null),le=(0,u.useRef)(null),Me=(0,O.Z)(X,{value:H}),Z=(0,he.Z)(Me,2),I=Z[0],G=Z[1];(0,u.useImperativeHandle)(_,function(){return{focus:function(E){var y;(y=Oe.current)===null||y===void 0||y.focus(E)},blur:function(){var E;(E=Oe.current)===null||E===void 0||E.blur()},input:Oe.current,nativeElement:le.current}});var z=ge()(x,Y,(0,Fe.Z)((0,Fe.Z)({},"".concat(x,"-checked"),I),"".concat(x,"-disabled"),Q)),se=function(E){Q||("checked"in B||G(E.target.checked),ne==null||ne({target:(0,me.Z)((0,me.Z)({},B),{},{type:_e,checked:E.target.checked}),stopPropagation:function(){E.stopPropagation()},preventDefault:function(){E.preventDefault()},nativeEvent:E.nativeEvent}))};return u.createElement("span",{className:z,title:we,style:M,ref:le},u.createElement("input",(0,V.Z)({},ve,{className:"".concat(x,"-input"),ref:Oe,onChange:se,disabled:Q,checked:!!I,type:_e})),u.createElement("span",{className:"".concat(x,"-inner")}))});mt.Z=D},96478:function(gr,mt,K){"use strict";K.d(mt,{Z:function(){return we}});var V=K(71409),me=K(87075),Fe=K(11036),he=K(39224),W=K(65352),m=K(92310),ge=K.n(m),O=K(8654),u=K(59301),J=K(10228),D=K(16089),B=J.Z.ESC,_=J.Z.TAB;function w(ne){var ve=ne.visible,Oe=ne.triggerRef,le=ne.onVisibleChange,Me=ne.autoFocus,Z=ne.overlayRef,I=u.useRef(!1),G=function(){if(ve){var E,y;(E=Oe.current)===null||E===void 0||(y=E.focus)===null||y===void 0||y.call(E),le==null||le(!1)}},z=function(){var E;return(E=Z.current)!==null&&E!==void 0&&E.focus?(Z.current.focus(),I.current=!0,!0):!1},se=function(E){switch(E.keyCode){case B:G();break;case _:{var y=!1;I.current||(y=z()),y?E.preventDefault():G();break}}};u.useEffect(function(){return ve?(window.addEventListener("keydown",se),Me&&(0,D.Z)(z,3),function(){window.removeEventListener("keydown",se),I.current=!1}):function(){I.current=!1}},[ve])}var x=(0,u.forwardRef)(function(ne,ve){var Oe=ne.overlay,le=ne.arrow,Me=ne.prefixCls,Z=(0,u.useMemo)(function(){var G;return typeof Oe=="function"?G=Oe():G=Oe,G},[Oe]),I=(0,O.sQ)(ve,(0,O.C4)(Z));return u.createElement(u.Fragment,null,le&&u.createElement("div",{className:"".concat(Me,"-arrow")}),u.cloneElement(Z,{ref:(0,O.Yr)(Z)?I:void 0}))}),Y=x,M={adjustX:1,adjustY:1},H=[0,0],Q={topLeft:{points:["bl","tl"],overflow:M,offset:[0,-4],targetOffset:H},top:{points:["bc","tc"],overflow:M,offset:[0,-4],targetOffset:H},topRight:{points:["br","tr"],overflow:M,offset:[0,-4],targetOffset:H},bottomLeft:{points:["tl","bl"],overflow:M,offset:[0,4],targetOffset:H},bottom:{points:["tc","bc"],overflow:M,offset:[0,4],targetOffset:H},bottomRight:{points:["tr","br"],overflow:M,offset:[0,4],targetOffset:H}},P=Q,X=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function ce(ne,ve){var Oe,le=ne.arrow,Me=le===void 0?!1:le,Z=ne.prefixCls,I=Z===void 0?"rc-dropdown":Z,G=ne.transitionName,z=ne.animation,se=ne.align,re=ne.placement,E=re===void 0?"bottomLeft":re,y=ne.placements,$=y===void 0?P:y,Ae=ne.getPopupContainer,Ge=ne.showAction,Je=ne.hideAction,yt=ne.overlayClassName,dt=ne.overlayStyle,Rt=ne.visible,bt=ne.trigger,ht=bt===void 0?["hover"]:bt,Le=ne.autoFocus,nt=ne.overlay,Ie=ne.children,wt=ne.onVisibleChange,Lt=(0,he.Z)(ne,X),Be=u.useState(),L=(0,Fe.Z)(Be,2),g=L[0],C=L[1],N="visible"in ne?Rt:g,T=u.useRef(null),k=u.useRef(null),ee=u.useRef(null);u.useImperativeHandle(ve,function(){return T.current});var be=function(Ne){C(Ne),wt==null||wt(Ne)};w({visible:N,triggerRef:ee,onVisibleChange:be,autoFocus:Le,overlayRef:k});var Ue=function(Ne){var Ze=ne.onOverlayClick;C(!1),Ze&&Ze(Ne)},Ye=function(){return u.createElement(Y,{ref:k,overlay:nt,prefixCls:I,arrow:Me})},We=function(){return typeof nt=="function"?Ye:Ye()},St=function(){var Ne=ne.minOverlayWidthMatchTrigger,Ze=ne.alignPoint;return"minOverlayWidthMatchTrigger"in ne?Ne:!Ze},Xe=function(){var Ne=ne.openClassName;return Ne!==void 0?Ne:"".concat(I,"-open")},ut=u.cloneElement(Ie,{className:ge()((Oe=Ie.props)===null||Oe===void 0?void 0:Oe.className,N&&Xe()),ref:(0,O.Yr)(Ie)?(0,O.sQ)(ee,(0,O.C4)(Ie)):void 0}),At=Je;return!At&&ht.indexOf("contextMenu")!==-1&&(At=["click"]),u.createElement(W.Z,(0,V.Z)({builtinPlacements:$},Lt,{prefixCls:I,ref:T,popupClassName:ge()(yt,(0,me.Z)({},"".concat(I,"-show-arrow"),Me)),popupStyle:dt,action:ht,showAction:Ge,hideAction:At,popupPlacement:E,popupAlign:se,popupTransitionName:G,popupAnimation:z,popupVisible:N,stretch:St()?"minWidth":"",popup:We(),onPopupVisibleChange:be,onPopupClick:Ue,getPopupContainer:Ae}),ut)}var _e=u.forwardRef(ce),we=_e},20922:function(gr,mt,K){"use strict";K.d(mt,{Z:function(){return ht}});var V=K(71409),me=K(87075),Fe=K(28788),he=K(11036),W=K(39224),m=K(16552),ge=K(19210);function O(){return typeof BigInt=="function"}function u(Le){return!Le&&Le!==0&&!Number.isNaN(Le)||!String(Le).trim()}function J(Le){var nt=Le.trim(),Ie=nt.startsWith("-");Ie&&(nt=nt.slice(1)),nt=nt.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),nt.startsWith(".")&&(nt="0".concat(nt));var wt=nt||"0",Lt=wt.split("."),Be=Lt[0]||"0",L=Lt[1]||"0";Be==="0"&&L==="0"&&(Ie=!1);var g=Ie?"-":"";return{negative:Ie,negativeStr:g,trimStr:wt,integerStr:Be,decimalStr:L,fullStr:"".concat(g).concat(wt)}}function D(Le){var nt=String(Le);return!Number.isNaN(Number(nt))&&nt.includes("e")}function B(Le){var nt=String(Le);if(D(Le)){var Ie=Number(nt.slice(nt.indexOf("e-")+2)),wt=nt.match(/\.(\d+)/);return wt!=null&&wt[1]&&(Ie+=wt[1].length),Ie}return nt.includes(".")&&w(nt)?nt.length-nt.indexOf(".")-1:0}function _(Le){var nt=String(Le);if(D(Le)){if(Le>Number.MAX_SAFE_INTEGER)return String(O()?BigInt(Le).toString():Number.MAX_SAFE_INTEGER);if(Le<Number.MIN_SAFE_INTEGER)return String(O()?BigInt(Le).toString():Number.MIN_SAFE_INTEGER);nt=Le.toFixed(B(nt))}return J(nt).fullStr}function w(Le){return typeof Le=="number"?!Number.isNaN(Le):Le?/^\s*-?\d+(\.\d+)?\s*$/.test(Le)||/^\s*-?\d+\.\s*$/.test(Le)||/^\s*-?\.\d+\s*$/.test(Le):!1}var x=function(){function Le(nt){if((0,m.Z)(this,Le),(0,me.Z)(this,"origin",""),(0,me.Z)(this,"negative",void 0),(0,me.Z)(this,"integer",void 0),(0,me.Z)(this,"decimal",void 0),(0,me.Z)(this,"decimalLen",void 0),(0,me.Z)(this,"empty",void 0),(0,me.Z)(this,"nan",void 0),u(nt)){this.empty=!0;return}if(this.origin=String(nt),nt==="-"||Number.isNaN(nt)){this.nan=!0;return}var Ie=nt;if(D(Ie)&&(Ie=Number(Ie)),Ie=typeof Ie=="string"?Ie:_(Ie),w(Ie)){var wt=J(Ie);this.negative=wt.negative;var Lt=wt.trimStr.split(".");this.integer=BigInt(Lt[0]);var Be=Lt[1]||"0";this.decimal=BigInt(Be),this.decimalLen=Be.length}else this.nan=!0}return(0,ge.Z)(Le,[{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(Ie){var wt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Ie,"0"));return BigInt(wt)}},{key:"negate",value:function(){var Ie=new Le(this.toString());return Ie.negative=!Ie.negative,Ie}},{key:"cal",value:function(Ie,wt,Lt){var Be=Math.max(this.getDecimalStr().length,Ie.getDecimalStr().length),L=this.alignDecimal(Be),g=Ie.alignDecimal(Be),C=wt(L,g).toString(),N=Lt(Be),T=J(C),k=T.negativeStr,ee=T.trimStr,be="".concat(k).concat(ee.padStart(N+1,"0"));return new Le("".concat(be.slice(0,-N),".").concat(be.slice(-N)))}},{key:"add",value:function(Ie){if(this.isInvalidate())return new Le(Ie);var wt=new Le(Ie);return wt.isInvalidate()?this:this.cal(wt,function(Lt,Be){return Lt+Be},function(Lt){return Lt})}},{key:"multi",value:function(Ie){var wt=new Le(Ie);return this.isInvalidate()||wt.isInvalidate()?new Le(NaN):this.cal(wt,function(Lt,Be){return Lt*Be},function(Lt){return Lt*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(Ie){return this.toString()===(Ie==null?void 0:Ie.toString())}},{key:"lessEquals",value:function(Ie){return this.add(Ie.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ie?this.isInvalidate()?"":J("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Le}(),Y=function(){function Le(nt){if((0,m.Z)(this,Le),(0,me.Z)(this,"origin",""),(0,me.Z)(this,"number",void 0),(0,me.Z)(this,"empty",void 0),u(nt)){this.empty=!0;return}this.origin=String(nt),this.number=Number(nt)}return(0,ge.Z)(Le,[{key:"negate",value:function(){return new Le(-this.toNumber())}},{key:"add",value:function(Ie){if(this.isInvalidate())return new Le(Ie);var wt=Number(Ie);if(Number.isNaN(wt))return this;var Lt=this.number+wt;if(Lt>Number.MAX_SAFE_INTEGER)return new Le(Number.MAX_SAFE_INTEGER);if(Lt<Number.MIN_SAFE_INTEGER)return new Le(Number.MIN_SAFE_INTEGER);var Be=Math.max(B(this.number),B(wt));return new Le(Lt.toFixed(Be))}},{key:"multi",value:function(Ie){var wt=Number(Ie);if(this.isInvalidate()||Number.isNaN(wt))return new Le(NaN);var Lt=this.number*wt;if(Lt>Number.MAX_SAFE_INTEGER)return new Le(Number.MAX_SAFE_INTEGER);if(Lt<Number.MIN_SAFE_INTEGER)return new Le(Number.MIN_SAFE_INTEGER);var Be=Math.max(B(this.number),B(wt));return new Le(Lt.toFixed(Be))}},{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(Ie){return this.toNumber()===(Ie==null?void 0:Ie.toNumber())}},{key:"lessEquals",value:function(Ie){return this.add(Ie.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ie?this.isInvalidate()?"":_(this.number):this.origin}}]),Le}();function M(Le){return O()?new x(Le):new Y(Le)}function H(Le,nt,Ie){var wt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Le==="")return"";var Lt=J(Le),Be=Lt.negativeStr,L=Lt.integerStr,g=Lt.decimalStr,C="".concat(nt).concat(g),N="".concat(Be).concat(L);if(Ie>=0){var T=Number(g[Ie]);if(T>=5&&!wt){var k=M(Le).add("".concat(Be,"0.").concat("0".repeat(Ie)).concat(10-T));return H(k.toString(),nt,Ie,wt)}return Ie===0?N:"".concat(N).concat(nt).concat(g.padEnd(Ie,"0").slice(0,Ie))}return C===".0"?N:"".concat(N).concat(C)}var Q=M,P=K(92310),X=K.n(P),ce=K(36901),_e=K(34280);function we(Le,nt){return typeof Proxy!="undefined"&&Le?new Proxy(Le,{get:function(wt,Lt){if(nt[Lt])return nt[Lt];var Be=wt[Lt];return typeof Be=="function"?Be.bind(wt):Be}}):Le}var ne=K(8654),ve=K(59301),Oe=K(48736);function le(Le,nt){var Ie=(0,ve.useRef)(null);function wt(){try{var Be=Le.selectionStart,L=Le.selectionEnd,g=Le.value,C=g.substring(0,Be),N=g.substring(L);Ie.current={start:Be,end:L,value:g,beforeTxt:C,afterTxt:N}}catch(T){}}function Lt(){if(Le&&Ie.current&&nt)try{var Be=Le.value,L=Ie.current,g=L.beforeTxt,C=L.afterTxt,N=L.start,T=Be.length;if(Be.startsWith(g))T=g.length;else if(Be.endsWith(C))T=Be.length-Ie.current.afterTxt.length;else{var k=g[N-1],ee=Be.indexOf(k,N-1);ee!==-1&&(T=ee+1)}Le.setSelectionRange(T,T)}catch(be){(0,Oe.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(be.message))}}return[wt,Lt]}var Me=K(49658),Z=function(){var nt=(0,ve.useState)(!1),Ie=(0,he.Z)(nt,2),wt=Ie[0],Lt=Ie[1];return(0,_e.Z)(function(){Lt((0,Me.Z)())},[]),wt},I=Z,G=K(16089),z=200,se=600;function re(Le){var nt=Le.prefixCls,Ie=Le.upNode,wt=Le.downNode,Lt=Le.upDisabled,Be=Le.downDisabled,L=Le.onStep,g=ve.useRef(),C=ve.useRef([]),N=ve.useRef();N.current=L;var T=function(){clearTimeout(g.current)},k=function(ut,At){ut.preventDefault(),T(),N.current(At);function it(){N.current(At),g.current=setTimeout(it,z)}g.current=setTimeout(it,se)};ve.useEffect(function(){return function(){T(),C.current.forEach(function(Xe){return G.Z.cancel(Xe)})}},[]);var ee=I();if(ee)return null;var be="".concat(nt,"-handler"),Ue=X()(be,"".concat(be,"-up"),(0,me.Z)({},"".concat(be,"-up-disabled"),Lt)),Ye=X()(be,"".concat(be,"-down"),(0,me.Z)({},"".concat(be,"-down-disabled"),Be)),We=function(){return C.current.push((0,G.Z)(T))},St={unselectable:"on",role:"button",onMouseUp:We,onMouseLeave:We};return ve.createElement("div",{className:"".concat(be,"-wrap")},ve.createElement("span",(0,V.Z)({},St,{onMouseDown:function(ut){k(ut,!0)},"aria-label":"Increase Value","aria-disabled":Lt,className:Ue}),Ie||ve.createElement("span",{unselectable:"on",className:"".concat(nt,"-handler-up-inner")})),ve.createElement("span",(0,V.Z)({},St,{onMouseDown:function(ut){k(ut,!1)},"aria-label":"Decrease Value","aria-disabled":Be,className:Ye}),wt||ve.createElement("span",{unselectable:"on",className:"".concat(nt,"-handler-down-inner")})))}function E(Le){var nt=typeof Le=="number"?_(Le):J(Le).fullStr,Ie=nt.includes(".");return Ie?J(nt.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Le+"0"}var y=K(30292),$=function(){var Le=(0,ve.useRef)(0),nt=function(){G.Z.cancel(Le.current)};return(0,ve.useEffect)(function(){return nt},[]),function(Ie){nt(),Le.current=(0,G.Z)(function(){Ie()})}},Ae=["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"],Ge=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],Je=function(nt,Ie){return nt||Ie.isEmpty()?Ie.toString():Ie.toNumber()},yt=function(nt){var Ie=Q(nt);return Ie.isInvalidate()?null:Ie},dt=ve.forwardRef(function(Le,nt){var Ie=Le.prefixCls,wt=Le.className,Lt=Le.style,Be=Le.min,L=Le.max,g=Le.step,C=g===void 0?1:g,N=Le.defaultValue,T=Le.value,k=Le.disabled,ee=Le.readOnly,be=Le.upHandler,Ue=Le.downHandler,Ye=Le.keyboard,We=Le.changeOnWheel,St=We===void 0?!1:We,Xe=Le.controls,ut=Xe===void 0?!0:Xe,At=Le.classNames,it=Le.stringMode,Ne=Le.parser,Ze=Le.formatter,lt=Le.precision,vt=Le.decimalSeparator,Ot=Le.onChange,Ct=Le.onInput,Wt=Le.onPressEnter,Nt=Le.onStep,Xt=Le.changeOnBlur,fr=Xt===void 0?!0:Xt,Rr=Le.domRef,It=(0,W.Z)(Le,Ae),jt="".concat(Ie,"-input"),Re=ve.useRef(null),Ce=ve.useState(!1),Ee=(0,he.Z)(Ce,2),j=Ee[0],ie=Ee[1],ae=ve.useRef(!1),de=ve.useRef(!1),Se=ve.useRef(!1),xt=ve.useState(function(){return Q(T!=null?T:N)}),gt=(0,he.Z)(xt,2),qe=gt[0],Ht=gt[1];function Cr(tt){T===void 0&&Ht(tt)}var Nr=ve.useCallback(function(tt,ot){if(!ot)return lt>=0?lt:Math.max(B(tt),B(C))},[lt,C]),Gt=ve.useCallback(function(tt){var ot=String(tt);if(Ne)return Ne(ot);var Ut=ot;return vt&&(Ut=Ut.replace(vt,".")),Ut.replace(/[^\w.-]+/g,"")},[Ne,vt]),Kt=ve.useRef(""),Sr=ve.useCallback(function(tt,ot){if(Ze)return Ze(tt,{userTyping:ot,input:String(Kt.current)});var Ut=typeof tt=="number"?_(tt):tt;if(!ot){var Zt=Nr(Ut,ot);if(w(Ut)&&(vt||Zt>=0)){var Ar=vt||".";Ut=H(Ut,Ar,Zt)}}return Ut},[Ze,Nr,vt]),$r=ve.useState(function(){var tt=N!=null?N:T;return qe.isInvalidate()&&["string","number"].includes((0,Fe.Z)(tt))?Number.isNaN(tt)?"":tt:Sr(qe.toString(),!1)}),De=(0,he.Z)($r,2),Ir=De[0],Er=De[1];Kt.current=Ir;function Br(tt,ot){Er(Sr(tt.isInvalidate()?tt.toString(!1):tt.toString(!ot),ot))}var vn=ve.useMemo(function(){return yt(L)},[L,lt]),Or=ve.useMemo(function(){return yt(Be)},[Be,lt]),Jr=ve.useMemo(function(){return!vn||!qe||qe.isInvalidate()?!1:vn.lessEquals(qe)},[vn,qe]),An=ve.useMemo(function(){return!Or||!qe||qe.isInvalidate()?!1:qe.lessEquals(Or)},[Or,qe]),Cn=le(Re.current,j),an=(0,he.Z)(Cn,2),Rn=an[0],Pr=an[1],Qn=function(ot){return vn&&!ot.lessEquals(vn)?vn:Or&&!Or.lessEquals(ot)?Or:null},Mr=function(ot){return!Qn(ot)},en=function(ot,Ut){var Zt=ot,Ar=Mr(Zt)||Zt.isEmpty();if(!Zt.isEmpty()&&!Ut&&(Zt=Qn(Zt)||Zt,Ar=!0),!ee&&!k&&Ar){var yr=Zt.toString(),hr=Nr(yr,Ut);return hr>=0&&(Zt=Q(H(yr,".",hr)),Mr(Zt)||(Zt=Q(H(yr,".",hr,!0)))),Zt.equals(qe)||(Cr(Zt),Ot==null||Ot(Zt.isEmpty()?null:Je(it,Zt)),T===void 0&&Br(Zt,Ut)),Zt}return qe},Dn=$(),br=function tt(ot){if(Rn(),Kt.current=ot,Er(ot),!de.current){var Ut=Gt(ot),Zt=Q(Ut);Zt.isNaN()||en(Zt,!0)}Ct==null||Ct(ot),Dn(function(){var Ar=ot;Ne||(Ar=ot.replace(/。/g,".")),Ar!==ot&&tt(Ar)})},jn=function(){de.current=!0},on=function(){de.current=!1,br(Re.current.value)},lr=function(ot){br(ot.target.value)},_r=function(ot){var Ut;if(!(ot&&Jr||!ot&&An)){ae.current=!1;var Zt=Q(Se.current?E(C):C);ot||(Zt=Zt.negate());var Ar=(qe||Q(0)).add(Zt.toString()),yr=en(Ar,!1);Nt==null||Nt(Je(it,yr),{offset:Se.current?E(C):C,type:ot?"up":"down"}),(Ut=Re.current)===null||Ut===void 0||Ut.focus()}},ke=function(ot){var Ut=Q(Gt(Ir)),Zt;Ut.isNaN()?Zt=en(qe,ot):Zt=en(Ut,ot),T!==void 0?Br(qe,!1):Zt.isNaN()||Br(Zt,!1)},ze=function(){ae.current=!0},_t=function(ot){var Ut=ot.key,Zt=ot.shiftKey;ae.current=!0,Se.current=Zt,Ut==="Enter"&&(de.current||(ae.current=!1),ke(!1),Wt==null||Wt(ot)),Ye!==!1&&!de.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Ut)&&(_r(Ut==="Up"||Ut==="ArrowUp"),ot.preventDefault())},at=function(){ae.current=!1,Se.current=!1};ve.useEffect(function(){if(St&&j){var tt=function(Zt){_r(Zt.deltaY<0),Zt.preventDefault()},ot=Re.current;if(ot)return ot.addEventListener("wheel",tt,{passive:!1}),function(){return ot.removeEventListener("wheel",tt)}}});var Tt=function(){fr&&ke(!1),ie(!1),ae.current=!1};return(0,_e.o)(function(){qe.isInvalidate()||Br(qe,!1)},[lt,Ze]),(0,_e.o)(function(){var tt=Q(T);Ht(tt);var ot=Q(Gt(Ir));(!tt.equals(ot)||!ae.current||Ze)&&Br(tt,ae.current)},[T]),(0,_e.o)(function(){Ze&&Pr()},[Ir]),ve.createElement("div",{ref:Rr,className:X()(Ie,wt,(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(Ie,"-focused"),j),"".concat(Ie,"-disabled"),k),"".concat(Ie,"-readonly"),ee),"".concat(Ie,"-not-a-number"),qe.isNaN()),"".concat(Ie,"-out-of-range"),!qe.isInvalidate()&&!Mr(qe))),style:Lt,onFocus:function(){ie(!0)},onBlur:Tt,onKeyDown:_t,onKeyUp:at,onCompositionStart:jn,onCompositionEnd:on,onBeforeInput:ze},ut&&ve.createElement(re,{prefixCls:Ie,upNode:be,downNode:Ue,upDisabled:Jr,downDisabled:An,onStep:_r}),ve.createElement("div",{className:"".concat(jt,"-wrap")},ve.createElement("input",(0,V.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Be,"aria-valuemax":L,"aria-valuenow":qe.isInvalidate()?null:qe.toString(),step:C},It,{ref:(0,ne.sQ)(Re,nt),className:jt,value:Ir,onChange:lr,disabled:k,readOnly:ee}))))}),Rt=ve.forwardRef(function(Le,nt){var Ie=Le.disabled,wt=Le.style,Lt=Le.prefixCls,Be=Lt===void 0?"rc-input-number":Lt,L=Le.value,g=Le.prefix,C=Le.suffix,N=Le.addonBefore,T=Le.addonAfter,k=Le.className,ee=Le.classNames,be=(0,W.Z)(Le,Ge),Ue=ve.useRef(null),Ye=ve.useRef(null),We=ve.useRef(null),St=function(ut){We.current&&(0,y.nH)(We.current,ut)};return ve.useImperativeHandle(nt,function(){return we(We.current,{focus:St,nativeElement:Ue.current.nativeElement||Ye.current})}),ve.createElement(ce.BaseInput,{className:k,triggerFocus:St,prefixCls:Be,value:L,disabled:Ie,style:wt,prefix:g,suffix:C,addonAfter:T,addonBefore:N,classNames:ee,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:Ue},ve.createElement(dt,(0,V.Z)({prefixCls:Be,disabled:Ie,ref:We,domRef:Ye,className:ee==null?void 0:ee.input},be)))}),bt=Rt,ht=bt},66003:function(gr,mt,K){"use strict";K.d(mt,{Z:function(){return ge}});var V=K(39224),me=K(89490),Fe=K(28788),he=K(59301),W=["show"];function m(O,u){if(!u.max)return!0;var J=u.strategy(O);return J<=u.max}function ge(O,u){return he.useMemo(function(){var J={};u&&(J.show=(0,Fe.Z)(u)==="object"&&u.formatter?u.formatter:!!u),J=(0,me.Z)((0,me.Z)({},J),O);var D=J,B=D.show,_=(0,V.Z)(D,W);return(0,me.Z)((0,me.Z)({},_),{},{show:!!B,showFormatter:typeof B=="function"?B:void 0,strategy:_.strategy||function(w){return w.length}})},[O,u])}},36901:function(gr,mt,K){"use strict";K.r(mt),K.d(mt,{BaseInput:function(){return J},default:function(){return P}});var V=K(89490),me=K(71409),Fe=K(87075),he=K(28788),W=K(92310),m=K.n(W),ge=K(59301),O=K(30292),u=ge.forwardRef(function(X,ce){var _e,we,ne,ve=X.inputElement,Oe=X.children,le=X.prefixCls,Me=X.prefix,Z=X.suffix,I=X.addonBefore,G=X.addonAfter,z=X.className,se=X.style,re=X.disabled,E=X.readOnly,y=X.focused,$=X.triggerFocus,Ae=X.allowClear,Ge=X.value,Je=X.handleReset,yt=X.hidden,dt=X.classes,Rt=X.classNames,bt=X.dataAttrs,ht=X.styles,Le=X.components,nt=X.onClear,Ie=Oe!=null?Oe:ve,wt=(Le==null?void 0:Le.affixWrapper)||"span",Lt=(Le==null?void 0:Le.groupWrapper)||"span",Be=(Le==null?void 0:Le.wrapper)||"span",L=(Le==null?void 0:Le.groupAddon)||"span",g=(0,ge.useRef)(null),C=function(vt){var Ot;(Ot=g.current)!==null&&Ot!==void 0&&Ot.contains(vt.target)&&($==null||$())},N=(0,O.X3)(X),T=(0,ge.cloneElement)(Ie,{value:Ge,className:m()((_e=Ie.props)===null||_e===void 0?void 0:_e.className,!N&&(Rt==null?void 0:Rt.variant))||null}),k=(0,ge.useRef)(null);if(ge.useImperativeHandle(ce,function(){return{nativeElement:k.current||g.current}}),N){var ee=null;if(Ae){var be=!re&&!E&&Ge,Ue="".concat(le,"-clear-icon"),Ye=(0,he.Z)(Ae)==="object"&&Ae!==null&&Ae!==void 0&&Ae.clearIcon?Ae.clearIcon:"\u2716";ee=ge.createElement("button",{type:"button",tabIndex:-1,onClick:function(vt){Je==null||Je(vt),nt==null||nt()},onMouseDown:function(vt){return vt.preventDefault()},className:m()(Ue,(0,Fe.Z)((0,Fe.Z)({},"".concat(Ue,"-hidden"),!be),"".concat(Ue,"-has-suffix"),!!Z))},Ye)}var We="".concat(le,"-affix-wrapper"),St=m()(We,(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},"".concat(le,"-disabled"),re),"".concat(We,"-disabled"),re),"".concat(We,"-focused"),y),"".concat(We,"-readonly"),E),"".concat(We,"-input-with-clear-btn"),Z&&Ae&&Ge),dt==null?void 0:dt.affixWrapper,Rt==null?void 0:Rt.affixWrapper,Rt==null?void 0:Rt.variant),Xe=(Z||Ae)&&ge.createElement("span",{className:m()("".concat(le,"-suffix"),Rt==null?void 0:Rt.suffix),style:ht==null?void 0:ht.suffix},ee,Z);T=ge.createElement(wt,(0,me.Z)({className:St,style:ht==null?void 0:ht.affixWrapper,onClick:C},bt==null?void 0:bt.affixWrapper,{ref:g}),Me&&ge.createElement("span",{className:m()("".concat(le,"-prefix"),Rt==null?void 0:Rt.prefix),style:ht==null?void 0:ht.prefix},Me),T,Xe)}if((0,O.He)(X)){var ut="".concat(le,"-group"),At="".concat(ut,"-addon"),it="".concat(ut,"-wrapper"),Ne=m()("".concat(le,"-wrapper"),ut,dt==null?void 0:dt.wrapper,Rt==null?void 0:Rt.wrapper),Ze=m()(it,(0,Fe.Z)({},"".concat(it,"-disabled"),re),dt==null?void 0:dt.group,Rt==null?void 0:Rt.groupWrapper);T=ge.createElement(Lt,{className:Ze,ref:k},ge.createElement(Be,{className:Ne},I&&ge.createElement(L,{className:At},I),T,G&&ge.createElement(L,{className:At},G)))}return ge.cloneElement(T,{className:m()((we=T.props)===null||we===void 0?void 0:we.className,z)||null,style:(0,V.Z)((0,V.Z)({},(ne=T.props)===null||ne===void 0?void 0:ne.style),se),hidden:yt})}),J=u,D=K(62730),B=K(11036),_=K(39224),w=K(18929),x=K(2738),Y=K(66003),M=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],H=(0,ge.forwardRef)(function(X,ce){var _e=X.autoComplete,we=X.onChange,ne=X.onFocus,ve=X.onBlur,Oe=X.onPressEnter,le=X.onKeyDown,Me=X.onKeyUp,Z=X.prefixCls,I=Z===void 0?"rc-input":Z,G=X.disabled,z=X.htmlSize,se=X.className,re=X.maxLength,E=X.suffix,y=X.showCount,$=X.count,Ae=X.type,Ge=Ae===void 0?"text":Ae,Je=X.classes,yt=X.classNames,dt=X.styles,Rt=X.onCompositionStart,bt=X.onCompositionEnd,ht=(0,_.Z)(X,M),Le=(0,ge.useState)(!1),nt=(0,B.Z)(Le,2),Ie=nt[0],wt=nt[1],Lt=(0,ge.useRef)(!1),Be=(0,ge.useRef)(!1),L=(0,ge.useRef)(null),g=(0,ge.useRef)(null),C=function(jt){L.current&&(0,O.nH)(L.current,jt)},N=(0,w.Z)(X.defaultValue,{value:X.value}),T=(0,B.Z)(N,2),k=T[0],ee=T[1],be=k==null?"":String(k),Ue=(0,ge.useState)(null),Ye=(0,B.Z)(Ue,2),We=Ye[0],St=Ye[1],Xe=(0,Y.Z)($,y),ut=Xe.max||re,At=Xe.strategy(be),it=!!ut&&At>ut;(0,ge.useImperativeHandle)(ce,function(){var It;return{focus:C,blur:function(){var Re;(Re=L.current)===null||Re===void 0||Re.blur()},setSelectionRange:function(Re,Ce,Ee){var j;(j=L.current)===null||j===void 0||j.setSelectionRange(Re,Ce,Ee)},select:function(){var Re;(Re=L.current)===null||Re===void 0||Re.select()},input:L.current,nativeElement:((It=g.current)===null||It===void 0?void 0:It.nativeElement)||L.current}}),(0,ge.useEffect)(function(){Be.current&&(Be.current=!1),wt(function(It){return It&&G?!1:It})},[G]);var Ne=function(jt,Re,Ce){var Ee=Re;if(!Lt.current&&Xe.exceedFormatter&&Xe.max&&Xe.strategy(Re)>Xe.max){if(Ee=Xe.exceedFormatter(Re,{max:Xe.max}),Re!==Ee){var j,ie;St([((j=L.current)===null||j===void 0?void 0:j.selectionStart)||0,((ie=L.current)===null||ie===void 0?void 0:ie.selectionEnd)||0])}}else if(Ce.source==="compositionEnd")return;ee(Ee),L.current&&(0,O.rJ)(L.current,jt,we,Ee)};(0,ge.useEffect)(function(){if(We){var It;(It=L.current)===null||It===void 0||It.setSelectionRange.apply(It,(0,D.Z)(We))}},[We]);var Ze=function(jt){Ne(jt,jt.target.value,{source:"change"})},lt=function(jt){Lt.current=!1,Ne(jt,jt.currentTarget.value,{source:"compositionEnd"}),bt==null||bt(jt)},vt=function(jt){Oe&&jt.key==="Enter"&&!Be.current&&(Be.current=!0,Oe(jt)),le==null||le(jt)},Ot=function(jt){jt.key==="Enter"&&(Be.current=!1),Me==null||Me(jt)},Ct=function(jt){wt(!0),ne==null||ne(jt)},Wt=function(jt){Be.current&&(Be.current=!1),wt(!1),ve==null||ve(jt)},Nt=function(jt){ee(""),C(),L.current&&(0,O.rJ)(L.current,jt,we)},Xt=it&&"".concat(I,"-out-of-range"),fr=function(){var jt=(0,x.Z)(X,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ge.createElement("input",(0,me.Z)({autoComplete:_e},jt,{onChange:Ze,onFocus:Ct,onBlur:Wt,onKeyDown:vt,onKeyUp:Ot,className:m()(I,(0,Fe.Z)({},"".concat(I,"-disabled"),G),yt==null?void 0:yt.input),style:dt==null?void 0:dt.input,ref:L,size:z,type:Ge,onCompositionStart:function(Ce){Lt.current=!0,Rt==null||Rt(Ce)},onCompositionEnd:lt}))},Rr=function(){var jt=Number(ut)>0;if(E||Xe.show){var Re=Xe.showFormatter?Xe.showFormatter({value:be,count:At,maxLength:ut}):"".concat(At).concat(jt?" / ".concat(ut):"");return ge.createElement(ge.Fragment,null,Xe.show&&ge.createElement("span",{className:m()("".concat(I,"-show-count-suffix"),(0,Fe.Z)({},"".concat(I,"-show-count-has-suffix"),!!E),yt==null?void 0:yt.count),style:(0,V.Z)({},dt==null?void 0:dt.count)},Re),E)}return null};return ge.createElement(J,(0,me.Z)({},ht,{prefixCls:I,className:m()(se,Xt),handleReset:Nt,value:be,focused:Ie,triggerFocus:C,suffix:Rr(),disabled:G,classes:Je,classNames:yt,styles:dt}),fr())}),Q=H,P=Q},30292:function(gr,mt,K){"use strict";K.d(mt,{He:function(){return V},X3:function(){return me},nH:function(){return W},rJ:function(){return he}});function V(m){return!!(m.addonBefore||m.addonAfter)}function me(m){return!!(m.prefix||m.suffix||m.allowClear)}function Fe(m,ge,O){var u=ge.cloneNode(!0),J=Object.create(m,{target:{value:u},currentTarget:{value:u}});return u.value=O,typeof ge.selectionStart=="number"&&typeof ge.selectionEnd=="number"&&(u.selectionStart=ge.selectionStart,u.selectionEnd=ge.selectionEnd),u.setSelectionRange=function(){ge.setSelectionRange.apply(ge,arguments)},J}function he(m,ge,O,u){if(O){var J=ge;if(ge.type==="click"){J=Fe(ge,m,""),O(J);return}if(m.type!=="file"&&u!==void 0){J=Fe(ge,m,u),O(J);return}O(J)}}function W(m,ge){if(m){m.focus(ge);var O=ge||{},u=O.cursor;if(u){var J=m.value.length;switch(u){case"start":m.setSelectionRange(0,0);break;case"end":m.setSelectionRange(J,J);break;default:m.setSelectionRange(0,J)}}}}},28321:function(gr,mt,K){"use strict";K.d(mt,{iz:function(){return An},ck:function(){return Ee},BW:function(){return Pr},sN:function(){return Ee},Wd:function(){return Or},ZP:function(){return _r},Xl:function(){return Oe}});var V=K(71409),me=K(87075),Fe=K(89490),he=K(62730),W=K(11036),m=K(39224),ge=K(92310),O=K.n(ge),u=K(11780),J=K(18929),D=K(13697),B=K(48736),_=K(59301),w=K(4676),x=_.createContext(null);function Y(ke,ze){return ke===void 0?null:"".concat(ke,"-").concat(ze)}function M(ke){var ze=_.useContext(x);return Y(ze,ke)}var H=K(80547),Q=["children","locked"],P=_.createContext(null);function X(ke,ze){var _t=(0,Fe.Z)({},ke);return Object.keys(ze).forEach(function(at){var Tt=ze[at];Tt!==void 0&&(_t[at]=Tt)}),_t}function ce(ke){var ze=ke.children,_t=ke.locked,at=(0,m.Z)(ke,Q),Tt=_.useContext(P),tt=(0,H.Z)(function(){return X(Tt,at)},[Tt,at],function(ot,Ut){return!_t&&(ot[0]!==Ut[0]||!(0,D.Z)(ot[1],Ut[1],!0))});return _.createElement(P.Provider,{value:tt},ze)}var _e=[],we=_.createContext(null);function ne(){return _.useContext(we)}var ve=_.createContext(_e);function Oe(ke){var ze=_.useContext(ve);return _.useMemo(function(){return ke!==void 0?[].concat((0,he.Z)(ze),[ke]):ze},[ze,ke])}var le=_.createContext(null),Me=_.createContext({}),Z=Me,I=K(29194);function G(ke){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,I.Z)(ke)){var _t=ke.nodeName.toLowerCase(),at=["input","select","textarea","button"].includes(_t)||ke.isContentEditable||_t==="a"&&!!ke.getAttribute("href"),Tt=ke.getAttribute("tabindex"),tt=Number(Tt),ot=null;return Tt&&!Number.isNaN(tt)?ot=tt:at&&ot===null&&(ot=0),at&&ke.disabled&&(ot=null),ot!==null&&(ot>=0||ze&&ot<0)}return!1}function z(ke){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_t=(0,he.Z)(ke.querySelectorAll("*")).filter(function(at){return G(at,ze)});return G(ke,ze)&&_t.unshift(ke),_t}var se=null;function re(){se=document.activeElement}function E(){se=null}function y(){if(se)try{se.focus()}catch(ke){}}function $(ke,ze){if(ze.keyCode===9){var _t=z(ke),at=_t[ze.shiftKey?0:_t.length-1],Tt=at===document.activeElement||ke===document.activeElement;if(Tt){var tt=_t[ze.shiftKey?_t.length-1:0];tt.focus(),ze.preventDefault()}}}var Ae=K(10228),Ge=K(16089),Je=Ae.Z.LEFT,yt=Ae.Z.RIGHT,dt=Ae.Z.UP,Rt=Ae.Z.DOWN,bt=Ae.Z.ENTER,ht=Ae.Z.ESC,Le=Ae.Z.HOME,nt=Ae.Z.END,Ie=[dt,Rt,Je,yt];function wt(ke,ze,_t,at){var Tt,tt="prev",ot="next",Ut="children",Zt="parent";if(ke==="inline"&&at===bt)return{inlineTrigger:!0};var Ar=(0,me.Z)((0,me.Z)({},dt,tt),Rt,ot),yr=(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},Je,_t?ot:tt),yt,_t?tt:ot),Rt,Ut),bt,Ut),hr=(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},dt,tt),Rt,ot),bt,Ut),ht,Zt),Je,_t?Ut:Zt),yt,_t?Zt:Ut),Tr={inline:Ar,horizontal:yr,vertical:hr,inlineSub:Ar,horizontalSub:hr,verticalSub:hr},U=(Tt=Tr["".concat(ke).concat(ze?"":"Sub")])===null||Tt===void 0?void 0:Tt[at];switch(U){case tt:return{offset:-1,sibling:!0};case ot:return{offset:1,sibling:!0};case Zt:return{offset:-1,sibling:!1};case Ut:return{offset:1,sibling:!1};default:return null}}function Lt(ke){for(var ze=ke;ze;){if(ze.getAttribute("data-menu-list"))return ze;ze=ze.parentElement}return null}function Be(ke,ze){for(var _t=ke||document.activeElement;_t;){if(ze.has(_t))return _t;_t=_t.parentElement}return null}function L(ke,ze){var _t=z(ke,!0);return _t.filter(function(at){return ze.has(at)})}function g(ke,ze,_t){var at=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!ke)return null;var Tt=L(ke,ze),tt=Tt.length,ot=Tt.findIndex(function(Ut){return _t===Ut});return at<0?ot===-1?ot=tt-1:ot-=1:at>0&&(ot+=1),ot=(ot+tt)%tt,Tt[ot]}var C=function(ze,_t){var at=new Set,Tt=new Map,tt=new Map;return ze.forEach(function(ot){var Ut=document.querySelector("[data-menu-id='".concat(Y(_t,ot),"']"));Ut&&(at.add(Ut),tt.set(Ut,ot),Tt.set(ot,Ut))}),{elements:at,key2element:Tt,element2key:tt}};function N(ke,ze,_t,at,Tt,tt,ot,Ut,Zt,Ar){var yr=_.useRef(),hr=_.useRef();hr.current=ze;var Tr=function(){Ge.Z.cancel(yr.current)};return _.useEffect(function(){return function(){Tr()}},[]),function(U){var R=U.which;if([].concat(Ie,[bt,ht,Le,nt]).includes(R)){var q=tt(),ue=C(q,at),Qe=ue,He=Qe.elements,rt=Qe.key2element,et=Qe.element2key,Ft=rt.get(ze),pt=Be(Ft,He),ye=et.get(pt),je=wt(ke,ot(ye,!0).length===1,_t,R);if(!je&&R!==Le&&R!==nt)return;(Ie.includes(R)||[Le,nt].includes(R))&&U.preventDefault();var ct=function($t){if($t){var mr=$t,ur=$t.querySelector("a");ur!=null&&ur.getAttribute("href")&&(mr=ur);var Dr=et.get($t);Ut(Dr),Tr(),yr.current=(0,Ge.Z)(function(){hr.current===Dr&&mr.focus()})}};if([Le,nt].includes(R)||je.sibling||!pt){var zt;!pt||ke==="inline"?zt=Tt.current:zt=Lt(pt);var Vt,Et=L(zt,He);R===Le?Vt=Et[0]:R===nt?Vt=Et[Et.length-1]:Vt=g(zt,He,pt,je.offset),ct(Vt)}else if(je.inlineTrigger)Zt(ye);else if(je.offset>0)Zt(ye,!0),Tr(),yr.current=(0,Ge.Z)(function(){ue=C(q,at);var ir=pt.getAttribute("aria-controls"),$t=document.getElementById(ir),mr=g($t,ue.elements);ct(mr)},5);else if(je.offset<0){var Mt=ot(ye,!0),Yt=Mt[Mt.length-2],sr=rt.get(Yt);Zt(Yt,!1),ct(sr)}}Ar==null||Ar(U)}}function T(ke){Promise.resolve().then(ke)}var k="__RC_UTIL_PATH_SPLIT__",ee=function(ze){return ze.join(k)},be=function(ze){return ze.split(k)},Ue="rc-menu-more";function Ye(){var ke=_.useState({}),ze=(0,W.Z)(ke,2),_t=ze[1],at=(0,_.useRef)(new Map),Tt=(0,_.useRef)(new Map),tt=_.useState([]),ot=(0,W.Z)(tt,2),Ut=ot[0],Zt=ot[1],Ar=(0,_.useRef)(0),yr=(0,_.useRef)(!1),hr=function(){yr.current||_t({})},Tr=(0,_.useCallback)(function(rt,et){var Ft=ee(et);Tt.current.set(Ft,rt),at.current.set(rt,Ft),Ar.current+=1;var pt=Ar.current;T(function(){pt===Ar.current&&hr()})},[]),U=(0,_.useCallback)(function(rt,et){var Ft=ee(et);Tt.current.delete(Ft),at.current.delete(rt)},[]),R=(0,_.useCallback)(function(rt){Zt(rt)},[]),q=(0,_.useCallback)(function(rt,et){var Ft=at.current.get(rt)||"",pt=be(Ft);return et&&Ut.includes(pt[0])&&pt.unshift(Ue),pt},[Ut]),ue=(0,_.useCallback)(function(rt,et){return rt.filter(function(Ft){return Ft!==void 0}).some(function(Ft){var pt=q(Ft,!0);return pt.includes(et)})},[q]),Qe=function(){var et=(0,he.Z)(at.current.keys());return Ut.length&&et.push(Ue),et},He=(0,_.useCallback)(function(rt){var et="".concat(at.current.get(rt)).concat(k),Ft=new Set;return(0,he.Z)(Tt.current.keys()).forEach(function(pt){pt.startsWith(et)&&Ft.add(Tt.current.get(pt))}),Ft},[]);return _.useEffect(function(){return function(){yr.current=!0}},[]),{registerPath:Tr,unregisterPath:U,refreshOverflowKeys:R,isSubPathKey:ue,getKeyPath:q,getKeys:Qe,getSubPathKeys:He}}function We(ke){var ze=_.useRef(ke);ze.current=ke;var _t=_.useCallback(function(){for(var at,Tt=arguments.length,tt=new Array(Tt),ot=0;ot<Tt;ot++)tt[ot]=arguments[ot];return(at=ze.current)===null||at===void 0?void 0:at.call.apply(at,[ze].concat(tt))},[]);return ke?_t:void 0}var St=Math.random().toFixed(5).toString().slice(2),Xe=0;function ut(ke){var ze=(0,J.Z)(ke,{value:ke}),_t=(0,W.Z)(ze,2),at=_t[0],Tt=_t[1];return _.useEffect(function(){Xe+=1;var tt="".concat(St,"-").concat(Xe);Tt("rc-menu-uuid-".concat(tt))},[]),at}var At=K(16552),it=K(19210),Ne=K(46654),Ze=K(37205),lt=K(2738),vt=K(8654);function Ot(ke,ze,_t,at){var Tt=_.useContext(P),tt=Tt.activeKey,ot=Tt.onActive,Ut=Tt.onInactive,Zt={active:tt===ke};return ze||(Zt.onMouseEnter=function(Ar){_t==null||_t({key:ke,domEvent:Ar}),ot(ke)},Zt.onMouseLeave=function(Ar){at==null||at({key:ke,domEvent:Ar}),Ut(ke)}),Zt}function Ct(ke){var ze=_.useContext(P),_t=ze.mode,at=ze.rtl,Tt=ze.inlineIndent;if(_t!=="inline")return null;var tt=ke;return at?{paddingRight:tt*Tt}:{paddingLeft:tt*Tt}}function Wt(ke){var ze=ke.icon,_t=ke.props,at=ke.children,Tt;return ze===null||ze===!1?null:(typeof ze=="function"?Tt=_.createElement(ze,(0,Fe.Z)({},_t)):typeof ze!="boolean"&&(Tt=ze),Tt||at||null)}var Nt=["item"];function Xt(ke){var ze=ke.item,_t=(0,m.Z)(ke,Nt);return Object.defineProperty(_t,"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."),ze}}),_t}var fr=["title","attribute","elementRef"],Rr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],It=["active"],jt=function(ke){(0,Ne.Z)(_t,ke);var ze=(0,Ze.Z)(_t);function _t(){return(0,At.Z)(this,_t),ze.apply(this,arguments)}return(0,it.Z)(_t,[{key:"render",value:function(){var Tt=this.props,tt=Tt.title,ot=Tt.attribute,Ut=Tt.elementRef,Zt=(0,m.Z)(Tt,fr),Ar=(0,lt.Z)(Zt,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,B.ZP)(!ot,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),_.createElement(u.Z.Item,(0,V.Z)({},ot,{title:typeof tt=="string"?tt:void 0},Ar,{ref:Ut}))}}]),_t}(_.Component),Re=_.forwardRef(function(ke,ze){var _t=ke.style,at=ke.className,Tt=ke.eventKey,tt=ke.warnKey,ot=ke.disabled,Ut=ke.itemIcon,Zt=ke.children,Ar=ke.role,yr=ke.onMouseEnter,hr=ke.onMouseLeave,Tr=ke.onClick,U=ke.onKeyDown,R=ke.onFocus,q=(0,m.Z)(ke,Rr),ue=M(Tt),Qe=_.useContext(P),He=Qe.prefixCls,rt=Qe.onItemClick,et=Qe.disabled,Ft=Qe.overflowDisabled,pt=Qe.itemIcon,ye=Qe.selectedKeys,je=Qe.onActive,ct=_.useContext(Z),zt=ct._internalRenderMenuItem,Vt="".concat(He,"-item"),Et=_.useRef(),Mt=_.useRef(),Yt=et||ot,sr=(0,vt.x1)(ze,Mt),ir=Oe(Tt),$t=function(dr){return{key:Tt,keyPath:(0,he.Z)(ir).reverse(),item:Et.current,domEvent:dr}},mr=Ut||pt,ur=Ot(Tt,Yt,yr,hr),Dr=ur.active,pr=(0,m.Z)(ur,It),tr=ye.includes(Tt),Hr=Ct(ir.length),vr=function(dr){if(!Yt){var Yr=$t(dr);Tr==null||Tr(Xt(Yr)),rt(Yr)}},Lr=function(dr){if(U==null||U(dr),dr.which===Ae.Z.ENTER){var Yr=$t(dr);Tr==null||Tr(Xt(Yr)),rt(Yr)}},zr=function(dr){je(Tt),R==null||R(dr)},Gr={};ke.role==="option"&&(Gr["aria-selected"]=tr);var jr=_.createElement(jt,(0,V.Z)({ref:Et,elementRef:sr,role:Ar===null?"none":Ar||"menuitem",tabIndex:ot?null:-1,"data-menu-id":Ft&&ue?null:ue},(0,lt.Z)(q,["extra"]),pr,Gr,{component:"li","aria-disabled":ot,style:(0,Fe.Z)((0,Fe.Z)({},Hr),_t),className:O()(Vt,(0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(Vt,"-active"),Dr),"".concat(Vt,"-selected"),tr),"".concat(Vt,"-disabled"),Yt),at),onClick:vr,onKeyDown:Lr,onFocus:zr}),Zt,_.createElement(Wt,{props:(0,Fe.Z)((0,Fe.Z)({},ke),{},{isSelected:tr}),icon:mr}));return zt&&(jr=zt(jr,ke,{selected:tr})),jr});function Ce(ke,ze){var _t=ke.eventKey,at=ne(),Tt=Oe(_t);return _.useEffect(function(){if(at)return at.registerPath(_t,Tt),function(){at.unregisterPath(_t,Tt)}},[Tt]),at?null:_.createElement(Re,(0,V.Z)({},ke,{ref:ze}))}var Ee=_.forwardRef(Ce),j=["className","children"],ie=function(ze,_t){var at=ze.className,Tt=ze.children,tt=(0,m.Z)(ze,j),ot=_.useContext(P),Ut=ot.prefixCls,Zt=ot.mode,Ar=ot.rtl;return _.createElement("ul",(0,V.Z)({className:O()(Ut,Ar&&"".concat(Ut,"-rtl"),"".concat(Ut,"-sub"),"".concat(Ut,"-").concat(Zt==="inline"?"inline":"vertical"),at),role:"menu"},tt,{"data-menu-list":!0,ref:_t}),Tt)},ae=_.forwardRef(ie);ae.displayName="SubMenuList";var de=ae,Se=K(11592);function xt(ke,ze){return(0,Se.Z)(ke).map(function(_t,at){if(_.isValidElement(_t)){var Tt,tt,ot=_t.key,Ut=(Tt=(tt=_t.props)===null||tt===void 0?void 0:tt.eventKey)!==null&&Tt!==void 0?Tt:ot,Zt=Ut==null;Zt&&(Ut="tmp_key-".concat([].concat((0,he.Z)(ze),[at]).join("-")));var Ar={key:Ut,eventKey:Ut};return _.cloneElement(_t,Ar)}return _t})}var gt=K(65352),qe={adjustX:1,adjustY:1},Ht={topLeft:{points:["bl","tl"],overflow:qe},topRight:{points:["br","tr"],overflow:qe},bottomLeft:{points:["tl","bl"],overflow:qe},bottomRight:{points:["tr","br"],overflow:qe},leftTop:{points:["tr","tl"],overflow:qe},leftBottom:{points:["br","bl"],overflow:qe},rightTop:{points:["tl","tr"],overflow:qe},rightBottom:{points:["bl","br"],overflow:qe}},Cr={topLeft:{points:["bl","tl"],overflow:qe},topRight:{points:["br","tr"],overflow:qe},bottomLeft:{points:["tl","bl"],overflow:qe},bottomRight:{points:["tr","br"],overflow:qe},rightTop:{points:["tr","tl"],overflow:qe},rightBottom:{points:["br","bl"],overflow:qe},leftTop:{points:["tl","tr"],overflow:qe},leftBottom:{points:["bl","br"],overflow:qe}},Nr=null;function Gt(ke,ze,_t){if(ze)return ze;if(_t)return _t[ke]||_t.other}var Kt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Sr(ke){var ze=ke.prefixCls,_t=ke.visible,at=ke.children,Tt=ke.popup,tt=ke.popupStyle,ot=ke.popupClassName,Ut=ke.popupOffset,Zt=ke.disabled,Ar=ke.mode,yr=ke.onVisibleChange,hr=_.useContext(P),Tr=hr.getPopupContainer,U=hr.rtl,R=hr.subMenuOpenDelay,q=hr.subMenuCloseDelay,ue=hr.builtinPlacements,Qe=hr.triggerSubMenuAction,He=hr.forceSubMenuRender,rt=hr.rootClassName,et=hr.motion,Ft=hr.defaultMotions,pt=_.useState(!1),ye=(0,W.Z)(pt,2),je=ye[0],ct=ye[1],zt=U?(0,Fe.Z)((0,Fe.Z)({},Cr),ue):(0,Fe.Z)((0,Fe.Z)({},Ht),ue),Vt=Kt[Ar],Et=Gt(Ar,et,Ft),Mt=_.useRef(Et);Ar!=="inline"&&(Mt.current=Et);var Yt=(0,Fe.Z)((0,Fe.Z)({},Mt.current),{},{leavedClassName:"".concat(ze,"-hidden"),removeOnLeave:!1,motionAppear:!0}),sr=_.useRef();return _.useEffect(function(){return sr.current=(0,Ge.Z)(function(){ct(_t)}),function(){Ge.Z.cancel(sr.current)}},[_t]),_.createElement(gt.Z,{prefixCls:ze,popupClassName:O()("".concat(ze,"-popup"),(0,me.Z)({},"".concat(ze,"-rtl"),U),ot,rt),stretch:Ar==="horizontal"?"minWidth":null,getPopupContainer:Tr,builtinPlacements:zt,popupPlacement:Vt,popupVisible:je,popup:Tt,popupStyle:tt,popupAlign:Ut&&{offset:Ut},action:Zt?[]:[Qe],mouseEnterDelay:R,mouseLeaveDelay:q,onPopupVisibleChange:yr,forceRender:He,popupMotion:Yt,fresh:!0},at)}var $r=K(77900);function De(ke){var ze=ke.id,_t=ke.open,at=ke.keyPath,Tt=ke.children,tt="inline",ot=_.useContext(P),Ut=ot.prefixCls,Zt=ot.forceSubMenuRender,Ar=ot.motion,yr=ot.defaultMotions,hr=ot.mode,Tr=_.useRef(!1);Tr.current=hr===tt;var U=_.useState(!Tr.current),R=(0,W.Z)(U,2),q=R[0],ue=R[1],Qe=Tr.current?_t:!1;_.useEffect(function(){Tr.current&&ue(!1)},[hr]);var He=(0,Fe.Z)({},Gt(tt,Ar,yr));at.length>1&&(He.motionAppear=!1);var rt=He.onVisibleChanged;return He.onVisibleChanged=function(et){return!Tr.current&&!et&&ue(!0),rt==null?void 0:rt(et)},q?null:_.createElement(ce,{mode:tt,locked:!Tr.current},_.createElement($r.default,(0,V.Z)({visible:Qe},He,{forceRender:Zt,removeOnLeave:!1,leavedClassName:"".concat(Ut,"-hidden")}),function(et){var Ft=et.className,pt=et.style;return _.createElement(de,{id:ze,className:Ft,style:pt},Tt)}))}var Ir=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Er=["active"],Br=_.forwardRef(function(ke,ze){var _t=ke.style,at=ke.className,Tt=ke.title,tt=ke.eventKey,ot=ke.warnKey,Ut=ke.disabled,Zt=ke.internalPopupClose,Ar=ke.children,yr=ke.itemIcon,hr=ke.expandIcon,Tr=ke.popupClassName,U=ke.popupOffset,R=ke.popupStyle,q=ke.onClick,ue=ke.onMouseEnter,Qe=ke.onMouseLeave,He=ke.onTitleClick,rt=ke.onTitleMouseEnter,et=ke.onTitleMouseLeave,Ft=(0,m.Z)(ke,Ir),pt=M(tt),ye=_.useContext(P),je=ye.prefixCls,ct=ye.mode,zt=ye.openKeys,Vt=ye.disabled,Et=ye.overflowDisabled,Mt=ye.activeKey,Yt=ye.selectedKeys,sr=ye.itemIcon,ir=ye.expandIcon,$t=ye.onItemClick,mr=ye.onOpenChange,ur=ye.onActive,Dr=_.useContext(Z),pr=Dr._internalRenderSubMenuItem,tr=_.useContext(le),Hr=tr.isSubPathKey,vr=Oe(),Lr="".concat(je,"-submenu"),zr=Vt||Ut,Gr=_.useRef(),jr=_.useRef(),Vr=yr!=null?yr:sr,dr=hr!=null?hr:ir,Yr=zt.includes(tt),Kr=!Et&&Yr,gn=Hr(Yt,tt),qr=Ot(tt,zr,rt,et),qt=qr.active,hn=(0,m.Z)(qr,Er),ln=_.useState(!1),tn=(0,W.Z)(ln,2),xn=tn[0],$n=tn[1],On=function(yn){zr||$n(yn)},Xn=function(yn){On(!0),ue==null||ue({key:tt,domEvent:yn})},Xr=function(yn){On(!1),Qe==null||Qe({key:tt,domEvent:yn})},Gn=_.useMemo(function(){return qt||(ct!=="inline"?xn||Hr([Mt],tt):!1)},[ct,qt,Mt,xn,tt,Hr]),Ln=Ct(vr.length),Zn=function(yn){zr||(He==null||He({key:tt,domEvent:yn}),ct==="inline"&&mr(tt,!Yr))},ri=We(function(Bn){q==null||q(Xt(Bn)),$t(Bn)}),_i=function(yn){ct!=="inline"&&mr(tt,yn)},xi=function(){ur(tt)},Mn=pt&&"".concat(pt,"-popup"),zn=_.useMemo(function(){return _.createElement(Wt,{icon:ct!=="horizontal"?dr:void 0,props:(0,Fe.Z)((0,Fe.Z)({},ke),{},{isOpen:Kr,isSubMenu:!0})},_.createElement("i",{className:"".concat(Lr,"-arrow")}))},[ct,dr,ke,Kr,Lr]),Un=_.createElement("div",(0,V.Z)({role:"menuitem",style:Ln,className:"".concat(Lr,"-title"),tabIndex:zr?null:-1,ref:Gr,title:typeof Tt=="string"?Tt:null,"data-menu-id":Et&&pt?null:pt,"aria-expanded":Kr,"aria-haspopup":!0,"aria-controls":Mn,"aria-disabled":zr,onClick:Zn,onFocus:xi},hn),Tt,zn),Jn=_.useRef(ct);if(ct!=="inline"&&vr.length>1?Jn.current="vertical":Jn.current=ct,!Et){var Pn=Jn.current;Un=_.createElement(Sr,{mode:Pn,prefixCls:Lr,visible:!Zt&&Kr&&ct!=="inline",popupClassName:Tr,popupOffset:U,popupStyle:R,popup:_.createElement(ce,{mode:Pn==="horizontal"?"vertical":Pn},_.createElement(de,{id:Mn,ref:jr},Ar)),disabled:zr,onVisibleChange:_i},Un)}var Ai=_.createElement(u.Z.Item,(0,V.Z)({ref:ze,role:"none"},Ft,{component:"li",style:_t,className:O()(Lr,"".concat(Lr,"-").concat(ct),at,(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(Lr,"-open"),Kr),"".concat(Lr,"-active"),Gn),"".concat(Lr,"-selected"),gn),"".concat(Lr,"-disabled"),zr)),onMouseEnter:Xn,onMouseLeave:Xr}),Un,!Et&&_.createElement(De,{id:Mn,open:Kr,keyPath:vr},Ar));return pr&&(Ai=pr(Ai,ke,{selected:gn,active:Gn,open:Kr,disabled:zr})),_.createElement(ce,{onItemClick:ri,mode:ct==="horizontal"?"vertical":ct,itemIcon:Vr,expandIcon:dr},Ai)}),vn=_.forwardRef(function(ke,ze){var _t=ke.eventKey,at=ke.children,Tt=Oe(_t),tt=xt(at,Tt),ot=ne();_.useEffect(function(){if(ot)return ot.registerPath(_t,Tt),function(){ot.unregisterPath(_t,Tt)}},[Tt]);var Ut;return ot?Ut=tt:Ut=_.createElement(Br,(0,V.Z)({ref:ze},ke),tt),_.createElement(ve.Provider,{value:Tt},Ut)}),Or=vn,Jr=K(28788);function An(ke){var ze=ke.className,_t=ke.style,at=_.useContext(P),Tt=at.prefixCls,tt=ne();return tt?null:_.createElement("li",{role:"separator",className:O()("".concat(Tt,"-item-divider"),ze),style:_t})}var Cn=["className","title","eventKey","children"],an=_.forwardRef(function(ke,ze){var _t=ke.className,at=ke.title,Tt=ke.eventKey,tt=ke.children,ot=(0,m.Z)(ke,Cn),Ut=_.useContext(P),Zt=Ut.prefixCls,Ar="".concat(Zt,"-item-group");return _.createElement("li",(0,V.Z)({ref:ze,role:"presentation"},ot,{onClick:function(hr){return hr.stopPropagation()},className:O()(Ar,_t)}),_.createElement("div",{role:"presentation",className:"".concat(Ar,"-title"),title:typeof at=="string"?at:void 0},at),_.createElement("ul",{role:"group",className:"".concat(Ar,"-list")},tt))}),Rn=_.forwardRef(function(ke,ze){var _t=ke.eventKey,at=ke.children,Tt=Oe(_t),tt=xt(at,Tt),ot=ne();return ot?tt:_.createElement(an,(0,V.Z)({ref:ze},(0,lt.Z)(ke,["warnKey"])),tt)}),Pr=Rn,Qn=["label","children","key","type","extra"];function Mr(ke,ze,_t){var at=ze.item,Tt=ze.group,tt=ze.submenu,ot=ze.divider;return(ke||[]).map(function(Ut,Zt){if(Ut&&(0,Jr.Z)(Ut)==="object"){var Ar=Ut,yr=Ar.label,hr=Ar.children,Tr=Ar.key,U=Ar.type,R=Ar.extra,q=(0,m.Z)(Ar,Qn),ue=Tr!=null?Tr:"tmp-".concat(Zt);return hr||U==="group"?U==="group"?_.createElement(Tt,(0,V.Z)({key:ue},q,{title:yr}),Mr(hr,ze,_t)):_.createElement(tt,(0,V.Z)({key:ue},q,{title:yr}),Mr(hr,ze,_t)):U==="divider"?_.createElement(ot,(0,V.Z)({key:ue},q)):_.createElement(at,(0,V.Z)({key:ue},q,{extra:R}),yr,(!!R||R===0)&&_.createElement("span",{className:"".concat(_t,"-item-extra")},R))}return null}).filter(function(Ut){return Ut})}function en(ke,ze,_t,at,Tt){var tt=ke,ot=(0,Fe.Z)({divider:An,item:Ee,group:Pr,submenu:Or},at);return ze&&(tt=Mr(ze,ot,Tt)),xt(tt,_t)}var Dn=["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"],br=[],jn=_.forwardRef(function(ke,ze){var _t,at=ke,Tt=at.prefixCls,tt=Tt===void 0?"rc-menu":Tt,ot=at.rootClassName,Ut=at.style,Zt=at.className,Ar=at.tabIndex,yr=Ar===void 0?0:Ar,hr=at.items,Tr=at.children,U=at.direction,R=at.id,q=at.mode,ue=q===void 0?"vertical":q,Qe=at.inlineCollapsed,He=at.disabled,rt=at.disabledOverflow,et=at.subMenuOpenDelay,Ft=et===void 0?.1:et,pt=at.subMenuCloseDelay,ye=pt===void 0?.1:pt,je=at.forceSubMenuRender,ct=at.defaultOpenKeys,zt=at.openKeys,Vt=at.activeKey,Et=at.defaultActiveFirst,Mt=at.selectable,Yt=Mt===void 0?!0:Mt,sr=at.multiple,ir=sr===void 0?!1:sr,$t=at.defaultSelectedKeys,mr=at.selectedKeys,ur=at.onSelect,Dr=at.onDeselect,pr=at.inlineIndent,tr=pr===void 0?24:pr,Hr=at.motion,vr=at.defaultMotions,Lr=at.triggerSubMenuAction,zr=Lr===void 0?"hover":Lr,Gr=at.builtinPlacements,jr=at.itemIcon,Vr=at.expandIcon,dr=at.overflowedIndicator,Yr=dr===void 0?"...":dr,Kr=at.overflowedIndicatorPopupClassName,gn=at.getPopupContainer,qr=at.onClick,qt=at.onOpenChange,hn=at.onKeyDown,ln=at.openAnimation,tn=at.openTransitionName,xn=at._internalRenderMenuItem,$n=at._internalRenderSubMenuItem,On=at._internalComponents,Xn=(0,m.Z)(at,Dn),Xr=_.useMemo(function(){return[en(Tr,hr,br,On,tt),en(Tr,hr,br,{},tt)]},[Tr,hr,On]),Gn=(0,W.Z)(Xr,2),Ln=Gn[0],Zn=Gn[1],ri=_.useState(!1),_i=(0,W.Z)(ri,2),xi=_i[0],Mn=_i[1],zn=_.useRef(),Un=ut(R),Jn=U==="rtl",Pn=(0,J.Z)(ct,{value:zt,postState:function(rn){return rn||br}}),Ai=(0,W.Z)(Pn,2),Bn=Ai[0],yn=Ai[1],kr=function(rn){var _n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function ft(){yn(rn),qt==null||qt(rn)}_n?(0,w.flushSync)(ft):ft()},Fn=_.useState(Bn),ci=(0,W.Z)(Fn,2),vi=ci[0],ai=ci[1],Yn=_.useRef(!1),Qt=_.useMemo(function(){return(ue==="inline"||ue==="vertical")&&Qe?["vertical",Qe]:[ue,!1]},[ue,Qe]),xr=(0,W.Z)(Qt,2),sn=xr[0],En=xr[1],un=sn==="inline",Nn=_.useState(sn),Bi=(0,W.Z)(Nn,2),Sn=Bi[0],mn=Bi[1],xs=_.useState(En),kn=(0,W.Z)(xs,2),Fs=kn[0],fi=kn[1];_.useEffect(function(){mn(sn),fi(En),Yn.current&&(un?yn(vi):kr(br))},[sn,En]);var Yi=_.useState(0),Wr=(0,W.Z)(Yi,2),ki=Wr[0],tA=Wr[1],ji=ki>=Ln.length-1||Sn!=="horizontal"||rt;_.useEffect(function(){un&&ai(Bn)},[Bn]),_.useEffect(function(){return Yn.current=!0,function(){Yn.current=!1}},[]);var yi=Ye(),Oi=yi.registerPath,ls=yi.unregisterPath,rA=yi.refreshOverflowKeys,Vn=yi.isSubPathKey,Ei=yi.getKeyPath,hi=yi.getKeys,pn=yi.getSubPathKeys,wi=_.useMemo(function(){return{registerPath:Oi,unregisterPath:ls}},[Oi,ls]),us=_.useMemo(function(){return{isSubPathKey:Vn}},[Vn]);_.useEffect(function(){rA(ji?br:Ln.slice(ki+1).map(function(wn){return wn.key}))},[ki,ji]);var Ss=(0,J.Z)(Vt||Et&&((_t=Ln[0])===null||_t===void 0?void 0:_t.key),{value:Vt}),cs=(0,W.Z)(Ss,2),Pi=cs[0],Ts=cs[1],Xi=We(function(wn){Ts(wn)}),di=We(function(){Ts(void 0)});(0,_.useImperativeHandle)(ze,function(){return{list:zn.current,focus:function(rn){var _n,ft=hi(),Hn=C(ft,Un),Ni=Hn.elements,qi=Hn.key2element,aA=Hn.element2key,hs=L(zn.current,Ni),Hi=Pi!=null?Pi:hs[0]?aA.get(hs[0]):(_n=Ln.find(function(ts){return!ts.props.disabled}))===null||_n===void 0?void 0:_n.key,es=qi.get(Hi);if(Hi&&es){var Ds;es==null||(Ds=es.focus)===null||Ds===void 0||Ds.call(es,rn)}}}});var nA=(0,J.Z)($t||[],{value:mr,postState:function(rn){return Array.isArray(rn)?rn:rn==null?br:[rn]}}),fs=(0,W.Z)(nA,2),Fi=fs[0],Is=fs[1],iA=function(rn){if(Yt){var _n=rn.key,ft=Fi.includes(_n),Hn;ir?ft?Hn=Fi.filter(function(qi){return qi!==_n}):Hn=[].concat((0,he.Z)(Fi),[_n]):Hn=[_n],Is(Hn);var Ni=(0,Fe.Z)((0,Fe.Z)({},rn),{},{selectedKeys:Hn});ft?Dr==null||Dr(Ni):ur==null||ur(Ni)}!ir&&Bn.length&&Sn!=="inline"&&kr(br)},sA=We(function(wn){qr==null||qr(Xt(wn)),iA(wn)}),qn=We(function(wn,rn){var _n=Bn.filter(function(Hn){return Hn!==wn});if(rn)_n.push(wn);else if(Sn!=="inline"){var ft=pn(wn);_n=_n.filter(function(Hn){return!ft.has(Hn)})}(0,D.Z)(Bn,_n,!0)||kr(_n,!0)}),Mi=function(rn,_n){var ft=_n!=null?_n:!Bn.includes(rn);qn(rn,ft)},GA=N(Sn,Pi,Jn,Un,zn,hi,Ei,Ts,Mi,hn);_.useEffect(function(){Mn(!0)},[]);var AA=_.useMemo(function(){return{_internalRenderMenuItem:xn,_internalRenderSubMenuItem:$n}},[xn,$n]),Ji=Sn!=="horizontal"||rt?Ln:Ln.map(function(wn,rn){return _.createElement(ce,{key:wn.key,overflowDisabled:rn>ki},wn)}),VA=_.createElement(u.Z,(0,V.Z)({id:R,ref:zn,prefixCls:"".concat(tt,"-overflow"),component:"ul",itemComponent:Ee,className:O()(tt,"".concat(tt,"-root"),"".concat(tt,"-").concat(Sn),Zt,(0,me.Z)((0,me.Z)({},"".concat(tt,"-inline-collapsed"),Fs),"".concat(tt,"-rtl"),Jn),ot),dir:U,style:Ut,role:"menu",tabIndex:yr,data:Ji,renderRawItem:function(rn){return rn},renderRawRest:function(rn){var _n=rn.length,ft=_n?Ln.slice(-_n):null;return _.createElement(Or,{eventKey:Ue,title:Yr,disabled:ji,internalPopupClose:_n===0,popupClassName:Kr},ft)},maxCount:Sn!=="horizontal"||rt?u.Z.INVALIDATE:u.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(rn){tA(rn)},onKeyDown:GA},Xn));return _.createElement(Z.Provider,{value:AA},_.createElement(x.Provider,{value:Un},_.createElement(ce,{prefixCls:tt,rootClassName:ot,mode:Sn,openKeys:Bn,rtl:Jn,disabled:He,motion:xi?Hr:null,defaultMotions:xi?vr:null,activeKey:Pi,onActive:Xi,onInactive:di,selectedKeys:Fi,inlineIndent:tr,subMenuOpenDelay:Ft,subMenuCloseDelay:ye,forceSubMenuRender:je,builtinPlacements:Gr,triggerSubMenuAction:zr,getPopupContainer:gn,itemIcon:jr,expandIcon:Vr,onItemClick:sA,onOpenChange:qn},_.createElement(le.Provider,{value:us},VA),_.createElement("div",{style:{display:"none"},"aria-hidden":!0},_.createElement(we.Provider,{value:wi},Zn)))))}),on=jn,lr=on;lr.Item=Ee,lr.SubMenu=Or,lr.ItemGroup=Pr,lr.Divider=An;var _r=lr},11780:function(gr,mt,K){"use strict";K.d(mt,{Z:function(){return re}});var V=K(71409),me=K(89490),Fe=K(11036),he=K(39224),W=K(59301),m=K(92310),ge=K.n(m),O=K(29301),u=K(34280),J=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],D=void 0;function B(E,y){var $=E.prefixCls,Ae=E.invalidate,Ge=E.item,Je=E.renderItem,yt=E.responsive,dt=E.responsiveDisabled,Rt=E.registerSize,bt=E.itemKey,ht=E.className,Le=E.style,nt=E.children,Ie=E.display,wt=E.order,Lt=E.component,Be=Lt===void 0?"div":Lt,L=(0,he.Z)(E,J),g=yt&&!Ie;function C(be){Rt(bt,be)}W.useEffect(function(){return function(){C(null)}},[]);var N=Je&&Ge!==D?Je(Ge,{index:wt}):nt,T;Ae||(T={opacity:g?0:1,height:g?0:D,overflowY:g?"hidden":D,order:yt?wt:D,pointerEvents:g?"none":D,position:g?"absolute":D});var k={};g&&(k["aria-hidden"]=!0);var ee=W.createElement(Be,(0,V.Z)({className:ge()(!Ae&&$,ht),style:(0,me.Z)((0,me.Z)({},T),Le)},k,L,{ref:y}),N);return yt&&(ee=W.createElement(O.Z,{onResize:function(Ue){var Ye=Ue.offsetWidth;C(Ye)},disabled:dt},ee)),ee}var _=W.forwardRef(B);_.displayName="Item";var w=_,x=K(6089),Y=K(4676),M=K(16089);function H(E){if(typeof MessageChannel=="undefined")(0,M.Z)(E);else{var y=new MessageChannel;y.port1.onmessage=function(){return E()},y.port2.postMessage(void 0)}}function Q(){var E=W.useRef(null),y=function(Ae){E.current||(E.current=[],H(function(){(0,Y.unstable_batchedUpdates)(function(){E.current.forEach(function(Ge){Ge()}),E.current=null})})),E.current.push(Ae)};return y}function P(E,y){var $=W.useState(y),Ae=(0,Fe.Z)($,2),Ge=Ae[0],Je=Ae[1],yt=(0,x.Z)(function(dt){E(function(){Je(dt)})});return[Ge,yt]}var X=W.createContext(null),ce=["component"],_e=["className"],we=["className"],ne=function(y,$){var Ae=W.useContext(X);if(!Ae){var Ge=y.component,Je=Ge===void 0?"div":Ge,yt=(0,he.Z)(y,ce);return W.createElement(Je,(0,V.Z)({},yt,{ref:$}))}var dt=Ae.className,Rt=(0,he.Z)(Ae,_e),bt=y.className,ht=(0,he.Z)(y,we);return W.createElement(X.Provider,{value:null},W.createElement(w,(0,V.Z)({ref:$,className:ge()(dt,bt)},Rt,ht)))},ve=W.forwardRef(ne);ve.displayName="RawItem";var Oe=ve,le=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Me="responsive",Z="invalidate";function I(E){return"+ ".concat(E.length," ...")}function G(E,y){var $=E.prefixCls,Ae=$===void 0?"rc-overflow":$,Ge=E.data,Je=Ge===void 0?[]:Ge,yt=E.renderItem,dt=E.renderRawItem,Rt=E.itemKey,bt=E.itemWidth,ht=bt===void 0?10:bt,Le=E.ssr,nt=E.style,Ie=E.className,wt=E.maxCount,Lt=E.renderRest,Be=E.renderRawRest,L=E.suffix,g=E.component,C=g===void 0?"div":g,N=E.itemComponent,T=E.onVisibleChange,k=(0,he.Z)(E,le),ee=Le==="full",be=Q(),Ue=P(be,null),Ye=(0,Fe.Z)(Ue,2),We=Ye[0],St=Ye[1],Xe=We||0,ut=P(be,new Map),At=(0,Fe.Z)(ut,2),it=At[0],Ne=At[1],Ze=P(be,0),lt=(0,Fe.Z)(Ze,2),vt=lt[0],Ot=lt[1],Ct=P(be,0),Wt=(0,Fe.Z)(Ct,2),Nt=Wt[0],Xt=Wt[1],fr=P(be,0),Rr=(0,Fe.Z)(fr,2),It=Rr[0],jt=Rr[1],Re=(0,W.useState)(null),Ce=(0,Fe.Z)(Re,2),Ee=Ce[0],j=Ce[1],ie=(0,W.useState)(null),ae=(0,Fe.Z)(ie,2),de=ae[0],Se=ae[1],xt=W.useMemo(function(){return de===null&&ee?Number.MAX_SAFE_INTEGER:de||0},[de,We]),gt=(0,W.useState)(!1),qe=(0,Fe.Z)(gt,2),Ht=qe[0],Cr=qe[1],Nr="".concat(Ae,"-item"),Gt=Math.max(vt,Nt),Kt=wt===Me,Sr=Je.length&&Kt,$r=wt===Z,De=Sr||typeof wt=="number"&&Je.length>wt,Ir=(0,W.useMemo)(function(){var lr=Je;return Sr?We===null&&ee?lr=Je:lr=Je.slice(0,Math.min(Je.length,Xe/ht)):typeof wt=="number"&&(lr=Je.slice(0,wt)),lr},[Je,ht,We,wt,Sr]),Er=(0,W.useMemo)(function(){return Sr?Je.slice(xt+1):Je.slice(Ir.length)},[Je,Ir,Sr,xt]),Br=(0,W.useCallback)(function(lr,_r){var ke;return typeof Rt=="function"?Rt(lr):(ke=Rt&&(lr==null?void 0:lr[Rt]))!==null&&ke!==void 0?ke:_r},[Rt]),vn=(0,W.useCallback)(yt||function(lr){return lr},[yt]);function Or(lr,_r,ke){de===lr&&(_r===void 0||_r===Ee)||(Se(lr),ke||(Cr(lr<Je.length-1),T==null||T(lr)),_r!==void 0&&j(_r))}function Jr(lr,_r){St(_r.clientWidth)}function An(lr,_r){Ne(function(ke){var ze=new Map(ke);return _r===null?ze.delete(lr):ze.set(lr,_r),ze})}function Cn(lr,_r){Xt(_r),Ot(Nt)}function an(lr,_r){jt(_r)}function Rn(lr){return it.get(Br(Ir[lr],lr))}(0,u.Z)(function(){if(Xe&&typeof Gt=="number"&&Ir){var lr=It,_r=Ir.length,ke=_r-1;if(!_r){Or(0,null);return}for(var ze=0;ze<_r;ze+=1){var _t=Rn(ze);if(ee&&(_t=_t||0),_t===void 0){Or(ze-1,void 0,!0);break}if(lr+=_t,ke===0&&lr<=Xe||ze===ke-1&&lr+Rn(ke)<=Xe){Or(ke,null);break}else if(lr+Gt>Xe){Or(ze-1,lr-_t-It+Nt);break}}L&&Rn(0)+It>Xe&&j(null)}},[Xe,it,Nt,It,Br,Ir]);var Pr=Ht&&!!Er.length,Qn={};Ee!==null&&Sr&&(Qn={position:"absolute",left:Ee,top:0});var Mr={prefixCls:Nr,responsive:Sr,component:N,invalidate:$r},en=dt?function(lr,_r){var ke=Br(lr,_r);return W.createElement(X.Provider,{key:ke,value:(0,me.Z)((0,me.Z)({},Mr),{},{order:_r,item:lr,itemKey:ke,registerSize:An,display:_r<=xt})},dt(lr,_r))}:function(lr,_r){var ke=Br(lr,_r);return W.createElement(w,(0,V.Z)({},Mr,{order:_r,key:ke,item:lr,renderItem:vn,itemKey:ke,registerSize:An,display:_r<=xt}))},Dn={order:Pr?xt:Number.MAX_SAFE_INTEGER,className:"".concat(Nr,"-rest"),registerSize:Cn,display:Pr},br=Lt||I,jn=Be?W.createElement(X.Provider,{value:(0,me.Z)((0,me.Z)({},Mr),Dn)},Be(Er)):W.createElement(w,(0,V.Z)({},Mr,Dn),typeof br=="function"?br(Er):br),on=W.createElement(C,(0,V.Z)({className:ge()(!$r&&Ae,Ie),style:nt,ref:y},k),Ir.map(en),De?jn:null,L&&W.createElement(w,(0,V.Z)({},Mr,{responsive:Kt,responsiveDisabled:!Sr,order:xt,className:"".concat(Nr,"-suffix"),registerSize:an,display:!0,style:Qn}),L));return Kt?W.createElement(O.Z,{onResize:Jr,disabled:!Sr},on):on}var z=W.forwardRef(G);z.displayName="Overflow",z.Item=Oe,z.RESPONSIVE=Me,z.INVALIDATE=Z;var se=z,re=se},29301:function(gr,mt,K){"use strict";K.d(mt,{Z:function(){return Z}});var V=K(71409),me=K(59301),Fe=K(11592),he=K(48736),W=K(89490),m=K(28788),ge=K(76846),O=K(8654),u=me.createContext(null);function J(I){var G=I.children,z=I.onBatchResize,se=me.useRef(0),re=me.useRef([]),E=me.useContext(u),y=me.useCallback(function($,Ae,Ge){se.current+=1;var Je=se.current;re.current.push({size:$,element:Ae,data:Ge}),Promise.resolve().then(function(){Je===se.current&&(z==null||z(re.current),re.current=[])}),E==null||E($,Ae,Ge)},[z,E]);return me.createElement(u.Provider,{value:y},G)}var D=K(76374),B=new Map;function _(I){I.forEach(function(G){var z,se=G.target;(z=B.get(se))===null||z===void 0||z.forEach(function(re){return re(se)})})}var w=new D.Z(_),x=null,Y=null;function M(I,G){B.has(I)||(B.set(I,new Set),w.observe(I)),B.get(I).add(G)}function H(I,G){B.has(I)&&(B.get(I).delete(G),B.get(I).size||(w.unobserve(I),B.delete(I)))}var Q=K(16552),P=K(19210),X=K(46654),ce=K(37205),_e=function(I){(0,X.Z)(z,I);var G=(0,ce.Z)(z);function z(){return(0,Q.Z)(this,z),G.apply(this,arguments)}return(0,P.Z)(z,[{key:"render",value:function(){return this.props.children}}]),z}(me.Component);function we(I,G){var z=I.children,se=I.disabled,re=me.useRef(null),E=me.useRef(null),y=me.useContext(u),$=typeof z=="function",Ae=$?z(re):z,Ge=me.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Je=!$&&me.isValidElement(Ae)&&(0,O.Yr)(Ae),yt=Je?(0,O.C4)(Ae):null,dt=(0,O.x1)(yt,re),Rt=function(){var nt;return(0,ge.ZP)(re.current)||(re.current&&(0,m.Z)(re.current)==="object"?(0,ge.ZP)((nt=re.current)===null||nt===void 0?void 0:nt.nativeElement):null)||(0,ge.ZP)(E.current)};me.useImperativeHandle(G,function(){return Rt()});var bt=me.useRef(I);bt.current=I;var ht=me.useCallback(function(Le){var nt=bt.current,Ie=nt.onResize,wt=nt.data,Lt=Le.getBoundingClientRect(),Be=Lt.width,L=Lt.height,g=Le.offsetWidth,C=Le.offsetHeight,N=Math.floor(Be),T=Math.floor(L);if(Ge.current.width!==N||Ge.current.height!==T||Ge.current.offsetWidth!==g||Ge.current.offsetHeight!==C){var k={width:N,height:T,offsetWidth:g,offsetHeight:C};Ge.current=k;var ee=g===Math.round(Be)?Be:g,be=C===Math.round(L)?L:C,Ue=(0,W.Z)((0,W.Z)({},k),{},{offsetWidth:ee,offsetHeight:be});y==null||y(Ue,Le,wt),Ie&&Promise.resolve().then(function(){Ie(Ue,Le)})}},[]);return me.useEffect(function(){var Le=Rt();return Le&&!se&&M(Le,ht),function(){return H(Le,ht)}},[re.current,se]),me.createElement(_e,{ref:E},Je?me.cloneElement(Ae,{ref:dt}):Ae)}var ne=me.forwardRef(we),ve=ne,Oe="rc-observer-key";function le(I,G){var z=I.children,se=typeof z=="function"?[z]:(0,Fe.Z)(z);return se.map(function(re,E){var y=(re==null?void 0:re.key)||"".concat(Oe,"-").concat(E);return me.createElement(ve,(0,V.Z)({},I,{key:y,ref:E===0?G:void 0}),re)})}var Me=me.forwardRef(le);Me.Collection=J;var Z=Me},29125:function(gr,mt,K){"use strict";K.d(mt,{G:function(){return he},Z:function(){return H}});var V=K(92310),me=K.n(V),Fe=K(59301);function he(Q){var P=Q.children,X=Q.prefixCls,ce=Q.id,_e=Q.overlayInnerStyle,we=Q.bodyClassName,ne=Q.className,ve=Q.style;return Fe.createElement("div",{className:me()("".concat(X,"-content"),ne),style:ve},Fe.createElement("div",{className:me()("".concat(X,"-inner"),we),id:ce,role:"tooltip",style:_e},typeof P=="function"?P():P))}var W=K(71409),m=K(89490),ge=K(39224),O=K(65352),u={shiftX:64,adjustY:1},J={adjustX:1,shiftY:!0},D=[0,0],B={left:{points:["cr","cl"],overflow:J,offset:[-4,0],targetOffset:D},right:{points:["cl","cr"],overflow:J,offset:[4,0],targetOffset:D},top:{points:["bc","tc"],overflow:u,offset:[0,-4],targetOffset:D},bottom:{points:["tc","bc"],overflow:u,offset:[0,4],targetOffset:D},topLeft:{points:["bl","tl"],overflow:u,offset:[0,-4],targetOffset:D},leftTop:{points:["tr","tl"],overflow:J,offset:[-4,0],targetOffset:D},topRight:{points:["br","tr"],overflow:u,offset:[0,-4],targetOffset:D},rightTop:{points:["tl","tr"],overflow:J,offset:[4,0],targetOffset:D},bottomRight:{points:["tr","br"],overflow:u,offset:[0,4],targetOffset:D},rightBottom:{points:["bl","br"],overflow:J,offset:[4,0],targetOffset:D},bottomLeft:{points:["tl","bl"],overflow:u,offset:[0,4],targetOffset:D},leftBottom:{points:["br","bl"],overflow:J,offset:[-4,0],targetOffset:D}},_=null,w=K(80402),x=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],Y=function(P,X){var ce=P.overlayClassName,_e=P.trigger,we=_e===void 0?["hover"]:_e,ne=P.mouseEnterDelay,ve=ne===void 0?0:ne,Oe=P.mouseLeaveDelay,le=Oe===void 0?.1:Oe,Me=P.overlayStyle,Z=P.prefixCls,I=Z===void 0?"rc-tooltip":Z,G=P.children,z=P.onVisibleChange,se=P.afterVisibleChange,re=P.transitionName,E=P.animation,y=P.motion,$=P.placement,Ae=$===void 0?"right":$,Ge=P.align,Je=Ge===void 0?{}:Ge,yt=P.destroyTooltipOnHide,dt=yt===void 0?!1:yt,Rt=P.defaultVisible,bt=P.getTooltipContainer,ht=P.overlayInnerStyle,Le=P.arrowContent,nt=P.overlay,Ie=P.id,wt=P.showArrow,Lt=wt===void 0?!0:wt,Be=P.classNames,L=P.styles,g=(0,ge.Z)(P,x),C=(0,w.Z)(Ie),N=(0,Fe.useRef)(null);(0,Fe.useImperativeHandle)(X,function(){return N.current});var T=(0,m.Z)({},g);"visible"in P&&(T.popupVisible=P.visible);var k=function(){return Fe.createElement(he,{key:"content",prefixCls:I,id:C,bodyClassName:Be==null?void 0:Be.body,overlayInnerStyle:(0,m.Z)((0,m.Z)({},ht),L==null?void 0:L.body)},nt)},ee=function(){var Ue=Fe.Children.only(G),Ye=(Ue==null?void 0:Ue.props)||{},We=(0,m.Z)((0,m.Z)({},Ye),{},{"aria-describedby":nt?C:null});return Fe.cloneElement(G,We)};return Fe.createElement(O.Z,(0,W.Z)({popupClassName:me()(ce,Be==null?void 0:Be.root),prefixCls:I,popup:k,action:we,builtinPlacements:B,popupPlacement:Ae,ref:N,popupAlign:Je,getPopupContainer:bt,onPopupVisibleChange:z,afterPopupVisibleChange:se,popupTransitionName:re,popupAnimation:E,popupMotion:y,defaultPopupVisible:Rt,autoDestroy:dt,mouseLeaveDelay:le,popupStyle:(0,m.Z)((0,m.Z)({},Me),L==null?void 0:L.root),mouseEnterDelay:ve,arrow:Lt},T),ee())},M=(0,Fe.forwardRef)(Y),H=M},49658:function(gr,mt){"use strict";mt.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var K=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(K)||/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(K==null?void 0:K.substr(0,4))}},83145:function(gr,mt,K){"use strict";Object.defineProperty(mt,"__esModule",{value:!0}),mt.CopyToClipboard=void 0;var V=Fe(K(59301)),me=Fe(K(25769));function Fe(Q){return Q&&Q.__esModule?Q:{default:Q}}function he(Q){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?he=function(X){return typeof X}:he=function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},he(Q)}function W(Q,P){var X=Object.keys(Q);if(Object.getOwnPropertySymbols){var ce=Object.getOwnPropertySymbols(Q);P&&(ce=ce.filter(function(_e){return Object.getOwnPropertyDescriptor(Q,_e).enumerable})),X.push.apply(X,ce)}return X}function m(Q){for(var P=1;P<arguments.length;P++){var X=arguments[P]!=null?arguments[P]:{};P%2?W(X,!0).forEach(function(ce){M(Q,ce,X[ce])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Q,Object.getOwnPropertyDescriptors(X)):W(X).forEach(function(ce){Object.defineProperty(Q,ce,Object.getOwnPropertyDescriptor(X,ce))})}return Q}function ge(Q,P){if(Q==null)return{};var X=O(Q,P),ce,_e;if(Object.getOwnPropertySymbols){var we=Object.getOwnPropertySymbols(Q);for(_e=0;_e<we.length;_e++)ce=we[_e],!(P.indexOf(ce)>=0)&&Object.prototype.propertyIsEnumerable.call(Q,ce)&&(X[ce]=Q[ce])}return X}function O(Q,P){if(Q==null)return{};var X={},ce=Object.keys(Q),_e,we;for(we=0;we<ce.length;we++)_e=ce[we],!(P.indexOf(_e)>=0)&&(X[_e]=Q[_e]);return X}function u(Q,P){if(!(Q instanceof P))throw new TypeError("Cannot call a class as a function")}function J(Q,P){for(var X=0;X<P.length;X++){var ce=P[X];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Q,ce.key,ce)}}function D(Q,P,X){return P&&J(Q.prototype,P),X&&J(Q,X),Q}function B(Q,P){return P&&(he(P)==="object"||typeof P=="function")?P:w(Q)}function _(Q){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(X){return X.__proto__||Object.getPrototypeOf(X)},_(Q)}function w(Q){if(Q===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Q}function x(Q,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");Q.prototype=Object.create(P&&P.prototype,{constructor:{value:Q,writable:!0,configurable:!0}}),P&&Y(Q,P)}function Y(Q,P){return Y=Object.setPrototypeOf||function(ce,_e){return ce.__proto__=_e,ce},Y(Q,P)}function M(Q,P,X){return P in Q?Object.defineProperty(Q,P,{value:X,enumerable:!0,configurable:!0,writable:!0}):Q[P]=X,Q}var H=function(Q){x(P,Q);function P(){var X,ce;u(this,P);for(var _e=arguments.length,we=new Array(_e),ne=0;ne<_e;ne++)we[ne]=arguments[ne];return ce=B(this,(X=_(P)).call.apply(X,[this].concat(we))),M(w(ce),"onClick",function(ve){var Oe=ce.props,le=Oe.text,Me=Oe.onCopy,Z=Oe.children,I=Oe.options,G=V.default.Children.only(Z),z=(0,me.default)(le,I);Me&&Me(le,z),G&&G.props&&typeof G.props.onClick=="function"&&G.props.onClick(ve)}),ce}return D(P,[{key:"render",value:function(){var ce=this.props,_e=ce.text,we=ce.onCopy,ne=ce.options,ve=ce.children,Oe=ge(ce,["text","onCopy","options","children"]),le=V.default.Children.only(ve);return V.default.cloneElement(le,m({},Oe,{onClick:this.onClick}))}}]),P}(V.default.PureComponent);mt.CopyToClipboard=H,M(H,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(gr,mt,K){"use strict";var V=K(83145),me=V.CopyToClipboard;me.CopyToClipboard=me,gr.exports=me},76374:function(gr,mt,K){"use strict";var V=function(){if(typeof Map!="undefined")return Map;function Z(I,G){var z=-1;return I.some(function(se,re){return se[0]===G?(z=re,!0):!1}),z}return function(){function I(){this.__entries__=[]}return Object.defineProperty(I.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),I.prototype.get=function(G){var z=Z(this.__entries__,G),se=this.__entries__[z];return se&&se[1]},I.prototype.set=function(G,z){var se=Z(this.__entries__,G);~se?this.__entries__[se][1]=z:this.__entries__.push([G,z])},I.prototype.delete=function(G){var z=this.__entries__,se=Z(z,G);~se&&z.splice(se,1)},I.prototype.has=function(G){return!!~Z(this.__entries__,G)},I.prototype.clear=function(){this.__entries__.splice(0)},I.prototype.forEach=function(G,z){z===void 0&&(z=null);for(var se=0,re=this.__entries__;se<re.length;se++){var E=re[se];G.call(z,E[1],E[0])}},I}()}(),me=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Fe=function(){return typeof K.g!="undefined"&&K.g.Math===Math?K.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),he=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Fe):function(Z){return setTimeout(function(){return Z(Date.now())},1e3/60)}}(),W=2;function m(Z,I){var G=!1,z=!1,se=0;function re(){G&&(G=!1,Z()),z&&y()}function E(){he(re)}function y(){var $=Date.now();if(G){if($-se<W)return;z=!0}else G=!0,z=!1,setTimeout(E,I);se=$}return y}var ge=20,O=["top","right","bottom","left","width","height","size","weight"],u=typeof MutationObserver!="undefined",J=function(){function Z(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=m(this.refresh.bind(this),ge)}return Z.prototype.addObserver=function(I){~this.observers_.indexOf(I)||this.observers_.push(I),this.connected_||this.connect_()},Z.prototype.removeObserver=function(I){var G=this.observers_,z=G.indexOf(I);~z&&G.splice(z,1),!G.length&&this.connected_&&this.disconnect_()},Z.prototype.refresh=function(){var I=this.updateObservers_();I&&this.refresh()},Z.prototype.updateObservers_=function(){var I=this.observers_.filter(function(G){return G.gatherActive(),G.hasActive()});return I.forEach(function(G){return G.broadcastActive()}),I.length>0},Z.prototype.connect_=function(){!me||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(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)},Z.prototype.disconnect_=function(){!me||!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)},Z.prototype.onTransitionEnd_=function(I){var G=I.propertyName,z=G===void 0?"":G,se=O.some(function(re){return!!~z.indexOf(re)});se&&this.refresh()},Z.getInstance=function(){return this.instance_||(this.instance_=new Z),this.instance_},Z.instance_=null,Z}(),D=function(Z,I){for(var G=0,z=Object.keys(I);G<z.length;G++){var se=z[G];Object.defineProperty(Z,se,{value:I[se],enumerable:!1,writable:!1,configurable:!0})}return Z},B=function(Z){var I=Z&&Z.ownerDocument&&Z.ownerDocument.defaultView;return I||Fe},_=_e(0,0,0,0);function w(Z){return parseFloat(Z)||0}function x(Z){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return I.reduce(function(z,se){var re=Z["border-"+se+"-width"];return z+w(re)},0)}function Y(Z){for(var I=["top","right","bottom","left"],G={},z=0,se=I;z<se.length;z++){var re=se[z],E=Z["padding-"+re];G[re]=w(E)}return G}function M(Z){var I=Z.getBBox();return _e(0,0,I.width,I.height)}function H(Z){var I=Z.clientWidth,G=Z.clientHeight;if(!I&&!G)return _;var z=B(Z).getComputedStyle(Z),se=Y(z),re=se.left+se.right,E=se.top+se.bottom,y=w(z.width),$=w(z.height);if(z.boxSizing==="border-box"&&(Math.round(y+re)!==I&&(y-=x(z,"left","right")+re),Math.round($+E)!==G&&($-=x(z,"top","bottom")+E)),!P(Z)){var Ae=Math.round(y+re)-I,Ge=Math.round($+E)-G;Math.abs(Ae)!==1&&(y-=Ae),Math.abs(Ge)!==1&&($-=Ge)}return _e(se.left,se.top,y,$)}var Q=function(){return typeof SVGGraphicsElement!="undefined"?function(Z){return Z instanceof B(Z).SVGGraphicsElement}:function(Z){return Z instanceof B(Z).SVGElement&&typeof Z.getBBox=="function"}}();function P(Z){return Z===B(Z).document.documentElement}function X(Z){return me?Q(Z)?M(Z):H(Z):_}function ce(Z){var I=Z.x,G=Z.y,z=Z.width,se=Z.height,re=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,E=Object.create(re.prototype);return D(E,{x:I,y:G,width:z,height:se,top:G,right:I+z,bottom:se+G,left:I}),E}function _e(Z,I,G,z){return{x:Z,y:I,width:G,height:z}}var we=function(){function Z(I){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_e(0,0,0,0),this.target=I}return Z.prototype.isActive=function(){var I=X(this.target);return this.contentRect_=I,I.width!==this.broadcastWidth||I.height!==this.broadcastHeight},Z.prototype.broadcastRect=function(){var I=this.contentRect_;return this.broadcastWidth=I.width,this.broadcastHeight=I.height,I},Z}(),ne=function(){function Z(I,G){var z=ce(G);D(this,{target:I,contentRect:z})}return Z}(),ve=function(){function Z(I,G,z){if(this.activeObservations_=[],this.observations_=new V,typeof I!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=I,this.controller_=G,this.callbackCtx_=z}return Z.prototype.observe=function(I){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(I instanceof B(I).Element))throw new TypeError('parameter 1 is not of type "Element".');var G=this.observations_;G.has(I)||(G.set(I,new we(I)),this.controller_.addObserver(this),this.controller_.refresh())}},Z.prototype.unobserve=function(I){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(I instanceof B(I).Element))throw new TypeError('parameter 1 is not of type "Element".');var G=this.observations_;G.has(I)&&(G.delete(I),G.size||this.controller_.removeObserver(this))}},Z.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Z.prototype.gatherActive=function(){var I=this;this.clearActive(),this.observations_.forEach(function(G){G.isActive()&&I.activeObservations_.push(G)})},Z.prototype.broadcastActive=function(){if(this.hasActive()){var I=this.callbackCtx_,G=this.activeObservations_.map(function(z){return new ne(z.target,z.broadcastRect())});this.callback_.call(I,G,I),this.clearActive()}},Z.prototype.clearActive=function(){this.activeObservations_.splice(0)},Z.prototype.hasActive=function(){return this.activeObservations_.length>0},Z}(),Oe=typeof WeakMap!="undefined"?new WeakMap:new V,le=function(){function Z(I){if(!(this instanceof Z))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var G=J.getInstance(),z=new ve(I,G,this);Oe.set(this,z)}return Z}();["observe","unobserve","disconnect"].forEach(function(Z){le.prototype[Z]=function(){var I;return(I=Oe.get(this))[Z].apply(I,arguments)}});var Me=function(){return typeof Fe.ResizeObserver!="undefined"?Fe.ResizeObserver:le}();mt.Z=Me},98040:function(gr){gr.exports=function(){var mt=document.getSelection();if(!mt.rangeCount)return function(){};for(var K=document.activeElement,V=[],me=0;me<mt.rangeCount;me++)V.push(mt.getRangeAt(me));switch(K.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":K.blur();break;default:K=null;break}return mt.removeAllRanges(),function(){mt.type==="Caret"&&mt.removeAllRanges(),mt.rangeCount||V.forEach(function(Fe){mt.addRange(Fe)}),K&&K.focus()}}},79710:function(gr,mt,K){"use strict";K.d(mt,{ZP:function(){return c}});const V=Number.isFinite||function(i){return typeof i=="number"&&isFinite(i)},me=Number.isSafeInteger||function(i){return typeof i=="number"&&Math.abs(i)<=Fe},Fe=Number.MAX_SAFE_INTEGER||9007199254740991;let he=function(i){return i.NETWORK_ERROR="networkError",i.MEDIA_ERROR="mediaError",i.KEY_SYSTEM_ERROR="keySystemError",i.MUX_ERROR="muxError",i.OTHER_ERROR="otherError",i}({}),W=function(i){return i.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",i.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",i.KEY_SYSTEM_NO_SESSION="keySystemNoSession",i.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",i.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",i.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",i.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",i.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",i.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",i.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",i.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",i.MANIFEST_LOAD_ERROR="manifestLoadError",i.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",i.MANIFEST_PARSING_ERROR="manifestParsingError",i.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",i.LEVEL_EMPTY_ERROR="levelEmptyError",i.LEVEL_LOAD_ERROR="levelLoadError",i.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",i.LEVEL_PARSING_ERROR="levelParsingError",i.LEVEL_SWITCH_ERROR="levelSwitchError",i.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",i.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",i.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",i.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",i.FRAG_LOAD_ERROR="fragLoadError",i.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",i.FRAG_DECRYPT_ERROR="fragDecryptError",i.FRAG_PARSING_ERROR="fragParsingError",i.FRAG_GAP="fragGap",i.REMUX_ALLOC_ERROR="remuxAllocError",i.KEY_LOAD_ERROR="keyLoadError",i.KEY_LOAD_TIMEOUT="keyLoadTimeOut",i.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",i.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",i.BUFFER_APPEND_ERROR="bufferAppendError",i.BUFFER_APPENDING_ERROR="bufferAppendingError",i.BUFFER_STALLED_ERROR="bufferStalledError",i.BUFFER_FULL_ERROR="bufferFullError",i.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",i.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",i.ASSET_LIST_LOAD_ERROR="assetListLoadError",i.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",i.ASSET_LIST_PARSING_ERROR="assetListParsingError",i.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",i.INTERNAL_EXCEPTION="internalException",i.INTERNAL_ABORTED="aborted",i.ATTACH_MEDIA_ERROR="attachMediaError",i.UNKNOWN="unknown",i}({}),m=function(i){return i.MEDIA_ATTACHING="hlsMediaAttaching",i.MEDIA_ATTACHED="hlsMediaAttached",i.MEDIA_DETACHING="hlsMediaDetaching",i.MEDIA_DETACHED="hlsMediaDetached",i.MEDIA_ENDED="hlsMediaEnded",i.STALL_RESOLVED="hlsStallResolved",i.BUFFER_RESET="hlsBufferReset",i.BUFFER_CODECS="hlsBufferCodecs",i.BUFFER_CREATED="hlsBufferCreated",i.BUFFER_APPENDING="hlsBufferAppending",i.BUFFER_APPENDED="hlsBufferAppended",i.BUFFER_EOS="hlsBufferEos",i.BUFFERED_TO_END="hlsBufferedToEnd",i.BUFFER_FLUSHING="hlsBufferFlushing",i.BUFFER_FLUSHED="hlsBufferFlushed",i.MANIFEST_LOADING="hlsManifestLoading",i.MANIFEST_LOADED="hlsManifestLoaded",i.MANIFEST_PARSED="hlsManifestParsed",i.LEVEL_SWITCHING="hlsLevelSwitching",i.LEVEL_SWITCHED="hlsLevelSwitched",i.LEVEL_LOADING="hlsLevelLoading",i.LEVEL_LOADED="hlsLevelLoaded",i.LEVEL_UPDATED="hlsLevelUpdated",i.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",i.LEVELS_UPDATED="hlsLevelsUpdated",i.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",i.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",i.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",i.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",i.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",i.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",i.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",i.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",i.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",i.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",i.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",i.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",i.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",i.CUES_PARSED="hlsCuesParsed",i.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",i.INIT_PTS_FOUND="hlsInitPtsFound",i.FRAG_LOADING="hlsFragLoading",i.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",i.FRAG_LOADED="hlsFragLoaded",i.FRAG_DECRYPTED="hlsFragDecrypted",i.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",i.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",i.FRAG_PARSING_METADATA="hlsFragParsingMetadata",i.FRAG_PARSED="hlsFragParsed",i.FRAG_BUFFERED="hlsFragBuffered",i.FRAG_CHANGED="hlsFragChanged",i.FPS_DROP="hlsFpsDrop",i.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",i.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",i.ERROR="hlsError",i.DESTROYING="hlsDestroying",i.KEY_LOADING="hlsKeyLoading",i.KEY_LOADED="hlsKeyLoaded",i.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",i.BACK_BUFFER_REACHED="hlsBackBufferReached",i.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",i.ASSET_LIST_LOADING="hlsAssetListLoading",i.ASSET_LIST_LOADED="hlsAssetListLoaded",i.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",i.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",i.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",i.INTERSTITIAL_STARTED="hlsInterstitialStarted",i.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",i.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",i.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",i.INTERSTITIAL_ENDED="hlsInterstitialEnded",i.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",i.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",i.EVENT_CUE_ENTER="hlsEventCueEnter",i}({});var ge={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},O={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class u{constructor(e,t=0,r=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_=r}sample(e,t){const r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*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 J{constructor(e,t,r,n=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_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new u(e),this.fast_=new u(t),this.defaultTTFB_=n,this.ttfb_=new u(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:s}=this;r.halfLife!==e&&(this.slow_=new u(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new u(t,n.getEstimate(),n.getTotalWeight())),s.halfLife!==e&&(this.ttfb_=new u(e,s.getEstimate(),s.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,n=e/1e3,s=r/n;this.fast_.sample(n,s),this.slow_.sample(n,s)}sampleTTFB(e){const t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,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 D(i,e,t){return(e=Y(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function B(){return B=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},B.apply(null,arguments)}function _(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),t.push.apply(t,r)}return t}function w(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?_(Object(t),!0).forEach(function(r){D(i,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(t,r))})}return i}function x(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var r=t.call(i,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function Y(i){var e=x(i,"string");return typeof e=="symbol"?e:e+""}class M{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 r=`[${e}]:`;this.trace=H,this.debug=t.debug.bind(null,r),this.log=t.log.bind(null,r),this.warn=t.warn.bind(null,r),this.info=t.info.bind(null,r),this.error=t.error.bind(null,r)}}const H=function(){},Q={trace:H,debug:H,log:H,warn:H,info:H,error:H};function P(){return B({},Q)}function X(i,e){const t=self.console[i];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${i}] >`):H}function ce(i,e,t){return e[i]?e[i].bind(e):X(i,t)}const _e=P();function we(i,e,t){const r=P();if(typeof console=="object"&&i===!0||typeof i=="object"){const n=["debug","log","info","warn","error"];n.forEach(s=>{r[s]=ce(s,i,t)});try{r.log(`Debug logs enabled for "${e}" in hls.js version 1.6.2`)}catch(s){return P()}n.forEach(s=>{_e[s]=ce(s,i)})}else B(_e,r);return r}const ne=_e;function ve(i=!0){return typeof self=="undefined"?void 0:(i||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Oe(i){return typeof self!="undefined"&&i===self.ManagedMediaSource}function le(i,e){const t=Object.keys(i),r=Object.keys(e),n=t.length,s=r.length;return!n||!s||n===s&&!t.some(A=>r.indexOf(A)===-1)}function Me(i,e=!1){if(typeof TextDecoder!="undefined"){const o=new TextDecoder("utf-8").decode(i);if(e){const h=o.indexOf("\0");return h!==-1?o.substring(0,h):o}return o.replace(/\0/g,"")}const t=i.length;let r,n,s,A="",a=0;for(;a<t;){if(r=i[a++],r===0&&e)return A;if(r===0||r===3)continue;switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:A+=String.fromCharCode(r);break;case 12:case 13:n=i[a++],A+=String.fromCharCode((r&31)<<6|n&63);break;case 14:n=i[a++],s=i[a++],A+=String.fromCharCode((r&15)<<12|(n&63)<<6|(s&63)<<0);break}}return A}const Z={hexDump:function(i){let e="";for(let t=0;t<i.length;t++){let r=i[t].toString(16);r.length<2&&(r="0"+r),e+=r}return e}};function I(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var G={exports:{}},z;function se(){return z||(z=1,function(i,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,A=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(l,o,h){if(h=h||{},l=l.trim(),o=o.trim(),!o){if(!h.alwaysNormalize)return l;var d=a.parseURL(l);if(!d)throw new Error("Error trying to parse base URL.");return d.path=a.normalizePath(d.path),a.buildURLFromParts(d)}var p=a.parseURL(o);if(!p)throw new Error("Error trying to parse relative URL.");if(p.scheme)return h.alwaysNormalize?(p.path=a.normalizePath(p.path),a.buildURLFromParts(p)):o;var v=a.parseURL(l);if(!v)throw new Error("Error trying to parse base URL.");if(!v.netLoc&&v.path&&v.path[0]!=="/"){var b=n.exec(v.path);v.netLoc=b[1],v.path=b[2]}v.netLoc&&!v.path&&(v.path="/");var S={scheme:v.scheme,netLoc:p.netLoc,path:null,params:p.params,query:p.query,fragment:p.fragment};if(!p.netLoc&&(S.netLoc=v.netLoc,p.path[0]!=="/"))if(!p.path)S.path=v.path,p.params||(S.params=v.params,p.query||(S.query=v.query));else{var F=v.path,te=F.substring(0,F.lastIndexOf("/")+1)+p.path;S.path=a.normalizePath(te)}return S.path===null&&(S.path=h.alwaysNormalize?a.normalizePath(p.path):p.path),a.buildURLFromParts(S)},parseURL:function(l){var o=r.exec(l);return o?{scheme:o[1]||"",netLoc:o[2]||"",path:o[3]||"",params:o[4]||"",query:o[5]||"",fragment:o[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(s,"");l.length!==(l=l.replace(A,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};i.exports=a})()}(G)),G.exports}var re=se();class E{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 y={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ${constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,dt(this,"stats")}setByteRange(e,t){const r=e.split("@",2);let n;r.length===1?n=(t==null?void 0:t.byteRangeEndOffset)||0:n=parseInt(r[1]),this._byteRange=[n,parseInt(r[0])+n]}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={[y.AUDIO]:null,[y.VIDEO]:null,[y.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 E),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=re.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[y.AUDIO]=null,e[y.VIDEO]=null,e[y.AUDIOVIDEO]=null}}function Ae(i){return i.sn!=="initSegment"}class Ge extends ${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){const e=this.byteRange[0],t=this.byteRange[1];if(V(e)&&V(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 r=Object.keys(this.levelkeys);if(r.length===1)return this._decryptdata=this.levelkeys[r[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=V(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){const t=Object.keys(this.levelkeys),r=t.length;if(r>1||r===1&&this.levelkeys[t[0]].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(!V(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Ae(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,r,n,s,A=!1){const{elementaryStreams:a}=this,l=a[e];if(!l){a[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:s,partial:A};return}l.startPTS=Math.min(l.startPTS,t),l.endPTS=Math.max(l.endPTS,r),l.startDTS=Math.min(l.startDTS,n),l.endDTS=Math.max(l.endDTS,s)}}class Je extends ${constructor(e,t,r,n,s){super(r),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=n;const A=e.enumeratedString("BYTERANGE");A&&this.setByteRange(A,s),s&&(this.fragOffset=s.fragOffset+s.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 yt(i,e){const t=Object.getPrototypeOf(i);if(t){const r=Object.getOwnPropertyDescriptor(t,e);return r||yt(t,e)}}function dt(i,e){const t=yt(i,e);t&&(t.enumerable=!0,Object.defineProperty(i,e,t))}const Rt=Math.pow(2,32)-1,bt=[].push,ht={video:1,audio:2,id3:3,text:4};function Le(i){return String.fromCharCode.apply(null,i)}function nt(i,e){const t=i[e]<<8|i[e+1];return t<0?65536+t:t}function Ie(i,e){const t=Lt(i,e);return t<0?4294967296+t:t}function wt(i,e){let t=Ie(i,e);return t*=Math.pow(2,32),t+=Ie(i,e+4),t}function Lt(i,e){return i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3]}function Be(i,e,t){i[e]=t>>24,i[e+1]=t>>16&255,i[e+2]=t>>8&255,i[e+3]=t&255}function L(i){const e=i.byteLength;for(let t=0;t<e;){const r=Ie(i,t);if(r>8&&i[t+4]===109&&i[t+5]===111&&i[t+6]===111&&i[t+7]===102)return!0;t=r>1?t+r:e}return!1}function g(i,e){const t=[];if(!e.length)return t;const r=i.byteLength;for(let n=0;n<r;){const s=Ie(i,n),A=Le(i.subarray(n+4,n+8)),a=s>1?n+s:r;if(A===e[0])if(e.length===1)t.push(i.subarray(n+8,a));else{const l=g(i.subarray(n+8,a),e.slice(1));l.length&&bt.apply(t,l)}n=a}return t}function C(i){const e=[],t=i[0];let r=8;const n=Ie(i,r);r+=4;let s=0,A=0;t===0?(s=Ie(i,r),A=Ie(i,r+4),r+=8):(s=wt(i,r),A=wt(i,r+8),r+=16),r+=2;let a=i.length+A;const l=nt(i,r);r+=2;for(let o=0;o<l;o++){let h=r;const d=Ie(i,h);h+=4;const p=d&2147483647;if((d&2147483648)>>>31===1)return ne.warn("SIDX has hierarchical references (not supported)"),null;const b=Ie(i,h);h+=4,e.push({referenceSize:p,subsegmentDuration:b,info:{duration:b/n,start:a,end:a+p-1}}),a+=p,h+=4,r=h}return{earliestPresentationTime:s,timescale:n,version:t,referencesCount:l,references:e}}function N(i){const e=[],t=g(i,["moov","trak"]);for(let n=0;n<t.length;n++){const s=t[n],A=g(s,["tkhd"])[0];if(A){let a=A[0];const l=Ie(A,a===0?12:20),o=g(s,["mdia","mdhd"])[0];if(o){a=o[0];const h=Ie(o,a===0?12:20),d=g(s,["mdia","hdlr"])[0];if(d){const p=Le(d.subarray(8,12)),v={soun:y.AUDIO,vide:y.VIDEO}[p],b=g(s,["mdia","minf","stbl","stsd"])[0],S=T(b);v?(e[l]={timescale:h,type:v,stsd:S},e[v]=w({timescale:h,id:l},S)):e[l]={timescale:h,type:p,stsd:S}}}}}return g(i,["moov","mvex","trex"]).forEach(n=>{const s=Ie(n,4),A=e[s];A&&(A.default={duration:Ie(n,12),flags:Ie(n,20)})}),e}function T(i){const e=i.subarray(8),t=e.subarray(86),r=Le(e.subarray(4,8));let n=r,s;const A=r==="enca"||r==="encv";if(A){const o=g(e,[r])[0].subarray(r==="enca"?28:78);g(o,["sinf"]).forEach(d=>{const p=g(d,["schm"])[0];if(p){const v=Le(p.subarray(4,8));if(v==="cbcs"||v==="cenc"){const b=g(d,["frma"])[0];b&&(n=Le(b))}}})}const a=n;switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const l=g(t,["avcC"])[0];l&&l.length>3&&(n+="."+be(l[1])+be(l[2])+be(l[3]),s=k(a==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const l=g(e,[r])[0],o=g(l.subarray(28),["esds"])[0];if(o&&o.length>7){let h=4;if(o[h++]!==3)break;h=ee(o,h),h+=2;const d=o[h++];if(d&128&&(h+=2),d&64&&(h+=o[h++]),o[h++]!==4)break;h=ee(o,h);const p=o[h++];if(p===64)n+="."+be(p);else break;if(h+=12,o[h++]!==5)break;h=ee(o,h);const v=o[h++];let b=(v&248)>>3;b===31&&(b+=1+((v&7)<<3)+((o[h]&224)>>5)),n+="."+b}break}case"hvc1":case"hev1":{const l=g(t,["hvcC"])[0];if(l&&l.length>12){const o=l[1],h=["","A","B","C"][o>>6],d=o&31,p=Ie(l,2),v=(o&32)>>5?"H":"L",b=l[12],S=l.subarray(6,12);n+="."+h+d,n+="."+p.toString(16).toUpperCase(),n+="."+v+b;let F="";for(let te=S.length;te--;){const fe=S[te];(fe||F)&&(F="."+fe.toString(16).toUpperCase()+F)}n+=F}s=k(a=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{n=k(n,t)||n;break}case"vp09":{const l=g(t,["vpcC"])[0];if(l&&l.length>6){const o=l[4],h=l[5],d=l[6]>>4&15;n+="."+Ue(o)+"."+Ue(h)+"."+Ue(d)}break}case"av01":{const l=g(t,["av1C"])[0];if(l&&l.length>2){const o=l[1]>>>5,h=l[1]&31,d=l[2]>>>7?"H":"M",p=(l[2]&64)>>6,v=(l[2]&32)>>5,b=o===2&&p?v?12:10:p?10:8,S=(l[2]&16)>>4,F=(l[2]&8)>>3,te=(l[2]&4)>>2,fe=l[2]&3;n+="."+o+"."+Ue(h)+d+"."+Ue(b)+"."+S+"."+F+te+fe+"."+Ue(1)+"."+Ue(1)+"."+Ue(1)+"."+0,s=k("dav1",t)}break}}return{codec:n,encrypted:A,supplemental:s}}function k(i,e){const t=g(e,["dvvC"]),r=t.length?t[0]:g(e,["dvcC"])[0];if(r){const n=r[2]>>1&127,s=r[2]<<5&32|r[3]>>3&31;return i+"."+Ue(n)+"."+Ue(s)}}function ee(i,e){const t=e+5;for(;i[e++]&128&&e<t;);return e}function be(i){return("0"+i.toString(16).toUpperCase()).slice(-2)}function Ue(i){return(i<10?"0":"")+i}function Ye(i,e){if(!i||!e)return i;const t=e.keyId;return t&&e.isCommonEncryption&&g(i,["moov","trak"]).forEach(n=>{const A=g(n,["mdia","minf","stbl","stsd"])[0].subarray(8);let a=g(A,["enca"]);const l=a.length>0;l||(a=g(A,["encv"])),a.forEach(o=>{const h=l?o.subarray(28):o.subarray(78);g(h,["sinf"]).forEach(p=>{const v=We(p);if(v){const b=v.subarray(8,24);b.some(S=>S!==0)||(ne.log(`[eme] Patching keyId in 'enc${l?"a":"v"}>sinf>>tenc' box: ${Z.hexDump(b)} -> ${Z.hexDump(t)}`),v.set(t,8))}})})}),i}function We(i){const e=g(i,["schm"])[0];if(e){const t=Le(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return g(i,["schi","tenc"])[0]}return null}function St(i,e){return g(e,["moof","traf"]).reduce((t,r)=>{const n=g(r,["tfdt"])[0],s=n[0],A=g(r,["tfhd"]).reduce((a,l)=>{const o=Ie(l,4),h=i[o];if(h){let d=Ie(n,4);if(s===1){if(d===Rt)return ne.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),a;d*=Rt+1,d+=Ie(n,8)}const p=h.timescale||9e4,v=d/p;if(V(v)&&(a===null||v<a))return v}return a},null);return A!==null&&V(A)&&(t===null||A<t)?A:t},null)}function Xe(i,e){let t=0,r=0,n=0;const s=g(i,["moof","traf"]);for(let A=0;A<s.length;A++){const a=s[A],l=g(a,["tfhd"])[0],o=Ie(l,4),h=e[o];if(!h)continue;const d=h.default,p=Ie(l,0)|(d==null?void 0:d.flags);let v=d==null?void 0:d.duration;p&8&&(p&2?v=Ie(l,12):v=Ie(l,8));const b=h.timescale||9e4,S=g(a,["trun"]);for(let F=0;F<S.length;F++){if(t=ut(S[F]),!t&&v){const te=Ie(S[F],4);t=v*te}h.type===y.VIDEO?r+=t/b:h.type===y.AUDIO&&(n+=t/b)}}if(r===0&&n===0){let A=1/0,a=0,l=0;const o=g(i,["sidx"]);for(let h=0;h<o.length;h++){const d=C(o[h]);if(d!=null&&d.references){A=Math.min(A,d.earliestPresentationTime/d.timescale);const p=d.references.reduce((v,b)=>v+b.info.duration||0,0);a=Math.max(a,p+d.earliestPresentationTime/d.timescale),l=a-A}}if(l&&V(l))return l}return r||n}function ut(i){const e=Ie(i,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let r=0;const n=Ie(i,4);for(let s=0;s<n;s++){if(e&256){const A=Ie(i,t);r+=A,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return r}function At(i,e,t){g(e,["moof","traf"]).forEach(r=>{g(r,["tfhd"]).forEach(n=>{const s=Ie(n,4),A=i[s];if(!A)return;const a=A.timescale||9e4;g(r,["tfdt"]).forEach(l=>{const o=l[0],h=t*a;if(h){let d=Ie(l,4);if(o===0)d-=h,d=Math.max(d,0),Be(l,4,d);else{d*=Math.pow(2,32),d+=Ie(l,8),d-=h,d=Math.max(d,0);const p=Math.floor(d/(Rt+1)),v=Math.floor(d%(Rt+1));Be(l,4,p),Be(l,8,v)}}})})})}function it(i){const e={valid:null,remainder:null},t=g(i,["moof"]);if(t.length<2)return e.remainder=i,e;const r=t[t.length-1];return e.valid=i.slice(0,r.byteOffset-8),e.remainder=i.slice(r.byteOffset-8),e}function Ne(i,e){const t=new Uint8Array(i.length+e.length);return t.set(i),t.set(e,i.length),t}function Ze(i,e){const t=[],r=e.samples,n=e.timescale,s=e.id;let A=!1;return g(r,["moof"]).map(l=>{const o=l.byteOffset-8;g(l,["traf"]).map(d=>{const p=g(d,["tfdt"]).map(v=>{const b=v[0];let S=Ie(v,4);return b===1&&(S*=Math.pow(2,32),S+=Ie(v,8)),S/n})[0];return p!==void 0&&(i=p),g(d,["tfhd"]).map(v=>{const b=Ie(v,4),S=Ie(v,0)&16777215,F=(S&1)!==0,te=(S&2)!==0,fe=(S&8)!==0;let oe=0;const pe=(S&16)!==0;let Te=0;const Ke=(S&32)!==0;let xe=8;b===s&&(F&&(xe+=8),te&&(xe+=4),fe&&(oe=Ie(v,xe),xe+=4),pe&&(Te=Ie(v,xe),xe+=4),Ke&&(xe+=4),e.type==="video"&&(A=lt(e.codec)),g(d,["trun"]).map($e=>{const st=$e[0],Pe=Ie($e,0)&16777215,Bt=(Pe&1)!==0;let kt=0;const Qr=(Pe&4)!==0,cr=(Pe&256)!==0;let nr=0;const Jt=(Pe&512)!==0;let ar=0;const or=(Pe&1024)!==0,Dt=(Pe&2048)!==0;let Pt=0;const Fr=Ie($e,4);let wr=8;Bt&&(kt=Ie($e,wr),wr+=4),Qr&&(wr+=4);let Ur=kt+o;for(let Zr=0;Zr<Fr;Zr++){if(cr?(nr=Ie($e,wr),wr+=4):nr=oe,Jt?(ar=Ie($e,wr),wr+=4):ar=Te,or&&(wr+=4),Dt&&(st===0?Pt=Ie($e,wr):Pt=Lt($e,wr),wr+=4),e.type===y.VIDEO){let nn=0;for(;nn<ar;){const bn=Ie(r,Ur);if(Ur+=4,vt(A,r[Ur])){const ui=r.subarray(Ur,Ur+bn);Ot(ui,A?2:1,i+Pt/n,t)}Ur+=bn,nn+=bn+4}}i+=nr/n}}))})})}),t}function lt(i){if(!i)return!1;const e=i.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function vt(i,e){if(i){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Ot(i,e,t,r){const n=Ct(i);let s=0;s+=e;let A=0,a=0,l=0;for(;s<n.length;){A=0;do{if(s>=n.length)break;l=n[s++],A+=l}while(l===255);a=0;do{if(s>=n.length)break;l=n[s++],a+=l}while(l===255);const o=n.length-s;let h=s;if(a<o)s+=a;else if(a>o){ne.error(`Malformed SEI payload. ${a} is too small, only ${o} bytes left to parse.`);break}if(A===4){if(n[h++]===181){const p=nt(n,h);if(h+=2,p===49){const v=Ie(n,h);if(h+=4,v===1195456820){const b=n[h++];if(b===3){const S=n[h++],F=31&S,te=64&S,fe=te?2+F*3:0,oe=new Uint8Array(fe);if(te){oe[0]=S;for(let pe=1;pe<fe;pe++)oe[pe]=n[h++]}r.push({type:b,payloadType:A,pts:t,bytes:oe})}}}}}else if(A===5&&a>16){const d=[];for(let b=0;b<16;b++){const S=n[h++].toString(16);d.push(S.length==1?"0"+S:S),(b===3||b===5||b===7||b===9)&&d.push("-")}const p=a-16,v=new Uint8Array(p);for(let b=0;b<p;b++)v[b]=n[h++];r.push({payloadType:A,pts:t,uuid:d.join(""),userData:Me(v),userDataBytes:v})}}}function Ct(i){const e=i.byteLength,t=[];let r=1;for(;r<e-2;)i[r]===0&&i[r+1]===0&&i[r+2]===3?(t.push(r+2),r+=2):r++;if(t.length===0)return i;const n=e-t.length,s=new Uint8Array(n);let A=0;for(r=0;r<n;A++,r++)A===t[0]&&(A++,t.shift()),s[r]=i[A];return s}function Wt(i){const e=i[0];let t="",r="",n=0,s=0,A=0,a=0,l=0,o=0;if(e===0){for(;Le(i.subarray(o,o+1))!=="\0";)t+=Le(i.subarray(o,o+1)),o+=1;for(t+=Le(i.subarray(o,o+1)),o+=1;Le(i.subarray(o,o+1))!=="\0";)r+=Le(i.subarray(o,o+1)),o+=1;r+=Le(i.subarray(o,o+1)),o+=1,n=Ie(i,12),s=Ie(i,16),a=Ie(i,20),l=Ie(i,24),o=28}else if(e===1){o+=4,n=Ie(i,o),o+=4;const d=Ie(i,o);o+=4;const p=Ie(i,o);for(o+=4,A=nc(2,32)*d+p,me(A)||(A=Number.MAX_SAFE_INTEGER,ne.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),a=Ie(i,o),o+=4,l=Ie(i,o),o+=4;Le(i.subarray(o,o+1))!=="\0";)t+=Le(i.subarray(o,o+1)),o+=1;for(t+=Le(i.subarray(o,o+1)),o+=1;Le(i.subarray(o,o+1))!=="\0";)r+=Le(i.subarray(o,o+1)),o+=1;r+=Le(i.subarray(o,o+1)),o+=1}const h=i.subarray(o,i.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:A,presentationTimeDelta:s,eventDuration:a,id:l,payload:h}}function Nt(i,...e){const t=e.length;let r=8,n=t;for(;n--;)r+=e[n].byteLength;const s=new Uint8Array(r);for(s[0]=r>>24&255,s[1]=r>>16&255,s[2]=r>>8&255,s[3]=r&255,s.set(i,4),n=0,r=8;n<t;n++)s.set(e[n],r),r+=e[n].byteLength;return s}function Xt(i,e,t){if(i.byteLength!==16)throw new RangeError("Invalid system id");let r,n;r=0,n=new Uint8Array;let s;r>0?(s=new Uint8Array(4),e.length>0&&new DataView(s.buffer).setUint32(0,e.length,!1)):s=new Uint8Array;const A=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(A.buffer).setUint32(0,t.byteLength,!1),Nt([112,115,115,104],new Uint8Array([r,0,0,0]),i,s,n,A,t||new Uint8Array)}function fr(i){const e=[];if(i instanceof ArrayBuffer){const t=i.byteLength;let r=0;for(;r+32<t;){const n=new DataView(i,r),s=Rr(n);e.push(s),r+=s.size}}return e}function Rr(i){const e=i.getUint32(0),t=i.byteOffset,r=i.byteLength;if(r<e)return{offset:t,size:r};if(i.getUint32(4)!==1886614376)return{offset:t,size:e};const s=i.getUint32(8)>>>24;if(s!==0&&s!==1)return{offset:t,size:e};const A=i.buffer,a=Z.hexDump(new Uint8Array(A,t+12,16)),l=i.getUint32(28);let o=null,h=null;if(s===0){if(e-32<l||l<22)return{offset:t,size:e};h=new Uint8Array(A,t+32,l)}else if(s===1){if(!l||r<t+32+l*16+16)return{offset:t,size:e};o=[];for(let d=0;d<l;d++)o.push(new Uint8Array(A,t+32+d*16,16))}return{version:s,systemId:a,kids:o,data:h,offset:t,size:e}}const It=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),jt={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 Re(i,e){const t=jt[e];return!!t&&!!t[i.slice(0,4)]}function Ce(i,e,t=!0){return!i.split(",").some(r=>!Ee(r,e,t))}function Ee(i,e,t=!0){var r;const n=ve(t);return(r=n==null?void 0:n.isTypeSupported(j(i,e)))!=null?r:!1}function j(i,e){return`${e}/mp4;codecs=${i}`}function ie(i){if(i){const e=i.substring(0,4);return jt.video[e]}return 2}function ae(i){const e=It();return i.split(",").reduce((t,r)=>{const s=e&&lt(r)?9:jt.video[r];return s?(s*2+t)/(t?3:2):(jt.audio[r]+t)/(t?2:1)},0)}const de={};function Se(i,e=!0){if(de[i])return de[i];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[i];for(let n=0;n<t.length;n++){var r;if(Ee(t[n],"audio",e))return de[i]=t[n],t[n];if(t[n]==="mp3"&&(r=ve(e))!=null&&r.isTypeSupported("audio/mpeg"))return""}return i}const xt=/flac|opus|mp4a\.40\.34/i;function gt(i,e=!0){return i.replace(xt,t=>Se(t.toLowerCase(),e))}function qe(i,e){const t=[];if(i){const r=i.split(",");for(let n=0;n<r.length;n++)Re(r[n],"video")||t.push(r[n])}return e&&t.push(e),t.join(",")}function Ht(i,e){if(i&&(i.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(i)!==-1))return i;if(e){const t=e.split(",");if(t.length>1){if(i){for(let r=t.length;r--;)if(t[r].substring(0,4)===i.substring(0,4))return t[r]}return t[0]}}return e||i}function Cr(i){const e=i.split(",");for(let t=0;t<e.length;t++){const r=e[t].split(".");if(r.length>2){let n=r.shift()+".";n+=parseInt(r.shift()).toString(16),n+=("000"+parseInt(r.shift()).toString(16)).slice(-4),e[t]=n}}return e.join(",")}function Nr(i){if(i.startsWith("av01.")){const e=i.split("."),t=["0","111","01","01","01","0"];for(let r=e.length;r>4&&r<10;r++)e[r]=t[r-4];return e.join(".")}return i}function Gt(i){const e=ve(i)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function Kt(i){return i.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Sr={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function $r(i,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:i}}const De={};function Ir(i,e,t,r,n,s){const A=i.audioCodec?i.audioGroups:null,a=s==null?void 0:s.audioCodec,l=s==null?void 0:s.channels,o=l?parseInt(l):a?1/0:2;let h=null;if(A!=null&&A.length)try{A.length===1&&A[0]?h=e.groups[A[0]].channels:h=A.reduce((d,p)=>{if(p){const v=e.groups[p];if(!v)throw new Error(`Audio track group ${p} not found`);Object.keys(v.channels).forEach(b=>{d[b]=(d[b]||0)+v.channels[b]})}return d},{2:0})}catch(d){return!0}return i.videoCodec!==void 0&&(i.width>1920&&i.height>1088||i.height>1920&&i.width>1088||i.frameRate>Math.max(r,30)||i.videoRange!=="SDR"&&i.videoRange!==t||i.bitrate>Math.max(n,8e6))||!!h&&V(o)&&Object.keys(h).some(d=>parseInt(d)>o)}function Er(i,e,t){const r=i.videoCodec,n=i.audioCodec;if(!r&&!n||!t)return Promise.resolve(Sr);const s=[];if(r){const A={width:i.width,height:i.height,bitrate:Math.ceil(Math.max(i.bitrate*.9,i.averageBitrate)),framerate:i.frameRate||30},a=i.videoRange;a!=="SDR"&&(A.transferFunction=a.toLowerCase());const l=r.split(","),o=navigator.userAgent;if(l.some(h=>lt(h))&&It())return Promise.resolve($r(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${o})`),s));s.push.apply(s,l.map(h=>({type:"media-source",video:w(w({},A),{},{contentType:j(Nr(h),"video")})})))}return n&&i.audioGroups&&i.audioGroups.forEach(A=>{var a;A&&((a=e.groups[A])==null||a.tracks.forEach(l=>{if(l.groupId===A){const o=l.channels||"",h=parseFloat(o);V(h)&&h>2&&s.push.apply(s,n.split(",").map(d=>({type:"media-source",audio:{contentType:j(d,"audio"),channels:""+h}})))}}))}),Promise.all(s.map(A=>{const a=Br(A);return De[a]||(De[a]=t.decodingInfo(A))})).then(A=>({supported:!A.some(a=>!a.supported),configurations:s,decodingInfoResults:A})).catch(A=>({supported:!1,configurations:s,decodingInfoResults:[],error:A}))}function Br(i){const{audio:e,video:t}=i,r=t||e;if(r){const n=Kt(r.contentType);if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${n}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${n}`}return""}const vn=["NONE","TYPE-0","TYPE-1",null];function Or(i){return vn.indexOf(i)>-1}const Jr=["SDR","PQ","HLG"];function An(i){return!!i&&Jr.indexOf(i)>-1}var Cn={No:"",Yes:"YES",v2:"v2"};function an(i){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=i,n=r<e/2;return e&&n?t?Cn.v2:Cn.Yes:Cn.No}class Rn{constructor(e,t,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}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 Pr{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(r=>!!r).map(r=>r.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const r=(t=e.supplemental)==null?void 0:t.videoCodec;r&&r!==e.videoCodec&&(this.codecSet+=`,${r.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 Qn(this._audioGroups,e)}hasSubtitleGroup(e){return Qn(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let r=this._audioGroups;r||(r=this._audioGroups=[]),r.indexOf(t)===-1&&r.push(t)}else if(e==="text"){let r=this._subtitleGroups;r||(r=this._subtitleGroups=[]),r.indexOf(t)===-1&&r.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 Qn(i,e){return!e||!i?!1:i.indexOf(e)!==-1}function Mr(){if(typeof matchMedia=="function"){const i=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(i.media!==e.media)return i.matches===!0}return!1}function en(i,e){let t=!1,r=[];if(i&&(t=i!=="SDR",r=[i]),e){r=e.allowedVideoRanges||Jr.slice(0);const n=r.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:n&&Mr(),t||(r=["SDR"])}return{preferHDR:t,allowedVideoRanges:r}}const Dn=i=>{const e=new WeakSet;return(t,r)=>{if(i&&(r=i(t,r)),typeof r=="object"&&r!==null){if(e.has(r))return;e.add(r)}return r}},br=(i,e)=>JSON.stringify(i,Dn(e));function jn(i,e,t,r,n){const s=Object.keys(i),A=r==null?void 0:r.channels,a=r==null?void 0:r.audioCodec,l=n==null?void 0:n.videoCodec,o=A&&parseInt(A)===2;let h=!1,d=!1,p=1/0,v=1/0,b=1/0,S=1/0,F=0,te=[];const{preferHDR:fe,allowedVideoRanges:oe}=en(e,n);for(let $e=s.length;$e--;){const st=i[s[$e]];h||(h=st.channels[2]>0),p=Math.min(p,st.minHeight),v=Math.min(v,st.minFramerate),b=Math.min(b,st.minBitrate),oe.filter(Bt=>st.videoRanges[Bt]>0).length>0&&(d=!0)}p=V(p)?p:0,v=V(v)?v:0;const pe=Math.max(1080,p),Te=Math.max(30,v);b=V(b)?b:t,t=Math.max(b,t),d||(e=void 0);const Ke=s.length>1;return{codecSet:s.reduce(($e,st)=>{const Pe=i[st];if(st===$e)return $e;if(te=d?oe.filter(Bt=>Pe.videoRanges[Bt]>0):[],Ke){if(Pe.minBitrate>t)return on(st,`min bitrate of ${Pe.minBitrate} > current estimate of ${t}`),$e;if(!Pe.hasDefaultAudio)return on(st,"no renditions with default or auto-select sound found"),$e;if(a&&st.indexOf(a.substring(0,4))%5!==0)return on(st,`audio codec preference "${a}" not found`),$e;if(A&&!o){if(!Pe.channels[A])return on(st,`no renditions with ${A} channel sound found (channels options: ${Object.keys(Pe.channels)})`),$e}else if((!a||o)&&h&&Pe.channels[2]===0)return on(st,"no renditions with stereo sound found"),$e;if(Pe.minHeight>pe)return on(st,`min resolution of ${Pe.minHeight} > maximum of ${pe}`),$e;if(Pe.minFramerate>Te)return on(st,`min framerate of ${Pe.minFramerate} > maximum of ${Te}`),$e;if(!te.some(Bt=>Pe.videoRanges[Bt]>0))return on(st,`no variants with VIDEO-RANGE of ${br(te)} found`),$e;if(l&&st.indexOf(l.substring(0,4))%5!==0)return on(st,`video codec preference "${l}" not found`),$e;if(Pe.maxScore<F)return on(st,`max score of ${Pe.maxScore} < selected max of ${F}`),$e}return $e&&(ae(st)>=ae($e)||Pe.fragmentError>i[$e].fragmentError)?$e:(S=Pe.minIndex,F=Pe.maxScore,st)},void 0),videoRanges:te,preferHDR:fe,minFramerate:v,minBitrate:b,minIndex:S}}function on(i,e){ne.log(`[abr] start candidates with "${i}" ignored because ${e}`)}function lr(i){return i.reduce((e,t)=>{let r=e.groups[t.groupId];r||(r=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(t);const n=t.channels||"2";return r.channels[n]=(r.channels[n]||0)+1,r.hasDefault=r.hasDefault||t.default,r.hasAutoSelect=r.hasAutoSelect||t.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function _r(i,e,t,r){return i.slice(t,r+1).reduce((n,s,A)=>{if(!s.codecSet)return n;const a=s.audioGroups;let l=n[s.codecSet];l||(n[s.codecSet]=l={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:A,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!a,fragmentError:0}),l.minBitrate=Math.min(l.minBitrate,s.bitrate);const o=Math.min(s.height,s.width);return l.minHeight=Math.min(l.minHeight,o),l.minFramerate=Math.min(l.minFramerate,s.frameRate),l.minIndex=Math.min(l.minIndex,A),l.maxScore=Math.max(l.maxScore,s.score),l.fragmentError+=s.fragmentError,l.videoRanges[s.videoRange]=(l.videoRanges[s.videoRange]||0)+1,a&&a.forEach(h=>{if(!h)return;const d=e.groups[h];d&&(l.hasDefaultAudio=l.hasDefaultAudio||e.hasDefaultAudio?d.hasDefault:d.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(d.channels).forEach(p=>{l.channels[p]=(l.channels[p]||0)+d.channels[p]}))}),n},{})}function ke(i){if(!i)return i;const{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:s}=i;return{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:s}}function ze(i,e,t){if("attrs"in i){const r=e.indexOf(i);if(r!==-1)return r}for(let r=0;r<e.length;r++){const n=e[r];if(_t(i,n,t))return r}return-1}function _t(i,e,t){const{groupId:r,name:n,lang:s,assocLang:A,default:a}=i,l=i.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(s===void 0||at(s,e.lang))&&(s===void 0||e.assocLang===A)&&(a===void 0||e.default===a)&&(l===void 0||e.forced===l)&&(!("characteristics"in i)||Tt(i.characteristics||"",e.characteristics))&&(t===void 0||t(i,e))}function at(i,e="--"){return i.length===e.length?i===e:i.startsWith(e)||e.startsWith(i)}function Tt(i,e=""){const t=i.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function tt(i,e){const{audioCodec:t,channels:r}=i;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function ot(i,e,t,r,n){const s=e[r],a=e.reduce((p,v,b)=>{const S=v.uri;return(p[S]||(p[S]=[])).push(b),p},{})[s.uri];a.length>1&&(r=Math.max.apply(Math,a));const l=s.videoRange,o=s.frameRate,h=s.codecSet.substring(0,4),d=Ut(e,r,p=>{if(p.videoRange!==l||p.frameRate!==o||p.codecSet.substring(0,4)!==h)return!1;const v=p.audioGroups,b=t.filter(S=>!v||v.indexOf(S.groupId)!==-1);return ze(i,b,n)>-1});return d>-1?d:Ut(e,r,p=>{const v=p.audioGroups,b=t.filter(S=>!v||v.indexOf(S.groupId)!==-1);return ze(i,b,n)>-1})}function Ut(i,e,t){for(let r=e;r>-1;r--)if(t(i[r]))return r;for(let r=e+1;r<i.length;r++)if(t(i[r]))return r;return-1}function Zt(i,e){var t;return!!i&&i!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Ar extends M{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.bwEstimator=void 0,this._abandonRulesCheck=t=>{var r;const{fragCurrent:n,partCurrent:s,hls:A}=this,{autoLevelEnabled:a,media:l}=A;if(!n||!l)return;const o=performance.now(),h=s?s.stats:n.stats,d=s?s.duration:n.duration,p=o-h.loading.start,v=A.minAutoLevel,b=n.level,S=this._nextAutoLevel;if(h.aborted||h.loaded&&h.loaded===h.total||b<=v){this.clearTimer(),this._nextAutoLevel=-1;return}if(!a)return;const F=S>-1&&S!==b,te=!!t||F;if(!te&&(l.paused||!l.playbackRate||!l.readyState))return;const fe=A.mainForwardBufferInfo;if(!te&&fe===null)return;const oe=this.bwEstimator.getEstimateTTFB(),pe=Math.abs(l.playbackRate);if(p<=Math.max(oe,1e3*(d/(pe*2))))return;const Te=fe?fe.len/pe:0,Ke=h.loading.first?h.loading.first-h.loading.start:-1,xe=h.loaded&&Ke>-1,$e=this.getBwEstimate(),st=A.levels,Pe=st[b],Bt=Math.max(h.loaded,Math.round(d*(n.bitrate||Pe.averageBitrate)/8));let kt=xe?p-Ke:p;kt<1&&xe&&(kt=Math.min(p,h.loaded*8/$e));const Qr=xe?h.loaded*1e3/kt:0,cr=oe/1e3,nr=Qr?(Bt-h.loaded)/Qr:Bt*8/$e+cr;if(nr<=Te)return;const Jt=Qr?Qr*8:$e,ar=((r=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:r.live)===!0,or=this.hls.config.abrBandWidthUpFactor;let Dt=Number.POSITIVE_INFINITY,Pt;for(Pt=b-1;Pt>v;Pt--){const Zr=st[Pt].maxBitrate,nn=!st[Pt].details||ar;if(Dt=this.getTimeToLoadFrag(cr,Jt,d*Zr,nn),Dt<Math.min(Te,d+cr))break}if(Dt>=nr||Dt>d*10)return;xe?this.bwEstimator.sample(p-Math.min(oe,Ke),h.loaded):this.bwEstimator.sampleTTFB(p);const Fr=st[Pt].maxBitrate;this.getBwEstimate()*or>Fr&&this.resetEstimator(Fr);const wr=this.findBestLevel(Fr,v,Pt,0,Te,1,1);wr>-1&&(Pt=wr),this.warn(`Fragment ${n.sn}${s?" part "+s.index:""} of level ${b} is loading too slowly;
Fragment duration: ${n.duration.toFixed(3)}
Time to underbuffer: ${Te.toFixed(3)} s
Estimated load time for current fragment: ${nr.toFixed(3)} s
Estimated load time for down switch fragment: ${Dt.toFixed(3)} s
TTFB estimate: ${Ke|0} ms
Current BW estimate: ${V($e)?$e|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${Pt} @ ${Fr|0} bps`),A.nextLoadLevel=A.nextAutoLevel=Pt,this.clearTimer();const Ur=()=>{if(this.clearTimer(),this.fragCurrent===n&&this.hls.loadLevel===Pt&&Pt>0){const Zr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Pt>0?"and switching down":""}
Fragment duration: ${n.duration.toFixed(3)} s
Time to underbuffer: ${Zr.toFixed(3)} s`),n.abortRequests(),this.fragCurrent=this.partCurrent=null,Pt>v){let nn=this.findBestLevel(this.hls.levels[v].bitrate,v,Pt,0,Zr,1,1);nn===-1&&(nn=v),this.hls.nextLoadLevel=this.hls.nextAutoLevel=nn,this.resetEstimator(this.hls.levels[nn].bitrate)}}};F||nr>Dt*2?Ur():this.timer=self.setInterval(Ur,Dt*1e3),A.trigger(m.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,part:s,stats:h})},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 J(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(m.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,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 r=t.frag;if(!this.ignoreFragment(r)){if(!r.bitrateTest){var n;this.fragCurrent=r,this.partCurrent=(n=t.part)!=null?n: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 W.BUFFER_ADD_CODEC_ERROR:case W.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case W.FRAG_LOAD_TIMEOUT:{const r=t.frag,{fragCurrent:n,partCurrent:s}=this;if(r&&n&&r.sn===n.sn&&r.level===n.level){const A=performance.now(),a=s?s.stats:r.stats,l=A-a.loading.start,o=a.loading.first?a.loading.first-a.loading.start:-1;if(a.loaded&&o>-1){const d=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(l-Math.min(d,o),a.loaded)}else this.bwEstimator.sampleTTFB(l)}break}}}getTimeToLoadFrag(e,t,r,n){const s=e+r/t,A=n?e+this.lastLevelLoadSec:0;return s+A}onLevelLoaded(e,t){const r=this.hls.config,{loading:n}=t.stats,s=n.end-n.first;V(s)&&(this.lastLevelLoadSec=s/1e3),t.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:r}){const n=r?r.stats:t.stats;if(t.type===O.MAIN&&this.bwEstimator.sampleTTFB(n.loading.first-n.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const s=r?r.duration:t.duration,A=this.hls.levels[t.level],a=(A.loaded?A.loaded.bytes:0)+n.loaded,l=(A.loaded?A.loaded.duration:0)+s;A.loaded={bytes:a,duration:l},A.realBitrate=Math.round(8*a/l)}if(t.bitrateTest){const s={stats:n,frag:t,part:r,id:t.type};this.onFragBuffered(m.FRAG_BUFFERED,s),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:r,part:n}=t,s=n!=null&&n.stats.loaded?n.stats:r.stats;if(s.aborted||this.ignoreFragment(r))return;const A=s.parsing.end-s.loading.start-Math.min(s.loading.first-s.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(A,s.loaded),s.bwEstimate=this.getBwEstimate(),r.bitrateTest?this.bitrateTestDelay=A/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==O.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,r=this.getBwEstimate(),n=this.hls.config.maxStarvationDelay,s=this.findBestLevel(r,t,e,0,n,1,1);if(s>-1)return s;const A=this.hls.firstLevel,a=Math.min(Math.max(A,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${A} clamped to ${a}`),a}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,r=this.bwEstimator.canEstimate(),n=this.lastLoadedFragLevel>-1;if(e!==-1&&(!r||!n||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const s=r&&n?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const A=this.hls.levels;if(A.length>Math.max(e,s)&&A[e].loadError<=A[s].loadError)return e}return this._nextAutoLevel=s,this.nextAutoLevelKey=this.getAutoLevelKey(),s}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:r}=this;if(r.levels.length<=1)return r.loadLevel;const{maxAutoLevel:n,config:s,minAutoLevel:A}=r,a=t?t.duration:e?e.duration:0,l=this.getBwEstimate(),o=this.getStarvationDelay();let h=s.abrBandWidthFactor,d=s.abrBandWidthUpFactor;if(o){const F=this.findBestLevel(l,A,n,o,0,h,d);if(F>=0)return this.rebufferNotice=-1,F}let p=a?Math.min(a,s.maxStarvationDelay):s.maxStarvationDelay;if(!o){const F=this.bitrateTestDelay;F&&(p=(a?Math.min(a,s.maxLoadingDelay):s.maxLoadingDelay)-F,this.info(`bitrate test took ${Math.round(1e3*F)}ms, set first fragment max fetchDuration to ${Math.round(1e3*p)} ms`),h=d=1)}const v=this.findBestLevel(l,A,n,o,p,h,d);if(this.rebufferNotice!==v&&(this.rebufferNotice=v,this.info(`${o?"rebuffering expected":"buffer is empty"}, optimal quality level ${v}`)),v>-1)return v;const b=r.levels[A],S=r.loadLevelObj;return S&&(b==null?void 0:b.bitrate)<S.bitrate?A:r.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const r=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,n=e.mainForwardBufferInfo;return(n?n.len:0)/r}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,r,n,s,A,a){var l;const o=n+s,h=this.lastLoadedFragLevel,d=h===-1?this.hls.firstLevel:h,{fragCurrent:p,partCurrent:v}=this,{levels:b,allAudioTracks:S,loadLevel:F,config:te}=this.hls;if(b.length===1)return 0;const fe=b[d],oe=!!((l=this.hls.latestLevelDetails)!=null&&l.live),pe=F===-1||h===-1;let Te,Ke="SDR",xe=(fe==null?void 0:fe.frameRate)||0;const{audioPreference:$e,videoPreference:st}=te,Pe=this.audioTracksByGroup||(this.audioTracksByGroup=lr(S));let Bt=-1;if(pe){if(this.firstSelection!==-1)return this.firstSelection;const Jt=this.codecTiers||(this.codecTiers=_r(b,Pe,t,r)),ar=jn(Jt,Ke,e,$e,st),{codecSet:or,videoRanges:Dt,minFramerate:Pt,minBitrate:Fr,minIndex:wr,preferHDR:Ur}=ar;Bt=wr,Te=or,Ke=Ur?Dt[Dt.length-1]:Dt[0],xe=Pt,e=Math.max(e,Fr),this.log(`picked start tier ${br(ar)}`)}else Te=fe==null?void 0:fe.codecSet,Ke=fe==null?void 0:fe.videoRange;const kt=v?v.duration:p?p.duration:0,Qr=this.bwEstimator.getEstimateTTFB()/1e3,cr=[];for(let Jt=r;Jt>=t;Jt--){var nr;const ar=b[Jt],or=Jt>d;if(!ar)continue;if(te.useMediaCapabilities&&!ar.supportedResult&&!ar.supportedPromise){const nn=navigator.mediaCapabilities;typeof(nn==null?void 0:nn.decodingInfo)=="function"&&(Ir(ar,Pe,Ke,xe,e,$e)||lt(ar.videoCodec))?(ar.supportedPromise=Er(ar,Pe,nn),ar.supportedPromise.then(bn=>{if(!this.hls)return;ar.supportedResult=bn;const ui=this.hls.levels,mi=ui.indexOf(ar);bn.error?this.warn(`MediaCapabilities decodingInfo error: "${bn.error}" for level ${mi} ${br(bn)}`):bn.supported||(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${mi} ${br(bn)}`),mi>-1&&ui.length>1&&(this.log(`Removing unsupported level ${mi}`),this.hls.removeLevel(mi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))})):ar.supportedResult=Sr}if((Te&&ar.codecSet!==Te||Ke&&ar.videoRange!==Ke||or&&xe>ar.frameRate||!or&&xe>0&&xe<ar.frameRate||ar.supportedResult&&!((nr=ar.supportedResult.decodingInfoResults)!=null&&nr[0].smooth))&&(!pe||Jt!==Bt)){cr.push(Jt);continue}const Dt=ar.details,Pt=(v?Dt==null?void 0:Dt.partTarget:Dt==null?void 0:Dt.averagetargetduration)||kt;let Fr;or?Fr=a*e:Fr=A*e;const wr=kt&&n>=kt*2&&s===0?ar.averageBitrate:ar.maxBitrate,Ur=this.getTimeToLoadFrag(Qr,Fr,wr*Pt,Dt===void 0);if(Fr>=wr&&(Jt===h||ar.loadError===0&&ar.fragmentError===0)&&(Ur<=Qr||!V(Ur)||oe&&!this.bitrateTestDelay||Ur<o)){const nn=this.forcedAutoLevel;return Jt!==F&&(nn===-1||nn!==F)&&(cr.length&&this.trace(`Skipped level(s) ${cr.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${b[cr[0]].codecs}" ${b[cr[0]].videoRange}; not compatible with "${Te}" ${Ke}`),this.info(`switch candidate:${d}->${Jt} adjustedbw(${Math.round(Fr)})-bitrate=${Math.round(Fr-wr)} ttfb:${Qr.toFixed(1)} avgDuration:${Pt.toFixed(1)} maxFetchDuration:${o.toFixed(1)} fetchDuration:${Ur.toFixed(1)} firstSelection:${pe} codecSet:${ar.codecSet} videoRange:${ar.videoRange} hls.loadLevel:${F}`)),pe&&(this.firstSelection=Jt),Jt}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:r}=this.hls;return Math.min(Math.max(e,r),t)}}const yr={search:function(i,e){let t=0,r=i.length-1,n=null,s=null;for(;t<=r;){n=(t+r)/2|0,s=i[n];const A=e(s);if(A>0)t=n+1;else if(A<0)r=n-1;else return s}return null}};function hr(i,e,t){if(e===null||!Array.isArray(i)||!i.length||!V(e))return null;const r=i[0].programDateTime;if(e<(r||0))return null;const n=i[i.length-1].endProgramDateTime;if(e>=(n||0))return null;t=t||0;for(let s=0;s<i.length;++s){const A=i[s];if(q(e,t,A))return A}return null}function Tr(i,e,t=0,r=0,n=.005){let s=null;if(i){s=e[1+i.sn-e[0].sn]||null;const a=i.endDTS-t;a>0&&a<15e-7&&(t+=15e-7),s&&i.level!==s.level&&s.end<=i.end&&(s=e[2+i.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(s=e[0]);if(s&&((!i||i.level===s.level)&&R(t,r,s)===0||U(s,i,Math.min(n,r))))return s;const A=yr.search(e,R.bind(null,t,r));return A&&(A!==i||!s)?A:s}function U(i,e,t){if(e&&e.start===0&&e.level<i.level&&(e.endPTS||0)>0){const r=e.tagList.reduce((n,s)=>(s[0]==="INF"&&(n+=parseFloat(s[1])),n),t);return i.start<=r}return!1}function R(i=0,e=0,t){if(t.start<=i&&t.start+t.duration>i)return 0;const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-r<=i?1:t.start-r>i&&t.start?-1:0}function q(i,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>i}function ue(i,e){return yr.search(i,t=>t.cc<e?1:t.cc>e?-1:0)}function Qe(i,e,t){if(i&&i.startCC<=e&&i.endCC>=e){const r=t.start,n=t.end;let s=i.fragments;if(!t.relurl){const{fragmentHint:A}=i;A&&(s=s.concat(A))}return yr.search(s,A=>A.cc<e||A.end<=r?1:A.cc>e||A.start>=n?-1:0)}return null}function He(i){switch(i.details){case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_TIMEOUT:case W.LEVEL_LOAD_TIMEOUT:case W.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function rt(i,e){const t=He(e);return i.default[`${t?"timeout":"error"}Retry`]}function et(i,e){const t=i.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*i.retryDelayMs,i.maxRetryDelayMs)}function Ft(i){return w(w({},i),{errorRetry:null,timeoutRetry:null})}function pt(i,e,t,r){if(!i)return!1;const n=r==null?void 0:r.code,s=e<i.maxNumRetry&&(ye(n)||!!t);return i.shouldRetry?i.shouldRetry(i,e,t,r,s):s}function ye(i){return i===0&&navigator.onLine===!1||!!i&&(i<400||i>499)}var je={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},ct={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class zt extends M{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.ERROR,this.onError,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.ERROR,this.onError,this),e.off(m.ERROR,this.onErrorOut,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===O.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var r;if(t.fatal)return;const n=this.hls,s=t.context;switch(t.details){case W.FRAG_LOAD_ERROR:case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_ERROR:case W.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case W.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction=Vt();return}case W.FRAG_GAP:case W.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=je.SendAlternateToPenaltyBox;return}case W.LEVEL_EMPTY_ERROR:case W.LEVEL_PARSING_ERROR:{var A,a;const o=t.parent===O.MAIN?t.level:n.loadLevel;t.details===W.LEVEL_EMPTY_ERROR&&((A=t.context)!=null&&(a=A.levelDetails)!=null&&a.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,o):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,o))}return;case W.LEVEL_LOAD_ERROR:case W.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s.level));return;case W.AUDIO_TRACK_LOAD_ERROR:case W.AUDIO_TRACK_LOAD_TIMEOUT:case W.SUBTITLE_LOAD_ERROR:case W.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const o=n.loadLevelObj;if(o&&(s.type===ge.AUDIO_TRACK&&o.hasAudioGroup(s.groupId)||s.type===ge.SUBTITLE_TRACK&&o.hasSubtitleGroup(s.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=je.SendAlternateToPenaltyBox,t.errorAction.flags=ct.MoveAllAlternatesMatchingHost;return}}return;case W.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const o=n.loadLevelObj,h=o==null?void 0:o.attrs["HDCP-LEVEL"];h?t.errorAction={action:je.SendAlternateToPenaltyBox,flags:ct.MoveAllAlternatesMatchingHDCP,hdcpLevel:h}:this.keySystemError(t)}return;case W.BUFFER_ADD_CODEC_ERROR:case W.REMUX_ALLOC_ERROR:case W.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:n.loadLevel)}return;case W.INTERNAL_EXCEPTION:case W.BUFFER_APPENDING_ERROR:case W.BUFFER_FULL_ERROR:case W.LEVEL_SWITCH_ERROR:case W.BUFFER_STALLED_ERROR:case W.BUFFER_SEEK_OVER_HOLE:case W.BUFFER_NUDGE_ON_STALL:t.errorAction=Vt();return}t.type===he.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const r=this.hls,n=rt(r.config.playlistLoadPolicy,e),s=this.playlistError++;if(pt(n,s,He(e),e.response))return{action:je.RetryRequest,flags:ct.None,retryConfig:n,retryCount:s};const a=this.getLevelSwitchAction(e,t);return n&&(a.retryConfig=n,a.retryCount=s),a}getFragRetryOrSwitchAction(e){const t=this.hls,r=this.getVariantLevelIndex(e.frag),n=t.levels[r],{fragLoadPolicy:s,keyLoadPolicy:A}=t.config,a=rt(e.details.startsWith("key")?A:s,e),l=t.levels.reduce((h,d)=>h+d.fragmentError,0);if(n&&(e.details!==W.FRAG_GAP&&n.fragmentError++,pt(a,l,He(e),e.response)))return{action:je.RetryRequest,flags:ct.None,retryConfig:a,retryCount:l};const o=this.getLevelSwitchAction(e,r);return a&&(o.retryConfig=a,o.retryCount=l),o}getLevelSwitchAction(e,t){const r=this.hls;t==null&&(t=r.loadLevel);const n=this.hls.levels[t];if(n){var s,A;const o=e.details;n.loadError++,o===W.BUFFER_APPEND_ERROR&&n.fragmentError++;let h=-1;const{levels:d,loadLevel:p,minAutoLevel:v,maxAutoLevel:b}=r;r.autoLevelEnabled||(r.loadLevel=-1);const S=(s=e.frag)==null?void 0:s.type,te=(S===O.AUDIO&&o===W.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(o===W.BUFFER_ADD_CODEC_ERROR||o===W.BUFFER_APPEND_ERROR))&&d.some(({audioCodec:Ke})=>n.audioCodec!==Ke),oe=e.sourceBufferName==="video"&&(o===W.BUFFER_ADD_CODEC_ERROR||o===W.BUFFER_APPEND_ERROR)&&d.some(({codecSet:Ke,audioCodec:xe})=>n.codecSet!==Ke&&n.audioCodec===xe),{type:pe,groupId:Te}=(A=e.context)!=null?A:{};for(let Ke=d.length;Ke--;){const xe=(Ke+p)%d.length;if(xe!==p&&xe>=v&&xe<=b&&d[xe].loadError===0){var a,l;const $e=d[xe];if(o===W.FRAG_GAP&&S===O.MAIN&&e.frag){const st=d[xe].details;if(st){const Pe=Tr(e.frag,st.fragments,e.frag.start);if(Pe!=null&&Pe.gap)continue}}else{if(pe===ge.AUDIO_TRACK&&$e.hasAudioGroup(Te)||pe===ge.SUBTITLE_TRACK&&$e.hasSubtitleGroup(Te))continue;if(S===O.AUDIO&&(a=n.audioGroups)!=null&&a.some(st=>$e.hasAudioGroup(st))||S===O.SUBTITLE&&(l=n.subtitleGroups)!=null&&l.some(st=>$e.hasSubtitleGroup(st))||te&&n.audioCodec===$e.audioCodec||!te&&n.audioCodec!==$e.audioCodec||oe&&n.codecSet===$e.codecSet)continue}h=xe;break}}if(h>-1&&r.loadLevel!==h)return e.levelRetry=!0,this.playlistError=0,{action:je.SendAlternateToPenaltyBox,flags:ct.None,nextAutoLevel:h}}return{action:je.SendAlternateToPenaltyBox,flags:ct.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case je.DoNothing:break;case je.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==W.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 je.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,r=e.errorAction;if(!r)return;const{flags:n,hdcpLevel:s,nextAutoLevel:A}=r;switch(n){case ct.None:this.switchLevel(e,A);break;case ct.MoveAllAlternatesMatchingHDCP:s&&(t.maxHdcpLevel=vn[vn.indexOf(s)-1],r.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}r.resolved||this.switchLevel(e,A)}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===W.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const r=Kt(e.mimeType),n=this.hls.levels;for(let s=n.length;s--;)n[s][`${e.sourceBufferName}Codec`]===r&&this.hls.removeLevel(s)}}}function Vt(i){const e={action:je.DoNothing,flags:ct.None};return i&&(e.resolved=!0),e}var Et={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Mt{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.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const r=this.activePartLists[t];if(r)for(let n=r.length;n--;){const s=r[n];if(!s)break;const A=s.end;if(s.start<=e&&A!==null&&e<=A)return s}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,r){const{fragments:n}=this,s=Object.keys(n);for(let A=s.length;A--;){const a=n[s[A]];if((a==null?void 0:a.body.type)===t&&(!r||a.buffered)){const l=a.body;if(l.start<=e&&e<=l.end)return l}}return null}detectEvictedFragments(e,t,r,n,s){this.timeRanges&&(this.timeRanges[e]=t);const A=(n==null?void 0:n.fragment.sn)||-1;Object.keys(this.fragments).forEach(a=>{const l=this.fragments[a];if(!l||A>=l.body.sn)return;if(!l.buffered&&(!l.loaded||s)){l.body.type===r&&this.removeFragment(l.body);return}const o=l.range[e];if(o){if(o.time.length===0){this.removeFragment(l.body);return}o.time.some(h=>{const d=!this.isTimeBuffered(h.startPTS,h.endPTS,t);return d&&this.removeFragment(l.body),d})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const r=e.frag,n=sr(r),s=this.fragments[n];if(!s||s.buffered&&r.gap)return;const A=!r.relurl;Object.keys(t).forEach(a=>{const l=r.elementaryStreams[a];if(!l)return;const o=t[a],h=A||l.partial===!0;s.range[a]=this.getBufferedTimes(r,e.part,h,o)}),s.loaded=null,Object.keys(s.range).length?(s.buffered=!0,(s.body.endList=r.endList||s.body.endList)&&(this.endListFragments[s.body.type]=s),Yt(s)||this.removeParts(r.sn-1,r.type)):this.removeFragment(s.body)}removeParts(e,t){const r=this.activePartLists[t];r&&(this.activePartLists[t]=ir(r,n=>n.fragment.sn>=e))}fragBuffered(e,t){const r=sr(e);let n=this.fragments[r];!n&&t&&(n=this.fragments[r]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),n&&(n.loaded=null,n.buffered=!0)}getBufferedTimes(e,t,r,n){const s={time:[],partial:r},A=e.start,a=e.end,l=e.minEndPTS||a,o=e.maxStartPTS||A;for(let h=0;h<n.length;h++){const d=n.start(h)-this.bufferPadding,p=n.end(h)+this.bufferPadding;if(o>=d&&l<=p){s.time.push({startPTS:Math.max(A,n.start(h)),endPTS:Math.min(a,n.end(h))});break}else if(A<p&&a>d){const v=Math.max(A,n.start(h)),b=Math.min(a,n.end(h));b>v&&(s.partial=!0,s.time.push({startPTS:v,endPTS:b}))}else if(a<=d)break}return s}getPartialFragment(e){let t=null,r,n,s,A=0;const{bufferPadding:a,fragments:l}=this;return Object.keys(l).forEach(o=>{const h=l[o];h&&Yt(h)&&(n=h.body.start-a,s=h.body.end+a,e>=n&&e<=s&&(r=Math.min(e-n,s-e),A<=r&&(t=h.body,A=r)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Yt(t))}getState(e){const t=sr(e),r=this.fragments[t];return r?r.buffered?Yt(r)?Et.PARTIAL:Et.OK:Et.APPENDING:Et.NOT_LOADED}isTimeBuffered(e,t,r){let n,s;for(let A=0;A<r.length;A++){if(n=r.start(A)-this.bufferPadding,s=r.end(A)+this.bufferPadding,e>=n&&t<=s)return!0;if(t<=n)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const r=t.frag,n=t.part?null:t,s=sr(r);this.fragments[s]={body:r,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:r,part:n,timeRanges:s,type:A}=t;if(r.sn==="initSegment")return;const a=r.type;if(n){let o=this.activePartLists[a];o||(this.activePartLists[a]=o=[]),o.push(n)}this.timeRanges=s;const l=s[A];this.detectEvictedFragments(A,l,a,n)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=sr(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,r=Object.keys(t);if(!e)return r.length>0;for(let n=r.length;n--;){const s=t[r[n]];if((s==null?void 0:s.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,r,n,s){n&&!this.hasGaps||Object.keys(this.fragments).forEach(A=>{const a=this.fragments[A];if(!a)return;const l=a.body;l.type!==r||n&&!l.gap||l.start<t&&l.end>e&&(a.buffered||s)&&this.removeFragment(l)})}removeFragment(e){const t=sr(e);e.clearElementaryStreamInfo();const r=this.activePartLists[e.type];if(r){const n=e.sn;this.activePartLists[e.type]=ir(r,s=>s.fragment.sn!==n)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e,t;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const r=(e=this.hls)==null||(t=e.latestLevelDetails)==null?void 0:t.partList;r&&r.forEach(n=>n.clearElementaryStreamInfo())}}function Yt(i){var e,t,r;return i.buffered&&(i.body.gap||((e=i.range.video)==null?void 0:e.partial)||((t=i.range.audio)==null?void 0:t.partial)||((r=i.range.audiovideo)==null?void 0:r.partial))}function sr(i){return`${i.type}_${i.level}_${i.sn}`}function ir(i,e){return i.filter(t=>{const r=e(t);return r||t.clearElementaryStreamInfo(),r})}var $t={cbc:0,ctr:1};class mr{constructor(e,t,r){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=r}decrypt(e,t){switch(this.aesMode){case $t.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case $t.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 ur(i){const e=i.byteLength,t=e&&new DataView(i.buffer).getUint8(e-1);return t?i.slice(0,e-t):i}class Dr{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),r=new Uint32Array(4);for(let n=0;n<4;n++)r[n]=t.getUint32(n*4);return r}initTable(){const e=this.sBox,t=this.invSBox,r=this.subMix,n=r[0],s=r[1],A=r[2],a=r[3],l=this.invSubMix,o=l[0],h=l[1],d=l[2],p=l[3],v=new Uint32Array(256);let b=0,S=0,F=0;for(F=0;F<256;F++)F<128?v[F]=F<<1:v[F]=F<<1^283;for(F=0;F<256;F++){let te=S^S<<1^S<<2^S<<3^S<<4;te=te>>>8^te&255^99,e[b]=te,t[te]=b;const fe=v[b],oe=v[fe],pe=v[oe];let Te=v[te]*257^te*16843008;n[b]=Te<<24|Te>>>8,s[b]=Te<<16|Te>>>16,A[b]=Te<<8|Te>>>24,a[b]=Te,Te=pe*16843009^oe*65537^fe*257^b*16843008,o[te]=Te<<24|Te>>>8,h[te]=Te<<16|Te>>>16,d[te]=Te<<8|Te>>>24,p[te]=Te,b?(b=fe^v[v[v[pe^fe]]],S^=v[v[S]]):b=S=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let r=!0,n=0;for(;n<t.length&&r;)r=t[n]===this.key[n],n++;if(r)return;this.key=t;const s=this.keySize=t.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);const A=this.ksRows=(s+6+1)*4;let a,l;const o=this.keySchedule=new Uint32Array(A),h=this.invKeySchedule=new Uint32Array(A),d=this.sBox,p=this.rcon,v=this.invSubMix,b=v[0],S=v[1],F=v[2],te=v[3];let fe,oe;for(a=0;a<A;a++){if(a<s){fe=o[a]=t[a];continue}oe=fe,a%s===0?(oe=oe<<8|oe>>>24,oe=d[oe>>>24]<<24|d[oe>>>16&255]<<16|d[oe>>>8&255]<<8|d[oe&255],oe^=p[a/s|0]<<24):s>6&&a%s===4&&(oe=d[oe>>>24]<<24|d[oe>>>16&255]<<16|d[oe>>>8&255]<<8|d[oe&255]),o[a]=fe=(o[a-s]^oe)>>>0}for(l=0;l<A;l++)a=A-l,l&3?oe=o[a]:oe=o[a-4],l<4||a<=4?h[l]=oe:h[l]=b[d[oe>>>24]]^S[d[oe>>>16&255]]^F[d[oe>>>8&255]]^te[d[oe&255]],h[l]=h[l]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,r){const n=this.keySize+6,s=this.invKeySchedule,A=this.invSBox,a=this.invSubMix,l=a[0],o=a[1],h=a[2],d=a[3],p=this.uint8ArrayToUint32Array_(r);let v=p[0],b=p[1],S=p[2],F=p[3];const te=new Int32Array(e),fe=new Int32Array(te.length);let oe,pe,Te,Ke,xe,$e,st,Pe,Bt,kt,Qr,cr,nr,Jt;const ar=this.networkToHostOrderSwap;for(;t<te.length;){for(Bt=ar(te[t]),kt=ar(te[t+1]),Qr=ar(te[t+2]),cr=ar(te[t+3]),xe=Bt^s[0],$e=cr^s[1],st=Qr^s[2],Pe=kt^s[3],nr=4,Jt=1;Jt<n;Jt++)oe=l[xe>>>24]^o[$e>>16&255]^h[st>>8&255]^d[Pe&255]^s[nr],pe=l[$e>>>24]^o[st>>16&255]^h[Pe>>8&255]^d[xe&255]^s[nr+1],Te=l[st>>>24]^o[Pe>>16&255]^h[xe>>8&255]^d[$e&255]^s[nr+2],Ke=l[Pe>>>24]^o[xe>>16&255]^h[$e>>8&255]^d[st&255]^s[nr+3],xe=oe,$e=pe,st=Te,Pe=Ke,nr=nr+4;oe=A[xe>>>24]<<24^A[$e>>16&255]<<16^A[st>>8&255]<<8^A[Pe&255]^s[nr],pe=A[$e>>>24]<<24^A[st>>16&255]<<16^A[Pe>>8&255]<<8^A[xe&255]^s[nr+1],Te=A[st>>>24]<<24^A[Pe>>16&255]<<16^A[xe>>8&255]<<8^A[$e&255]^s[nr+2],Ke=A[Pe>>>24]<<24^A[xe>>16&255]<<16^A[$e>>8&255]<<8^A[st&255]^s[nr+3],fe[t]=ar(oe^v),fe[t+1]=ar(Ke^b),fe[t+2]=ar(Te^S),fe[t+3]=ar(pe^F),v=Bt,b=kt,S=Qr,F=cr,t=t+4}return fe.buffer}}class pr{constructor(e,t,r){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=r}expandKey(){const e=tr(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function tr(i){switch(i){case $t.cbc:return"AES-CBC";case $t.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${i}`)}}const Hr=16;class vr{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 r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(r){}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 r=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?ur(r):r}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,r,n){return this.useSoftware?new Promise((s,A)=>{const a=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(a,t,r,n);const l=this.flush();l?s(l.buffer):A(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,r,n)}softwareDecrypt(e,t,r,n){const{currentIV:s,currentResult:A,remainderData:a}=this;if(n!==$t.cbc||t.byteLength!==16)return ne.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),a&&(e=Ne(a,e),this.remainderData=null);const l=this.getValidChunk(e);if(!l.length)return null;s&&(r=s);let o=this.softwareDecrypter;o||(o=this.softwareDecrypter=new Dr),o.expandKey(t);const h=A;return this.currentResult=o.decrypt(l.buffer,0,r),this.currentIV=l.slice(-16).buffer,h||null}webCryptoDecrypt(e,t,r,n){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,r,n));this.key=t,this.fastAesKey=new pr(this.subtle,t,n)}return this.fastAesKey.expandKey().then(s=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new mr(this.subtle,new Uint8Array(r),n).decrypt(e.buffer,s)):Promise.reject(new Error("web crypto not initialized"))).catch(s=>(ne.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,r,n)))}onWebCryptoError(e,t,r,n){const s=this.enableSoftwareAES;if(s){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,r,n);const A=this.flush();if(A)return A.buffer}throw new Error("WebCrypto"+(s?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const r=e.length-e.length%Hr;return r!==e.length&&(t=e.slice(0,r),this.remainderData=e.slice(r)),t}logOnce(e){this.logEnabled&&(ne.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Lr=Math.pow(2,17);class zr{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 r=e.url;if(!r)return Promise.reject(new dr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${r?"part list":"url"}`),networkDetails:null}));this.abort();const n=this.config,s=n.fLoader,A=n.loader;return new Promise((a,l)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(b=>b[0]==="GAP")){l(jr(e));return}else e.gap=!1;const o=this.loader=s?new s(n):new A(n),h=Gr(e);e.loader=o;const d=Ft(n.fragLoadPolicy.default),p={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Lr};e.stats=o.stats;const v={onSuccess:(b,S,F,te)=>{this.resetLoader(e,o);let fe=b.data;F.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(fe.slice(0,16)),fe=fe.slice(16)),a({frag:e,part:null,payload:fe,networkDetails:te})},onError:(b,S,F,te)=>{this.resetLoader(e,o),l(new dr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:w({url:r,data:void 0},b),error:new Error(`HTTP Error ${b.code} ${b.text}`),networkDetails:F,stats:te}))},onAbort:(b,S,F)=>{this.resetLoader(e,o),l(new dr({type:he.NETWORK_ERROR,details:W.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:F,stats:b}))},onTimeout:(b,S,F)=>{this.resetLoader(e,o),l(new dr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${p.timeout}ms`),networkDetails:F,stats:b}))}};t&&(v.onProgress=(b,S,F,te)=>t({frag:e,part:null,payload:F,networkDetails:te})),o.load(h,p,v)})}loadPart(e,t,r){this.abort();const n=this.config,s=n.fLoader,A=n.loader;return new Promise((a,l)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){l(jr(e,t));return}const o=this.loader=s?new s(n):new A(n),h=Gr(e,t);e.loader=o;const d=Ft(n.fragLoadPolicy.default),p={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Lr};t.stats=o.stats,o.load(h,p,{onSuccess:(v,b,S,F)=>{this.resetLoader(e,o),this.updateStatsFromPart(e,t);const te={frag:e,part:t,payload:v.data,networkDetails:F};r(te),a(te)},onError:(v,b,S,F)=>{this.resetLoader(e,o),l(new dr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:w({url:h.url,data:void 0},v),error:new Error(`HTTP Error ${v.code} ${v.text}`),networkDetails:S,stats:F}))},onAbort:(v,b,S)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,o),l(new dr({type:he.NETWORK_ERROR,details:W.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:S,stats:v}))},onTimeout:(v,b,S)=>{this.resetLoader(e,o),l(new dr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${p.timeout}ms`),networkDetails:S,stats:v}))}})})}updateStatsFromPart(e,t){const r=e.stats,n=t.stats,s=n.total;if(r.loaded+=n.loaded,s){const l=Math.round(e.duration/t.duration),o=Math.min(Math.round(r.loaded/s),l),d=(l-o)*Math.round(r.loaded/o);r.total=r.loaded+d}else r.total=Math.max(r.loaded,r.total);const A=r.loading,a=n.loading;A.start?A.first+=a.first-a.start:(A.start=a.start,A.first=a.first),A.end=a.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Gr(i,e=null){const t=e||i,r={frag:i,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},n=t.byteRangeStartOffset,s=t.byteRangeEndOffset;if(V(n)&&V(s)){var A;let a=n,l=s;if(i.sn==="initSegment"&&Vr((A=i.decryptdata)==null?void 0:A.method)){const o=s-n;o%16&&(l=s+(16-o%16)),n!==0&&(r.resetIV=!0,a=n-16)}r.rangeStart=a,r.rangeEnd=l}return r}function jr(i,e){const t=new Error(`GAP ${i.gap?"tag":"attribute"} found`),r={type:he.MEDIA_ERROR,details:W.FRAG_GAP,fatal:!1,frag:i,error:t,networkDetails:null};return e&&(r.part=e),(e||i).stats.aborted=!0,new dr(r)}function Vr(i){return i==="AES-128"||i==="AES-256"}class dr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Yr extends M{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 Kr{constructor(e,t,r,n=0,s=-1,A=!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=gn(),this.buffering={audio:gn(),video:gn(),audiovideo:gn()},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=s,this.partial=A}}function gn(){return{start:0,executeStart:0,executeEnd:0,end:0}}const qr={length:0,start:()=>0,end:()=>0};class qt{static isBuffered(e,t){if(e){const r=qt.getBuffered(e);for(let n=r.length;n--;)if(t>=r.start(n)&&t<=r.end(n))return!0}return!1}static bufferedRanges(e){if(e){const t=qt.getBuffered(e);return qt.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let r=0;r<e.length;r++)t.push({start:e.start(r),end:e.end(r)});return t}static bufferInfo(e,t,r){if(e){const n=qt.bufferedRanges(e);if(n.length)return qt.bufferedInfo(n,t,r)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,r){t=Math.max(0,t),e.length>1&&e.sort((h,d)=>h.start-d.start||d.end-h.end);let n=-1,s=[];if(r)for(let h=0;h<e.length;h++){t>=e[h].start&&t<=e[h].end&&(n=h);const d=s.length;if(d){const p=s[d-1].end;e[h].start-p<r?e[h].end>p&&(s[d-1].end=e[h].end):s.push(e[h])}else s.push(e[h])}else s=e;let A=0,a,l=t,o=t;for(let h=0;h<s.length;h++){const d=s[h].start,p=s[h].end;if(n===-1&&t>=d&&t<=p&&(n=h),t+r>=d&&t<p)l=d,o=p,A=o-t;else if(t+r<d){a=d;break}}return{len:A,start:l||0,end:o||0,nextStart:a,buffered:e,bufferedIndex:n}}static getBuffered(e){try{return e.buffered||qr}catch(t){return ne.log("failed to get media.buffered",t),qr}}}const hn=/\{\$([a-zA-Z0-9-_]+)\}/g;function ln(i){return hn.test(i)}function tn(i,e){if(i.variableList!==null||i.hasVariableRefs){const t=i.variableList;return e.replace(hn,r=>{const n=r.substring(2,r.length-1),s=t==null?void 0:t[n];return s===void 0?(i.playlistParsingError||(i.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${n}"`)),r):s})}return e}function xn(i,e,t){let r=i.variableList;r||(i.variableList=r={});let n,s;if("QUERYPARAM"in e){n=e.QUERYPARAM;try{const A=new self.URL(t).searchParams;if(A.has(n))s=A.get(n);else throw new Error(`"${n}" does not match any query parameter in URI: "${t}"`)}catch(A){i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${A.message}`))}}else n=e.NAME,s=e.VALUE;n in r?i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${n}"`)):r[n]=s||""}function $n(i,e,t){const r=e.IMPORT;if(t&&r in t){let n=i.variableList;n||(i.variableList=n={}),n[r]=t[r]}else i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}const On=/^(\d+)x(\d+)$/,Xn=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Xr{constructor(e,t){typeof e=="string"&&(e=Xr.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 r=new Uint8Array(t.length/2);for(let n=0;n<t.length/2;n++)r[n]=parseInt(t.slice(n*2,n*2+2),16);return r}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 r=this[e];return r?parseFloat(r):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const r=this[e];return(r?r.split(/[ ,]+/):[]).reduce((n,s)=>(n[s.toLowerCase()]=!0,n),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=On.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let r;const n={},s='"';for(Xn.lastIndex=0;(r=Xn.exec(e))!==null;){const A=r[1].trim();let a=r[2];const l=a.indexOf(s)===0&&a.lastIndexOf(s)===a.length-1;let o=!1;if(l)a=a.slice(1,-1);else switch(A){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":o=!0}if(t&&(l||o))a=tn(t,a);else if(!o&&!l)switch(A){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":ne.warn(`${e}: attribute ${A} is missing quotes`)}n[A]=a}return n}}const Gn="com.apple.hls.interstitial";function Ln(i){return i!=="ID"&&i!=="CLASS"&&i!=="CUE"&&i!=="START-DATE"&&i!=="DURATION"&&i!=="END-DATE"&&i!=="END-ON-NEXT"}function Zn(i){return i==="SCTE35-OUT"||i==="SCTE35-IN"||i==="SCTE35-CMD"}class ri{constructor(e,t,r=0){var n;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=(n=t==null?void 0:t.tagOrder)!=null?n:r,t){const s=t.attr;for(const A in s)if(Object.prototype.hasOwnProperty.call(e,A)&&e[A]!==s[A]){ne.warn(`DATERANGE tag attribute: "${A}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=A;break}e=B(new Xr({}),s,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 s=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);V(s.getTime())&&(this._endDate=s)}}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?(ne.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(V(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===Gn}get isValid(){return!!this.id&&!this._badValueForSameId&&V(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 _i=10;class xi{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,r=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!r||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&r>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}get hasProgramDateTime(){return this.fragments.length?V(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||_i}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(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){var e;return(e=this.fragments)!=null&&e.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 r=e.length;r--;)if(e[r].index>t)return e[r].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 Mn(i){return i==="AES-128"||i==="AES-256"||i==="AES-256-CTR"}function zn(i){switch(i){case"AES-128":case"AES-256":return $t.cbc;case"AES-256-CTR":return $t.ctr;default:throw new Error(`invalid full segment method ${i}`)}}function Un(i){return Uint8Array.from(atob(i),e=>e.charCodeAt(0))}function Jn(i){return Uint8Array.from(unescape(encodeURIComponent(i)),e=>e.charCodeAt(0))}function Pn(i){const e=Jn(i).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Ai(i){const e=function(r,n,s){const A=r[n];r[n]=r[s],r[s]=A};e(i,0,3),e(i,1,2),e(i,4,5),e(i,6,7)}function Bn(i){const e=i.split(":");let t=null;if(e[0]==="data"&&e.length===2){const r=e[1].split(";"),n=r[r.length-1].split(",");if(n.length===2){const s=n[0]==="base64",A=n[1];s?(r.splice(-1,1),t=Un(A)):t=Pn(A)}}return t}const yn=typeof self!="undefined"?self:void 0;var kr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Fn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function ci(i){switch(i){case Fn.FAIRPLAY:return kr.FAIRPLAY;case Fn.PLAYREADY:return kr.PLAYREADY;case Fn.WIDEVINE:return kr.WIDEVINE;case Fn.CLEARKEY:return kr.CLEARKEY}}var vi={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function ai(i){if(i===vi.WIDEVINE)return kr.WIDEVINE;if(i===vi.PLAYREADY)return kr.PLAYREADY;if(i===vi.CENC||i===vi.CLEARKEY)return kr.CLEARKEY}function Yn(i){switch(i){case kr.FAIRPLAY:return Fn.FAIRPLAY;case kr.PLAYREADY:return Fn.PLAYREADY;case kr.WIDEVINE:return Fn.WIDEVINE;case kr.CLEARKEY:return Fn.CLEARKEY}}function Qt(i){const{drmSystems:e,widevineLicenseUrl:t}=i,r=e?[kr.FAIRPLAY,kr.WIDEVINE,kr.PLAYREADY,kr.CLEARKEY].filter(n=>!!e[n]):[];return!r[kr.WIDEVINE]&&t&&r.push(kr.WIDEVINE),r}const xr=function(i){return yn!=null&&(i=yn.navigator)!=null&&i.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function sn(i,e,t,r){let n;switch(i){case kr.FAIRPLAY:n=["cenc","sinf"];break;case kr.WIDEVINE:case kr.PLAYREADY:n=["cenc"];break;case kr.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${i}`)}return En(n,e,t,r)}function En(i,e,t,r){return[{initDataTypes:i,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:e.map(s=>({contentType:`audio/mp4; codecs=${s}`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null})),videoCapabilities:t.map(s=>({contentType:`video/mp4; codecs=${s}`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}))}]}function un(i){var e;return i.sessionType==="persistent-license"||!!((e=i.sessionTypes)!=null&&e.some(t=>t==="persistent-license"))}function Nn(i){const e=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),r=t.substring(t.indexOf("<"),t.length),A=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(A){const a=A.childNodes[0]?A.childNodes[0].nodeValue:A.getAttribute("VALUE");if(a){const l=Un(a).subarray(0,16);return Ai(l),l}}return null}let Bi={};class Sn{static clearKeyUriToKeyIdMap(){Bi={}}constructor(e,t,r,n=[1],s=null){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=r,this.keyFormatVersions=n,this.iv=s,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!Mn(e)}isSupported(){if(this.method){if(Mn(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case Fn.FAIRPLAY:case Fn.WIDEVINE:case Fn.PLAYREADY:case Fn.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(Mn(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(ne.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const r=mn(e);return new Sn(this.method,this.uri,"identity",this.keyFormatVersions,r)}const t=Bn(this.uri);if(t)switch(this.keyFormat){case Fn.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case Fn.PLAYREADY:{const r=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Xt(r,null,t),this.keyId=Nn(t);break}default:{let r=t.subarray(0,16);if(r.length!==16){const n=new Uint8Array(16);n.set(r,16-r.length),r=n}this.keyId=r;break}}if(!this.keyId||this.keyId.byteLength!==16){let r=Bi[this.uri];if(!r){const n=Object.keys(Bi).length%Number.MAX_SAFE_INTEGER;r=new Uint8Array(16),new DataView(r.buffer,12,4).setUint32(0,n),Bi[this.uri]=r}this.keyId=r}return this}}function mn(i){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=i>>8*(15-t)&255;return e}const xs=/#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,kn=/#EXT-X-MEDIA:(.*)/g,Fs=/^#EXT(?:INF|-X-TARGETDURATION):/m,fi=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Yi=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 Wr{static findGroup(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(n.id===t)return n}}static resolve(e,t){return re.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Fs.test(e)}static parseMasterPlaylist(e,t){const r=ln(e),n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:r},s=[];xs.lastIndex=0;let A;for(;(A=xs.exec(e))!=null;)if(A[1]){var a;const o=new Xr(A[1],n),h=tn(n,A[2]),d={attrs:o,bitrate:o.decimalInteger("BANDWIDTH")||o.decimalInteger("AVERAGE-BANDWIDTH"),name:o.NAME,url:Wr.resolve(h,t)},p=o.decimalResolution("RESOLUTION");p&&(d.width=p.width,d.height=p.height),Oi(o.CODECS,d);const v=o["SUPPLEMENTAL-CODECS"];v&&(d.supplemental={},Oi(v,d.supplemental)),(a=d.unknownCodecs)!=null&&a.length||s.push(d),n.levels.push(d)}else if(A[3]){const o=A[3],h=A[4];switch(o){case"SESSION-DATA":{const d=new Xr(h,n),p=d["DATA-ID"];p&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[p]=d);break}case"SESSION-KEY":{const d=ji(h,t,n);d.encrypted&&d.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(d)):ne.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${h}"`);break}case"DEFINE":{{const d=new Xr(h,n);xn(n,d,t)}break}case"CONTENT-STEERING":{const d=new Xr(h,n);n.contentSteering={uri:Wr.resolve(d["SERVER-URI"],t),pathwayId:d["PATHWAY-ID"]||"."};break}case"START":{n.startTimeOffset=yi(h);break}}}const l=s.length>0&&s.length<n.levels.length;return n.levels=l?s:n.levels,n.levels.length===0&&(n.playlistParsingError=new Error("no levels found in manifest")),n}static parseMasterPlaylistMedia(e,t,r){let n;const s={},A=r.levels,a={AUDIO:A.map(o=>({id:o.attrs.AUDIO,audioCodec:o.audioCodec})),SUBTITLES:A.map(o=>({id:o.attrs.SUBTITLES,textCodec:o.textCodec})),"CLOSED-CAPTIONS":[]};let l=0;for(kn.lastIndex=0;(n=kn.exec(e))!==null;){const o=new Xr(n[1],r),h=o.TYPE;if(h){const d=a[h],p=s[h]||[];s[h]=p;const v=o.LANGUAGE,b=o["ASSOC-LANGUAGE"],S=o.CHANNELS,F=o.CHARACTERISTICS,te=o["INSTREAM-ID"],fe={attrs:o,bitrate:0,id:l++,groupId:o["GROUP-ID"]||"",name:o.NAME||v||"",type:h,default:o.bool("DEFAULT"),autoselect:o.bool("AUTOSELECT"),forced:o.bool("FORCED"),lang:v,url:o.URI?Wr.resolve(o.URI,t):""};if(b&&(fe.assocLang=b),S&&(fe.channels=S),F&&(fe.characteristics=F),te&&(fe.instreamId=te),d!=null&&d.length){const oe=Wr.findGroup(d,fe.groupId)||d[0];ls(fe,oe,"audioCodec"),ls(fe,oe,"textCodec")}p.push(fe)}}return s}static parseLevelPlaylist(e,t,r,n,s,A){var a;const l={url:t},o=new xi(t),h=o.fragments,d=[];let p=null,v=0,b=0,S=0,F=0,te=0,fe=null,oe=new Ge(n,l),pe,Te,Ke,xe=-1,$e=!1,st=null,Pe;if(fi.lastIndex=0,o.m3u8=e,o.hasVariableRefs=ln(e),((a=fi.exec(e))==null?void 0:a[0])!=="#EXTM3U")return o.playlistParsingError=new Error("Missing format identifier #EXTM3U"),o;for(;(pe=fi.exec(e))!==null;){$e&&($e=!1,oe=new Ge(n,l),oe.playlistOffset=S,oe.start=S,oe.sn=v,oe.cc=F,te&&(oe.bitrate=te),oe.level=r,p&&(oe.initSegment=p,p.rawProgramDateTime&&(oe.rawProgramDateTime=p.rawProgramDateTime,p.rawProgramDateTime=null),st&&(oe.setByteRange(st),st=null)));const cr=pe[1];if(cr){oe.duration=parseFloat(cr);const nr=(" "+pe[2]).slice(1);oe.title=nr||null,oe.tagList.push(nr?["INF",cr,nr]:["INF",cr])}else if(pe[3]){if(V(oe.duration)){oe.playlistOffset=S,oe.start=S,Ke&&hi(oe,Ke,o),oe.sn=v,oe.level=r,oe.cc=F,h.push(oe);const nr=(" "+pe[3]).slice(1);oe.relurl=tn(o,nr),Vn(oe,fe,d),fe=oe,S+=oe.duration,v++,b=0,$e=!0}}else{if(pe=pe[0].match(Yi),!pe){ne.warn("No matches on slow regex match for level playlist!");continue}for(Te=1;Te<pe.length&&pe[Te]===void 0;Te++);const nr=(" "+pe[Te]).slice(1),Jt=(" "+pe[Te+1]).slice(1),ar=pe[Te+2]?(" "+pe[Te+2]).slice(1):null;switch(nr){case"BYTERANGE":fe?oe.setByteRange(Jt,fe):oe.setByteRange(Jt);break;case"PROGRAM-DATE-TIME":oe.rawProgramDateTime=Jt,oe.tagList.push(["PROGRAM-DATE-TIME",Jt]),xe===-1&&(xe=h.length);break;case"PLAYLIST-TYPE":o.type&&pn(o,nr,pe),o.type=Jt.toUpperCase();break;case"MEDIA-SEQUENCE":o.startSN!==0?pn(o,nr,pe):h.length>0&&wi(o,nr,pe),v=o.startSN=parseInt(Jt);break;case"SKIP":{o.skippedSegments&&pn(o,nr,pe);const or=new Xr(Jt,o),Dt=or.decimalInteger("SKIPPED-SEGMENTS");if(V(Dt)){o.skippedSegments+=Dt;for(let Fr=Dt;Fr--;)h.push(null);v+=Dt}const Pt=or.enumeratedString("RECENTLY-REMOVED-DATERANGES");Pt&&(o.recentlyRemovedDateranges=(o.recentlyRemovedDateranges||[]).concat(Pt.split(" ")));break}case"TARGETDURATION":o.targetduration!==0&&pn(o,nr,pe),o.targetduration=Math.max(parseInt(Jt),1);break;case"VERSION":o.version!==null&&pn(o,nr,pe),o.version=parseInt(Jt);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":o.live||pn(o,nr,pe),o.live=!1;break;case"#":(Jt||ar)&&oe.tagList.push(ar?[Jt,ar]:[Jt]);break;case"DISCONTINUITY":F++,oe.tagList.push(["DIS"]);break;case"GAP":oe.gap=!0,oe.tagList.push([nr]);break;case"BITRATE":oe.tagList.push([nr,Jt]),te=parseInt(Jt)*1e3,V(te)?oe.bitrate=te:te=0;break;case"DATERANGE":{const or=new Xr(Jt,o),Dt=new ri(or,o.dateRanges[or.ID],o.dateRangeTagCount);o.dateRangeTagCount++,Dt.isValid||o.skippedSegments?o.dateRanges[Dt.id]=Dt:ne.warn(`Ignoring invalid DATERANGE tag: "${Jt}"`),oe.tagList.push(["EXT-X-DATERANGE",Jt]);break}case"DEFINE":{{const or=new Xr(Jt,o);"IMPORT"in or?$n(o,or,A):xn(o,or,t)}break}case"DISCONTINUITY-SEQUENCE":o.startCC!==0?pn(o,nr,pe):h.length>0&&wi(o,nr,pe),o.startCC=F=parseInt(Jt);break;case"KEY":{const or=ji(Jt,t,o);if(or.isSupported()){if(or.method==="NONE"){Ke=void 0;break}Ke||(Ke={}),Ke[or.keyFormat]&&(Ke=B({},Ke)),Ke[or.keyFormat]=or}else ne.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Jt}"`);break}case"START":o.startTimeOffset=yi(Jt);break;case"MAP":{const or=new Xr(Jt,o);if(oe.duration){const Dt=new Ge(n,l);Ei(Dt,or,r,Ke),p=Dt,oe.initSegment=p,p.rawProgramDateTime&&!oe.rawProgramDateTime&&(oe.rawProgramDateTime=p.rawProgramDateTime)}else{const Dt=oe.byteRangeEndOffset;if(Dt){const Pt=oe.byteRangeStartOffset;st=`${Dt-Pt}@${Pt}`}else st=null;Ei(oe,or,r,Ke),p=oe,$e=!0}p.cc=F;break}case"SERVER-CONTROL":{Pe&&pn(o,nr,pe),Pe=new Xr(Jt),o.canBlockReload=Pe.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=Pe.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=o.canSkipUntil>0&&Pe.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=Pe.optionalFloat("PART-HOLD-BACK",0),o.holdBack=Pe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{o.partTarget&&pn(o,nr,pe);const or=new Xr(Jt);o.partTarget=or.decimalFloatingPoint("PART-TARGET");break}case"PART":{let or=o.partList;or||(or=o.partList=[]);const Dt=b>0?or[or.length-1]:void 0,Pt=b++,Fr=new Xr(Jt,o),wr=new Je(Fr,oe,l,Pt,Dt);or.push(wr),oe.duration+=wr.duration;break}case"PRELOAD-HINT":{const or=new Xr(Jt,o);o.preloadHint=or;break}case"RENDITION-REPORT":{const or=new Xr(Jt,o);o.renditionReports=o.renditionReports||[],o.renditionReports.push(or);break}default:ne.warn(`line parsed but not handled: ${pe}`);break}}}fe&&!fe.relurl?(h.pop(),S-=fe.duration,o.partList&&(o.fragmentHint=fe)):o.partList&&(Vn(oe,fe,d),oe.cc=F,o.fragmentHint=oe,Ke&&hi(oe,Ke,o)),o.targetduration||(o.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const Bt=h.length,kt=h[0],Qr=h[Bt-1];if(S+=o.skippedSegments*o.targetduration,S>0&&Bt&&Qr){o.averagetargetduration=S/Bt;const cr=Qr.sn;o.endSN=cr!=="initSegment"?cr:0,o.live||(Qr.endList=!0),kt&&o.startCC===void 0&&(o.startCC=kt.cc),xe>0&&(rA(h,xe),kt&&d.unshift(kt))}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(S+=o.fragmentHint.duration),o.totalduration=S,d.length&&o.dateRangeTagCount&&kt&&ki(d,o),o.endCC=F,o}}function ki(i,e){const t=i.length,r=i[t-1],n=e.live?1/0:e.totalduration,s=Object.keys(e.dateRanges);for(let A=s.length;A--;){const a=e.dateRanges[s[A]],l=a.startDate.getTime();a.tagAnchor=r.ref;for(let o=t;o--;){const h=tA(e,l,i,o,n);if(h!==-1){a.tagAnchor=e.fragments[h].ref;break}}}}function tA(i,e,t,r,n){const s=t[r];if(s){const a=s.programDateTime;if(e>=a||r===0){var A;const l=(((A=t[r+1])==null?void 0:A.start)||n)-s.start;if(e<=a+l*1e3){const o=t[r].sn-i.startSN,h=i.fragments;if(h.length>t.length){const p=(t[r+1]||h[h.length-1]).sn-i.startSN;for(let v=p;v>o;v--){const b=h[v].programDateTime;if(e>=b&&e<b+h[v].duration*1e3)return v}}return o}}}return-1}function ji(i,e,t){var r,n;const s=new Xr(i,t),A=(r=s.METHOD)!=null?r:"",a=s.URI,l=s.hexadecimalInteger("IV"),o=s.KEYFORMATVERSIONS,h=(n=s.KEYFORMAT)!=null?n:"identity";a&&s.IV&&!l&&ne.error(`Invalid IV: ${s.IV}`);const d=a?Wr.resolve(a,e):"",p=(o||"1").split("/").map(Number).filter(Number.isFinite);return new Sn(A,d,h,p,l)}function yi(i){const t=new Xr(i).decimalFloatingPoint("TIME-OFFSET");return V(t)?t:null}function Oi(i,e){let t=(i||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(s=>Re(s,r));n.length&&(e[`${r}Codec`]=n.map(s=>s.split("/")[0]).join(","),t=t.filter(s=>n.indexOf(s)===-1))}),e.unknownCodecs=t}function ls(i,e,t){const r=e[t];r&&(i[t]=r)}function rA(i,e){let t=i[e];for(let r=e;r--;){const n=i[r];if(!n)return;n.programDateTime=t.programDateTime-n.duration*1e3,t=n}}function Vn(i,e,t){i.rawProgramDateTime?t.push(i):e!=null&&e.programDateTime&&(i.programDateTime=e.endProgramDateTime)}function Ei(i,e,t,r){i.relurl=e.URI,e.BYTERANGE&&i.setByteRange(e.BYTERANGE),i.level=t,i.sn="initSegment",r&&(i.levelkeys=r),i.initSegment=null}function hi(i,e,t){i.levelkeys=e;const{encryptedFragments:r}=t;(!r.length||r[r.length-1].levelkeys!==e)&&Object.keys(e).some(n=>e[n].isCommonEncryption)&&r.push(i)}function pn(i,e,t){i.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function wi(i,e,t){i.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function us(i,e){const t=e.startPTS;if(V(t)){let r=0,n;e.sn>i.sn?(r=t-i.start,n=i):(r=i.start-t,n=e),n.duration!==r&&n.setDuration(r)}else e.sn>i.sn?i.cc===e.cc&&i.minEndPTS?e.setStart(i.start+(i.minEndPTS-i.start)):e.setStart(i.start+i.duration):e.setStart(Math.max(i.start-e.duration,0))}function Ss(i,e,t,r,n,s){r-t<=0&&(ne.warn("Fragment should have a positive duration",e),r=t+e.duration,s=n+e.duration);let a=t,l=r;const o=e.startPTS,h=e.endPTS;if(V(o)){const F=Math.abs(o-t);V(e.deltaPTS)?e.deltaPTS=Math.max(F,e.deltaPTS):e.deltaPTS=F,a=Math.max(t,o),t=Math.min(t,o),n=Math.min(n,e.startDTS),l=Math.min(r,h),r=Math.max(r,h),s=Math.max(s,e.endDTS)}const d=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(r-e.start),e.startPTS=t,e.maxStartPTS=a,e.startDTS=n,e.endPTS=r,e.minEndPTS=l,e.endDTS=s;const p=e.sn;if(!i||p<i.startSN||p>i.endSN)return 0;let v;const b=p-i.startSN,S=i.fragments;for(S[b]=e,v=b;v>0;v--)us(S[v],S[v-1]);for(v=b;v<S.length-1;v++)us(S[v],S[v+1]);return i.fragmentHint&&us(S[S.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,d}function cs(i,e){if(i===e)return;let t=null;const r=i.fragments;for(let l=r.length-1;l>=0;l--){const o=r[l].initSegment;if(o){t=o;break}}i.fragmentHint&&delete i.fragmentHint.endPTS;let n;Xi(i,e,(l,o,h,d)=>{if(!e.startCC&&o.cc!==l.cc){var p,v;const b=l.cc-o.cc;for(let S=h;S<d.length;S++)d[S].cc+=b;e.startCC=(p=(v=Is(i,e.startSN-1))==null?void 0:v.cc)!=null?p:d[0].cc,e.endCC=d[d.length-1].cc}V(l.startPTS)&&V(l.endPTS)&&(o.setStart(o.startPTS=l.startPTS),o.startDTS=l.startDTS,o.maxStartPTS=l.maxStartPTS,o.endPTS=l.endPTS,o.endDTS=l.endDTS,o.minEndPTS=l.minEndPTS,o.setDuration(l.endPTS-l.startPTS),o.duration&&(n=o),e.PTSKnown=e.alignedSliding=!0),l.hasStreams&&(o.elementaryStreams=l.elementaryStreams),o.loader=l.loader,l.hasStats&&(o.stats=l.stats),l.initSegment&&(o.initSegment=l.initSegment,t=l.initSegment)});const s=e.fragments,A=e.fragmentHint?s.concat(e.fragmentHint):s;if(t&&A.forEach(l=>{var o;l&&(!l.initSegment||l.initSegment.relurl===((o=t)==null?void 0:o.relurl))&&(l.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=s.some(l=>!l),e.deltaUpdateFailed){ne.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let l=e.skippedSegments;l--;)s.shift();e.startSN=s[0].sn}else{e.endCC=s[s.length-1].cc,e.canSkipDateRanges&&(e.dateRanges=Pi(i.dateRanges,e));const l=i.fragments.filter(o=>o.rawProgramDateTime);if(i.hasProgramDateTime&&!e.hasProgramDateTime)for(let o=1;o<A.length;o++)A[o].programDateTime===null&&Vn(A[o],A[o-1],l);ki(l,e)}Ts(i.partList,e.partList,(l,o)=>{o.elementaryStreams=l.elementaryStreams,o.stats=l.stats}),n?Ss(e,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):nA(i,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=i.driftStartTime,e.driftStart=i.driftStart;const a=e.advancedDateTime;if(e.advanced&&a){const l=e.edge;e.driftStart||(e.driftStartTime=a,e.driftStart=l),e.driftEndTime=a,e.driftEnd=l}else e.driftEndTime=i.driftEndTime,e.driftEnd=i.driftEnd,e.advancedDateTime=i.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=i.requestScheduled)}function Pi(i,e){const{dateRanges:t,recentlyRemovedDateranges:r}=e,n=B({},i);r&&r.forEach(a=>{delete n[a]});const A=Object.keys(n).length;return A&&Object.keys(t).forEach(a=>{const l=n[a],o=new ri(t[a].attr,l);o.isValid?(n[a]=o,l||(o.tagOrder+=A)):ne.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${br(t[a].attr)}"`)}),n}function Ts(i,e,t){if(i&&e){let r=0;for(let n=0,s=i.length;n<=s;n++){const A=i[n],a=e[n+r];A&&a&&A.index===a.index&&A.fragment.sn===a.fragment.sn?t(A,a):r--}}}function Xi(i,e,t){const r=e.skippedSegments,n=Math.max(i.startSN,e.startSN)-e.startSN,s=(i.fragmentHint?1:0)+(r?e.endSN:Math.min(i.endSN,e.endSN))-e.startSN,A=e.startSN-i.startSN,a=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,l=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;for(let o=n;o<=s;o++){const h=l[A+o];let d=a[o];if(r&&!d&&h&&(d=e.fragments[o]=h),h&&d){if(t(h,d,o,a),h.url&&h.url!==d.url){e.playlistParsingError=di(`media sequence mismatch ${d.sn}:`,i,e,h,d);return}else if(h.cc!==d.cc){e.playlistParsingError=di(`discontinuity sequence mismatch (${h.cc}!=${d.cc})`,i,e,h,d);return}}}}function di(i,e,t,r,n){return new Error(`${i} ${n.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function nA(i,e,t=!0){const r=e.startSN+e.skippedSegments-i.startSN,n=i.fragments,s=r>=0;let A=0;if(s&&r<n.length)A=n[r].start;else if(s&&e.startSN===i.endSN+1)A=i.fragmentEnd;else if(s&&t)A=i.fragmentStart+r*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)A=i.fragmentStart;else return;fs(e,A)}function fs(i,e){if(e){const t=i.fragments;for(let r=i.skippedSegments;r<t.length;r++)t[r].addStart(e);i.fragmentHint&&i.fragmentHint.addStart(e)}}function Fi(i,e=1/0){let t=1e3*i.targetduration;if(i.updated){const r=i.fragments;if(r.length&&t*4>e){const s=r[r.length-1].duration*1e3;s<t&&(t=s)}}else t/=2;return Math.round(t)}function Is(i,e,t){if(!i)return null;let r=i.fragments[e-i.startSN];return r||(r=i.fragmentHint,r&&r.sn===e)?r:e<i.startSN&&t&&t.sn===e?t:null}function iA(i,e,t){return i?sA(i.partList,e,t):null}function sA(i,e,t){if(i)for(let r=i.length;r--;){const n=i[r];if(n.index===t&&n.fragment.sn===e)return n}return null}function qn(i){i.forEach((e,t)=>{var r;(r=e.details)==null||r.fragments.forEach(n=>{n.level=t,n.initSegment&&(n.initSegment.level=t)})})}function Mi(i,e){for(let r=0,n=i.length;r<n;r++){var t;if(((t=i[r])==null?void 0:t.cc)===e)return i[r]}return null}function GA(i,e){return!!(i&&e.startCC<i.endCC&&e.endCC>i.startCC)}function AA(i,e){if(i){const t=i.start+e;i.start=i.startPTS=t,i.endPTS=t+i.duration}}function Ji(i,e){const t=e.fragments;for(let r=0,n=t.length;r<n;r++)AA(t[r],i);e.fragmentHint&&AA(e.fragmentHint,i),e.alignedSliding=!0}function VA(i,e){i&&(wn(e,i),!e.alignedSliding&&i&&rn(e,i),!e.alignedSliding&&i&&!e.skippedSegments&&nA(i,e,!1))}function wn(i,e){if(!GA(e,i))return;const t=Math.min(e.endCC,i.endCC),r=Mi(e.fragments,t),n=Mi(i.fragments,t);if(!r||!n)return;ne.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const s=r.start-n.start;Ji(s,i)}function rn(i,e){if(!i.hasProgramDateTime||!e.hasProgramDateTime)return;const t=i.fragments,r=e.fragments;if(!t.length||!r.length)return;let n,s;const A=Math.min(e.endCC,i.endCC);e.startCC<A&&i.startCC<A&&(n=Mi(r,A),s=Mi(t,A)),(!n||!s)&&(n=r[Math.floor(r.length/2)],s=Mi(t,n.cc)||t[Math.floor(t.length/2)]);const a=n.programDateTime,l=s.programDateTime;if(!a||!l)return;const o=(l-a)/1e3-(s.start-n.start);Ji(o,i)}const _n={toString:function(i){let e="";const t=i.length;for(let r=0;r<t;r++)e+=`[${i.start(r).toFixed(3)}-${i.end(r).toFixed(3)}]`;return e}},ft={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 Hn extends Yr{constructor(e,t,r,n,s){super(n,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=ft.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:A,fragCurrent:a,media:l,mediaBuffer:o,state:h}=this,d=l?l.currentTime:0,p=qt.bufferInfo(o||l,d,A.maxBufferHole);if(this.log(`media seeking to ${V(d)?d.toFixed(3):d}, state: ${h}`),this.state===ft.ENDED)this.resetLoadingState();else if(a){const v=A.maxFragLookUpTolerance,b=a.start-v,S=a.start+a.duration+v;if(!p.len||S<p.start||b>p.end){const F=d>S;(d<b||F)&&(F&&a.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(l){this.fragmentTracker.removeFragmentsInRange(d,1/0,this.playlistType,!0);const v=this.lastCurrentTime;if(d>v&&(this.lastCurrentTime=d),!this.loadingParts){const b=Math.max(p.end,d),S=this.shouldLoadParts(this.getLevelDetails(),b);S&&(this.log(`LL-Part loading ON after seeking to ${d.toFixed(2)} with buffer @${b.toFixed(2)}`),this.loadingParts=S)}}!this.hls.hasEnoughToStart&&!p.len&&(this.log(`setting startPosition to ${d} because of seek before start`),this.nextLoadPosition=this.startPosition=d),this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=s,this.hls=e,this.fragmentLoader=new zr(e.config),this.keyLoader=r,this.fragmentTracker=t,this.config=e.config,this.decrypter=new vr(e.config)}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===ft.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=ft.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 r=e.end||0,n=this.config.timelineOffset||0;if(r<=n)return!1;const s=e.nextStart;if(s&&s>n&&s<t.edge||this.media.currentTime<e.start)return!1;const a=t.partList;if(a!=null&&a.length){const o=a[a.length-1];return qt.isBuffered(this.media,o.start+o.duration/2)}const l=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(l)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.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 r=this.media=this.mediaBuffer=t.media;r.removeEventListener("seeking",this.onMediaSeeking),r.removeEventListener("ended",this.onMediaEnded),r.addEventListener("seeking",this.onMediaSeeking),r.addEventListener("ended",this.onMediaEnded);const n=this.config;this.levels&&n.autoStartLoad&&this.state===ft.STOPPED&&this.startLoad(n.startPosition)}onMediaDetaching(e,t){const r=!!t.transferMedia,n=this.media;if(n!==null){if(n.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),n.removeEventListener("seeking",this.onMediaSeeking),n.removeEventListener("ended",this.onMediaEnded),this.keyLoader&&!r&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,r){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=ft.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,r){this.startFragRequested=!0,this._loadFragForPlayback(e,t,r)}_loadFragForPlayback(e,t,r){const n=s=>{const A=s.frag;if(this.fragContextChanged(A)){this.warn(`${A.type} sn: ${A.sn}${s.part?" part: "+s.part.index:""} of ${this.fragInfo(A,!1,s.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(A);return}A.stats.chunkCount++,this._handleFragmentLoadProgress(s)};this._doFragLoad(e,t,r,n).then(s=>{if(!s)return;const A=this.state,a=s.frag;if(this.fragContextChanged(a)){(A===ft.FRAG_LOADING||!this.fragCurrent&&A===ft.PARSING)&&(this.fragmentTracker.removeFragment(a),this.state=ft.IDLE);return}"payload"in s&&(this.log(`Loaded ${a.type} sn: ${a.sn} of ${this.playlistLabel()} ${a.level}`),this.hls.trigger(m.FRAG_LOADED,s)),this._handleFragmentLoadComplete(s)}).catch(s=>{this.state===ft.STOPPED||this.state===ft.ERROR||(this.warn(`Frag error: ${(s==null?void 0:s.message)||s}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:r}=this;if(r.getState(e)===Et.APPENDING){const s=e.type,A=this.getFwdBufferInfo(this.mediaBuffer,s),a=Math.max(e.duration,A?A.len:this.config.maxBufferLength),l=this.backtrackFragment;((l?e.sn-l.sn:0)===1||this.reduceMaxBufferLength(a,e.duration))&&r.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?r.removeAllFragments():r.hasParts(e.type)&&(r.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),r.getState(e)===Et.PARTIAL&&r.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,r=null){if(!(e-t))return;const n={startOffset:e,endOffset:t,type:r};this.hls.trigger(m.BUFFER_FLUSHING,n)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(r=>{const n=r==null?void 0:r.frag;if(!n||this.fragContextChanged(n)||!this.levels)throw new Error("init load aborted");return r}).then(r=>{const{hls:n}=this,{frag:s,payload:A}=r,a=s.decryptdata;if(A&&A.byteLength>0&&a!=null&&a.key&&a.iv&&Mn(a.method)){const l=self.performance.now();return this.decrypter.decrypt(new Uint8Array(A),a.key.buffer,a.iv.buffer,zn(a.method)).catch(o=>{throw n.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:s}),o}).then(o=>{const h=self.performance.now();return n.trigger(m.FRAG_DECRYPTED,{frag:s,payload:o,stats:{tstart:l,tdecrypt:h}}),r.payload=o,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===ft.STOPPED||this.state===ft.ERROR||(this.warn(r),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const r=e.frag.stats;this.state!==ft.STOPPED&&(this.state=ft.IDLE),e.frag.data=new Uint8Array(e.payload),r.parsing.start=r.buffering.start=self.performance.now(),r.parsing.end=r.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const r=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:${r?_n.toString(qt.getBuffered(r)):"(detached)"})`),Ae(e)){var n;if(e.type!==O.SUBTITLE){const A=e.elementaryStreams;if(!Object.keys(A).some(a=>!!A[a])){this.state=ft.IDLE;return}}const s=(n=this.levels)==null?void 0:n[e.level];s!=null&&s.fragmentError&&(this.log(`Resetting level fragment error count of ${s.fragmentError} on frag buffered`),s.fragmentError=0)}this.state=ft.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:r,part:n,partsLoaded:s}=e,A=!s||s.length===0||s.some(l=>!l),a=new Kr(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!A);t.flush(a)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,r=null,n){var s;this.fragCurrent=e;const A=t==null?void 0:t.details;if(!this.levels||!A)throw new Error(`frag load aborted, missing level${A?"":" detail"}s`);let a=null;e.encrypted&&!((s=e.decryptdata)!=null&&s.key)?(this.log(`Loading key for ${e.sn} of [${A.startSN}-${A.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=ft.KEY_LOADING,this.fragCurrent=e,a=this.keyLoader.load(e).then(d=>{if(!this.fragContextChanged(d.frag))return this.hls.trigger(m.KEY_LOADED,d),this.state===ft.KEY_LOADING&&(this.state=ft.IDLE),d}),this.hls.trigger(m.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(a=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&A.encryptedFragments.length&&this.keyLoader.loadClear(e,A.encryptedFragments);const l=this.fragPrevious;if(Ae(e)&&(!l||e.sn!==l.sn)){const d=this.shouldLoadParts(t.details,e.end);d!==this.loadingParts&&(this.log(`LL-Part loading ${d?"ON":"OFF"} loading sn ${l==null?void 0:l.sn}->${e.sn}`),this.loadingParts=d)}if(r=Math.max(e.start,r||0),this.loadingParts&&Ae(e)){const d=A.partList;if(d&&n){r>e.end&&A.fragmentHint&&(e=A.fragmentHint);const p=this.getNextPart(d,e,r);if(p>-1){const v=d[p];e=this.fragCurrent=v.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${v.index} (${p}/${d.length-1}) of ${this.fragInfo(e,!1,v)}) cc: ${e.cc} [${A.startSN}-${A.endSN}], target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=v.start+v.duration,this.state=ft.FRAG_LOADING;let b;return a?b=a.then(S=>!S||this.fragContextChanged(S.frag)?null:this.doFragPartsLoad(e,v,t,n)).catch(S=>this.handleFragLoadError(S)):b=this.doFragPartsLoad(e,v,t,n).catch(S=>this.handleFragLoadError(S)),this.hls.trigger(m.FRAG_LOADING,{frag:e,part:v,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):b}else if(!e.url||this.loadedEndOfParts(d,r))return Promise.resolve(null)}}if(Ae(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${r.toFixed(2)}`),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} ${A?"["+A.startSN+"-"+A.endSN+"]":""}, target: ${parseFloat(r.toFixed(3))}`),V(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=ft.FRAG_LOADING;const o=this.config.progressive;let h;return o&&a?h=a.then(d=>!d||this.fragContextChanged(d==null?void 0:d.frag)?null:this.fragmentLoader.load(e,n)).catch(d=>this.handleFragLoadError(d)):h=Promise.all([this.fragmentLoader.load(e,o?n:void 0),a]).then(([d])=>(!o&&d&&n&&n(d),d)).catch(d=>this.handleFragLoadError(d)),this.hls.trigger(m.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):h}doFragPartsLoad(e,t,r,n){return new Promise((s,A)=>{var a;const l=[],o=(a=r.details)==null?void 0:a.partList,h=d=>{this.fragmentLoader.loadPart(e,d,n).then(p=>{l[d.index]=p;const v=p.part;this.hls.trigger(m.FRAG_LOADED,p);const b=iA(r.details,e.sn,d.index+1)||sA(o,e.sn,d.index+1);if(b)h(b);else return s({frag:e,part:v,partsLoaded:l})}).catch(A)};h(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===W.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(m.ERROR,t)}else this.hls.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==ft.PARSING){!this.fragCurrent&&this.state!==ft.STOPPED&&this.state!==ft.ERROR&&(this.state=ft.IDLE);return}const{frag:r,part:n,level:s}=t,A=self.performance.now();r.stats.parsing.end=A,n&&(n.stats.parsing.end=A);const a=this.getLevelDetails(),o=a&&r.sn>a.endSN||this.shouldLoadParts(a,r.end);o!==this.loadingParts&&(this.log(`LL-Part loading ${o?"ON":"OFF"} after parsing segment ending @${r.end.toFixed(2)}`),this.loadingParts=o),this.updateLevelTiming(r,n,s,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e!=null&&e.partList){var r;const s=e.partList[0],A=s.end+(((r=e.fragmentHint)==null?void 0:r.duration)||0);if(t>=A){var n;if((this.hls.hasEnoughToStart?((n=this.media)==null?void 0:n.currentTime)||this.lastCurrentTime:this.getLoadPosition())>s.start-s.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:r}=this,{level:n,sn:s,part:A}=e;if(!(t!=null&&t[n]))return this.warn(`Levels object was unset while buffering fragment ${s} of ${this.playlistLabel()} ${n}. The current chunk will not be buffered.`),null;const a=t[n],l=a.details,o=A>-1?iA(l,s,A):null,h=o?o.fragment:Is(l,s,r);return h?(r&&r!==h&&(h.stats=r.stats),{frag:h,part:o,level:a}):null}bufferFragmentData(e,t,r,n,s){var A;if(!e||this.state!==ft.PARSING)return;const{data1:a,data2:l}=e;let o=a;if(a&&l&&(o=Ne(a,l)),!((A=o)!=null&&A.length))return;const h={type:e.type,frag:t,part:r,chunkMeta:n,parent:t.type,data:o};if(this.hls.trigger(m.BUFFER_APPENDING,h),e.dropped&&e.independent&&!r){if(s)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!qt.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,n=qt.bufferInfo(t,r,0),s=e.duration,A=Math.min(this.config.maxFragLookUpTolerance*2,s*.25),a=Math.max(Math.min(e.start-A,n.end-A),r+A);e.start-a>A&&this.flushMainBuffer(a,e.start)}getFwdBufferInfo(e,t){var r;const n=this.getLoadPosition();if(!V(n))return null;const A=this.lastCurrentTime>n||(r=this.media)!=null&&r.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,n,t,A)}getFwdBufferInfoAtPos(e,t,r,n){const s=qt.bufferInfo(e,t,n);if(s.len===0&&s.nextStart!==void 0){const A=this.fragmentTracker.getBufferedFrag(t,r);if(A&&(s.nextStart<=A.end||A.gap)){const a=Math.max(Math.min(s.nextStart,A.end)-t,n);return qt.bufferInfo(e,t,a)}}return s}getMaxBufferLength(e){const{config:t}=this;let r;return e?r=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):r=t.maxBufferLength,Math.min(r,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const r=this.config,n=Math.max(Math.min(e-t,r.maxBufferLength),t),s=Math.max(e-t*3,r.maxMaxBufferLength/2,n);return s>=n?(r.maxMaxBufferLength=s,this.warn(`Reduce max buffer length to ${s}s`),!0):!1}getAppendedFrag(e,t=O.MAIN){var r;const n=(r=this.fragmentTracker)==null?void 0:r.getAppendedFrag(e,t);return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const r=t.fragments,n=r.length;if(!n)return null;const{config:s}=this,A=r[0].start,a=s.lowLatencyMode&&!!t.partList;let l=null;if(t.live){const d=s.initialLiveManifestSize;if(n<d)return this.warn(`Not enough fragments to start playback (have: ${n}, need: ${d})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<A){var o;a&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),l=this.getInitialLiveFragment(t,r);const p=this.hls.startPosition,v=this.hls.liveSyncPosition,b=l?(p!==-1&&p>=A?p:v)||l.start:e;this.log(`Setting startPosition to ${b} to match start frag at live edge. mainStart: ${p} liveSyncPosition: ${v} frag.start: ${(o=l)==null?void 0:o.start}`),this.startPosition=this.nextLoadPosition=b}}else e<=A&&(l=r[0]);if(!l){const d=this.loadingParts?t.partEnd:t.fragmentEnd;l=this.getFragmentAtPosition(e,d,t)}let h=this.filterReplacedPrimary(l,t);if(!h&&l){const d=l.sn-t.startSN;h=this.filterReplacedPrimary(r[d+1]||null,t)}return this.mapToInitFragWhenRequired(h)}isLoopLoading(e,t){const r=this.fragmentTracker.getState(e);return(r===Et.OK||r===Et.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,r,n,s){let A=null;if(e.gap&&(A=this.getNextFragment(this.nextLoadPosition,t),A&&!A.gap&&r.nextStart)){const a=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,n,0);if(a!==null&&r.len+a.len>=s){const l=A.sn;return this.loopSn!==l&&(this.log(`buffer full after gaps in "${n}" playlist starting at sn: ${l}`),this.loopSn=l),null}}return this.loopSn=void 0,A}get primaryPrefetch(){if(Ni(this.hls.config)){var e,t;if((e=this.hls.interstitialsManager)==null||(t=e.playingItem)==null?void 0:t.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Ni(this.hls.config)&&e.type!==O.SUBTITLE){const r=this.hls.interstitialsManager,n=r==null?void 0:r.bufferingItem;if(n){const A=n.event;if(A){if(A.appendInPlace||Math.abs(e.start-n.start)>1||n.start===0)return null}else if(e.end<=n.start&&(t==null?void 0:t.live)===!1||e.start>n.end&&n.nextEvent&&(n.nextEvent.appendInPlace||e.start-n.end>1))return null}const s=r==null?void 0:r.playerQueue;if(s)for(let A=s.length;A--;){const a=s[A].interstitial;if(a.appendInPlace&&e.start>=a.startTime&&e.end<=a.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,r){let n=-1,s=!1,A=!0;for(let a=0,l=e.length;a<l;a++){const o=e[a];if(A=A&&!o.independent,n>-1&&r<o.start)break;const h=o.loaded;h?n=-1:(s||o.independent||A)&&o.fragment===t&&(n=a),s=h}return n}loadedEndOfParts(e,t){const r=e[e.length-1];return r&&t>r.start&&r.loaded}getInitialLiveFragment(e,t){const r=this.fragPrevious;let n=null;if(r){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`),n=hr(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){const s=r.sn+1;if(s>=e.startSN&&s<=e.endSN){const A=t[s-e.startSN];r.cc===A.cc&&(n=A,this.log(`Live playlist, switching playlist, load frag with next SN: ${n.sn}`))}n||(n=ue(t,r.cc),n&&this.log(`Live playlist, switching playlist, load frag with same CC: ${n.sn}`))}}else{const s=this.hls.liveSyncPosition;s!==null&&(n=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return n}getFragmentAtPosition(e,t,r){const{config:n}=this;let{fragPrevious:s}=this,{fragments:A,endSN:a}=r;const{fragmentHint:l}=r,{maxFragLookUpTolerance:o}=n,h=r.partList,d=!!(this.loadingParts&&h!=null&&h.length&&l);d&&l&&!this.bitrateTest&&h[h.length-1].fragment.sn===l.sn&&(A=A.concat(l),a=l.sn);let p;if(e<t){var v;const S=e<this.lastCurrentTime||e>t-o||(v=this.media)!=null&&v.paused||!this.startFragRequested?0:o;p=Tr(s,A,e,S)}else p=A[A.length-1];if(p){const b=p.sn-r.startSN,S=this.fragmentTracker.getState(p);if((S===Et.OK||S===Et.PARTIAL&&p.gap)&&(s=p),s&&p.sn===s.sn&&(!d||h[0].fragment.sn>p.sn||!r.live&&!d)&&s&&p.level===s.level){const te=A[b+1];p.sn<a&&this.fragmentTracker.getState(te)!==Et.OK?p=te:p=null}}return p}alignPlaylists(e,t,r){const n=e.fragments.length;if(!n)return this.warn("No fragments in live playlist"),0;const s=e.fragmentStart,A=!t,a=e.alignedSliding&&V(s);if(A||!a&&!s){VA(r,e);const l=e.fragmentStart;return this.log(`Live playlist sliding: ${l.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${n}`),l}return s}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let r=this.startPosition;r<t&&(r=-1);const n=this.timelineOffset;if(r===-1){const s=this.startTimeOffset!==null,A=s?this.startTimeOffset:e.startTimeOffset;A!==null&&V(A)?(r=t+A,A<0&&(r+=e.edge),r=Math.min(Math.max(t,r),t+e.totalduration),this.log(`Setting startPosition to ${r} for start time offset ${A} found in ${s?"multivariant":"media"} playlist`),this.startPosition=r):e.live?(r=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${r}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=r=0),this.lastCurrentTime=r+n}this.nextLoadPosition=r+n}getLoadPosition(){var e;const{media:t}=this;let r=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?r=t.currentTime:this.nextLoadPosition>=0&&(r=this.nextLoadPosition),r}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&Ae(e)&&e.stats.aborted&&(this.warn(`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!==ft.FRAG_LOADING_WAITING_RETRY)&&(this.state=ft.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const b=this.getCurrentContext(t.chunkMeta);b&&(t.frag=b.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var n;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(n=this.fragCurrent)==null?void 0:n.url}`);return}const s=t.details===W.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const A=t.errorAction,{action:a,flags:l,retryCount:o=0,retryConfig:h}=A||{},d=!!A&&!!h,p=d&&a===je.RetryRequest,v=d&&!A.resolved&&l===ct.MoveAllAlternatesMatchingHost;if(!p&&v&&Ae(r)&&!r.endList)this.resetFragmentErrors(e),this.treatAsGap(r),A.resolved=!0;else if((p||v)&&o<h.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);const b=et(h,o);this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${o+1}/${h.maxNumRetry} in ${b}ms`),A.resolved=!0,this.retryDate=self.performance.now()+b,this.state=ft.FRAG_LOADING_WAITING_RETRY}else if(h&&A)if(this.resetFragmentErrors(e),o<h.maxNumRetry)!s&&a!==je.RemoveAlternatePermanently&&(A.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${o})`);return}else a===je.SendAlternateToPenaltyBox?this.state=ft.WAITING_LEVEL:this.state=ft.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===ft.PARSING||this.state===ft.PARSED){const t=e.frag,r=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,r),s=n&&n.len>.5;s&&this.reduceMaxBufferLength(n.len,(t==null?void 0:t.duration)||10);const A=!s;return A&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${r} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),A}return!1}resetFragmentErrors(e){e===O.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==ft.STOPPED&&(this.state=ft.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=qt.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===ft.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==ft.STOPPED&&(this.state=ft.IDLE)}resetStartWhenNotLoaded(e){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const 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.warn(`The loading context changed while buffering fragment ${e.sn} of ${this.playlistLabel()} ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,r,n){const s=r.details;if(!s){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((l,o)=>{const h=e.elementaryStreams[o];if(h){const d=h.endPTS-h.startPTS;if(d<=0)return this.warn(`Could not parse fragment ${e.sn} ${o} duration reliably (${d})`),l||!1;const p=n?0:Ss(s,e,h.startPTS,h.endPTS,h.startDTS,h.endDTS);return this.hls.trigger(m.LEVEL_PTS_UPDATED,{details:s,level:r,drift:p,type:o,frag:e,start:h.startPTS,end:h.endPTS}),!0}return l},!1)){var a;if(r.fragmentError===0&&this.treatAsGap(e,r),((a=this.transmuxer)==null?void 0:a.error)===null){const l=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(l.message),this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,error:l,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=ft.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(m.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===O.MAIN?"level":"track"}fragInfo(e,t=!0,r){var n,s;return`${this.playlistLabel()} ${e.level} (${r?"part":"frag"}:[${((n=t&&!r?e.startPTS:(r||e).start)!=null?n:NaN).toFixed(3)}-${((s=t&&!r?e.endPTS:(r||e).end)!=null?s:NaN).toFixed(3)}]${r&&e.type==="main"?"INDEPENDENT="+(r.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.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Ni(i){return!!i.interstitialsController&&i.enableInterstitialPlayback!==!1}class qi{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let r;if(e.length)e.length===1?r=e[0]:r=aA(e,t);else return new Uint8Array(0);return this.reset(),r}reset(){this.chunks.length=0,this.dataLength=0}}function aA(i,e){const t=new Uint8Array(e);let r=0;for(let n=0;n<i.length;n++){const s=i[n];t.set(s,r),r+=s.length}return t}var hs={exports:{}},Hi;function es(){return Hi||(Hi=1,function(i){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function n(l,o,h){this.fn=l,this.context=o,this.once=h||!1}function s(l,o,h,d,p){if(typeof h!="function")throw new TypeError("The listener must be a function");var v=new n(h,d||l,p),b=t?t+o:o;return l._events[b]?l._events[b].fn?l._events[b]=[l._events[b],v]:l._events[b].push(v):(l._events[b]=v,l._eventsCount++),l}function A(l,o){--l._eventsCount===0?l._events=new r:delete l._events[o]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var o=[],h,d;if(this._eventsCount===0)return o;for(d in h=this._events)e.call(h,d)&&o.push(t?d.slice(1):d);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(h)):o},a.prototype.listeners=function(o){var h=t?t+o:o,d=this._events[h];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,v=d.length,b=new Array(v);p<v;p++)b[p]=d[p].fn;return b},a.prototype.listenerCount=function(o){var h=t?t+o:o,d=this._events[h];return d?d.fn?1:d.length:0},a.prototype.emit=function(o,h,d,p,v,b){var S=t?t+o:o;if(!this._events[S])return!1;var F=this._events[S],te=arguments.length,fe,oe;if(F.fn){switch(F.once&&this.removeListener(o,F.fn,void 0,!0),te){case 1:return F.fn.call(F.context),!0;case 2:return F.fn.call(F.context,h),!0;case 3:return F.fn.call(F.context,h,d),!0;case 4:return F.fn.call(F.context,h,d,p),!0;case 5:return F.fn.call(F.context,h,d,p,v),!0;case 6:return F.fn.call(F.context,h,d,p,v,b),!0}for(oe=1,fe=new Array(te-1);oe<te;oe++)fe[oe-1]=arguments[oe];F.fn.apply(F.context,fe)}else{var pe=F.length,Te;for(oe=0;oe<pe;oe++)switch(F[oe].once&&this.removeListener(o,F[oe].fn,void 0,!0),te){case 1:F[oe].fn.call(F[oe].context);break;case 2:F[oe].fn.call(F[oe].context,h);break;case 3:F[oe].fn.call(F[oe].context,h,d);break;case 4:F[oe].fn.call(F[oe].context,h,d,p);break;default:if(!fe)for(Te=1,fe=new Array(te-1);Te<te;Te++)fe[Te-1]=arguments[Te];F[oe].fn.apply(F[oe].context,fe)}}return!0},a.prototype.on=function(o,h,d){return s(this,o,h,d,!1)},a.prototype.once=function(o,h,d){return s(this,o,h,d,!0)},a.prototype.removeListener=function(o,h,d,p){var v=t?t+o:o;if(!this._events[v])return this;if(!h)return A(this,v),this;var b=this._events[v];if(b.fn)b.fn===h&&(!p||b.once)&&(!d||b.context===d)&&A(this,v);else{for(var S=0,F=[],te=b.length;S<te;S++)(b[S].fn!==h||p&&!b[S].once||d&&b[S].context!==d)&&F.push(b[S]);F.length?this._events[v]=F.length===1?F[0]:F:A(this,v)}return this},a.prototype.removeAllListeners=function(o){var h;return o?(h=t?t+o:o,this._events[h]&&A(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,i.exports=a}(hs)),hs.exports}var Ds=es(),ts=I(Ds);const Ls="1.6.2",rs={};function ol(){return typeof __HLS_WORKER_BUNDLE__=="function"}function ll(){const i=rs[Ls];if(i)return i.clientCount++,i;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),n={worker:new self.Worker(t),objectURL:t,clientCount:1};return rs[Ls]=n,n}function ul(i){const e=rs[i];if(e)return e.clientCount++,e;const t=new self.URL(i,self.location.href).href,n={worker:new self.Worker(t),scriptURL:t,clientCount:1};return rs[i]=n,n}function cl(i){const e=rs[i||Ls];if(e&&e.clientCount--===1){const{worker:r,objectURL:n}=e;delete rs[i||Ls],n&&self.URL.revokeObjectURL(n),r.terminate()}}function Pa(i,e){return e+10<=i.length&&i[e]===51&&i[e+1]===68&&i[e+2]===73&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function Ki(i,e){return e+10<=i.length&&i[e]===73&&i[e+1]===68&&i[e+2]===51&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function oA(i,e){let t=0;return t=(i[e]&127)<<21,t|=(i[e+1]&127)<<14,t|=(i[e+2]&127)<<7,t|=i[e+3]&127,t}function Us(i,e){const t=e;let r=0;for(;Ki(i,e);){r+=10;const n=oA(i,e+6);r+=n,Pa(i,e+10)&&(r+=10),e+=r}if(r>0)return i.subarray(t,t+r)}function lA(i,e,t,r){const n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],s=e[t+2],A=s>>2&15;if(A>12){const v=new Error(`invalid ADTS sampling index:${A}`);i.emit(m.ERROR,m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!0,error:v,reason:v.message});return}const a=(s>>6&3)+1,l=e[t+3]>>6&3|(s&1)<<2,o="mp4a.40."+a,h=n[A];let d=A;(a===5||a===29)&&(d-=3);const p=[a<<3|(d&14)>>1,(d&1)<<7|l<<3];return ne.log(`manifest codec:${r}, parsed codec:${o}, channels:${l}, rate:${h} (ADTS object type:${a} sampling index:${A})`),{config:p,samplerate:h,channelCount:l,codec:o,parsedCodec:o,manifestCodec:r}}function Ma(i,e){return i[e]===255&&(i[e+1]&246)===240}function Na(i,e){return i[e+1]&1?7:9}function WA(i,e){return(i[e+3]&3)<<11|i[e+4]<<3|(i[e+5]&224)>>>5}function fl(i,e){return e+5<i.length}function ns(i,e){return e+1<i.length&&Ma(i,e)}function hl(i,e){return fl(i,e)&&Ma(i,e)&&WA(i,e)<=i.length-e}function dl(i,e){if(ns(i,e)){const t=Na(i,e);if(e+t>=i.length)return!1;const r=WA(i,e);if(r<=t)return!1;const n=e+r;return n===i.length||ns(i,n)}return!1}function Ha(i,e,t,r,n){if(!i.samplerate){const s=lA(e,t,r,n);if(!s)return;B(i,s)}}function Ka(i){return 1024*9e4/i}function uA(i,e){const t=Na(i,e);if(e+t<=i.length){const r=WA(i,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function $a(i,e,t,r,n){const s=Ka(i.samplerate),A=r+n*s,a=uA(e,t);let l;if(a){const{frameLength:d,headerLength:p}=a,v=p+d,b=Math.max(0,t+v-e.length);b?(l=new Uint8Array(v-p),l.set(e.subarray(t+p,e.length),0)):l=e.subarray(t+p,t+v);const S={unit:l,pts:A};return b||i.samples.push(S),{sample:S,length:v,missing:b}}const o=e.length-t;return l=new Uint8Array(o),l.set(e.subarray(t,e.length),0),{sample:{unit:l,pts:A},length:o,missing:-1}}function gl(i,e){return Ki(i,e)&&oA(i,e+6)+10<=i.length-e}function pl(i){if(i.size<2)return;const e=Me(i.data,!0),t=new Uint8Array(i.data.subarray(e.length+1));return{key:i.type,info:e,data:t.buffer}}function ml(i){if(i.size<2)return;if(i.type==="TXXX"){let t=1;const r=Me(i.data.subarray(t),!0);t+=r.length+1;const n=Me(i.data.subarray(t));return{key:i.type,info:r,data:n}}const e=Me(i.data.subarray(1));return{key:i.type,info:"",data:e}}function cA(i){if(i.type==="WXXX"){if(i.size<2)return;let t=1;const r=Me(i.data.subarray(t),!0);t+=r.length+1;const n=Me(i.data.subarray(t));return{key:i.type,info:r,data:n}}const e=Me(i.data);return{key:i.type,info:"",data:e}}function _l(i){return btoa(String.fromCharCode(...i))}function Ga(i,e){if(i<0)return-Ga(-i,e);const t=Math.pow(10,e);if(Math.abs(i*t%1-.5)<Number.EPSILON){const n=Math.floor(i*t);return(n%2===0?n:n+1)/t}else return Math.round(i*t)/t}function vl(i,e){const t=new URL(i),r=new URL(e);if(t.origin!==r.origin)return i;const n=t.pathname.split("/").slice(1),s=r.pathname.split("/").slice(1,-1);for(;n[0]===s[0];)n.shift(),s.shift();for(;s.length;)s.shift(),n.unshift("..");return n.join("/")}function Bl(){try{return crypto.randomUUID()}catch(i){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,n=>{const s=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(n=="x"?s:s&3|8).toString(16)})}}}function yl(i){return i instanceof ArrayBuffer?i:i.byteOffset==0&&i.byteLength==i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer}function ZA(i,e=0,t=1/0){return El(i,e,t,Uint8Array)}function El(i,e,t,r){const n=wl(i);let s=1;"BYTES_PER_ELEMENT"in r&&(s=r.BYTES_PER_ELEMENT);const A=Cl(i)?i.byteOffset:0,a=(A+i.byteLength)/s,l=(A+e)/s,o=Math.floor(Math.max(0,Math.min(l,a))),h=Math.floor(Math.min(o+Math.max(t,0),a));return new r(n,o,h-o)}function wl(i){return i instanceof ArrayBuffer?i:i.buffer}function Cl(i){return i&&i.buffer instanceof ArrayBuffer&&i.byteLength!==void 0&&i.byteOffset!==void 0}function bl(i){const e={key:i.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(i.size<2)return;if(i.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const r=i.data.subarray(1).indexOf(0);if(r===-1)return;const n=Me(ZA(i.data,1,r)),s=i.data[2+r],A=i.data.subarray(3+r).indexOf(0);if(A===-1)return;const a=Me(ZA(i.data,3+r,A));let l;return n==="-->"?l=Me(ZA(i.data,4+r+A)):l=yl(i.data.subarray(4+r+A)),e.mimeType=n,e.pictureType=s,e.description=a,e.data=l,e}function fA(i){return i.type==="PRIV"?pl(i):i.type[0]==="W"?cA(i):i.type==="APIC"?bl(i):ml(i)}function xl(i){const e=String.fromCharCode(i[0],i[1],i[2],i[3]),t=oA(i,4),r=10;return{type:e,size:t,data:i.subarray(r,r+t)}}const hA=10,Va=10;function Wa(i){let e=0;const t=[];for(;Ki(i,e);){const r=oA(i,e+6);i[e+5]>>6&1&&(e+=hA),e+=hA;const n=e+r;for(;e+Va<n;){const s=xl(i.subarray(e)),A=fA(s);A&&t.push(A),e+=s.size+hA}Pa(i,e)&&(e+=hA)}return t}function Za(i){return i&&i.key==="PRIV"&&i.info==="com.apple.streaming.transportStreamTimestamp"}function zA(i){if(i.data.byteLength===8){const e=new Uint8Array(i.data),t=e[3]&1;let r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,t&&(r+=4772185884e-2),Math.round(r)}}function ds(i){const e=Wa(i);for(let t=0;t<e.length;t++){const r=e[t];if(Za(r))return zA(r)}}let oi=function(i){return i.audioId3="org.id3",i.dateRange="com.apple.quicktime.HLS",i.emsg="https://aomedia.org/emsg/ID3",i.misbklv="urn:misb:KLV:bin:1910.1",i}({});function Si(i="",e=9e4){return{type:i,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class YA{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,r,n){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,r){}demux(e,t){this.cachedData&&(e=Ne(this.cachedData,e),this.cachedData=null);let r=Us(e,0),n=r?r.length:0,s;const A=this._audioTrack,a=this._id3Track,l=r?ds(r):void 0,o=e.length;for((this.basePTS===null||this.frameIndex===0&&V(l))&&(this.basePTS=Fl(l,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:oi.audioId3,duration:Number.POSITIVE_INFINITY});n<o;){if(this.canParse(e,n)){const h=this.appendFrame(A,e,n);h?(this.frameIndex++,this.lastPTS=h.sample.pts,n+=h.length,s=n):n=o}else gl(e,n)?(r=Us(e,n),a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:oi.audioId3,duration:Number.POSITIVE_INFINITY}),n+=r.length,s=n):n++;if(n===o&&s!==o){const h=e.slice(s);this.cachedData?this.cachedData=Ne(this.cachedData,h):this.cachedData=h}}return{audioTrack:A,videoTrack:Si(),id3Track:a,textTrack:Si()}}demuxSampleAes(e,t,r){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:Si(),id3Track:this._id3Track,textTrack:Si()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const Fl=(i,e,t)=>{if(V(i))return i*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};let dA=null;const Sl=[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],gA=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Tl=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Il=[0,1,1,4];function za(i,e,t,r,n){if(t+24>e.length)return;const s=Ya(e,t);if(s&&t+s.frameLength<=e.length){const A=s.samplesPerFrame*9e4/s.sampleRate,a=r+n*A,l={unit:e.subarray(t,t+s.frameLength),pts:a,dts:a};return i.config=[],i.channelCount=s.channelCount,i.samplerate=s.sampleRate,i.samples.push(l),{sample:l,length:s.frameLength,missing:0}}}function Ya(i,e){const t=i[e+1]>>3&3,r=i[e+1]>>1&3,n=i[e+2]>>4&15,s=i[e+2]>>2&3;if(t!==1&&n!==0&&n!==15&&s!==3){const A=i[e+2]>>1&1,a=i[e+3]>>6,l=t===3?3-r:r===3?3:4,o=Sl[l*14+n-1]*1e3,d=gA[(t===3?0:t===2?1:2)*3+s],p=a===3?1:2,v=Tl[t][r],b=Il[r],S=v*8*b,F=Math.floor(v*o/d+A)*b;if(dA===null){const oe=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);dA=oe?parseInt(oe[1]):0}return!!dA&&dA<=87&&r===2&&o>=224e3&&a===0&&(i[e+3]=i[e+3]|128),{sampleRate:d,channelCount:p,frameLength:F,samplesPerFrame:S}}}function jA(i,e){return i[e]===255&&(i[e+1]&224)===224&&(i[e+1]&6)!==0}function ja(i,e){return e+1<i.length&&jA(i,e)}function Dl(i,e){return jA(i,e)&&4<=i.length-e}function Xa(i,e){if(e+1<i.length&&jA(i,e)){const r=Ya(i,e);let n=4;r!=null&&r.frameLength&&(n=r.frameLength);const s=e+n;return s===i.length||ja(i,s)}return!1}class Ll extends YA{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const r=Us(e,0);let n=(r==null?void 0:r.length)||0;if(Xa(e,n))return!1;for(let s=e.length;n<s;n++)if(dl(e,n))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return hl(e,t)}appendFrame(e,t,r){Ha(e,this.observer,t,r,e.manifestCodec);const n=$a(e,t,r,this.basePTS,this.frameIndex);if(n&&n.missing===0)return n}}const Ja=(i,e)=>{let t=0,r=5;e+=r;const n=new Uint32Array(1),s=new Uint32Array(1),A=new Uint8Array(1);for(;r>0;){A[0]=i[e];const a=Math.min(r,8),l=8-a;s[0]=4278190080>>>24+l<<l,n[0]=(A[0]&s[0])>>l,t=t?t<<a|n[0]:n[0],e+=1,r-=a}return t};class Ul extends YA{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,r){const n=qa(e,t,r,this.basePTS,this.frameIndex);if(n!==-1)return{sample:e.samples[e.samples.length-1],length:n,missing:0}}static probe(e){if(!e)return!1;const t=Us(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&ds(t)!==void 0&&Ja(e,r)<16}}function qa(i,e,t,r,n){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const s=e[t+4]>>6;if(s>=3)return-1;const a=[48e3,44100,32e3][s],l=e[t+4]&63,h=[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][l*3+s]*2;if(t+h>e.length)return-1;const d=e[t+6]>>5;let p=0;d===2?p+=2:(d&1&&d!==1&&(p+=2),d&4&&(p+=2));const v=(e[t+6]<<8|e[t+7])>>12-p&1,S=[2,1,2,3,3,4,4,5][d]+v,F=e[t+5]>>3,te=e[t+5]&7,fe=new Uint8Array([s<<6|F<<1|te>>2,(te&3)<<6|d<<3|v<<2|l>>4,l<<4&224]),oe=1536/a*9e4,pe=r+n*oe,Te=e.subarray(t,t+h);return i.config=fe,i.channelCount=S,i.samplerate=a,i.samples.push({unit:Te,pts:pe}),h}class eo extends YA{resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Us(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&ds(t)!==void 0&&Ja(e,r)<=16)return!1;for(let n=e.length;r<n;r++)if(Xa(e,r))return ne.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return Dl(e,t)}appendFrame(e,t,r){if(this.basePTS!==null)return za(e,t,r,this.basePTS,this.frameIndex)}}const Rl=/\/emsg[-/]ID3/i;class Ql{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,r,n){const s=this.videoTrack=Si("video",1),A=this.audioTrack=Si("audio",1),a=this.txtTrack=Si("text",1);if(this.id3Track=Si("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const l=N(e);if(l.video){const{id:o,timescale:h,codec:d,supplemental:p}=l.video;s.id=o,s.timescale=a.timescale=h,s.codec=d,s.supplemental=p}if(l.audio){const{id:o,timescale:h,codec:d}=l.audio;A.id=o,A.timescale=h,A.codec=d}a.id=ht.text,s.sampleDuration=0,s.duration=A.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return L(e)}demux(e,t){this.timeOffset=t;let r=e;const n=this.videoTrack,s=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=Ne(this.remainderData,e));const a=it(r);this.remainderData=a.remainder,n.samples=a.valid||new Uint8Array}else n.samples=r;const A=this.extractID3Track(n,t);return s.samples=Ze(t,n),{videoTrack:n,audioTrack:this.audioTrack,id3Track:A,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,r=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const n=this.extractID3Track(t,this.timeOffset);return r.samples=Ze(e,t),{videoTrack:t,audioTrack:Si(),id3Track:n,textTrack:Si()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=g(e.samples,["emsg"]);n&&n.forEach(s=>{const A=Wt(s);if(Rl.test(A.schemeIdUri)){const a=to(A,t);let l=A.eventDuration===4294967295?Number.POSITIVE_INFINITY:A.eventDuration/A.timeScale;l<=.001&&(l=Number.POSITIVE_INFINITY);const o=A.payload;r.samples.push({data:o,len:o.byteLength,dts:a,pts:a,type:oi.emsg,duration:l})}else if(this.config.enableEmsgKLVMetadata&&A.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const a=to(A,t);r.samples.push({data:A.payload,len:A.payload.byteLength,dts:a,pts:a,type:oi.misbklv,duration:Number.POSITIVE_INFINITY})}})}return r}demuxSampleAes(e,t,r){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 to(i,e){return V(i.presentationTime)?i.presentationTime/i.timeScale:e+i.presentationTimeDelta/i.timeScale}class Rs{constructor(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new vr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,$t.cbc)}decryptAacSample(e,t,r){const n=e[t].unit;if(n.length<=16)return;const s=n.subarray(16,n.length-n.length%16),A=s.buffer.slice(s.byteOffset,s.byteOffset+s.length);this.decryptBuffer(A).then(a=>{const l=new Uint8Array(a);n.set(l,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,r)})}decryptAacSamples(e,t,r){for(;;t++){if(t>=e.length){r();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,r),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,r=new Int8Array(t);let n=0;for(let s=32;s<e.length-16;s+=160,n+=16)r.set(e.subarray(s,s+16),n);return r}getAvcDecryptedUnit(e,t){const r=new Uint8Array(t);let n=0;for(let s=32;s<e.length-16;s+=160,n+=16)e.set(r.subarray(n,n+16),s);return e}decryptAvcSample(e,t,r,n,s){const A=Ct(s.data),a=this.getAvcEncryptedData(A);this.decryptBuffer(a.buffer).then(l=>{s.data=this.getAvcDecryptedUnit(A,l),this.decrypter.isSync()||this.decryptAvcSamples(e,t,r+1,n)})}decryptAvcSamples(e,t,r,n){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,r=0){if(t>=e.length){n();return}const s=e[t].units;for(;!(r>=s.length);r++){const A=s[r];if(!(A.data.length<=48||A.type!==1&&A.type!==5)&&(this.decryptAvcSample(e,t,r,n,A),!this.decrypter.isSync()))return}}}}class ro{constructor(){this.VideoSample=null}createVideoSample(e,t,r){return{key:e,frame:!1,pts:t,dts:r,units:[],length:0}}getLastNalUnit(e){var t;let r=this.VideoSample,n;if((!r||r.units.length===0)&&(r=e[e.length-1]),(t=r)!=null&&t.units){const s=r.units;n=s[s.length-1]}return n}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const r=t.samples,n=r.length;if(n){const s=r[n-1];e.pts=s.pts,e.dts=s.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,r){const n=t.byteLength;let s=e.naluState||0;const A=s,a=[];let l=0,o,h,d,p=-1,v=0;for(s===-1&&(p=0,v=this.getNALuType(t,0),s=0,l=1);l<n;){if(o=t[l++],!s){s=o?0:1;continue}if(s===1){s=o?0:2;continue}if(!o)s=3;else if(o===1){if(h=l-s-1,p>=0){const b={data:t.subarray(p,h),type:v};a.push(b)}else{const b=this.getLastNalUnit(e.samples);b&&(A&&l<=4-A&&b.state&&(b.data=b.data.subarray(0,b.data.byteLength-A)),h>0&&(b.data=Ne(b.data,t.subarray(0,h)),b.state=0))}l<n?(d=this.getNALuType(t,l),p=l,v=d,s=0):s=-1}else s=0}if(p>=0&&s>=0){const b={data:t.subarray(p,n),type:v,state:s};a.push(b)}if(a.length===0){const b=this.getLastNalUnit(e.samples);b&&(b.data=Ne(b.data,t))}return e.naluState=s,a}}class Qs{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,r=e.byteLength-t,n=new Uint8Array(4),s=Math.min(4,t);if(s===0)throw new Error("no bytes available");n.set(e.subarray(r,r+s)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=s*8,this.bytesAvailable-=s}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 r=this.word>>>32-t;if(e>32&&ne.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?r<<t|this.readBits(t):r}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 XA extends ro{parsePES(e,t,r,n){const s=this.parseNALu(e,r.data,n);let A=this.VideoSample,a,l=!1;r.data=null,A&&s.length&&!e.audFound&&(this.pushAccessUnit(A,e),A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.forEach(o=>{var h,d;switch(o.type){case 1:{let S=!1;a=!0;const F=o.data;if(l&&F.length>4){const te=this.readSliceType(F);(te===2||te===4||te===7||te===9)&&(S=!0)}if(S){var p;(p=A)!=null&&p.frame&&!A.key&&(this.pushAccessUnit(A,e),A=this.VideoSample=null)}A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.frame=!0,A.key=S;break}case 5:a=!0,(h=A)!=null&&h.frame&&!A.key&&(this.pushAccessUnit(A,e),A=this.VideoSample=null),A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.key=!0,A.frame=!0;break;case 6:{a=!0,Ot(o.data,1,r.pts,t.samples);break}case 7:{var v,b;a=!0,l=!0;const S=o.data,F=this.readSPS(S);if(!e.sps||e.width!==F.width||e.height!==F.height||((v=e.pixelRatio)==null?void 0:v[0])!==F.pixelRatio[0]||((b=e.pixelRatio)==null?void 0:b[1])!==F.pixelRatio[1]){e.width=F.width,e.height=F.height,e.pixelRatio=F.pixelRatio,e.sps=[S];const te=S.subarray(1,4);let fe="avc1.";for(let oe=0;oe<3;oe++){let pe=te[oe].toString(16);pe.length<2&&(pe="0"+pe),fe+=pe}e.codec=fe}break}case 8:a=!0,e.pps=[o.data];break;case 9:a=!0,e.audFound=!0,(d=A)!=null&&d.frame&&(this.pushAccessUnit(A,e),A=null),A||(A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;case 12:a=!0;break;default:a=!1;break}A&&a&&A.units.push(o)}),n&&A&&(this.pushAccessUnit(A,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new Qs(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let r=8,n=8,s;for(let A=0;A<e;A++)n!==0&&(s=t.readEG(),n=(r+s+256)%256),r=n===0?r:n}readSPS(e){const t=new Qs(e);let r=0,n=0,s=0,A=0,a,l,o;const h=t.readUByte.bind(t),d=t.readBits.bind(t),p=t.readUEG.bind(t),v=t.readBoolean.bind(t),b=t.skipBits.bind(t),S=t.skipEG.bind(t),F=t.skipUEG.bind(t),te=this.skipScalingList.bind(this);h();const fe=h();if(d(5),b(3),h(),F(),fe===100||fe===110||fe===122||fe===244||fe===44||fe===83||fe===86||fe===118||fe===128){const $e=p();if($e===3&&b(1),F(),F(),b(1),v())for(l=$e!==3?8:12,o=0;o<l;o++)v()&&(o<6?te(16,t):te(64,t))}F();const oe=p();if(oe===0)p();else if(oe===1)for(b(1),S(),S(),a=p(),o=0;o<a;o++)S();F(),b(1);const pe=p(),Te=p(),Ke=d(1);Ke===0&&b(1),b(1),v()&&(r=p(),n=p(),s=p(),A=p());let xe=[1,1];if(v()&&v())switch(h()){case 1:xe=[1,1];break;case 2:xe=[12,11];break;case 3:xe=[10,11];break;case 4:xe=[16,11];break;case 5:xe=[40,33];break;case 6:xe=[24,11];break;case 7:xe=[20,11];break;case 8:xe=[32,11];break;case 9:xe=[80,33];break;case 10:xe=[18,11];break;case 11:xe=[15,11];break;case 12:xe=[64,33];break;case 13:xe=[160,99];break;case 14:xe=[4,3];break;case 15:xe=[3,2];break;case 16:xe=[2,1];break;case 255:{xe=[h()<<8|h(),h()<<8|h()];break}}return{width:Math.ceil((pe+1)*16-r*2-n*2),height:(2-Ke)*(Te+1)*16-(Ke?2:4)*(s+A),pixelRatio:xe}}}class no extends ro{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,r,n){const s=this.parseNALu(e,r.data,n);let A=this.VideoSample,a,l=!1;r.data=null,A&&s.length&&!e.audFound&&(this.pushAccessUnit(A,e),A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.forEach(o=>{var h,d;switch(o.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:A||(A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),A.frame=!0,a=!0;break;case 16:case 17:case 18:case 21:if(a=!0,l){var p;(p=A)!=null&&p.frame&&!A.key&&(this.pushAccessUnit(A,e),A=this.VideoSample=null)}A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.key=!0,A.frame=!0;break;case 19:case 20:a=!0,(h=A)!=null&&h.frame&&!A.key&&(this.pushAccessUnit(A,e),A=this.VideoSample=null),A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.key=!0,A.frame=!0;break;case 39:a=!0,Ot(o.data,2,r.pts,t.samples);break;case 32:a=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=B(e.params,this.readVPS(o.data)),this.initVPS=o.data),e.vps=[o.data];break;case 33:if(a=!0,l=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],o.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const v=this.readSPS(o.data);e.width=v.width,e.height=v.height,e.pixelRatio=v.pixelRatio,e.codec=v.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const b in v.params)e.params[b]=v.params[b]}this.pushParameterSet(e.sps,o.data,e.vps),A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.key=!0;break;case 34:if(a=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const v=this.readPPS(o.data);for(const b in v)e.params[b]=v[b]}this.pushParameterSet(e.pps,o.data,e.vps)}break;case 35:a=!0,e.audFound=!0,(d=A)!=null&&d.frame&&(this.pushAccessUnit(A,e),A=null),A||(A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;default:a=!1;break}A&&a&&A.units.push(o)}),n&&A&&(this.pushAccessUnit(A,e),this.VideoSample=null)}pushParameterSet(e,t,r){(r&&r[0]===this.initVPS||!r&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let r=0;for(let n=0;n<e.byteLength;n++)n>=2&&e[n]===3&&e[n-1]===0&&e[n-2]===0||(t[r]=e[n],r++);return new Uint8Array(t.buffer,0,r)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new Qs(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const r=t.readBits(3),n=t.readBoolean();return{numTemporalLayers:r+1,temporalIdNested:n}}readSPS(e){const t=new Qs(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const r=t.readBits(3);t.readBoolean();const n=t.readBits(2),s=t.readBoolean(),A=t.readBits(5),a=t.readUByte(),l=t.readUByte(),o=t.readUByte(),h=t.readUByte(),d=t.readUByte(),p=t.readUByte(),v=t.readUByte(),b=t.readUByte(),S=t.readUByte(),F=t.readUByte(),te=t.readUByte(),fe=[],oe=[];for(let dn=0;dn<r;dn++)fe.push(t.readBoolean()),oe.push(t.readBoolean());if(r>0)for(let dn=r;dn<8;dn++)t.readBits(2);for(let dn=0;dn<r;dn++)fe[dn]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),oe[dn]&&t.readUByte();t.readUEG();const pe=t.readUEG();pe==3&&t.skipBits(1);const Te=t.readUEG(),Ke=t.readUEG(),xe=t.readBoolean();let $e=0,st=0,Pe=0,Bt=0;xe&&($e+=t.readUEG(),st+=t.readUEG(),Pe+=t.readUEG(),Bt+=t.readUEG());const kt=t.readUEG(),Qr=t.readUEG(),cr=t.readUEG(),nr=t.readBoolean();for(let dn=nr?0:r;dn<=r;dn++)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 si=0;si<4;si++)for(let Li=0;Li<(si===3?2:6);Li++)if(!t.readBoolean())t.readUEG();else{const Qi=Math.min(64,1<<4+(si<<1));si>1&&t.readEG();for(let $A=0;$A<Qi;$A++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const or=t.readUEG();let Dt=0;for(let dn=0;dn<or;dn++){let si=!1;if(dn!==0&&(si=t.readBoolean()),si){dn===or&&t.readUEG(),t.readBoolean(),t.readUEG();let Li=0;for(let qs=0;qs<=Dt;qs++){const Qi=t.readBoolean();let $A=!1;Qi||($A=t.readBoolean()),(Qi||$A)&&Li++}Dt=Li}else{const Li=t.readUEG(),qs=t.readUEG();Dt=Li+qs;for(let Qi=0;Qi<Li;Qi++)t.readUEG(),t.readBoolean();for(let Qi=0;Qi<qs;Qi++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const dn=t.readUEG();for(let si=0;si<dn;si++){for(let Li=0;Li<cr+4;Li++)t.readBits(1);t.readBits(1)}}let Fr=0,wr=1,Ur=1,Zr=!0,nn=1,bn=0;t.readBoolean(),t.readBoolean();let ui=!1;if(t.readBoolean()){if(t.readBoolean()){const eA=t.readUByte(),Ju=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],al=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];eA>0&&eA<16?(wr=Ju[eA-1],Ur=al[eA-1]):eA===255&&(wr=t.readBits(16),Ur=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(),ui=t.readBoolean(),ui&&($e+=t.readUEG(),st+=t.readUEG(),Pe+=t.readUEG(),Bt+=t.readUEG()),t.readBoolean()&&(nn=t.readBits(32),bn=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const al=t.readBoolean(),qu=t.readBoolean();let ka=!1;(al||qu)&&(ka=t.readBoolean(),ka&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),ka&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let ec=0;ec<=r;ec++){Zr=t.readBoolean();const ac=Zr||t.readBoolean();let tc=!1;ac?t.readEG():tc=t.readBoolean();const rc=tc?1:t.readUEG()+1;if(al)for(let Oa=0;Oa<rc;Oa++)t.readUEG(),t.readUEG(),ka&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(qu)for(let Oa=0;Oa<rc;Oa++)t.readUEG(),t.readUEG(),ka&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Fr=t.readUEG())}let bs=Te,Xu=Ke;if(xe||ui){let dn=1,si=1;pe===1?dn=si=2:pe==2&&(dn=2),bs=Te-dn*st-dn*$e,Xu=Ke-si*Bt-si*Pe}const sc=n?["A","B","C"][n]:"",Ac=a<<24|l<<16|o<<8|h;let Yu=0;for(let dn=0;dn<32;dn++)Yu=(Yu|(Ac>>dn&1)<<31-dn)>>>0;let ju=Yu.toString(16);return A===1&&ju==="2"&&(ju="6"),{codecString:`hvc1.${sc}${A}.${ju}.${s?"H":"L"}${te}.B0`,params:{general_tier_flag:s,general_profile_idc:A,general_profile_space:n,general_profile_compatibility_flags:[a,l,o,h],general_constraint_indicator_flags:[d,p,v,b,S,F],general_level_idc:te,bit_depth:kt+8,bit_depth_luma_minus8:kt,bit_depth_chroma_minus8:Qr,min_spatial_segmentation_idc:Fr,chroma_format_idc:pe,frame_rate:{fixed:Zr,fps:bn/nn}},width:bs,height:Xu,pixelRatio:[wr,Ur]}}readPPS(e){const t=new Qs(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 n=t.readBoolean(),s=t.readBoolean();let A=1;return s&&n?A=0:s?A=3:n&&(A=2),{parallelismType:A}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const Kn=188;class $i{constructor(e,t,r,n){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=r,this.logger=n,this.videoParser=null}static probe(e,t){const r=$i.syncOffset(e);return r>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${r}`),r!==-1}static syncOffset(e){const t=e.length;let r=Math.min(Kn*5,t-Kn)+1,n=0;for(;n<r;){let s=!1,A=-1,a=0;for(let l=n;l<t;l+=Kn)if(e[l]===71&&(t-l===Kn||e[l+Kn]===71)){if(a++,A===-1&&(A=l,A!==0&&(r=Math.min(A+Kn*99,e.length-Kn)+1)),s||(s=JA(e,l)===0),s&&a>1&&(A===0&&a>2||l+Kn>r))return A}else{if(a)return-1;break}n++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:ht[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,r,n){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=$i.createTrack("video"),this._videoTrack.duration=n,this._audioTrack=$i.createTrack("audio",n),this._id3Track=$i.createTrack("id3"),this._txtTrack=$i.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=r}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:r}=this;e&&(e.pesData=null),t&&(t.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,r=!1,n=!1){r||(this.sampleAes=null);let s;const A=this._videoTrack,a=this._audioTrack,l=this._id3Track,o=this._txtTrack;let h=A.pid,d=A.pesData,p=a.pid,v=l.pid,b=a.pesData,S=l.pesData,F=null,te=this.pmtParsed,fe=this._pmtId,oe=e.length;if(this.remainderData&&(e=Ne(this.remainderData,e),oe=e.length,this.remainderData=null),oe<Kn&&!n)return this.remainderData=e,{audioTrack:a,videoTrack:A,id3Track:l,textTrack:o};const pe=Math.max(0,$i.syncOffset(e));oe-=(oe-pe)%Kn,oe<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,oe,e.buffer.byteLength-oe));let Te=0;for(let xe=pe;xe<oe;xe+=Kn)if(e[xe]===71){const $e=!!(e[xe+1]&64),st=JA(e,xe),Pe=(e[xe+3]&48)>>4;let Bt;if(Pe>1){if(Bt=xe+5+e[xe+4],Bt===xe+Kn)continue}else Bt=xe+4;switch(st){case h:if($e){if(d&&(s=Tn(d,this.logger))){if(this.videoParser===null)switch(A.segmentCodec){case"avc":this.videoParser=new XA;break;case"hevc":this.videoParser=new no;break}this.videoParser!==null&&this.videoParser.parsePES(A,o,s,!1)}d={data:[],size:0}}d&&(d.data.push(e.subarray(Bt,xe+Kn)),d.size+=xe+Kn-Bt);break;case p:if($e){if(b&&(s=Tn(b,this.logger)))switch(a.segmentCodec){case"aac":this.parseAACPES(a,s);break;case"mp3":this.parseMPEGPES(a,s);break;case"ac3":this.parseAC3PES(a,s);break}b={data:[],size:0}}b&&(b.data.push(e.subarray(Bt,xe+Kn)),b.size+=xe+Kn-Bt);break;case v:$e&&(S&&(s=Tn(S,this.logger))&&this.parseID3PES(l,s),S={data:[],size:0}),S&&(S.data.push(e.subarray(Bt,xe+Kn)),S.size+=xe+Kn-Bt);break;case 0:$e&&(Bt+=e[Bt]+1),fe=this._pmtId=kl(e,Bt);break;case fe:{$e&&(Bt+=e[Bt]+1);const kt=Ol(e,Bt,this.typeSupported,r,this.observer,this.logger);h=kt.videoPid,h>0&&(A.pid=h,A.segmentCodec=kt.segmentVideoCodec),p=kt.audioPid,p>0&&(a.pid=p,a.segmentCodec=kt.segmentAudioCodec),v=kt.id3Pid,v>0&&(l.pid=v),F!==null&&!te&&(this.logger.warn(`MPEG-TS PMT found at ${xe} after unknown PID '${F}'. Backtracking to sync byte @${pe} to parse all TS packets.`),F=null,xe=pe-188),te=this.pmtParsed=!0;break}case 17:case 8191:break;default:F=st;break}}else Te++;Te>0&&qA(this.observer,new Error(`Found ${Te} TS packet/s that do not start with 0x47`),void 0,this.logger),A.pesData=d,a.pesData=b,l.pesData=S;const Ke={audioTrack:a,videoTrack:A,id3Track:l,textTrack:o};return n&&this.extractRemainingSamples(Ke),Ke}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:r,id3Track:n,textTrack:s}=e,A=r.pesData,a=t.pesData,l=n.pesData;let o;if(A&&(o=Tn(A,this.logger))){if(this.videoParser===null)switch(r.segmentCodec){case"avc":this.videoParser=new XA;break;case"hevc":this.videoParser=new no;break}this.videoParser!==null&&(this.videoParser.parsePES(r,s,o,!0),r.pesData=null)}else r.pesData=A;if(a&&(o=Tn(a,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,o);break;case"mp3":this.parseMPEGPES(t,o);break;case"ac3":this.parseAC3PES(t,o);break}t.pesData=null}else a!=null&&a.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=a;l&&(o=Tn(l,this.logger))?(this.parseID3PES(n,o),n.pesData=null):n.pesData=l}demuxSampleAes(e,t,r){const n=this.demux(e,r,!0,!this.config.progressive),s=this.sampleAes=new Rs(this.observer,this.config,t);return this.decrypt(n,s)}decrypt(e,t){return new Promise(r=>{const{audioTrack:n,videoTrack:s}=e;n.samples&&n.segmentCodec==="aac"?t.decryptAacSamples(n.samples,0,()=>{s.samples?t.decryptAvcSamples(s.samples,0,0,()=>{r(e)}):r(e)}):s.samples&&t.decryptAvcSamples(s.samples,0,0,()=>{r(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 r=0;const n=this.aacOverFlow;let s=t.data;if(n){this.aacOverFlow=null;const d=n.missing,p=n.sample.unit.byteLength;if(d===-1)s=Ne(n.sample.unit,s);else{const v=p-d;n.sample.unit.set(s.subarray(0,d),v),e.samples.push(n.sample),r=n.missing}}let A,a;for(A=r,a=s.length;A<a-1&&!ns(s,A);A++);if(A!==r){let d;const p=A<a-1;if(p?d=`AAC PES did not start with ADTS header,offset:${A}`:d="No ADTS header found in AAC PES",qA(this.observer,new Error(d),p,this.logger),!p)return}Ha(e,this.observer,s,A,this.audioCodec);let l;if(t.pts!==void 0)l=t.pts;else if(n){const d=Ka(e.samplerate);l=n.sample.pts+d}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let o=0,h;for(;A<a;)if(h=$a(e,s,A,l,o),A+=h.length,h.missing){this.aacOverFlow=h;break}else for(o++;A<a-1&&!ns(s,A);A++);}parseMPEGPES(e,t){const r=t.data,n=r.length;let s=0,A=0;const a=t.pts;if(a===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;A<n;)if(ja(r,A)){const l=za(e,r,A,a,s);if(l)A+=l.length,s++;else break}else A++}parseAC3PES(e,t){{const r=t.data,n=t.pts;if(n===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const s=r.length;let A=0,a=0,l;for(;a<s&&(l=qa(e,r,a,n,A++))>0;)a+=l}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=B({},t,{type:this._videoTrack?oi.emsg:oi.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function JA(i,e){return((i[e+1]&31)<<8)+i[e+2]}function kl(i,e){return(i[e+10]&31)<<8|i[e+11]}function Ol(i,e,t,r,n,s){const A={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},a=(i[e+1]&15)<<8|i[e+2],l=e+3+a-4,o=(i[e+10]&15)<<8|i[e+11];for(e+=12+o;e<l;){const h=JA(i,e),d=(i[e+3]&15)<<8|i[e+4];switch(i[e]){case 207:if(!r){ea("ADTS AAC",s);break}case 15:A.audioPid===-1&&(A.audioPid=h);break;case 21:A.id3Pid===-1&&(A.id3Pid=h);break;case 219:if(!r){ea("H.264",s);break}case 27:A.videoPid===-1&&(A.videoPid=h);break;case 3:case 4:!t.mpeg&&!t.mp3?s.log("MPEG audio found, not supported in this browser"):A.audioPid===-1&&(A.audioPid=h,A.segmentAudioCodec="mp3");break;case 193:if(!r){ea("AC-3",s);break}case 129:t.ac3?A.audioPid===-1&&(A.audioPid=h,A.segmentAudioCodec="ac3"):s.log("AC-3 audio found, not supported in this browser");break;case 6:if(A.audioPid===-1&&d>0){let p=e+5,v=d;for(;v>2;){switch(i[p]){case 106:t.ac3!==!0?s.log("AC-3 audio found, not supported in this browser for now"):(A.audioPid=h,A.segmentAudioCodec="ac3");break}const S=i[p+1]+2;p+=S,v-=S}}break;case 194:case 135:return qA(n,new Error("Unsupported EC-3 in M2TS found"),void 0,s),A;case 36:A.videoPid===-1&&(A.videoPid=h,A.segmentVideoCodec="hevc",s.log("HEVC in M2TS found"));break}e+=d+5}return A}function qA(i,e,t,r){r.warn(`parsing error: ${e.message}`),i.emit(m.ERROR,m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function ea(i,e){e.log(`${i} with AES-128-CBC encryption found in unencrypted stream`)}function Tn(i,e){let t=0,r,n,s,A,a;const l=i.data;if(!i||i.size===0)return null;for(;l[0].length<19&&l.length>1;)l[0]=Ne(l[0],l[1]),l.splice(1,1);if(r=l[0],(r[0]<<16)+(r[1]<<8)+r[2]===1){if(n=(r[4]<<8)+r[5],n&&n>i.size-6)return null;const h=r[7];h&192&&(A=(r[9]&14)*536870912+(r[10]&255)*4194304+(r[11]&254)*16384+(r[12]&255)*128+(r[13]&254)/2,h&64?(a=(r[14]&14)*536870912+(r[15]&255)*4194304+(r[16]&254)*16384+(r[17]&255)*128+(r[18]&254)/2,A-a>60*9e4&&(e.warn(`${Math.round((A-a)/9e4)}s delta between PTS and DTS, align them`),A=a)):a=A),s=r[8];let d=s+9;if(i.size<=d)return null;i.size-=d;const p=new Uint8Array(i.size);for(let v=0,b=l.length;v<b;v++){r=l[v];let S=r.byteLength;if(d)if(d>S){d-=S;continue}else r=r.subarray(d),S-=d,d=0;p.set(r,t),t+=S}return n&&(n-=s+3),{data:p,pts:A,dts:a,len:n}}return null}class Pl{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 Gi=Math.pow(2,32)-1;class Ve{static init(){Ve.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 Ve.types)Ve.types.hasOwnProperty(e)&&(Ve.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]),r=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]);Ve.HDLR_TYPES={video:t,audio:r};const n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);Ve.STTS=Ve.STSC=Ve.STCO=s,Ve.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ve.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ve.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ve.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const A=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);Ve.FTYP=Ve.box(Ve.types.ftyp,A,l,A,a),Ve.DINF=Ve.box(Ve.types.dinf,Ve.box(Ve.types.dref,n))}static box(e,...t){let r=8,n=t.length;const s=n;for(;n--;)r+=t[n].byteLength;const A=new Uint8Array(r);for(A[0]=r>>24&255,A[1]=r>>16&255,A[2]=r>>8&255,A[3]=r&255,A.set(e,4),n=0,r=8;n<s;n++)A.set(t[n],r),r+=t[n].byteLength;return A}static hdlr(e){return Ve.box(Ve.types.hdlr,Ve.HDLR_TYPES[e])}static mdat(e){return Ve.box(Ve.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(Gi+1)),n=Math.floor(t%(Gi+1));return Ve.box(Ve.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,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))}static mdia(e){return Ve.box(Ve.types.mdia,Ve.mdhd(e.timescale||0,e.duration||0),Ve.hdlr(e.type),Ve.minf(e))}static mfhd(e){return Ve.box(Ve.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"?Ve.box(Ve.types.minf,Ve.box(Ve.types.smhd,Ve.SMHD),Ve.DINF,Ve.stbl(e)):Ve.box(Ve.types.minf,Ve.box(Ve.types.vmhd,Ve.VMHD),Ve.DINF,Ve.stbl(e))}static moof(e,t,r){return Ve.box(Ve.types.moof,Ve.mfhd(e),Ve.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=Ve.trak(e[t]);return Ve.box.apply(null,[Ve.types.moov,Ve.mvhd(e[0].timescale||0,e[0].duration||0)].concat(r).concat(Ve.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=Ve.trex(e[t]);return Ve.box.apply(null,[Ve.types.mvex,...r])}static mvhd(e,t){t*=e;const r=Math.floor(t/(Gi+1)),n=Math.floor(t%(Gi+1)),s=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,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&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 Ve.box(Ve.types.mvhd,s)}static sdtp(e){const t=e.samples||[],r=new Uint8Array(4+t.length);let n,s;for(n=0;n<t.length;n++)s=t[n].flags,r[n+4]=s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy;return Ve.box(Ve.types.sdtp,r)}static stbl(e){return Ve.box(Ve.types.stbl,Ve.stsd(e),Ve.box(Ve.types.stts,Ve.STTS),Ve.box(Ve.types.stsc,Ve.STSC),Ve.box(Ve.types.stsz,Ve.STSZ),Ve.box(Ve.types.stco,Ve.STCO))}static avc1(e){let t=[],r=[],n,s,A;for(n=0;n<e.sps.length;n++)s=e.sps[n],A=s.byteLength,t.push(A>>>8&255),t.push(A&255),t=t.concat(Array.prototype.slice.call(s));for(n=0;n<e.pps.length;n++)s=e.pps[n],A=s.byteLength,r.push(A>>>8&255),r.push(A&255),r=r.concat(Array.prototype.slice.call(s));const a=Ve.box(Ve.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(r))),l=e.width,o=e.height,h=e.pixelRatio[0],d=e.pixelRatio[1];return Ve.box(Ve.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,l>>8&255,l&255,o>>8&255,o&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,Ve.box(Ve.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Ve.box(Ve.types.pasp,new Uint8Array([h>>24,h>>16&255,h>>8&255,h&255,d>>24,d>>16&255,d>>8&255,d&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 Ve.box(Ve.types.mp4a,Ve.audioStsd(e),Ve.box(Ve.types.esds,Ve.esds(e)))}static mp3(e){return Ve.box(Ve.types[".mp3"],Ve.audioStsd(e))}static ac3(e){return Ve.box(Ve.types["ac-3"],Ve.audioStsd(e),Ve.box(Ve.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return Ve.box(Ve.types.stsd,Ve.STSD,Ve.mp4a(e));if(t==="ac3"&&e.config)return Ve.box(Ve.types.stsd,Ve.STSD,Ve.ac3(e));if(t==="mp3"&&e.codec==="mp3")return Ve.box(Ve.types.stsd,Ve.STSD,Ve.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return Ve.box(Ve.types.stsd,Ve.STSD,Ve.avc1(e));if(t==="hevc"&&e.vps)return Ve.box(Ve.types.stsd,Ve.STSD,Ve.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,r=(e.duration||0)*(e.timescale||0),n=e.width||0,s=e.height||0,A=Math.floor(r/(Gi+1)),a=Math.floor(r%(Gi+1));return Ve.box(Ve.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,A>>24,A>>16&255,A>>8&255,A&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,n>>8&255,n&255,0,0,s>>8&255,s&255,0,0]))}static traf(e,t){const r=Ve.sdtp(e),n=e.id,s=Math.floor(t/(Gi+1)),A=Math.floor(t%(Gi+1));return Ve.box(Ve.types.traf,Ve.box(Ve.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),Ve.box(Ve.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,A>>24,A>>16&255,A>>8&255,A&255])),Ve.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,Ve.box(Ve.types.trak,Ve.tkhd(e),Ve.mdia(e))}static trex(e){const t=e.id;return Ve.box(Ve.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 r=e.samples||[],n=r.length,s=12+16*n,A=new Uint8Array(s);let a,l,o,h,d,p;for(t+=8+s,A.set([e.type==="video"?1:0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),a=0;a<n;a++)l=r[a],o=l.duration,h=l.size,d=l.flags,p=l.cts,A.set([o>>>24&255,o>>>16&255,o>>>8&255,o&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&61440,d.degradPrio&15,p>>>24&255,p>>>16&255,p>>>8&255,p&255],12+16*a);return Ve.box(Ve.types.trun,A)}static initSegment(e){Ve.types||Ve.init();const t=Ve.moov(e);return Ne(Ve.FTYP,t)}static hvc1(e){const t=e.params,r=[e.vps,e.sps,e.pps],n=4,s=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),n-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),r.length]);let A=s.length;for(let b=0;b<r.length;b+=1){A+=3;for(let S=0;S<r[b].length;S+=1)A+=2+r[b][S].length}const a=new Uint8Array(A);a.set(s,0),A=s.length;const l=r.length-1;for(let b=0;b<r.length;b+=1){a.set(new Uint8Array([32+b|(b===l?128:0),0,r[b].length]),A),A+=3;for(let S=0;S<r[b].length;S+=1)a.set(new Uint8Array([r[b][S].length>>8,r[b][S].length&255]),A),A+=2,a.set(r[b][S],A),A+=r[b][S].length}const o=Ve.box(Ve.types.hvcC,a),h=e.width,d=e.height,p=e.pixelRatio[0],v=e.pixelRatio[1];return Ve.box(Ve.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,h>>8&255,h&255,d>>8&255,d&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]),o,Ve.box(Ve.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Ve.box(Ve.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&255,v>>24,v>>16&255,v>>8&255,v&255])))}}Ve.types=void 0,Ve.HDLR_TYPES=void 0,Ve.STTS=void 0,Ve.STSC=void 0,Ve.STCO=void 0,Ve.STSZ=void 0,Ve.VMHD=void 0,Ve.SMHD=void 0,Ve.STSD=void 0,Ve.FTYP=void 0,Ve.DINF=void 0;const io=9e4;function ta(i,e,t=1,r=!1){const n=i*e*t;return r?Math.round(n):n}function so(i,e,t=1,r=!1){return ta(i,e,1/t,r)}function ks(i,e=!1){return ta(i,1e3,1/io,e)}function Ml(i,e=1){return ta(i,io,1/e)}const Nl=10*1e3,Hl=1024,Kl=1152,$l=1536;let is=null,rr=null;function Ao(i,e,t,r){return{duration:e,size:t,cts:r,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:i?2:1,isNonSync:i?0:1}}}class pA{constructor(e,t,r,n){if(this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.logger=n,this.ISGenerated=!1,is===null){const A=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);is=A?parseInt(A[1]):0}if(rr===null){const s=navigator.userAgent.match(/Safari\/(\d+)/i);rr=s?parseInt(s[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const r=e[0].pts,n=e.reduce((s,A)=>{let a=A.pts,l=a-s;return l<-4294967296&&(t=!0,a=ni(a,r),l=a-s),l>0?s:a},r);return t&&this.logger.debug("PTS rollover detected"),n}remux(e,t,r,n,s,A,a,l){let o,h,d,p,v,b,S=s,F=s;const te=e.pid>-1,fe=t.pid>-1,oe=t.samples.length,pe=e.samples.length>0,Te=a&&oe>0||oe>1;if((!te||pe)&&(!fe||Te)||this.ISGenerated||a){if(this.ISGenerated){var xe,$e,st,Pe;const cr=this.videoTrackConfig;(cr&&(t.width!==cr.width||t.height!==cr.height||((xe=t.pixelRatio)==null?void 0:xe[0])!==(($e=cr.pixelRatio)==null?void 0:$e[0])||((st=t.pixelRatio)==null?void 0:st[1])!==((Pe=cr.pixelRatio)==null?void 0:Pe[1]))||!cr&&Te||this.nextAudioPts===null&&pe)&&this.resetInitSegment()}this.ISGenerated||(d=this.generateIS(e,t,s,A));const Bt=this.isVideoContiguous;let kt=-1,Qr;if(Te&&(kt=Ti(t.samples),!Bt&&this.config.forceKeyFrameOnDiscontinuity))if(b=!0,kt>0){this.logger.warn(`[mp4-remuxer]: Dropped ${kt} out of ${oe} video samples due to a missing keyframe`);const cr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(kt),t.dropped+=kt,F+=(t.samples[0].pts-cr)/t.inputTimeScale,Qr=F}else kt===-1&&(this.logger.warn(`[mp4-remuxer]: No keyframe found out of ${oe} video samples`),b=!1);if(this.ISGenerated){if(pe&&Te){const cr=this.getVideoStartPts(t.samples),Jt=(ni(e.samples[0].pts,cr)-cr)/t.inputTimeScale;S+=Math.max(0,Jt),F+=Math.max(0,-Jt)}if(pe){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,s,A)),h=this.remuxAudio(e,S,this.isAudioContiguous,A,fe||Te||l===O.AUDIO?F:void 0),Te){const cr=h?h.endPTS-h.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,s,A)),o=this.remuxVideo(t,F,Bt,cr)}}else Te&&(o=this.remuxVideo(t,F,Bt,0));o&&(o.firstKeyFrame=kt,o.independent=kt!==-1,o.firstKeyFramePTS=Qr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(v=ao(r,s,this._initPTS,this._initDTS)),n.samples.length&&(p=ra(n,s,this._initPTS))),{audio:h,video:o,initSegment:d,independent:b,text:p,id3:v}}generateIS(e,t,r,n){const s=e.samples,A=t.samples,a=this.typeSupported,l={},o=this._initPTS;let h=!o||n,d="audio/mp4",p,v,b;if(h&&(p=v=1/0),e.config&&s.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":a.mpeg?(d="audio/mpeg",e.codec=""):a.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}l.audio={id:"audio",container:d,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&a.mpeg?new Uint8Array(0):Ve.initSegment([e]),metadata:{channelCount:e.channelCount}},h&&(b=e.inputTimeScale,!o||b!==o.timescale?p=v=s[0].pts-Math.round(b*r):h=!1)}if(t.sps&&t.pps&&A.length){if(t.timescale=t.inputTimeScale,l.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Ve.initSegment([t]),metadata:{width:t.width,height:t.height}},h)if(b=t.inputTimeScale,!o||b!==o.timescale){const S=this.getVideoStartPts(A),F=Math.round(b*r);v=Math.min(v,ni(A[0].dts,S)-F),p=Math.min(p,S-F)}else h=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(l).length)return this.ISGenerated=!0,h?(this._initPTS={baseTime:p,timescale:b},this._initDTS={baseTime:v,timescale:b}):p=b=void 0,{tracks:l,initPTS:p,timescale:b}}remuxVideo(e,t,r,n){const s=e.inputTimeScale,A=e.samples,a=[],l=A.length,o=this._initPTS;let h=this.nextAvcDts,d=8,p=this.videoSampleDuration,v,b,S=Number.POSITIVE_INFINITY,F=Number.NEGATIVE_INFINITY,te=!1;if(!r||h===null){const Dt=t*s,Pt=A[0].pts-ni(A[0].dts,A[0].pts);is&&h!==null&&Math.abs(Dt-Pt-h)<15e3?r=!0:h=Dt-Pt}const fe=o.baseTime*s/o.timescale;for(let Dt=0;Dt<l;Dt++){const Pt=A[Dt];Pt.pts=ni(Pt.pts-fe,h),Pt.dts=ni(Pt.dts-fe,h),Pt.dts<A[Dt>0?Dt-1:Dt].dts&&(te=!0)}te&&A.sort(function(Dt,Pt){const Fr=Dt.dts-Pt.dts,wr=Dt.pts-Pt.pts;return Fr||wr}),v=A[0].dts,b=A[A.length-1].dts;const oe=b-v,pe=oe?Math.round(oe/(l-1)):p||e.inputTimeScale/30;if(r){const Dt=v-h,Pt=Dt>pe,Fr=Dt<-1;if((Pt||Fr)&&(Pt?this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ks(Dt,!0)} ms (${Dt}dts) hole between fragments detected at ${t.toFixed(3)}`):this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ks(-Dt,!0)} ms (${Dt}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Fr||h>=A[0].pts||is)){v=h;const wr=A[0].pts-Dt;if(Pt)A[0].dts=v,A[0].pts=wr;else{let Ur=!0;for(let Zr=0;Zr<A.length&&!(A[Zr].dts>wr&&Ur);Zr++){const nn=A[Zr].pts;if(A[Zr].dts-=Dt,A[Zr].pts-=Dt,Zr<A.length-1){const bn=A[Zr+1].pts,ui=A[Zr].pts,mi=bn<=ui,bs=bn<=nn;Ur=mi==bs}}}this.logger.log(`Video: Initial PTS/DTS adjusted: ${ks(wr,!0)}/${ks(v,!0)}, delta: ${ks(Dt,!0)} ms`)}}v=Math.max(0,v);let Te=0,Ke=0,xe=v;for(let Dt=0;Dt<l;Dt++){const Pt=A[Dt],Fr=Pt.units,wr=Fr.length;let Ur=0;for(let Zr=0;Zr<wr;Zr++)Ur+=Fr[Zr].data.length;Ke+=Ur,Te+=wr,Pt.length=Ur,Pt.dts<xe?(Pt.dts=xe,xe+=pe/4|0||1):xe=Pt.dts,S=Math.min(Pt.pts,S),F=Math.max(Pt.pts,F)}b=A[l-1].dts;const $e=Ke+4*Te+8;let st;try{st=new Uint8Array($e)}catch(Dt){this.observer.emit(m.ERROR,m.ERROR,{type:he.MUX_ERROR,details:W.REMUX_ALLOC_ERROR,fatal:!1,error:Dt,bytes:$e,reason:`fail allocating video mdat ${$e}`});return}const Pe=new DataView(st.buffer);Pe.setUint32(0,$e),st.set(Ve.types.mdat,4);let Bt=!1,kt=Number.POSITIVE_INFINITY,Qr=Number.POSITIVE_INFINITY,cr=Number.NEGATIVE_INFINITY,nr=Number.NEGATIVE_INFINITY;for(let Dt=0;Dt<l;Dt++){const Pt=A[Dt],Fr=Pt.units;let wr=0;for(let nn=0,bn=Fr.length;nn<bn;nn++){const ui=Fr[nn],mi=ui.data,bs=ui.data.byteLength;Pe.setUint32(d,bs),d+=4,st.set(mi,d),d+=bs,wr+=4+bs}let Ur;if(Dt<l-1)p=A[Dt+1].dts-Pt.dts,Ur=A[Dt+1].pts-Pt.pts;else{const nn=this.config,bn=Dt>0?Pt.dts-A[Dt-1].dts:pe;if(Ur=Dt>0?Pt.pts-A[Dt-1].pts:pe,nn.stretchShortVideoTrack&&this.nextAudioPts!==null){const ui=Math.floor(nn.maxBufferHole*s),mi=(n?S+n*s:this.nextAudioPts)-Pt.pts;mi>ui?(p=mi-bn,p<0?p=bn:Bt=!0,this.logger.log(`[mp4-remuxer]: It is approximately ${mi/90} ms to the next segment; using duration ${p/90} ms for the last video frame.`)):p=bn}else p=bn}const Zr=Math.round(Pt.pts-Pt.dts);kt=Math.min(kt,p),cr=Math.max(cr,p),Qr=Math.min(Qr,Ur),nr=Math.max(nr,Ur),a.push(Ao(Pt.key,p,wr,Zr))}if(a.length){if(is){if(is<70){const Dt=a[0].flags;Dt.dependsOn=2,Dt.isNonSync=0}}else if(rr&&nr-Qr<cr-kt&&pe/cr<.025&&a[0].cts===0){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Dt=v;for(let Pt=0,Fr=a.length;Pt<Fr;Pt++){const wr=Dt+a[Pt].duration,Ur=Dt+a[Pt].cts;if(Pt<Fr-1){const Zr=wr+a[Pt+1].cts;a[Pt].duration=Zr-Ur}else a[Pt].duration=Pt?a[Pt-1].duration:pe;a[Pt].cts=0,Dt=wr}}}p=Bt||!p?pe:p,this.nextAvcDts=h=b+p,this.videoSampleDuration=p,this.isVideoContiguous=!0;const or={data1:Ve.moof(e.sequenceNumber++,v,B(e,{samples:a})),data2:st,startPTS:S/s,endPTS:(F+p)/s,startDTS:v/s,endDTS:h/s,type:"video",hasAudio:!1,hasVideo:!0,nb:a.length,dropped:e.dropped};return e.samples=[],e.dropped=0,or}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Kl;case"ac3":return $l;default:return Hl}}remuxAudio(e,t,r,n,s){const A=e.inputTimeScale,a=e.samplerate?e.samplerate:A,l=A/a,o=this.getSamplesPerFrame(e),h=o*l,d=this._initPTS,p=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,v=[],b=s!==void 0;let S=e.samples,F=p?0:8,te=this.nextAudioPts||-1;const fe=t*A,oe=d.baseTime*A/d.timescale;if(this.isAudioContiguous=r=r||S.length&&te>0&&(n&&Math.abs(fe-te)<9e3||Math.abs(ni(S[0].pts-oe,fe)-te)<20*h),S.forEach(function(Jt){Jt.pts=ni(Jt.pts-oe,fe)}),!r||te<0){if(S=S.filter(Jt=>Jt.pts>=0),!S.length)return;s===0?te=0:n&&!b?te=Math.max(0,fe):te=S[0].pts}if(e.segmentCodec==="aac"){const Jt=this.config.maxAudioFramesDrift;for(let ar=0,or=te;ar<S.length;ar++){const Dt=S[ar],Pt=Dt.pts,Fr=Pt-or,wr=Math.abs(1e3*Fr/A);if(Fr<=-Jt*h&&b)ar===0&&(this.logger.warn(`Audio frame @ ${(Pt/A).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Fr/A)} ms.`),this.nextAudioPts=te=or=Pt);else if(Fr>=Jt*h&&wr<Nl&&b){let Ur=Math.round(Fr/h);or=Pt-Ur*h,or<0&&(Ur--,or+=h),ar===0&&(this.nextAudioPts=te=or),this.logger.warn(`[mp4-remuxer]: Injecting ${Ur} audio frame @ ${(or/A).toFixed(3)}s due to ${Math.round(1e3*Fr/A)} ms gap.`);for(let Zr=0;Zr<Ur;Zr++){const nn=Math.max(or,0);let bn=Pl.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);bn||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),bn=Dt.unit.subarray()),S.splice(ar,0,{unit:bn,pts:nn}),or+=h,ar++}}Dt.pts=or,or+=h}}let pe=null,Te=null,Ke,xe=0,$e=S.length;for(;$e--;)xe+=S[$e].unit.byteLength;for(let Jt=0,ar=S.length;Jt<ar;Jt++){const or=S[Jt],Dt=or.unit;let Pt=or.pts;if(Te!==null){const wr=v[Jt-1];wr.duration=Math.round((Pt-Te)/l)}else if(r&&e.segmentCodec==="aac"&&(Pt=te),pe=Pt,xe>0){xe+=F;try{Ke=new Uint8Array(xe)}catch(wr){this.observer.emit(m.ERROR,m.ERROR,{type:he.MUX_ERROR,details:W.REMUX_ALLOC_ERROR,fatal:!1,error:wr,bytes:xe,reason:`fail allocating audio mdat ${xe}`});return}p||(new DataView(Ke.buffer).setUint32(0,xe),Ke.set(Ve.types.mdat,4))}else return;Ke.set(Dt,F);const Fr=Dt.byteLength;F+=Fr,v.push(Ao(!0,o,Fr,0)),Te=Pt}const st=v.length;if(!st)return;const Pe=v[v.length-1];this.nextAudioPts=te=Te+l*Pe.duration;const Bt=p?new Uint8Array(0):Ve.moof(e.sequenceNumber++,pe/l,B({},e,{samples:v}));e.samples=[];const kt=pe/A,Qr=te/A,nr={data1:Bt,data2:Ke,startPTS:kt,endPTS:Qr,startDTS:kt,endDTS:Qr,type:"audio",hasAudio:!0,hasVideo:!1,nb:st};return this.isAudioContiguous=!0,nr}}function ni(i,e){let t;if(e===null)return i;for(e<i?t=-8589934592:t=8589934592;Math.abs(i-e)>4294967296;)i+=t;return i}function Ti(i){for(let e=0;e<i.length;e++)if(i[e].key)return e;return-1}function ao(i,e,t,r){const n=i.samples.length;if(!n)return;const s=i.inputTimeScale;for(let a=0;a<n;a++){const l=i.samples[a];l.pts=ni(l.pts-t.baseTime*s/t.timescale,e*s)/s,l.dts=ni(l.dts-r.baseTime*s/r.timescale,e*s)/s}const A=i.samples;return i.samples=[],{samples:A}}function ra(i,e,t){const r=i.samples.length;if(!r)return;const n=i.inputTimeScale;for(let A=0;A<r;A++){const a=i.samples[A];a.pts=ni(a.pts-t.baseTime*n/t.timescale,e*n)/n}i.samples.sort((A,a)=>A.pts-a.pts);const s=i.samples;return i.samples=[],{samples:s}}class Os{constructor(e,t,r,n){this.logger=void 0,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.logger=n}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,r,n){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(Ye(e,n)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const n=this.initData=N(e);n.audio&&(t=oo(n.audio,y.AUDIO)),n.video&&(r=oo(n.video,y.VIDEO));const s={};n.audio&&n.video?s.audiovideo={container:"video/mp4",codec:t+","+r,supplemental:n.video.supplemental,initSegment:e,id:"main"}:n.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:n.video?s.video={container:"video/mp4",codec:r,supplemental:n.video.supplemental,initSegment:e,id:"main"}:this.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s}remux(e,t,r,n,s,A){var a,l;let{initPTS:o,lastEndTime:h}=this;const d={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};V(h)||(h=this.lastEndTime=s||0);const p=t.samples;if(!(p!=null&&p.length))return d;const v={initPTS:void 0,timescale:1};let b=this.initData;if((a=b)!=null&&a.length||(this.generateInitSegment(p),b=this.initData),!((l=b)!=null&&l.length))return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(v.tracks=this.initTracks,this.emitInitSegment=!1);const S=Xe(p,b),F=St(b,p),te=F===null?s:F;(A||!o)&&(mA(o,te,s,S)||v.timescale!==o.timescale)&&(v.initPTS=te-s,o&&o.timescale===1&&this.logger.warn(`Adjusting initPTS @${s} from ${o.baseTime/o.timescale} to ${v.initPTS}`),this.initPTS=o={baseTime:v.initPTS,timescale:1});const fe=e?te-o.baseTime/o.timescale:h,oe=fe+S;At(b,p,o.baseTime/o.timescale),S>0?this.lastEndTime=oe:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const pe=!!b.audio,Te=!!b.video;let Ke="";pe&&(Ke+="audio"),Te&&(Ke+="video");const xe={data1:p,startPTS:fe,startDTS:fe,endPTS:oe,endDTS:oe,type:Ke,hasAudio:pe,hasVideo:Te,nb:1,dropped:0};return d.audio=xe.type==="audio"?xe:void 0,d.video=xe.type!=="audio"?xe:void 0,d.initSegment=v,d.id3=ao(r,s,o,o),n.samples.length&&(d.text=ra(n,s,o)),d}}function mA(i,e,t,r){if(i===null)return!0;const n=Math.max(r,1),s=e-i.baseTime/i.timescale;return Math.abs(s-t)>n}function oo(i,e){const t=i==null?void 0:i.codec;return t&&t.length>4?t:e===y.AUDIO?t==="ec-3"||t==="ac-3"||t==="alac"?t:t==="fLaC"||t==="Opus"?gt(t,!1):(ne.warn(`Unhandled audio codec "${t}" in mp4 MAP`),t||"mp4a"):(ne.warn(`Unhandled video codec "${t}" in mp4 MAP`),t||"avc1")}let Ui;try{Ui=self.performance.now.bind(self.performance)}catch(i){Ui=Date.now}const _A=[{demux:Ql,remux:Os},{demux:$i,remux:pA},{demux:Ll,remux:pA},{demux:eo,remux:pA}];_A.splice(2,0,{demux:Ul,remux:pA});class Vi{constructor(e,t,r,n,s,A){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=r,this.id=s,this.logger=A}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,r,n){const s=r.transmuxing;s.executeStart=Ui();let A=new Uint8Array(e);const{currentTransmuxState:a,transmuxConfig:l}=this;n&&(this.currentTransmuxState=n);const{contiguous:o,discontinuity:h,trackSwitch:d,accurateTimeOffset:p,timeOffset:v,initSegmentChange:b}=n||a,{audioCodec:S,videoCodec:F,defaultInitPts:te,duration:fe,initSegmentData:oe}=l,pe=na(A,t);if(pe&&Mn(pe.method)){const $e=this.getDecrypter(),st=zn(pe.method);if($e.isSync()){let Pe=$e.softwareDecrypt(A,pe.key.buffer,pe.iv.buffer,st);if(r.part>-1){const kt=$e.flush();Pe=kt&&kt.buffer}if(!Pe)return s.executeEnd=Ui(),Ps(r);A=new Uint8Array(Pe)}else return this.asyncResult=!0,this.decryptionPromise=$e.webCryptoDecrypt(A,pe.key.buffer,pe.iv.buffer,st).then(Pe=>{const Bt=this.push(Pe,null,r);return this.decryptionPromise=null,Bt}),this.decryptionPromise}const Te=this.needsProbing(h,d);if(Te){const $e=this.configureTransmuxer(A);if($e)return this.logger.warn(`[transmuxer] ${$e.message}`),this.observer.emit(m.ERROR,m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,error:$e,reason:$e.message}),s.executeEnd=Ui(),Ps(r)}(h||d||b||Te)&&this.resetInitSegment(oe,S,F,fe,t),(h||b||Te)&&this.resetInitialTimestamp(te),o||this.resetContiguity();const Ke=this.transmux(A,pe,v,p,r);this.asyncResult=Ms(Ke);const xe=this.currentTransmuxState;return xe.contiguous=!0,xe.discontinuity=!1,xe.trackSwitch=!1,s.executeEnd=Ui(),Ke}flush(e){const t=e.transmuxing;t.executeStart=Ui();const{decrypter:r,currentTransmuxState:n,decryptionPromise:s}=this;if(s)return this.asyncResult=!0,s.then(()=>this.flush(e));const A=[],{timeOffset:a}=n;if(r){const d=r.flush();d&&A.push(this.push(d.buffer,null,e))}const{demuxer:l,remuxer:o}=this;if(!l||!o){t.executeEnd=Ui();const d=[Ps(e)];return this.asyncResult?Promise.resolve(d):d}const h=l.flush(a);return Ms(h)?(this.asyncResult=!0,h.then(d=>(this.flushRemux(A,d,e),A))):(this.flushRemux(A,h,e),this.asyncResult?Promise.resolve(A):A)}flushRemux(e,t,r){const{audioTrack:n,videoTrack:s,id3Track:A,textTrack:a}=t,{accurateTimeOffset:l,timeOffset:o}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${r.sn}${r.part>-1?" part: "+r.part:""} of ${this.id===O.MAIN?"level":"track"} ${r.level}`);const h=this.remuxer.remux(n,s,A,a,o,l,!0,this.id);e.push({remuxResult:h,chunkMeta:r}),r.transmuxing.executeEnd=Ui()}resetInitialTimestamp(e){const{demuxer:t,remuxer:r}=this;!t||!r||(t.resetTimeStamp(e),r.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,r,n,s){const{demuxer:A,remuxer:a}=this;!A||!a||(A.resetInitSegment(e,t,r,n),a.resetInitSegment(e,t,r,s))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,r,n,s){let A;return t&&t.method==="SAMPLE-AES"?A=this.transmuxSampleAes(e,t,r,n,s):A=this.transmuxUnencrypted(e,r,n,s),A}transmuxUnencrypted(e,t,r,n){const{audioTrack:s,videoTrack:A,id3Track:a,textTrack:l}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(s,A,a,l,t,r,!1,this.id),chunkMeta:n}}transmuxSampleAes(e,t,r,n,s){return this.demuxer.demuxSampleAes(e,t,r).then(A=>({remuxResult:this.remuxer.remux(A.audioTrack,A.videoTrack,A.id3Track,A.textTrack,r,n,!1,this.id),chunkMeta:s}))}configureTransmuxer(e){const{config:t,observer:r,typeSupported:n}=this;let s;for(let d=0,p=_A.length;d<p;d++){var A;if((A=_A[d].demux)!=null&&A.probe(e,this.logger)){s=_A[d];break}}if(!s)return new Error("Failed to find demuxer by probing fragment data");const a=this.demuxer,l=this.remuxer,o=s.remux,h=s.demux;(!l||!(l instanceof o))&&(this.remuxer=new o(r,t,n,this.logger)),(!a||!(a instanceof h))&&(this.demuxer=new h(r,t,n,this.logger),this.probe=h.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new vr(this.config)),e}}function na(i,e){let t=null;return i.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const Ps=i=>({remuxResult:{},chunkMeta:i});function Ms(i){return"then"in i&&i.then instanceof Function}class lo{constructor(e,t,r,n,s){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=r,this.duration=n,this.defaultInitPts=s||null}}class Gl{constructor(e,t,r,n,s,A){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=r,this.trackSwitch=n,this.timeOffset=s,this.initSegmentChange=A}}let vA=0;class uo{constructor(e,t,r,n){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=vA++,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=l=>{const o=l.data,h=this.hls;if(!(!h||!(o!=null&&o.event)||o.instanceNo!==this.instanceNo))switch(o.event){case"init":{var d;const p=(d=this.workerContext)==null?void 0:d.objectURL;p&&self.URL.revokeObjectURL(p);break}case"transmuxComplete":{this.handleTransmuxComplete(o.data);break}case"flush":{this.onFlush(o.data);break}case"workerLog":{h.logger[o.data.logType]&&h.logger[o.data.logType](o.data.message);break}default:{o.data=o.data||{},o.data.frag=this.frag,o.data.part=this.part,o.data.id=this.id,h.trigger(o.event,o.data);break}}},this.onWorkerError=l=>{if(!this.hls)return;const o=new Error(`${l.message} (${l.filename}:${l.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:o})};const s=e.config;this.hls=e,this.id=t,this.useWorker=!!s.enableWorker,this.onTransmuxComplete=r,this.onFlush=n;const A=(l,o)=>{o=o||{},o.frag=this.frag||void 0,l===m.ERROR&&(o=o,o.parent=this.id,o.part=this.part,this.error=o.error),this.hls.trigger(l,o)};this.observer=new ts,this.observer.on(m.FRAG_DECRYPTED,A),this.observer.on(m.ERROR,A);const a=Gt(s.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const l=this.hls.logger;if(s.workerPath||ol()){try{s.workerPath?(l.log(`loading Web Worker ${s.workerPath} for "${t}"`),this.workerContext=ul(s.workerPath)):(l.log(`injecting Web Worker for "${t}"`),this.workerContext=ll());const{worker:h}=this.workerContext;h.addEventListener("message",this.onWorkerMessage),h.addEventListener("error",this.onWorkerError),h.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:a,id:t,config:br(s)})}catch(h){l.warn(`Error setting up "${t}" Web Worker, fallback to inline`,h),this.terminateWorker(),this.error=null,this.transmuxer=new Vi(this.observer,a,s,"",t,e.logger)}return}}this.transmuxer=new Vi(this.observer,a,s,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=vA++;const t=this.hls.config,r=Gt(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:r,id:this.id,config:br(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),cl(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,r,n,s,A,a,l,o,h){var d,p;o.transmuxing.start=self.performance.now();const{instanceNo:v,transmuxer:b}=this,S=A?A.start:s.start,F=s.decryptdata,te=this.frag,fe=!(te&&s.cc===te.cc),oe=!(te&&o.level===te.level),pe=te?o.sn-te.sn:-1,Te=this.part?o.part-this.part.index:-1,Ke=pe===0&&o.id>1&&o.id===(te==null?void 0:te.stats.chunkCount),xe=!oe&&(pe===1||pe===0&&(Te===1||Ke&&Te<=0)),$e=self.performance.now();(oe||pe||s.stats.parsing.start===0)&&(s.stats.parsing.start=$e),A&&(Te||!xe)&&(A.stats.parsing.start=$e);const st=!(te&&((d=s.initSegment)==null?void 0:d.url)===((p=te.initSegment)==null?void 0:p.url)),Pe=new Gl(fe,xe,l,oe,S,st);if(!xe||fe||st){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${s.type} sn: ${o.sn}${o.part>-1?" part: "+o.part:""} ${this.id===O.MAIN?"level":"track"}: ${o.level} id: ${o.id}
discontinuity: ${fe}
trackSwitch: ${oe}
contiguous: ${xe}
accurateTimeOffset: ${l}
timeOffset: ${S}
initSegmentChange: ${st}`);const Bt=new lo(r,n,t,a,h);this.configureTransmuxer(Bt)}if(this.frag=s,this.part=A,this.workerContext)this.workerContext.worker.postMessage({instanceNo:v,cmd:"demux",data:e,decryptdata:F,chunkMeta:o,state:Pe},e instanceof ArrayBuffer?[e]:[]);else if(b){const Bt=b.push(e,F,o,Pe);Ms(Bt)?Bt.then(kt=>{this.handleTransmuxComplete(kt)}).catch(kt=>{this.transmuxerError(kt,o,"transmuxer-interface push error")}):this.handleTransmuxComplete(Bt)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:r}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(r){const n=r.flush(e);Ms(n)?n.then(s=>{this.handleFlushResult(s,e)}).catch(s=>{this.transmuxerError(s,e,"transmuxer-interface flush error")}):this.handleFlushResult(n,e)}}transmuxerError(e,t,r){this.hls&&(this.error=e,this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:r}))}handleFlushResult(e,t){e.forEach(r=>{this.handleTransmuxComplete(r)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:r}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):r&&r.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const co=100;class Vl extends Hn{constructor(e,t,r){super(e,t,r,"audio-stream-controller",O.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(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:s}){if(r===O.MAIN){const A=t.cc,a=this.fragCurrent;if(this.initPTS[A]={baseTime:n,timescale:s},this.log(`InitPTS for cc: ${A} found from main: ${n}/${s}`),this.mainAnchor=t,this.state===ft.WAITING_INIT_PTS){const l=this.waitingData;(!l&&!this.loadingParts||l&&l.frag.cc!==A)&&(this.nextLoadPosition=this.findSyncFrag(t).start),this.tick()}else!this.hls.hasEnoughToStart&&a&&a.cc!==A?(this.startFragRequested=!1,this.nextLoadPosition=this.findSyncFrag(t).start,a.abortRequests(),this.resetLoadingState()):this.state===ft.IDLE&&this.tick()}}findSyncFrag(e){const t=this.getLevelDetails(),r=e.cc;return Qe(t,r,e)||t&&ue(t.fragments,r)||e}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=ft.STOPPED;return}const r=this.lastCurrentTime;this.stopLoad(),this.setInterval(co),r>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r,this.state=ft.IDLE):this.state=ft.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case ft.IDLE:this.doTickIdle();break;case ft.WAITING_TRACK:{const{levels:t,trackId:r}=this,n=t==null?void 0:t[r],s=n==null?void 0:n.details;if(s&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(s))break;this.state=ft.WAITING_INIT_PTS}break}case ft.FRAG_LOADING_WAITING_RETRY:{var e;const t=performance.now(),r=this.retryDate;if(!r||t>=r||(e=this.media)!=null&&e.seeking){const{levels:n,trackId:s}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((n==null?void 0:n[s])||null),this.state=ft.IDLE}break}case ft.WAITING_INIT_PTS:{const t=this.waitingData;if(t){const{frag:r,part:n,cache:s,complete:A}=t,a=this.mainAnchor;if(this.initPTS[r.cc]!==void 0){this.waitingData=null,this.state=ft.FRAG_LOADING;const l=s.flush().buffer,o={frag:r,part:n,payload:l,networkDetails:null};this._handleFragmentLoadProgress(o),A&&super._handleFragmentLoadComplete(o)}else a&&a.cc!==t.frag.cc&&(this.log(`Waiting fragment cc (${r.cc}) cancelled because video is at cc ${a.cc}`),this.nextLoadPosition=this.findSyncFrag(a).start,this.clearWaitingFragment())}else this.state=ft.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.state!==ft.STOPPED&&(this.state=ft.IDLE))}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:r,media:n,trackId:s}=this,A=t.config;if(!this.buffering||!n&&!this.primaryPrefetch&&(this.startFragRequested||!A.startFragPrefetch)||!(r!=null&&r[s]))return;const a=r[s],l=a.details;if(!l||this.waitForLive(a)||this.waitForCdnTuneIn(l)){this.state=ft.WAITING_TRACK,this.startFragRequested=!1;return}const o=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&o&&(this.bufferFlushed=!1,this.afterBufferFlushed(o,y.AUDIO,O.AUDIO));const h=this.getFwdBufferInfo(o,O.AUDIO);if(h===null)return;if(!this.switchingTrack&&this._streamEnded(h,l)){t.trigger(m.BUFFER_EOS,{type:"audio"}),this.state=ft.ENDED;return}const d=h.len,p=t.maxBufferLength,v=l.fragments,b=v[0].start,S=this.getLoadPosition(),F=this.flushing?S:h.end;if(this.switchingTrack&&n){const oe=S;l.PTSKnown&&oe<b&&(h.end>b||h.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=b+.05)}if(d>=p&&!this.switchingTrack&&F<v[v.length-1].start)return;let te=this.getNextFragment(F,l);if(te&&this.isLoopLoading(te,F)&&(te=this.getNextFragmentLoopLoading(te,l,h,O.MAIN,p)),!te){this.bufferFlushed=!0;return}let fe=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&fe&&Ae(te)&&!te.endList&&(!l.live||!this.loadingParts&&F<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(fe)===Et.OK&&(this.mainFragLoading=fe=null),fe&&Ae(fe))){if(te.start>fe.end){const pe=this.fragmentTracker.getFragAtPos(F,O.MAIN);pe&&pe.end>fe.end&&(fe=pe,this.mainFragLoading={frag:pe,targetBufferTime:null})}if(te.start>fe.end)return}this.loadFragment(te,a,F)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(r=>new Pr(r))}onAudioTrackSwitching(e,t){const r=!!t.url;this.trackId=t.id;const{fragCurrent:n}=this;n&&(n.abortRequests(),this.removeUnbufferedFrags(n.start)),this.resetLoadingState(),r?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==ft.STOPPED&&(this.setInterval(co),this.state=ft.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 r=this.cachedTrackLoadedData;r&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(m.AUDIO_TRACK_LOADED,r))}onAudioTrackLoaded(e,t){var r;const{levels:n}=this,{details:s,id:A,groupId:a,track:l}=t;if(!n){this.warn(`Audio tracks reset while loading track ${A} "${l.name}" of "${a}"`);return}const o=this.mainDetails;if(!o||s.endCC>o.endCC||o.expired){this.cachedTrackLoadedData=t,this.state!==ft.STOPPED&&(this.state=ft.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${A} "${l.name}" of "${a}" loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`);const h=n[A];let d=0;if(s.live||(r=h.details)!=null&&r.live){if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;if(h.details){var p;d=this.alignPlaylists(s,h.details,(p=this.levelLastLoaded)==null?void 0:p.details)}s.alignedSliding||(wn(s,o),s.alignedSliding||rn(s,o),d=s.fragmentStart)}h.details=s,this.levelLastLoaded=h,this.startFragRequested||this.setStartPosition(o,d),this.hls.trigger(m.AUDIO_TRACK_UPDATED,{details:s,id:A,groupId:t.groupId}),this.state===ft.WAITING_TRACK&&!this.waitForCdnTuneIn(s)&&(this.state=ft.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:s}=e,{config:A,trackId:a,levels:l}=this;if(!l){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const o=l[a];if(!o){this.warn("Audio track is undefined on fragment load progress");return}const h=o.details;if(!h){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(r.start);return}const d=A.defaultAudioCodec||o.audioCodec||"mp4a.40.2";let p=this.transmuxer;p||(p=this.transmuxer=new uo(this.hls,O.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const v=this.initPTS[r.cc],b=(t=r.initSegment)==null?void 0:t.data;if(v!==void 0){const F=n?n.index:-1,te=F!==-1,fe=new Kr(r.level,r.sn,r.stats.chunkCount,s.byteLength,F,te);p.push(s,b,d,"",r,n,h.totalduration,!1,fe,v)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${h.startSN} ,${h.endSN}],track ${a}`);const{cache:S}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new qi,complete:!1};S.push(new Uint8Array(s)),this.state!==ft.STOPPED&&(this.state=ft.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 r=t.tracks.audio;r&&(this.mediaBuffer=r.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===O.MAIN&&Ae(t.frag)&&(this.mainFragLoading=t,this.state===ft.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:r,part:n}=t;if(r.type!==O.AUDIO){!this.audioOnly&&r.type===O.MAIN&&!r.elementaryStreams.video&&!r.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(Ae(r)){this.fragPrevious=r;const s=this.switchingTrack;s&&(this.bufferedTrack=s,this.switchingTrack=null,this.hls.trigger(m.AUDIO_TRACK_SWITCHED,w({},s)))}this.fragBufferedComplete(r,n),this.media&&this.tick()}onError(e,t){var r;if(t.fatal){this.state=ft.ERROR;return}switch(t.details){case W.FRAG_GAP:case W.FRAG_PARSING_ERROR:case W.FRAG_DECRYPT_ERROR:case W.FRAG_LOAD_ERROR:case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_ERROR:case W.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(O.AUDIO,t);break;case W.AUDIO_TRACK_LOAD_ERROR:case W.AUDIO_TRACK_LOAD_TIMEOUT:case W.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===ft.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===ge.AUDIO_TRACK&&(this.state=ft.IDLE);break;case W.BUFFER_ADD_CODEC_ERROR:case W.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.resetLoadingState();break;case W.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case W.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==y.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==y.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===ft.ENDED&&(this.state=ft.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,O.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const r="audio",{hls:n}=this,{remuxResult:s,chunkMeta:A}=e,a=this.getCurrentContext(A);if(!a){this.resetWhenMissingContext(A);return}const{frag:l,part:o,level:h}=a,{details:d}=h,{audio:p,text:v,id3:b,initSegment:S}=s;if(this.fragContextChanged(l)||!d){this.fragmentTracker.removeFragment(l);return}if(this.state=ft.PARSING,this.switchingTrack&&p&&this.completeAudioSwitch(this.switchingTrack),S!=null&&S.tracks){const F=l.initSegment||l;this._bufferInitSegment(h,S.tracks,F,A),n.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:r,tracks:S.tracks})}if(p){const{startPTS:F,endPTS:te,startDTS:fe,endDTS:oe}=p;o&&(o.elementaryStreams[y.AUDIO]={startPTS:F,endPTS:te,startDTS:fe,endDTS:oe}),l.setElementaryStreamInfo(y.AUDIO,F,te,fe,oe),this.bufferFragmentData(p,l,o,A)}if(b!=null&&(t=b.samples)!=null&&t.length){const F=B({id:r,frag:l,details:d},b);n.trigger(m.FRAG_PARSING_METADATA,F)}if(v){const F=B({id:r,frag:l,details:d},v);n.trigger(m.FRAG_PARSING_USERDATA,F)}}_bufferInitSegment(e,t,r,n){if(this.state!==ft.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const s=t.audio;s.id=O.AUDIO;const A=e.audioCodec;this.log(`Init audio buffer, container:${s.container}, codecs[level/parsed]=[${A}/${s.codec}]`),A&&A.split(",").length===1&&(s.levelCodec=A),this.hls.trigger(m.BUFFER_CODECS,t);const a=s.initSegment;if(a!=null&&a.byteLength){const l={type:"audio",frag:r,part:null,chunkMeta:n,parent:r.type,data:a};this.hls.trigger(m.BUFFER_APPENDING,l)}this.tickImmediate()}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);if(this.switchingTrack||n===Et.NOT_LOADED||n===Et.PARTIAL){var s;if(!Ae(e))this._loadInitSegment(e,t);else if((s=t.details)!=null&&s.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=ft.WAITING_INIT_PTS;const A=this.mainDetails;A&&A.fragmentStart!==t.details.fragmentStart&&rn(t.details,A)}else super.loadFragment(e,t,r)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:r,assocLang:n,characteristics:s,audioCodec:A,channels:a}=this.bufferedTrack;_t({name:t,lang:r,assocLang:n,characteristics:s,audioCodec:A,channels:a},e,tt)||(Zt(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(m.AUDIO_TRACK_SWITCHED,w({},e))}}class ia extends M{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,r){const n=t==null?void 0:t.renditionReports;if(n){let s=-1;for(let A=0;A<n.length;A++){const a=n[A];let l;try{l=new self.URL(a.URI,t.url).href}catch(o){this.warn(`Could not construct new URL for Rendition Report: ${o}`),l=a.URI||""}if(l===e){s=A;break}else l===e.substring(0,l.length)&&(s=A)}if(s!==-1){const A=n[s],a=parseInt(A["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let l=parseInt(A["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const h=Math.min(t.age-t.partTarget,t.targetduration);l>=0&&h>t.partTarget&&(l+=1)}const o=r&&an(r);return new Rn(a,l>=0?l:void 0,o)}}}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(r){this.warn(`Could not construct new URL with HLS Delivery Directives: ${r}`)}return e}playlistLoaded(e,t,r){const{details:n,stats:s}=t,A=self.performance.now(),a=s.loading.first?Math.max(0,A-s.loading.first):0;n.advancedDateTime=Date.now()-a;const l=this.hls.config.timelineOffset;if(l!==n.appliedTimelineOffset){const h=Math.max(l||0,0);n.appliedTimelineOffset=h,n.fragments.forEach(d=>{d.start=d.playlistOffset+h})}if(n.live||r!=null&&r.live){const h="levelInfo"in t?t.levelInfo:t.track;if(n.reloaded(r),r&&n.fragments.length>0){cs(r,n);const fe=n.playlistParsingError;if(fe){this.warn(fe);const oe=this.hls;if(!oe.config.ignorePlaylistParsingErrors){var o;const{networkDetails:pe}=t;oe.trigger(m.ERROR,{type:he.NETWORK_ERROR,details:W.LEVEL_PARSING_ERROR,fatal:!1,url:n.url,error:fe,reason:fe.message,level:t.level||void 0,parent:(o=n.fragments[0])==null?void 0:o.type,networkDetails:pe,stats:s});return}n.playlistParsingError=null}}n.requestScheduled===-1&&(n.requestScheduled=s.loading.start);const d=this.hls.mainForwardBufferInfo,p=d?d.end-d.len:0,v=(n.edge-p)*1e3,b=Fi(n,v);if(n.requestScheduled+b<A?n.requestScheduled=A:n.requestScheduled+=b,this.log(`live playlist ${e} ${n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:n.updated?"UPDATED":"MISSED"}`),!this.canLoad||!n.live)return;let S,F,te;if(n.canBlockReload&&n.endSN&&n.advanced){const fe=this.hls.config.lowLatencyMode,oe=n.lastPartSn,pe=n.endSN,Te=n.lastPartIndex,Ke=Te!==-1,xe=oe===pe;Ke?xe?(F=pe+1,te=fe?0:Te):(F=oe,te=fe?Te+1:n.maxPartIndex):F=pe+1;const $e=n.age,st=$e+n.ageHeader;let Pe=Math.min(st-n.partTarget,n.targetduration*1.5);if(Pe>0){if(st>n.targetduration*3)this.log(`Playlist last advanced ${$e.toFixed(2)}s ago. Omitting segment and part directives.`),F=void 0,te=void 0;else if(r!=null&&r.tuneInGoal&&st-n.partTarget>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${Pe} with playlist age: ${n.age}`),Pe=0;else{const Bt=Math.floor(Pe/n.targetduration);if(F+=Bt,te!==void 0){const kt=Math.round(Pe%n.targetduration/n.partTarget);te+=kt}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${$e.toFixed(2)}s goal: ${Pe} skip sn ${Bt} to part ${te}`)}n.tuneInGoal=Pe}if(S=this.getDeliveryDirectives(n,t.deliveryDirectives,F,te),fe||!xe){n.requestScheduled=A,this.loadingPlaylist(h,S);return}}else(n.canBlockReload||n.canSkipUntil)&&(S=this.getDeliveryDirectives(n,t.deliveryDirectives,F,te));S&&F!==void 0&&n.canBlockReload&&(n.requestScheduled=s.loading.first+Math.max(b-a*2,b/2)),this.scheduleLoading(h,S,n)}else this.clearTimer()}scheduleLoading(e,t,r){const n=r||e.details;if(!n){this.loadingPlaylist(e,t);return}const s=self.performance.now(),A=n.requestScheduled;if(s>=A){this.loadingPlaylist(e,t);return}const a=A-s;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,r,n){let s=an(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,n=t.part,s=Cn.No),new Rn(r,n,s)}checkRetry(e){const t=e.details,r=He(e),n=e.errorAction,{action:s,retryCount:A=0,retryConfig:a}=n||{},l=!!n&&!!a&&(s===je.RetryRequest||!n.resolved&&s===je.SendAlternateToPenaltyBox);if(l){var o;if(A>=a.maxNumRetry)return!1;if(r&&(o=e.context)!=null&&o.deliveryDirectives)this.warn(`Retrying playlist loading ${A+1}/${a.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const h=et(a,A);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),h),this.warn(`Retrying playlist loading ${A+1}/${a.maxNumRetry} after "${t}" in ${h}ms`)}e.levelRetry=!0,n.resolved=!0}return l}}function fo(i,e){if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++)if(!Ns(i[t].attrs,e[t].attrs))return!1;return!0}function Ns(i,e,t){const r=i["STABLE-RENDITION-ID"];return r&&!t?r===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(n=>i[n]!==e[n])}function sa(i,e){return e.label.toLowerCase()===i.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(i.lang||"").toLowerCase())}class Wl extends ia{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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.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:r,groupId:n,details:s}=t,A=this.tracksInGroup[r];if(!A||A.groupId!==n){this.warn(`Audio track with id:${r} and group:${n} not found in active group ${A==null?void 0:A.groupId}`);return}const a=A.details;A.details=t.details,this.log(`Audio track ${r} "${A.name}" lang:${A.lang} group:${n} loaded [${s.startSN}-${s.endSN}]`),r===this.trackId&&this.playlistLoaded(r,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 r=t.audioGroups||null,n=this.groupIds;let s=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(a=>(n==null?void 0:n.indexOf(a))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const a=this.tracks.filter(p=>!r||r.indexOf(p.groupId)!==-1);if(a.length)this.selectDefaultTrack&&!a.some(p=>p.default)&&(this.selectDefaultTrack=!1),a.forEach((p,v)=>{p.id=v});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=a;const l=this.hls.config.audioPreference;if(!s&&l){const p=ze(l,a,tt);if(p>-1)s=a[p];else{const v=ze(l,this.tracks);s=this.tracks[v]}}let o=this.findTrackId(s);o===-1&&s&&(o=this.findTrackId(null));const h={audioTracks:a};this.log(`Updating audio tracks, ${a.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(m.AUDIO_TRACKS_UPDATED,h);const d=this.trackId;if(o!==-1&&d===-1)this.setAudioTrack(o);else if(a.length&&d===-1){var A;const p=new Error(`No audio track selected for current audio group-ID(s): ${(A=this.groupIds)==null?void 0:A.join(",")} track count: ${a.length}`);this.warn(p.message),this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:p})}}}onError(e,t){t.fatal||!t.context||t.context.type===ge.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 r=this.allAudioTracks;if(this.selectDefaultTrack=!1,r.length){const n=this.currentTrack;if(n&&_t(e,n,tt))return n;const s=ze(e,this.tracksInGroup,tt);if(s>-1){const A=this.tracksInGroup[s];return this.setAudioTrack(s),A}else if(n){let A=t.loadLevel;A===-1&&(A=t.firstAutoLevel);const a=ot(e,t.levels,r,A,tt);if(a===-1)return null;t.nextLoadLevel=a}if(e.channels||e.audioCodec){const A=ze(e,r);if(A>-1)return r[A]}}}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 r=this.currentTrack,n=t[e],s=n.details&&!n.details.live;if(e===this.trackId&&n===r&&s||(this.log(`Switching to audio-track ${e} "${n.name}" lang:${n.lang} group:${n.groupId} channels:${n.channels}`),this.trackId=e,this.currentTrack=n,this.hls.trigger(m.AUDIO_TRACK_SWITCHING,w({},n)),s))return;const A=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(A)}findTrackId(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(!(this.selectDefaultTrack&&!n.default)&&(!e||_t(e,n,tt)))return r}if(e){const{name:r,lang:n,assocLang:s,characteristics:A,audioCodec:a,channels:l}=e;for(let o=0;o<t.length;o++){const h=t[o];if(_t({name:r,lang:n,assocLang:s,characteristics:A,audioCodec:a,channels:l},h,tt))return o}for(let o=0;o<t.length;o++){const h=t[o];if(Ns(e.attrs,h.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return o}for(let o=0;o<t.length;o++){const h=t[o];if(Ns(e.attrs,h.attrs,["LANGUAGE"]))return o}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&Zt(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=e.id,n=e.groupId,s=this.getUrlWithDirectives(e.url,t),A=e.details,a=A==null?void 0:A.age;this.log(`Loading audio-track ${r} "${e.name}" lang:${e.lang} group:${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${a&&A.live?" age "+a.toFixed(1)+(A.type?" "+A.type||0:""):""} ${s}`),this.hls.trigger(m.AUDIO_TRACK_LOADING,{url:s,id:r,groupId:n,deliveryDirectives:t||null,track:e})}}class ho{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,r){if(this.queues===null||this.tracks===null)return;const n=this.queues[t];n.push(e),n.length===1&&!r&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const r={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(r,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const r={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(r)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const r=(t=e[0])==null?void 0:t.label;(r==="async-blocker"||r==="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 n=t[0];try{n.execute()}catch(s){var r;if(n.onError(s),this.queues===null||this.tracks===null)return;const A=(r=this.tracks[e])==null?void 0:r.buffer;A!=null&&A.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,r;return(t=this.queues)!=null&&t[e]||(r=this.tracks)!=null&&r[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const r=(t=this.tracks)==null?void 0:t[e],n=r==null?void 0:r.buffer;return n?`SourceBuffer${n.updating?" updating":""}${r.ended?" ended":""}${r.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(r=>r.label).join(", "))||""}}const go=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,po="HlsJsTrackRemovedError";class Zl extends Error{constructor(e){super(e),this.name=po}}class mo extends M{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=r=>{var n;this.hls&&((n=this.mediaSource)==null?void 0:n.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=r=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=r=>{const{media:n,mediaSource:s}=this;r&&this.log("Media source opened"),!(!n||!s)&&(s.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(m.MEDIA_ATTACHED,{media:n,mediaSource:s}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:r,_objectUrl:n}=this;r!==n&&this.error(`Media element src was set while attaching MediaSource (${n} > ${r})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=Oe(ve(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(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_APPENDING,this.onBufferAppending,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.BUFFER_EOS,this.onBufferEos,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.FRAG_PARSED,this.onFragParsed,this),e.on(m.FRAG_CHANGED,this.onFragChanged,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_APPENDING,this.onBufferAppending,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_EOS,this.onBufferEos,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.FRAG_PARSED,this.onFragParsed,this),e.off(m.FRAG_CHANGED,this.onFragChanged,this),e.off(m.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const r={};if(this.operationQueue){const s=this.isUpdating();s||this.operationQueue.removeBlockers();const A=this.isQueued();(s||A)&&this.warn(`Transfering MediaSource with${A?" operations in queue":""}${s?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const n=this.transferData;return!this.sourceBufferCount&&n&&n.mediaSource===t?B(r,n.tracks):this.sourceBuffers.forEach(s=>{const[A]=s;A&&(r[A]=B({},this.tracks[A]),this.removeBuffer(A)),s[0]=s[1]=null}),{media:e,mediaSource:t,tracks:r}}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 r;let n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsTotal=n,this.log(`${n} bufferCodec event(s) expected.`),(r=this.transferData)!=null&&r.mediaSource&&this.sourceBufferCount&&n&&this.bufferCreated()}onMediaAttaching(e,t){const r=this.media=t.media,n=ve(this.appendSource);if(this.transferData=this.overrides=void 0,r&&n){const s=!!t.mediaSource;(s||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const A=this.mediaSource=t.mediaSource||new n;if(this.assignMediaSource(A),s)this._objectUrl=r.src,this.attachTransferred();else{const a=this._objectUrl=self.URL.createObjectURL(A);if(this.appendSource)try{r.removeAttribute("src");const l=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||l&&A instanceof l,_o(r),BA(r,a),r.load()}catch(l){r.src=a}else r.src=a}r.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,r;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(r=e.constructor)==null?void 0:r.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 r=this.tracks,n=t.tracks,s=n?Object.keys(n):null,A=s?s.length:0,a=()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()};if(n&&s&&A){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: ${br(r,(l,o)=>l==="initSegment"?void 0:o)};
transfer tracks: ${br(n,(l,o)=>l==="initSegment"?void 0:o)}}`),!le(n,r)){t.mediaSource=null,t.tracks=void 0;const l=e.currentTime,o=this.details,h=Math.max(l,(o==null?void 0:o.fragments[0].start)||0);if(h-l>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${l} -> ${h}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(n)}"->"${Object.keys(r)}") start time: ${h} currentTime: ${l}`),this.onMediaDetaching(m.MEDIA_DETACHING,{}),this.onMediaAttaching(m.MEDIA_ATTACHING,t),e.currentTime=h;return}this.transferData=void 0,s.forEach(l=>{const o=l,h=n[o];if(h){const d=h.buffer;if(d){const p=this.fragmentTracker,v=h.id;if(p.hasFragments(v)||p.hasParts(v)){const F=qt.getBuffered(d);p.detectEvictedFragments(o,F,v,null,!0)}const b=Aa(o),S=[o,d];this.sourceBuffers[b]=S,d.updating&&this.operationQueue&&this.operationQueue.prependBlocker(o),this.trackSourceBuffer(o,h)}}}),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 r=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:n,mediaSource:s,_objectUrl:A}=this;if(s){if(this.log(`media source ${r?"transferring":"detaching"}`),r)this.sourceBuffers.forEach(([a])=>{a&&this.removeBuffer(a)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const a=s.readyState==="open";try{const l=s.sourceBuffers;for(let o=l.length;o--;)a&&l[o].abort(),s.removeSourceBuffer(l[o]);a&&s.endOfStream()}catch(l){this.warn(`onMediaDetaching: ${l.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(s.removeEventListener("startstreaming",this._onStartStreaming),s.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}n&&(n.removeEventListener("emptied",this._onMediaEmptied),r||(A&&self.URL.revokeObjectURL(A),this.mediaSrc===A?(n.removeAttribute("src"),this.appendSource&&_o(n),n.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(m.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const r=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),r)try{var n;(n=this.mediaSource)!=null&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(r)}catch(s){this.warn(`onBufferReset ${e}`,s)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Aa(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new ho(this.tracks)}onBufferCodecs(e,t){const r=this.tracks,n=Object.keys(t);this.log(`BUFFER_CODECS: "${n}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),A=!s&&this.sourceBufferCount&&this.media&&n.some(a=>!r[a]);if(s||A){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${n}" SourceBuffers`);return}n.forEach(a=>{var l,o,h;const d=t[a],{id:p,codec:v,levelCodec:b,container:S,metadata:F,supplemental:te}=d;let fe=r[a];const oe=(l=this.transferData)==null||(o=l.tracks)==null?void 0:o[a],pe=oe!=null&&oe.buffer?oe:fe,Te=(pe==null?void 0:pe.pendingCodec)||(pe==null?void 0:pe.codec),Ke=pe==null?void 0:pe.levelCodec;fe||(fe=r[a]={buffer:void 0,listeners:[],codec:v,supplemental:te,container:S,levelCodec:b,metadata:F,id:p});const xe=Ht(Te,Ke),$e=xe==null?void 0:xe.replace(go,"$1");let st=Ht(v,b);const Pe=(h=st)==null?void 0:h.replace(go,"$1");st&&xe&&$e!==Pe&&(a.slice(0,5)==="audio"&&(st=gt(st,this.appendSource)),this.log(`switching codec ${Te} to ${st}`),st!==(fe.pendingCodec||fe.codec)&&(fe.pendingCodec=st),fe.container=S,this.appendChangeType(a,S,st))}),(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 r=this.tracks[t];return e[t]={id:r.id,container:r.container,codec:r.codec,levelCodec:r.levelCodec},e},{})}appendChangeType(e,t,r){const n=`${t};codecs=${r}`,s={label:`change-type=${n}`,execute:()=>{const A=this.tracks[e];if(A){const a=A.buffer;a!=null&&a.changeType&&(this.log(`changing ${e} sourceBuffer type to ${n}`),a.changeType(n),A.codec=r,A.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:A=>{this.warn(`Failed to change ${e} SourceBuffer type`,A)}};this.append(s,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const r=e.start,n=r+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(r,O.MAIN))==null?void 0:t.gap)===!0)return;const A={label:"block-audio",execute:()=>{var a;const l=this.tracks.video;(this.lastVideoAppendEnd>n||l!=null&&l.buffer&&qt.isBuffered(l.buffer,n)||((a=this.fragmentTracker.getAppendedFrag(n,O.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:A,frag:e},this.append(A,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:r}=this,{data:n,type:s,parent:A,frag:a,part:l,chunkMeta:o}=t,h=o.buffering[s],d=a.sn,p=self.performance.now();h.start=p;const v=a.stats.buffering,b=l?l.stats.buffering:null;v.start===0&&(v.start=p),b&&b.start===0&&(b.start=p);const S=r.audio;let F=!1;s==="audio"&&(S==null?void 0:S.container)==="audio/mpeg"&&(F=!this.lastMpegAudioChunk||o.id===1||this.lastMpegAudioChunk.sn!==o.sn,this.lastMpegAudioChunk=o);const te=this.tracks.video,fe=te==null?void 0:te.buffer;if(fe&&d!=="initSegment"){const Te=l||a,Ke=this.blockedAudioAppend;if(s==="audio"&&A!=="main"&&!this.blockedAudioAppend){const $e=Te.start+Te.duration*.05,st=fe.buffered,Pe=this.currentOp("video");!st.length&&!Pe?this.blockAudio(Te):!Pe&&!qt.isBuffered(fe,$e)&&this.lastVideoAppendEnd<$e&&this.blockAudio(Te)}else if(s==="video"){const xe=Te.end;if(Ke){const $e=Ke.frag.start;(xe>$e||xe<this.lastVideoAppendEnd||qt.isBuffered(fe,$e))&&this.unblockAudio()}this.lastVideoAppendEnd=xe}}const oe=(l||a).start,pe={label:`append-${s}`,execute:()=>{if(h.executeStart=self.performance.now(),F){const Te=this.tracks[s];if(Te){const Ke=Te.buffer;if(Ke){const xe=oe-Ke.timestampOffset;Math.abs(xe)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${oe} (delta: ${xe}) sn: ${d})`),Ke.timestampOffset=oe)}}}this.appendExecutor(n,s)},onStart:()=>{},onComplete:()=>{const Te=self.performance.now();h.executeEnd=h.end=Te,v.first===0&&(v.first=Te),b&&b.first===0&&(b.first=Te);const Ke={};this.sourceBuffers.forEach(([xe,$e])=>{xe&&(Ke[xe]=qt.getBuffered($e))}),this.appendErrors[s]=0,s==="audio"||s==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(m.BUFFER_APPENDED,{type:s,frag:a,part:l,chunkMeta:o,parent:a.type,timeRanges:Ke})},onError:Te=>{var Ke;const xe={type:he.MEDIA_ERROR,parent:a.type,details:W.BUFFER_APPEND_ERROR,sourceBufferName:s,frag:a,part:l,chunkMeta:o,error:Te,err:Te,fatal:!1},$e=(Ke=this.media)==null?void 0:Ke.error;if(Te.code===DOMException.QUOTA_EXCEEDED_ERR)xe.details=W.BUFFER_FULL_ERROR;else if(Te.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!$e)xe.errorAction=Vt(!0);else if(Te.name===po&&this.sourceBufferCount===0)xe.errorAction=Vt(!0);else{const st=++this.appendErrors[s];this.warn(`Failed ${st}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${s}" sourceBuffer (${$e||"no media error"})`),(st>=this.hls.config.appendErrorMaxRetry||$e)&&(xe.fatal=!0)}this.hls.trigger(m.ERROR,xe)}};this.append(pe,s,this.isPending(this.tracks[s]))}getFlushOp(e,t,r){return this.log(`queuing "${e}" remove ${t}-${r}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,r)},onStart:()=>{},onComplete:()=>{this.hls.trigger(m.BUFFER_FLUSHED,{type:e})},onError:n=>{this.warn(`Failed to remove ${t}-${r} from "${e}" SourceBuffer`,n)}}}onBufferFlushing(e,t){const{type:r,startOffset:n,endOffset:s}=t;r?this.append(this.getFlushOp(r,n,s),r):this.sourceBuffers.forEach(([A])=>{A&&this.append(this.getFlushOp(A,n,s),A)})}onFragParsed(e,t){const{frag:r,part:n}=t,s=[],A=n?n.elementaryStreams:r.elementaryStreams;A[y.AUDIOVIDEO]?s.push("audiovideo"):(A[y.AUDIO]&&s.push("audio"),A[y.VIDEO]&&s.push("video"));const a=()=>{const l=self.performance.now();r.stats.buffering.end=l,n&&(n.stats.buffering.end=l);const o=n?n.stats:r.stats;this.hls.trigger(m.FRAG_BUFFERED,{frag:r,part:n,stats:o,id:r.type})};s.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${r.type} level: ${r.level} sn: ${r.sn}`),this.blockBuffers(a,s).catch(l=>{this.warn(`Fragment buffered callback ${l}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{var t,r;return e&&(!((t=this.tracks[e])!=null&&t.ended)||((r=this.tracks[e])==null?void 0:r.ending))})}onBufferEos(e,t){var r;this.sourceBuffers.forEach(([A])=>{if(A){const a=this.tracks[A];(!t.type||t.type===A)&&(a.ending=!0,a.ended||(a.ended=!0,this.log(`${A} buffer reached EOS`)))}});const n=((r=this.overrides)==null?void 0:r.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([A])=>{var a;return A&&!((a=this.tracks[A])!=null&&a.ended)})&&(n?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:A}=this;if(!A||A.readyState!=="open"){A&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${A.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),A.endOfStream(),this.hls.trigger(m.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(m.BUFFERED_TO_END,void 0)))}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(){const e=this.getDurationAndRange();e&&this.blockUntilOpen(()=>this.updateMediaSource(e))}onError(e,t){if(t.details===W.BUFFER_APPEND_ERROR&&t.frag){var r;const n=(r=t.errorAction)==null?void 0:r.nextAutoLevel;V(n)&&n!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:r}=this;if(!r||t===null||!this.sourceBufferCount)return;const n=e.config,s=r.currentTime,A=t.levelTargetDuration,a=t.live&&n.liveBackBufferLength!==null?n.liveBackBufferLength:n.backBufferLength;if(V(a)&&a>=0){const l=Math.max(a,A),o=Math.floor(s/A)*A-l;this.flushBackBuffer(s,A,o)}if(V(n.frontBufferFlushThreshold)&&n.frontBufferFlushThreshold>0){const l=Math.max(n.maxBufferLength,n.frontBufferFlushThreshold),o=Math.max(l,A),h=Math.floor(s/A)*A+o;this.flushFrontBuffer(s,A,h)}}flushBackBuffer(e,t,r){this.sourceBuffers.forEach(([n,s])=>{if(s){const a=qt.getBuffered(s);if(a.length>0&&r>a.start(0)){var A;this.hls.trigger(m.BACK_BUFFER_REACHED,{bufferEnd:r});const l=this.tracks[n];if((A=this.details)!=null&&A.live)this.hls.trigger(m.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(l!=null&&l.ended){this.log(`Cannot flush ${n} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:n})}}})}flushFrontBuffer(e,t,r){this.sourceBuffers.forEach(([n,s])=>{if(s){const A=qt.getBuffered(s),a=A.length;if(a<2)return;const l=A.start(a-1),o=A.end(a-1);if(r>l||e>=l&&e<=o)return;this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:l,endOffset:1/0,type:n})}})}getDurationAndRange(){var e;const{details:t,mediaSource:r}=this;if(!t||!this.media||(r==null?void 0:r.readyState)!=="open")return null;const n=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&t.live&&r.setLiveSeekableRange){const o=Math.max(0,t.fragmentStart),h=Math.max(o,n);return{duration:1/0,start:o,end:h}}return{duration:1/0}}const s=(e=this.overrides)==null?void 0:e.duration;if(s)return V(s)?{duration:s}:null;const A=this.media.duration,a=V(r.duration)?r.duration:0;return n>a&&n>A||!V(A)?{duration:n}:null}updateMediaSource({duration:e,start:t,end:r}){const n=this.mediaSource;!this.media||!n||n.readyState!=="open"||(n.duration!==e&&(V(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),n.duration=e),t!==void 0&&r!==void 0&&(this.log(`MediaSource duration is set to ${n.duration}. Setting seekable range to ${t}-${r}.`),n.setLiveSeekableRange(t,r)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:r}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${br(r)}`),this.tracksReady){var n;const s=(n=this.transferData)==null?void 0:n.tracks;s&&Object.keys(s).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,r])=>{if(t){const n=this.tracks[t];e[t]={buffer:r,container:n.container,codec:n.codec,supplemental:n.supplemental,levelCodec:n.levelCodec,id:n.id,metadata:n.metadata}}}),this.hls.trigger(m.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(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:r}=this;if(!r)throw new Error("createSourceBuffers called when mediaSource was null");for(const s in e){const A=s,a=e[A];if(this.isPending(a)){const l=this.getTrackCodec(a,A),o=`${a.container};codecs=${l}`;a.codec=l,this.log(`creating sourceBuffer(${o})${this.currentOp(A)?" Queued":""} ${br(a)}`);try{const h=r.addSourceBuffer(o),d=Aa(A),p=[A,h];t[d]=p,a.buffer=h}catch(h){var n;this.error(`error while trying to add sourceBuffer: ${h.message}`),this.shiftAndExecuteNext(A),(n=this.operationQueue)==null||n.removeBlockers(),delete this.tracks[A],this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:h,sourceBufferName:A,mimeType:o,parent:a.id});return}this.trackSourceBuffer(A,a)}}this.bufferCreated()}getTrackCodec(e,t){const r=e.supplemental;let n=e.codec;r&&(t==="video"||t==="audiovideo")&&Ce(r,"video")&&(n=qe(n,r));const s=Ht(n,e.levelCodec);return s?t.slice(0,5)==="audio"?gt(s,this.appendSource):s:""}trackSourceBuffer(e,t){const r=t.buffer;if(!r)return;const n=this.getTrackCodec(t,e);this.tracks[e]={buffer:r,codec:n,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",(s,A)=>{const a=A.removedRanges;a!=null&&a.length&&this.hls.trigger(m.BUFFER_FLUSHED,{type:s})})}get mediaSrc(){var e,t;const r=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return r==null?void 0:r.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 r=this.currentOp(e);r&&(r.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var r;const n=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(r=this.mediaSource)==null?void 0:r.readyState}`);this.error(`${n}`,t),this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:n,fatal:!1});const s=this.currentOp(e);s&&s.onError(n)}removeExecutor(e,t,r){const{media:n,mediaSource:s}=this,A=this.tracks[e],a=A==null?void 0:A.buffer;if(!n||!s||!a){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const l=V(n.duration)?n.duration:1/0,o=V(s.duration)?s.duration:1/0,h=Math.max(0,t),d=Math.min(r,l,o);d>h&&(!A.ending||A.ended)?(A.ended=!1,this.log(`Removing [${h},${d}] from the ${e} SourceBuffer`),a.remove(h,d)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const r=this.tracks[t],n=r==null?void 0:r.buffer;if(!n)throw new Zl(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);r.ending=!1,r.ended=!1,n.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:r}=this,n=t.map(A=>this.appendBlocker(A));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(n).then(A=>{r===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var r;const n=(r=this.tracks[t])==null?void 0:r.buffer;!n||n.updating||this.shiftAndExecuteNext(t)})}append(e,t,r){this.operationQueue&&this.operationQueue.append(e,t,r)}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,r){const n=this.tracks[e];if(!n)return;const s=n.buffer;if(!s)return;const A=r.bind(this,e);n.listeners.push({event:t,listener:A}),s.addEventListener(t,A)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const r=t.buffer;r&&(t.listeners.forEach(n=>{r.removeEventListener(n.event,n.listener)}),t.listeners.length=0)}}function _o(i){const e=i.querySelectorAll("source");[].slice.call(e).forEach(t=>{i.removeChild(t)})}function BA(i,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,i.appendChild(t)}function Aa(i){return i==="audio"?1:0}class Hs{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(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const r=this.hls.levels[t.droppedLevel];this.isLevelAllowed(r)&&this.restrictedLevels.push({bitrate:r.bitrate,height:r.height,width:r.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 r=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,r.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&V(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,r=this.getMaxLevel(e.length-1);r!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${r}: ${e[r].height}p@${e[r].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=r,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 r=t.filter((n,s)=>this.isLevelAllowed(n)&&s<=e);return this.clientRect=null,Hs.getMaxLevelByMediaSize(r,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 r=e.getBoundingClientRect();t.width=r.width,t.height=r.height,!t.width&&!t.height&&(t.width=r.right-r.left||e.width||0,t.height=r.bottom-r.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(r=>e.bitrate===r.bitrate&&e.width===r.width&&e.height===r.height)}static getMaxLevelByMediaSize(e,t,r){if(!(e!=null&&e.length))return-1;const n=(a,l)=>l?a.width!==l.width||a.height!==l.height:!0;let s=e.length-1;const A=Math.max(t,r);for(let a=0;a<e.length;a+=1){const l=e[a];if((l.width>=A||l.height>=A)&&n(l,e[a+1])){s=a;break}}return s}}const ei={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Yl={HLS:"h"},gs={OBJECT:"CMCD-Object",REQUEST:"CMCD-Request",SESSION:"CMCD-Session",STATUS:"CMCD-Status"},Eo={[gs.OBJECT]:["br","d","ot","tb"],[gs.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[gs.SESSION]:["cid","pr","sf","sid","st","v"],[gs.STATUS]:["bs","rtp"]};class ss{constructor(e,t){Array.isArray(e)&&(e=e.map(r=>r instanceof ss?r:new ss(r))),this.value=e,this.params=t}}const aa="Dict";function Jl(i){return Array.isArray(i)?JSON.stringify(i):i instanceof Map?"Map{}":i instanceof Set?"Set{}":typeof i=="object"?JSON.stringify(i):String(i)}function ql(i,e,t,r){return new Error(`failed to ${i} "${Jl(e)}" as ${t}`,{cause:r})}function Ii(i,e,t){return ql("serialize",i,e,t)}class li{constructor(e){this.description=e}}const yA="Bare Item",eu="Boolean";function tu(i){if(typeof i!="boolean")throw Ii(i,eu);return i?"?1":"?0"}const ru="Byte Sequence";function nu(i){if(ArrayBuffer.isView(i)===!1)throw Ii(i,ru);return`:${_l(i)}:`}const iu="Integer";function su(i){return i<-999999999999999||999999999999999<i}function wo(i){if(su(i))throw Ii(i,iu);return i.toString()}function Au(i){return`@${wo(i.getTime()/1e3)}`}const au="Decimal";function Co(i){const e=Ga(i,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Ii(i,au);const t=e.toString();return t.includes(".")?t:`${t}.0`}const ou="String",oa=/[\x00-\x1f\x7f]+/;function bo(i){if(oa.test(i))throw Ii(i,ou);return`"${i.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Wn(i){return i.description||i.toString().slice(7,-1)}const Ks="Token";function xo(i){const e=Wn(i);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Ii(e,Ks);return e}function la(i){switch(typeof i){case"number":if(!V(i))throw Ii(i,yA);return Number.isInteger(i)?wo(i):Co(i);case"string":return bo(i);case"symbol":return xo(i);case"boolean":return tu(i);case"object":if(i instanceof Date)return Au(i);if(i instanceof Uint8Array)return nu(i);if(i instanceof li)return xo(i);default:throw Ii(i,yA)}}const Fo="Key";function $s(i){if(/^[a-z*][a-z0-9\-_.*]*$/.test(i)===!1)throw Ii(i,Fo);return i}function ua(i){return i==null?"":Object.entries(i).map(([e,t])=>t===!0?`;${$s(e)}`:`;${$s(e)}=${la(t)}`).join("")}function So(i){return i instanceof ss?`${la(i.value)}${ua(i.params)}`:la(i)}function lu(i){return`(${i.value.map(So).join(" ")})${ua(i.params)}`}function uu(i,e={whitespace:!0}){if(typeof i!="object")throw Ii(i,aa);const t=i instanceof Map?i.entries():Object.entries(i),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([n,s])=>{s instanceof ss||(s=new ss(s));let A=$s(n);return s.value===!0?A+=ua(s.params):(A+="=",Array.isArray(s.value)?A+=lu(s):A+=So(s)),A}).join(`,${r}`)}function cu(i,e){return uu(i,e)}function fu(i){return i==="ot"||i==="sf"||i==="st"}function hu(i){return typeof i=="number"?V(i):i!=null&&i!==""&&i!==!1}const EA=i=>Math.round(i),To=(i,e)=>(e!=null&&e.baseUrl&&(i=vl(i,e.baseUrl)),encodeURIComponent(i)),Gs=i=>EA(i/100)*100,Io={br:EA,d:EA,bl:Gs,dl:Gs,mtp:Gs,nor:To,rtp:Gs,tb:EA};function Do(i,e){const t={};if(i==null||typeof i!="object")return t;const r=Object.keys(i).sort(),n=B({},Io,e==null?void 0:e.formatters),s=e==null?void 0:e.filter;return r.forEach(A=>{if(s!=null&&s(A))return;let a=i[A];const l=n[A];l&&(a=l(a,e)),!(A==="v"&&a===1)&&(A=="pr"&&a===1||hu(a)&&(fu(A)&&typeof a=="string"&&(a=new li(a)),t[A]=a))}),t}function wA(i,e={}){return i?cu(Do(i,e),B({whitespace:!1},e)):""}function du(i,e={}){const t={};if(!i)return t;const r=Object.entries(i),n=Object.entries(Eo).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),s=r.reduce((A,a)=>{var l,o;const[h,d]=a,p=((l=n.find(v=>v[1].includes(h)))===null||l===void 0?void 0:l[0])||gs.REQUEST;return(o=A[p])!==null&&o!==void 0||(A[p]={}),A[p][h]=d,A},{});return Object.entries(s).reduce((A,[a,l])=>(A[a]=wA(l,e),A),t)}function gu(i,e,t){return B(i,du(e,t))}const pu="CMCD";function mu(i,e={}){if(!i)return"";const t=wA(i,e);return`${pu}=${encodeURIComponent(t)}`}const Vs=/CMCD=[^&#]+/;function CA(i,e,t){const r=mu(e,t);if(!r)return i;if(Vs.test(i))return i.replace(Vs,r);const n=i.includes("?")?"&":"?";return`${i}${n}${r}`}class _u{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=n=>{try{this.apply(n,{ot:ei.MANIFEST,su:!this.initialized})}catch(s){this.hls.logger.warn("Could not generate manifest CMCD data.",s)}},this.applyFragmentData=n=>{try{const{frag:s,part:A}=n,a=this.hls.levels[s.level],l=this.getObjectType(s),o={d:(A||s).duration*1e3,ot:l};(l===ei.VIDEO||l===ei.AUDIO||l==ei.MUXED)&&(o.br=a.bitrate/1e3,o.tb=this.getTopBandwidth(l)/1e3,o.bl=this.getBufferLength(l));const h=A?this.getNextPart(A):this.getNextFrag(s);h!=null&&h.url&&h.url!==s.url&&(o.nor=h.url),this.apply(n,o)}catch(s){this.hls.logger.warn("Could not generate segment CMCD data.",s)}},this.hls=e;const t=this.config=e.config,{cmcd:r}=t;r!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||e.sessionId,this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.includeKeys=r.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHED,this.onMediaDetached,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHED,this.onMediaDetached,this),e.off(m.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 r,n;this.audioBuffer=(r=t.tracks.audio)==null?void 0:r.buffer,this.videoBuffer=(n=t.tracks.video)==null?void 0:n.buffer}createData(){var e;return{v:1,sf:Yl.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 r=t.ot===ei.INIT||t.ot===ei.VIDEO||t.ot===ei.MUXED;this.starved&&r&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:n}=this;n&&(t=Object.keys(t).reduce((A,a)=>(n.includes(a)&&(A[a]=t[a]),A),{}));const s={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),gu(e.headers,t,s)):e.url=CA(e.url,t,s)}getNextFrag(e){var t;const r=(t=this.hls.levels[e.level])==null?void 0:t.details;if(r){const n=e.sn-r.startSN;return r.fragments[n+1]}}getNextPart(e){var t,r;const{index:n,fragment:s}=e,A=(t=this.hls.levels[s.level])==null||(r=t.details)==null?void 0:r.partList;if(A){const{sn:a}=s;for(let l=A.length-1;l>=0;l--){const o=A[l];if(o.index===n&&o.fragment.sn===a)return A[l+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return ei.TIMED_TEXT;if(e.sn==="initSegment")return ei.INIT;if(t==="audio")return ei.AUDIO;if(t==="main")return this.hls.audioTracks.length?ei.VIDEO:ei.MUXED}getTopBandwidth(e){let t=0,r;const n=this.hls;if(e===ei.AUDIO)r=n.audioTracks;else{const s=n.maxAutoLevel,A=s>-1?s+1:n.levels.length;r=n.levels.slice(0,A)}for(const s of r)s.bitrate>t&&(t=s.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.media,r=e===ei.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!t?NaN:qt.bufferInfo(r,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,r=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new r(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,A,a){t(s),this.loader.load(s,A,a)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,r=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new r(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,A,a){t(s),this.loader.load(s,A,a)}}}}const Lo=3e5;class ca extends M{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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.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(r=>r!==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:r}=t;r!==null&&(this.pathwayId=r.pathwayId,this.uri=r.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:r}=t;if((r==null?void 0:r.action)===je.SendAlternateToPenaltyBox&&r.flags===ct.MoveAllAlternatesMatchingHost){const n=this.levels;let s=this._pathwayPriority,A=this.pathwayId;if(t.context){const{groupId:a,pathwayId:l,type:o}=t.context;a&&n?A=this.getPathwayForGroupId(a,o,A):l&&(A=l)}A in this.penalizedPathways||(this.penalizedPathways[A]=performance.now()),!s&&n&&(s=this.pathways()),s&&s.length>1&&(this.updatePathwayPriority(s),r.resolved=this.pathwayId!==A),r.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${A} levels: ${n&&n.length} priorities: ${br(s)} penalized: ${br(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const r=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${r}"`),t=this.getLevelsForPathway(r),this.pathwayId=r}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 r=this.penalizedPathways,n=performance.now();Object.keys(r).forEach(s=>{n-r[s]>Lo&&delete r[s]});for(let s=0;s<e.length;s++){const A=e[s];if(A in r)continue;if(A===this.pathwayId)return;const a=this.hls.nextLoadLevel,l=this.hls.levels[a];if(t=this.getLevelsForPathway(A),t.length>0){this.log(`Setting Pathway to "${A}"`),this.pathwayId=A,qn(t),this.hls.trigger(m.LEVELS_UPDATED,{levels:t});const o=this.hls.levels[a];l&&o&&this.levels&&(o.attrs["STABLE-VARIANT-ID"]!==l.attrs["STABLE-VARIANT-ID"]&&o.bitrate!==l.bitrate&&this.log(`Unstable Pathways change from bitrate ${l.bitrate} to ${o.bitrate}`),this.hls.nextLoadLevel=a);break}}}getPathwayForGroupId(e,t,r){const n=this.getLevelsForPathway(r).concat(this.levels||[]);for(let s=0;s<n.length;s++)if(t===ge.AUDIO_TRACK&&n[s].hasAudioGroup(e)||t===ge.SUBTITLE_TRACK&&n[s].hasSubtitleGroup(e))return n[s].pathwayId;return r}clonePathways(e){const t=this.levels;if(!t)return;const r={},n={};e.forEach(s=>{const{ID:A,"BASE-ID":a,"URI-REPLACEMENT":l}=s;if(t.some(h=>h.pathwayId===A))return;const o=this.getLevelsForPathway(a).map(h=>{const d=new Xr(h.attrs);d["PATHWAY-ID"]=A;const p=d.AUDIO&&`${d.AUDIO}_clone_${A}`,v=d.SUBTITLES&&`${d.SUBTITLES}_clone_${A}`;p&&(r[d.AUDIO]=p,d.AUDIO=p),v&&(n[d.SUBTITLES]=v,d.SUBTITLES=v);const b=ha(h.uri,d["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",l),S=new Pr({attrs:d,audioCodec:h.audioCodec,bitrate:h.bitrate,height:h.height,name:h.name,url:b,videoCodec:h.videoCodec,width:h.width});if(h.audioGroups)for(let F=1;F<h.audioGroups.length;F++)S.addGroupId("audio",`${h.audioGroups[F]}_clone_${A}`);if(h.subtitleGroups)for(let F=1;F<h.subtitleGroups.length;F++)S.addGroupId("text",`${h.subtitleGroups[F]}_clone_${A}`);return S});t.push(...o),fa(this.audioTracks,r,l,A),fa(this.subtitleTracks,n,l,A)})}loadSteeringManifest(e){const t=this.hls.config,r=t.loader;this.loader&&this.loader.destroy(),this.loader=new r(t);let n;try{n=new self.URL(e)}catch(h){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(n.protocol!=="data:"){const h=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;n.searchParams.set("_HLS_pathway",this.pathwayId),n.searchParams.set("_HLS_throughput",""+h)}const s={responseType:"json",url:n.href},A=t.steeringManifestLoadPolicy.default,a=A.errorRetry||A.timeoutRetry||{},l={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},o={onSuccess:(h,d,p,v)=>{this.log(`Loaded steering manifest: "${n}"`);const b=h.data;if((b==null?void 0:b.VERSION)!==1){this.log(`Steering VERSION ${b.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=b.TTL;const{"RELOAD-URI":S,"PATHWAY-CLONES":F,"PATHWAY-PRIORITY":te}=b;if(S)try{this.uri=new self.URL(S,n).href}catch(oe){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${S}`);return}this.scheduleRefresh(this.uri||p.url),F&&this.clonePathways(F);const fe={steeringManifest:b,url:n.toString()};this.hls.trigger(m.STEERING_MANIFEST_LOADED,fe),te&&this.updatePathwayPriority(te)},onError:(h,d,p,v)=>{if(this.log(`Error loading steering manifest: ${h.code} ${h.text} (${d.url})`),this.stopLoad(),h.code===410){this.enabled=!1,this.log(`Steering manifest ${d.url} no longer available`);return}let b=this.timeToLoad*1e3;if(h.code===429){const S=this.loader;if(typeof(S==null?void 0:S.getResponseHeader)=="function"){const F=S.getResponseHeader("Retry-After");F&&(b=parseFloat(F)*1e3)}this.log(`Steering manifest ${d.url} rate limited`);return}this.scheduleRefresh(this.uri||d.url,b)},onTimeout:(h,d,p)=>{this.log(`Timeout loading steering manifest (${d.url})`),this.scheduleRefresh(this.uri||d.url)}};this.log(`Requesting steering manifest: ${n}`),this.loader.load(s,l,o)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var r;const n=(r=this.hls)==null?void 0:r.media;if(n&&!n.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function fa(i,e,t,r){i&&Object.keys(e).forEach(n=>{const s=i.filter(A=>A.groupId===n).map(A=>{const a=B({},A);return a.details=void 0,a.attrs=new Xr(a.attrs),a.url=a.attrs.URI=ha(A.url,A.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),a.groupId=a.attrs["GROUP-ID"]=e[n],a.attrs["PATHWAY-ID"]=r,a});i.push(...s)})}function ha(i,e,t,r){const{HOST:n,PARAMS:s,[t]:A}=r;let a;e&&(a=A==null?void 0:A[e],a&&(i=a));const l=new self.URL(i);return n&&!a&&(l.host=n),s&&Object.keys(s).sort().forEach(o=>{o&&l.searchParams.set(o,s[o])}),l.href}class As extends M{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.setMediaKeysQueue=As.CDMCleanupPromise?[As.CDMCleanupPromise]:[],this.onMediaEncrypted=t=>{const{initDataType:r,initData:n}=t,s=`"${t.type}" event: init data type: "${r}"`;if(this.debug(s),n!==null){if(!this.keyFormatPromise){let A=Object.keys(this.keySystemAccessPromises);A.length||(A=Qt(this.config));const a=A.map(Yn).filter(l=>!!l);this.keyFormatPromise=this.getKeyFormatPromise(a)}this.keyFormatPromise.then(A=>{const a=ci(A);let l,o;if(r==="sinf"){if(a!==kr.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${a}`);return}const b=Le(new Uint8Array(n));try{const S=Un(JSON.parse(b).sinf),F=We(S);if(!F)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");l=new Uint8Array(F.subarray(8,24)),o=kr.FAIRPLAY}catch(S){this.warn(`${s} Failed to parse sinf: ${S}`);return}}else{if(a!==kr.WIDEVINE&&a!==kr.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${a}`);return}const b=fr(n),S=b.filter(te=>!!te.systemId&&ai(te.systemId)===a);S.length>1&&this.warn(`${s} Using first of ${S.length} pssh found for selected key-system ${a}`);const F=S[0];if(!F){b.length===0||b.some(te=>!te.systemId)?this.warn(`${s} contains incomplete or invalid pssh data`):this.log(`ignoring ${s} for ${b.map(te=>ai(te.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(o=ai(F.systemId),F.version===0&&F.data)if(o===kr.WIDEVINE){const te=F.data.length-22;l=new Uint8Array(F.data.subarray(te,te+16))}else o===kr.PLAYREADY&&(l=Nn(F.data))}if(!o||!l)return;const h=Z.hexDump(l),{keyIdToKeySessionPromise:d,mediaKeySessions:p}=this;let v=d[h];for(let b=0;b<p.length;b++){const S=p[b],F=S.decryptdata;if(!F.keyId)continue;const te=Z.hexDump(F.keyId);if(h===te||F.uri.replace(/-/g,"").indexOf(h)!==-1){if(v=d[te],F.pssh)break;delete d[te],F.pssh=new Uint8Array(n),F.keyId=l,v=d[h]=v.then(()=>this.generateRequestWithPreferredKeySession(S,r,n,"encrypted-event-key-match")),v.catch(fe=>this.handleError(fe));break}}if(!v){if(o!==a){this.log(`Ignoring "${t.type}" event with ${o} init data for selected key-system ${a}`);return}v=d[h]=this.getKeySystemSelectionPromise([o]).then(({keySystem:b,mediaKeys:S})=>{var F;this.throwIfDestroyed();const te=new Sn("ISO-23001-7",h,(F=Yn(b))!=null?F:"");return te.pssh=new Uint8Array(n),te.keyId=l,this.attemptSetMediaKeys(b,S).then(()=>{this.throwIfDestroyed();const fe=this.createMediaKeySessionContext({decryptdata:te,keySystem:b,mediaKeys:S});return this.generateRequestWithPreferredKeySession(fe,r,n,"encrypted-event-no-match")})}),v.catch(b=>this.handleError(b))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){const e=this.media;this.unregisterListeners(),this.onMediaDetached(),this._clear(e);const t=this.config;t.requestMediaKeySystemAccessFunc=null,t.licenseXhrSetup=t.licenseResponseCallback=void 0,t.drmSystems=t.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(m.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:r}=this.config,n=t[e];if(n)return n.licenseUrl;if(e===kr.WIDEVINE&&r)return r}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,r=t[e];if(r)return r.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,r=(A,a,l)=>!!A&&l.indexOf(A)===a,n=t.map(A=>A.audioCodec).filter(r),s=t.map(A=>A.videoCodec).filter(r);return n.length+s.length===0&&s.push("avc1.42e01e"),new Promise((A,a)=>{const l=o=>{const h=o.shift();this.getMediaKeysPromise(h,n,s).then(d=>A({keySystem:h,mediaKeys:d})).catch(d=>{o.length?l(o):d instanceof gi?a(d):a(new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_ACCESS,error:d,fatal:!0},d.message))})};l(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:r}=this.config;if(typeof r!="function"){let n=`Configured requestMediaKeySystemAccess is not a function ${r}`;return xr===null&&self.location.protocol==="http:"&&(n=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(n))}return r(e,t)}getMediaKeysPromise(e,t,r){const n=sn(e,t,r,this.config.drmSystemOptions),s=this.keySystemAccessPromises[e];let A=s==null?void 0:s.keySystemAccess;if(!A){this.log(`Requesting encrypted media "${e}" key-system access with config: ${br(n)}`),A=this.requestMediaKeySystemAccess(e,n);const a=this.keySystemAccessPromises[e]={keySystemAccess:A};return A.catch(l=>{this.log(`Failed to obtain access to key-system "${e}": ${l}`)}),A.then(l=>{this.log(`Access for key-system "${l.keySystem}" obtained`);const o=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),a.mediaKeys=l.createMediaKeys().then(h=>(this.log(`Media-keys created for "${e}"`),o.then(d=>d?this.setMediaKeysServerCertificate(h,e,d):h))),a.mediaKeys.catch(h=>{this.error(`Failed to create media-keys for "${e}"}: ${h}`)}),a.mediaKeys})}return A.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${Z.hexDump(e.keyId||[])}`);const n=r.createSession(),s={decryptdata:e,keySystem:t,mediaKeys:r,mediaKeysSession:n,keyStatus:"status-pending"};return this.mediaKeySessions.push(s),s}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const r=this.createMediaKeySessionContext(e),n=this.getKeyIdString(t),s="cenc";this.keyIdToKeySessionPromise[n]=this.generateRequestWithPreferredKeySession(r,s,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 Z.hexDump(e.keyId)}updateKeySession(e,t){var r;const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyID ${Z.hexDump(((r=e.decryptdata)==null?void 0:r.keyId)||[])}
} (data length: ${t&&t.byteLength})`),n.update(t)}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){return new Promise((t,r)=>{const n=Qt(this.config),s=e.map(ci).filter(A=>!!A&&n.indexOf(A)!==-1);return this.getKeySystemSelectionPromise(s).then(({keySystem:A})=>{const a=Yn(A);a?t(a):r(new Error(`Unable to find format for key-system "${A}"`))}).catch(r)})}loadKey(e){const t=e.keyInfo.decryptdata,r=this.getKeyIdString(t),n=`(keyId: ${r} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${n}`);let s=this.keyIdToKeySessionPromise[r];return s||(s=this.getKeySystemForKeyPromise(t).then(({keySystem:a,mediaKeys:l})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${n}`),this.attemptSetMediaKeys(a,l).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:a,mediaKeys:l,decryptdata:t}))))),(this.keyIdToKeySessionPromise[r]=s.then(a=>{const l="cenc",o=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(a,l,o,"playlist-key")})).catch(a=>this.handleError(a))),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof gi?this.hls.trigger(m.ERROR,e.data):this.hls.trigger(m.ERROR,{type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=ci(e.keyFormat),s=n?[n]:Qt(this.config);return this.attemptKeySystemAccess(s)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=Qt(this.config)),e.length===0)throw new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${br({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const r=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const n=Promise.all(r).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(n),n.then(()=>{this.log(`Media-keys set for "${e}"`),r.push(n),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(s=>r.indexOf(s)===-1)})}generateRequestWithPreferredKeySession(e,t,r,n){var s,A;const a=(s=this.config.drmSystems)==null||(A=s[e.keySystem])==null?void 0:A.generateRequest;if(a)try{const b=a.call(this.hls,t,r,e);if(!b)throw new Error("Invalid response from configured generateRequest filter");t=b.initDataType,r=b.initData?b.initData:null,e.decryptdata.pssh=r?new Uint8Array(r):null}catch(b){var l;if(this.warn(b.message),(l=this.hls)!=null&&l.config.debug)throw b}if(r===null)return this.log(`Skipping key-session request for "${n}" (no initData)`),Promise.resolve(e);const o=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${n}": ${o} (init data type: ${t} length: ${r?r.byteLength:null})`);const h=new ts,d=e._onmessage=b=>{const S=e.mediaKeysSession;if(!S){h.emit("error",new Error("invalid state"));return}const{messageType:F,message:te}=b;this.log(`"${F}" message event for session "${S.sessionId}" message size: ${te.byteLength}`),F==="license-request"||F==="license-renewal"?this.renewLicense(e,te).catch(fe=>{h.eventNames().length?h.emit("error",fe):this.handleError(fe)}):F==="license-release"?e.keySystem===kr.FAIRPLAY&&(this.updateKeySession(e,Jn("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${F}"`)},p=e._onkeystatuseschange=b=>{if(!e.mediaKeysSession){h.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const F=e.keyStatus;h.emit("keyStatus",F),F==="expired"&&(this.warn(`${e.keySystem} expired for key ${o}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",d),e.mediaKeysSession.addEventListener("keystatuseschange",p);const v=new Promise((b,S)=>{h.on("error",S),h.on("keyStatus",F=>{F.startsWith("usable")?b():F==="output-restricted"?S(new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):F==="internal-error"?S(new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${F}"`)):F==="expired"?S(new Error("key expired while generating request")):this.warn(`unhandled key status change "${F}"`)})});return e.mediaKeysSession.generateRequest(t,r).then(()=>{var b;this.log(`Request generated for key-session "${(b=e.mediaKeysSession)==null?void 0:b.sessionId}" keyId: ${o}`)}).catch(b=>{throw new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_SESSION,error:b,fatal:!1},`Error generating key-session request: ${b}`)}).then(()=>v).catch(b=>{throw h.removeAllListeners(),this.removeSession(e),b}).then(()=>(h.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,r)=>{if(typeof r=="string"&&typeof t=="object"){const n=r;r=t,t=n}this.log(`key status change "${t}" for keyStatuses keyId: ${Z.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))} session keyId: ${Z.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,r=t.loader,n=new r(t),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching server certificate for "${e}"`),new Promise((A,a)=>{const l={responseType:"arraybuffer",url:s},o=t.certLoadPolicy.default,h={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(p,v,b,S)=>{A(p.data)},onError:(p,v,b,S)=>{a(new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:b,response:w({url:l.url,data:void 0},p)},`"${e}" certificate request failed (${s}). Status: ${p.code} (${p.text})`))},onTimeout:(p,v,b)=>{a(new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:b,response:{url:l.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(p,v,b)=>{a(new Error("aborted"))}};n.load(l,h,d)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,r){return new Promise((n,s)=>{e.setServerCertificate(r).then(A=>{this.log(`setServerCertificate ${A?"success":"not supported by CDM"} (${r==null?void 0:r.byteLength}) on "${t}"`),n(e)}).catch(A=>{s(new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:A,fatal:!0},A.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(r=>this.updateKeySession(e,new Uint8Array(r)).catch(n=>{throw new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:n,fatal:!0},n.message)}))}unpackPlayReadyKeyMessage(e,t){const r=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!r.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const n=new DOMParser().parseFromString(r,"application/xml"),s=n.querySelectorAll("HttpHeader");if(s.length>0){let h;for(let d=0,p=s.length;d<p;d++){var A,a;h=s[d];const v=(A=h.querySelector("name"))==null?void 0:A.textContent,b=(a=h.querySelector("value"))==null?void 0:a.textContent;v&&b&&e.setRequestHeader(v,b)}}const l=n.querySelector("Challenge"),o=l==null?void 0:l.textContent;if(!o)throw new Error("Cannot find <Challenge> in key message");return Jn(atob(o))}setupLicenseXHR(e,t,r,n){const s=this.config.licenseXhrSetup;return s?Promise.resolve().then(()=>{if(!r.decryptdata)throw new Error("Key removed");return s.call(this.hls,e,t,r,n)}).catch(A=>{if(!r.decryptdata)throw A;return e.open("POST",t,!0),s.call(this.hls,e,t,r,n)}).then(A=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:A||n})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:n}))}requestLicense(e,t){const r=this.config.keyLoadPolicy.default;return new Promise((n,s)=>{const A=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${A}`);const a=new XMLHttpRequest;a.responseType="arraybuffer",a.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return s(new Error("invalid state"));if(a.readyState===4)if(a.status===200){this._requestLicenseFailureCount=0;let l=a.response;this.log(`License received ${l instanceof ArrayBuffer?l.byteLength:l}`);const o=this.config.licenseResponseCallback;if(o)try{l=o.call(this.hls,a,A,e)}catch(h){this.error(h)}n(l)}else{const l=r.errorRetry,o=l?l.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>o||a.status>=400&&a.status<500)s(new gi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:{url:A,data:void 0,code:a.status,text:a.statusText}},`License Request XHR failed (${A}). Status: ${a.status} (${a.statusText})`));else{const h=o-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${h} attempts left`),this.requestLicense(e,t).then(n,s)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=a,this.setupLicenseXHR(a,A,e,t).then(({xhr:l,licenseChallenge:o})=>{e.keySystem==kr.PLAYREADY&&(o=this.unpackPlayReadyKeyMessage(l,o)),l.send(o)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const r=t.media;this.media=r,r.removeEventListener("encrypted",this.onMediaEncrypted),r.removeEventListener("waitingforkey",this.onWaitingForKey),r.addEventListener("encrypted",this.onMediaEncrypted),r.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null)}_clear(e){var t;const r=this.mediaKeySessions;this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Sn.clearKeyUriToKeyIdMap();const n=r.length;As.CDMCleanupPromise=Promise.all(r.map(s=>this.removeSession(s)).concat(e==null||(t=e.setMediaKeys(null))==null?void 0:t.catch(s=>{var A;this.log(`Could not clear media keys: ${s}`),(A=this.hls)==null||A.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))).then(()=>{n&&(this.log("finished closing key sessions and clearing media keys"),r.length=0)}).catch(s=>{var A;this.log(`Could not close sessions and clear media keys: ${s}`),(A=this.hls)==null||A.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const r=t.reduce((n,s)=>(n.indexOf(s.keyFormat)===-1&&n.push(s.keyFormat),n),[]);this.log(`Selecting key-system from session-keys ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:r}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const n=this.mediaKeySessions.indexOf(e);n>-1&&this.mediaKeySessions.splice(n,1);const{drmSystemOptions:s}=this.config;return(un(s)?new Promise((a,l)=>{self.setTimeout(()=>l(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(a)}):Promise.resolve()).catch(a=>{var l;this.log(`Could not remove session: ${a}`),(l=this.hls)==null||l.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${a}`)})}).then(()=>t.close()).catch(a=>{var l;this.log(`Could not close session: ${a}`),(l=this.hls)==null||l.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${a}`)})})}}}As.CDMCleanupPromise=void 0;class gi 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}}class bA{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(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(m.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const r=this.hls.config;if(r.capLevelOnFPSDrop){const n=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=n,n&&typeof n.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,r){const n=performance.now();if(t){if(this.lastTime){const s=n-this.lastTime,A=r-this.lastDroppedFrames,a=t-this.lastDecodedFrames,l=1e3*A/s,o=this.hls;if(o.trigger(m.FPS_DROP,{currentDropped:A,currentDecoded:a,totalDroppedFrames:r}),l>0&&A>o.config.fpsDroppedMonitoringThreshold*a){let h=o.currentLevel;o.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(o.autoLevelCapping===-1||o.autoLevelCapping>=h)&&(h=h-1,o.trigger(m.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:o.currentLevel}),o.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=r,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 da(i,e){let t;try{t=new Event("addtrack")}catch(r){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=i,e.dispatchEvent(t)}function ga(i,e){const t=i.mode;if(t==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(e.id))try{if(i.addCue(e),!i.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(r){ne.debug(`[texttrack-utils]: ${r}`);try{const n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,i.addCue(n)}catch(n){ne.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${n}`)}}t==="disabled"&&(i.mode=t)}function ps(i,e){const t=i.mode;if(t==="disabled"&&(i.mode="hidden"),i.cues)for(let r=i.cues.length;r--;)e&&i.cues[r].removeEventListener("enter",e),i.removeCue(i.cues[r]);t==="disabled"&&(i.mode=t)}function pa(i,e,t,r){const n=i.mode;if(n==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0){const s=ms(i.cues,e,t);for(let A=0;A<s.length;A++)(!r||r(s[A]))&&i.removeCue(s[A])}n==="disabled"&&(i.mode=n)}function Uo(i,e){if(e<=i[0].startTime)return 0;const t=i.length-1;if(e>i[t].endTime)return-1;let r=0,n=t,s;for(;r<=n;)if(s=Math.floor((n+r)/2),e<i[s].startTime)n=s-1;else if(e>i[s].startTime&&r<t)r=s+1;else return s;return i[r].startTime-e<e-i[n].startTime?r:n}function ms(i,e,t){const r=[],n=Uo(i,e);if(n>-1)for(let s=n,A=i.length;s<A;s++){const a=i[s];if(a.startTime>=e&&a.endTime<=t)r.push(a);else if(a.startTime>t)return r}return r}function _s(i){const e=[];for(let t=0;t<i.length;t++){const r=i[t];(r.kind==="subtitles"||r.kind==="captions")&&r.label&&e.push(i[t])}return e}class xA extends ia{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 r=_s(this.media.textTracks);for(let s=0;s<r.length;s++)if(r[s].mode==="hidden")t=r[s];else if(r[s].mode==="showing"){t=r[s];break}const n=this.findTrackForTextTrack(t);this.subtitleTrack!==n&&this.setSubtitleTrack(n)},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(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.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 r=this.media;if(!r)return;const n=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||r.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,n)return;_s(r.textTracks).forEach(A=>{ps(A)})}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:r,groupId:n,details:s}=t,A=this.tracksInGroup[r];if(!A||A.groupId!==n){this.warn(`Subtitle track with id:${r} and group:${n} not found in active group ${A==null?void 0:A.groupId}`);return}const a=A.details;A.details=t.details,this.log(`Subtitle track ${r} "${A.name}" lang:${A.lang} group:${n} loaded [${s.startSN}-${s.endSN}]`),r===this.trackId&&this.playlistLoaded(r,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 r=t.subtitleGroups||null,n=this.groupIds;let s=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(A=>(n==null?void 0:n.indexOf(A))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const A=this.tracks.filter(h=>!r||r.indexOf(h.groupId)!==-1);if(A.length)this.selectDefaultTrack&&!A.some(h=>h.default)&&(this.selectDefaultTrack=!1),A.forEach((h,d)=>{h.id=d});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=A;const a=this.hls.config.subtitlePreference;if(!s&&a){this.selectDefaultTrack=!1;const h=ze(a,A);if(h>-1)s=A[h];else{const d=ze(a,this.tracks);s=this.tracks[d]}}let l=this.findTrackId(s);l===-1&&s&&(l=this.findTrackId(null));const o={subtitleTracks:A};this.log(`Updating subtitle tracks, ${A.length} track(s) found in "${r==null?void 0:r.join(",")}" group-id`),this.hls.trigger(m.SUBTITLE_TRACKS_UPDATED,o),l!==-1&&this.trackId===-1&&this.setSubtitleTrack(l)}}findTrackId(e){const t=this.tracksInGroup,r=this.selectDefaultTrack;for(let n=0;n<t.length;n++){const s=t[n];if(!(r&&!s.default||!r&&!e)&&(!e||_t(s,e)))return n}if(e){for(let n=0;n<t.length;n++){const s=t[n];if(Ns(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const s=t[n];if(Ns(e.attrs,s.attrs,["LANGUAGE"]))return n}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(sa(n,e))return r}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===ge.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 r=this.currentTrack;if(r&&_t(e,r))return r;const n=ze(e,this.tracksInGroup);if(n>-1){const s=this.tracksInGroup[n];return this.setSubtitleTrack(n),s}else{if(r)return null;{const s=ze(e,t);if(s>-1)return t[s]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=e.id,n=e.groupId,s=this.getUrlWithDirectives(e.url,t),A=e.details,a=A==null?void 0:A.age;this.log(`Loading subtitle ${r} "${e.name}" lang:${e.lang} group:${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${a&&A.live?" age "+a.toFixed(1)+(A.type?" "+A.type||0:""):""} ${s}`),this.hls.trigger(m.SUBTITLE_TRACK_LOADING,{url:s,id:r,groupId:n,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=_s(e.textTracks),r=this.currentTrack;let n;if(r&&(n=t.filter(s=>sa(r,s))[0],n||this.warn(`Unable to find subtitle TextTrack with name "${r.name}" and language "${r.lang}"`)),[].slice.call(t).forEach(s=>{s.mode!=="disabled"&&s!==n&&(s.mode="disabled")}),n){const s=this.subtitleDisplay?"showing":"hidden";n.mode!==s&&(n.mode=s)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!V(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e]||null;if(this.trackId=e,this.currentTrack=n,this.toggleTrackModes(),!n){this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:e});return}const s=!!n.details&&!n.details.live;if(e===this.trackId&&n===r&&s)return;this.log(`Switching to subtitle-track ${e}`+(n?` "${n.name}" lang:${n.lang} group:${n.groupId}`:""));const{id:A,groupId:a="",name:l,type:o,url:h}=n;this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:A,groupId:a,name:l,type:o,url:h});const d=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(d)}}function Ws(i){let e=5381,t=i.length;for(;t;)e=e*33^i.charCodeAt(--t);return(e>>>0).toString()}const vs=.025;let FA=function(i){return i[i.Point=0]="Point",i[i.Range=1]="Range",i}({});function vu(i,e,t){return`${i.identifier}-${t+1}-${Ws(e)}`}class Ro{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){if(e>=this.assetList.length)return!0;const t=this.playoutLimit;return e<=0||isNaN(t)?!1:this.assetList[e].startOffset>t}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 Zs(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,r=Zs(t,e);return t-r<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=V(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 Zs(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)<vs))}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"?FA.Range:FA.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 Qo(this)}}function Zs(i,e){return i-e.start<e.duration/2&&!(Math.abs(i-(e.start+e.duration))<vs)?e.start:e.start+e.duration}function ma(i,e,t){const r=new self.URL(i,t);return r.protocol!=="data:"&&r.searchParams.set("_HLS_primary_id",e),r}function Qo(i){return`["${i.identifier}" ${i.cue.pre?"<pre>":i.cue.post?"<post>":""}${i.timelineStart.toFixed(2)}-${i.resumeTime.toFixed(2)}]`}function zs(i){const e=i.timelineStart,t=i.duration||0;return`["${i.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class ko{constructor(e,t,r,n){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=()=>{const o=this.interstitial.playoutLimit,h=this.currentTime;this.startOffset+h>=o&&this.hls.trigger(m.PLAYOUT_LIMIT_REACHED,{})};const s=this.hls=new e(t);this.interstitial=r,this.assetItem=n;let A=n.uri;try{A=ma(A,s.sessionId).href}catch(l){}s.loadSource(A);const a=()=>{this.hasDetails=!0};s.once(m.LEVEL_LOADED,a),s.once(m.AUDIO_TRACK_LOADED,a),s.once(m.SUBTITLE_TRACK_LOADED,a),s.on(m.MEDIA_ATTACHING,(l,{media:o})=>{this.removeMediaListeners(),this.mediaAttached=o,this.interstitial.playoutLimit&&o.addEventListener("timeupdate",this.checkPlayout)})}bufferedInPlaceToEnd(e){var t;if(!this.interstitial.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e||!this._bufferedEosTime)return!1;const r=this.timelineOffset,n=qt.bufferInfo(e,r,0);return this.getAssetTime(n.end)>=this._bufferedEosTime-.02}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=qt.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;return e||0}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 r=e-t;if(Math.abs(r)>1/9e4){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,r=this.duration;return Math.min(Math.max(0,e-t),r)}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.destroy(),this.hls=this.interstitial=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){this.hls.attachMedia(e)}detachMedia(){this.removeMediaListeners(),this.mediaAttached=null,this.hls.detachMedia()}resumeBuffering(){this.hls.resumeBuffering()}pauseBuffering(){this.hls.pauseBuffering()}transferMedia(){return this.bufferSnapShot(),this.hls.transferMedia()}on(e,t,r){this.hls.on(e,t)}once(e,t,r){this.hls.once(e,t)}off(e,t,r){this.hls.off(e,t)}toString(){var e,t;return`HlsAssetPlayer: ${zs(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${(t=this.interstitial)!=null&&t.appendInPlace?"append-in-place":""}`}}const _a=.033;class Bu extends M{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((r,n)=>e<=n.startOffset&&t>n.startOffset?(delete n.error,r+1):r,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 r=-1;e.nextEvent?r=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(r=this.findEventIndex(e.previousEvent.identifier)+1);const n=this.items;if(n)for(n[r]||(t===void 0&&(t=e.start),r=this.findItemIndexAtTime(t));r>=0&&(s=n[r])!=null&&s.event;){var s;r--}return r}findItemIndexAtTime(e,t){const r=this.items;if(r)for(let n=0;n<r.length;n++){let s=r[n];if(t&&t!=="primary"&&(s=s[t]),e===s.start||e>s.start&&e<s.end)return n}return-1}findJumpRestrictedIndex(e,t){const r=this.items;if(r)for(let n=e;n<=t&&r[n];n++){const s=r[n].event;if(s!=null&&s.restrictions.jump&&!s.appendInPlace)return n}return-1}findEventIndex(e){const t=this.items;if(t)for(let n=t.length;n--;){var r;if(((r=t[n].event)==null?void 0:r.identifier)===e)return n}return-1}findAssetIndex(e,t){const r=e.assetList,n=r.length;if(n>1)for(let s=0;s<n;s++){const A=r[s];if(!A.error){const a=A.timelineStart;if(t===a||t>a&&t<a+(A.duration||0))return s}}return 0}get assetIdAtEnd(){var e,t;const r=(e=this.items)==null||(t=e[this.length-1])==null?void 0:t.event;if(r){const n=r.assetList,s=n[n.length-1];if(s)return s.identifier}return null}parseInterstitialDateRanges(e,t){const r=e.main.details,{dateRanges:n}=r,s=this.events,A=this.parseDateRanges(n,{url:r.url},t),a=Object.keys(n),l=s?s.filter(o=>!a.includes(o.identifier)):[];A.length&&A.sort((o,h)=>{const d=o.cue.pre,p=o.cue.post,v=h.cue.pre,b=h.cue.post;if(d&&!v)return-1;if(v&&!d||p&&!b)return 1;if(b&&!p)return-1;if(!d&&!v&&!p&&!b){const S=o.startTime,F=h.startTime;if(S!==F)return S-F}return o.dateRange.tagOrder-h.dateRange.tagOrder}),this.events=A,l.forEach(o=>{this.removeEvent(o)}),this.updateSchedule(e,l)}updateSchedule(e,t=[]){const r=this.events||[];if(r.length||t.length||this.length<2){const n=this.items,s=this.parseSchedule(r,e);(t.length||(n==null?void 0:n.length)!==s.length||s.some((a,l)=>Math.abs(a.playout.start-n[l].playout.start)>.005||Math.abs(a.playout.end-n[l].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,n))}}parseDateRanges(e,t,r){const n=[],s=Object.keys(e);for(let A=0;A<s.length;A++){const a=s[A],l=e[a];if(l.isInterstitial){let o=this.eventMap[a];o?o.setDateRange(l):(o=new Ro(l,t),this.eventMap[a]=o,r===!1&&(o.appendInPlace=r)),n.push(o)}}return n}parseSchedule(e,t){const r=[],n=t.main.details,s=n.live?1/0:n.edge;let A=0;if(e=e.filter(l=>!l.error&&!(l.cue.once&&l.hasPlayed)),e.length){this.resolveOffsets(e,t);let l=0,o=0;if(e.forEach((h,d)=>{const p=h.cue.pre,v=h.cue.post,b=e[d-1]||null,S=h.appendInPlace,F=v?s:h.startOffset,te=h.duration,fe=h.timelineOccupancy===FA.Range?te:0,oe=h.resumptionOffset,pe=(b==null?void 0:b.startTime)===F,Te=F+h.cumulativeDuration;let Ke=S?Te+te:F+oe;if(p||!v&&F<=0){const $e=o;o+=fe,h.timelineStart=Te;const st=A;A+=te,r.push({event:h,start:Te,end:Ke,playout:{start:st,end:A},integrated:{start:$e,end:o}})}else if(F<=s){if(!pe){const Pe=F-l;if(Pe>_a){const Bt=l,kt=o;o+=Pe;const Qr=A;A+=Pe;const cr={previousEvent:e[d-1]||null,nextEvent:h,start:Bt,end:Bt+Pe,playout:{start:Qr,end:A},integrated:{start:kt,end:o}};r.push(cr)}else Pe>0&&b&&(b.cumulativeDuration+=Pe,r[r.length-1].end=F)}v&&(Ke=Te),h.timelineStart=Te;const $e=o;o+=fe;const st=A;A+=te,r.push({event:h,start:Te,end:Ke,playout:{start:st,end:A},integrated:{start:$e,end:o}})}else return;const xe=h.resumeTime;v||xe>s?l=s:l=xe}),l<s){var a;const h=l,d=o,p=s-l;o+=p;const v=A;A+=p,r.push({previousEvent:((a=r[r.length-1])==null?void 0:a.event)||null,nextEvent:null,start:l,end:h+p,playout:{start:v,end:A},integrated:{start:d,end:o}})}this.setDurations(s,A,o)}else r.push({previousEvent:null,nextEvent:null,start:0,end:s,playout:{start:0,end:s},integrated:{start:0,end:s}}),this.setDurations(s,s,s);return r}setDurations(e,t,r){this.durations={primary:e,playout:t,integrated:r}}resolveOffsets(e,t){const r=t.main.details,n=r.live?1/0:r.edge;let s=0,A=-1;e.forEach((a,l)=>{const o=a.cue.pre,h=a.cue.post,d=o?0:h?n:a.startTime;this.updateAssetDurations(a),A===d?a.cumulativeDuration=s:(s=0,A=d),!h&&a.snapOptions.in&&(a.resumeAnchor=Tr(null,r.fragments,a.startOffset+a.resumptionOffset,0,0)||void 0),a.appendInPlace&&!a.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(a,t)||(a.appendInPlace=!1)),!a.appendInPlace&&l+1<e.length&&e[l+1].startTime-e[l].resumeTime<_a&&(e[l+1].appendInPlace=!1,e[l+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${a}`));const v=V(a.resumeOffset)?a.resumeOffset:a.duration;s+=v})}primaryCanResumeInPlaceAt(e,t){const r=e.resumeTime,n=e.startTime+e.resumptionOffset;return Math.abs(r-n)>vs?(this.log(`"${e.identifier}" resumption ${r} not aligned with estimated timeline end ${n}`),!1):t?!Object.keys(t).some(A=>{const a=t[A].details,l=a.edge;if(r>=l)return this.log(`"${e.identifier}" resumption ${r} past ${A} playlist end ${l}`),!1;const o=Tr(null,a.fragments,r);if(!o)return this.log(`"${e.identifier}" resumption ${r} does not align with any fragments in ${A} playlist (${a.fragStart}-${a.fragmentEnd})`),!0;const h=A==="audio"?.175:0;return Math.abs(o.start-r)<vs+h||Math.abs(o.end-r)<vs+h?!1:(this.log(`"${e.identifier}" resumption ${r} not aligned with ${A} fragment bounds (${o.start}-${o.end} sn: ${o.sn} cc: ${o.cc})`),!0)}):(this.log(`"${e.identifier}" resumption ${r} can not be aligned with media (none selected)`),!1)}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let r=0,n=!1,s=!1;e.assetList.forEach((A,a)=>{const l=t+r;A.startOffset=r,A.timelineStart=l,n||(n=A.duration===null),s||(s=!!A.error);const o=A.error?0:A.duration||0;r+=o}),n&&!s?e.duration=Math.max(r,e.duration):e.duration=r}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function Ci(i){return`[${i.event?'"'+i.event.identifier+'"':"primary"}: ${i.start.toFixed(2)}-${i.end.toFixed(2)}]`}class SA{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const r=e.assetListUrl;let n;try{n=ma(r,this.hls.sessionId,e.baseUrl)}catch(p){const v=this.assignAssetListError(e,W.ASSET_LIST_LOAD_ERROR,p,r);this.hls.trigger(m.ERROR,v);return}t&&n.protocol!=="data:"&&n.searchParams.set("_HLS_start_offset",""+t);const s=this.hls.config,A=s.loader,a=new A(s),l={responseType:"json",url:n.href},o=s.interstitialAssetListLoadPolicy.default,h={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(p,v,b,S)=>{const F=p.data,te=F==null?void 0:F.ASSETS;if(!Array.isArray(te)){const fe=this.assignAssetListError(e,W.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),b.url,v,S);this.hls.trigger(m.ERROR,fe);return}e.assetListResponse=F,this.hls.trigger(m.ASSET_LIST_LOADED,{event:e,assetListResponse:F,networkDetails:S})},onError:(p,v,b,S)=>{const F=this.assignAssetListError(e,W.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${p.code} ${p.text} (${v.url})`),v.url,S,b);this.hls.trigger(m.ERROR,F)},onTimeout:(p,v,b)=>{const S=this.assignAssetListError(e,W.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${v.url})`),v.url,p,b);this.hls.trigger(m.ERROR,S)}};return a.load(l,h,d),this.hls.trigger(m.ASSET_LIST_LOADING,{event:e}),a}assignAssetListError(e,t,r,n,s,A){return e.error=r,{type:he.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:n,error:r,networkDetails:A,stats:s}}}function Di(i,e,t){bi(i,e,t),i.addEventListener(e,t)}function bi(i,e,t){i.removeEventListener(e,t)}function Oo(i){i==null||i.play().catch(()=>{})}class Po extends M{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 r=this.currentTime;if(r===void 0||this.playbackDisabled)return;const n=r-this.timelinePos;if(Math.abs(n)<1/7056e5)return;const A=n<=-.01;this.timelinePos=r,this.bufferedPos=r;const a=this.playingItem;if(!a){this.checkBuffer();return}if(A&&this.schedule.resetErrorsInRange(r,r-n)&&this.updateSchedule(),this.checkBuffer(),A&&r<a.start||r>=a.end){var l;const p=this.schedule.findItemIndexAtTime(this.timelinePos);if(!this.isInterstitial(a)&&(l=this.media)!=null&&l.paused&&(this.shouldPlay=!1),!A){const v=this.findItemIndex(a);if(p>v){const b=this.schedule.findJumpRestrictedIndex(v+1,p);if(b>v){this.setSchedulePosition(b);return}}}this.setSchedulePosition(p);return}const o=this.playingAsset;if(!o){if(this.playingLastItem&&this.isInterstitial(a)){const p=a.event.assetList[0];p&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(r,p))}return}const h=o.timelineStart,d=o.duration||0;(A&&r<h||r>=h+d)&&this.setScheduleToAssetAtTime(r,o)},this.onTimeupdate=()=>{const r=this.currentTime;if(r===void 0||this.playbackDisabled)return;if(r>this.timelinePos)this.timelinePos=r,r>this.bufferedPos&&this.checkBuffer();else return;const n=this.playingItem;if(!n||this.playingLastItem)return;if(r>=n.end){this.timelinePos=n.end;const a=this.findItemIndex(n);this.setSchedulePosition(a+1)}const s=this.playingAsset;if(!s)return;const A=s.timelineStart+(s.duration||0);r>=A&&this.setScheduleToAssetAtTime(r,s)},this.onScheduleUpdate=(r,n)=>{const s=this.schedule,A=this.playingItem,a=s.events||[],l=s.items||[],o=s.durations,h=r.map(v=>v.identifier),d=!!(a.length||h.length);if(d&&this.log(`INTERSTITIALS_UPDATED (${a.length}): ${a}
Schedule: ${l.map(v=>Ci(v))}`),h.length&&this.log(`Removed events ${h}`),this.playerQueue.forEach(v=>{if(v.interstitial.appendInPlace){const b=v.assetItem.timelineStart,S=v.timelineOffset-b;if(S)try{v.timelineOffset=b}catch(F){Math.abs(S)>vs&&this.warn(`${F} ("${v.assetId}" ${v.timelineOffset}->${b})`)}}}),A){const v=this.updateItem(A,this.timelinePos);this.itemsMatch(A,v)&&(this.playingItem=v,this.waitingItem=this.endedItem=null)}else this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const p=this.bufferingItem;if(p){const v=this.updateItem(p,this.bufferedPos);this.itemsMatch(p,v)?this.bufferingItem=v:p.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(p.event,null))}if(r.forEach(v=>{v.assetList.forEach(b=>{this.clearAssetPlayer(b.identifier,null)})}),d||n){if(this.hls.trigger(m.INTERSTITIALS_UPDATED,{events:a.slice(0),schedule:l.slice(0),durations:o,removedIds:h}),this.isInterstitial(A)&&h.includes(A.event.identifier)){this.warn(`Interstitial "${A.event.identifier}" removed while playing`),this.primaryFallback(A.event);return}this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new SA(e),this.schedule=new Bu(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(m.MEDIA_ENDED,this.onMediaEnded,this),e.on(m.ERROR,this.onError,this),e.on(m.DESTROYING,this.onDestroying,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(m.MEDIA_ENDED,this.onMediaEnded,this),e.off(m.ERROR,this.onError,this),e.off(m.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.manager=null,this.hls=this.HlsPlayerClass=this.schedule=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){bi(e,"play",this.onPlay),bi(e,"pause",this.onPause),bi(e,"seeking",this.onSeeking),bi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const r=this.media=t.media;Di(r,"seeking",this.onSeeking),Di(r,"timeupdate",this.onTimeupdate),Di(r,"play",this.onPlay),Di(r,"pause",this.onPause)}onMediaAttached(e,t){const r=this.effectivePlayingItem,n=this.detachedData;if(this.detachedData=null,r===null)this.checkStart();else if(!n){this.clearScheduleState();const s=this.findItemIndex(r);this.setSchedulePosition(s)}}clearScheduleState(){this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const r=!!t.transferMedia,n=this.media;if(this.media=null,!r&&(n&&this.removeMediaListeners(n),this.detachedData)){const s=this.getBufferingPlayer();s&&(this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,s.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.manager){if(!this.hls)return null;const e=this,t=()=>e.bufferingItem||e.waitingItem,r=d=>d&&e.getAssetPlayer(d.identifier),n=(d,p,v,b,S)=>{if(d){let F=d[p].start;const te=d.event;if(te){if(p==="playout"||te.timelineOccupancy!==FA.Point){const fe=r(v);(fe==null?void 0:fe.interstitial)===te&&(F+=fe.assetItem.startOffset+fe[S])}}else{const fe=b==="bufferedPos"?A():e[b];F+=fe-d.start}return F}return 0},s=(d,p)=>{if(d!==0&&p!=="primary"&&e.schedule.length){var v;const b=e.schedule.findItemIndexAtTime(d),S=(v=e.schedule.items)==null?void 0:v[b];if(S){const F=S[p].start-S.start;return d+F}}return d},A=()=>{const d=e.bufferedPos;return d===Number.MAX_VALUE?a("primary"):Math.max(d,0)},a=d=>{var p;return(p=e.primaryDetails)!=null&&p.live?e.primaryDetails.edge:e.schedule.durations[d]},l=(d,p)=>{var v,b;const S=e.effectivePlayingItem;if(S!=null&&(v=S.event)!=null&&v.restrictions.skip)return;e.log(`seek to ${d} "${p}"`);const F=e.effectivePlayingItem,te=e.schedule.findItemIndexAtTime(d,p),fe=(b=e.schedule.items)==null?void 0:b[te],oe=e.getBufferingPlayer(),pe=oe==null?void 0:oe.interstitial,Te=pe==null?void 0:pe.appendInPlace,Ke=F&&e.itemsMatch(F,fe);if(F&&(Te||Ke)){const $e=r(e.playingAsset),st=($e==null?void 0:$e.media)||e.primaryMedia;if(st){const Pe=p==="primary"?st.currentTime:n(F,p,e.playingAsset,"timelinePos","currentTime"),Bt=d-Pe,kt=(Te?Pe:st.currentTime)+Bt;if(kt>=0&&(!$e||Te||kt<=$e.duration)){st.currentTime=kt;return}}}if(fe){let $e=d;if(p!=="primary"){const Pe=fe[p].start,Bt=d-Pe;$e=fe.start+Bt}const st=!e.isInterstitial(fe);if((!e.isInterstitial(F)||F.event.appendInPlace)&&(st||fe.event.appendInPlace)){const Pe=e.media||(Te?oe==null?void 0:oe.media:null);Pe&&(Pe.currentTime=$e)}else if(F){const Pe=e.findItemIndex(F);if(te>Pe){const kt=e.schedule.findJumpRestrictedIndex(Pe+1,te);if(kt>Pe){e.setSchedulePosition(kt);return}}let Bt=0;if(st)e.timelinePos=$e,e.checkBuffer();else{var xe;const kt=fe==null||(xe=fe.event)==null?void 0:xe.assetList;if(kt){const Qr=d-(fe[p]||fe).start;for(let cr=kt.length;cr--;){const nr=kt[cr];if(nr.duration&&Qr>=nr.startOffset&&Qr<nr.startOffset+nr.duration){Bt=cr;break}}}}e.setSchedulePosition(te,Bt)}}},o=()=>{const d=e.effectivePlayingItem;if(e.isInterstitial(d))return d;const p=t();return e.isInterstitial(p)?p:null},h={get currentTime(){const d=o(),p=e.effectivePlayingItem;return p&&p===d?n(p,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-p.playout.start:0},set currentTime(d){const p=o(),v=e.effectivePlayingItem;v&&v===p&&l(d+v.playout.start,"playout")},get duration(){const d=o();return d?d.playout.end-d.playout.start:0},get assetPlayers(){var d;const p=(d=o())==null?void 0:d.event.assetList;return p?p.map(v=>e.getAssetPlayer(v.identifier)):[]},get playingIndex(){var d;const p=(d=o())==null?void 0:d.event;return p&&e.effectivePlayingAsset?p.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return o()}};this.manager={get events(){var d,p;return((d=e.schedule)==null||(p=d.events)==null?void 0:p.slice(0))||[]},get schedule(){var d,p;return((d=e.schedule)==null||(p=d.items)==null?void 0:p.slice(0))||[]},get interstitialPlayer(){return o()?h:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const d=t();return e.findItemIndex(d)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const d=e.effectivePlayingItem;return e.findItemIndex(d)},primary:{get bufferedEnd(){return A()},get currentTime(){const d=e.timelinePos;return d>0?d:0},set currentTime(d){l(d,"primary")},get duration(){return a("primary")},get seekableStart(){var d;return((d=e.primaryDetails)==null?void 0:d.fragmentStart)||0}},integrated:{get bufferedEnd(){return n(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return n(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(d){l(d,"integrated")},get duration(){return a("integrated")},get seekableStart(){var d;return s(((d=e.primaryDetails)==null?void 0:d.fragmentStart)||0,"integrated")}},skip:()=>{const d=e.effectivePlayingItem,p=d==null?void 0:d.event;if(p&&!p.restrictions.skip){const v=e.findItemIndex(d);if(p.appendInPlace){const b=d.playout.start+d.event.duration;l(b+.001,"playout")}else e.advanceAfterAssetEnded(p,v,1/0)}}}}return this.manager}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,r=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!r?!1:this.findItemIndex(t)===r.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t,r;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let s=this.media;!s&&(e=this.bufferingItem)!=null&&(t=e.event)!=null&&t.appendInPlace&&(s=this.primaryMedia);const A=(r=s)==null?void 0:r.currentTime;if(!(A===void 0||!V(A)))return A}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 r=this.getAssetPlayer(e);r&&this.transferMediaFromPlayer(r,t)}transferMediaFromPlayer(e,t){const r=e.interstitial.appendInPlace,n=e.media;if(r&&n===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&n){this.detachedData={media:n};return}const s=e.transferMedia();this.log(`transfer MediaSource from ${e} ${br(s)}`),this.detachedData=s}else t&&n&&(this.shouldPlay||(this.shouldPlay=!n.paused))}transferMediaTo(e,t){var r,n;if(e.media===t)return;let s=null;const A=this.hls,a=e!==A,l=a&&e.interstitial.appendInPlace,o=(r=this.detachedData)==null?void 0:r.mediaSource;let h;if(A.media)l&&(s=A.transferMedia(),this.detachedData=s),h="Primary";else if(o){const v=this.getBufferingPlayer();v?(s=v.transferMedia(),h=`${v}`):h="detached MediaSource"}else h="detached media";if(!s){if(o)s=this.detachedData,this.log(`using detachedData: MediaSource ${br(s)}`);else if(!this.detachedData||A.media===t){const v=this.playerQueue;v.length>1&&v.forEach(b=>{if(a&&b.interstitial.appendInPlace!==l){const S=b.interstitial;this.clearInterstitial(b.interstitial,null),S.appendInPlace=!1,S.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${S}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const d=s&&"mediaSource"in s&&((n=s.mediaSource)==null?void 0:n.readyState)!=="closed",p=d&&s?s:t;if(this.log(`${d?"transfering MediaSource":"attaching media"} to ${a?e:"Primary"} from ${h}`),p===s){const v=a&&e.assetId===this.schedule.assetIdAtEnd;p.overrides={duration:this.schedule.duration,endOfStream:!a||v,cueRemoval:!a}}e.attachMedia(p)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const r=this.timelinePos,n=this.effectivePlayingItem;if(r===-1){const s=this.hls.startPosition;if(this.timelinePos=s,t.length&&t[0].cue.pre){const A=e.findEventIndex(t[0].identifier);this.setSchedulePosition(A)}else if(s>=0||!this.primaryLive){const A=this.timelinePos=s>0?s:0,a=e.findItemIndexAtTime(A);this.setSchedulePosition(a)}}else if(n&&!this.playingItem){const s=e.findItemIndex(n);this.setSchedulePosition(s)}}advanceAfterAssetEnded(e,t,r){const n=r+1;if(!e.isAssetPastPlayoutLimit(n)&&!e.assetList[n].error)this.setSchedulePosition(t,n);else{const s=this.schedule.items;if(s){const A=t+1,a=s.length;if(A>=a){this.setSchedulePosition(-1);return}const l=e.resumeTime;this.timelinePos<l&&(this.timelinePos=l,this.checkBuffer()),this.setSchedulePosition(A)}}}setScheduleToAssetAtTime(e,t){const r=this.schedule,n=t.parentIdentifier,s=r.getEvent(n);if(s){const A=r.findEventIndex(n),a=r.findAssetIndex(s,e);this.setSchedulePosition(A,a)}}setSchedulePosition(e,t){const r=this.schedule.items;if(!r||this.playbackDisabled)return;this.log(`setSchedulePosition ${e}, ${t}`);const n=e>=0?r[e]:null,s=this.playingItem,A=this.playingLastItem;if(this.isInterstitial(s)){var a;const o=s.event,h=this.playingAsset,d=h==null?void 0:h.identifier,p=d?this.getAssetPlayer(d):null;if(p&&d&&(!this.eventItemsMatch(s,n)||t!==void 0&&d!==((a=o.assetList)==null?void 0:a[t].identifier))){var l;const v=o.findAssetIndex(h);this.log(`INTERSTITIAL_ASSET_ENDED ${v+1}/${o.assetList.length} ${zs(h)}`),this.endedAsset=h,this.playingAsset=null,this.hls.trigger(m.INTERSTITIAL_ASSET_ENDED,{asset:h,assetListIndex:v,event:o,schedule:r.slice(0),scheduleIndex:e,player:p}),this.retreiveMediaSource(d,n),p.media&&!((l=this.detachedData)!=null&&l.mediaSource)&&p.detachMedia()}if(!this.eventItemsMatch(s,n)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${o} ${Ci(s)}`),o.hasPlayed=!0,this.hls.trigger(m.INTERSTITIAL_ENDED,{event:o,schedule:r.slice(0),scheduleIndex:e}),o.cue.once)){this.updateSchedule();const v=this.schedule.items;if(n&&v){const b=this.schedule.findItemIndex(n);this.advanceSchedule(b,v,t,s,A)}return}}this.advanceSchedule(e,r,t,s,A)}advanceSchedule(e,t,r,n,s){const A=e>=0?t[e]:null,a=this.primaryMedia,l=this.playerQueue;if(l.length&&l.forEach(o=>{const h=o.interstitial,d=this.schedule.findEventIndex(h.identifier);(d<e||d>e+1)&&this.clearInterstitial(h,A)}),this.isInterstitial(A)){this.timelinePos=Math.min(Math.max(this.timelinePos,A.start),A.end);const o=A.event;r===void 0&&(r=this.schedule.findAssetIndex(o,this.timelinePos));const h=this.waitingItem;this.assetsBuffered(A,a)||this.setBufferingItem(A);let d=this.preloadAssets(o,r);if(this.eventItemsMatch(A,h||n)||(this.waitingItem=A,this.log(`INTERSTITIAL_STARTED ${Ci(A)} ${o.appendInPlace?"append in place":""}`),this.hls.trigger(m.INTERSTITIAL_STARTED,{event:o,schedule:t.slice(0),scheduleIndex:e})),!o.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${o}`);return}if(o.assetListLoader&&(o.assetListLoader.destroy(),o.assetListLoader=void 0),!a){this.log(`Waiting for attachMedia to start Interstitial ${o}`);return}this.waitingItem=this.endedItem=null,this.playingItem=A;const p=o.assetList[r];if(!p){const v=t[e+1],b=this.media;v&&b&&!this.isInterstitial(v)&&b.currentTime<v.start&&(b.currentTime=this.timelinePos=v.start),this.advanceAfterAssetEnded(o,e,r||0);return}if(d||(d=this.getAssetPlayer(p.identifier)),d===null||d.destroyed){const v=o.assetList.length;this.warn(`asset ${r+1}/${v} player destroyed ${o}`),d=this.createAssetPlayer(o,p,r)}if(!this.eventItemsMatch(A,this.bufferingItem)&&o.appendInPlace&&this.isAssetBuffered(p))return;this.startAssetPlayer(d,r,t,e,a),this.shouldPlay&&Oo(d.media)}else A!==null?(this.resumePrimary(A,e,n),this.shouldPlay&&Oo(this.hls.media)):s&&this.isInterstitial(n)&&(this.endedItem=null,this.playingItem=n,n.event.appendInPlace||this.attachPrimary(this.schedule.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e,t;return(e=this.mediaSelection)==null||(t=e.main)==null?void 0:t.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,r){var n;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${Ci(e)}`),!((n=this.detachedData)!=null&&n.mediaSource)){let A=this.timelinePos;(A<e.start||A>=e.end)&&(A=this.getPrimaryResumption(e,t),this.timelinePos=A),this.attachPrimary(A,e)}if(!r)return;const s=this.schedule.items;s&&(this.log(`resumed ${Ci(e)}`),this.hls.trigger(m.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const r=e.start;if(this.primaryLive){const n=this.primaryDetails;if(t===0)return this.hls.startPosition;if(n&&(r<n.fragmentStart||r>n.edge))return this.hls.liveSyncPosition||-1}return r}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:qt.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,r){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const n=this.primaryMedia;if(!n)return;const s=this.hls;s.media?this.checkBuffer():(this.transferMediaTo(s,n),r&&this.startLoadingPrimaryAt(e,r)),r||(this.timelinePos=e,this.startLoadingPrimaryAt(e,r))}startLoadingPrimaryAt(e,t){var r;const n=this.hls;!n.loadingEnabled||!n.media||Math.abs((((r=n.mainForwardBufferInfo)==null?void 0:r.start)||n.media.currentTime)-e)>.5?n.startLoad(e,t):n.bufferingEnabled||n.resumeBuffering()}onManifestLoading(){this.stopLoad(),this.schedule.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(m.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(m.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1)return;const r=this.hls.levels[t.level],n=w(w({},this.mediaSelection||this.altSelection),{},{main:r});this.mediaSelection=n,this.schedule.parseInterstitialDateRanges(n,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const r=this.hls.audioTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=w(w({},this.altSelection),{},{audio:r});return}const s=w(w({},n),{},{audio:r});this.mediaSelection=s}onSubtitleTrackUpdated(e,t){const r=this.hls.subtitleTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=w(w({},this.altSelection),{},{subtitles:r});return}const s=w(w({},n),{},{subtitles:r});this.mediaSelection=s}onAudioTrackSwitching(e,t){const r=ke(t);this.playerQueue.forEach(n=>n.hls.setAudioOption(t)||n.hls.setAudioOption(r))}onSubtitleTrackSwitch(e,t){const r=ke(t);this.playerQueue.forEach(n=>n.hls.setSubtitleOption(t)||t.id!==-1&&n.hls.setSubtitleOption(r))}onBufferCodecs(e,t){const r=t.tracks;r&&(this.requiredTracks=r)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const r=this.playingItem;if(r&&!this.itemsMatch(r,this.bufferingItem)&&!this.isInterstitial(r)){const n=this.timelinePos;this.bufferedPos=n,this.checkBuffer()}}onBufferedToEnd(e){const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let n=0;n<t.length;n++){const s=t[n];if(s.cue.post){var r;const A=this.schedule.findEventIndex(s.identifier),a=(r=this.schedule.items)==null?void 0:r[A];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 r=this.findItemIndex(t);this.setSchedulePosition(r+1)}else this.shouldPlay=!1}updateItem(e,t){const r=this.schedule.items;if(e&&r){const n=this.findItemIndex(e,t);return r[n]||null}return null}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 r;return!!t&&(e===t||e.event.identifier===((r=t.event)==null?void 0:r.identifier))}findItemIndex(e,t){return e?this.schedule.findItemIndex(e,t):-1}updateSchedule(){const e=this.mediaSelection;e&&this.schedule.updateSchedule(e,[])}checkBuffer(e){const t=this.schedule.items;if(!t)return;const r=qt.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,t,e)}updateBufferedPos(e,t,r){const n=this.schedule,s=this.bufferingItem;if(this.bufferedPos>e)return;if(t.length===1&&this.itemsMatch(t[0],s)){this.bufferedPos=e;return}const A=this.playingItem,a=this.findItemIndex(A);let l=n.findItemIndexAtTime(e);if(this.bufferedPos<e){var o,h;const d=this.findItemIndex(s),p=Math.min(d+1,t.length-1),v=t[p];if((l===-1&&s&&e>=s.end||(o=v.event)!=null&&o.appendInPlace&&e+.01>=v.start)&&(l=p),p-a>1&&(s==null||(h=s.event)==null?void 0:h.appendInPlace)===!1)return;if(this.bufferedPos=e,l>d&&l>a)this.bufferedToItem(v);else{const b=this.primaryDetails;this.primaryLive&&b&&e>b.edge-b.targetduration&&v.start<b.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(v)&&this.preloadAssets(v.event,0)}}else r&&A&&!this.itemsMatch(A,s)&&(l===a?this.bufferedToItem(A):l===a+1&&this.bufferedToItem(t[l]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(n=>{const s=this.getAssetPlayer(n.identifier);return!(s!=null&&s.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,r=this.schedule;if(this.itemsMatch(e,t))this.bufferingItem!==e&&(this.bufferingItem=e);else{const{items:n,events:s}=r;if(!n||!s)return t;const A=this.isInterstitial(e),a=this.getBufferingPlayer();if(this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos)),!this.playbackDisabled){const l=a?a.remaining:t?t.end-this.timelinePos:0;this.log(`buffered to boundary ${Ci(e)}`+(t?` (${l.toFixed(2)} remaining)`:"")),A?e.event.assetList.forEach(o=>{const h=this.getAssetPlayer(o.identifier);h&&h.resumeBuffering()}):(this.hls.resumeBuffering(),this.playerQueue.forEach(o=>o.pauseBuffering()))}this.hls.trigger(m.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:s.slice(0),schedule:n.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}return t}bufferedToItem(e,t=0){const r=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(r!==null){this.bufferingAsset=null;const n=this.detachedData;n?n.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),r=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(r)}bufferedToEvent(e,t){const r=e.event,n=r.assetList.length===0&&!r.assetListLoader,s=r.cue.once;if(n||!s){const A=this.preloadAssets(r,t);if(A!=null&&A.interstitial.appendInPlace){const a=r.assetList[t],l=this.primaryMedia;a&&l&&this.bufferAssetPlayer(A,l)}}}preloadAssets(e,t){const r=e.assetUrl,n=e.assetList.length,s=n===0&&!e.assetListLoader,A=e.cue.once;if(s){const l=e.timelineStart;if(e.appendInPlace){var a;const p=this.playingItem;!this.isInterstitial(p)&&(p==null||(a=p.nextEvent)==null?void 0:a.identifier)===e.identifier&&this.flushFrontBuffer(l+.25)}let o,h=0;if(!this.playingItem&&this.primaryLive&&(h=this.hls.startPosition,h===-1&&(h=this.hls.liveSyncPosition||0)),h&&!(e.cue.pre||e.cue.post)){const p=h-l;p>0&&(o=Math.round(p*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${r?1:n} ${e}${o?` live-start: ${h} start-offset: ${o}`:""}`),r)return this.createAsset(e,0,0,l,e.duration,r);const d=this.assetListLoader.loadAssetList(e,o);d&&(e.assetListLoader=d)}else if(!A&&n){for(let l=t;l<n;l++){const o=e.assetList[l],h=this.getAssetPlayerQueueIndex(o.identifier);(h===-1||this.playerQueue[h].destroyed)&&!o.error&&this.createAssetPlayer(e,o,l)}return this.getAssetPlayer(e.assetList[t].identifier)}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(n=>{this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:n})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let r=0;r<t.length;r++)if(e===t[r].assetId)return r;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 r=0;r<e.length;r++)if(e[r].media===t)return e[r]}return null}createAsset(e,t,r,n,s,A){const a={parentIdentifier:e.identifier,identifier:vu(e,A,t),duration:s,startOffset:r,timelineStart:n,uri:A};return this.createAssetPlayer(e,a,t)}createAssetPlayer(e,t,r){this.log(`create HLSAssetPlayer for ${zs(t)}`);const n=this.hls,s=n.userConfig;let A=s.videoPreference;const a=n.loadLevelObj||n.levels[n.currentLevel];(A||a)&&(A=B({},A),a.videoCodec&&(A.videoCodec=a.videoCodec),a.videoRange&&(A.allowedVideoRanges=[a.videoRange]));const l=n.audioTracks[n.audioTrack],o=n.subtitleTracks[n.subtitleTrack];let h=0;if(this.primaryLive||e.appendInPlace){const oe=this.timelinePos-t.timelineStart;if(oe>1){const pe=t.duration;pe&&oe<pe&&(h=oe)}}const d=t.identifier,p=w(w({},s),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:n.sessionId,assetPlayerId:d,abrEwmaDefaultEstimate:n.bandwidthEstimate,interstitialsController:void 0,startPosition:h,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:A,audioPreference:l||s.audioPreference,subtitlePreference:o||s.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(p.timelineOffset=t.timelineStart));const v=p.cmcd;v!=null&&v.sessionId&&v.contentId&&(p.cmcd=B({},v,{contentId:Ws(t.uri)})),this.getAssetPlayer(d)&&this.warn(`Duplicate date range identifier ${e} and asset ${d}`);const b=new ko(this.HlsPlayerClass,p,e,t);this.playerQueue.push(b),e.assetList[r]=t;const S=oe=>{if(oe.live){const Ke=new Error(`Interstitials MUST be VOD assets ${e}`),xe={fatal:!0,type:he.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:Ke};this.handleAssetItemError(xe,e,this.schedule.findEventIndex(e.identifier),r,Ke.message);return}const pe=oe.edge-oe.fragmentStart,Te=t.duration;(Te===null||pe>Te)&&(this.log(`Interstitial asset "${d}" duration change ${Te} > ${pe}`),t.duration=pe,this.updateSchedule())};b.on(m.LEVEL_UPDATED,(oe,{details:pe})=>S(pe)),b.on(m.LEVEL_PTS_UPDATED,(oe,{details:pe})=>S(pe));const F=(oe,pe)=>{const Te=this.getAssetPlayer(d);if(Te&&pe.tracks){Te.off(m.BUFFER_CODECS,F),Te.tracks=pe.tracks;const Ke=this.primaryMedia;this.bufferingAsset===Te.assetItem&&Ke&&!Te.media&&this.bufferAssetPlayer(Te,Ke)}};b.on(m.BUFFER_CODECS,F);const te=()=>{var oe;const pe=this.getAssetPlayer(d);if(this.log(`buffered to end of asset ${pe}`),!pe)return;const Te=this.schedule.findEventIndex(e.identifier),Ke=e.findAssetIndex(t),xe=Ke+1,$e=(oe=this.schedule.items)==null?void 0:oe[Te];if(this.isInterstitial($e))if(Ke!==-1&&!e.isAssetPastPlayoutLimit(xe)&&!e.assetList[xe].error)this.bufferedToItem($e,xe);else{var st;const Pe=(st=this.schedule.items)==null?void 0:st[Te+1];Pe&&this.bufferedToItem(Pe)}};b.on(m.BUFFERED_TO_END,te);const fe=oe=>()=>{if(!this.getAssetPlayer(d))return;this.shouldPlay=!0;const Te=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Te,oe)};return b.once(m.MEDIA_ENDED,fe(r)),b.once(m.PLAYOUT_LIMIT_REACHED,fe(1/0)),b.on(m.ERROR,(oe,pe)=>{const Te=this.getAssetPlayer(d);if(pe.details===W.BUFFER_STALLED_ERROR){if(Te!=null&&Te.media){const Ke=Te.currentTime,xe=Te.duration-Ke;Ke&&e.appendInPlace&&xe/Te.media.playbackRate<.5?(this.log(`Advancing buffer past end of asset ${d} ${e} at ${Te.media.currentTime}`),te()):(this.warn(`Stalled at ${Ke} of ${Ke+xe} in asset ${d} ${e}`),this.onTimeupdate(),this.checkBuffer(!0))}return}this.handleAssetItemError(pe,e,this.schedule.findEventIndex(e.identifier),r,`Asset player error ${pe.error} ${e}`)}),b.on(m.DESTROYING,()=>{if(!this.getAssetPlayer(d))return;const pe=new Error(`Asset player destroyed unexpectedly ${d}`),Te={fatal:!0,type:he.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:pe};this.handleAssetItemError(Te,e,this.schedule.findEventIndex(e.identifier),r,pe.message)}),this.hls.trigger(m.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:r,event:e,player:b}),b}clearInterstitial(e,t){e.assetList.forEach(r=>{this.clearAssetPlayer(r.identifier,t)}),e.reset()}clearAssetPlayer(e,t){const r=this.getAssetPlayerQueueIndex(e);if(r!==-1){this.log(`clearAssetPlayer "${e}" toSegment: ${t&&Ci(t)}`);const n=this.playerQueue[r];this.transferMediaFromPlayer(n,t),this.playerQueue.splice(r,1),n.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,r,n,s){const{interstitial:A,assetItem:a,assetId:l}=e,o=A.assetList.length,h=this.playingAsset;this.endedAsset=null,this.playingAsset=a,(!h||h.identifier!==l)&&(h&&(this.clearAssetPlayer(h.identifier,r[n]),delete h.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${o} ${e}`),this.hls.trigger(m.INTERSTITIAL_ASSET_STARTED,{asset:a,assetListIndex:t,event:A,schedule:r.slice(0),scheduleIndex:n,player:e})),this.bufferAssetPlayer(e,s)}bufferAssetPlayer(e,t){var r,n;const{interstitial:s,assetItem:A,assetId:a}=e,l=this.schedule.findEventIndex(s.identifier),o=(r=this.schedule.items)==null?void 0:r[l];if(!o)return;this.setBufferingItem(o),this.bufferingAsset=A;const h=this.getBufferingPlayer();if(h===e)return;const d=s.appendInPlace;if(d&&(h==null?void 0:h.interstitial.appendInPlace)===!1)return;const p=(h==null?void 0:h.tracks)||((n=this.detachedData)==null?void 0:n.tracks)||this.requiredTracks;if(d&&A!==this.playingAsset){if(!e.tracks)return;if(p&&!le(p,e.tracks)){const v=new Error(`Asset "${a}" SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(p)}')`),b={fatal:!0,type:he.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:v},S=s.findAssetIndex(A);this.handleAssetItemError(b,s,l,S,v.message);return}}this.transferMediaTo(e,t)}handleAssetItemError(e,t,r,n,s){if(e.details===W.BUFFER_STALLED_ERROR)return;const A=t.assetList[n]||null;let a=null;if(A){const d=this.getAssetPlayerQueueIndex(A.identifier);a=this.playerQueue[d]||null}const l=this.schedule.items,o=B({},e,{fatal:!1,errorAction:Vt(!0),asset:A,assetListIndex:n,event:t,schedule:l,scheduleIndex:r,player:a});if(this.warn(`Asset item error: ${e.error}`),this.hls.trigger(m.INTERSTITIAL_ASSET_ERROR,o),!e.fatal)return;const h=new Error(s);A&&(this.playingAsset!==A&&this.clearAssetPlayer(A.identifier,null),A.error=h),t.assetList.some(d=>!d.error)?t.appendInPlace&&(t.error=h):t.error=h,this.primaryFallback(t)}primaryFallback(e){const t=e.timelineStart,r=this.effectivePlayingItem;if(this.updateSchedule(),r){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${r?Ci(r):"<none>"} error: ${e.error}`),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));let n=this.timelinePos;n===-1&&(n=this.hls.startPosition);const s=this.updateItem(r,n);if(this.itemsMatch(r,s))this.clearInterstitial(e,null);else{const A=this.schedule.findItemIndexAtTime(n);this.setSchedulePosition(A)}}else this.checkStart()}onAssetListLoaded(e,t){var r;const n=t.event,s=n.identifier,A=t.assetListResponse.ASSETS;if(!this.schedule.hasEvent(s))return;const a=n.timelineStart,l=n.duration;let o=0;A.forEach((b,S)=>{const F=parseFloat(b.DURATION);this.createAsset(n,S,o,a+o,F,b.URI),o+=F}),n.duration=o,this.log(`Loaded asset-list with duration: ${o} (was: ${l}) ${n}`);const h=this.waitingItem,d=(h==null?void 0:h.event.identifier)===s;this.updateSchedule();const p=(r=this.bufferingItem)==null?void 0:r.event;if(d){var v;const b=this.schedule.findEventIndex(s),S=(v=this.schedule.items)==null?void 0:v[b];if(S){if(!this.playingItem&&this.timelinePos>S.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==b){n.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${n}`),this.primaryFallback(n);return}this.setBufferingItem(S)}this.setSchedulePosition(b)}else if((p==null?void 0:p.identifier)===s&&p.appendInPlace){const b=n.assetList[0],S=this.getAssetPlayer(b.identifier),F=this.primaryMedia;b&&S&&F&&this.bufferAssetPlayer(S,F)}}onError(e,t){switch(t.details){case W.ASSET_LIST_PARSING_ERROR:case W.ASSET_LIST_LOAD_ERROR:case W.ASSET_LIST_LOAD_TIMEOUT:{const r=t.interstitial;r&&this.primaryFallback(r);break}case W.BUFFER_STALLED_ERROR:{this.onTimeupdate(),this.checkBuffer(!0);break}}}}const va=500;class yu extends Hn{constructor(e,t,r){super(e,t,r,"subtitle-stream-controller",O.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(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=ft.IDLE,this.setInterval(va),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:r,success:n}=t;if(Ae(r)&&(this.fragPrevious=r),this.state=ft.IDLE,!n)return;const s=this.tracksBuffered[this.currentTrackId];if(!s)return;let A;const a=r.start;for(let o=0;o<s.length;o++)if(a>=s[o].start&&a<=s[o].end){A=s[o];break}const l=r.start+r.duration;A?A.end=l:(A={start:a,end:l},s.push(A)),this.fragmentTracker.fragBuffered(r),this.fragBufferedComplete(r,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:r,endOffset:n}=t;if(r===0&&n!==Number.POSITIVE_INFINITY){const s=n-1;if(s<=0)return;t.endOffsetSubtitles=Math.max(0,s),this.tracksBuffered.forEach(A=>{for(let a=0;a<A.length;){if(A[a].end<=s){A.shift();continue}else if(A[a].start<s)A[a].start=s;else break;a++}}),this.fragmentTracker.removeFragmentsInRange(r,s,O.SUBTITLE)}}onError(e,t){const r=t.frag;(r==null?void 0:r.type)===O.SUBTITLE&&(t.details===W.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==ft.STOPPED&&(this.state=ft.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&fo(this.levels,t)){this.levels=t.map(r=>new Pr(r));return}this.tracksBuffered=[],this.levels=t.map(r=>{const n=new Pr(r);return this.tracksBuffered[n.id]=[],n}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,O.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var r;if(this.currentTrackId=t.id,!((r=this.levels)!=null&&r.length)||this.currentTrackId===-1){this.clearInterval();return}const n=this.levels[this.currentTrackId];n!=null&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.state!==ft.STOPPED&&this.setInterval(va)}onSubtitleTrackLoaded(e,t){var r;const{currentTrackId:n,levels:s}=this,{details:A,id:a}=t;if(!s){this.warn(`Subtitle tracks were reset while loading level ${a}`);return}const l=s[a];if(a>=s.length||!l)return;this.log(`Subtitle track ${a} loaded [${A.startSN},${A.endSN}]${A.lastPartSn?`[part-${A.lastPartSn}-${A.lastPartIndex}]`:""},duration:${A.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let o=0;if(A.live||(r=l.details)!=null&&r.live){const d=this.mainDetails;if(A.deltaUpdateFailed||!d)return;const p=d.fragments[0];if(!l.details)A.hasProgramDateTime&&d.hasProgramDateTime?(rn(A,d),o=A.fragmentStart):p&&(o=p.start,fs(A,o));else{var h;o=this.alignPlaylists(A,l.details,(h=this.levelLastLoaded)==null?void 0:h.details),o===0&&p&&(o=p.start,fs(A,o))}}l.details=A,this.levelLastLoaded=l,a===n&&(this.hls.trigger(m.SUBTITLE_TRACK_UPDATED,{details:A,id:a,groupId:t.groupId}),this.tick(),A.live&&!this.fragCurrent&&this.media&&this.state===ft.IDLE&&(Tr(null,A.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),l.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:r}=e,n=t.decryptdata,s=this.hls;if(!this.fragContextChanged(t)&&r&&r.byteLength>0&&n!=null&&n.key&&n.iv&&Mn(n.method)){const A=performance.now();this.decrypter.decrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer,zn(n.method)).catch(a=>{throw s.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_DECRYPT_ERROR,fatal:!1,error:a,reason:a.message,frag:t}),a}).then(a=>{const l=performance.now();s.trigger(m.FRAG_DECRYPTED,{frag:t,payload:a,stats:{tstart:A,tdecrypt:l}})}).catch(a=>{this.warn(`${a.name}: ${a.message}`),this.state=ft.IDLE})}}doTick(){if(!this.media){this.state=ft.IDLE;return}if(this.state===ft.IDLE){const{currentTrackId:e,levels:t}=this,r=t==null?void 0:t[e];if(!r||!t.length||!r.details||this.waitForLive(r))return;const{config:n}=this,s=this.getLoadPosition(),A=qt.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],s,n.maxBufferHole),{end:a,len:l}=A,o=r.details,h=this.hls.maxBufferLength+o.levelTargetDuration;if(l>h)return;const d=o.fragments,p=d.length,v=o.edge;let b=null;const S=this.fragPrevious;if(a<v){const fe=n.maxFragLookUpTolerance,oe=a>v-fe?0:fe;b=Tr(S,d,Math.max(d[0].start,a),oe),!b&&S&&S.start<d[0].start&&(b=d[0])}else b=d[p-1];if(b=this.filterReplacedPrimary(b,r.details),!b)return;const F=b.sn-o.startSN,te=d[F-1];if(te&&te.cc===b.cc&&this.fragmentTracker.getState(te)===Et.NOT_LOADED&&(b=te),this.fragmentTracker.getState(b)===Et.NOT_LOADED){const fe=this.mapToInitFragWhenRequired(b);fe&&this.loadFragment(fe,r,a)}}}loadFragment(e,t,r){Ae(e)?super.loadFragment(e,t,r):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new Eu(this.tracksBuffered[this.currentTrackId]||[])}}class Eu{constructor(e){this.buffered=void 0;const t=(r,n,s)=>{if(n=n>>>0,n>s-1)throw new DOMException(`Failed to execute '${r}' on 'TimeRanges': The index provided (${n}) is greater than the maximum bound (${s})`);return e[n][r]};this.buffered={get length(){return e.length},end(r){return t("end",r,e.length)},start(r){return t("start",r,e.length)}}}}const Bs={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},Ba=i=>String.fromCharCode(Bs[i]||i),fn=15,ti=100,ys={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Wi={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Zi={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Ys={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ri=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Mo{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const r=typeof t=="function"?t():t;ne.log(`${this.time} [${e}] ${r}`)}}}const zi=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e[r].toString(16));return t};class ya{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 r=0;r<t.length;r++){const n=t[r];e.hasOwnProperty(n)&&(this[n]=e[n])}}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 Ea{constructor(){this.uchar=" ",this.penState=new ya}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 js{constructor(e){this.chars=[],this.pos=0,this.currPenState=new ya,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<ti;t++)this.chars.push(new Ea);this.logger=e}equals(e){for(let t=0;t<ti;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ti;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ti;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>ti&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ti)}moveCursor(e){const t=this.pos+e;if(e>1)for(let r=this.pos+1;r<t+1;r++)this.chars[r].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=Ba(e);if(this.pos>=ti){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<ti;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 r=0;r<ti;r++){const n=this.chars[r].uchar;n!==" "&&(t=!1),e.push(n)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class TA{constructor(e){this.rows=[],this.currRow=fn-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<fn;t++)this.rows.push(new js(e));this.logger=e}reset(){for(let e=0;e<fn;e++)this.rows[e].clear();this.currRow=fn-1}equals(e){let t=!0;for(let r=0;r<fn;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}copy(e){for(let t=0;t<fn;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<fn;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 = "+br(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<fn;a++)this.rows[a].clear();const s=this.currRow+1-this.nrRollUpRows,A=this.lastOutputScreen;if(A){const a=A.rows[s].cueStartTime,l=this.logger.time;if(a!==null&&l!==null&&a<l)for(let o=0;o<this.nrRollUpRows;o++)this.rows[t-this.nrRollUpRows+o+1].copy(A.rows[s+o])}}this.currRow=t;const r=this.rows[this.currRow];if(e.indent!==null){const s=e.indent,A=Math.max(s-1,0);r.setCursor(e.indent),e.color=r.chars[A].penState.foreground}const n={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(n)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+br(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 r="",n=-1;for(let s=0;s<fn;s++){const A=this.rows[s].getTextString();A&&(n=s+1,e?t.push("Row "+n+": '"+A+"'"):t.push(A.trim()))}return t.length>0&&(e?r="["+t.join(" | ")+"]":r=t.join(`
`)),r}getTextAndFormat(){return this.rows}}class wa{constructor(e,t,r){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 TA(r),this.nonDisplayedMemory=new TA(r),this.lastOutputScreen=new TA(r),this.currRollUpRow=this.displayedMemory.rows[fn-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[fn-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 r=0;r<e.length;r++)this.writeScreen.insertChar(e[r]);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 r=Math.floor(e/2)-16,n=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=n[r]}this.logger.log(2,"MIDROW: "+br(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 Es{constructor(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Cu(),this.logger=void 0;const n=this.logger=new Mo;this.channels=[null,new wa(e,t,n),new wa(e+1,r,n)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let r=0;r<t.length;r+=2){const n=t[r]&127,s=t[r+1]&127;let A=!1,a=null;if(n===0&&s===0)continue;this.logger.log(3,()=>"["+zi([t[r],t[r+1]])+"] -> ("+zi([n,s])+")");const l=this.cmdHistory;if(n>=16&&n<=31){if(wu(n,s,l)){IA(null,null,l),this.logger.log(3,()=>"Repeated command ("+zi([n,s])+") is dropped");continue}IA(n,s,this.cmdHistory),A=this.parseCmd(n,s),A||(A=this.parseMidrow(n,s)),A||(A=this.parsePAC(n,s)),A||(A=this.parseBackgroundAttributes(n,s))}else IA(null,null,l);if(!A&&(a=this.parseChars(n,s),a)){const h=this.currentChannel;h&&h>0?this.channels[h].insertChars(a):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!A&&!a&&this.logger.log(2,()=>"Couldn't parse cleaned data "+zi([n,s])+" orig: "+zi([t[r],t[r+1]]))}}parseCmd(e,t){const r=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=33&&t<=35;if(!(r||n))return!1;const s=e===20||e===21||e===23?1:2,A=this.channels[s];return e===20||e===21||e===28||e===29?t===32?A.ccRCL():t===33?A.ccBS():t===34?A.ccAOF():t===35?A.ccAON():t===36?A.ccDER():t===37?A.ccRU(2):t===38?A.ccRU(3):t===39?A.ccRU(4):t===40?A.ccFON():t===41?A.ccRDC():t===42?A.ccTR():t===43?A.ccRTD():t===44?A.ccEDM():t===45?A.ccCR():t===46?A.ccENM():t===47&&A.ccEOC():A.ccTO(t-32),this.currentChannel=s,!0}parseMidrow(e,t){let r=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?r=1:r=2,r!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const n=this.channels[r];return n?(n.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+zi([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let r;const n=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,s=(e===16||e===24)&&t>=64&&t<=95;if(!(n||s))return!1;const A=e<=23?1:2;t>=64&&t<=95?r=A===1?ys[e]:Zi[e]:r=A===1?Wi[e]:Ys[e];const a=this.channels[A];return a?(a.setPAC(this.interpretPAC(r,t)),this.currentChannel=A,!0):!1}interpretPAC(e,t){let r;const n={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?r=t-96:r=t-64,n.underline=(r&1)===1,r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=Math.floor((r-16)/2)*4,n}parseChars(e,t){let r,n=null,s=null;if(e>=25?(r=2,s=e-8):(r=1,s=e),s>=17&&s<=19){let A;s===17?A=t+80:s===18?A=t+112:A=t+144,this.logger.log(2,()=>"Special char '"+Ba(A)+"' in channel "+r),n=[A]}else e>=32&&e<=127&&(n=t===0?[e]:[e,t]);return n&&this.logger.log(3,()=>"Char codes = "+zi(n).join(",")),n}parseBackgroundAttributes(e,t){const r=(e===16||e===24)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=45&&t<=47;if(!(r||n))return!1;let s;const A={};e===16||e===24?(s=Math.floor((t-32)/2),A.background=Ri[s],t%2===1&&(A.background=A.background+"_semi")):t===45?A.background="transparent":(A.foreground="black",t===47&&(A.underline=!0));const a=e<=23?1:2;return this.channels[a].setBkgData(A),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}IA(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const r=this.channels[t];r&&r.cueSplitAtTime(e)}}}function IA(i,e,t){t.a=i,t.b=e}function wu(i,e,t){return t.a===i&&t.b===e}function Cu(){return{a:null,b:null}}var Ca=function(){if(yn!=null&&yn.VTTCue)return self.VTTCue;const i=["","lr","rl"],e=["start","middle","end","left","right"];function t(a,l){if(typeof l!="string"||!Array.isArray(a))return!1;const o=l.toLowerCase();return~a.indexOf(o)?o:!1}function r(a){return t(i,a)}function n(a){return t(e,a)}function s(a,...l){let o=1;for(;o<arguments.length;o++){const h=arguments[o];for(const d in h)a[d]=h[d]}return a}function A(a,l,o){const h=this,d={enumerable:!0};h.hasBeenReset=!1;let p="",v=!1,b=a,S=l,F=o,te=null,fe="",oe=!0,pe="auto",Te="start",Ke=50,xe="middle",$e=50,st="middle";Object.defineProperty(h,"id",s({},d,{get:function(){return p},set:function(Pe){p=""+Pe}})),Object.defineProperty(h,"pauseOnExit",s({},d,{get:function(){return v},set:function(Pe){v=!!Pe}})),Object.defineProperty(h,"startTime",s({},d,{get:function(){return b},set:function(Pe){if(typeof Pe!="number")throw new TypeError("Start time must be set to a number.");b=Pe,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",s({},d,{get:function(){return S},set:function(Pe){if(typeof Pe!="number")throw new TypeError("End time must be set to a number.");S=Pe,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",s({},d,{get:function(){return F},set:function(Pe){F=""+Pe,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",s({},d,{get:function(){return te},set:function(Pe){te=Pe,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",s({},d,{get:function(){return fe},set:function(Pe){const Bt=r(Pe);if(Bt===!1)throw new SyntaxError("An invalid or illegal string was specified.");fe=Bt,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",s({},d,{get:function(){return oe},set:function(Pe){oe=!!Pe,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",s({},d,{get:function(){return pe},set:function(Pe){if(typeof Pe!="number"&&Pe!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");pe=Pe,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",s({},d,{get:function(){return Te},set:function(Pe){const Bt=n(Pe);if(!Bt)throw new SyntaxError("An invalid or illegal string was specified.");Te=Bt,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",s({},d,{get:function(){return Ke},set:function(Pe){if(Pe<0||Pe>100)throw new Error("Position must be between 0 and 100.");Ke=Pe,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",s({},d,{get:function(){return xe},set:function(Pe){const Bt=n(Pe);if(!Bt)throw new SyntaxError("An invalid or illegal string was specified.");xe=Bt,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",s({},d,{get:function(){return $e},set:function(Pe){if(Pe<0||Pe>100)throw new Error("Size must be between 0 and 100.");$e=Pe,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",s({},d,{get:function(){return st},set:function(Pe){const Bt=n(Pe);if(!Bt)throw new SyntaxError("An invalid or illegal string was specified.");st=Bt,this.hasBeenReset=!0}})),h.displayState=void 0}return A.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},A}();class bu{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function DA(i){function e(r,n,s,A){return(r|0)*3600+(n|0)*60+(s|0)+parseFloat(A||0)}const t=i.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 xu{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,r){for(let n=0;n<r.length;++n)if(t===r[n]){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 r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1}}function No(i,e,t,r){const n=r?i.split(r):[i];for(const s in n){if(typeof n[s]!="string")continue;const A=n[s].split(t);if(A.length!==2)continue;const a=A[0],l=A[1];e(a,l)}}const ba=new Ca(0,0,""),LA=ba.align==="middle"?"middle":"center";function Fu(i,e,t){const r=i;function n(){const a=DA(i);if(a===null)throw new Error("Malformed timestamp: "+r);return i=i.replace(/^[^\sa-zA-Z-]+/,""),a}function s(a,l){const o=new xu;No(a,function(p,v){let b;switch(p){case"region":for(let S=t.length-1;S>=0;S--)if(t[S].id===v){o.set(p,t[S].region);break}break;case"vertical":o.alt(p,v,["rl","lr"]);break;case"line":b=v.split(","),o.integer(p,b[0]),o.percent(p,b[0])&&o.set("snapToLines",!1),o.alt(p,b[0],["auto"]),b.length===2&&o.alt("lineAlign",b[1],["start",LA,"end"]);break;case"position":b=v.split(","),o.percent(p,b[0]),b.length===2&&o.alt("positionAlign",b[1],["start",LA,"end","line-left","line-right","auto"]);break;case"size":o.percent(p,v);break;case"align":o.alt(p,v,["start",LA,"end","left","right"]);break}},/:/,/\s/),l.region=o.get("region",null),l.vertical=o.get("vertical","");let h=o.get("line","auto");h==="auto"&&ba.line===-1&&(h=-1),l.line=h,l.lineAlign=o.get("lineAlign","start"),l.snapToLines=o.get("snapToLines",!0),l.size=o.get("size",100),l.align=o.get("align",LA);let d=o.get("position","auto");d==="auto"&&ba.position===50&&(d=l.align==="start"||l.align==="left"?0:l.align==="end"||l.align==="right"?100:50),l.position=d}function A(){i=i.replace(/^\s+/,"")}if(A(),e.startTime=n(),A(),i.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+r);i=i.slice(3),A(),e.endTime=n(),A(),s(i,e)}function UA(i){return i.replace(/<br(?: \/)?>/gi,`
`)}class xa{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new bu,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 r(){let s=t.buffer,A=0;for(s=UA(s);A<s.length&&s[A]!=="\r"&&s[A]!==`
`;)++A;const a=s.slice(0,A);return s[A]==="\r"&&++A,s[A]===`
`&&++A,t.buffer=s.slice(A),a}function n(s){No(s,function(A,a){},/:/)}try{let s="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;s=r();const a=s.match(/^()?WEBVTT([ \t].*)?$/);if(!(a!=null&&a[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let A=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(A?A=!1:s=r(),t.state){case"HEADER":/:/.test(s)?n(s):s||(t.state="ID");continue;case"NOTE":s||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){t.state="NOTE";break}if(!s)continue;if(t.cue=new Ca(0,0,""),t.state="CUE",s.indexOf("-->")===-1){t.cue.id=s;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Fu(s,t.cue,t.regionList)}catch(a){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const a=s.indexOf("-->")!==-1;if(!s||a&&(A=!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+=s}continue;case"BADCUE":s||(t.state="ID")}}}catch(s){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 Ho=/\r\n|\n\r|\n|\r/g,Fa=function(e,t,r=0){return e.slice(r,r+t.length)===t},Su=function(e){let t=parseInt(e.slice(-3));const r=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),s=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!V(t)||!V(r)||!V(n)||!V(s))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*r,t+=60*1e3*n,t+=60*60*1e3*s,t};function RA(i,e,t){return Ws(i.toString())+Ws(e.toString())+Ws(t)}const Tu=function(e,t,r){let n=e[t],s=e[n.prevCC];if(!s||!s.new&&n.new){e.ccOffset=e.presentationOffset=n.start,n.new=!1;return}for(;(A=s)!=null&&A.new;){var A;e.ccOffset+=n.start-s.start,n.new=!1,n=s,s=e[n.prevCC]}e.presentationOffset=r};function Iu(i,e,t,r,n,s,A){const a=new xa,l=Me(new Uint8Array(i)).trim().replace(Ho,`
`).split(`
`),o=[],h=e?Ml(e.baseTime,e.timescale):0;let d="00:00.000",p=0,v=0,b,S=!0;a.oncue=function(F){const te=t[r];let fe=t.ccOffset;const oe=(p-h)/9e4;if(te!=null&&te.new&&(v!==void 0?fe=t.ccOffset=te.start:Tu(t,r,oe)),oe){if(!e){b=new Error("Missing initPTS for VTT MPEGTS");return}fe=oe-t.presentationOffset}const pe=F.endTime-F.startTime,Te=ni((F.startTime+fe-v)*9e4,n*9e4)/9e4;F.startTime=Math.max(Te,0),F.endTime=Math.max(Te+pe,0);const Ke=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(Ke)),F.id||(F.id=RA(F.startTime,F.endTime,Ke)),F.endTime>0&&o.push(F)},a.onparsingerror=function(F){b=F},a.onflush=function(){if(b){A(b);return}s(o)},l.forEach(F=>{if(S)if(Fa(F,"X-TIMESTAMP-MAP=")){S=!1,F.slice(16).split(",").forEach(te=>{Fa(te,"LOCAL:")?d=te.slice(6):Fa(te,"MPEGTS:")&&(p=parseInt(te.slice(7)))});try{v=Su(d)/1e3}catch(te){b=te}return}else F===""&&(S=!1);a.parse(F+`
`)}),a.flush()}const Sa="stpp.ttml.im1t",Ko=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,$o=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Ta={left:"start",center:"center",right:"end",start:"start",end:"end"};function Go(i,e,t,r){const n=g(new Uint8Array(i),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const s=n.map(a=>Me(a)),A=so(e.baseTime,1,e.timescale);try{s.forEach(a=>t(Ia(a,A)))}catch(a){r(a)}}function Ia(i,e){const n=new DOMParser().parseFromString(i,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const s={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},A=Object.keys(s).reduce((d,p)=>(d[p]=n.getAttribute(`ttp:${p}`)||s[p],d),{}),a=n.getAttribute("xml:space")!=="preserve",l=er(Da(n,"styling","style")),o=er(Da(n,"layout","region")),h=Da(n,"body","[begin]");return[].map.call(h,d=>{const p=as(d,a);if(!p||!d.hasAttribute("begin"))return null;const v=cn(d.getAttribute("begin"),A),b=cn(d.getAttribute("dur"),A);let S=cn(d.getAttribute("end"),A);if(v===null)throw Vo(d);if(S===null){if(b===null)throw Vo(d);S=v+b}const F=new Ca(v-e,S-e,p);F.id=RA(F.startTime,F.endTime,F.text);const te=o[d.getAttribute("region")],fe=l[d.getAttribute("style")],oe=QA(te,fe,l),{textAlign:pe}=oe;if(pe){const Te=Ta[pe];Te&&(F.lineAlign=Te),F.align=pe}return B(F,oe),F}).filter(d=>d!==null)}function Da(i,e,t){const r=i.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(t)):[]}function er(i){return i.reduce((e,t)=>{const r=t.getAttribute("xml:id");return r&&(e[r]=t),e},{})}function as(i,e){return[].slice.call(i.childNodes).reduce((t,r,n)=>{var s;return r.nodeName==="br"&&n?t+`
`:(s=r.childNodes)!=null&&s.length?as(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent},"")}function QA(i,e,t){const r="http://www.w3.org/ns/ttml#styling";let n=null;const s=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],A=i!=null&&i.hasAttribute("style")?i.getAttribute("style"):null;return A&&t.hasOwnProperty(A)&&(n=t[A]),s.reduce((a,l)=>{const o=ii(e,r,l)||ii(i,r,l)||ii(n,r,l);return o&&(a[l]=o),a},{})}function ii(i,e,t){return i&&i.hasAttributeNS(e,t)?i.getAttributeNS(e,t):null}function Vo(i){return new Error(`Could not parse ttml timestamp ${i}`)}function cn(i,e){if(!i)return null;let t=DA(i);return t===null&&(Ko.test(i)?t=In(i,e):$o.test(i)&&(t=kA(i,e))),t}function In(i,e){const t=Ko.exec(i),r=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+r/e.frameRate}function kA(i,e){const t=$o.exec(i),r=Number(t[1]);switch(t[2]){case"h":return r*3600;case"m":return r*60;case"ms":return r*1e3;case"f":return r/e.frameRate;case"t":return r/e.tickRate}return r}class OA{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,r){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class PA{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=Zo(),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(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new OA(this,"textTrack1"),t=new OA(this,"textTrack2"),r=new OA(this,"textTrack3"),n=new OA(this,"textTrack4");this.cea608Parser1=new Es(1,e,t),this.cea608Parser2=new Es(3,r,n)}addCues(e,t,r,n,s){let A=!1;for(let a=s.length;a--;){const l=s[a],o=Du(l[0],l[1],t,r);if(o>=0&&(l[0]=Math.min(l[0],t),l[1]=Math.max(l[1],r),A=!0,o/(r-t)>.5))return}if(A||s.push([t,r]),this.config.renderTextTracksNatively){const a=this.captionsTracks[e];this.Cues.newCue(a,t,r,n)}else{const a=this.Cues.newCue(null,t,r,n);this.hls.trigger(m.CUES_PARSED,{type:"captions",cues:a,track:e})}}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:s}){const{unparsedVttFrags:A}=this;r===O.MAIN&&(this.initPTS[t.cc]={baseTime:n,timescale:s}),A.length&&(this.unparsedVttFrags=[],A.forEach(a=>{this.onFragLoaded(m.FRAG_LOADED,a)}))}getExistingTrack(e,t){const{media:r}=this;if(r)for(let n=0;n<r.textTracks.length;n++){const s=r.textTracks[n];if(Xs(s,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return s}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:r,media:n}=this,{label:s,languageCode:A}=t[e],a=this.getExistingTrack(s,A);if(a)r[e]=a,ps(r[e]),da(r[e],n);else{const l=this.createTextTrack("captions",s,A);l&&(l[e]=!0,r[e]=l)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const r=t.label,n={_id:e,label:r,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}createTextTrack(e,t,r){const n=this.media;if(n)return n.addTextTrack(e,t,r)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const r=!!t.transferMedia;if(this.media=null,r)return;const{captionsTracks:n}=this;Object.keys(n).forEach(s=>{ps(n[s]),delete n[s]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Zo(),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 r=0;r<t.length;r++)ps(t[r])}onSubtitleTracksUpdated(e,t){const r=t.subtitleTracks||[],n=r.some(s=>s.textCodec===Sa);if(this.config.enableWebVTT||n&&this.config.enableIMSC1){if(fo(this.tracks,r)){this.tracks=r;return}if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){const A=this.media,a=A?_s(A.textTracks):null;if(this.tracks.forEach((l,o)=>{let h;if(a){let d=null;for(let p=0;p<a.length;p++)if(a[p]&&Xs(a[p],l)){d=a[p],a[p]=null;break}d&&(h=d)}if(h)ps(h);else{const d=Wo(l);h=this.createTextTrack(d,l.name,l.lang),h&&(h.mode="disabled")}h&&this.textTracks.push(h)}),a!=null&&a.length){const l=a.filter(o=>o!==null).map(o=>o.label);l.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${l.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const A=this.tracks.map(a=>({label:a.name,kind:a.type.toLowerCase(),default:a.default,subtitleTrack:a}));this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:A})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(r=>{const n=/(?:CC|SERVICE)([1-4])/.exec(r.instreamId);if(!n)return;const s=`textTrack${n[1]}`,A=this.captionsProperties[s];A&&(A.label=r.name,r.lang&&(A.languageCode=r.lang),A.media=r)})}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===O.MAIN){var r,n;const{cea608Parser1:s,cea608Parser2:A,lastSn:a}=this,{cc:l,sn:o}=t.frag,h=(r=(n=t.part)==null?void 0:n.index)!=null?r:-1;s&&A&&(o!==a+1||o===a&&h!==this.lastPartIndex+1||l!==this.lastCc)&&(s.reset(),A.reset()),this.lastCc=l,this.lastSn=o,this.lastPartIndex=h}}onFragLoaded(e,t){const{frag:r,payload:n}=t;if(r.type===O.SUBTITLE)if(n.byteLength){const s=r.decryptdata,A="stats"in t;if(s==null||!s.encrypted||A){const a=this.tracks[r.level],l=this.vttCCs;l[r.cc]||(l[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),a&&a.textCodec===Sa?this._parseIMSC1(r,n):this._parseVTTs(t)}}else this.hls.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const r=this.hls;Go(t,this.initPTS[e.cc],n=>{this._appendCues(n,e.level),r.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},n=>{r.logger.log(`Failed to parse IMSC1: ${n}`),r.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})})}_parseVTTs(e){var t;const{frag:r,payload:n}=e,{initPTS:s,unparsedVttFrags:A}=this,a=s.length-1;if(!s[r.cc]&&a===-1){A.push(e);return}const l=this.hls,o=(t=r.initSegment)!=null&&t.data?Ne(r.initSegment.data,new Uint8Array(n)).buffer:n;Iu(o,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,h=>{this._appendCues(h,r.level),l.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},h=>{const d=h.message==="Missing initPTS for VTT MPEGTS";d?A.push(e):this._fallbackToIMSC1(r,n),l.logger.log(`Failed to parse VTT cue: ${h}`),!(d&&a>r.cc)&&l.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:h})})}_fallbackToIMSC1(e,t){const r=this.tracks[e.level];r.textCodec||Go(t,this.initPTS[e.cc],()=>{r.textCodec=Sa,this._parseIMSC1(e,t)},()=>{r.textCodec="wvtt"})}_appendCues(e,t){const r=this.hls;if(this.config.renderTextTracksNatively){const n=this.textTracks[t];if(!n||n.mode==="disabled")return;e.forEach(s=>ga(n,s))}else{const n=this.tracks[t];if(!n)return;const s=n.default?"default":"subtitles"+t;r.trigger(m.CUES_PARSED,{type:"subtitles",cues:e,track:s})}}onFragDecrypted(e,t){const{frag:r}=t;r.type===O.SUBTITLE&&this.onFragLoaded(m.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:r,samples:n}=t;if(!(r.type===O.MAIN&&this.closedCaptionsForLevel(r)==="NONE"))for(let s=0;s<n.length;s++){const A=n[s].bytes;if(A){this.cea608Parser1||this.initCea608Parsers();const a=this.extractCea608Data(A);this.cea608Parser1.addData(n[s].pts,a[0]),this.cea608Parser2.addData(n[s].pts,a[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:r,endOffsetSubtitles:n,type:s}){const{media:A}=this;if(!(!A||A.currentTime<r)){if(!s||s==="video"){const{captionsTracks:a}=this;Object.keys(a).forEach(l=>pa(a[l],t,r))}if(this.config.renderTextTracksNatively&&t===0&&n!==void 0){const{textTracks:a}=this;Object.keys(a).forEach(l=>pa(a[l],t,n))}}}extractCea608Data(e){const t=[[],[]],r=e[0]&31;let n=2;for(let s=0;s<r;s++){const A=e[n++],a=127&e[n++],l=127&e[n++];if(a===0&&l===0)continue;if((4&A)!==0){const h=3&A;(h===0||h===1)&&(t[h].push(a),t[h].push(l))}}return t}}function Wo(i){return i.characteristics&&/transcribes-spoken-dialog/gi.test(i.characteristics)&&/describes-music-and-sound/gi.test(i.characteristics)?"captions":"subtitles"}function Xs(i,e){return!!i&&i.kind===Wo(e)&&sa(e,i)}function Du(i,e,t,r){return Math.min(e,r)-Math.max(i,t)}function Zo(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const zo=/\s/,Lu={newCue(i,e,t,r){const n=[];let s,A,a,l,o;const h=self.VTTCue||self.TextTrackCue;for(let p=0;p<r.rows.length;p++)if(s=r.rows[p],a=!0,l=0,o="",!s.isEmpty()){var d;for(let S=0;S<s.chars.length;S++)zo.test(s.chars[S].uchar)&&a?l++:(o+=s.chars[S].uchar,a=!1);s.cueStartTime=e,e===t&&(t+=1e-4),l>=16?l--:l++;const v=UA(o.trim()),b=RA(e,t,v);i!=null&&(d=i.cues)!=null&&d.getCueById(b)||(A=new h(e,t,v),A.id=b,A.line=p+1,A.align="left",A.position=10+Math.min(80,Math.floor(l*8/32)*10),n.push(A))}return i&&n.length&&(n.sort((p,v)=>p.line==="auto"||v.line==="auto"?0:p.line>8&&v.line>8?v.line-p.line:p.line-v.line),n.forEach(p=>ga(i,p))),n}};function Yo(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(i){}return!1}const Uu=/(\d+)-(\d+)\/(\d+)/;class La{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||Ru,this.controller=new self.AbortController,this.stats=new E}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,r){const n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();const s=jo(e,this.controller.signal),A=e.responseType==="arraybuffer",a=A?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:o}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,s),self.clearTimeout(this.requestTimeout),t.timeout=l&&V(l)?l:o,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},t.timeout),(Ms(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(d=>{var p;this.response=this.loader=d;const v=Math.max(self.performance.now(),n.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=o,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},o-(v-n.loading.start)),!d.ok){const{status:S,statusText:F}=d;throw new Jo(F||"fetch, bad network response",S,d)}n.loading.first=v,n.total=Xo(d.headers)||n.total;const b=(p=this.callbacks)==null?void 0:p.onProgress;return b&&V(t.highWaterMark)?this.loadProgressively(d,n,e,t.highWaterMark,b):A?d.arrayBuffer():e.responseType==="json"?d.json():d.text()}).then(d=>{var p,v;const b=this.response;if(!b)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);const S=d[a];S&&(n.loaded=n.total=S);const F={url:b.url,data:d,code:b.status},te=(p=this.callbacks)==null?void 0:p.onProgress;te&&!V(t.highWaterMark)&&te(n,e,d,b),(v=this.callbacks)==null||v.onSuccess(F,n,e,b)}).catch(d=>{var p;if(self.clearTimeout(this.requestTimeout),n.aborted)return;const v=d&&d.code||0,b=d?d.message:null;(p=this.callbacks)==null||p.onError({code:v,text:b},e,d?d.details:null,n)})}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,r,n=0,s){const A=new qi,a=e.body.getReader(),l=()=>a.read().then(o=>{if(o.done)return A.dataLength&&s(t,r,A.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const h=o.value,d=h.length;return t.loaded+=d,d<n||A.dataLength?(A.push(h),A.dataLength>=n&&s(t,r,A.flush().buffer,e)):s(t,r,h.buffer,e),l()}).catch(()=>Promise.reject());return l()}}function jo(i,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(B({},i.headers))};return i.rangeEnd&&t.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),t}function Ua(i){const e=Uu.exec(i);if(e)return parseInt(e[2])-parseInt(e[1])+1}function Xo(i){const e=i.get("Content-Range");if(e){const r=Ua(e);if(V(r))return r}const t=i.get("Content-Length");if(t)return parseInt(t)}function Ru(i,e){return new self.Request(i.url,e)}class Jo extends Error{constructor(e,t,r){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=r}}const Qu=/^age:\s*[\d.]+\s*$/im;class qo{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 E,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,r){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=r,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const r=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0,n.aborted=!1;const s=this.xhrSetup;s?Promise.resolve().then(()=>{if(!(this.loader!==r||this.stats.aborted))return s(r,t.url)}).catch(A=>{if(!(this.loader!==r||this.stats.aborted))return r.open("GET",t.url,!0),s(r,t.url)}).then(()=>{this.loader!==r||this.stats.aborted||this.openAndSendXhr(r,t,e)}).catch(A=>{var a;(a=this.callbacks)==null||a.onError({code:r.status,text:A.message},t,r,n)}):this.openAndSendXhr(r,t,e)}openAndSendXhr(e,t,r){e.readyState||e.open("GET",t.url,!0);const n=t.headers,{maxTimeToFirstByteMs:s,maxLoadTimeMs:A}=r.loadPolicy;if(n)for(const a in n)e.setRequestHeader(a,n[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),r.timeout=s&&V(s)?s:A,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:r}=this;if(!e||!t)return;const n=t.readyState,s=this.config;if(!r.aborted&&n>=2&&(r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start),s.timeout!==s.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),s.timeout=s.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.loadPolicy.maxLoadTimeMs-(r.loading.first-r.loading.start)))),n===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const o=t.status,h=t.responseType==="text"?t.responseText:null;if(o>=200&&o<300){const b=h!=null?h:t.response;if(b!=null){var A,a;r.loading.end=Math.max(self.performance.now(),r.loading.first);const S=t.responseType==="arraybuffer"?b.byteLength:b.length;r.loaded=r.total=S,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first);const F=(A=this.callbacks)==null?void 0:A.onProgress;F&&F(r,e,b,t);const te={url:t.responseURL,data:b,code:o};(a=this.callbacks)==null||a.onSuccess(te,r,e,t);return}}const d=s.loadPolicy.errorRetry,p=r.retry,v={url:e.url,data:void 0,code:o};if(pt(d,p,!1,v))this.retry(d);else{var l;ne.error(`${o} while loading ${e.url}`),(l=this.callbacks)==null||l.onError({code:o,text:t.statusText},e,t,r)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(pt(e,t,!0))this.retry(e);else{var r;ne.warn(`timeout while loading ${(r=this.context)==null?void 0:r.url}`);const n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:r}=this;this.retryDelay=et(e,r.retry),r.retry++,ne.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${r.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&&Qu.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 ku={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},MA=w(w({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,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,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:qo,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Ar,bufferController:mo,capLevelController:Hs,errorController:zt,fpsController:bA,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:xr,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,certLoadPolicy:{default:ku},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},pi()),{},{subtitleStreamController:yu,subtitleTrackController:xA,timelineController:PA,audioStreamController:Vl,audioTrackController:Wl,emeController:As,cmcdController:_u,contentSteeringController:ca,interstitialsController:Po});function pi(){return{cueHandler:Lu,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 el(i,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 r=ws(i),n=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(A=>{const a=`${A==="level"?"playlist":A}LoadPolicy`,l=e[a]===void 0,o=[];s.forEach(h=>{const d=`${A}Loading${h}`,p=e[d];if(p!==void 0&&l){o.push(d);const v=r[a].default;switch(e[a]={default:v},h){case"TimeOut":v.maxLoadTimeMs=p,v.maxTimeToFirstByteMs=p;break;case"MaxRetry":v.errorRetry.maxNumRetry=p,v.timeoutRetry.maxNumRetry=p;break;case"RetryDelay":v.errorRetry.retryDelayMs=p,v.timeoutRetry.retryDelayMs=p;break;case"MaxRetryTimeout":v.errorRetry.maxRetryDelayMs=p,v.timeoutRetry.maxRetryDelayMs=p;break}}}),o.length&&t.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${a}": ${br(e[a])}`)}),w(w({},r),e)}function ws(i){return i&&typeof i=="object"?Array.isArray(i)?i.map(ws):Object.keys(i).reduce((e,t)=>(e[t]=ws(i[t]),e),{}):i}function Ou(i,e){const t=i.loader;t!==La&&t!==qo?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),i.progressive=!1):Yo()&&(i.loader=La,i.progressive=!0,i.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const NA=2,Ra=.1,Cs=.05,HA=100;class Pu extends Yr{constructor(e,t){super("gap-controller",e.logger),this.hls=null,this.fragmentTracker=null,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 r;(r=this.media)!=null&&r.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var r;this.ended=((r=this.media)==null?void 0:r.currentTime)||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.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(HA),this.mediaSource=t.mediaSource;const r=this.media=t.media;Di(r,"playing",this.onMediaPlaying),Di(r,"waiting",this.onMediaWaiting),Di(r,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:r}=this;r&&(bi(r,"playing",this.onMediaPlaying),bi(r,"waiting",this.onMediaWaiting),bi(r,"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 r,n;const s=(r=this.hls)==null?void 0:r.config;if(!s)return;const{media:A,stalled:a}=this;if(!A)return;const{seeking:l}=A,o=this.seeking&&!l,h=!this.seeking&&l,d=A.paused&&!l||A.ended||A.playbackRate===0;if(this.seeking=l,e!==t){t&&(this.ended=0),this.moved=!0,l||(this.nudgeRetry=0,s.nudgeOnVideoHole&&!d&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(h||o){o&&this.stallResolved(e);return}if(d){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&A.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!1}));return}if(!qt.getBuffered(A).length){this.nudgeRetry=0;return}const p=qt.bufferInfo(A,e,0),v=p.nextStart||0,b=this.fragmentTracker;if(l&&b&&this.hls){const Ke=os(this.hls.inFlightFragments,e),xe=p.len>NA,$e=!v||Ke||v-e>NA&&!b.getPartialFragment(e);if(xe||$e)return;this.moved=!1}const S=(n=this.hls)==null?void 0:n.latestLevelDetails;if(!this.moved&&this.stalled!==null&&b){if(!(p.len>0)&&!v)return;const xe=Math.max(v,p.start||0)-e,st=!!(S!=null&&S.live)?S.targetduration*2:NA,Pe=b.getPartialFragment(e);if(xe>0&&(xe<=st||Pe)){A.paused||this._trySkipBufferHole(Pe);return}}const F=s.detectStallWithCurrentTimeMs,te=self.performance.now(),fe=this.waiting;if(a===null){fe>0&&te-fe<F?this.stalled=fe:this.stalled=te;return}const oe=te-a;if(!l&&(oe>=F||fe)&&this.hls){var pe;if(((pe=this.mediaSource)==null?void 0:pe.readyState)==="ended"&&!(S!=null&&S.live)&&Math.abs(e-((S==null?void 0:S.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(p),!this.media||!this.hls)return}const Te=qt.bufferInfo(A,e,s.maxBufferHole);this._tryFixBufferStall(Te,oe)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const r=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(r)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(m.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var r;const n=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(r=this.buffered.audio)!=null&&r.length&&n&&n.length>1&&e>n.end(0)){const s=qt.bufferedInfo(qt.timeRangesToArray(this.buffered.audio),e,0);if(s.len>1&&t>=s.start){const A=qt.timeRangesToArray(n),a=qt.bufferedInfo(A,t,0).bufferedIndex;if(a>-1&&a<A.length-1){const l=qt.bufferedInfo(A,e,0).bufferedIndex,o=A[a].end,h=A[a+1].start;if((l===-1||l>a)&&h-o<1&&e-o<2){const d=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${o} -> ${h} buffered index: ${l}`);this.warn(d.message),this.media.currentTime+=1e-6;const p=this.fragmentTracker.getPartialFragment(e)||void 0,v=qt.bufferInfo(this.media,e,0);this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:d,reason:d.message,frag:p,buffer:v.len,bufferInfo:v})}}}}}_tryFixBufferStall(e,t){var r,n;const{fragmentTracker:s,media:A}=this,a=(r=this.hls)==null?void 0:r.config;if(!A||!s||!a)return;const l=A.currentTime,o=(n=this.hls)==null?void 0:n.latestLevelDetails,h=s.getPartialFragment(l);if((h||o!=null&&o.live&&l<o.fragmentStart)&&(this._trySkipBufferHole(h)||!this.media))return;const d=e.buffered;(d&&d.length>1&&e.len>a.maxBufferHole||e.nextStart&&e.nextStart-l<a.maxBufferHole)&&(t>a.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}_reportStall(e){const{hls:t,media:r,stallReported:n,stalled:s}=this;if(!n&&s!==null&&r&&t){this.stallReported=!0;const A=new Error(`Playback stalling at @${r.currentTime} due to low buffer (${br(e)})`);this.warn(A.message),t.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_STALLED_ERROR,fatal:!1,error:A,buffer:e.len,bufferInfo:e,stalled:{start:s}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:r,media:n}=this,s=(t=this.hls)==null?void 0:t.config;if(!n||!r||!s)return 0;const A=n.currentTime,a=qt.bufferInfo(n,A,0),l=A<a.start?a.start:a.nextStart;if(l&&this.hls){const h=a.len<=s.maxBufferHole,d=a.len>0&&a.len<1&&n.readyState<3,p=l-A;if(p>0&&(h||d)){if(p>s.maxBufferHole){let b=!1;if(A===0){const S=r.getAppendedFrag(0,O.MAIN);S&&l<S.end&&(b=!0)}if(!b){const S=e||r.getAppendedFrag(A,O.MAIN);if(S){var o;if(!((o=this.hls.loadLevelObj)!=null&&o.details)||os(this.hls.inFlightFragments,l))return 0;let te=!1,fe=S.end;for(;fe<l;){const oe=r.getPartialFragment(fe);if(oe)fe+=oe.duration;else{te=!0;break}}if(te)return 0}}}const v=Math.max(l+Cs,A+Ra);if(this.warn(`skipping hole, adjusting currentTime from ${A} to ${v}`),this.moved=!0,n.currentTime=v,!(e!=null&&e.gap)){const b=new Error(`fragment loaded with buffer holes, seeking from ${A} to ${v}`);this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:b,reason:b.message,frag:e||void 0,buffer:a.len,bufferInfo:a})}return v}}return 0}_tryNudgeBuffer(e){const{hls:t,media:r,nudgeRetry:n}=this,s=t==null?void 0:t.config;if(!r||!s)return 0;const A=r.currentTime;if(this.nudgeRetry++,n<s.nudgeMaxRetry){const a=A+(n+1)*s.nudgeOffset,l=new Error(`Nudging 'currentTime' from ${A} to ${a}`);this.warn(l.message),r.currentTime=a,t.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_NUDGE_ON_STALL,error:l,fatal:!1,buffer:e.len,bufferInfo:e})}else{const a=new Error(`Playhead still not moving while enough data buffered @${A} after ${s.nudgeMaxRetry} nudges`);this.error(a.message),t.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_STALLED_ERROR,error:a,fatal:!0,buffer:e.len,bufferInfo:e})}}}function os(i,e){const t=tl(i.main);if(t&&t.start<=e)return t;const r=tl(i.audio);return r&&r.start<=e?r:null}function tl(i){if(!i)return null;switch(i.state){case ft.IDLE:case ft.STOPPED:case ft.ENDED:case ft.ERROR:return null}return i.frag}const Mu=.25;function KA(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function rl(i,e,t,r,n){let s=new i(e,t,"");try{s.value=r,n&&(s.type=n)}catch(A){s=new i(e,t,br(n?w({type:n},r):r))}return s}const Js=(()=>{const i=KA();try{i&&new i(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Nu(i){return Uint8Array.from(i.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class Hu{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(m.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.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}onMediaAttaching(e,t){var r;this.media=t.media,((r=t.overrides)==null?void 0:r.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){const e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&ps(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 r=e[t];if(r.kind==="metadata"&&r.label==="id3")return da(r,this.media),r}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:r,enableID3MetadataCues:n}}}=this;if(!r&&!n)return;const{samples:s}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const A=KA();if(A)for(let a=0;a<s.length;a++){const l=s[a].type;if(l===oi.emsg&&!r||!n)continue;const o=Wa(s[a].data);if(o){const h=s[a].pts;let d=h+s[a].duration;d>Js&&(d=Js),d-h<=0&&(d=h+Mu);for(let v=0;v<o.length;v++){const b=o[v];if(!Za(b)){this.updateId3CueEnds(h,l);const S=rl(A,h,d,b,l);S&&this.id3Track.addCue(S)}}}}}updateId3CueEnds(e,t){var r;const n=(r=this.id3Track)==null?void 0:r.cues;if(n)for(let s=n.length;s--;){const A=n[s];A.type===t&&A.startTime<e&&A.endTime===Js&&(A.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:r,type:n}){const{id3Track:s,hls:A}=this;if(!A)return;const{config:{enableEmsgMetadataCues:a,enableID3MetadataCues:l}}=A;if(s&&(a||l)){let o;n==="audio"?o=h=>h.type===oi.audioId3&&l:n==="video"?o=h=>h.type===oi.emsg&&a:o=h=>h.type===oi.audioId3&&l||h.type===oi.emsg&&a,pa(s,t,r,o)}}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.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{id3Track:r}=this,{dateRanges:n}=e,s=Object.keys(n);let A=this.dateRangeCuesAppended;if(r&&t){var a;if((a=r.cues)!=null&&a.length){const h=Object.keys(A).filter(d=>!s.includes(d));for(let d=h.length;d--;){const p=h[d],v=A[p].cues;delete A[p],Object.keys(v).forEach(b=>{try{const S=v[b];S.removeEventListener("enter",this.onEventCueEnter),r.removeCue(S)}catch(S){}})}}else A=this.dateRangeCuesAppended={}}const l=e.fragments[e.fragments.length-1];if(s.length===0||!V(l==null?void 0:l.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const o=KA();for(let h=0;h<s.length;h++){const d=s[h],p=n[d],v=p.startTime,b=A[d],S=(b==null?void 0:b.cues)||{};let F=(b==null?void 0:b.durationKnown)||!1,te=Js;const{duration:fe,endDate:oe}=p;if(oe&&fe!==null)te=v+fe,F=!0;else if(p.endOnNext&&!F){const Te=s.reduce((Ke,xe)=>{if(xe!==p.id){const $e=n[xe];if($e.class===p.class&&$e.startDate>p.startDate&&(!Ke||p.startDate<Ke.startDate))return $e}return Ke},null);Te&&(te=Te.startTime,F=!0)}const pe=Object.keys(p.attr);for(let Te=0;Te<pe.length;Te++){const Ke=pe[Te];if(!Ln(Ke))continue;const xe=S[Ke];if(xe)F&&!b.durationKnown?xe.endTime=te:Math.abs(xe.startTime-v)>.01&&(xe.startTime=v,xe.endTime=te);else if(o){let $e=p.attr[Ke];Zn(Ke)&&($e=Nu($e));const Pe=rl(o,v,te,{key:Ke,data:$e},oi.dateRange);Pe&&(Pe.id=d,this.id3Track.addCue(Pe),S[Ke]=Pe,this.hls.config.interstitialsController&&(Ke==="X-ASSET-LIST"||Ke==="X-ASSET-URL")&&Pe.addEventListener("enter",this.onEventCueEnter))}}A[d]={cues:S,dateRange:p,durationKnown:F}}}}class Ku{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,r=this.levelDetails;if(!t||!r)return;this.currentTime=t.currentTime;const n=this.computeLatency();if(n===null)return;this._latency=n;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:A}=this.config;if(!s||A===1||!r.live)return;const a=this.targetLatency;if(a===null)return;const l=n-a,o=Math.min(this.maxLatency,a+r.targetduration);if(l<o&&l>.05&&this.forwardBufferLength>1){const d=Math.min(2,Math.max(1,A)),p=Math.round(2/(1+Math.exp(-.75*l-this.edgeStalled))*20)/20,v=Math.min(d,Math.max(1,p));this.changeMediaPlaybackRate(t,v)}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:r,targetduration:n}=e,{liveSyncDuration:s,liveSyncDurationCount:A,lowLatencyMode:a}=this.config,l=this.hls.userConfig;let o=a&&r||t;(this._targetLatencyUpdated||l.liveSyncDuration||l.liveSyncDurationCount||o===0)&&(o=s!==void 0?s:A*n);const h=n;return o+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,h)}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 r=this.levelDetails;if(r===null)return null;const n=r.edge,s=e-t-this.edgeStalled,A=n-r.totalduration,a=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(A,s),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 r=e.buffered.length;return(r?e.buffered.end(r-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.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 r;t.details===W.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(r=this.levelDetails)!=null&&r.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var r,n;e.playbackRate!==t&&((r=this.hls)==null||r.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(n=this.targetLatency)==null?void 0:n.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 $u extends ia{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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.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 r=this.hls.config.preferManagedMediaSource,n=[],s={},A={};let a=!1,l=!1,o=!1;t.levels.forEach(h=>{var d;const p=h.attrs;let{audioCodec:v,videoCodec:b}=h;v&&(h.audioCodec=v=gt(v,r)||void 0),((d=b)==null?void 0:d.indexOf("avc1"))===0&&(b=h.videoCodec=Cr(b));const{width:S,height:F,unknownCodecs:te}=h;let fe=te?te.length:0;if(te)for(let Bt=fe;Bt--;){const kt=te[Bt];this.isAudioSupported(kt)?(h.audioCodec=v=v?`${v},${kt}`:kt,fe--,jt.audio[v.substring(0,4)]=2):this.isVideoSupported(kt)&&(h.videoCodec=b=b?`${b},${kt}`:kt,fe--,jt.video[b.substring(0,4)]=2)}if(a||(a=!!(S&&F)),l||(l=!!b),o||(o=!!v),fe||v&&!this.isAudioSupported(v)||b&&!this.isVideoSupported(b)){this.log(`Some or all CODECS not supported "${p.CODECS}"`);return}const{CODECS:oe,"FRAME-RATE":pe,"HDCP-LEVEL":Te,"PATHWAY-ID":Ke,RESOLUTION:xe,"VIDEO-RANGE":$e}=p,Pe=`${`${Ke||"."}-`}${h.bitrate}-${xe}-${pe}-${oe}-${$e}-${Te}`;if(s[Pe])if(s[Pe].uri!==h.url&&!h.attrs["PATHWAY-ID"]){const Bt=A[Pe]+=1;h.attrs["PATHWAY-ID"]=new Array(Bt+1).join(".");const kt=this.createLevel(h);s[Pe]=kt,n.push(kt)}else s[Pe].addGroupId("audio",p.AUDIO),s[Pe].addGroupId("text",p.SUBTITLES);else{const Bt=this.createLevel(h);s[Pe]=Bt,A[Pe]=1,n.push(Bt)}}),this.filterAndSortMediaOptions(n,t,a,l,o)}createLevel(e){const t=new Pr(e),r=e.supplemental;if(r!=null&&r.videoCodec&&!this.isVideoSupported(r.videoCodec)){const n=new Error(`SUPPLEMENTAL-CODECS not supported "${r.videoCodec}"`);this.log(n.message),t.supportedResult=$r(n,[])}return t}isAudioSupported(e){return Ce(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Ce(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,r,n,s){let A=[],a=[],l=e;if((r||n)&&s&&(l=l.filter(({videoCodec:F,videoRange:te,width:fe,height:oe})=>(!!F||!!(fe&&oe))&&An(te))),l.length===0){Promise.resolve().then(()=>{if(this.hls){let F="no level with compatible codecs found in manifest",te=F;t.levels.length&&(te=`one or more CODECS in variant not supported: ${br(t.levels.map(oe=>oe.attrs.CODECS).filter((oe,pe,Te)=>Te.indexOf(oe)===pe))}`,this.warn(te),F+=` (${te})`);const fe=new Error(F);this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:fe,reason:te})}});return}t.audioTracks&&(A=t.audioTracks.filter(F=>!F.audioCodec||this.isAudioSupported(F.audioCodec)),nl(A)),t.subtitles&&(a=t.subtitles,nl(a));const o=l.slice(0);l.sort((F,te)=>{if(F.attrs["HDCP-LEVEL"]!==te.attrs["HDCP-LEVEL"])return(F.attrs["HDCP-LEVEL"]||"")>(te.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&F.height!==te.height)return F.height-te.height;if(F.frameRate!==te.frameRate)return F.frameRate-te.frameRate;if(F.videoRange!==te.videoRange)return Jr.indexOf(F.videoRange)-Jr.indexOf(te.videoRange);if(F.videoCodec!==te.videoCodec){const fe=ie(F.videoCodec),oe=ie(te.videoCodec);if(fe!==oe)return oe-fe}if(F.uri===te.uri&&F.codecSet!==te.codecSet){const fe=ae(F.codecSet),oe=ae(te.codecSet);if(fe!==oe)return oe-fe}return F.averageBitrate!==te.averageBitrate?F.averageBitrate-te.averageBitrate:0});let h=o[0];if(this.steering&&(l=this.steering.filterParsedLevels(l),l.length!==o.length)){for(let F=0;F<o.length;F++)if(o[F].pathwayId===l[0].pathwayId){h=o[F];break}}this._levels=l;for(let F=0;F<l.length;F++)if(l[F]===h){var d;this._firstLevel=F;const te=h.bitrate,fe=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${l.length} level(s) found, first bitrate: ${te}`),((d=this.hls.userConfig)==null?void 0:d.abrEwmaDefaultEstimate)===void 0){const oe=Math.min(te,this.hls.config.abrEwmaDefaultEstimateMax);oe>fe&&fe===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=oe)}break}const p=s&&!n,v=this.hls.config,b=!!(v.audioStreamController&&v.audioTrackController),S={levels:l,audioTracks:A,subtitleTracks:a,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:n,altAudio:b&&!p&&A.some(F=>!!F.url)};this.hls.trigger(m.MANIFEST_PARSED,S)}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 h=new Error("invalid level idx"),d=e<0;if(this.hls.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.LEVEL_SWITCH_ERROR,level:e,fatal:d,error:h,reason:h.message}),d)return;e=Math.min(e,t.length-1)}const r=this.currentLevelIndex,n=this.currentLevel,s=n?n.attrs["PATHWAY-ID"]:void 0,A=t[e],a=A.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=A,r===e&&n&&s===a)return;this.log(`Switching to level ${e} (${A.height?A.height+"p ":""}${A.videoRange?A.videoRange+" ":""}${A.codecSet?A.codecSet+" ":""}@${A.bitrate})${a?" with Pathway "+a:""} from level ${r}${s?" with Pathway "+s:""}`);const l={level:e,attrs:A.attrs,details:A.details,bitrate:A.bitrate,averageBitrate:A.averageBitrate,maxBitrate:A.maxBitrate,realBitrate:A.realBitrate,width:A.width,height:A.height,codecSet:A.codecSet,audioCodec:A.audioCodec,videoCodec:A.videoCodec,audioGroups:A.audioGroups,subtitleGroups:A.subtitleGroups,loaded:A.loaded,loadError:A.loadError,fragmentError:A.fragmentError,name:A.name,id:A.id,uri:A.uri,url:A.url,urlId:0,audioGroupIds:A.audioGroupIds,textGroupIds:A.textGroupIds};this.hls.trigger(m.LEVEL_SWITCHING,l);const o=A.details;if(!o||o.live){const h=this.switchParams(A.uri,n==null?void 0:n.details,o);this.loadPlaylist(h)}}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(),r=e.filter(n=>t.indexOf(n)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=r}}onError(e,t){t.fatal||!t.context||t.context.type===ge.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===O.MAIN){const r=t.elementaryStreams;if(!Object.keys(r).some(s=>!!r[s]))return;const n=this._levels[t.level];n!=null&&n.loadError&&(this.log(`Resetting level error count of ${n.loadError} on frag buffered`),n.loadError=0)}}onLevelLoaded(e,t){var r;const{level:n,details:s}=t,A=t.levelInfo;if(!A){var a;this.warn(`Invalid level index ${n}`),(a=t.deliveryDirectives)!=null&&a.skip&&(s.deltaUpdateFailed=!0);return}if(A===this.currentLevel||t.withoutMultiVariant){A.fragmentError===0&&(A.loadError=0);let l=A.details;l===t.details&&l.advanced&&(l=void 0),this.playlistLoaded(n,t,l)}else(r=t.deliveryDirectives)!=null&&r.skip&&(s.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=this.getUrlWithDirectives(e.uri,t),n=this.currentLevelIndex,s=e.attrs["PATHWAY-ID"],A=e.details,a=A==null?void 0:A.age;this.log(`Loading level index ${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${s?" Pathway "+s:""}${a&&A.live?" age "+a.toFixed(1)+(A.type?" "+A.type||0:""):""} ${r}`),this.hls.trigger(m.LEVEL_LOADING,{url:r,level:n,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 r=this._levels.filter((s,A)=>A!==e?!0:(this.steering&&this.steering.removeLevel(s),s===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,s.details&&s.details.fragments.forEach(a=>a.level=-1)),!1));qn(r),this._levels=r,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 n=r.length-1;this._firstLevel=Math.min(this._firstLevel,n),this._startLevel&&(this._startLevel=Math.min(this._startLevel,n)),this.hls.trigger(m.LEVELS_UPDATED,{levels:r})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:r}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(m.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function nl(i){const e={};i.forEach(t=>{const r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++})}function il(){return self.SourceBuffer||self.WebKitSourceBuffer}function sl(){if(!ve())return!1;const e=il();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Gu(){if(!sl())return!1;const i=ve();return typeof(i==null?void 0:i.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>i.isTypeSupported(j(e,"video")))||["mp4a.40.2","fLaC"].some(e=>i.isTypeSupported(j(e,"audio"))))}function Vu(){var i;const e=il();return typeof(e==null||(i=e.prototype)==null?void 0:i.changeType)=="function"}const Wu=100;class Zu extends Hn{constructor(e,t,r){super(e,t,r,"stream-controller",O.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 n=this.media,s=n?n.currentTime:null;if(s===null||!V(s)||(this.log(`Media seeked to ${s.toFixed(3)}`),!this.getBufferedFrag(s)))return;const A=this.getFwdBufferInfoAtPos(n,s,O.MAIN,0);if(A===null||A.len===0){this.warn(`Main forward buffer length at ${s} on "seeked" event ${A?A.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:r,hls:n}=this;if(this.stopLoad(),this.setInterval(Wu),this.level=-1,!this.startFragRequested){let s=n.startLevel;s===-1&&(n.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=n.firstAutoLevel),n.nextLoadLevel=s,this.level=n.loadLevel,this._hasEnoughToStart=!!t}r>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r),this.state=ft.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=ft.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case ft.WAITING_LEVEL:{const{levels:t,level:r}=this,n=t==null?void 0:t[r],s=n==null?void 0:n.details;if(s&&(!s.live||this.levelLastLoaded===n&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(s))break;this.state=ft.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=ft.IDLE;break}break}case ft.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),r=this.retryDate;if(!r||t>=r||(e=this.media)!=null&&e.seeking){const{levels:n,level:s}=this,A=n==null?void 0:n[s];this.resetStartWhenNotLoaded(A||null),this.state=ft.IDLE}}break}this.state===ft.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:r,media:n}=this;if(t===null||!n&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const s=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(r!=null&&r[s]))return;const A=r[s],a=this.getMainFwdBufferInfo();if(a===null)return;const l=this.getLevelDetails();if(l&&this._streamEnded(a,l)){const S={};this.altAudio===2&&(S.type="video"),this.hls.trigger(m.BUFFER_EOS,S),this.state=ft.ENDED;return}if(!this.buffering)return;e.loadLevel!==s&&e.manualLevel===-1&&this.log(`Adapting to level ${s} from level ${this.level}`),this.level=e.nextLoadLevel=s;const o=A.details;if(!o||this.state===ft.WAITING_LEVEL||this.waitForLive(A)){this.level=s,this.state=ft.WAITING_LEVEL,this.startFragRequested=!1;return}const h=a.len,d=this.getMaxBufferLength(A.maxBitrate);if(h>=d)return;this.backtrackFragment&&this.backtrackFragment.start>a.end&&(this.backtrackFragment=null);const p=this.backtrackFragment?this.backtrackFragment.start:a.end;let v=this.getNextFragment(p,o);if(this.couldBacktrack&&!this.fragPrevious&&v&&Ae(v)&&this.fragmentTracker.getState(v)!==Et.OK){var b;const F=((b=this.backtrackFragment)!=null?b:v).sn-o.startSN,te=o.fragments[F-1];te&&v.cc===te.cc&&(v=te,this.fragmentTracker.removeFragment(te))}else this.backtrackFragment&&a.len&&(this.backtrackFragment=null);if(v&&this.isLoopLoading(v,p)){if(!v.gap){const F=this.audioOnly&&!this.altAudio?y.AUDIO:y.VIDEO,te=(F===y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;te&&this.afterBufferFlushed(te,F,O.MAIN)}v=this.getNextFragmentLoopLoading(v,o,a,O.MAIN,d)}v&&(v.initSegment&&!v.initSegment.data&&!this.bitrateTest&&(v=v.initSegment),this.loadFragment(v,A,p))}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);n===Et.NOT_LOADED||n===Et.PARTIAL?Ae(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,r):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,O.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 r;const n=this.getAppendedFrag(t.currentTime);n&&n.start>1&&this.flushMainBuffer(0,n.start-1);const s=this.getLevelDetails();if(s!=null&&s.live){const a=this.getMainFwdBufferInfo();if(!a||a.len<s.targetduration*2)return}if(!t.paused&&e){const a=this.hls.nextLoadLevel,l=e[a],o=this.fragLastKbps;o&&this.fragCurrent?r=this.fragCurrent.duration*l.maxBitrate/(1e3*o)+1:r=0}else r=0;const A=this.getBufferedFrag(t.currentTime+r);if(A){const a=this.followingBufferedFrag(A);if(a){this.abortCurrentFrag();const l=a.maxStartPTS?a.maxStartPTS:a.start,o=a.duration,h=Math.max(A.end,l+Math.min(Math.max(o-this.config.maxFragLookUpTolerance,o*(this.couldBacktrack?.5:.125)),o*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(h,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 ft.KEY_LOADING:case ft.FRAG_LOADING:case ft.FRAG_LOADING_WAITING_RETRY:case ft.PARSING:case ft.PARSED:this.state=ft.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 r=t.media;Di(r,"playing",this.onMediaPlaying),Di(r,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:r}=this;r&&(bi(r,"playing",this.onMediaPlaying),bi(r,"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(m.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 r=!1,n=!1;t.levels.forEach(s=>{const A=s.audioCodec;A&&(r=r||A.indexOf("mp4a.40.2")!==-1,n=n||A.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=r&&n&&!Vu(),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:r}=this;if(!r||this.state!==ft.IDLE)return;const n=t.levelInfo;(!n.details||n.details.live&&(this.levelLastLoaded!==n||n.details.expired)||this.waitForCdnTuneIn(n.details))&&(this.state=ft.WAITING_LEVEL)}onLevelLoaded(e,t){var r;const{levels:n,startFragRequested:s}=this,A=t.level,a=t.details,l=a.totalduration;if(!n){this.warn(`Levels were reset while loading level ${A}`);return}this.log(`Level ${A} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""}, cc [${a.startCC}, ${a.endCC}] duration:${l}`);const o=t.levelInfo,h=this.fragCurrent;h&&(this.state===ft.FRAG_LOADING||this.state===ft.FRAG_LOADING_WAITING_RETRY)&&h.level!==t.level&&h.loader&&this.abortCurrentFrag();let d=0;if(a.live||(r=o.details)!=null&&r.live){var p;if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;d=this.alignPlaylists(a,o.details,(p=this.levelLastLoaded)==null?void 0:p.details)}if(o.details=a,this.levelLastLoaded=o,s||this.setStartPosition(a,d),this.hls.trigger(m.LEVEL_UPDATED,{details:a,level:A}),this.state===ft.WAITING_LEVEL){if(this.waitForCdnTuneIn(a))return;this.state=ft.IDLE}s&&a.live&&this.synchronizeToLiveEdge(a),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:r}=this;if(!r)return;const n=this.hls.liveSyncPosition,s=this.getLoadPosition(),A=e.fragmentStart,a=e.edge,l=s>=A-t.maxFragLookUpTolerance&&s<=a;if(n!==null&&r.duration>n&&(s<n||!l)){const o=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!l&&r.readyState<4||s<a-o)&&(this._hasEnoughToStart||(this.nextLoadPosition=n),r.readyState&&(this.warn(`Playback: ${s.toFixed(3)} is located too far from the end of live sliding playlist: ${a}, reset currentTime to : ${n.toFixed(3)}`),r.currentTime=n))}}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:s}=e,{levels:A}=this;if(!A){this.warn(`Levels were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const a=A[r.level];if(!a){this.warn(`Level ${r.level} not found on progress`);return}const l=a.details;if(!l){this.warn(`Dropping fragment ${r.sn} of level ${r.level} after level details were reset`),this.fragmentTracker.removeFragment(r);return}const o=a.videoCodec,h=l.PTSKnown||!l.live,d=(t=r.initSegment)==null?void 0:t.data,p=this._getAudioCodec(a),v=this.transmuxer=this.transmuxer||new uo(this.hls,O.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),b=n?n.index:-1,S=b!==-1,F=new Kr(r.level,r.sn,r.stats.chunkCount,s.byteLength,b,S),te=this.initPTS[r.cc];v.push(s,d,p,o,r,n,l.totalduration,h,F,te)}onAudioTrackSwitching(e,t){const r=this.hls,n=this.altAudio===2;if(Zt(t.url,r))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 A=this.fragCurrent;A&&(this.log("Switching to main audio track, cancel main fragment load"),A.abortRequests(),this.fragmentTracker.removeFragment(A)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(n){this.fragmentTracker.removeAllFragments(),r.once(m.BUFFER_FLUSHED,()=>{var A;(A=this.hls)==null||A.trigger(m.AUDIO_TRACK_SWITCHED,t)}),r.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}r.trigger(m.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const r=Zt(t.url,this.hls);if(r){const n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=r?2:0,this.tick()}onBufferCreated(e,t){const r=t.tracks;let n,s,A=!1;for(const a in r){const l=r[a];if(l.id==="main"){if(s=a,n=l,a==="video"){const o=r[a];o&&(this.videoBuffer=o.buffer)}}else A=!0}A&&n?(this.log(`Alternate track found, use ${s}.buffered to schedule main fragment loading`),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:r,part:n}=t,s=r.type===O.MAIN;if(s){if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}`),this.state===ft.PARSED&&(this.state=ft.IDLE);return}const a=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),Ae(r)&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}const A=this.media;A&&(!this._hasEnoughToStart&&qt.getBuffered(A).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),s&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var r;if(t.fatal){this.state=ft.ERROR;return}switch(t.details){case W.FRAG_GAP:case W.FRAG_PARSING_ERROR:case W.FRAG_DECRYPT_ERROR:case W.FRAG_LOAD_ERROR:case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_ERROR:case W.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(O.MAIN,t);break;case W.LEVEL_LOAD_ERROR:case W.LEVEL_LOAD_TIMEOUT:case W.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===ft.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===ge.LEVEL&&(this.state=ft.IDLE);break;case W.BUFFER_ADD_CODEC_ERROR:case W.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.resetLoadingState();break;case W.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case W.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=ft.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==y.AUDIO||!this.altAudio){const r=(t===y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;r&&(this.afterBufferFlushed(r,t,O.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 r=this.startPosition;if(r>=0&&t<r){if(e.seeking){this.log(`could not seek to ${r}, already seeking at ${t}`);return}const n=this.timelineOffset;n&&r&&(r+=n);const s=this.getLevelDetails(),A=qt.getBuffered(e),a=A.length?A.start(0):0,l=a-r,o=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);l>0&&(l<o||this.loadingParts&&l<2*((s==null?void 0:s.partTarget)||0))&&(this.log(`adjusting start position by ${l} to match buffer start`),r+=l,this.startPosition=r),t<r&&(this.log(`seek to target start position ${r} from current time ${t} buffer start ${a}`),e.currentTime=r)}}_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(r=>{const{hls:n}=this,s=r==null?void 0:r.frag;if(!s||this.fragContextChanged(s))return;t.fragmentError=0,this.state=ft.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const A=s.stats;A.parsing.start=A.parsing.end=A.buffering.start=A.buffering.end=self.performance.now(),n.trigger(m.FRAG_LOADED,r),s.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const r=this.playlistType,{hls:n}=this,{remuxResult:s,chunkMeta:A}=e,a=this.getCurrentContext(A);if(!a){this.resetWhenMissingContext(A);return}const{frag:l,part:o,level:h}=a,{video:d,text:p,id3:v,initSegment:b}=s,{details:S}=h,F=this.altAudio?void 0:s.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=ft.PARSING,b){if(b!=null&&b.tracks){const oe=l.initSegment||l;this._bufferInitSegment(h,b.tracks,oe,A),n.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:oe,id:r,tracks:b.tracks})}const te=b.initPTS,fe=b.timescale;V(te)&&(this.initPTS[l.cc]={baseTime:te,timescale:fe},n.trigger(m.INIT_PTS_FOUND,{frag:l,id:r,initPTS:te,timescale:fe}))}if(d&&S){F&&d.type==="audiovideo"&&this.logMuxedErr(l);const te=S.fragments[l.sn-1-S.startSN],fe=l.sn===S.startSN,oe=!te||l.cc>te.cc;if(s.independent!==!1){const{startPTS:pe,endPTS:Te,startDTS:Ke,endDTS:xe}=d;if(o)o.elementaryStreams[d.type]={startPTS:pe,endPTS:Te,startDTS:Ke,endDTS:xe};else if(d.firstKeyFrame&&d.independent&&A.id===1&&!oe&&(this.couldBacktrack=!0),d.dropped&&d.independent){const $e=this.getMainFwdBufferInfo(),st=($e?$e.end:this.getLoadPosition())+this.config.maxBufferHole,Pe=d.firstKeyFramePTS?d.firstKeyFramePTS:pe;if(!fe&&st<Pe-this.config.maxBufferHole&&!oe){this.backtrack(l);return}else oe&&(l.gap=!0);l.setElementaryStreamInfo(d.type,l.start,Te,l.start,xe,!0)}else fe&&pe-(S.appliedTimelineOffset||0)>NA&&(l.gap=!0);l.setElementaryStreamInfo(d.type,pe,Te,Ke,xe),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(d,l,o,A,fe||oe)}else if(fe||oe)l.gap=!0;else{this.backtrack(l);return}}if(F){const{startPTS:te,endPTS:fe,startDTS:oe,endDTS:pe}=F;o&&(o.elementaryStreams[y.AUDIO]={startPTS:te,endPTS:fe,startDTS:oe,endDTS:pe}),l.setElementaryStreamInfo(y.AUDIO,te,fe,oe,pe),this.bufferFragmentData(F,l,o,A)}if(S&&v!=null&&(t=v.samples)!=null&&t.length){const te={id:r,frag:l,details:S,samples:v.samples};n.trigger(m.FRAG_PARSING_METADATA,te)}if(S&&p){const te={id:r,frag:l,details:S,samples:p.samples};n.trigger(m.FRAG_PARSING_USERDATA,te)}}logMuxedErr(e){this.warn(`${Ae(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,r,n){if(this.state!==ft.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(r));const{audio:s,video:A,audiovideo:a}=t;if(s){let o=Ht(s.codec,e.audioCodec);o==="mp4a"&&(o="mp4a.40.5");const h=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){o&&(o.indexOf("mp4a.40.5")!==-1?o="mp4a.40.2":o="mp4a.40.5");const d=s.metadata;d&&"channelCount"in d&&(d.channelCount||1)!==1&&h.indexOf("firefox")===-1&&(o="mp4a.40.5")}o&&o.indexOf("mp4a.40.5")!==-1&&h.indexOf("android")!==-1&&s.container!=="audio/mpeg"&&(o="mp4a.40.2",this.log(`Android: force audio codec to ${o}`)),e.audioCodec&&e.audioCodec!==o&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${o}"`),s.levelCodec=o,s.id=O.MAIN,this.log(`Init audio buffer, container:${s.container}, codecs[selected/level/parsed]=[${o||""}/${e.audioCodec||""}/${s.codec}]`),delete t.audiovideo}if(A){A.levelCodec=e.videoCodec,A.id=O.MAIN;const o=A.codec;if((o==null?void 0:o.length)===4)switch(o){case"hvc1":case"hev1":A.codec="hvc1.1.6.L120.90";break;case"av01":A.codec="av01.0.04M.08";break;case"avc1":A.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${A.container}, codecs[level/parsed]=[${e.videoCodec||""}/${o}]${A.codec!==o?" parsed-corrected="+A.codec:""}${A.supplemental?" supplemental="+A.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 l=Object.keys(t);if(l.length){if(this.hls.trigger(m.BUFFER_CODECS,t),!this.hls)return;l.forEach(o=>{const d=t[o].initSegment;d!=null&&d.byteLength&&this.hls.trigger(m.BUFFER_APPENDING,{type:o,data:d,frag:r,part:null,chunkMeta:n,parent:r.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,O.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,r=e==null?void 0:e[t];return r?this.getMaxBufferLength(r.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=ft.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(qt.isBuffered(e,r)?t=this.getAppendedFrag(r):qt.isBuffered(e,r+.1)&&(t=this.getAppendedFrag(r+.1)),t){this.backtrackFragment=null;const n=this.fragPlaying,s=t.level;(!n||t.sn!==n.sn||n.level!==s)&&(this.fragPlaying=t,this.hls.trigger(m.FRAG_CHANGED,{frag:t}),(!n||n.level!==s)&&this.hls.trigger(m.LEVEL_SWITCHED,{level:s}))}}}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 V(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(V(t)){const r=this.getLevelDetails(),n=this.currentFrag||(r?Tr(null,r.fragments,t):null);if(n){const s=n.programDateTime;if(s!==null){const A=s+(t-n.start)*1e3;return new Date(A)}}}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 zu{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyUriToKeyInfo){const n=this.keyUriToKeyInfo[r].loader;if(n){var t;if(e&&e!==((t=n.context)==null?void 0:t.frag.type))return;n.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=W.KEY_LOAD_ERROR,r,n,s){return new dr({type:he.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:s,error:r,networkDetails:n})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:r,cc:n}=e;for(let s=0;s<t.length;s++){const A=t[s];if(n<=A.cc&&(r==="initSegment"||A.sn==="initSegment"||r<A.sn)){this.emeController.selectKeySystemFormat(A).then(a=>{A.setKeyFormat(a)});break}}}}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 r,n;t&&e.setKeyFormat(t);const s=e.decryptdata;if(!s){const o=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,W.KEY_LOAD_ERROR,o))}const A=s.uri;if(!A)return Promise.reject(this.createKeyLoadError(e,W.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${A}"`)));let a=this.keyUriToKeyInfo[A];if((r=a)!=null&&r.decryptdata.key)return s.key=a.decryptdata.key,Promise.resolve({frag:e,keyInfo:a});if((n=a)!=null&&n.keyLoadPromise){var l;switch((l=a.mediaKeySessionContext)==null?void 0:l.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return a.keyLoadPromise.then(o=>(s.key=o.keyInfo.decryptdata.key,{frag:e,keyInfo:a}))}}switch(a=this.keyUriToKeyInfo[A]={decryptdata:s,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},s.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return s.keyFormat==="identity"?this.loadKeyHTTP(a,e):this.loadKeyEME(a,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(a,e);default:return Promise.reject(this.createKeyLoadError(e,W.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${s.method}"`)))}}loadKeyEME(e,t){const r={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const n=this.emeController.loadKey(r);if(n)return(e.keyLoadPromise=n.then(s=>(e.mediaKeySessionContext=s,r))).catch(s=>{throw e.keyLoadPromise=null,s})}return Promise.resolve(r)}loadKeyHTTP(e,t){const r=this.config,n=r.loader,s=new n(r);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise((A,a)=>{const l={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},o=r.keyLoadPolicy.default,h={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(p,v,b,S)=>{const{frag:F,keyInfo:te,url:fe}=b;if(!F.decryptdata||te!==this.keyUriToKeyInfo[fe])return a(this.createKeyLoadError(F,W.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),S));te.decryptdata.key=F.decryptdata.key=new Uint8Array(p.data),F.keyLoader=null,te.loader=null,A({frag:F,keyInfo:te})},onError:(p,v,b,S)=>{this.resetLoader(v),a(this.createKeyLoadError(t,W.KEY_LOAD_ERROR,new Error(`HTTP Error ${p.code} loading key ${p.text}`),b,w({url:l.url,data:void 0},p)))},onTimeout:(p,v,b)=>{this.resetLoader(v),a(this.createKeyLoadError(t,W.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),b))},onAbort:(p,v,b)=>{this.resetLoader(v),a(this.createKeyLoadError(t,W.INTERNAL_ABORTED,new Error("key loading aborted"),b))}};s.load(l,h,d)})}resetLoader(e){const{frag:t,keyInfo:r,url:n}=e,s=r.loader;t.keyLoader===s&&(t.keyLoader=null,r.loader=null),delete this.keyUriToKeyInfo[n],s&&s.destroy()}}function Al(i){const{type:e}=i;switch(e){case ge.AUDIO_TRACK:return O.AUDIO;case ge.SUBTITLE_TRACK:return O.SUBTITLE;default:return O.MAIN}}function Qa(i,e){let t=i.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class f{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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,r=t.pLoader,n=t.loader,s=r||n,A=new s(t);return this.loaders[e.type]=A,A}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:r}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ge.MANIFEST,url:r,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:r,level:n,pathwayId:s,url:A,deliveryDirectives:a,levelInfo:l}=t;this.load({id:r,level:n,pathwayId:s,responseType:"text",type:ge.LEVEL,url:A,deliveryDirectives:a,levelOrTrack:l})}onAudioTrackLoading(e,t){const{id:r,groupId:n,url:s,deliveryDirectives:A,track:a}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:ge.AUDIO_TRACK,url:s,deliveryDirectives:A,levelOrTrack:a})}onSubtitleTrackLoading(e,t){const{id:r,groupId:n,url:s,deliveryDirectives:A,track:a}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:ge.SUBTITLE_TRACK,url:s,deliveryDirectives:A,levelOrTrack:a})}onLevelsUpdated(e,t){const r=this.loaders[ge.LEVEL];if(r){const n=r.context;n&&!t.levels.some(s=>s===n.levelOrTrack)&&(r.abort(),delete this.loaders[ge.LEVEL])}}load(e){var t;const r=this.hls.config;let n=this.getInternalLoader(e);if(n){const o=this.hls.logger,h=n.context;if(h&&h.levelOrTrack===e.levelOrTrack&&(h.url===e.url||h.deliveryDirectives&&!e.deliveryDirectives)){h.url===e.url?o.log(`[playlist-loader]: ignore ${e.url} ongoing request`):o.log(`[playlist-loader]: ignore ${e.url} in favor of ${h.url}`);return}o.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),n.abort()}let s;if(e.type===ge.MANIFEST?s=r.manifestLoadPolicy.default:s=B({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),V((t=e.deliveryDirectives)==null?void 0:t.part)){let o;if(e.type===ge.LEVEL&&e.level!==null?o=this.hls.levels[e.level].details:e.type===ge.AUDIO_TRACK&&e.id!==null?o=this.hls.audioTracks[e.id].details:e.type===ge.SUBTITLE_TRACK&&e.id!==null&&(o=this.hls.subtitleTracks[e.id].details),o){const h=o.partTarget,d=o.targetduration;if(h&&d){const p=Math.max(h*3,d*.8)*1e3;s=B({},s,{maxTimeToFirstByteMs:Math.min(p,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(p,s.maxTimeToFirstByteMs)})}}}const A=s.errorRetry||s.timeoutRetry||{},a={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:A.maxNumRetry||0,retryDelay:A.retryDelayMs||0,maxRetryDelay:A.maxRetryDelayMs||0},l={onSuccess:(o,h,d,p)=>{const v=this.getInternalLoader(d);this.resetInternalLoader(d.type);const b=o.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(o,d,new Error("no EXTM3U delimiter"),p||null,h);return}h.parsing.start=performance.now(),Wr.isMediaPlaylist(b)||d.type!==ge.MANIFEST?this.handleTrackOrLevelPlaylist(o,h,d,p||null,v):this.handleMasterPlaylist(o,h,d,p)},onError:(o,h,d,p)=>{this.handleNetworkError(h,d,!1,o,p)},onTimeout:(o,h,d)=>{this.handleNetworkError(h,d,!0,void 0,o)}};n.load(e,a,l)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:r}=this.hls;(e||r)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,r,n){const s=this.hls,A=e.data,a=Qa(e,r),l=Wr.parseMasterPlaylist(A,a);if(l.playlistParsingError){this.handleManifestParsingError(e,r,l.playlistParsingError,n,t);return}const{contentSteering:o,levels:h,sessionData:d,sessionKeys:p,startTimeOffset:v,variableList:b}=l;this.variableList=b;const{AUDIO:S=[],SUBTITLES:F,"CLOSED-CAPTIONS":te}=Wr.parseMasterPlaylistMedia(A,a,l);S.length&&!S.some(oe=>!oe.url)&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),S.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Xr({}),bitrate:0,url:""})),s.trigger(m.MANIFEST_LOADED,{levels:h,audioTracks:S,subtitles:F,captions:te,contentSteering:o,url:a,stats:t,networkDetails:n,sessionData:d,sessionKeys:p,startTimeOffset:v,variableList:b})}handleTrackOrLevelPlaylist(e,t,r,n,s){const A=this.hls,{id:a,level:l,type:o}=r,h=Qa(e,r),d=V(l)?l:V(a)?a:0,p=Al(r),v=Wr.parseLevelPlaylist(e.data,h,d,p,0,this.variableList);if(o===ge.MANIFEST){const b={attrs:new Xr({}),bitrate:0,details:v,name:"",url:h};v.requestScheduled=t.loading.start+Fi(v,0),A.trigger(m.MANIFEST_LOADED,{levels:[b],audioTracks:[],url:h,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=v,this.handlePlaylistLoaded(v,e,t,r,n,s)}handleManifestParsingError(e,t,r,n,s){this.hls.trigger(m.ERROR,{type:he.NETWORK_ERROR,details:W.MANIFEST_PARSING_ERROR,fatal:t.type===ge.MANIFEST,url:e.url,err:r,error:r,reason:r.message,response:e,context:t,networkDetails:n,stats:s})}handleNetworkError(e,t,r=!1,n,s){let A=`A network ${r?"timeout":"error"+(n?" (status "+n.code+")":"")} occurred while loading ${e.type}`;e.type===ge.LEVEL?A+=`: ${e.level} id: ${e.id}`:(e.type===ge.AUDIO_TRACK||e.type===ge.SUBTITLE_TRACK)&&(A+=` id: ${e.id} group-id: "${e.groupId}"`);const a=new Error(A);this.hls.logger.warn(`[playlist-loader]: ${A}`);let l=W.UNKNOWN,o=!1;const h=this.getInternalLoader(e);switch(e.type){case ge.MANIFEST:l=r?W.MANIFEST_LOAD_TIMEOUT:W.MANIFEST_LOAD_ERROR,o=!0;break;case ge.LEVEL:l=r?W.LEVEL_LOAD_TIMEOUT:W.LEVEL_LOAD_ERROR,o=!1;break;case ge.AUDIO_TRACK:l=r?W.AUDIO_TRACK_LOAD_TIMEOUT:W.AUDIO_TRACK_LOAD_ERROR,o=!1;break;case ge.SUBTITLE_TRACK:l=r?W.SUBTITLE_TRACK_LOAD_TIMEOUT:W.SUBTITLE_LOAD_ERROR,o=!1;break}h&&this.resetInternalLoader(e.type);const d={type:he.NETWORK_ERROR,details:l,fatal:o,url:e.url,loader:h,context:e,error:a,networkDetails:t,stats:s};if(n){const p=(t==null?void 0:t.url)||e.url;d.response=w({url:p,data:void 0},n)}this.hls.trigger(m.ERROR,d)}handlePlaylistLoaded(e,t,r,n,s,A){const a=this.hls,{type:l,level:o,id:h,groupId:d,deliveryDirectives:p}=n,v=Qa(t,n),b=Al(n),S=typeof n.level=="number"&&b===O.MAIN?o:void 0;if(!e.fragments.length){const te=e.playlistParsingError=new Error("No Segments found in Playlist");a.trigger(m.ERROR,{type:he.NETWORK_ERROR,details:W.LEVEL_EMPTY_ERROR,fatal:!1,url:v,error:te,reason:te.message,response:t,context:n,level:S,parent:b,networkDetails:s,stats:r});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const F=e.playlistParsingError;if(F){if(this.hls.logger.warn(F),!a.config.ignorePlaylistParsingErrors){a.trigger(m.ERROR,{type:he.NETWORK_ERROR,details:W.LEVEL_PARSING_ERROR,fatal:!1,url:v,error:F,reason:F.message,response:t,context:n,level:S,parent:b,networkDetails:s,stats:r});return}e.playlistParsingError=null}switch(e.live&&A&&(A.getCacheAge&&(e.ageHeader=A.getCacheAge()||0),(!A.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),l){case ge.MANIFEST:case ge.LEVEL:a.trigger(m.LEVEL_LOADED,{details:e,levelInfo:n.levelOrTrack||a.levels[0],level:S||0,id:h||0,stats:r,networkDetails:s,deliveryDirectives:p,withoutMultiVariant:l===ge.MANIFEST});break;case ge.AUDIO_TRACK:a.trigger(m.AUDIO_TRACK_LOADED,{details:e,track:n.levelOrTrack,id:h||0,groupId:d||"",stats:r,networkDetails:s,deliveryDirectives:p});break;case ge.SUBTITLE_TRACK:a.trigger(m.SUBTITLE_TRACK_LOADED,{details:e,track:n.levelOrTrack,id:h||0,groupId:d||"",stats:r,networkDetails:s,deliveryDirectives:p});break}}}class c{static get version(){return Ls}static isMSESupported(){return sl()}static isSupported(){return Gu()}static getMediaSource(){return ve()}static get Events(){return m}static get MetadataSchema(){return oi}static get ErrorTypes(){return he}static get ErrorDetails(){return W}static get DefaultConfig(){return c.defaultConfig?c.defaultConfig:MA}static set DefaultConfig(e){c.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 ts,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=we(e.debug||!1,"Hls instance",e.assetPlayerId),r=this.config=el(c.DefaultConfig,e,t);this.userConfig=e,r.progressive&&Ou(r,t);const{abrController:n,bufferController:s,capLevelController:A,errorController:a,fpsController:l}=r,o=new a(this),h=this.abrController=new n(this),d=new Mt(this),p=r.interstitialsController,v=p?this.interstitialsController=new p(this,c):null,b=this.bufferController=new s(this,d),S=this.capLevelController=new A(this),F=new l(this),te=new f(this),fe=r.contentSteeringController,oe=fe?new fe(this):null,pe=this.levelController=new $u(this,oe),Te=new Hu(this),Ke=new zu(this.config),xe=this.streamController=new Zu(this,d,Ke),$e=this.gapController=new Pu(this,d);S.setStreamController(xe),F.setStreamController(xe);const st=[te,pe,xe];v&&st.splice(1,0,v),oe&&st.splice(1,0,oe),this.networkControllers=st;const Pe=[h,b,$e,S,F,Te,d];this.audioTrackController=this.createController(r.audioTrackController,st);const Bt=r.audioStreamController;Bt&&st.push(this.audioStreamController=new Bt(this,d,Ke)),this.subtitleTrackController=this.createController(r.subtitleTrackController,st);const kt=r.subtitleStreamController;kt&&st.push(this.subtititleStreamController=new kt(this,d,Ke)),this.createController(r.timelineController,Pe),Ke.emeController=this.emeController=this.createController(r.emeController,Pe),this.cmcdController=this.createController(r.cmcdController,Pe),this.latencyController=this.createController(Ku,Pe),this.coreComponents=Pe,st.push(o);const Qr=o.onErrorOut;typeof Qr=="function"&&this.on(m.ERROR,Qr,o),this.on(m.MANIFEST_LOADED,te.onManifestLoaded,te)}createController(e,t){if(e){const r=new e(this);return t&&t.push(r),r}return null}on(e,t,r=this){this._emitter.on(e,t,r)}once(e,t,r=this){this._emitter.once(e,t,r)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,r=this,n){this._emitter.off(e,t,r,n)}listeners(e){return this._emitter.listeners(e)}emit(e,t,r){return this._emitter.emit(e,t,r)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(r){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+r.message+'". Here is a stacktrace:',r),!this.triggeringException){this.triggeringException=!0;const n=e===m.ERROR;this.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.INTERNAL_EXCEPTION,fatal:n,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(m.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 s=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.ATTACH_MEDIA_ERROR,fatal:!0,error:s});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,r=t?e.media:e,n=t?e:{media:r};this._media=r,this.trigger(m.MEDIA_ATTACHING,n)}detachMedia(){this.logger.log("detachMedia"),this.trigger(m.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(m.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,r=this._url,n=this._url=re.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${n}`),t&&r&&(r!==n||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(m.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 r=0;r<this.networkControllers.length&&(this.networkControllers[r].startLoad(e,t),!(!this.started||!this.networkControllers));r++);}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={[O.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[O.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[O.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=Bl()),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){Or(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 r=e.length;for(let n=0;n<r;n++)if(e[n].maxBitrate>=t)return n;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:r}=this;let n;if(t===-1&&e!=null&&e.length?n=e.length-1:n=t,r)for(let s=n;s--;){const A=e[s].attrs["HDCP-LEVEL"];if(A&&A<=r)return s}return n}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 r=lr(t);return Er(e,r,navigator.mediaCapabilities)}}c.defaultConfig=void 0}}]);
}());