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

1047 lines
1.4 MiB

!(function(){var nc=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[2303],{95869:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return G}});var M=x(72308),me=x(59301),be={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"},we=be,W=x(7657),d=function(S,k){return me.createElement(W.Z,(0,M.Z)({},S,{ref:k,icon:we}))},ye=me.forwardRef(d),G=ye},65352:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return He}});var M=x(77321),me=x(52487),be=x(74416),we=x(43403),W=x(92310),d=x.n(W),ye=x(29301),G=x(76846),A=x(96452),S=x(6089),k=x(80402),p=x(34280),m=x(49658),B=x(59301),F=x(72308),V=x(77900),j=x(8654);function se(Se){var I=Se.prefixCls,g=Se.align,v=Se.arrow,Q=Se.arrowPos,b=v||{},w=b.className,D=b.content,Ae=Q.x,L=Ae===void 0?0:Ae,oe=Q.y,re=oe===void 0?0:oe,Be=B.useRef();if(!g||!g.points)return null;var Ce={position:"absolute"};if(g.autoArrow!==!1){var Ie=g.points[0],Re=g.points[1],ht=Ie[0],Ye=Ie[1],nt=Re[0],At=Re[1];ht===nt||!["t","b"].includes(ht)?Ce.top=re:ht==="t"?Ce.top=0:Ce.bottom=0,Ye===At||!["l","r"].includes(Ye)?Ce.left=L:Ye==="l"?Ce.left=0:Ce.right=0}return B.createElement("div",{ref:Be,className:d()("".concat(I,"-arrow"),w),style:Ce},D)}function H(Se){var I=Se.prefixCls,g=Se.open,v=Se.zIndex,Q=Se.mask,b=Se.motion;return Q?B.createElement(V.default,(0,F.Z)({},b,{motionAppear:!0,visible:g,removeOnLeave:!0}),function(w){var D=w.className;return B.createElement("div",{style:{zIndex:v},className:d()("".concat(I,"-mask"),D)})}):null}var X=B.memo(function(Se){var I=Se.children;return I},function(Se,I){return I.cache}),P=X,R=B.forwardRef(function(Se,I){var g=Se.popup,v=Se.className,Q=Se.prefixCls,b=Se.style,w=Se.target,D=Se.onVisibleChanged,Ae=Se.open,L=Se.keepDom,oe=Se.fresh,re=Se.onClick,Be=Se.mask,Ce=Se.arrow,Ie=Se.arrowPos,Re=Se.align,ht=Se.motion,Ye=Se.maskMotion,nt=Se.forceRender,At=Se.getPopupContainer,Ut=Se.autoDestroy,Et=Se.portal,vt=Se.zIndex,tn=Se.onMouseEnter,en=Se.onMouseLeave,Pt=Se.onPointerEnter,dn=Se.onPointerDownCapture,Ln=Se.ready,zt=Se.offsetX,cn=Se.offsetY,qe=Se.offsetR,Ke=Se.offsetB,je=Se.onAlign,le=Se.onPrepare,Ee=Se.stretch,ve=Se.targetWidth,Te=Se.targetHeight,ne=typeof g=="function"?g():g,Nt=Ae||L,$t=(At==null?void 0:At.length)>0,Ft=B.useState(!At||!$t),vn=(0,me.Z)(Ft,2),tr=vn[0],Kn=vn[1];if((0,p.Z)(function(){!tr&&$t&&w&&Kn(!0)},[tr,$t,w]),!tr)return null;var Mn="auto",In={left:"-1000vw",top:"-1000vh",right:Mn,bottom:Mn};if(Ln||!Ae){var nr,fr=Re.points,qn=Re.dynamicInset||((nr=Re._experimental)===null||nr===void 0?void 0:nr.dynamicInset),ur=qn&&fr[0][1]==="r",$n=qn&&fr[0][0]==="b";ur?(In.right=qe,In.left=Mn):(In.left=zt,In.right=Mn),$n?(In.bottom=Ke,In.top=Mn):(In.top=cn,In.bottom=Mn)}var Nn={};return Ee&&(Ee.includes("height")&&Te?Nn.height=Te:Ee.includes("minHeight")&&Te&&(Nn.minHeight=Te),Ee.includes("width")&&ve?Nn.width=ve:Ee.includes("minWidth")&&ve&&(Nn.minWidth=ve)),Ae||(Nn.pointerEvents="none"),B.createElement(Et,{open:nt||Nt,getContainer:At&&function(){return At(w)},autoDestroy:Ut},B.createElement(H,{prefixCls:Q,open:Ae,zIndex:vt,mask:Be,motion:Ye}),B.createElement(ye.Z,{onResize:je,disabled:!Ae},function(Ge){return B.createElement(V.default,(0,F.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:nt,leavedClassName:"".concat(Q,"-hidden")},ht,{onAppearPrepare:le,onEnterPrepare:le,visible:Ae,onVisibleChanged:function(qt){var Mt;ht==null||(Mt=ht.onVisibleChanged)===null||Mt===void 0||Mt.call(ht,qt),D(qt)}}),function(Ue,qt){var Mt=Ue.className,an=Ue.style,An=d()(Q,Mt,v);return B.createElement("div",{ref:(0,j.sQ)(Ge,I,qt),className:An,style:(0,M.Z)((0,M.Z)((0,M.Z)((0,M.Z)({"--arrow-x":"".concat(Ie.x||0,"px"),"--arrow-y":"".concat(Ie.y||0,"px")},In),Nn),an),{},{boxSizing:"border-box",zIndex:vt},b),onMouseEnter:tn,onMouseLeave:en,onPointerEnter:Pt,onClick:re,onPointerDownCapture:dn},Ce&&B.createElement(se,{prefixCls:Q,arrow:Ce,arrowPos:Ie,align:Re}),B.createElement(P,{cache:!Ae&&!oe},ne))})}))}),fe=R,de=B.forwardRef(function(Se,I){var g=Se.children,v=Se.getTriggerDOMNode,Q=(0,j.Yr)(g),b=B.useCallback(function(D){(0,j.mH)(I,v?v(D):D)},[v]),w=(0,j.x1)(b,(0,j.C4)(g));return Q?B.cloneElement(g,{ref:w}):g}),ie=de,q=B.createContext(null),ge=q;function z(Se){return Se?Array.isArray(Se)?Se:[Se]:[]}function Fe(Se,I,g,v){return B.useMemo(function(){var Q=z(g!=null?g:I),b=z(v!=null?v:I),w=new Set(Q),D=new Set(b);return Se&&(w.has("hover")&&(w.delete("hover"),w.add("click")),D.has("hover")&&(D.delete("hover"),D.add("click"))),[w,D]},[Se,I,g,v])}var Z=x(29194);function U(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],g=arguments.length>2?arguments[2]:void 0;return g?Se[0]===I[0]:Se[0]===I[0]&&Se[1]===I[1]}function K(Se,I,g,v){for(var Q=g.points,b=Object.keys(Se),w=0;w<b.length;w+=1){var D,Ae=b[w];if(U((D=Se[Ae])===null||D===void 0?void 0:D.points,Q,v))return"".concat(I,"-placement-").concat(Ae)}return""}function ee(Se,I,g,v){return I||(g?{motionName:"".concat(Se,"-").concat(g)}:v?{motionName:v}:null)}function he(Se){return Se.ownerDocument.defaultView}function ae(Se){for(var I=[],g=Se==null?void 0:Se.parentElement,v=["hidden","scroll","clip","auto"];g;){var Q=he(g).getComputedStyle(g),b=Q.overflowX,w=Q.overflowY,D=Q.overflow;[b,w,D].some(function(Ae){return v.includes(Ae)})&&I.push(g),g=g.parentElement}return I}function _(Se){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Se)?I:Se}function y(Se){return _(parseFloat(Se),0)}function Y(Se,I){var g=(0,M.Z)({},Se);return(I||[]).forEach(function(v){if(!(v instanceof HTMLBodyElement||v instanceof HTMLHtmlElement)){var Q=he(v).getComputedStyle(v),b=Q.overflow,w=Q.overflowClipMargin,D=Q.borderTopWidth,Ae=Q.borderBottomWidth,L=Q.borderLeftWidth,oe=Q.borderRightWidth,re=v.getBoundingClientRect(),Be=v.offsetHeight,Ce=v.clientHeight,Ie=v.offsetWidth,Re=v.clientWidth,ht=y(D),Ye=y(Ae),nt=y(L),At=y(oe),Ut=_(Math.round(re.width/Ie*1e3)/1e3),Et=_(Math.round(re.height/Be*1e3)/1e3),vt=(Ie-Re-nt-At)*Ut,tn=(Be-Ce-ht-Ye)*Et,en=ht*Et,Pt=Ye*Et,dn=nt*Ut,Ln=At*Ut,zt=0,cn=0;if(b==="clip"){var qe=y(w);zt=qe*Ut,cn=qe*Et}var Ke=re.x+dn-zt,je=re.y+en-cn,le=Ke+re.width+2*zt-dn-Ln-vt,Ee=je+re.height+2*cn-en-Pt-tn;g.left=Math.max(g.left,Ke),g.top=Math.max(g.top,je),g.right=Math.min(g.right,le),g.bottom=Math.min(g.bottom,Ee)}}),g}function ue(Se){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,g="".concat(I),v=g.match(/^(.*)\%$/);return v?Se*(parseFloat(v[1])/100):parseFloat(g)}function Qe(Se,I){var g=I||[],v=(0,me.Z)(g,2),Q=v[0],b=v[1];return[ue(Se.width,Q),ue(Se.height,b)]}function et(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Se[0],Se[1]]}function gt(Se,I){var g=I[0],v=I[1],Q,b;return g==="t"?b=Se.y:g==="b"?b=Se.y+Se.height:b=Se.y+Se.height/2,v==="l"?Q=Se.x:v==="r"?Q=Se.x+Se.width:Q=Se.x+Se.width/2,{x:Q,y:b}}function bt(Se,I){var g={t:"b",b:"t",l:"r",r:"l"};return Se.map(function(v,Q){return Q===I?g[v]||"c":v}).join("")}function Vt(Se,I,g,v,Q,b,w){var D=B.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Q[v]||{}}),Ae=(0,me.Z)(D,2),L=Ae[0],oe=Ae[1],re=B.useRef(0),Be=B.useMemo(function(){return I?ae(I):[]},[I]),Ce=B.useRef({}),Ie=function(){Ce.current={}};Se||Ie();var Re=(0,S.Z)(function(){if(I&&g&&Se){let Pr=function(On,fn){var Gn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yt,Er=Ft.x+On,Sr=Ft.y+fn,ii=Er+ur,$r=Sr+qn,Zr=Math.max(Er,Gn.left),hn=Math.max(Sr,Gn.top),sr=Math.min(ii,Gn.right),Cr=Math.min($r,Gn.bottom);return Math.max(0,(sr-Zr)*(Cr-hn))},er=function(){tt=Ft.y+xe,Je=tt+qn,at=Ft.x+ce,ut=at+ur};var nt,At,Ut,Et,vt=I,tn=vt.ownerDocument,en=he(vt),Pt=en.getComputedStyle(vt),dn=Pt.width,Ln=Pt.height,zt=Pt.position,cn=vt.style.left,qe=vt.style.top,Ke=vt.style.right,je=vt.style.bottom,le=vt.style.overflow,Ee=(0,M.Z)((0,M.Z)({},Q[v]),b),ve=tn.createElement("div");(nt=vt.parentElement)===null||nt===void 0||nt.appendChild(ve),ve.style.left="".concat(vt.offsetLeft,"px"),ve.style.top="".concat(vt.offsetTop,"px"),ve.style.position=zt,ve.style.height="".concat(vt.offsetHeight,"px"),ve.style.width="".concat(vt.offsetWidth,"px"),vt.style.left="0",vt.style.top="0",vt.style.right="auto",vt.style.bottom="auto",vt.style.overflow="hidden";var Te;if(Array.isArray(g))Te={x:g[0],y:g[1],width:0,height:0};else{var ne,Nt,$t=g.getBoundingClientRect();$t.x=(ne=$t.x)!==null&&ne!==void 0?ne:$t.left,$t.y=(Nt=$t.y)!==null&&Nt!==void 0?Nt:$t.top,Te={x:$t.x,y:$t.y,width:$t.width,height:$t.height}}var Ft=vt.getBoundingClientRect();Ft.x=(At=Ft.x)!==null&&At!==void 0?At:Ft.left,Ft.y=(Ut=Ft.y)!==null&&Ut!==void 0?Ut:Ft.top;var vn=tn.documentElement,tr=vn.clientWidth,Kn=vn.clientHeight,Mn=vn.scrollWidth,In=vn.scrollHeight,nr=vn.scrollTop,fr=vn.scrollLeft,qn=Ft.height,ur=Ft.width,$n=Te.height,Nn=Te.width,Ge={left:0,top:0,right:tr,bottom:Kn},Ue={left:-fr,top:-nr,right:Mn-fr,bottom:In-nr},qt=Ee.htmlRegion,Mt="visible",an="visibleFirst";qt!=="scroll"&&qt!==an&&(qt=Mt);var An=qt===an,yn=Y(Ue,Be),gn=Y(Ge,Be),Yt=qt===Mt?gn:yn,Tt=An?gn:Yt;vt.style.left="auto",vt.style.top="auto",vt.style.right="0",vt.style.bottom="0";var Qt=vt.getBoundingClientRect();vt.style.left=cn,vt.style.top=qe,vt.style.right=Ke,vt.style.bottom=je,vt.style.overflow=le,(Et=vt.parentElement)===null||Et===void 0||Et.removeChild(ve);var ln=_(Math.round(ur/parseFloat(dn)*1e3)/1e3),sn=_(Math.round(qn/parseFloat(Ln)*1e3)/1e3);if(ln===0||sn===0||(0,G.Sh)(g)&&!(0,Z.Z)(g))return;var wn=Ee.offset,Un=Ee.targetOffset,un=Qe(Ft,wn),rn=(0,me.Z)(un,2),Me=rn[0],ct=rn[1],St=Qe(Te,Un),wt=(0,me.Z)(St,2),Wt=wt[0],st=wt[1];Te.x-=Wt,Te.y-=st;var Bt=Ee.points||[],Ht=(0,me.Z)(Bt,2),nn=Ht[0],mn=Ht[1],Bn=et(mn),Dn=et(nn),Ct=gt(Te,Bn),N=gt(Ft,Dn),O=(0,M.Z)({},Ee),ce=Ct.x-N.x+Me,xe=Ct.y-N.y+ct,$e=Pr(ce,xe),Pe=Pr(ce,xe,gn),Xe=gt(Te,["t","l"]),lt=gt(Ft,["t","l"]),Zt=gt(Te,["b","r"]),Kt=gt(Ft,["b","r"]),Ot=Ee.overflow||{},Gt=Ot.adjustX,pe=Ot.adjustY,Ve=Ot.shiftX,Ze=Ot.shiftY,ke=function(fn){return typeof fn=="boolean"?fn:fn>=0},tt,Je,at,ut;er();var pt=ke(pe),ze=Dn[0]===Bn[0];if(pt&&Dn[0]==="t"&&(Je>Tt.bottom||Ce.current.bt)){var it=xe;ze?it-=qn-$n:it=Xe.y-Kt.y-ct;var ot=Pr(ce,it),yt=Pr(ce,it,gn);ot>$e||ot===$e&&(!An||yt>=Pe)?(Ce.current.bt=!0,xe=it,ct=-ct,O.points=[bt(Dn,0),bt(Bn,0)]):Ce.current.bt=!1}if(pt&&Dn[0]==="b"&&(tt<Tt.top||Ce.current.tb)){var ft=xe;ze?ft+=qn-$n:ft=Zt.y-lt.y-ct;var Jt=Pr(ce,ft),on=Pr(ce,ft,gn);Jt>$e||Jt===$e&&(!An||on>=Pe)?(Ce.current.tb=!0,xe=ft,ct=-ct,O.points=[bt(Dn,0),bt(Bn,0)]):Ce.current.tb=!1}var En=ke(Gt),kn=Dn[1]===Bn[1];if(En&&Dn[1]==="l"&&(ut>Tt.right||Ce.current.rl)){var Cn=ce;kn?Cn-=ur-Nn:Cn=Xe.x-Kt.x-Me;var Rn=Pr(Cn,xe),Pn=Pr(Cn,xe,gn);Rn>$e||Rn===$e&&(!An||Pn>=Pe)?(Ce.current.rl=!0,ce=Cn,Me=-Me,O.points=[bt(Dn,1),bt(Bn,1)]):Ce.current.rl=!1}if(En&&Dn[1]==="r"&&(at<Tt.left||Ce.current.lr)){var _n=ce;kn?_n+=ur-Nn:_n=Zt.x-lt.x-Me;var Wn=Pr(_n,xe),Hn=Pr(_n,xe,gn);Wn>$e||Wn===$e&&(!An||Hn>=Pe)?(Ce.current.lr=!0,ce=_n,Me=-Me,O.points=[bt(Dn,1),bt(Bn,1)]):Ce.current.lr=!1}er();var Jn=Ve===!0?0:Ve;typeof Jn=="number"&&(at<gn.left&&(ce-=at-gn.left-Me,Te.x+Nn<gn.left+Jn&&(ce+=Te.x-gn.left+Nn-Jn)),ut>gn.right&&(ce-=ut-gn.right-Me,Te.x>gn.right-Jn&&(ce+=Te.x-gn.right+Jn)));var pn=Ze===!0?0:Ze;typeof pn=="number"&&(tt<gn.top&&(xe-=tt-gn.top-ct,Te.y+$n<gn.top+pn&&(xe+=Te.y-gn.top+$n-pn)),Je>gn.bottom&&(xe-=Je-gn.bottom-ct,Te.y>gn.bottom-pn&&(xe+=Te.y-gn.bottom+pn)));var rr=Ft.x+ce,hr=rr+ur,zn=Ft.y+xe,Vn=zn+qn,jn=Te.x,Fn=jn+Nn,Yn=Te.y,Sn=Yn+$n,vr=Math.max(rr,jn),lr=Math.min(hr,Fn),pr=(vr+lr)/2,Ir=pr-rr,zr=Math.max(zn,Yn),ni=Math.min(Vn,Sn),jr=(zr+ni)/2,Jr=jr-zn;w==null||w(I,O);var Yr=Qt.right-Ft.x-(ce+Ft.width),cr=Qt.bottom-Ft.y-(xe+Ft.height);ln===1&&(ce=Math.round(ce),Yr=Math.round(Yr)),sn===1&&(xe=Math.round(xe),cr=Math.round(cr));var Fr={ready:!0,offsetX:ce/ln,offsetY:xe/sn,offsetR:Yr/ln,offsetB:cr/sn,arrowX:Ir/ln,arrowY:Jr/sn,scaleX:ln,scaleY:sn,align:O};oe(Fr)}}),ht=function(){re.current+=1;var At=re.current;Promise.resolve().then(function(){re.current===At&&Re()})},Ye=function(){oe(function(At){return(0,M.Z)((0,M.Z)({},At),{},{ready:!1})})};return(0,p.Z)(Ye,[v]),(0,p.Z)(function(){Se||Ye()},[Se]),[L.ready,L.offsetX,L.offsetY,L.offsetR,L.offsetB,L.arrowX,L.arrowY,L.scaleX,L.scaleY,L.align,ht]}var Rt=x(80702);function te(Se,I,g,v,Q){(0,p.Z)(function(){if(Se&&I&&g){let re=function(){v(),Q()};var b=I,w=g,D=ae(b),Ae=ae(w),L=he(w),oe=new Set([L].concat((0,Rt.Z)(D),(0,Rt.Z)(Ae)));return oe.forEach(function(Be){Be.addEventListener("scroll",re,{passive:!0})}),L.addEventListener("resize",re,{passive:!0}),v(),function(){oe.forEach(function(Be){Be.removeEventListener("scroll",re),L.removeEventListener("resize",re)})}}},[Se,I,g])}var Le=x(48736);function mt(Se,I,g,v,Q,b,w,D){var Ae=B.useRef(Se);Ae.current=Se;var L=B.useRef(!1);B.useEffect(function(){if(I&&v&&(!Q||b)){var re=function(){L.current=!1},Be=function(Ut){var Et;Ae.current&&!w(((Et=Ut.composedPath)===null||Et===void 0||(Et=Et.call(Ut))===null||Et===void 0?void 0:Et[0])||Ut.target)&&!L.current&&D(!1)},Ce=he(v);Ce.addEventListener("pointerdown",re,!0),Ce.addEventListener("mousedown",Be,!0),Ce.addEventListener("contextmenu",Be,!0);var Ie=(0,A.A)(g);if(Ie&&(Ie.addEventListener("mousedown",Be,!0),Ie.addEventListener("contextmenu",Be,!0)),0)var Re,ht,Ye,nt;return function(){Ce.removeEventListener("pointerdown",re,!0),Ce.removeEventListener("mousedown",Be,!0),Ce.removeEventListener("contextmenu",Be,!0),Ie&&(Ie.removeEventListener("mousedown",Be,!0),Ie.removeEventListener("contextmenu",Be,!0))}}},[I,g,v,Q,b]);function oe(){L.current=!0}return oe}var Ne=["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 It(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:we.Z,I=B.forwardRef(function(g,v){var Q=g.prefixCls,b=Q===void 0?"rc-trigger-popup":Q,w=g.children,D=g.action,Ae=D===void 0?"hover":D,L=g.showAction,oe=g.hideAction,re=g.popupVisible,Be=g.defaultPopupVisible,Ce=g.onPopupVisibleChange,Ie=g.afterPopupVisibleChange,Re=g.mouseEnterDelay,ht=g.mouseLeaveDelay,Ye=ht===void 0?.1:ht,nt=g.focusDelay,At=g.blurDelay,Ut=g.mask,Et=g.maskClosable,vt=Et===void 0?!0:Et,tn=g.getPopupContainer,en=g.forceRender,Pt=g.autoDestroy,dn=g.destroyPopupOnHide,Ln=g.popup,zt=g.popupClassName,cn=g.popupStyle,qe=g.popupPlacement,Ke=g.builtinPlacements,je=Ke===void 0?{}:Ke,le=g.popupAlign,Ee=g.zIndex,ve=g.stretch,Te=g.getPopupClassNameFromAlign,ne=g.fresh,Nt=g.alignPoint,$t=g.onPopupClick,Ft=g.onPopupAlign,vn=g.arrow,tr=g.popupMotion,Kn=g.maskMotion,Mn=g.popupTransitionName,In=g.popupAnimation,nr=g.maskTransitionName,fr=g.maskAnimation,qn=g.className,ur=g.getTriggerDOMNode,$n=(0,be.Z)(g,Ne),Nn=Pt||dn||!1,Ge=B.useState(!1),Ue=(0,me.Z)(Ge,2),qt=Ue[0],Mt=Ue[1];(0,p.Z)(function(){Mt((0,m.Z)())},[]);var an=B.useRef({}),An=B.useContext(ge),yn=B.useMemo(function(){return{registerSubPopup:function(sr,Cr){an.current[sr]=Cr,An==null||An.registerSubPopup(sr,Cr)}}},[An]),gn=(0,k.Z)(),Yt=B.useState(null),Tt=(0,me.Z)(Yt,2),Qt=Tt[0],ln=Tt[1],sn=B.useRef(null),wn=(0,S.Z)(function(hn){sn.current=hn,(0,G.Sh)(hn)&&Qt!==hn&&ln(hn),An==null||An.registerSubPopup(gn,hn)}),Un=B.useState(null),un=(0,me.Z)(Un,2),rn=un[0],Me=un[1],ct=B.useRef(null),St=(0,S.Z)(function(hn){(0,G.Sh)(hn)&&rn!==hn&&(Me(hn),ct.current=hn)}),wt=B.Children.only(w),Wt=(wt==null?void 0:wt.props)||{},st={},Bt=(0,S.Z)(function(hn){var sr,Cr,_r=rn;return(_r==null?void 0:_r.contains(hn))||((sr=(0,A.A)(_r))===null||sr===void 0?void 0:sr.host)===hn||hn===_r||(Qt==null?void 0:Qt.contains(hn))||((Cr=(0,A.A)(Qt))===null||Cr===void 0?void 0:Cr.host)===hn||hn===Qt||Object.values(an.current).some(function(br){return(br==null?void 0:br.contains(hn))||hn===br})}),Ht=ee(b,tr,In,Mn),nn=ee(b,Kn,fr,nr),mn=B.useState(Be||!1),Bn=(0,me.Z)(mn,2),Dn=Bn[0],Ct=Bn[1],N=re!=null?re:Dn,O=(0,S.Z)(function(hn){re===void 0&&Ct(hn)});(0,p.Z)(function(){Ct(re||!1)},[re]);var ce=B.useRef(N);ce.current=N;var xe=B.useRef([]);xe.current=[];var $e=(0,S.Z)(function(hn){var sr;O(hn),((sr=xe.current[xe.current.length-1])!==null&&sr!==void 0?sr:N)!==hn&&(xe.current.push(hn),Ce==null||Ce(hn))}),Pe=B.useRef(),Xe=function(){clearTimeout(Pe.current)},lt=function(sr){var Cr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Xe(),Cr===0?$e(sr):Pe.current=setTimeout(function(){$e(sr)},Cr*1e3)};B.useEffect(function(){return Xe},[]);var Zt=B.useState(!1),Kt=(0,me.Z)(Zt,2),Ot=Kt[0],Gt=Kt[1];(0,p.Z)(function(hn){(!hn||N)&&Gt(!0)},[N]);var pe=B.useState(null),Ve=(0,me.Z)(pe,2),Ze=Ve[0],ke=Ve[1],tt=B.useState(null),Je=(0,me.Z)(tt,2),at=Je[0],ut=Je[1],pt=function(sr){ut([sr.clientX,sr.clientY])},ze=Vt(N,Qt,Nt&&at!==null?at:rn,qe,je,le,Ft),it=(0,me.Z)(ze,11),ot=it[0],yt=it[1],ft=it[2],Jt=it[3],on=it[4],En=it[5],kn=it[6],Cn=it[7],Rn=it[8],Pn=it[9],_n=it[10],Wn=Fe(qt,Ae,L,oe),Hn=(0,me.Z)(Wn,2),Jn=Hn[0],pn=Hn[1],rr=Jn.has("click"),hr=pn.has("click")||pn.has("contextMenu"),zn=(0,S.Z)(function(){Ot||_n()}),Vn=function(){ce.current&&Nt&&hr&&lt(!1)};te(N,rn,Qt,zn,Vn),(0,p.Z)(function(){zn()},[at,qe]),(0,p.Z)(function(){N&&!(je!=null&&je[qe])&&zn()},[JSON.stringify(le)]);var jn=B.useMemo(function(){var hn=K(je,b,Pn,Nt);return d()(hn,Te==null?void 0:Te(Pn))},[Pn,Te,je,b,Nt]);B.useImperativeHandle(v,function(){return{nativeElement:ct.current,popupElement:sn.current,forceAlign:zn}});var Fn=B.useState(0),Yn=(0,me.Z)(Fn,2),Sn=Yn[0],vr=Yn[1],lr=B.useState(0),pr=(0,me.Z)(lr,2),Ir=pr[0],zr=pr[1],ni=function(){if(ve&&rn){var sr=rn.getBoundingClientRect();vr(sr.width),zr(sr.height)}},jr=function(){ni(),zn()},Jr=function(sr){Gt(!1),_n(),Ie==null||Ie(sr)},Yr=function(){return new Promise(function(sr){ni(),ke(function(){return sr})})};(0,p.Z)(function(){Ze&&(_n(),Ze(),ke(null))},[Ze]);function cr(hn,sr,Cr,_r){st[hn]=function(br){var Vr;_r==null||_r(br),lt(sr,Cr);for(var Ur=arguments.length,si=new Array(Ur>1?Ur-1:0),Or=1;Or<Ur;Or++)si[Or-1]=arguments[Or];(Vr=Wt[hn])===null||Vr===void 0||Vr.call.apply(Vr,[Wt,br].concat(si))}}(rr||hr)&&(st.onClick=function(hn){var sr;ce.current&&hr?lt(!1):!ce.current&&rr&&(pt(hn),lt(!0));for(var Cr=arguments.length,_r=new Array(Cr>1?Cr-1:0),br=1;br<Cr;br++)_r[br-1]=arguments[br];(sr=Wt.onClick)===null||sr===void 0||sr.call.apply(sr,[Wt,hn].concat(_r))});var Fr=mt(N,hr,rn,Qt,Ut,vt,Bt,lt),Pr=Jn.has("hover"),er=pn.has("hover"),On,fn;Pr&&(cr("onMouseEnter",!0,Re,function(hn){pt(hn)}),cr("onPointerEnter",!0,Re,function(hn){pt(hn)}),On=function(sr){(N||Ot)&&Qt!==null&&Qt!==void 0&&Qt.contains(sr.target)&&lt(!0,Re)},Nt&&(st.onMouseMove=function(hn){var sr;(sr=Wt.onMouseMove)===null||sr===void 0||sr.call(Wt,hn)})),er&&(cr("onMouseLeave",!1,Ye),cr("onPointerLeave",!1,Ye),fn=function(){lt(!1,Ye)}),Jn.has("focus")&&cr("onFocus",!0,nt),pn.has("focus")&&cr("onBlur",!1,At),Jn.has("contextMenu")&&(st.onContextMenu=function(hn){var sr;ce.current&&pn.has("contextMenu")?lt(!1):(pt(hn),lt(!0)),hn.preventDefault();for(var Cr=arguments.length,_r=new Array(Cr>1?Cr-1:0),br=1;br<Cr;br++)_r[br-1]=arguments[br];(sr=Wt.onContextMenu)===null||sr===void 0||sr.call.apply(sr,[Wt,hn].concat(_r))}),qn&&(st.className=d()(Wt.className,qn));var Gn=(0,M.Z)((0,M.Z)({},Wt),st),Er={},Sr=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Sr.forEach(function(hn){$n[hn]&&(Er[hn]=function(){for(var sr,Cr=arguments.length,_r=new Array(Cr),br=0;br<Cr;br++)_r[br]=arguments[br];(sr=Gn[hn])===null||sr===void 0||sr.call.apply(sr,[Gn].concat(_r)),$n[hn].apply($n,_r)})});var ii=B.cloneElement(wt,(0,M.Z)((0,M.Z)({},Gn),Er)),$r={x:En,y:kn},Zr=vn?(0,M.Z)({},vn!==!0?vn:{}):null;return B.createElement(B.Fragment,null,B.createElement(ye.Z,{disabled:!N,ref:St,onResize:jr},B.createElement(ie,{getTriggerDOMNode:ur},ii)),B.createElement(ge.Provider,{value:yn},B.createElement(fe,{portal:Se,ref:wn,prefixCls:b,popup:Ln,className:d()(zt,jn),style:cn,target:rn,onMouseEnter:On,onMouseLeave:fn,onPointerEnter:On,zIndex:Ee,open:N,keepDom:Ot,fresh:ne,onClick:$t,onPointerDownCapture:Fr,mask:Ut,motion:Ht,maskMotion:nn,onVisibleChanged:Jr,onPrepare:Yr,forceRender:en,autoDestroy:Nn,getPopupContainer:tn,align:Pn,arrow:Zr,arrowPos:$r,ready:ot,offsetX:yt,offsetY:ft,offsetR:Jt,offsetB:on,onAlign:zn,stretch:ve,targetWidth:Sn/Cn,targetHeight:Ir/Rn})))});return I}var He=It(we.Z)},8797:function(Zn,Dt,x){"use strict";var M=x(59301),me=x(93314),be=x(99571),we=Object.defineProperty,W=Object.defineProperties,d=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,S=(B,F,V)=>F in B?we(B,F,{enumerable:!0,configurable:!0,writable:!0,value:V}):B[F]=V,k=(B,F)=>{for(var V in F||(F={}))G.call(F,V)&&S(B,V,F[V]);if(ye)for(var V of ye(F))A.call(F,V)&&S(B,V,F[V]);return B},p=(B,F)=>W(B,d(F));const m=({img:B,buttonProps:F={},styles:V={},customText:j,ButtonText:se,ButtonClick:H,Buttonclass:X,ButtonTwo:P,imgStyles:R,loading:fe=!1,className:de=""})=>M.createElement("section",{className:`tc animated fadeIn ${de}`,style:k({color:"#999",margin:"100px auto",visibility:fe?"hidden":"visible"},V)},M.createElement("img",{src:B||me,style:p(k({},R),{pointerEvents:"none",userSelect:"none"})}),M.createElement("p",{className:"mt20 font14"},j||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&M.createElement(be.ZP,k({className:X,onClick:H},F),se),P&&P);Dt.Z=m},23210:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return X}});var M=x(59301),me={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},be=x(99571),we=x(70557),W=x(23954),d=x(25399),ye=x(955),G=x(94941),A=x(8797),S=x(3294),k=x(19381),p=x(59301),m=Object.defineProperty,B=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,j=(P,R,fe)=>R in P?m(P,R,{enumerable:!0,configurable:!0,writable:!0,value:fe}):P[R]=fe,se=(P,R)=>{for(var fe in R||(R={}))F.call(R,fe)&&j(P,fe,R[fe]);if(B)for(var fe of B(R))V.call(R,fe)&&j(P,fe,R[fe]);return P},H=(P,R,fe)=>new Promise((de,ie)=>{var q=Fe=>{try{z(fe.next(Fe))}catch(Z){ie(Z)}},ge=Fe=>{try{z(fe.throw(Fe))}catch(Z){ie(Z)}},z=Fe=>Fe.done?de(Fe.value):Promise.resolve(Fe.value).then(q,ge);z((fe=fe.apply(P,R)).next())}),X=({editOffice:P="view",data:R,theme:fe,type:de,filename:ie,monacoEditor:q,className:ge,style:z,close:Fe,onClose:Z,hasMask:U,disabledDownload:K,onImgDimensions:ee,showNodata:he,recordInfo:ae})=>{const[_,y]=(0,M.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Y,ue]=(0,M.useState)(""),[Qe,et]=(0,M.useState)(),gt=window.ENV==="build"?"/react/build":"",bt=location.host.startsWith("localhost")?S.Z.PROXY_SERVER:S.Z.API_SERVER,Rt=10*(1024*1024),te=(0,M.useRef)();R!=null&&R.startsWith("/api")&&de!=="txt"&&(R=S.Z.API_SERVER+R);const Le=He=>He.substring(He.lastIndexOf("/")+1).split(".").pop();ie&&q&&(q.filename=ie),(0,M.useEffect)(()=>{var He,Se;const I=(Se=(He=document.cookie)==null?void 0:He.replace(/\s/g,""))==null?void 0:Se.split(";");I==null||I.map(g=>{let v=g.split("=");v[0]==="_educoder_session"&&ue(v[1])})},[]),(0,M.useEffect)(()=>{de==="office"&&(R.indexOf("bigfilescdn.")>-1||R.indexOf("bigfiles1")>-1?et({url:R,fileType:Le(R),model:R.indexOf("model=edit")?"edit":"view"}):mt())},[de,R]);const mt=()=>H(void 0,null,function*(){console.log("data:",R);let He=R;R.startsWith("http")||(He=location.origin+He);let Se=new URL(He).pathname.split("/").pop();const I=yield(0,G.gJ)({attachment_id:Se});I.url=bt+I.url,et(I)}),Ne=()=>{if(R.startsWith("http")||R.startsWith("blob:")){It();return}(0,ye.Sv)(ie||"educoder",R,ie)},It=()=>{ae&&(0,k.fc)({id:ae==null?void 0:ae.id,watch_type:1,course_id:ae==null?void 0:ae.course_id}),(0,ye.Nd)(ie||"educoder",decodeURIComponent(R))};return p.createElement("div",{style:se({},z||{}),className:`${U&&me.bgBlack} ${de?me.wrp:"hide"}`},Fe&&p.createElement("div",{className:me.close,ref:te},!!ee&&p.createElement(d.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>te.current},p.createElement("span",{onClick:()=>{Z(),ee()}},p.createElement("i",{className:"icon-yulanpizhu"}))),!K&&p.createElement(d.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>te.current},p.createElement("span",{onClick:It},p.createElement("i",{className:"icon-quxiaozhiding"}))),p.createElement(d.Z,{title:"\u5173\u95ED",getPopupContainer:()=>te.current},p.createElement("span",{className:"",onClick:Z},p.createElement("i",{className:"icon-guanbi1"})))),p.createElement("div",{className:`${me[ge]} ${ge} ${me.monaco} ${de==="txt"?"show":"hide"}`},de==="txt"&&p.createElement(p.Fragment,null,p.createElement(W.ZP,se({},q)))),de==="audio"&&p.createElement("audio",{src:`${(R==null?void 0:R.indexOf("http://"))>-1||(R==null?void 0:R.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${R}`,autoPlay:!0}),de==="video"&&p.createElement(p.Fragment,null,(R==null?void 0:R.indexOf("http"))>-1?p.createElement("video",{controls:!0,src:`${R}`,autoPlay:!0}):p.createElement("video",{controls:!0,src:`data:video/mp4;base64,${R}`,autoPlay:!0})),de==="office"&&Qe&&p.createElement("iframe",{src:`${gt}/office.html?key=${Qe.key}&url=${btoa(Qe.url)}&callbackUrl=${bt+(Qe.callbackUrl||"")}&fileType=${Qe.fileType}&title=${Qe.title||""}&model=${P}&officeServer=${S.Z.ONLYOFFICE}&disabledDownload=${!!K}`}),de==="html"&&p.createElement("iframe",{src:R+"&disposition=inline"}),de==="pdf"&&p.createElement("iframe",{src:`${gt}/js/pdfview/index.html?filename=${ie||"educoder.pdf"}&url=${encodeURIComponent(R)}&disabledDownload=${!!K}`}),de==="image"&&p.createElement("img",{src:`${(R==null?void 0:R.indexOf("http://"))>-1||(R==null?void 0:R.indexOf("https://"))>-1?"":"data:image/png;base64,"}${R}`}),(de==="other"||de==="download")&&p.createElement(p.Fragment,null,he?p.createElement(A.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:p.createElement(be.ZP,{icon:p.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ne,disabled:K},"\u4E0B\u8F7D")}):p.createElement(be.ZP,{type:"primary",size:"middle",onClick:Ne,disabled:K},p.createElement(we.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Zn,Dt,x){"use strict";x.d(Dt,{z:function(){return de},Z:function(){return ie}});var M=x(59301),me=x(50304),be=x(24768),we=x(64018),W=x(46284),d=x(3294),ye=x(955),G=x(15342),A=x(1012),S=x(23210),k=x(59301),m=({html:q})=>{const ge=(0,M.useRef)(null),z=(0,M.useRef)(null),Fe=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 36px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,M.useEffect)(()=>{const Z=ge.current.attachShadow({mode:"open"});z.current=document.createElement("div"),z.current.className="markdown-body",z.current.innerHTML=q,Z.appendChild(z.current);const U=document.createElement("style");return U.textContent=Fe,Z.appendChild(U),()=>{Z.innerHTML=""}},[]),(0,M.useEffect)(()=>{z.current&&(z.current.innerHTML=q)},[q]),k.createElement("div",{ref:ge})},B=Object.defineProperty,F=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,se=(q,ge,z)=>ge in q?B(q,ge,{enumerable:!0,configurable:!0,writable:!0,value:z}):q[ge]=z,H=(q,ge)=>{for(var z in ge||(ge={}))V.call(ge,z)&&se(q,z,ge[z]);if(F)for(var z of F(ge))j.call(ge,z)&&se(q,z,ge[z]);return q};const X="@\u2581\u2581@",P="@\u2581@",R=/<pre[^>]*>/g;function fe(q){let ge=document.createElement("div");return ge.innerHTML=q,ge.childNodes.length===0?"":ge.childNodes[0].nodeValue}const de=(q,ge)=>{q=q||"";const z=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Fe=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Z=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,U=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ge?q.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(z,(K,ee,he,ae,_,y,Y)=>{const ue=ee||ae||y,Qe=he||_||Y||"?";return d.Z.API_SERVER+"/api/attachments/"+ue+Qe+"&t="+(0,ye.Jn)(ue,Date.now())+(K.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(q=q.replace(U,(K,ee,he,ae,_,y,Y)=>{const ue=ee||ae||y,Qe=he||_||Y||"?";return d.Z.API_SERVER+"/attachments/download/"+ue+Qe+"&t="+(0,ye.Jn)(ue,Date.now())+(K.indexOf(")")>-1?")":"&")}).replace(z,(K,ee,he,ae,_,y,Y)=>{const ue=ee||ae||y,Qe=he||_||Y||"?";return d.Z.API_SERVER+"/api/attachments/"+ue+Qe+"&t="+(0,ye.Jn)(ue,Date.now())+(K.indexOf(")")>-1?")":"&")}).replace(Fe,(K,ee,he,ae,_)=>{const y=ee||ae,Y=he||_||"";return'"'+d.Z.API_SERVER+"/api/attachments/"+y+Y+y+Y+"&t="+(0,ye.Jn)(y,Date.now())}).replace(Z,(K,ee,he,ae,_)=>{const y=ee||ae,Y=he||_||"";return"("+d.Z.API_SERVER+"/files/uploads/"+y+Y+y+Y+"&t="+(0,ye.Jn)(y,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),q)};var ie=({value:q="",className:ge,showTextOnly:z,showLines:Fe,style:Z={},stylesPrev:U={},highlightKeywords:K,showProgramFill:ee,isProgramFill:he,disabledFill:ae=!1,programFillValue:_,onFillChange:y=Qe=>{},onFillBlur:Y=()=>{},onFillFocus:ue=()=>{}})=>{let Qe=String(q);const[et,gt]=(0,M.useState)(""),[bt,Vt]=(0,M.useState)("office"),[Rt,te]=(0,M.useState)([]),Le=(0,M.useRef)("a"+(0,A.Z)()),mt={},Ne=(L,oe,re)=>{const Be=document.createElement(L===P?"input":"textarea");Be.style.width="100%",Be.style.height=L===P?"40px":"151px",Be.rows=5,Be.spellcheck=!1,Be.name="edu-program-fill",Be.placeholder="\u8BF7\u8F93\u5165",Be.dataset.id=oe;const Ce=Object.keys(mt).length;return mt[Ce]=Be,`<span class="edu-program-fill-wrap ${L===P?"":"show"}" style="width:${L===P?"400px":"100%"}" title=${re||""}><span>${Be.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function It(L){return L=L.replace(/!\[.*?\]\(.*?\)/g,""),L=L.replace(/\[.*?\]\(.*?\)/g,""),L=L.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),L=L.replace(/<embed.*?>/g,""),L=L.replace(/<img.*?>/g,""),L=L.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),L=L.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),L=L.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),L=L.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),L}const He=L=>L.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(oe,re){let Be=re.replace(/(\n|\r)/g,"").split("}"),Ce=[];return Be.map(Ie=>{Ie!=""&&Ce.push(`.${Le.current} ${Ie}`)}),`<style>${Ce.join("}")}</style>`}),Se=(0,M.useMemo)(()=>{try{const Be=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ce=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ie=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Re=/\(\/attachments\/download\//g;Qe=Qe.replace(Re,"("+d.Z.API_SERVER+"/attachments/download/").replace(Be,"("+d.Z.API_SERVER+"/api/attachments/").replace(Ce,'"'+d.Z.API_SERVER+"/api/attachments/").replace(Ie,'"'+d.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(Be){}if(ee){let Be=-1;return Qe=Qe.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Ce,Ie,Re){var ht;return++Be,Ne(Ce,Be,(ht=_==null?void 0:_[Be])==null?void 0:ht.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${He(Qe||"")}</pre>`}let L=He(Qe);L=(0,be.ZP)(L);const oe=(0,be.ez)();Qe.match(/\[TOC\]/)&&(L=L.replace("<p>[TOC]</p>",(0,be.Qv)()),(0,be.Iy)()),L=L.replace(/(__special_katext_id_\d+__)/g,(Be,Ce)=>{const{type:Ie,expression:Re}=oe[Ce];return(0,G.renderToString)(fe(Re)||"",{displayMode:Ie==="block",throwOnError:!1,output:"html"})}),L=L.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,be.AL)();const re=document.createElement("div");if(re.innerHTML=L,z)return re.innerText;if(K){const Be=K.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Q(re,Be),re.innerHTML}return setTimeout(()=>D(),500),re.innerHTML},[Qe,K]);(0,M.useEffect)(()=>{b.current&&b.current.querySelectorAll(["input","textarea"]).forEach(oe=>{oe.oninput=I,oe.onblur=g,oe.onfocus=v})},[Rt]),(0,M.useEffect)(()=>{var L,oe,re,Be,Ce;if(_!=null&&_.length)try{const Ie=b.current.querySelectorAll(".edu-program-fill-score"),Re=b.current.querySelectorAll('[name="edu-program-fill"]');for(const[ht,Ye]of Re.entries())Ye.value=((L=_==null?void 0:_[ht])==null?void 0:L.value)||"",((oe=_==null?void 0:_[ht])==null?void 0:oe.type)==="warning"?Ye.className="program-fill-warning":((re=_==null?void 0:_[ht])==null?void 0:re.type)==="success"?Ye.className="program-fill-success":Ye.className="";for(const[ht,Ye]of Ie.entries())Ye.innerHTML=(Be=_==null?void 0:_[ht])!=null&&Be.score?`${(Ce=_==null?void 0:_[ht])==null?void 0:Ce.score}\u5206`:"";te(_)}catch(Ie){console.log(Ie,"error")}},[_]);const I=L=>{Rt[L.target.dataset.id]=Rt[L.target.dataset.id]||{},Rt[L.target.dataset.id].value=L.target.value,te([...Rt]),y(Rt,L.target.dataset.id)},g=L=>{Rt[L.target.dataset.id]=Rt[L.target.dataset.id]||{},Rt[L.target.dataset.id].value=L.target.value,te([...Rt]),Y(Rt,L.target.dataset.id)},v=L=>{Rt[L.target.dataset.id]=Rt[L.target.dataset.id]||{},Rt[L.target.dataset.id].value=L.target.value,te([...Rt]),ue(Rt,L.target.dataset.id)};function Q(L,oe){return L.childNodes.forEach(re=>{var Be;if(re.childNodes.length>0)Q(re,oe);else if(re.nodeName!=="IMG")if(re.innerHTML)re.innerHTML=(Be=re.innerHTML)==null?void 0:Be.replace(new RegExp(oe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ce=document.createElement("span");Ce.innerHTML=re.textContent.replace(new RegExp(oe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),re.replaceWith(Ce)}})}const b=(0,M.useRef)();be.jb.WebkitLineClamp=Fe,Fe&&(Z=H(H({},Z),be.jb));function w(L){let oe=L.target;if(oe.tagName.toUpperCase()==="A"){let re=oe.getAttribute("href");if(re.indexOf("office")>-1)L.preventDefault(),gt(re),Vt("office");else if(re.indexOf("application/pdf")>-1)L.preventDefault(),gt(re),Vt("pdf");else if(re.indexOf("text/html")>-1)L.preventDefault(),gt(re),Vt("html");else if(re.startsWith("#")){L.preventDefault();let Be=document.getElementById(re.replace("#",""));Be&&Be.scrollIntoView(!0)}}}const D=()=>{var L;const oe=(L=b.current)==null?void 0:L.querySelectorAll("video");oe==null||oe.forEach(re=>{if(re.oncontextmenu=()=>!1,re.src.indexOf(".m3u8")>-1&&!re.canPlayType("application/vnd.apple.mpegurl")){if(W.ZP.isSupported()){var Be=new W.ZP;Be.loadSource(re.src),Be.attachMedia(re)}}})};(0,M.useEffect)(()=>{if(b.current&&Se&&Se.match(R)&&window.PR.prettyPrint(),b.current)return b.current.addEventListener("click",w),()=>{var L;(L=b.current)==null||L.removeEventListener("click",w),(0,be.AL)(),(0,be.Iy)()}},[Se,b.current,w]),(0,M.useEffect)(()=>{var L;const oe=re=>{re.preventDefault(),re.clipboardData.setData("text",window.getSelection().toString())};return(L=b.current)==null||L.addEventListener("copy",oe),()=>{var re;(re=b.current)==null||re.removeEventListener("copy",oe)}},[b.current]);const Ae=L=>/<style[\s\S]*?>/i.test(L||"");return M.createElement(M.Fragment,null,z&&M.createElement("div",{ref:b},Se),!z&&!Ae(Se)&&M.createElement("div",{ref:b,style:H({},Z),className:`${ge||""} ${ae?"disabled-fill":""} markdown-body ${Le.current}`,dangerouslySetInnerHTML:{__html:Se}}),!z&&Ae(Se)&&M.createElement(m,{html:Se}),M.createElement(S.Z,{close:!0,data:et,type:et!=null&&et.length?bt:"",style:H({},U),onClose:()=>gt("")}))}},23954:function(Zn,Dt,x){"use strict";x.d(Dt,{SV:function(){return b},ZP:function(){return Q}});var M=x(59301),me=x(76374);const be={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},we={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},W={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},d={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},ye={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
`)}]};var G=x(53184),A=x.n(G),S=Object.defineProperty,k=Object.defineProperties,p=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,V=(w,D,Ae)=>D in w?S(w,D,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):w[D]=Ae,j=(w,D)=>{for(var Ae in D||(D={}))B.call(D,Ae)&&V(w,Ae,D[Ae]);if(m)for(var Ae of m(D))F.call(D,Ae)&&V(w,Ae,D[Ae]);return w},se=(w,D)=>k(w,p(D)),H=(w,D,Ae)=>new Promise((L,oe)=>{var re=Ie=>{try{Ce(Ae.next(Ie))}catch(Re){oe(Re)}},Be=Ie=>{try{Ce(Ae.throw(Ie))}catch(Re){oe(Re)}},Ce=Ie=>Ie.done?L(Ie.value):Promise.resolve(Ie.value).then(re,Be);Ce((Ae=Ae.apply(w,D)).next())});const X={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},P=(w,D)=>D.map(Ae=>({label:Ae,kind:w.languages.CompletionItemKind.Keyword,insertText:Ae})),R=w=>Object.keys(X.tables).map(D=>({label:D,kind:w.languages.CompletionItemKind.Variable,insertText:D})),fe=(w,D)=>{const Ae=X.tables[w];return Ae?Ae.map(L=>({label:L,kind:D.languages.CompletionItemKind.Field,insertText:L})):[]};function de(w,D,Ae,L,oe){let re=D.getWordUntilPosition(Ae),Be={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},Ce=L.map(Ie=>({label:Ie,kind:w.languages.CompletionItemKind.Keyword,insertText:Ie,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}));return oe.map(Ie=>{Ce.push(se(j({},Ie),{range:Be}))}),Ce}var ie=w=>{X.languages.map(oe=>(w.languages.registerDocumentFormattingEditProvider(oe,{provideDocumentFormattingEdits(re,Be,Ce){return H(this,null,function*(){const Ie=A()(re.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:re.getFullModelRange(),text:Ie}]})}}),oe));const D=W.quickKey.map(oe=>({label:oe.label,kind:w.languages.CompletionItemKind.Method,insertText:oe.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ae=d.quickKey.map(oe=>({label:oe.label,kind:w.languages.CompletionItemKind.Method,insertText:oe.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet})),L=we.quickKey.map(oe=>({label:oe.label,kind:w.languages.CompletionItemKind.Method,insertText:oe.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet}));w.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(oe,re){var Be=oe.getWordUntilPosition(re),Ce={startLineNumber:re.lineNumber,endLineNumber:re.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ie=oe.getLineContent(re.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...W.keywords.map(Re=>({label:Re,kind:w.languages.CompletionItemKind.Function,documentation:Re,insertText:Re,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce})),...W.quickKey.map(Re=>({label:Re.label,kind:w.languages.CompletionItemKind.Function,documentation:Re.content,insertText:Ie.startsWith("#")?Re.content.replace(/#/,""):Re.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}))]}}}),w.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(oe,re){var Be=oe.getWordUntilPosition(re),Ce={startLineNumber:re.lineNumber,endLineNumber:re.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn};return{suggestions:[...be.keywords.map(Ie=>({label:Ie,kind:w.languages.CompletionItemKind.Function,documentation:Ie,insertText:Ie,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}))]}}}),w.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(oe,re){var Be=oe.getWordUntilPosition(re),Ce={startLineNumber:re.lineNumber,endLineNumber:re.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ie=oe.getLineContent(re.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...we.keywords.map(Re=>({label:Re,kind:w.languages.CompletionItemKind.Function,documentation:Re,insertText:Re,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce})),...we.quickKey.map(Re=>({label:Re.label,kind:w.languages.CompletionItemKind.Function,documentation:Re.content,insertText:Ie.startsWith("#")?Re.content.replace(/#/,""):Re.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}))]}}}),w.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(oe,re){var Be=oe.getWordUntilPosition(re),Ce={startLineNumber:re.lineNumber,endLineNumber:re.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ie=oe.getLineContent(re.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...ye.keywords.map(Re=>({label:Re,kind:w.languages.CompletionItemKind.Function,documentation:Re,insertText:Re,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce})),...ye.quickKey.map(Re=>({label:Re.label,kind:w.languages.CompletionItemKind.Function,documentation:Re.content,insertText:Ie.startsWith("#")?Re.content.replace(/#/,""):Re.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}))]}}}),w.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(oe,re){var Be=oe.getWordUntilPosition(re),Ce={startLineNumber:re.lineNumber,endLineNumber:re.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ie=oe.getLineContent(re.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...d.keywords.map(Re=>({label:Re,kind:w.languages.CompletionItemKind.Function,documentation:Re,insertText:Re,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce})),...d.quickKey.map(Re=>({label:Re.label,kind:w.languages.CompletionItemKind.Function,documentation:Re.content,insertText:Ie.startsWith("#")?Re.content.replace(/#/,""):Re.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}))]}}})};const q="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ge=Object.defineProperty,z=(w,D,Ae)=>D in w?ge(w,D,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):w[D]=Ae,Fe=(w,D,Ae)=>z(w,typeof D!="symbol"?D+"":D,Ae);const Z=class rc{constructor(D,Ae,L){this.placeholder=D,this.editor=Ae,this.monaco=L,Ae.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return rc.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};Fe(Z,"ID","editor.widget.placeholderHint");var K=Z,ee=x(96236),he=x(6767),ae=x(25399),_=x(89392),y=x(34604),Y=x(56102),ue=Object.defineProperty,Qe=Object.defineProperties,et=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,Rt=(w,D,Ae)=>D in w?ue(w,D,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):w[D]=Ae,te=(w,D)=>{for(var Ae in D||(D={}))bt.call(D,Ae)&&Rt(w,Ae,D[Ae]);if(gt)for(var Ae of gt(D))Vt.call(D,Ae)&&Rt(w,Ae,D[Ae]);return w},Le=(w,D)=>Qe(w,et(D)),mt=(w,D)=>{var Ae={};for(var L in w)bt.call(w,L)&&D.indexOf(L)<0&&(Ae[L]=w[L]);if(w!=null&&gt)for(var L of gt(w))D.indexOf(L)<0&&Vt.call(w,L)&&(Ae[L]=w[L]);return Ae},Ne=(w,D,Ae)=>new Promise((L,oe)=>{var re=Ie=>{try{Ce(Ae.next(Ie))}catch(Re){oe(Re)}},Be=Ie=>{try{Ce(Ae.throw(Ie))}catch(Re){oe(Re)}},Ce=Ie=>Ie.done?L(Ie.value):Promise.resolve(Ie.value).then(re,Be);Ce((Ae=Ae.apply(w,D)).next())});function It(w){return/^\d+$/.test(w)?`${w}px`:w}function He(){}let Se=!1;const I={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function g(w=[]){let D=w;if(Array.isArray(w)){for(let Ae=0;Ae<w.length;Ae++){let L=I[w[Ae]];if(L)return L}return D[0]}return I[D]||D}let v=null;var Q=w=>{var D=w,{width:Ae="100%",height:L="100%",value:oe,language:re="javascript",style:Be={},options:Ce={},overrideServices:Ie={},theme:Re="vs-dark",onEditBlur:ht,isCopy:Ye=!1,onSave:nt,autoHeight:At=!1,forbidCopy:Ut=!1,onChange:Et=He,editorDidMount:vt=He,onFocus:tn=He,onBreakPoint:en=He,breakPointValue:Pt=[],filename:dn="educoder.txt",errorLine:Ln,errorContent:zt="",highlightLine:cn,openBreakPoint:qe=!1,placeholder:Ke="",showMiniMap:je=!0}=D,le=mt(D,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Ee=(0,M.useRef)(),ve=(0,M.useRef)({}),Te=(0,M.useRef)(),ne=(0,M.useRef)(),Nt=(0,M.useRef)([]),$t=(0,M.useRef)(!1),Ft=(0,M.useRef)(),vn=(0,M.useRef)(),tr=(0,M.useRef)(!1),[Kn,Mn]=(0,M.useState)(!1);function In(){let Yt;return Ee.current&&(Yt=new me.Z(Tt=>{for(let Qt of Tt)(Qt.target.offsetHeight>0||Qt.target.offsetWidth>0)&&ve.current.instance.layout()}),Yt.observe(Ee.current)),Yt}function nr(){he.ZP.warning({content:decodeURIComponent(q),key:"monaco-editor-tip"})}const fr=()=>{let Yt=ve.current.instance;if(oe!=null&&Yt&&Kn){const Tt=Yt.getModel();Tt&&oe!==Tt.getValue()&&(Se=!0,Tt.setValue(oe),Yt.layout(),Se=!1)}};(0,M.useEffect)(()=>{const Yt=y.Z.subscribe("formatDocument",Tt=>{var Qt;let ln=ve.current.instance;(Qt=ln==null?void 0:ln.getAction)==null||Qt.call(ln,"editor.action.formatDocument").run()});return window.updateMonacoValue=Tt=>{Et(Tt)},Yt},[]),(0,M.useEffect)(()=>{var Yt;let Tt=ve.current.instance;ne.current&&clearTimeout(ne.current),ne.current=setTimeout(()=>{fr()},500),oe&&(oe!=null&&oe.length)&&((Yt=Tt==null?void 0:Tt.updateOptions)==null||Yt.call(Tt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(oe.split(/\r\n|\r|\n/g).length))+3,5)}))},[oe,Kn,ve.current]),(0,M.useEffect)(()=>{if(Ln&&ve.current&&ve.current.instance){let Tt=ve.current.instance;Tt.changeViewZones(function(Qt){var ln=document.createElement("div");ln.style.padding="10px 20px",ln.style.width="calc(100% - 20px)",ln.className="my-error-line-wrp",ln.innerHTML=zt,Qt.addZone({afterLineNumber:Ln||11,heightInLines:3,domNode:ln})});var Yt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Tt.addOverlayWidget(Yt),Tt.revealPositionInCenter({lineNumber:20,column:1})}},[Ln,ve.current,Kn]);const qn=(Yt="",Tt)=>{if(!Yt||Yt.trim()==="")return!0;const ln=ve.current.instance.getModel().getLineTokens(Tt);let sn=!1;for(let wn=0;wn<2;wn++)ln.getStandardTokenType(wn)===1&&(sn=!0);return sn};(0,M.useEffect)(()=>{var Yt;const Tt=(Yt=ve.current)==null?void 0:Yt.instance;if(Tt&&Kn&&Ut){const Qt=Tt.onDidBlurEditorWidget(()=>{tr.current=!1}),ln=Tt.onDidFocusEditorText(()=>{tr.current=!0});return()=>{Qt.dispose(),ln.dispose()}}},[ve.current,Kn,Ut]),(0,M.useEffect)(()=>{var Yt;if((Yt=ve.current)!=null&&Yt.instance&&Kn&&qe){let Tt=ve.current.instance,Qt=Tt.getModel();if(!Qt)return;(()=>{var st;let Bt=[],Ht=[];const nn=Qt.getAllDecorations();for(let Bn of nn)Bn.options.className==="highlighted-line"&&(Bt.push((st=Bn==null?void 0:Bn.range)==null?void 0:st.startLineNumber),Ht.push(Bn==null?void 0:Bn.id));if(cn===Bt[0])return;Qt.deltaDecorations(Ht,[]);const mn=Qt.getLineCount();cn&&cn<=mn&&(Tt.deltaDecorations([],[{range:new v.Range(cn,1,cn,Qt.getLineMaxColumn(cn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Tt.revealLineInCenter(cn))})();const sn=(st=!1)=>{var Bt;let Ht=[],nn=[];const mn=Qt.getAllDecorations();for(let Bn of mn)Bn.options.linesDecorationsClassName==="breakpoints-select"&&(Ht.push((Bt=Bn==null?void 0:Bn.range)==null?void 0:Bt.startLineNumber),nn.push(Bn==null?void 0:Bn.id));if(st)return{lines:Ht,ids:nn};en(Ht)},wn=st=>Ne(void 0,null,function*(){let Bt={range:new v.Range(st,1,st,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Qt.deltaDecorations([],[Bt]),sn()}),Un=st=>Ne(void 0,null,function*(){let Bt=[];const Ht=Tt.getLineDecorations(st);for(let nn of Ht)nn.options.linesDecorationsClassName==="breakpoints-select"&&Bt.push(nn.id);yield Qt.deltaDecorations(Bt,[]),sn()}),un=st=>{let Bt=Tt.getLineDecorations(st);for(let Ht of Bt)if(Ht.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,_.isEqual)(Pt,sn(!0).lines)){Qt.deltaDecorations(sn(!0).ids,[]);const st=Pt.map(Bt=>({range:new v.Range(Bt,1,Bt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Qt.deltaDecorations([],st)}const rn=Tt.onDidChangeModelContent(st=>{let Bt=Tt.getPosition();if(Bt){let Ht=Bt.lineNumber;clearTimeout(vn.current),vn.current=setTimeout(()=>{qn(Qt.getLineContent(Ht),Ht)?Un(Ht):un(Ht)?(Un(Ht),wn(Ht)):sn()},100)}}),Me=Tt.onMouseDown(st=>{var Bt,Ht,nn;if(st.target.detail&&((nn=(Ht=(Bt=st.target)==null?void 0:Bt.element)==null?void 0:Ht.className)!=null&&nn.includes("line-numbers"))){let mn=st.target.position.lineNumber;if(qn(Qt.getLineContent(mn),mn))return;un(mn)?Un(mn):wn(mn)}}),ct=st=>{let Bt={range:new v.Range(st,1,st,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Nt.current=Tt.deltaDecorations(Nt.current,[Bt])},St=()=>{Nt.current=Tt.deltaDecorations(Nt.current,[])},wt=Tt.onMouseMove(st=>{var Bt,Ht,nn;if(St(),st.target.detail&&((nn=(Ht=(Bt=st.target)==null?void 0:Bt.element)==null?void 0:Ht.className)!=null&&nn.includes("line-numbers"))){let mn=st.target.position.lineNumber;if(qn(Qt.getLineContent(mn),mn))return;ct(mn)}}),Wt=Tt.onMouseLeave(()=>{St()});return()=>{rn.dispose(),Me.dispose(),wt.dispose(),Wt.dispose()}}},[ve.current,Kn,Pt,cn,qe,re]),(0,M.useEffect)(()=>{var Yt;(Yt=ve.current)!=null&&Yt.instance&&qe&&ve.current.instance.setPosition({lineNumber:0,column:0})},[cn]);function ur(){let Yt=ve.current.instance;if(Yt){const Tt=Yt.getSelection(),Qt=ve.current.pastePos||{},ln=new v.Range(Qt.startLineNumber||Tt.endLineNumber,Qt.startColumn||Tt.endColumn,Qt.endLineNumber||Tt.endLineNumber,Qt.endColumn||Tt.endColumn);setTimeout(()=>{Yt.executeEdits("",[{range:ln,text:""}])},300)}}function $n(Yt){(window.navigator.platform.match("Mac")?Yt.metaKey:Yt.ctrlKey)&&Yt.keyCode==83&&(Yt.preventDefault(),nt())}const Nn=()=>{if(At&&ve.current.instance){const Yt=ve.current.instance.getContentHeight();yn(Yt<L?L:Yt)}else yn(L)};function Ge(Yt){var Tt=document.createEvent("MouseEvents");Tt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Yt.dispatchEvent(Tt)}const Ue=Yt=>{if(!tr.current)return;const{keyCode:Tt,ctrlKey:Qt,metaKey:ln,target:sn,type:wn}=Yt;return(wn==="paste"||(Tt===67||Tt===86)&&(ln||Qt))&&sn.nodeName==="TEXTAREA"&&(nr(),Yt.preventDefault()),!1};function qt(Yt,Tt){var Qt=window.URL||window.webkitURL||window,ln=new Blob([Tt]),sn=document.createElementNS("http://www.w3.org/1999/xhtml","a");sn.href=Qt.createObjectURL(ln),sn.download=Yt,Ge(sn)}(0,M.useEffect)(()=>{Nn()},[Nn]),(0,M.useEffect)(()=>{Ee.current&&!Kn&&Promise.all([x.e(8909),x.e(3267)]).then(x.bind(x,71448)).then(Yt=>{try{v=Yt,ve.current.instance=v.editor.create(Ee.current,{value:oe,language:g(re),theme:Re,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:je||!1}},Ie);const Tt=ve.current.instance;let sn=[...ee.BH._menuItems].find(rn=>rn[0]._debugName=="EditorContext")[1],wn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Un=(rn,Me)=>{var ct,St;let wt=rn._first;do Me.includes((St=(ct=wt.element)==null?void 0:ct.command)==null?void 0:St.id)&&rn._remove(wt);while(wt=wt.next)};if(vt(Tt,v),setTimeout(()=>{Nn(),ve.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{qt(dn||"educoder.txt",Tt.getValue())}})},500),ve.current.subscription=Tt.onDidChangeModelContent(rn=>{$t.current?clearTimeout(Ft.current):(Nn(),Et(Tt.getValue(),rn)),Ft.current=setTimeout(()=>{$t.current=!1},500)}),window.Monaco||ie(v,g(re)),Ut&&(Un(sn,wn),Ee.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Ue),window.removeEventListener("paste",Ue),window.addEventListener("keydown",Ue),window.addEventListener("paste",Ue)),window.Monaco=v,ht&&Tt.onDidBlurEditorWidget(()=>{ht(Tt.getValue())}),tn&&Tt.onDidFocusEditorText(()=>{tn(Tt.getValue())}),Ut)try{Tt.onDidPaste(rn=>{const Me=Tt.getSelection(),ct=ve.current.pastePos||{},St=new v.Range(ct.startLineNumber||Me.endLineNumber,ct.startColumn||Me.endColumn,ct.endLineNumber||Me.endLineNumber,ct.endColumn||Me.endColumn);Tt.executeEdits("",[{range:rn.range,text:""}])})}catch(rn){}let un=In();return Ke&&typeof Ke=="string"&&new K(Ke,Tt,v),Mn(!0),()=>{const rn=ve.current.instance;rn.dispose();const Me=rn.getModel();Me&&Me.dispose(),ve.current.subscription&&ve.current.subscription.dispose(),un.unobserve(Ee.current)}}catch(Tt){}})},[]),(0,M.useEffect)(()=>{if(ve.current.instance&&Kn)return document.addEventListener("keydown",$n,!1),()=>{document.removeEventListener("keydown",$n)}},[nt,Kn]),(0,M.useEffect)(()=>{let Yt=ve.current.instance;if(Yt&&Kn){let Tt=g(re);v.editor.setModelLanguage(Yt.getModel(),Tt)}},[re,Kn]),(0,M.useEffect)(()=>{ve.current.instance&&Kn&&v.editor.setTheme(Re)},[Re,Kn]),(0,M.useEffect)(()=>{let Yt=ve.current.instance;Te.current=Ce,Yt&&Kn&&(Yt.updateOptions(te({},Ce)),setTimeout(()=>{Yt.getModel().updateOptions(te({},Ce))},200))},[JSON.stringify(Ce),Kn]),(0,M.useEffect)(()=>{let Yt=ve.current.instance;Yt&&Kn&&Yt.layout()},[Ae,L,Kn]);const[Mt,an]=(0,M.useState)(It(Ae)),[An,yn]=(0,M.useState)(It(L)),gn=Le(te({},Be),{width:Mt,height:An,position:"relative"});return M.createElement("div",{className:"my-monaco-editor",ref:Ee,style:gn},Ye&&M.createElement(Y.CopyToClipboard,{text:oe,onCopy:()=>he.ZP.success("\u590D\u5236\u6210\u529F")},M.createElement(ae.Z,{title:"\u590D\u5236\u4EE3\u7801"},M.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},M.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function b({width:w="100%",height:D="100%",original:Ae,modified:L,language:oe,options:re={}}){const Be=(0,M.useRef)(),[Ce,Ie]=(0,M.useState)(null);function Re(At){let Ut;return Be.current&&(Ut=new me.Z(Et=>{for(let vt of Et)(vt.target.offsetHeight>0||vt.target.offsetWidth>0)&&At.layout()}),Ut.observe(Be.current)),Ut}(0,M.useEffect)(()=>(Be.current&&Promise.all([x.e(8909),x.e(9404)]).then(x.bind(x,2550)).then(At=>{v=At;const Ut=v.editor.createDiffEditor(Be.current,Le(te({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},re),{wordWrap:!0}));Ie(Ut);let Et=Re(Ut);return()=>{Ut.dispose();const vt=Ut.getModel();vt&&vt.dispose(),Et.unobserve(Be.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,M.useEffect)(()=>{Ce&&Ce.setModel({original:v.editor.createModel(Ae,oe),modified:v.editor.createModel(L,oe)})},[Ae,L,oe,Ce]);const ht=It(w),Ye=It(D),nt={width:ht,height:Ye};return M.createElement("div",{className:"my-diff-editor",ref:Be,style:nt})}},67059:function(Zn,Dt,x){"use strict";x.r(Dt),x.d(Dt,{default:function(){return Q}});var M=x(59301),me=x(61186),be=x.n(me),we=x(86129),W=x.n(we),d=x(99064),ye=x(89070),G=x(62957),A=x(6767),S=x(77019),k=x(5269),p=x(99571),m=x(458),B=x(91882),F=x(37285),V=x(54172),j=x(71114),se=x(82326),H=x(29787),X=x(27812),P=x(95869),R=x(87169),fe=x(26227),de=x(3294),ie=x(24065),q=x(955),ge=x(28284),z=x(71051),Fe=x(37568),Z=({defaultValue:b,onBlur:w,max:D,className:Ae="game-score"})=>{const[L,oe]=(0,M.useState)(b);(0,M.useEffect)(()=>{oe(b)},[b]);function re(Ce){oe(Ce)}function Be(){L&&(w(L>D?D:L),oe(null))}return M.createElement(z.Z,{max:D,min:0,className:Ae,value:L,onChange:re,onBlur:Be})},U={greyText:"greyText___lvEE6",info:"info___El01Z",label:"label___GmvST",blackContent:"blackContent___FYo0Z",orangeContent:"orangeContent____uYQ3",inputLabel:"inputLabel___ruiZm",tableTitle:"tableTitle___ir3x7",scoreTable:"scoreTable___b9Z37"},K=x(59301),ee=(b,w,D)=>new Promise((Ae,L)=>{var oe=Ce=>{try{Be(D.next(Ce))}catch(Ie){L(Ie)}},re=Ce=>{try{Be(D.throw(Ce))}catch(Ie){L(Ie)}},Be=Ce=>Ce.done?Ae(Ce.value):Promise.resolve(Ce.value).then(oe,re);Be((D=D.apply(b,w)).next())});const he=({shixunHomeworks:b,dispatch:w,classroomList:D,gethomeworkreport:Ae,homeWorkReport:L})=>{var oe,re;const{shixunWorkReport:Be}=b,Ce=(0,ye.useParams)(),[Ie,Re]=(0,M.useState)(!1),[ht,Ye]=(0,M.useState)(!1),[nt,At]=(0,M.useState)(""),[Ut]=ge.default.useForm(),Et=()=>ee(void 0,null,function*(){Ye(!0);const en=Ut.getFieldsValue();(yield(0,d.ZP)(`/api/student_works/${Ce.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:en.hidden_comment,comment:en.comment}})).status===0&&(A.ZP.success("\u70B9\u8BC4\u6210\u529F"),Ut.resetFields(),w({type:"shixunHomeworks/setActionTabs",payload:{}}),Ae()),Ye(!1)}),vt=()=>ee(void 0,null,function*(){if(!nt){A.ZP.warning("\u8BF7\u586B\u5199\u5206\u6570");return}Ye(!0);const en=Ut.getFieldsValue();(yield(0,d.ZP)(`/api/student_works/${Ce.homeworkId}/add_score.json`,{method:"post",body:{comment:en.comment,score:nt}})).status===0&&(A.ZP.success("\u70B9\u8BC4\u6210\u529F"),w({type:"shixunHomeworks/setActionTabs",payload:{}}),Ae()),Ye(!1)}),tn=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:160,render:en=>en||"--"},{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:en=>en||"--"},{title:"\u5F97\u5206",dataIndex:"score",width:90,render:(en,Pt)=>K.createElement("div",null,K.createElement("span",{style:{color:parseFloat(Pt.score_full)!==parseFloat(en)?"#E30000":"#53C41B"}},en),"/",Pt.score_full)},{title:"\u8C03\u5206",width:100,dataIndex:"action",render:(en,Pt)=>(0,ie.GJ)()?K.createElement(Z,{max:Pt.score_full,onBlur:dn=>ee(void 0,null,function*(){var Ln;if((0,ie.Rm)()&&!((Ln=D.AssistantObject.practice)!=null&&Ln.can_appraise)){A.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 zt=yield(0,d.ZP)(`/api/student_works/${Ce.homeworkId}/adjust_score.json`,{method:"post",body:{score:dn}});Ae(),zt.status===0&&A.ZP.success("\u8C03\u5206\u6210\u529F")})}):L!=null&&L.is_anonymous?K.createElement(z.Z,{min:0,value:nt,onChange:dn=>At(dn),max:Pt.score_full}):en}].filter(en=>L!=null&&L.is_anonymous?!["late_penalty","score","absence_penalty"].includes(en.dataIndex):!0);return K.createElement(G.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",afterClose:()=>{Ut.resetFields(),At("")},confirmLoading:ht,open:b.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>ee(void 0,null,function*(){var en;if((0,ie.Rm)()&&!((en=D.AssistantObject.practice)!=null&&en.can_appraise)){A.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(L!=null&&L.is_anonymous){vt();return}const Pt=Ut.getFieldsValue();JSON.stringify(Pt)==="{}"||Pt.hidden_comment===""&&Pt.comment===""?Re(!0):Et()}),onCancel:()=>{w({type:"shixunHomeworks/setActionTabs",payload:{}})}},K.createElement(S.Z,{className:U.info},K.createElement(k.Z,null,K.createElement("span",{className:`${U.label} ${U.greyText}`},"\u59D3\u540D"),K.createElement("span",{className:U.blackContent},L==null?void 0:L.username)),K.createElement(k.Z,null,K.createElement("span",{className:`${U.label} ${U.greyText}`},"\u5B66\u53F7"),K.createElement("span",{className:U.blackContent},(L==null?void 0:L.student_id)||"--")),!(L!=null&&L.is_anonymous)&&K.createElement(K.Fragment,null,K.createElement(k.Z,null,K.createElement("span",{className:`${U.label} ${U.greyText}`},"\u73ED\u7EA7"),K.createElement("span",{className:U.blackContent},(L==null?void 0:L.group_name)||"--")),K.createElement(k.Z,null,K.createElement("span",{className:`${U.label} ${U.greyText}`},"\u8865\u4EA4\u6263\u5206"),K.createElement("span",{className:U.orangeContent},((oe=L==null?void 0:L.stage_list[0])==null?void 0:oe.late_penalty)||"--")),K.createElement(k.Z,null,K.createElement("span",{className:`${U.label} ${U.greyText}`},"\u7F3A\u8BC4\u6263\u5206"),K.createElement("span",{className:U.orangeContent},((re=L==null?void 0:L.stage_list[0])==null?void 0:re.absence_penalty)||"--")),K.createElement(k.Z,null,K.createElement("span",{className:`${U.label} ${U.greyText}`},"\u603B\u6210\u7EE9"),K.createElement("span",{className:U.orangeContent},(L==null?void 0:L.stage_list[0].score)||"--")))),K.createElement(ge.default,{form:Ut,onChange:()=>{Ie&&Re(!1)}},K.createElement("div",{className:`${U.inputLabel} ${U.greyText}`},L!=null&&L.is_anonymous?"\u8BC4\u8BED":"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),K.createElement(ge.default.Item,{name:"comment"},K.createElement(Fe.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),!(L!=null&&L.is_anonymous)&&K.createElement(K.Fragment,null,K.createElement("div",{className:`${U.inputLabel} ${U.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),K.createElement(ge.default.Item,{name:"hidden_comment"},K.createElement(Fe.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))," ")),Ie&&K.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),K.createElement("div",{className:U.tableTitle},"\u5173\u5361\u6210\u7EE9"),K.createElement(V.default,{className:U.scoreTable,dataSource:L==null?void 0:L.stage_list,rowKey:"challenge_id",pagination:!1,columns:tn}))};var ae=(0,ye.connect)(({shixunHomeworks:b,classroomList:w})=>({shixunHomeworks:b,classroomList:w}))(he),_={},y=(b,w,D)=>new Promise((Ae,L)=>{var oe=Ce=>{try{Be(D.next(Ce))}catch(Ie){L(Ie)}},re=Ce=>{try{Be(D.throw(Ce))}catch(Ie){L(Ie)}},Be=Ce=>Ce.done?Ae(Ce.value):Promise.resolve(Ce.value).then(oe,re);Be((D=D.apply(b,w)).next())});const Y=({shixunHomeworks:b,dispatch:w,gethomeworkreport:D,homeWorkReport:Ae})=>{var L,oe;const{shixunWorkReport:re}=b;console.log(Ae,"homeWorkReport");const Be=(0,ye.useParams)(),[Ce,Ie]=(0,M.useState)(!1),[Re]=ge.default.useForm(),{user_name:ht,score:Ye,comment_time:nt,content:At,score_id:Ut,user_id:Et}=((oe=(L=b==null?void 0:b.actionTabs)==null?void 0:L.selectArrs)==null?void 0:oe.data)||{},vt=()=>y(void 0,null,function*(){yield Re.validateFields(),Ie(!0);const tn=Re.getFieldsValue();(yield(0,d.ZP)(`/api/student_works/${Be.homeworkId}/appeal_anonymous_score.json`,{method:"post",body:{comment:tn.comment,score_id:Ut,userId:Et}})).status===0&&(A.ZP.success("\u64CD\u4F5C\u6210\u529F"),w({type:"shixunHomeworks/setActionTabs",payload:{}}),D()),Ie(!1)});return M.createElement(G.default,{centered:!0,width:600,title:"\u533F\u8BC4\u7533\u8BC9",afterClose:()=>{Re.resetFields()},confirmLoading:Ce,open:b.actionTabs.key==="\u533F\u8BC4\u7533\u8BC9",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:vt,onCancel:()=>{w({type:"shixunHomeworks/setActionTabs",payload:{}})}},M.createElement("div",{className:"p20",style:{background:"#F7F8F9",padding:15,marginBottom:20}},M.createElement(S.Z,{justify:"space-between",className:_.info},M.createElement("span",null,M.createElement("span",{className:"c-grey-666"},ht),M.createElement("span",{className:"c-grey-333 ml5"},"\u8C03\u5206\u4E3A"),M.createElement("span",{className:"c-orange ml5"},Ye,"\u5206")),M.createElement("span",{className:"c-grey-333"},nt)),M.createElement("div",{className:"c-grey-333 mt5"},At)),M.createElement(ge.default,{form:Re,className:"mt15",layout:"vertical"},M.createElement(ge.default.Item,{name:"comment",label:"\u7533\u8BC9",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0"}]},M.createElement(Fe.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0",rows:3}))))};var ue=(0,ye.connect)(({shixunHomeworks:b})=>({shixunHomeworks:b}))(Y),Qe=x(45633),et={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"},gt=x(85149),bt=x(36708),Vt=x(44164),Rt=x.n(Vt),te=x(59301),Le=Object.defineProperty,mt=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,He=(b,w,D)=>w in b?Le(b,w,{enumerable:!0,configurable:!0,writable:!0,value:D}):b[w]=D,Se=(b,w)=>{for(var D in w||(w={}))Ne.call(w,D)&&He(b,D,w[D]);if(mt)for(var D of mt(w))It.call(w,D)&&He(b,D,w[D]);return b},I=(b,w)=>{var D={};for(var Ae in b)Ne.call(b,Ae)&&w.indexOf(Ae)<0&&(D[Ae]=b[Ae]);if(b!=null&&mt)for(var Ae of mt(b))w.indexOf(Ae)<0&&It.call(b,Ae)&&(D[Ae]=b[Ae]);return D},g=(b,w,D)=>new Promise((Ae,L)=>{var oe=Ce=>{try{Be(D.next(Ce))}catch(Ie){L(Ie)}},re=Ce=>{try{Be(D.throw(Ce))}catch(Ie){L(Ie)}},Be=Ce=>Ce.done?Ae(Ce.value):Promise.resolve(Ce.value).then(oe,re);Be((D=D.apply(b,w)).next())});const v=b=>{var w=b,{shixunHomeworks:D,classroomList:Ae,globalSetting:L,loading:oe,user:re,dispatch:Be}=w,Ce=I(w,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),Ie,Re,ht,Ye,nt,At,Ut;const[Et,vt]=(0,M.useState)(Se({},(0,ye.useParams)())),tn=(0,ye.useParams)(),en=(0,ye.useLocation)(),[]=(0,M.useState)([]),[Pt,dn]=(0,M.useState)({last:!1}),[Ln,zt]=(0,M.useState)({last:!1}),cn=(0,M.useRef)(),qe=(0,M.useRef)(),[Ke,je]=(0,M.useState)(!1),[le,Ee]=(0,M.useState)(!1),[ve,Te]=(0,M.useState)(!1),[ne,Nt]=(0,M.useState)(),[$t,Ft]=(0,M.useState)(),[vn,tr]=(0,M.useState)(!0),[Kn,Mn]=(0,M.useState)(),In=(0,ie.GJ)(),[nr,fr]=(0,M.useState)(new(W())),[qn,ur]=(0,M.useState)(0),[$n,Nn]=(0,M.useState)([]),[Ge,Ue]=(0,M.useState)(!1),[qt,Mt]=(0,M.useState)(!1),[an,An]=(0,M.useState)(""),[yn,gn]=(0,M.useState)(!1),[Yt,Tt]=(0,M.useState)(!0),[Qt,ln]=(0,M.useState)(0),[sn]=(0,ye.useSearchParams)(),wn=()=>g(void 0,null,function*(){(re.userInfo.is_teacher||re.userInfo.admin)&&(gn(!0),Tt(!1))});(0,M.useEffect)(()=>{wn(),console.log("\u6253\u5370\u7684------",ne),console.log(D),An(ne==null?void 0:ne.repeat_minus_score)},[ne,re]),(0,M.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",ne==null?void 0:ne.work_score),ln(ne==null?void 0:ne.work_score)},[ne==null?void 0:ne.work_score,an]),(0,M.useEffect)(()=>(Be({type:"globalSetting/footerToggle",payload:!1}),()=>{Be({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,M.useEffect)(()=>{var Ct;if(ne){let N=[];(Ct=ne==null?void 0:ne.target_test_sets)==null||Ct.map((O,ce)=>{var xe;(xe=O==null?void 0:O.targets)==null||xe.map(($e,Pe)=>{var Xe;$e.name=O==null?void 0:O.name,$e.total_target_score=O==null?void 0:O.total_target_score,$e.actual_target_score=O==null?void 0:O.actual_target_score,$e.rowSpan=Pe===0?(Xe=O==null?void 0:O.targets)==null?void 0:Xe.length:0,$e.order=ce+1,N.push($e)})}),Mn(N),Be({type:"classroomList/getAssistantPermissions",payload:{course_id:Et.coursesId}})}},[ne]),(0,M.useEffect)(()=>{D.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&$n.length>0&&ne!=null&&ne.course_name&&Me("all")},[ne==null?void 0:ne.course_name]),(0,M.useEffect)(()=>{console.log(tn),vt(Se({},tn))},[en.pathname]);const Un=()=>{document.body.scrollIntoView()};function un(){return g(this,null,function*(){var Ct,N,O,ce;const xe=JSON.parse(localStorage.all_student_works_param||"{}"),$e=yield Be({type:"shixunHomeworks/getAllStudentWorks",payload:Se(Se({},Et),xe)});Nn($e.all_student_works);const Pe=(Ct=$e.all_student_works)==null?void 0:Ct.map(Xe=>String(Xe.student_work_id)).indexOf(Et.homeworkId);Pe===((N=$e.all_student_works)==null?void 0:N.length)-1?dn({last:!0}):dn((O=$e.all_student_works)==null?void 0:O[Pe+1]),zt(Pe===0?{last:!0}:(ce=$e.all_student_works)==null?void 0:ce[Pe-1])})}const rn=()=>{document.querySelectorAll("canvas").forEach(Ct=>{(!Ct.clientWidth||!Ct.clientHeight)&&Ct.remove()})},Me=Ct=>g(void 0,null,function*(){let N=0,O;O=G.default.info({width:460,title:te.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",te.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:te.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",te.createElement("span",{className:"c-blue"},N+1),"/",Ct!=="all"?1:$n==null?void 0:$n.length,te.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:et.modal,onOk:()=>{}});const ce={margin:[0,0],filename:`${ne==null?void 0:ne.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}};function xe(){return g(this,null,function*(){Un(),N++,setTimeout(()=>g(this,null,function*(){var Pe;rn();const Xe=nr.folder(`${(Pe=ne==null?void 0:ne.stage_list[0])==null?void 0:Pe.shixun_name}`),lt=document.querySelector("#export-all").children;let Zt=Rt()();for(let Kt=0;Kt<lt.length;Kt++)yield Zt.set(ce).from(lt[Kt]).toContainer().toCanvas().toPdf().get("pdf").then(Ot=>g(this,null,function*(){Kt<lt.length-1&&(yield Ot.addPage())}));Xe.file(`${$n[N-1].student_work_user_name}.pdf`,Zt.output("blob")),O.update({content:te.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",te.createElement("span",{className:"c-blue"},N),"/",$n==null?void 0:$n.length,te.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),N==($n==null?void 0:$n.length)?(O.destroy(),ct()):$e()}),2200)})}function $e(){return g(this,null,function*(){var Pe,Xe,lt,Zt,Kt;const Ot=yield(0,d.ZP)(`/api/student_works/${$n[N].student_work_id}/jupyter_work_report.json`,{method:"get"});if((Ot==null?void 0:Ot.status)===0)if(Nt(Ot.data),(Xe=(Pe=Ot==null?void 0:Ot.data)==null?void 0:Pe.shixun_detail[0])!=null&&Xe.myshixun_identifier){tr(!0);const Gt=yield(0,d.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(Zt=(lt=Ot==null?void 0:Ot.data)==null?void 0:lt.shixun_detail[0])==null?void 0:Zt.myshixun_identifier,student_work_id:(Kt=Ot==null?void 0:Ot.data)==null?void 0:Kt.work_id}});Gt.status===0&&(Ft(Gt.html_content),tr(!1),st(),xe())}else xe()})}if(Ct!=="all"||($n==null?void 0:$n.length)<2){rn(),Un();const Pe=qe.current.children;let Xe=Rt()();const lt=nr.folder(`${ne==null?void 0:ne.username}`);for(let Zt=0;Zt<Pe.length;Zt++)yield Xe.set(ce).from(Pe[Zt]).toContainer().toCanvas().toPdf().get("pdf").then(Kt=>g(void 0,null,function*(){Zt<Pe.length-1&&(yield Kt.addPage())}));je(!1),lt.file(`${ne==null?void 0:ne.username}.pdf`,Xe.output("blob"),{base64:!1}),O.destroy(),ct();return}else $e()}),ct=()=>{nr.generateAsync({type:"blob"}).then(function(Ct){const N=document.createElement("a");N.href=window.URL.createObjectURL(Ct),N.download=(ne==null?void 0:ne.course_name)+".zip",document.body.appendChild(N);const O=document.createEvent("MouseEvents");O.initEvent("click",!1,!1),N.dispatchEvent(O),document.body.removeChild(N),fr(new(W()))}),Te(!1)};(0,M.useEffect)(()=>{Bt()},[Et.homeworkId]),(0,M.useEffect)(()=>{ne!=null&&ne.work_id&&((0,ie.GJ)()||ne!=null&&ne.is_anonymous)&&un()},[ne==null?void 0:ne.work_id]),(0,M.useEffect)(()=>{console.log(ne)},[ne]);const St=()=>g(void 0,null,function*(){const Ct=yield(0,d.ZP)(`/api/student_works/${Et.homeworkId}/jupyter_work_report.json`,{method:"get"});(Ct==null?void 0:Ct.status)===0&&Nt(Ct.data)}),wt=()=>g(void 0,null,function*(){var Ct,N,O,ce,xe;const $e=yield(0,d.ZP)(`/api/student_works/${Et.homeworkId}/jupyter_work_report.json`,{method:"get"});if(($e==null?void 0:$e.status)===0&&(Nt($e.data),(N=(Ct=$e==null?void 0:$e.data)==null?void 0:Ct.shixun_detail[0])!=null&&N.myshixun_identifier)){tr(!0);const Pe=yield(0,d.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(ce=(O=$e==null?void 0:$e.data)==null?void 0:O.shixun_detail[0])==null?void 0:ce.myshixun_identifier,student_work_id:(xe=$e==null?void 0:$e.data)==null?void 0:xe.work_id}});if(Pe.status===0){Ft(Pe.html_content),tr(!1),Wt(Pe.html_content);return}}}),Wt=Ct=>{var N,O;(O=(N=Ct==null?void 0:Ct.match)==null?void 0:N.call(Ct,/<script [^>]*src=['"]([^'"]+)[^>]*>/gi))==null||O.map(ce=>{const xe=document.createElement("script");xe.src=/<script [^>]*src=['"]([^'"]+)[^>]*>/gi.exec(ce)[1],document.body.appendChild(xe)}),st()},st=()=>{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(Ct){}},Bt=()=>g(void 0,null,function*(){Ee(!0),wt(),Ee(!1)}),Ht=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0,render:(Ct,N,O)=>Ct},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:ne!=null&&ne.is_anonymous?220:170,render:Ct=>Ct||"--"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",width:ne!=null&&ne.is_anonymous?140:90},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time",width:ne!=null&&ne.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:Ct=>Ct||"--"},{title:"\u7F3A\u8BC4\u6263\u5206",dataIndex:"absence_penalty",width:90,render:Ct=>Ct||"--"},{title:"\u5F97\u5206",dataIndex:"score",width:100,render:(Ct,N)=>te.createElement("div",null,te.createElement("span",{style:{color:parseFloat(N.score_full)!==parseFloat(Ct)?"red":"green"}},Ct||0),"/",N.score_full)},{title:"\u8C03\u5206",dataIndex:"action",width:110,render:(Ct,N)=>In?te.createElement(Z,{max:N.score_full,onBlur:O=>g(void 0,null,function*(){var ce;if((0,ie.Rm)()&&!((ce=Ae.AssistantObject.practice)!=null&&ce.can_appraise)){A.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 xe=yield(0,d.ZP)(`/api/student_works/${Et.homeworkId}/adjust_score.json`,{method:"post",body:{score:O}});St(),xe.status===0&&A.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):Ct}].filter(Ct=>ne!=null&&ne.is_anonymous?!["late_penalty","absence_penalty","score","action"].includes(Ct.dataIndex):!0),nn=ne==null?void 0:ne.comment_scores.map(Ct=>{var N,O,ce;return{children:te.createElement(S.Z,null,te.createElement(k.Z,{span:24},te.createElement(S.Z,null,te.createElement(k.Z,{flex:1},te.createElement("span",{className:"c-light-black mr10"},Ct.user_name),te.createElement("span",null,"\u8C03\u5206\u4E3A"),te.createElement("span",{className:"ml10 c-orange"},Ct.score?Ct.score:0,"\u5206")),te.createElement(k.Z,null,te.createElement("span",{className:"c-light-black ml10"},Ct.comment_time)))),te.createElement(k.Z,{span:24,className:"mt8"},te.createElement(S.Z,{className:"mt8"},te.createElement(k.Z,{span:22},Ct.content?te.createElement("span",{style:{color:"#333333"}},Ct.content):te.createElement("span",{className:"c-light-black"},"\u6682\u672A\u5199\u8BC4\u8BED")),te.createElement(k.Z,{className:"tr",span:2},(Ct==null?void 0:Ct.can_appeal)&&!(Ct!=null&&Ct.is_invalid)&&te.createElement(p.ZP,{size:"small",type:"primary",onClick:()=>{Be({type:"shixunHomeworks/setActionTabs",payload:{key:"\u533F\u8BC4\u7533\u8BC9",selectArrs:{data:Se({},Ct)}}})}},"\u7533\u8BC9")))),!!(Ct!=null&&Ct.appeal_info)&&te.createElement(k.Z,{span:24,className:"mt8"},te.createElement("div",{className:"p20",style:{background:"#F7F8F9",padding:15}},te.createElement(S.Z,{justify:"space-between"},te.createElement("span",null,te.createElement("span",{className:"c-grey-333"},(N=Ct==null?void 0:Ct.appeal_info)==null?void 0:N.user_name),te.createElement("span",null,(Ct==null?void 0:Ct.appeal_status)===1&&te.createElement("span",{className:`tag-style bg-orange ml10 ${et.tag}`},"\u7533\u8BC9\u4E2D"),(Ct==null?void 0:Ct.appeal_status)===2&&te.createElement("span",{className:`tag-style bg-grey-ede c-light-black ml10 ${et.tag}`},"\u7533\u8BC9\u5DF2\u64A4\u9500"),(Ct==null?void 0:Ct.appeal_status)===3&&te.createElement("span",{className:`tag-style ml10 ${et.tag}`,style:{background:"#57BE40"}},"\u7533\u8BC9\u6210\u529F"),(Ct==null?void 0:Ct.appeal_status)===4&&te.createElement("span",{className:`tag-style bg-grey-ede c-light-black ml10 ${et.tag}`},"\u7533\u8BC9\u88AB\u62D2\u7EDD"),(Ct==null?void 0:Ct.appeal_status)===5&&te.createElement("span",{className:`tag-style c-light-black ml10 ${et.tag}`,style:{background:"#E9EAED"}},"\u7533\u8BC9\u5931\u8D25"))),te.createElement("span",{className:"c-light-black"}," ",be()((O=Ct==null?void 0:Ct.appeal_info)==null?void 0:O.time).format("YYYY-MM-DD HH:mm:ss"))),te.createElement(S.Z,{justify:"space-between",className:"mt10"},te.createElement(k.Z,{flex:1},(ce=Ct.appeal_info)==null?void 0:ce.content),te.createElement(k.Z,{style:{flexShrink:0,marginLeft:"auto"}},(Ct==null?void 0:Ct.appeal_status)===1&&(0,ie.GJ)()&&te.createElement("span",{onClick:()=>{G.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:()=>g(void 0,null,function*(){const xe=yield(0,d.ZP)(`/api/student_works/${Et.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:Ct.score_id,status:3}});(xe==null?void 0:xe.status)===0&&St()})})},className:"c-red current"},"\u63A5\u53D7\u7533\u8BC9"),(Ct==null?void 0:Ct.appeal_status)===1&&(0,ie.GJ)()&&te.createElement("span",{onClick:()=>{G.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:()=>g(void 0,null,function*(){const xe=yield(0,d.ZP)(`/api/student_works/${Et.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:Ct.score_id,status:4}});(xe==null?void 0:xe.status)===0&&St()})})},className:"c-light-black current ml10"},"\u62D2\u7EDD\u7533\u8BC9"))))))}}),mn=Ct=>{Ft(null),Be({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{Ct==="next"?ye.history.push(`/classrooms/${Et.coursesId}/common_homework/${Et.categoryId}/${Pt==null?void 0:Pt.student_work_id}/comment?page=${sn.get("page")}`):ye.history.push(`/classrooms/${Et.coursesId}/common_homework/${Et.categoryId}/${Ln==null?void 0:Ln.student_work_id}/comment?page=${sn.get("page")}`)},200)},Bn=Ct=>{An(""),Ct.target.value&&(console.log("\u8FDB\u6765",ne),Ct.target.value=Ct.target.value>(ne==null?void 0:ne.repeat_setting_score)?ne==null?void 0:ne.repeat_setting_score:Ct.target.value,An(Ct.target.value))},Dn=()=>g(void 0,null,function*(){const Ct=yield(0,d.ZP)(`/api/student_works/${ne==null?void 0:ne.work_id}/update_repeat_score`,{method:"put",body:{score:an}});yield Be({type:"shixunHomeworks/gethomeWorkReport",payload:Se({},Et)}),Ct.status===0&&A.ZP.info("\u64CD\u4F5C\u6210\u529F")});return console.log(!!(ne!=null&&ne.category),ne==null?void 0:ne.course_id,"homeWorkReport"),te.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},te.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},te.createElement(m.Z,{loading:le,active:!0,avatar:{size:40},paragraph:{rows:5}},te.createElement("div",{className:"edu-container"},(ne==null?void 0:ne.course_id)&&te.createElement("section",{className:"animated fadeIn"},te.createElement("aside",{className:""},(ne==null?void 0:ne.category)&&te.createElement(B.Z,{separator:">"},te.createElement(B.Z.Item,null,te.createElement(ye.Link,{to:`/classrooms/${ne==null?void 0:ne.course_id}/common_homework`},ne==null?void 0:ne.course_name)),te.createElement(B.Z.Item,null,te.createElement(ye.Link,{to:`/classrooms/${ne==null?void 0:ne.course_id}/common_homework/${ne!=null&&ne.category.main?"":ne==null?void 0:ne.category.category_id}`},ne==null?void 0:ne.category.category_name)),te.createElement(B.Z.Item,null,te.createElement(ye.Link,{to:`/classrooms/${ne==null?void 0:ne.course_id}/common_homework/${ne==null?void 0:ne.homework_common_id}/detail`},"\u4F5C\u4E1A\u8BE6\u60C5")),te.createElement(B.Z.Item,null,ne==null?void 0:ne.username))),te.createElement("aside",{className:[et.title1,"mt20"].join(" ")},te.createElement(S.Z,{align:"middle"},te.createElement(k.Z,{flex:1},te.createElement(ye.Link,{to:`/classrooms/${ne==null?void 0:ne.course_id}/common_homework/${ne==null?void 0:ne.homework_common_id}/detail?page=${sn.get("page")}`},te.createElement(X.Z,{className:"font16 c-black"})),te.createElement("strong",{style:{fontWeight:700},className:"font20 ml5"},ne==null?void 0:ne.shixun_name),te.createElement(q.VV,{status:ne==null?void 0:ne.homework_status})),te.createElement(k.Z,{className:et.title1_right},!(ne!=null&&ne.is_anonymous)&&!!(ne!=null&&ne.work_status)&&te.createElement(p.ZP,null,te.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),te.createElement(ye.Link,{className:"c-black",target:"_blank",to:`/tasks/${(Re=(Ie=ne==null?void 0:ne.shixun_detail)==null?void 0:Ie[0])==null?void 0:Re.myshixun_identifier}/jupyter${(0,ie.GJ)()?"":`?homework_common_id=${tn.categoryId}`}`},(0,ie.GJ)()?"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD":"\u67E5\u770B\u5B9E\u8BAD")),(0,ie.GJ)()&&!((ht=ne==null?void 0:ne.homework_status)!=null&&ht.includes("\u5DF2\u622A\u6B62"))&&te.createElement(p.ZP,{className:"ml10",onClick:()=>g(void 0,null,function*(){yield Be({type:"shixunHomeworks/setActionTabs",payload:{key:"redoShixunModal",homework_common_id:tn.categoryId,student_work_id:tn.homeworkId}})})},te.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),!(ne!=null&&ne.is_anonymous)&&te.createElement(p.ZP,{className:"ml10",onClick:()=>{var Ct;if((0,ie.Rm)()&&!((Ct=Ae.AssistantObject.normal)!=null&&Ct.can_download)){A.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}Me("")},loading:Ke},te.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,ie.GJ)()&&($n==null?void 0:$n.length)>1&&te.createElement(p.ZP,{className:"ml10",onClick:()=>{var Ct;if((0,ie.Rm)()&&!((Ct=Ae.AssistantObject.normal)!=null&&Ct.can_download)){A.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}Me("all")}},te.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),te.createElement("aside",{className:"mt30 relative"})),te.createElement("aside",{className:"edu-container bg-white",ref:cn},te.createElement("div",{id:"export-all",ref:qe},te.createElement("div",{id:"export-all-1"},te.createElement("div",{className:et.title},te.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),te.createElement("div",null,!((Ye=ne==null?void 0:ne.homework_status)!=null&&Ye.includes("\u5DF2\u622A\u6B62")&&(0,ie.dE)())&&((0,ie.GJ)()||(ne==null?void 0:ne.is_anonymous))&&te.createElement(p.ZP,{className:"mr20",type:"primary",onClick:()=>{Be({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:ne==null?void 0:ne.user_id,data:Se({},ne)}}})}},te.createElement(P.Z,null),ne!=null&&ne.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),te.createElement(F.Z,{style:{marginTop:0}}),te.createElement(S.Z,{className:"pl30 pr30"},te.createElement(k.Z,null,te.createElement("img",{className:et.userPic,src:`${de.Z.IMG_SERVER}/images/${ne==null?void 0:ne.image_url}`,alt:ne==null?void 0:ne.username})),te.createElement(k.Z,{className:"pt20"},te.createElement("span",{className:"font16 ml40"},ne==null?void 0:ne.username),te.createElement(q.Y,{status:ne==null?void 0:ne.work_status}),te.createElement("ul",{className:et.userInfo},te.createElement("li",null,"\u5B66\u53F7\uFF1A",(ne==null?void 0:ne.student_id)||"--"),((0,ie.GJ)()||!(ne!=null&&ne.is_anonymous))&&te.createElement("li",null,"\u5206\u73ED\uFF1A",(ne==null?void 0:ne.group_name)||"--"),te.createElement("br",null)))),te.createElement("aside",{className:"pl30 pr30 mt30 mb10"},te.createElement(V.default,{dataSource:ne==null?void 0:ne.stage_list,rowKey:Ct=>Ct==null?void 0:Ct.challenge_id,pagination:!1,columns:Ht})),((ne==null?void 0:ne.work_comment_hidden)||(ne==null?void 0:ne.work_comment))&&te.createElement("div",null,te.createElement(S.Z,{align:"middle"},te.createElement(k.Z,{flex:1},te.createElement("h1",{className:et.title},"\u70B9\u8BC4\u5185\u5BB9")),te.createElement(k.Z,{className:"pr30"},(0,ie.GJ)()&&te.createElement(p.ZP,{onClick:()=>g(void 0,null,function*(){G.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:te.createElement(R.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return g(this,null,function*(){(yield(0,bt.gZ)({comment_id:ne==null?void 0:ne.comment_id,homeworkId:Et.homeworkId})).status===0&&(A.ZP.success("\u5220\u9664\u6210\u529F"),St())})}})})},te.createElement(fe.Z,null),"\u5220\u9664"))),(ne==null?void 0:ne.work_comment)&&te.createElement("aside",{className:"pl30 pr30",style:{marginTop:"-5px"}},te.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),te.createElement("br",null),te.createElement(gt.Z,{value:ne==null?void 0:ne.work_comment,className:"font14"})),(ne==null?void 0:ne.work_comment_hidden)&&te.createElement("aside",{className:"pl30 pr30 mt15"},te.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),te.createElement("br",null),te.createElement(gt.Z,{value:ne==null?void 0:ne.work_comment_hidden,className:"font14"}))),(ne==null?void 0:ne.comment_scores.length)>0&&te.createElement(te.Fragment,null,te.createElement("h1",{className:et.title},"\u8C03\u5206\u539F\u56E0"),te.createElement("aside",{className:"pl30 pr30",style:{marginTop:"4px"}},te.createElement(j.Z,{items:nn}))),((nt=ne==null?void 0:ne.shixun_detail[0])==null?void 0:nt.myshixun_identifier)&&te.createElement(te.Fragment,null,te.createElement("h1",{className:et.title,style:{marginTop:"-20px"}},"\u5B9E\u8BAD\u8BE6\u60C5"),te.createElement("aside",{className:"pl30 pr30"},te.createElement("div",{className:et.shixunWrp},te.createElement("h2",null,te.createElement("span",null,"\u8BC4\u6D4B\u4EE3\u7801",te.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")),te.createElement("span",null,te.createElement(se.default,{style:{width:200},value:(At=ne==null?void 0:ne.shixun_detail[0])==null?void 0:At.path}," ",ne==null?void 0:ne.shixun_detail.map(Ct=>te.createElement(Option,{value:Ct.path},Ct.path))," "))),te.createElement(H.Z,{spinning:vn},te.createElement("div",{style:{width:"100%",minHeight:"550px",padding:"16px"},dangerouslySetInnerHTML:{__html:$t}})))))))),((0,ie.GJ)()||(ne==null?void 0:ne.is_anonymous))&&te.createElement("aside",{className:`${et.footerBar} ${Ke?et.footerBarStatic:""}`},te.createElement("aside",{className:"edu-container"},te.createElement(S.Z,{align:"middle"},te.createElement(k.Z,{flex:"1"},te.createElement(ye.Link,{className:et.exitComment,to:`/classrooms/${Et.coursesId}/common_homework/${Et.categoryId}/detail?page=${sn.get("page")}`},"\u8FD4\u56DE\u5217\u8868")),te.createElement(k.Z,{flex:"1",className:"tr"},te.createElement(p.ZP,{type:"default",disabled:Ln==null?void 0:Ln.last,onClick:()=>mn()},"\u4E0A\u4E00\u4E2A"),te.createElement(p.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:Pt==null?void 0:Pt.last,onClick:()=>mn("next")},"\u4E0B\u4E00\u4E2A"),!((Ut=ne==null?void 0:ne.homework_status)!=null&&Ut.includes("\u5DF2\u622A\u6B62")&&(0,ie.dE)())&&((0,ie.GJ)()||(ne==null?void 0:ne.is_anonymous))&&te.createElement(p.ZP,{type:"primary",onClick:()=>g(void 0,null,function*(){Be({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:ne==null?void 0:ne.user_id,data:Se({},ne)}}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),te.createElement(ue,{gethomeworkreport:St,homeWorkReport:ne}),te.createElement(ae,{gethomeworkreport:St,homeWorkReport:ne}),te.createElement(Qe.Z,{getData:St}),te.createElement(G.default,{open:Ge,width:860,centered:!0,onCancel:()=>{Ue(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},te.createElement("div",{style:{color:"#333333",fontWeight:400}},te.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),te.createElement("br",null),te.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"),te.createElement("br",null),te.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"),te.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 "),te.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")),te.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},te.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),te.createElement("br",null),te.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 "),te.createElement("br",null),te.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"),te.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 "),te.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"),te.createElement("br",null),te.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")),te.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},te.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),te.createElement("br",null),te.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")),te.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},te.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),te.createElement("br",null),te.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"))),te.createElement(G.default,{open:qt,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{Mt(!1)},width:600},te.createElement("div",{style:{fontWeight:400,color:"#333333"}},te.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",te.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"),te.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",te.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"),te.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",te.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 Q=(0,ye.connect)(({shixunHomeworks:b,classroomList:w,loading:D,globalSetting:Ae,user:L})=>({shixunHomeworks:b,classroomList:w,globalSetting:Ae,loading:D.effects,user:L}))(v)},45633:function(Zn,Dt,x){"use strict";var M=x(62957),me=x(6767),be=x(99064),we=x(89070),W=x(24065),d=x(59301),ye=(A,S,k)=>new Promise((p,m)=>{var B=j=>{try{V(k.next(j))}catch(se){m(se)}},F=j=>{try{V(k.throw(j))}catch(se){m(se)}},V=j=>j.done?p(j.value):Promise.resolve(j.value).then(B,F);V((k=k.apply(A,S)).next())});const G=({shixunHomeworks:A,dispatch:S,classroomList:k,getData:p})=>d.createElement(M.default,{centered:!0,title:"\u63D0\u793A",open:A.actionTabs.key==="redoShixunModal",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>ye(void 0,null,function*(){var m;if((0,W.Rm)()&&!((m=k.AssistantObject.normal)!=null&&m.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,be.ZP)(`/api/homework_commons/${A.actionTabs.homework_common_id}/batch_redo_modal.json`,{method:"post",body:{student_work_id:A.actionTabs.student_work_id}})).status===0&&(me.ZP.success("\u64CD\u4F5C\u6210\u529F"),S({type:"shixunHomeworks/setActionTabs",payload:{}}),p())}),onCancel:()=>{S({type:"shixunHomeworks/setActionTabs",payload:{}})}},d.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C",A.actionTabs.isshixun?"\u5B66\u751F\u5B9E\u8BAD":"\u5B66\u751F\u4F5C\u54C1\u63D0\u4EA4","\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),d.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"));Dt.Z=(0,we.connect)(({shixunHomeworks:A,classroomList:S})=>({shixunHomeworks:A,classroomList:S}))(G)},24768:function(Zn,Dt,x){"use strict";x.d(Dt,{AL:function(){return P},Iy:function(){return k},Qv:function(){return B},ez:function(){return X},jb:function(){return p}});var M=x(32834),me=x.n(M),be=x(11690),we=x.n(be);let W=1;function d(q,ge){const z=q.match(/^(\s+)(?:```)/);if(z===null)return ge;const Fe=z[1];return ge.split(`
`).map(Z=>{const U=Z.match(/^\s+/);if(U===null)return Z;const[K]=U;return K.length>=Fe.length?Z.slice(Fe.length):Z}).join(`
`)}let ye=[],G=["<ul>"];const A=new(me()).Renderer,S=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function k(){ye.length=0,G=["<ul>"]}const p={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(q,ge,z,Fe){if(ge>=q.length||q[ge].level<=z)return ge;var Z=q[ge];Fe.push("<li><a href='#"+W+Z.anchor+"'>"+Z.text+"</a>"),ge++;var U=[];return ge=m(q,ge,Z.level,U),U.length>0&&(Fe.push("<ul>"),U.forEach(function(K){Fe.push(K)}),Fe.push("</ul>")),Fe.push("</li>"),ge=m(q,ge,z,Fe),ge}function B(){return m(ye,0,0,G),G.push("</ul>"),G.join("")}const F={heading(q){const ge=S.exec(q);if(W+=1,ge)return{type:"heading",raw:ge[0],depth:ge[1].length,text:ge[2]}},fences(q){const ge=this.rules.block.fences.exec(q);if(ge){const z=ge[0];let Fe=d(z,ge[3]||"");const Z=ge[2]?ge[2].trim():ge[2];if(["latex","katex","math"].indexOf(Z)>=0){const U=se(),K=Fe;Fe=U,H[U]={type:"block",expression:K}}return{type:"code",raw:z,lang:Z,text:Fe}}}},V=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let j=0;const se=()=>`__special_katext_id_${j++}__`;let H={};function X(){return H}function P(){j=0,H={}}function R(q){return q=q.replace(V,(ge,z)=>{const Fe=se();return H[Fe]={type:"inline",expression:z},Fe}),q}const fe=A.listitem;A.listitem=function(q){return fe(R(q))};const de=A.paragraph;A.paragraph=function(q){return de(R(q))};const ie=A.tablecell;A.tablecell=function(q,ge){return ie(R(q),ge)},A.code=function(q,ge,z){const Fe=(ge||"").match(/\S*/)[0];return Fe?["latex","katex","math"].indexOf(Fe)>=0?`<p class='editormd-tex'>${q}</p>`:`<pre class="prettyprint linenums"><code class="language-${ge}">${z?q:(0,be.escape)(q,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(z?q:(0,be.escape)(q,!0))+"</code></pre>"},A.heading=function(q,ge,z){let Fe=this.options.headerPrefix+z.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ye.push({anchor:Fe,level:ge,text:q}),"<h"+ge+' id="'+W+Fe+'">'+q+"</h"+ge+">"},me().setOptions({silent:!0,gfm:!0,pedantic:!1}),me().use({tokenizer:F,renderer:A}),Dt.ZP=me()},71114:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return ge}});var M=x(59301),me=x(92310),be=x.n(me),we=x(48755),W=x(83397),d=x(93083),ye=x(63356),G=x(16931),A=x(51636);const S=z=>{const{componentCls:Fe,calc:Z}=z;return{[Fe]:Object.assign(Object.assign({},(0,ye.Wf)(z)),{margin:0,padding:0,listStyle:"none",[`${Fe}-item`]:{position:"relative",margin:0,paddingBottom:z.itemPaddingBottom,fontSize:z.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:z.itemHeadSize,insetInlineStart:Z(Z(z.itemHeadSize).sub(z.tailWidth)).div(2).equal(),height:`calc(100% - ${(0,d.unit)(z.itemHeadSize)})`,borderInlineStart:`${(0,d.unit)(z.tailWidth)} ${z.lineType} ${z.tailColor}`},"&-pending":{[`${Fe}-item-head`]:{fontSize:z.fontSizeSM,backgroundColor:"transparent"},[`${Fe}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:z.itemHeadSize,height:z.itemHeadSize,backgroundColor:z.dotBg,border:`${(0,d.unit)(z.dotBorderWidth)} ${z.lineType} transparent`,borderRadius:"50%","&-blue":{color:z.colorPrimary,borderColor:z.colorPrimary},"&-red":{color:z.colorError,borderColor:z.colorError},"&-green":{color:z.colorSuccess,borderColor:z.colorSuccess},"&-gray":{color:z.colorTextDisabled,borderColor:z.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:Z(z.itemHeadSize).div(2).equal(),insetInlineStart:Z(z.itemHeadSize).div(2).equal(),width:"auto",height:"auto",marginBlockStart:0,paddingBlock:z.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:Z(Z(z.fontSize).mul(z.lineHeight).sub(z.fontSize)).mul(-1).add(z.lineWidth).equal(),marginInlineStart:Z(z.margin).add(z.itemHeadSize).equal(),marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${Fe}-item-tail`]:{display:"none"},[`> ${Fe}-item-content`]:{minHeight:Z(z.controlHeightLG).mul(1.2).equal()}}},[`&${Fe}-alternate,
&${Fe}-right,
&${Fe}-label`]:{[`${Fe}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:Z(z.marginXXS).mul(-1).equal(),"&-custom":{marginInlineStart:Z(z.tailWidth).div(2).equal()}},"&-left":{[`${Fe}-item-content`]:{insetInlineStart:`calc(50% - ${(0,d.unit)(z.marginXXS)})`,width:`calc(50% - ${(0,d.unit)(z.marginSM)})`,textAlign:"start"}},"&-right":{[`${Fe}-item-content`]:{width:`calc(50% - ${(0,d.unit)(z.marginSM)})`,margin:0,textAlign:"end"}}}},[`&${Fe}-right`]:{[`${Fe}-item-right`]:{[`${Fe}-item-tail,
${Fe}-item-head,
${Fe}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(0,d.unit)(Z(Z(z.itemHeadSize).add(z.tailWidth)).div(2).equal())})`},[`${Fe}-item-content`]:{width:`calc(100% - ${(0,d.unit)(Z(z.itemHeadSize).add(z.marginXS).equal())})`}}},[`&${Fe}-pending
${Fe}-item-last
${Fe}-item-tail`]:{display:"block",height:`calc(100% - ${(0,d.unit)(z.margin)})`,borderInlineStart:`${(0,d.unit)(z.tailWidth)} dotted ${z.tailColor}`},[`&${Fe}-reverse
${Fe}-item-last
${Fe}-item-tail`]:{display:"none"},[`&${Fe}-reverse ${Fe}-item-pending`]:{[`${Fe}-item-tail`]:{insetBlockStart:z.margin,display:"block",height:`calc(100% - ${(0,d.unit)(z.margin)})`,borderInlineStart:`${(0,d.unit)(z.tailWidth)} dotted ${z.tailColor}`},[`${Fe}-item-content`]:{minHeight:Z(z.controlHeightLG).mul(1.2).equal()}},[`&${Fe}-label`]:{[`${Fe}-item-label`]:{position:"absolute",insetBlockStart:Z(Z(z.fontSize).mul(z.lineHeight).sub(z.fontSize)).mul(-1).add(z.tailWidth).equal(),width:`calc(50% - ${(0,d.unit)(z.marginSM)})`,textAlign:"end"},[`${Fe}-item-right`]:{[`${Fe}-item-label`]:{insetInlineStart:`calc(50% + ${(0,d.unit)(z.marginSM)})`,width:`calc(50% - ${(0,d.unit)(z.marginSM)})`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${Fe}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},k=z=>({tailColor:z.colorSplit,tailWidth:z.lineWidthBold,dotBorderWidth:z.wireframe?z.lineWidthBold:z.lineWidth*3,dotBg:z.colorBgContainer,itemPaddingBottom:z.padding*1.25});var p=(0,G.I$)("Timeline",z=>{const Fe=(0,A.mergeToken)(z,{itemHeadSize:10,customHeadPaddingVertical:z.paddingXXS,paddingInlineEnd:2});return[S(Fe)]},k),m=function(z,Fe){var Z={};for(var U in z)Object.prototype.hasOwnProperty.call(z,U)&&Fe.indexOf(U)<0&&(Z[U]=z[U]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,U=Object.getOwnPropertySymbols(z);K<U.length;K++)Fe.indexOf(U[K])<0&&Object.prototype.propertyIsEnumerable.call(z,U[K])&&(Z[U[K]]=z[U[K]]);return Z},F=z=>{var{prefixCls:Fe,className:Z,color:U="blue",dot:K,pending:ee=!1,position:he,label:ae,children:_}=z,y=m(z,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:Y}=M.useContext(we.E_),ue=Y("timeline",Fe),Qe=be()(`${ue}-item`,{[`${ue}-item-pending`]:ee},Z),et=/blue|red|green|gray/.test(U||"")?void 0:U,gt=be()(`${ue}-item-head`,{[`${ue}-item-head-custom`]:!!K,[`${ue}-item-head-${U}`]:!et});return M.createElement("li",Object.assign({},y,{className:Qe}),ae&&M.createElement("div",{className:`${ue}-item-label`},ae),M.createElement("div",{className:`${ue}-item-tail`}),M.createElement("div",{className:gt,style:{borderColor:et,color:et}},K),M.createElement("div",{className:`${ue}-item-content`},_))},V=x(80702),j=x(58617),se=function(z,Fe){var Z={};for(var U in z)Object.prototype.hasOwnProperty.call(z,U)&&Fe.indexOf(U)<0&&(Z[U]=z[U]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,U=Object.getOwnPropertySymbols(z);K<U.length;K++)Fe.indexOf(U[K])<0&&Object.prototype.propertyIsEnumerable.call(z,U[K])&&(Z[U[K]]=z[U[K]]);return Z},X=z=>{var{prefixCls:Fe,className:Z,pending:U=!1,children:K,items:ee,rootClassName:he,reverse:ae=!1,direction:_,hashId:y,pendingDot:Y,mode:ue=""}=z,Qe=se(z,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const et=(Ne,It)=>ue==="alternate"?Ne==="right"?`${Fe}-item-right`:Ne==="left"?`${Fe}-item-left`:It%2===0?`${Fe}-item-left`:`${Fe}-item-right`:ue==="left"?`${Fe}-item-left`:ue==="right"?`${Fe}-item-right`:Ne==="right"?`${Fe}-item-right`:"",gt=(0,V.Z)(ee||[]),bt=typeof U=="boolean"?null:U;U&&gt.push({pending:!!U,dot:Y||M.createElement(j.Z,null),children:bt}),ae&&gt.reverse();const Vt=gt.length,Rt=`${Fe}-item-last`,te=gt.filter(Ne=>!!Ne).map((Ne,It)=>{var He;const Se=It===Vt-2?Rt:"",I=It===Vt-1?Rt:"",{className:g}=Ne,v=se(Ne,["className"]);return M.createElement(F,Object.assign({},v,{className:be()([g,!ae&&U?Se:I,et((He=Ne==null?void 0:Ne.position)!==null&&He!==void 0?He:"",It)]),key:(Ne==null?void 0:Ne.key)||It}))}),Le=gt.some(Ne=>!!(Ne!=null&&Ne.label)),mt=be()(Fe,{[`${Fe}-pending`]:!!U,[`${Fe}-reverse`]:!!ae,[`${Fe}-${ue}`]:!!ue&&!Le,[`${Fe}-label`]:Le,[`${Fe}-rtl`]:_==="rtl"},Z,he,y);return M.createElement("ul",Object.assign({},Qe,{className:mt}),te)},P=x(11592);function R(z,Fe){return z&&Array.isArray(z)?z:(0,P.Z)(Fe).map(Z=>{var U,K;return Object.assign({children:(K=(U=Z==null?void 0:Z.props)===null||U===void 0?void 0:U.children)!==null&&K!==void 0?K:""},Z.props)})}var fe=R,de=function(z,Fe){var Z={};for(var U in z)Object.prototype.hasOwnProperty.call(z,U)&&Fe.indexOf(U)<0&&(Z[U]=z[U]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,U=Object.getOwnPropertySymbols(z);K<U.length;K++)Fe.indexOf(U[K])<0&&Object.prototype.propertyIsEnumerable.call(z,U[K])&&(Z[U[K]]=z[U[K]]);return Z};const ie=z=>{const{getPrefixCls:Fe,direction:Z,timeline:U}=M.useContext(we.E_),{prefixCls:K,children:ee,items:he,className:ae,style:_}=z,y=de(z,["prefixCls","children","items","className","style"]),Y=Fe("timeline",K),ue=(0,W.Z)(Y),[Qe,et,gt]=p(Y,ue),bt=fe(he,ee);return Qe(M.createElement(X,Object.assign({},y,{className:be()(U==null?void 0:U.className,ae,gt,ue),style:Object.assign(Object.assign({},U==null?void 0:U.style),_),prefixCls:Y,direction:Z,items:bt,hashId:et})))};ie.Item=F;var q=ie,ge=q},86251:function(Zn,Dt){"use strict";Dt.byteLength=ye,Dt.toByteArray=A,Dt.fromByteArray=p;for(var x=[],M=[],me=typeof Uint8Array!="undefined"?Uint8Array:Array,be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",we=0,W=be.length;we<W;++we)x[we]=be[we],M[be.charCodeAt(we)]=we;M[45]=62,M[95]=63;function d(m){var B=m.length;if(B%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=m.indexOf("=");F===-1&&(F=B);var V=F===B?0:4-F%4;return[F,V]}function ye(m){var B=d(m),F=B[0],V=B[1];return(F+V)*3/4-V}function G(m,B,F){return(B+F)*3/4-F}function A(m){var B,F=d(m),V=F[0],j=F[1],se=new me(G(m,V,j)),H=0,X=j>0?V-4:V,P;for(P=0;P<X;P+=4)B=M[m.charCodeAt(P)]<<18|M[m.charCodeAt(P+1)]<<12|M[m.charCodeAt(P+2)]<<6|M[m.charCodeAt(P+3)],se[H++]=B>>16&255,se[H++]=B>>8&255,se[H++]=B&255;return j===2&&(B=M[m.charCodeAt(P)]<<2|M[m.charCodeAt(P+1)]>>4,se[H++]=B&255),j===1&&(B=M[m.charCodeAt(P)]<<10|M[m.charCodeAt(P+1)]<<4|M[m.charCodeAt(P+2)]>>2,se[H++]=B>>8&255,se[H++]=B&255),se}function S(m){return x[m>>18&63]+x[m>>12&63]+x[m>>6&63]+x[m&63]}function k(m,B,F){for(var V,j=[],se=B;se<F;se+=3)V=(m[se]<<16&16711680)+(m[se+1]<<8&65280)+(m[se+2]&255),j.push(S(V));return j.join("")}function p(m){for(var B,F=m.length,V=F%3,j=[],se=16383,H=0,X=F-V;H<X;H+=se)j.push(k(m,H,H+se>X?X:H+se));return V===1?(B=m[F-1],j.push(x[B>>2]+x[B<<4&63]+"==")):V===2&&(B=(m[F-2]<<8)+m[F-1],j.push(x[B>>10]+x[B>>4&63]+x[B<<2&63]+"=")),j.join("")}},19208:function(Zn,Dt,x){"use strict";var M;var me=x(86251),be=x(67467),we=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Dt.lW=G,M=H,Dt.h2=50;var W=2147483647;M=W,G.TYPED_ARRAY_SUPPORT=d(),!G.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 d(){try{var I=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(I,g),I.foo()===42}catch(v){return!1}}Object.defineProperty(G.prototype,"parent",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.buffer}}),Object.defineProperty(G.prototype,"offset",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.byteOffset}});function ye(I){if(I>W)throw new RangeError('The value "'+I+'" is invalid for option "size"');var g=new Uint8Array(I);return Object.setPrototypeOf(g,G.prototype),g}function G(I,g,v){if(typeof I=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(I)}return A(I,g,v)}G.poolSize=8192;function A(I,g,v){if(typeof I=="string")return m(I,g);if(ArrayBuffer.isView(I))return F(I);if(I==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I);if(It(I,ArrayBuffer)||I&&It(I.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(It(I,SharedArrayBuffer)||I&&It(I.buffer,SharedArrayBuffer)))return V(I,g,v);if(typeof I=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Q=I.valueOf&&I.valueOf();if(Q!=null&&Q!==I)return G.from(Q,g,v);var b=j(I);if(b)return b;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof I[Symbol.toPrimitive]=="function")return G.from(I[Symbol.toPrimitive]("string"),g,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I)}G.from=function(I,g,v){return A(I,g,v)},Object.setPrototypeOf(G.prototype,Uint8Array.prototype),Object.setPrototypeOf(G,Uint8Array);function S(I){if(typeof I!="number")throw new TypeError('"size" argument must be of type number');if(I<0)throw new RangeError('The value "'+I+'" is invalid for option "size"')}function k(I,g,v){return S(I),I<=0?ye(I):g!==void 0?typeof v=="string"?ye(I).fill(g,v):ye(I).fill(g):ye(I)}G.alloc=function(I,g,v){return k(I,g,v)};function p(I){return S(I),ye(I<0?0:se(I)|0)}G.allocUnsafe=function(I){return p(I)},G.allocUnsafeSlow=function(I){return p(I)};function m(I,g){if((typeof g!="string"||g==="")&&(g="utf8"),!G.isEncoding(g))throw new TypeError("Unknown encoding: "+g);var v=X(I,g)|0,Q=ye(v),b=Q.write(I,g);return b!==v&&(Q=Q.slice(0,b)),Q}function B(I){for(var g=I.length<0?0:se(I.length)|0,v=ye(g),Q=0;Q<g;Q+=1)v[Q]=I[Q]&255;return v}function F(I){if(It(I,Uint8Array)){var g=new Uint8Array(I);return V(g.buffer,g.byteOffset,g.byteLength)}return B(I)}function V(I,g,v){if(g<0||I.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(I.byteLength<g+(v||0))throw new RangeError('"length" is outside of buffer bounds');var Q;return g===void 0&&v===void 0?Q=new Uint8Array(I):v===void 0?Q=new Uint8Array(I,g):Q=new Uint8Array(I,g,v),Object.setPrototypeOf(Q,G.prototype),Q}function j(I){if(G.isBuffer(I)){var g=se(I.length)|0,v=ye(g);return v.length===0||I.copy(v,0,0,g),v}if(I.length!==void 0)return typeof I.length!="number"||He(I.length)?ye(0):B(I);if(I.type==="Buffer"&&Array.isArray(I.data))return B(I.data)}function se(I){if(I>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return I|0}function H(I){return+I!=I&&(I=0),G.alloc(+I)}G.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==G.prototype},G.compare=function(g,v){if(It(g,Uint8Array)&&(g=G.from(g,g.offset,g.byteLength)),It(v,Uint8Array)&&(v=G.from(v,v.offset,v.byteLength)),!G.isBuffer(g)||!G.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===v)return 0;for(var Q=g.length,b=v.length,w=0,D=Math.min(Q,b);w<D;++w)if(g[w]!==v[w]){Q=g[w],b=v[w];break}return Q<b?-1:b<Q?1:0},G.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}},G.concat=function(g,v){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return G.alloc(0);var Q;if(v===void 0)for(v=0,Q=0;Q<g.length;++Q)v+=g[Q].length;var b=G.allocUnsafe(v),w=0;for(Q=0;Q<g.length;++Q){var D=g[Q];if(It(D,Uint8Array))w+D.length>b.length?G.from(D).copy(b,w):Uint8Array.prototype.set.call(b,D,w);else if(G.isBuffer(D))D.copy(b,w);else throw new TypeError('"list" argument must be an Array of Buffers');w+=D.length}return b};function X(I,g){if(G.isBuffer(I))return I.length;if(ArrayBuffer.isView(I)||It(I,ArrayBuffer))return I.byteLength;if(typeof I!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof I);var v=I.length,Q=arguments.length>2&&arguments[2]===!0;if(!Q&&v===0)return 0;for(var b=!1;;)switch(g){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return Rt(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return mt(I).length;default:if(b)return Q?-1:Rt(I).length;g=(""+g).toLowerCase(),b=!0}}G.byteLength=X;function P(I,g,v){var Q=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,g>>>=0,v<=g))return"";for(I||(I="utf8");;)switch(I){case"hex":return _(this,g,v);case"utf8":case"utf-8":return U(this,g,v);case"ascii":return he(this,g,v);case"latin1":case"binary":return ae(this,g,v);case"base64":return Z(this,g,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,g,v);default:if(Q)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),Q=!0}}G.prototype._isBuffer=!0;function R(I,g,v){var Q=I[g];I[g]=I[v],I[v]=Q}G.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 v=0;v<g;v+=2)R(this,v,v+1);return this},G.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 v=0;v<g;v+=4)R(this,v,v+3),R(this,v+1,v+2);return this},G.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 v=0;v<g;v+=8)R(this,v,v+7),R(this,v+1,v+6),R(this,v+2,v+5),R(this,v+3,v+4);return this},G.prototype.toString=function(){var g=this.length;return g===0?"":arguments.length===0?U(this,0,g):P.apply(this,arguments)},G.prototype.toLocaleString=G.prototype.toString,G.prototype.equals=function(g){if(!G.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:G.compare(this,g)===0},G.prototype.inspect=function(){var g="",v=Dt.h2;return g=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(g+=" ... "),"<Buffer "+g+">"},we&&(G.prototype[we]=G.prototype.inspect),G.prototype.compare=function(g,v,Q,b,w){if(It(g,Uint8Array)&&(g=G.from(g,g.offset,g.byteLength)),!G.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(v===void 0&&(v=0),Q===void 0&&(Q=g?g.length:0),b===void 0&&(b=0),w===void 0&&(w=this.length),v<0||Q>g.length||b<0||w>this.length)throw new RangeError("out of range index");if(b>=w&&v>=Q)return 0;if(b>=w)return-1;if(v>=Q)return 1;if(v>>>=0,Q>>>=0,b>>>=0,w>>>=0,this===g)return 0;for(var D=w-b,Ae=Q-v,L=Math.min(D,Ae),oe=this.slice(b,w),re=g.slice(v,Q),Be=0;Be<L;++Be)if(oe[Be]!==re[Be]){D=oe[Be],Ae=re[Be];break}return D<Ae?-1:Ae<D?1:0};function fe(I,g,v,Q,b){if(I.length===0)return-1;if(typeof v=="string"?(Q=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,He(v)&&(v=b?0:I.length-1),v<0&&(v=I.length+v),v>=I.length){if(b)return-1;v=I.length-1}else if(v<0)if(b)v=0;else return-1;if(typeof g=="string"&&(g=G.from(g,Q)),G.isBuffer(g))return g.length===0?-1:de(I,g,v,Q,b);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?b?Uint8Array.prototype.indexOf.call(I,g,v):Uint8Array.prototype.lastIndexOf.call(I,g,v):de(I,[g],v,Q,b);throw new TypeError("val must be string, number or Buffer")}function de(I,g,v,Q,b){var w=1,D=I.length,Ae=g.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(I.length<2||g.length<2)return-1;w=2,D/=2,Ae/=2,v/=2}function L(Ie,Re){return w===1?Ie[Re]:Ie.readUInt16BE(Re*w)}var oe;if(b){var re=-1;for(oe=v;oe<D;oe++)if(L(I,oe)===L(g,re===-1?0:oe-re)){if(re===-1&&(re=oe),oe-re+1===Ae)return re*w}else re!==-1&&(oe-=oe-re),re=-1}else for(v+Ae>D&&(v=D-Ae),oe=v;oe>=0;oe--){for(var Be=!0,Ce=0;Ce<Ae;Ce++)if(L(I,oe+Ce)!==L(g,Ce)){Be=!1;break}if(Be)return oe}return-1}G.prototype.includes=function(g,v,Q){return this.indexOf(g,v,Q)!==-1},G.prototype.indexOf=function(g,v,Q){return fe(this,g,v,Q,!0)},G.prototype.lastIndexOf=function(g,v,Q){return fe(this,g,v,Q,!1)};function ie(I,g,v,Q){v=Number(v)||0;var b=I.length-v;Q?(Q=Number(Q),Q>b&&(Q=b)):Q=b;var w=g.length;Q>w/2&&(Q=w/2);for(var D=0;D<Q;++D){var Ae=parseInt(g.substr(D*2,2),16);if(He(Ae))return D;I[v+D]=Ae}return D}function q(I,g,v,Q){return Ne(Rt(g,I.length-v),I,v,Q)}function ge(I,g,v,Q){return Ne(te(g),I,v,Q)}function z(I,g,v,Q){return Ne(mt(g),I,v,Q)}function Fe(I,g,v,Q){return Ne(Le(g,I.length-v),I,v,Q)}G.prototype.write=function(g,v,Q,b){if(v===void 0)b="utf8",Q=this.length,v=0;else if(Q===void 0&&typeof v=="string")b=v,Q=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(Q)?(Q=Q>>>0,b===void 0&&(b="utf8")):(b=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var w=this.length-v;if((Q===void 0||Q>w)&&(Q=w),g.length>0&&(Q<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");b||(b="utf8");for(var D=!1;;)switch(b){case"hex":return ie(this,g,v,Q);case"utf8":case"utf-8":return q(this,g,v,Q);case"ascii":case"latin1":case"binary":return ge(this,g,v,Q);case"base64":return z(this,g,v,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Fe(this,g,v,Q);default:if(D)throw new TypeError("Unknown encoding: "+b);b=(""+b).toLowerCase(),D=!0}},G.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(I,g,v){return g===0&&v===I.length?me.fromByteArray(I):me.fromByteArray(I.slice(g,v))}function U(I,g,v){v=Math.min(I.length,v);for(var Q=[],b=g;b<v;){var w=I[b],D=null,Ae=w>239?4:w>223?3:w>191?2:1;if(b+Ae<=v){var L,oe,re,Be;switch(Ae){case 1:w<128&&(D=w);break;case 2:L=I[b+1],(L&192)===128&&(Be=(w&31)<<6|L&63,Be>127&&(D=Be));break;case 3:L=I[b+1],oe=I[b+2],(L&192)===128&&(oe&192)===128&&(Be=(w&15)<<12|(L&63)<<6|oe&63,Be>2047&&(Be<55296||Be>57343)&&(D=Be));break;case 4:L=I[b+1],oe=I[b+2],re=I[b+3],(L&192)===128&&(oe&192)===128&&(re&192)===128&&(Be=(w&15)<<18|(L&63)<<12|(oe&63)<<6|re&63,Be>65535&&Be<1114112&&(D=Be))}}D===null?(D=65533,Ae=1):D>65535&&(D-=65536,Q.push(D>>>10&1023|55296),D=56320|D&1023),Q.push(D),b+=Ae}return ee(Q)}var K=4096;function ee(I){var g=I.length;if(g<=K)return String.fromCharCode.apply(String,I);for(var v="",Q=0;Q<g;)v+=String.fromCharCode.apply(String,I.slice(Q,Q+=K));return v}function he(I,g,v){var Q="";v=Math.min(I.length,v);for(var b=g;b<v;++b)Q+=String.fromCharCode(I[b]&127);return Q}function ae(I,g,v){var Q="";v=Math.min(I.length,v);for(var b=g;b<v;++b)Q+=String.fromCharCode(I[b]);return Q}function _(I,g,v){var Q=I.length;(!g||g<0)&&(g=0),(!v||v<0||v>Q)&&(v=Q);for(var b="",w=g;w<v;++w)b+=Se[I[w]];return b}function y(I,g,v){for(var Q=I.slice(g,v),b="",w=0;w<Q.length-1;w+=2)b+=String.fromCharCode(Q[w]+Q[w+1]*256);return b}G.prototype.slice=function(g,v){var Q=this.length;g=~~g,v=v===void 0?Q:~~v,g<0?(g+=Q,g<0&&(g=0)):g>Q&&(g=Q),v<0?(v+=Q,v<0&&(v=0)):v>Q&&(v=Q),v<g&&(v=g);var b=this.subarray(g,v);return Object.setPrototypeOf(b,G.prototype),b};function Y(I,g,v){if(I%1!==0||I<0)throw new RangeError("offset is not uint");if(I+g>v)throw new RangeError("Trying to access beyond buffer length")}G.prototype.readUintLE=G.prototype.readUIntLE=function(g,v,Q){g=g>>>0,v=v>>>0,Q||Y(g,v,this.length);for(var b=this[g],w=1,D=0;++D<v&&(w*=256);)b+=this[g+D]*w;return b},G.prototype.readUintBE=G.prototype.readUIntBE=function(g,v,Q){g=g>>>0,v=v>>>0,Q||Y(g,v,this.length);for(var b=this[g+--v],w=1;v>0&&(w*=256);)b+=this[g+--v]*w;return b},G.prototype.readUint8=G.prototype.readUInt8=function(g,v){return g=g>>>0,v||Y(g,1,this.length),this[g]},G.prototype.readUint16LE=G.prototype.readUInt16LE=function(g,v){return g=g>>>0,v||Y(g,2,this.length),this[g]|this[g+1]<<8},G.prototype.readUint16BE=G.prototype.readUInt16BE=function(g,v){return g=g>>>0,v||Y(g,2,this.length),this[g]<<8|this[g+1]},G.prototype.readUint32LE=G.prototype.readUInt32LE=function(g,v){return g=g>>>0,v||Y(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},G.prototype.readUint32BE=G.prototype.readUInt32BE=function(g,v){return g=g>>>0,v||Y(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},G.prototype.readIntLE=function(g,v,Q){g=g>>>0,v=v>>>0,Q||Y(g,v,this.length);for(var b=this[g],w=1,D=0;++D<v&&(w*=256);)b+=this[g+D]*w;return w*=128,b>=w&&(b-=Math.pow(2,8*v)),b},G.prototype.readIntBE=function(g,v,Q){g=g>>>0,v=v>>>0,Q||Y(g,v,this.length);for(var b=v,w=1,D=this[g+--b];b>0&&(w*=256);)D+=this[g+--b]*w;return w*=128,D>=w&&(D-=Math.pow(2,8*v)),D},G.prototype.readInt8=function(g,v){return g=g>>>0,v||Y(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},G.prototype.readInt16LE=function(g,v){g=g>>>0,v||Y(g,2,this.length);var Q=this[g]|this[g+1]<<8;return Q&32768?Q|4294901760:Q},G.prototype.readInt16BE=function(g,v){g=g>>>0,v||Y(g,2,this.length);var Q=this[g+1]|this[g]<<8;return Q&32768?Q|4294901760:Q},G.prototype.readInt32LE=function(g,v){return g=g>>>0,v||Y(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},G.prototype.readInt32BE=function(g,v){return g=g>>>0,v||Y(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},G.prototype.readFloatLE=function(g,v){return g=g>>>0,v||Y(g,4,this.length),be.read(this,g,!0,23,4)},G.prototype.readFloatBE=function(g,v){return g=g>>>0,v||Y(g,4,this.length),be.read(this,g,!1,23,4)},G.prototype.readDoubleLE=function(g,v){return g=g>>>0,v||Y(g,8,this.length),be.read(this,g,!0,52,8)},G.prototype.readDoubleBE=function(g,v){return g=g>>>0,v||Y(g,8,this.length),be.read(this,g,!1,52,8)};function ue(I,g,v,Q,b,w){if(!G.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>b||g<w)throw new RangeError('"value" argument is out of bounds');if(v+Q>I.length)throw new RangeError("Index out of range")}G.prototype.writeUintLE=G.prototype.writeUIntLE=function(g,v,Q,b){if(g=+g,v=v>>>0,Q=Q>>>0,!b){var w=Math.pow(2,8*Q)-1;ue(this,g,v,Q,w,0)}var D=1,Ae=0;for(this[v]=g&255;++Ae<Q&&(D*=256);)this[v+Ae]=g/D&255;return v+Q},G.prototype.writeUintBE=G.prototype.writeUIntBE=function(g,v,Q,b){if(g=+g,v=v>>>0,Q=Q>>>0,!b){var w=Math.pow(2,8*Q)-1;ue(this,g,v,Q,w,0)}var D=Q-1,Ae=1;for(this[v+D]=g&255;--D>=0&&(Ae*=256);)this[v+D]=g/Ae&255;return v+Q},G.prototype.writeUint8=G.prototype.writeUInt8=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,1,255,0),this[v]=g&255,v+1},G.prototype.writeUint16LE=G.prototype.writeUInt16LE=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,2,65535,0),this[v]=g&255,this[v+1]=g>>>8,v+2},G.prototype.writeUint16BE=G.prototype.writeUInt16BE=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,2,65535,0),this[v]=g>>>8,this[v+1]=g&255,v+2},G.prototype.writeUint32LE=G.prototype.writeUInt32LE=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,4,4294967295,0),this[v+3]=g>>>24,this[v+2]=g>>>16,this[v+1]=g>>>8,this[v]=g&255,v+4},G.prototype.writeUint32BE=G.prototype.writeUInt32BE=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,4,4294967295,0),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4},G.prototype.writeIntLE=function(g,v,Q,b){if(g=+g,v=v>>>0,!b){var w=Math.pow(2,8*Q-1);ue(this,g,v,Q,w-1,-w)}var D=0,Ae=1,L=0;for(this[v]=g&255;++D<Q&&(Ae*=256);)g<0&&L===0&&this[v+D-1]!==0&&(L=1),this[v+D]=(g/Ae>>0)-L&255;return v+Q},G.prototype.writeIntBE=function(g,v,Q,b){if(g=+g,v=v>>>0,!b){var w=Math.pow(2,8*Q-1);ue(this,g,v,Q,w-1,-w)}var D=Q-1,Ae=1,L=0;for(this[v+D]=g&255;--D>=0&&(Ae*=256);)g<0&&L===0&&this[v+D+1]!==0&&(L=1),this[v+D]=(g/Ae>>0)-L&255;return v+Q},G.prototype.writeInt8=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,1,127,-128),g<0&&(g=255+g+1),this[v]=g&255,v+1},G.prototype.writeInt16LE=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,2,32767,-32768),this[v]=g&255,this[v+1]=g>>>8,v+2},G.prototype.writeInt16BE=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,2,32767,-32768),this[v]=g>>>8,this[v+1]=g&255,v+2},G.prototype.writeInt32LE=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,4,2147483647,-2147483648),this[v]=g&255,this[v+1]=g>>>8,this[v+2]=g>>>16,this[v+3]=g>>>24,v+4},G.prototype.writeInt32BE=function(g,v,Q){return g=+g,v=v>>>0,Q||ue(this,g,v,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4};function Qe(I,g,v,Q,b,w){if(v+Q>I.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function et(I,g,v,Q,b){return g=+g,v=v>>>0,b||Qe(I,g,v,4,34028234663852886e22,-34028234663852886e22),be.write(I,g,v,Q,23,4),v+4}G.prototype.writeFloatLE=function(g,v,Q){return et(this,g,v,!0,Q)},G.prototype.writeFloatBE=function(g,v,Q){return et(this,g,v,!1,Q)};function gt(I,g,v,Q,b){return g=+g,v=v>>>0,b||Qe(I,g,v,8,17976931348623157e292,-17976931348623157e292),be.write(I,g,v,Q,52,8),v+8}G.prototype.writeDoubleLE=function(g,v,Q){return gt(this,g,v,!0,Q)},G.prototype.writeDoubleBE=function(g,v,Q){return gt(this,g,v,!1,Q)},G.prototype.copy=function(g,v,Q,b){if(!G.isBuffer(g))throw new TypeError("argument should be a Buffer");if(Q||(Q=0),!b&&b!==0&&(b=this.length),v>=g.length&&(v=g.length),v||(v=0),b>0&&b<Q&&(b=Q),b===Q||g.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(Q<0||Q>=this.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("sourceEnd out of bounds");b>this.length&&(b=this.length),g.length-v<b-Q&&(b=g.length-v+Q);var w=b-Q;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,Q,b):Uint8Array.prototype.set.call(g,this.subarray(Q,b),v),w},G.prototype.fill=function(g,v,Q,b){if(typeof g=="string"){if(typeof v=="string"?(b=v,v=0,Q=this.length):typeof Q=="string"&&(b=Q,Q=this.length),b!==void 0&&typeof b!="string")throw new TypeError("encoding must be a string");if(typeof b=="string"&&!G.isEncoding(b))throw new TypeError("Unknown encoding: "+b);if(g.length===1){var w=g.charCodeAt(0);(b==="utf8"&&w<128||b==="latin1")&&(g=w)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(v<0||this.length<v||this.length<Q)throw new RangeError("Out of range index");if(Q<=v)return this;v=v>>>0,Q=Q===void 0?this.length:Q>>>0,g||(g=0);var D;if(typeof g=="number")for(D=v;D<Q;++D)this[D]=g;else{var Ae=G.isBuffer(g)?g:G.from(g,b),L=Ae.length;if(L===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(D=0;D<Q-v;++D)this[D+v]=Ae[D%L]}return this};var bt=/[^+/0-9A-Za-z-_]/g;function Vt(I){if(I=I.split("=")[0],I=I.trim().replace(bt,""),I.length<2)return"";for(;I.length%4!==0;)I=I+"=";return I}function Rt(I,g){g=g||1/0;for(var v,Q=I.length,b=null,w=[],D=0;D<Q;++D){if(v=I.charCodeAt(D),v>55295&&v<57344){if(!b){if(v>56319){(g-=3)>-1&&w.push(239,191,189);continue}else if(D+1===Q){(g-=3)>-1&&w.push(239,191,189);continue}b=v;continue}if(v<56320){(g-=3)>-1&&w.push(239,191,189),b=v;continue}v=(b-55296<<10|v-56320)+65536}else b&&(g-=3)>-1&&w.push(239,191,189);if(b=null,v<128){if((g-=1)<0)break;w.push(v)}else if(v<2048){if((g-=2)<0)break;w.push(v>>6|192,v&63|128)}else if(v<65536){if((g-=3)<0)break;w.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((g-=4)<0)break;w.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return w}function te(I){for(var g=[],v=0;v<I.length;++v)g.push(I.charCodeAt(v)&255);return g}function Le(I,g){for(var v,Q,b,w=[],D=0;D<I.length&&!((g-=2)<0);++D)v=I.charCodeAt(D),Q=v>>8,b=v%256,w.push(b),w.push(Q);return w}function mt(I){return me.toByteArray(Vt(I))}function Ne(I,g,v,Q){for(var b=0;b<Q&&!(b+v>=g.length||b>=I.length);++b)g[b+v]=I[b];return b}function It(I,g){return I instanceof g||I!=null&&I.constructor!=null&&I.constructor.name!=null&&I.constructor.name===g.name}function He(I){return I!==I}var Se=function(){for(var I="0123456789abcdef",g=new Array(256),v=0;v<16;++v)for(var Q=v*16,b=0;b<16;++b)g[Q+b]=I[v]+I[b];return g}()},64018:function(){var Zn,Dt,x,M=!1,me,be;window.PR_SHOULD_USE_CONTINUATION=!0;var we,W;(function(){var d=window,ye=["break,continue,do,else,for,if,return,while"],G=[ye,"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"],A=[G,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],S=[A,"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"],k=[A,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],p=[A,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],m="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",B=[A,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],F="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",V=[ye,"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"],j=[ye,"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"],se=[ye,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],H=[S,p,k,B,F,V,j,se],X=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,P="str",R="kwd",fe="com",de="typ",ie="lit",q="pun",ge="pln",z="tag",Fe="dec",Z="src",U="atn",K="atv",ee="nocode",he="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function ae(I){for(var g=0,v=!1,Q=!1,b=0,w=I.length;b<w;++b){var D=I[b];if(D.ignoreCase)Q=!0;else if(/[a-z]/i.test(D.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){v=!0,Q=!1;break}}var Ae={b:8,t:9,n:10,v:11,f:12,r:13};function L(Ie){var Re=Ie.charCodeAt(0);if(Re!==92)return Re;var ht=Ie.charAt(1);return Re=Ae[ht],Re||("0"<=ht&&ht<="7"?parseInt(Ie.substring(1),8):ht==="u"||ht==="x"?parseInt(Ie.substring(2),16):Ie.charCodeAt(1))}function oe(Ie){if(Ie<32)return(Ie<16?"\\x0":"\\x")+Ie.toString(16);var Re=String.fromCharCode(Ie);return Re==="\\"||Re==="-"||Re==="]"||Re==="^"?"\\"+Re:Re}function re(Ie){var Re=Ie.substring(1,Ie.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")),ht=[],Ye=Re[0]==="^",nt=["["];Ye&&nt.push("^");for(var At=Ye?1:0,Ut=Re.length;At<Ut;++At){var Et=Re[At];if(/\\[bdsw]/i.test(Et))nt.push(Et);else{var vt=L(Et),tn;At+2<Ut&&Re[At+1]==="-"?(tn=L(Re[At+2]),At+=2):tn=vt,ht.push([vt,tn]),tn<65||vt>122||(tn<65||vt>90||ht.push([Math.max(65,vt)|32,Math.min(tn,90)|32]),tn<97||vt>122||ht.push([Math.max(97,vt)&-33,Math.min(tn,122)&-33]))}}ht.sort(function(Ln,zt){return Ln[0]-zt[0]||zt[1]-Ln[1]});for(var en=[],Pt=[],At=0;At<ht.length;++At){var dn=ht[At];dn[0]<=Pt[1]+1?Pt[1]=Math.max(Pt[1],dn[1]):en.push(Pt=dn)}for(var At=0;At<en.length;++At){var dn=en[At];nt.push(oe(dn[0])),dn[1]>dn[0]&&(dn[1]+1>dn[0]&&nt.push("-"),nt.push(oe(dn[1])))}return nt.push("]"),nt.join("")}function Be(Ie){for(var Re=Ie.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")),ht=Re.length,Ye=[],nt=0,At=0;nt<ht;++nt){var Ut=Re[nt];if(Ut==="(")++At;else if(Ut.charAt(0)==="\\"){var Et=+Ut.substring(1);Et&&(Et<=At?Ye[Et]=-1:Re[nt]=oe(Et))}}for(var nt=1;nt<Ye.length;++nt)Ye[nt]===-1&&(Ye[nt]=++g);for(var nt=0,At=0;nt<ht;++nt){var Ut=Re[nt];if(Ut==="(")++At,Ye[At]||(Re[nt]="(?:");else if(Ut.charAt(0)==="\\"){var Et=+Ut.substring(1);Et&&Et<=At&&(Re[nt]="\\"+Ye[Et])}}for(var nt=0;nt<ht;++nt)Re[nt]==="^"&&Re[nt+1]!=="^"&&(Re[nt]="");if(Ie.ignoreCase&&v)for(var nt=0;nt<ht;++nt){var Ut=Re[nt],vt=Ut.charAt(0);Ut.length>=2&&vt==="["?Re[nt]=re(Ut):vt!=="\\"&&(Re[nt]=Ut.replace(/[a-zA-Z]/g,function(Pt){var dn=Pt.charCodeAt(0);return"["+String.fromCharCode(dn&-33,dn|32)+"]"}))}return Re.join("")}for(var Ce=[],b=0,w=I.length;b<w;++b){var D=I[b];if(D.global||D.multiline)throw new Error(""+D);Ce.push("(?:"+Be(D)+")")}return new RegExp(Ce.join("|"),Q?"gi":"g")}function _(I,g){var v=/(?:^|\s)nocode(?:\s|$)/,Q=[],b=0,w=[],D=0;function Ae(L){var oe=L.nodeType;if(oe==1){if(v.test(L.className))return;for(var re=L.firstChild;re;re=re.nextSibling)Ae(re);var Be=L.nodeName.toLowerCase();(Be==="br"||Be==="li")&&(Q[D]=`
`,w[D<<1]=b++,w[D++<<1|1]=L)}else if(oe==3||oe==4){var Ce=L.nodeValue;Ce.length&&(g?Ce=Ce.replace(/\r\n?/g,`
`):Ce=Ce.replace(/[ \t\r\n]+/g," "),Q[D]=Ce,w[D<<1]=b,b+=Ce.length,w[D++<<1|1]=L)}}return Ae(I),{sourceCode:Q.join("").replace(/\n$/,""),spans:w}}function y(I,g,v,Q,b){if(v){var w={sourceNode:I,pre:1,langExtension:null,numberLines:null,sourceCode:v,spans:null,basePos:g,decorations:null};Q(w),b.push.apply(b,w.decorations)}}var Y=/\S/;function ue(I){for(var g=void 0,v=I.firstChild;v;v=v.nextSibling){var Q=v.nodeType;g=Q===1?g?I:v:Q===3&&Y.test(v.nodeValue)?I:g}return g===I?void 0:g}function Qe(I,g){var v={},Q;(function(){for(var D=I.concat(g),Ae=[],L={},oe=0,re=D.length;oe<re;++oe){var Be=D[oe],Ce=Be[3];if(Ce)for(var Ie=Ce.length;--Ie>=0;)v[Ce.charAt(Ie)]=Be;var Re=Be[1],ht=""+Re;L.hasOwnProperty(ht)||(Ae.push(Re),L[ht]=null)}Ae.push(/[\0-\uffff]/),Q=ae(Ae)})();var b=g.length,w=function(D){for(var Ae=D.sourceCode,L=D.basePos,oe=D.sourceNode,re=[L,ge],Be=0,Ce=Ae.match(Q)||[],Ie={},Re=0,ht=Ce.length;Re<ht;++Re){var Ye=Ce[Re],nt=Ie[Ye],At=void 0,Ut;if(typeof nt=="string")Ut=!1;else{var Et=v[Ye.charAt(0)];if(Et)At=Ye.match(Et[1]),nt=Et[0];else{for(var vt=0;vt<b;++vt)if(Et=g[vt],At=Ye.match(Et[1]),At){nt=Et[0];break}At||(nt=ge)}Ut=nt.length>=5&&nt.substring(0,5)==="lang-",Ut&&!(At&&typeof At[1]=="string")&&(Ut=!1,nt=Z),Ut||(Ie[Ye]=nt)}var tn=Be;if(Be+=Ye.length,!Ut)re.push(L+tn,nt);else{var en=At[1],Pt=Ye.indexOf(en),dn=Pt+en.length;At[2]&&(dn=Ye.length-At[2].length,Pt=dn-en.length);var Ln=nt.substring(5);y(oe,L+tn,Ye.substring(0,Pt),w,re),y(oe,L+tn+Pt,en,Le(Ln,en),re),y(oe,L+tn+dn,Ye.substring(dn),w,re)}}D.decorations=re};return w}function et(I){var g=[],v=[];I.tripleQuotedStrings?g.push([P,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):I.multiLineStrings?g.push([P,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):g.push([P,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),I.verbatimStrings&&v.push([P,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=I.hashComments;Q&&(I.cStyleComments?(Q>1?g.push([fe,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):g.push([fe,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),v.push([P,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):g.push([fe,/^#[^\r\n]*/,null,"#"])),I.cStyleComments&&(v.push([fe,/^\/\/[^\r\n]*/,null]),v.push([fe,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var b=I.regexLiterals;if(b){var w=b>1?"":`
\r`,D=w?".":"[\\S\\s]",Ae="/(?=[^/*"+w+"])(?:[^/\\x5B\\x5C"+w+"]|\\x5C"+D+"|\\x5B(?:[^\\x5C\\x5D"+w+"]|\\x5C"+D+")*(?:\\x5D|$))+/";v.push(["lang-regex",RegExp("^"+he+"("+Ae+")")])}var L=I.types;L&&v.push([de,L]);var oe=(""+I.keywords).replace(/^ | $/g,"");oe.length&&v.push([R,new RegExp("^(?:"+oe.replace(/[\s,]+/g,"|")+")\\b"),null]),g.push([ge,/^\s+/,null,` \r
\xA0`]);var re="^.[^\\s\\w.$@'\"`/\\\\]*";return I.regexLiterals&&(re+="(?!s*/)"),v.push([ie,/^@[a-z_$][a-z_$@0-9]*/i,null],[de,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[ge,/^[a-z_$][a-z_$@0-9]*/i,null],[ie,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[ge,/^\\[\s\S]?/,null],[q,new RegExp(re),null]),Qe(g,v)}var gt=et({keywords:H,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function bt(I,g,v){for(var Q=/(?:^|\s)nocode(?:\s|$)/,b=/\r\n?|\n/,w=I.ownerDocument,D=w.createElement("li");I.firstChild;)D.appendChild(I.firstChild);var Ae=[D];function L(Re){var ht=Re.nodeType;if(ht==1&&!Q.test(Re.className))if(Re.nodeName==="br")oe(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var Ye=Re.firstChild;Ye;Ye=Ye.nextSibling)L(Ye);else if((ht==3||ht==4)&&v){var nt=Re.nodeValue,At=nt.match(b);if(At){var Ut=nt.substring(0,At.index);Re.nodeValue=Ut;var Et=nt.substring(At.index+At[0].length);if(Et){var vt=Re.parentNode;vt.insertBefore(w.createTextNode(Et),Re.nextSibling)}oe(Re),Ut||Re.parentNode.removeChild(Re)}}}function oe(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function ht(At,Ut){var Et=Ut?At.cloneNode(!1):At,vt=At.parentNode;if(vt){var tn=ht(vt,1),en=At.nextSibling;tn.appendChild(Et);for(var Pt=en;Pt;Pt=en)en=Pt.nextSibling,tn.appendChild(Pt)}return Et}for(var Ye=ht(Re.nextSibling,0),nt;(nt=Ye.parentNode)&&nt.nodeType===1;)Ye=nt;Ae.push(Ye)}for(var re=0;re<Ae.length;++re)L(Ae[re]);g===(g|0)&&Ae[0].setAttribute("value",g);var Be=w.createElement("ol");Be.className="linenums";for(var Ce=Math.max(0,g-1|0)||0,re=0,Ie=Ae.length;re<Ie;++re)D=Ae[re],D.className="L"+(re+Ce)%10,D.firstChild||D.appendChild(w.createTextNode("\xA0")),Be.appendChild(D);I.appendChild(Be)}function Vt(I){var g=/\bMSIE\s(\d+)/.exec(navigator.userAgent);g=g&&+g[1]<=8;var v=/\n/g,Q=I.sourceCode,b=Q.length,w=0,D=I.spans,Ae=D.length,L=0,oe=I.decorations,re=oe.length,Be=0;oe[re]=b;var Ce,Ie;for(Ie=Ce=0;Ie<re;)oe[Ie]!==oe[Ie+2]?(oe[Ce++]=oe[Ie++],oe[Ce++]=oe[Ie++]):Ie+=2;for(re=Ce,Ie=Ce=0;Ie<re;){for(var Re=oe[Ie],ht=oe[Ie+1],Ye=Ie+2;Ye+2<=re&&oe[Ye+1]===ht;)Ye+=2;oe[Ce++]=Re,oe[Ce++]=ht,Ie=Ye}re=oe.length=Ce;var nt=I.sourceNode,At="";nt&&(At=nt.style.display,nt.style.display="none");try{for(var Ut=null;L<Ae;){var Et=D[L],vt=D[L+2]||b,tn=oe[Be+2]||b,Ye=Math.min(vt,tn),en=D[L+1],Pt;if(en.nodeType!==1&&(Pt=Q.substring(w,Ye))){g&&(Pt=Pt.replace(v,"\r")),en.nodeValue=Pt;var dn=en.ownerDocument,Ln=dn.createElement("span");Ln.className=oe[Be+1];var zt=en.parentNode;zt.replaceChild(Ln,en),Ln.appendChild(en),w<vt&&(D[L+1]=en=dn.createTextNode(Q.substring(Ye,vt)),zt.insertBefore(en,Ln.nextSibling))}w=Ye,w>=vt&&(L+=2),w>=tn&&(Be+=2)}}finally{nt&&(nt.style.display=At)}}var Rt={};function te(I,g){for(var v=g.length;--v>=0;){var Q=g[v];Rt.hasOwnProperty(Q)?d.console&&console.warn("cannot override language handler %s",Q):Rt[Q]=I}}function Le(I,g){return I&&Rt.hasOwnProperty(I)||(I=/^\s*</.test(g)?"default-markup":"default-code"),Rt[I]}te(gt,["default-code"]),te(Qe([],[[ge,/^[^<?]+/],[Fe,/^<!\w[^>]*(?:>|$)/],[fe,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[q,/^(?:<[%?]|[%?]>)/],["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"]),te(Qe([[ge,/^[\s]+/,null,` \r
`],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[z,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[U,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[q,/^[=<>\/]+/],["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"]),te(Qe([],[[K,/^[\s\S]+/]]),["uq.val"]),te(et({keywords:S,hashComments:!0,cStyleComments:!0,types:X}),["c","cc","cpp","cxx","cyc","m"]),te(et({keywords:"null,true,false"}),["json"]),te(et({keywords:p,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:X}),["cs"]),te(et({keywords:k,cStyleComments:!0}),["java"]),te(et({keywords:se,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),te(et({keywords:V,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),te(et({keywords:F,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),te(et({keywords:j,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),te(et({keywords:B,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),te(et({keywords:m,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),te(Qe([],[[P,/^[\s\S]+/]]),["regex"]);function mt(I){var g=I.langExtension;try{var v=_(I.sourceNode,I.pre),Q=v.sourceCode;I.sourceCode=Q,I.spans=v.spans,I.basePos=0,Le(g,Q)(I),Vt(I)}catch(b){d.console&&console.log(b&&b.stack||b)}}function Ne(I,g,v){var Q=v||!1,b=g||null,w=document.createElement("div");w.innerHTML="<pre>"+I+"</pre>",w=w.firstChild,Q&&bt(w,Q,!0);var D={langExtension:b,numberLines:Q,sourceNode:w,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return mt(D),w.innerHTML}function It(I,g){var v=g||document.body,Q=v.ownerDocument||document;function b(Et){return v.getElementsByTagName(Et)}for(var w=[b("pre"),b("code"),b("xmp")],D=[],Ae=0;Ae<w.length;++Ae)for(var L=0,oe=w[Ae].length;L<oe;++L)D.push(w[Ae][L]);w=null;var re=Date;re.now||(re={now:function(){return+new Date}});var Be=0,Ce=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ie=/\bprettyprint\b/,Re=/\bprettyprinted\b/,ht=/pre|xmp/i,Ye=/^code$/i,nt=/^(?:pre|code|xmp)$/i,At={};function Ut(){for(var Et=d.PR_SHOULD_USE_CONTINUATION?re.now()+250:1/0;Be<D.length&&re.now()<Et;Be++){for(var vt=D[Be],tn=At,en=vt;en=en.previousSibling;){var Pt=en.nodeType,dn=(Pt===7||Pt===8)&&en.nodeValue;if(dn?!/^\??prettify\b/.test(dn):Pt!==3||/\S/.test(en.nodeValue))break;if(dn){tn={},dn.replace(/\b(\w+)=([\w:.%+-]+)/g,function($t,Ft,vn){tn[Ft]=vn});break}}var Ln=vt.className;if((tn!==At||Ie.test(Ln))&&!Re.test(Ln)){for(var zt=!1,cn=vt.parentNode;cn;cn=cn.parentNode){var qe=cn.tagName;if(nt.test(qe)&&cn.className&&Ie.test(cn.className)){zt=!0;break}}if(!zt){vt.className+=" prettyprinted";var Ke=tn.lang;if(!Ke){Ke=Ln.match(Ce);var je;!Ke&&(je=ue(vt))&&Ye.test(je.tagName)&&(Ke=je.className.match(Ce)),Ke&&(Ke=Ke[1])}var le;if(ht.test(vt.tagName))le=1;else{var Ee=vt.currentStyle,ve=Q.defaultView,Te=Ee?Ee.whiteSpace:ve&&ve.getComputedStyle?ve.getComputedStyle(vt,null).getPropertyValue("white-space"):0;le=Te&&Te.substring(0,3)==="pre"}var ne=tn.linenums;(ne=ne==="true"||+ne)||(ne=Ln.match(/\blinenums\b(?::(\d+))?/),ne=ne?ne[1]&&ne[1].length?+ne[1]:!0:!1),ne&&bt(vt,ne,le);var Nt={langExtension:Ke,sourceNode:vt,numberLines:ne,pre:le,sourceCode:null,basePos:null,spans:null,decorations:null};mt(Nt)}}}Be<D.length?d.setTimeout(Ut,250):typeof I=="function"&&I()}Ut()}var He=d.PR={createSimpleLexer:Qe,registerLangHandler:te,sourceDecorator:et,PR_ATTRIB_NAME:U,PR_ATTRIB_VALUE:K,PR_COMMENT:fe,PR_DECLARATION:Fe,PR_KEYWORD:R,PR_LITERAL:ie,PR_NOCODE:ee,PR_PLAIN:ge,PR_PUNCTUATION:q,PR_SOURCE:Z,PR_STRING:P,PR_TAG:z,PR_TYPE:de,prettyPrintOne:M?d.prettyPrintOne=Ne:we=Ne,prettyPrint:W=M?d.prettyPrint=It:W=It},Se=d.define;typeof Se=="function"&&Se.amd&&Se("google-code-prettify",[],function(){return He})})()},25769:function(Zn,Dt,x){"use strict";var M=x(98040),me={"text/plain":"Text","text/html":"Url",default:"Text"},be="Copy to clipboard: #{key}, Enter";function we(d){var ye=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return d.replace(/#{\s*key\s*}/g,ye)}function W(d,ye){var G,A,S,k,p,m,B=!1;ye||(ye={}),G=ye.debug||!1;try{S=M(),k=document.createRange(),p=document.getSelection(),m=document.createElement("span"),m.textContent=d,m.ariaHidden="true",m.style.all="unset",m.style.position="fixed",m.style.top=0,m.style.clip="rect(0, 0, 0, 0)",m.style.whiteSpace="pre",m.style.webkitUserSelect="text",m.style.MozUserSelect="text",m.style.msUserSelect="text",m.style.userSelect="text",m.addEventListener("copy",function(V){if(V.stopPropagation(),ye.format)if(V.preventDefault(),typeof V.clipboardData=="undefined"){G&&console.warn("unable to use e.clipboardData"),G&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var j=me[ye.format]||me.default;window.clipboardData.setData(j,d)}else V.clipboardData.clearData(),V.clipboardData.setData(ye.format,d);ye.onCopy&&(V.preventDefault(),ye.onCopy(V.clipboardData))}),document.body.appendChild(m),k.selectNodeContents(m),p.addRange(k);var F=document.execCommand("copy");if(!F)throw new Error("copy command was unsuccessful");B=!0}catch(V){G&&console.error("unable to copy using execCommand: ",V),G&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ye.format||"text",d),ye.onCopy&&ye.onCopy(window.clipboardData),B=!0}catch(j){G&&console.error("unable to copy using clipboardData: ",j),G&&console.error("falling back to prompt"),A=we("message"in ye?ye.message:be),window.prompt(A,d)}}finally{p&&(typeof p.removeRange=="function"?p.removeRange(k):p.removeAllRanges()),m&&document.body.removeChild(m),S()}return B}Zn.exports=W},6330:function(Zn,Dt,x){"use strict";x.d(Dt,{HT:function(){return qn},iZ:function(){return Mn}});var M={},me=function(N,O,ce,xe,$e){var Pe=new Worker(M[O]||(M[O]=URL.createObjectURL(new Blob([N+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return Pe.onmessage=function(Xe){var lt=Xe.data,Zt=lt.$e$;if(Zt){var Kt=new Error(Zt[0]);Kt.code=Zt[1],Kt.stack=Zt[2],$e(Kt,null)}else $e(null,lt)},Pe.postMessage(ce,xe),Pe},be=Uint8Array,we=Uint16Array,W=Int32Array,d=new be([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]),ye=new be([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]),G=new be([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),A=function(N,O){for(var ce=new we(31),xe=0;xe<31;++xe)ce[xe]=O+=1<<N[xe-1];for(var $e=new W(ce[30]),xe=1;xe<30;++xe)for(var Pe=ce[xe];Pe<ce[xe+1];++Pe)$e[Pe]=Pe-ce[xe]<<5|xe;return{b:ce,r:$e}},S=A(d,2),k=S.b,p=S.r;k[28]=258,p[258]=28;for(var m=A(ye,0),B=m.b,F=m.r,V=new we(32768),j=0;j<32768;++j){var se=(j&43690)>>1|(j&21845)<<1;se=(se&52428)>>2|(se&13107)<<2,se=(se&61680)>>4|(se&3855)<<4,V[j]=((se&65280)>>8|(se&255)<<8)>>1}for(var H=function(N,O,ce){for(var xe=N.length,$e=0,Pe=new we(O);$e<xe;++$e)N[$e]&&++Pe[N[$e]-1];var Xe=new we(O);for($e=1;$e<O;++$e)Xe[$e]=Xe[$e-1]+Pe[$e-1]<<1;var lt;if(ce){lt=new we(1<<O);var Zt=15-O;for($e=0;$e<xe;++$e)if(N[$e])for(var Kt=$e<<4|N[$e],Ot=O-N[$e],Gt=Xe[N[$e]-1]++<<Ot,pe=Gt|(1<<Ot)-1;Gt<=pe;++Gt)lt[V[Gt]>>Zt]=Kt}else for(lt=new we(xe),$e=0;$e<xe;++$e)N[$e]&&(lt[$e]=V[Xe[N[$e]-1]++]>>15-N[$e]);return lt},X=new be(288),j=0;j<144;++j)X[j]=8;for(var j=144;j<256;++j)X[j]=9;for(var j=256;j<280;++j)X[j]=7;for(var j=280;j<288;++j)X[j]=8;for(var P=new be(32),j=0;j<32;++j)P[j]=5;var R=H(X,9,0),fe=H(X,9,1),de=H(P,5,0),ie=H(P,5,1),q=function(N){for(var O=N[0],ce=1;ce<N.length;++ce)N[ce]>O&&(O=N[ce]);return O},ge=function(N,O,ce){var xe=O/8|0;return(N[xe]|N[xe+1]<<8)>>(O&7)&ce},z=function(N,O){var ce=O/8|0;return(N[ce]|N[ce+1]<<8|N[ce+2]<<16)>>(O&7)},Fe=function(N){return(N+7)/8|0},Z=function(N,O,ce){return(O==null||O<0)&&(O=0),(ce==null||ce>N.length)&&(ce=N.length),new be(N.subarray(O,ce))},U={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},K=["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"],ee=function(N,O,ce){var xe=new Error(O||K[N]);if(xe.code=N,Error.captureStackTrace&&Error.captureStackTrace(xe,ee),!ce)throw xe;return xe},he=function(N,O,ce,xe){var $e=N.length,Pe=xe?xe.length:0;if(!$e||O.f&&!O.l)return ce||new be(0);var Xe=!ce,lt=Xe||O.i!=2,Zt=O.i;Xe&&(ce=new be($e*3));var Kt=function(lr){var pr=ce.length;if(lr>pr){var Ir=new be(Math.max(pr*2,lr));Ir.set(ce),ce=Ir}},Ot=O.f||0,Gt=O.p||0,pe=O.b||0,Ve=O.l,Ze=O.d,ke=O.m,tt=O.n,Je=$e*8;do{if(!Ve){Ot=ge(N,Gt,1);var at=ge(N,Gt+1,3);if(Gt+=3,at)if(at==1)Ve=fe,Ze=ie,ke=9,tt=5;else if(at==2){var it=ge(N,Gt,31)+257,ot=ge(N,Gt+10,15)+4,yt=it+ge(N,Gt+5,31)+1;Gt+=14;for(var ft=new be(yt),Jt=new be(19),on=0;on<ot;++on)Jt[G[on]]=ge(N,Gt+on*3,7);Gt+=ot*3;for(var En=q(Jt),kn=(1<<En)-1,Cn=H(Jt,En,1),on=0;on<yt;){var Rn=Cn[ge(N,Gt,kn)];Gt+=Rn&15;var ut=Rn>>4;if(ut<16)ft[on++]=ut;else{var Pn=0,_n=0;for(ut==16?(_n=3+ge(N,Gt,3),Gt+=2,Pn=ft[on-1]):ut==17?(_n=3+ge(N,Gt,7),Gt+=3):ut==18&&(_n=11+ge(N,Gt,127),Gt+=7);_n--;)ft[on++]=Pn}}var Wn=ft.subarray(0,it),Hn=ft.subarray(it);ke=q(Wn),tt=q(Hn),Ve=H(Wn,ke,1),Ze=H(Hn,tt,1)}else ee(1);else{var ut=Fe(Gt)+4,pt=N[ut-4]|N[ut-3]<<8,ze=ut+pt;if(ze>$e){Zt&&ee(0);break}lt&&Kt(pe+pt),ce.set(N.subarray(ut,ze),pe),O.b=pe+=pt,O.p=Gt=ze*8,O.f=Ot;continue}if(Gt>Je){Zt&&ee(0);break}}lt&&Kt(pe+131072);for(var Jn=(1<<ke)-1,pn=(1<<tt)-1,rr=Gt;;rr=Gt){var Pn=Ve[z(N,Gt)&Jn],hr=Pn>>4;if(Gt+=Pn&15,Gt>Je){Zt&&ee(0);break}if(Pn||ee(2),hr<256)ce[pe++]=hr;else if(hr==256){rr=Gt,Ve=null;break}else{var zn=hr-254;if(hr>264){var on=hr-257,Vn=d[on];zn=ge(N,Gt,(1<<Vn)-1)+k[on],Gt+=Vn}var jn=Ze[z(N,Gt)&pn],Fn=jn>>4;jn||ee(3),Gt+=jn&15;var Hn=B[Fn];if(Fn>3){var Vn=ye[Fn];Hn+=z(N,Gt)&(1<<Vn)-1,Gt+=Vn}if(Gt>Je){Zt&&ee(0);break}lt&&Kt(pe+131072);var Yn=pe+zn;if(pe<Hn){var Sn=Pe-Hn,vr=Math.min(Hn,Yn);for(Sn+pe<0&&ee(3);pe<vr;++pe)ce[pe]=xe[Sn+pe]}for(;pe<Yn;++pe)ce[pe]=ce[pe-Hn]}}O.l=Ve,O.p=rr,O.b=pe,O.f=Ot,Ve&&(Ot=1,O.m=ke,O.d=Ze,O.n=tt)}while(!Ot);return pe!=ce.length&&Xe?Z(ce,0,pe):ce.subarray(0,pe)},ae=function(N,O,ce){ce<<=O&7;var xe=O/8|0;N[xe]|=ce,N[xe+1]|=ce>>8},_=function(N,O,ce){ce<<=O&7;var xe=O/8|0;N[xe]|=ce,N[xe+1]|=ce>>8,N[xe+2]|=ce>>16},y=function(N,O){for(var ce=[],xe=0;xe<N.length;++xe)N[xe]&&ce.push({s:xe,f:N[xe]});var $e=ce.length,Pe=ce.slice();if(!$e)return{t:Vt,l:0};if($e==1){var Xe=new be(ce[0].s+1);return Xe[ce[0].s]=1,{t:Xe,l:1}}ce.sort(function(ze,it){return ze.f-it.f}),ce.push({s:-1,f:25001});var lt=ce[0],Zt=ce[1],Kt=0,Ot=1,Gt=2;for(ce[0]={s:-1,f:lt.f+Zt.f,l:lt,r:Zt};Ot!=$e-1;)lt=ce[ce[Kt].f<ce[Gt].f?Kt++:Gt++],Zt=ce[Kt!=Ot&&ce[Kt].f<ce[Gt].f?Kt++:Gt++],ce[Ot++]={s:-1,f:lt.f+Zt.f,l:lt,r:Zt};for(var pe=Pe[0].s,xe=1;xe<$e;++xe)Pe[xe].s>pe&&(pe=Pe[xe].s);var Ve=new we(pe+1),Ze=Y(ce[Ot-1],Ve,0);if(Ze>O){var xe=0,ke=0,tt=Ze-O,Je=1<<tt;for(Pe.sort(function(it,ot){return Ve[ot.s]-Ve[it.s]||it.f-ot.f});xe<$e;++xe){var at=Pe[xe].s;if(Ve[at]>O)ke+=Je-(1<<Ze-Ve[at]),Ve[at]=O;else break}for(ke>>=tt;ke>0;){var ut=Pe[xe].s;Ve[ut]<O?ke-=1<<O-Ve[ut]++-1:++xe}for(;xe>=0&&ke;--xe){var pt=Pe[xe].s;Ve[pt]==O&&(--Ve[pt],++ke)}Ze=O}return{t:new be(Ve),l:Ze}},Y=function(N,O,ce){return N.s==-1?Math.max(Y(N.l,O,ce+1),Y(N.r,O,ce+1)):O[N.s]=ce},ue=function(N){for(var O=N.length;O&&!N[--O];);for(var ce=new we(++O),xe=0,$e=N[0],Pe=1,Xe=function(Zt){ce[xe++]=Zt},lt=1;lt<=O;++lt)if(N[lt]==$e&&lt!=O)++Pe;else{if(!$e&&Pe>2){for(;Pe>138;Pe-=138)Xe(32754);Pe>2&&(Xe(Pe>10?Pe-11<<5|28690:Pe-3<<5|12305),Pe=0)}else if(Pe>3){for(Xe($e),--Pe;Pe>6;Pe-=6)Xe(8304);Pe>2&&(Xe(Pe-3<<5|8208),Pe=0)}for(;Pe--;)Xe($e);Pe=1,$e=N[lt]}return{c:ce.subarray(0,xe),n:O}},Qe=function(N,O){for(var ce=0,xe=0;xe<O.length;++xe)ce+=N[xe]*O[xe];return ce},et=function(N,O,ce){var xe=ce.length,$e=Fe(O+2);N[$e]=xe&255,N[$e+1]=xe>>8,N[$e+2]=N[$e]^255,N[$e+3]=N[$e+1]^255;for(var Pe=0;Pe<xe;++Pe)N[$e+Pe+4]=ce[Pe];return($e+4+xe)*8},gt=function(N,O,ce,xe,$e,Pe,Xe,lt,Zt,Kt,Ot){ae(O,Ot++,ce),++$e[256];for(var Gt=y($e,15),pe=Gt.t,Ve=Gt.l,Ze=y(Pe,15),ke=Ze.t,tt=Ze.l,Je=ue(pe),at=Je.c,ut=Je.n,pt=ue(ke),ze=pt.c,it=pt.n,ot=new we(19),yt=0;yt<at.length;++yt)++ot[at[yt]&31];for(var yt=0;yt<ze.length;++yt)++ot[ze[yt]&31];for(var ft=y(ot,7),Jt=ft.t,on=ft.l,En=19;En>4&&!Jt[G[En-1]];--En);var kn=Kt+5<<3,Cn=Qe($e,X)+Qe(Pe,P)+Xe,Rn=Qe($e,pe)+Qe(Pe,ke)+Xe+14+3*En+Qe(ot,Jt)+2*ot[16]+3*ot[17]+7*ot[18];if(Zt>=0&&kn<=Cn&&kn<=Rn)return et(O,Ot,N.subarray(Zt,Zt+Kt));var Pn,_n,Wn,Hn;if(ae(O,Ot,1+(Rn<Cn)),Ot+=2,Rn<Cn){Pn=H(pe,Ve,0),_n=pe,Wn=H(ke,tt,0),Hn=ke;var Jn=H(Jt,on,0);ae(O,Ot,ut-257),ae(O,Ot+5,it-1),ae(O,Ot+10,En-4),Ot+=14;for(var yt=0;yt<En;++yt)ae(O,Ot+3*yt,Jt[G[yt]]);Ot+=3*En;for(var pn=[at,ze],rr=0;rr<2;++rr)for(var hr=pn[rr],yt=0;yt<hr.length;++yt){var zn=hr[yt]&31;ae(O,Ot,Jn[zn]),Ot+=Jt[zn],zn>15&&(ae(O,Ot,hr[yt]>>5&127),Ot+=hr[yt]>>12)}}else Pn=R,_n=X,Wn=de,Hn=P;for(var yt=0;yt<lt;++yt){var Vn=xe[yt];if(Vn>255){var zn=Vn>>18&31;_(O,Ot,Pn[zn+257]),Ot+=_n[zn+257],zn>7&&(ae(O,Ot,Vn>>23&31),Ot+=d[zn]);var jn=Vn&31;_(O,Ot,Wn[jn]),Ot+=Hn[jn],jn>3&&(_(O,Ot,Vn>>5&8191),Ot+=ye[jn])}else _(O,Ot,Pn[Vn]),Ot+=_n[Vn]}return _(O,Ot,Pn[256]),Ot+_n[256]},bt=new W([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Vt=new be(0),Rt=function(N,O,ce,xe,$e,Pe){var Xe=Pe.z||N.length,lt=new be(xe+Xe+5*(1+Math.ceil(Xe/7e3))+$e),Zt=lt.subarray(xe,lt.length-$e),Kt=Pe.l,Ot=(Pe.r||0)&7;if(O){Ot&&(Zt[0]=Pe.r>>3);for(var Gt=bt[O-1],pe=Gt>>13,Ve=Gt&8191,Ze=(1<<ce)-1,ke=Pe.p||new we(32768),tt=Pe.h||new we(Ze+1),Je=Math.ceil(ce/3),at=2*Je,ut=function(zr){return(N[zr]^N[zr+1]<<Je^N[zr+2]<<at)&Ze},pt=new W(25e3),ze=new we(288),it=new we(32),ot=0,yt=0,ft=Pe.i||0,Jt=0,on=Pe.w||0,En=0;ft+2<Xe;++ft){var kn=ut(ft),Cn=ft&32767,Rn=tt[kn];if(ke[Cn]=Rn,tt[kn]=Cn,on<=ft){var Pn=Xe-ft;if((ot>7e3||Jt>24576)&&(Pn>423||!Kt)){Ot=gt(N,Zt,0,pt,ze,it,yt,Jt,En,ft-En,Ot),Jt=ot=yt=0,En=ft;for(var _n=0;_n<286;++_n)ze[_n]=0;for(var _n=0;_n<30;++_n)it[_n]=0}var Wn=2,Hn=0,Jn=Ve,pn=Cn-Rn&32767;if(Pn>2&&kn==ut(ft-pn))for(var rr=Math.min(pe,Pn)-1,hr=Math.min(32767,ft),zn=Math.min(258,Pn);pn<=hr&&--Jn&&Cn!=Rn;){if(N[ft+Wn]==N[ft+Wn-pn]){for(var Vn=0;Vn<zn&&N[ft+Vn]==N[ft+Vn-pn];++Vn);if(Vn>Wn){if(Wn=Vn,Hn=pn,Vn>rr)break;for(var jn=Math.min(pn,Vn-2),Fn=0,_n=0;_n<jn;++_n){var Yn=ft-pn+_n&32767,Sn=ke[Yn],vr=Yn-Sn&32767;vr>Fn&&(Fn=vr,Rn=Yn)}}}Cn=Rn,Rn=ke[Cn],pn+=Cn-Rn&32767}if(Hn){pt[Jt++]=268435456|p[Wn]<<18|F[Hn];var lr=p[Wn]&31,pr=F[Hn]&31;yt+=d[lr]+ye[pr],++ze[257+lr],++it[pr],on=ft+Wn,++ot}else pt[Jt++]=N[ft],++ze[N[ft]]}}for(ft=Math.max(ft,on);ft<Xe;++ft)pt[Jt++]=N[ft],++ze[N[ft]];Ot=gt(N,Zt,Kt,pt,ze,it,yt,Jt,En,ft-En,Ot),Kt||(Pe.r=Ot&7|Zt[Ot/8|0]<<3,Ot-=7,Pe.h=tt,Pe.p=ke,Pe.i=ft,Pe.w=on)}else{for(var ft=Pe.w||0;ft<Xe+Kt;ft+=65535){var Ir=ft+65535;Ir>=Xe&&(Zt[Ot/8|0]=Kt,Ir=Xe),Ot=et(Zt,Ot+1,N.subarray(ft,Ir))}Pe.i=Xe}return Z(lt,0,xe+Fe(Ot)+$e)},te=null,Le=function(){var N=-1;return{p:function(O){for(var ce=N,xe=0;xe<O.length;++xe)ce=te[ce&255^O[xe]]^ce>>>8;N=ce},d:function(){return~N}}},mt=function(){var N=1,O=0;return{p:function(ce){for(var xe=N,$e=O,Pe=ce.length|0,Xe=0;Xe!=Pe;){for(var lt=Math.min(Xe+2655,Pe);Xe<lt;++Xe)$e+=xe+=ce[Xe];xe=(xe&65535)+15*(xe>>16),$e=($e&65535)+15*($e>>16)}N=xe,O=$e},d:function(){return N%=65521,O%=65521,(N&255)<<24|(N&65280)<<8|(O&255)<<8|O>>8}}},Ne=function(N,O,ce,xe,$e){if(!$e&&($e={l:1},O.dictionary)){var Pe=O.dictionary.subarray(-32768),Xe=new be(Pe.length+N.length);Xe.set(Pe),Xe.set(N,Pe.length),N=Xe,$e.w=Pe.length}return Rt(N,O.level==null?6:O.level,O.mem==null?$e.l?Math.ceil(Math.max(8,Math.min(13,Math.log(N.length)))*1.5):20:12+O.mem,ce,xe,$e)},It=function(N,O){var ce={};for(var xe in N)ce[xe]=N[xe];for(var xe in O)ce[xe]=O[xe];return ce},He=function(N,O,ce){for(var xe=N(),$e=N.toString(),Pe=$e.slice($e.indexOf("[")+1,$e.lastIndexOf("]")).replace(/\s+/g,"").split(","),Xe=0;Xe<xe.length;++Xe){var lt=xe[Xe],Zt=Pe[Xe];if(typeof lt=="function"){O+=";"+Zt+"=";var Kt=lt.toString();if(lt.prototype)if(Kt.indexOf("[native code]")!=-1){var Ot=Kt.indexOf(" ",8)+1;O+=Kt.slice(Ot,Kt.indexOf("(",Ot))}else{O+=Kt;for(var Gt in lt.prototype)O+=";"+Zt+".prototype."+Gt+"="+lt.prototype[Gt].toString()}else O+=Kt}else ce[Zt]=lt}return O},Se=null,I=function(N){var O=[];for(var ce in N)N[ce].buffer&&O.push((N[ce]=new N[ce].constructor(N[ce])).buffer);return O},g=function(N,O,ce,xe){if(!Se[ce]){for(var $e="",Pe={},Xe=N.length-1,lt=0;lt<Xe;++lt)$e=He(N[lt],$e,Pe);Se[ce]={c:He(N[Xe],$e,Pe),e:Pe}}var Zt=It({},Se[ce].e);return me(Se[ce].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+O.toString()+"}",ce,Zt,I(Zt),xe)},v=function(){return[be,we,W,d,ye,G,k,B,fe,ie,V,K,H,q,ge,z,Fe,Z,ee,he,je,L,oe]},Q=function(){return[be,we,W,d,ye,G,p,F,R,X,de,P,V,bt,Vt,H,ae,_,y,Y,ue,Qe,et,gt,Fe,Z,Rt,Ne,zt,L]},b=function(){return[nt,Et,Ye,Le,te]},w=function(){return[At,Ut]},D=function(){return[vt,Ye,mt]},Ae=function(){return[tn]},L=function(N){return postMessage(N,[N.buffer])},oe=function(N){return N&&{out:N.size&&new be(N.size),dictionary:N.dictionary}},re=function(N,O,ce,xe,$e,Pe){var Xe=g(ce,xe,$e,function(lt,Zt){Xe.terminate(),Pe(lt,Zt)});return Xe.postMessage([N,O],O.consume?[N.buffer]:[]),function(){Xe.terminate()}},Be=function(N){return N.ondata=function(O,ce){return postMessage([O,ce],[O.buffer])},function(O){O.data.length?(N.push(O.data[0],O.data[1]),postMessage([O.data[0].length])):N.flush()}},Ce=function(N,O,ce,xe,$e,Pe,Xe){var lt,Zt=g(N,xe,$e,function(Kt,Ot){Kt?(Zt.terminate(),O.ondata.call(O,Kt)):Array.isArray(Ot)?Ot.length==1?(O.queuedSize-=Ot[0],O.ondrain&&O.ondrain(Ot[0])):(Ot[1]&&Zt.terminate(),O.ondata.call(O,Kt,Ot[0],Ot[1])):Xe(Ot)});Zt.postMessage(ce),O.queuedSize=0,O.push=function(Kt,Ot){O.ondata||ee(5),lt&&O.ondata(ee(4,0,1),null,!!Ot),O.queuedSize+=Kt.length,Zt.postMessage([Kt,lt=Ot],[Kt.buffer])},O.terminate=function(){Zt.terminate()},Pe&&(O.flush=function(){Zt.postMessage([])})},Ie=function(N,O){return N[O]|N[O+1]<<8},Re=function(N,O){return(N[O]|N[O+1]<<8|N[O+2]<<16|N[O+3]<<24)>>>0},ht=function(N,O){return Re(N,O)+Re(N,O+4)*4294967296},Ye=function(N,O,ce){for(;ce;++O)N[O]=ce,ce>>>=8},nt=function(N,O){var ce=O.filename;if(N[0]=31,N[1]=139,N[2]=8,N[8]=O.level<2?4:O.level==9?2:0,N[9]=3,O.mtime!=0&&Ye(N,4,Math.floor(new Date(O.mtime||Date.now())/1e3)),ce){N[3]=8;for(var xe=0;xe<=ce.length;++xe)N[xe+10]=ce.charCodeAt(xe)}},At=function(N){(N[0]!=31||N[1]!=139||N[2]!=8)&&ee(6,"invalid gzip data");var O=N[3],ce=10;O&4&&(ce+=(N[10]|N[11]<<8)+2);for(var xe=(O>>3&1)+(O>>4&1);xe>0;xe-=!N[ce++]);return ce+(O&2)},Ut=function(N){var O=N.length;return(N[O-4]|N[O-3]<<8|N[O-2]<<16|N[O-1]<<24)>>>0},Et=function(N){return 10+(N.filename?N.filename.length+1:0)},vt=function(N,O){var ce=O.level,xe=ce==0?0:ce<6?1:ce==9?3:2;if(N[0]=120,N[1]=xe<<6|(O.dictionary&&32),N[1]|=31-(N[0]<<8|N[1])%31,O.dictionary){var $e=mt();$e.p(O.dictionary),Ye(N,2,$e.d())}},tn=function(N,O){return((N[0]&15)!=8||N[0]>>4>7||(N[0]<<8|N[1])%31)&&ee(6,"invalid zlib data"),(N[1]>>5&1)==+!O&&ee(6,"invalid zlib data: "+(N[1]&32?"need":"unexpected")+" dictionary"),(N[1]>>3&4)+2};function en(N,O){return typeof N=="function"&&(O=N,N={}),this.ondata=O,N}var Pt=null,dn=null;function Ln(N,O,ce){return ce||(ce=O,O={}),typeof ce!="function"&&ee(7),re(N,O,[Q],function(xe){return L(zt(xe.data[0],xe.data[1]))},0,ce)}function zt(N,O){return Ne(N,O||{},0,0)}var cn=null,qe=null;function Ke(N,O,ce){return ce||(ce=O,O={}),typeof ce!="function"&&ee(7),re(N,O,[v],function(xe){return L(je(xe.data[0],oe(xe.data[1])))},1,ce)}function je(N,O){return he(N,{i:2},O&&O.out,O&&O.dictionary)}var le=null,Ee=null;function ve(N,O,ce){return ce||(ce=O,O={}),typeof ce!="function"&&ee(7),re(N,O,[Q,b,function(){return[Te]}],function(xe){return L(Te(xe.data[0],xe.data[1]))},2,ce)}function Te(N,O){O||(O={});var ce=Le(),xe=N.length;ce.p(N);var $e=Ne(N,O,Et(O),8),Pe=$e.length;return nt($e,O),Ye($e,Pe-8,ce.d()),Ye($e,Pe-4,xe),$e}var ne=null,Nt=null;function $t(N,O,ce){return ce||(ce=O,O={}),typeof ce!="function"&&ee(7),re(N,O,[v,w,function(){return[Ft]}],function(xe){return L(Ft(xe.data[0],xe.data[1]))},3,ce)}function Ft(N,O){var ce=At(N);return ce+8>N.length&&ee(6,"invalid gzip data"),he(N.subarray(ce,-8),{i:2},O&&O.out||new be(Ut(N)),O&&O.dictionary)}var vn=null,tr=null;function Kn(N,O,ce){return ce||(ce=O,O={}),typeof ce!="function"&&ee(7),re(N,O,[Q,D,function(){return[Mn]}],function(xe){return L(Mn(xe.data[0],xe.data[1]))},4,ce)}function Mn(N,O){O||(O={});var ce=mt();ce.p(N);var xe=Ne(N,O,O.dictionary?6:2,4);return vt(xe,O),Ye(xe,xe.length-4,ce.d()),xe}var In=null,nr=null;function fr(N,O,ce){return ce||(ce=O,O={}),typeof ce!="function"&&ee(7),re(N,O,[v,Ae,function(){return[qn]}],function(xe){return L(qn(xe.data[0],oe(xe.data[1])))},5,ce)}function qn(N,O){return he(N.subarray(tn(N,O&&O.dictionary),-4),{i:2},O&&O.out,O&&O.dictionary)}var ur=null,$n=null;function Nn(N,O,ce){return ce||(ce=O,O={}),typeof ce!="function"&&ee(7),N[0]==31&&N[1]==139&&N[2]==8?$t(N,O,ce):(N[0]&15)!=8||N[0]>>4>7||(N[0]<<8|N[1])%31?Ke(N,O,ce):fr(N,O,ce)}function Ge(N,O){return N[0]==31&&N[1]==139&&N[2]==8?Ft(N,O):(N[0]&15)!=8||N[0]>>4>7||(N[0]<<8|N[1])%31?je(N,O):qn(N,O)}var Ue=function(N,O,ce,xe){for(var $e in N){var Pe=N[$e],Xe=O+$e,lt=xe;Array.isArray(Pe)&&(lt=It(xe,Pe[1]),Pe=Pe[0]),Pe instanceof be?ce[Xe]=[Pe,lt]:(ce[Xe+="/"]=[new be(0),lt],Ue(Pe,Xe,ce,xe))}},qt=typeof TextEncoder!="undefined"&&new TextEncoder,Mt=typeof TextDecoder!="undefined"&&new TextDecoder,an=0;try{Mt.decode(Vt,{stream:!0}),an=1}catch(N){}var An=function(N){for(var O="",ce=0;;){var xe=N[ce++],$e=(xe>127)+(xe>223)+(xe>239);if(ce+$e>N.length)return{s:O,r:Z(N,ce-1)};$e?$e==3?(xe=((xe&15)<<18|(N[ce++]&63)<<12|(N[ce++]&63)<<6|N[ce++]&63)-65536,O+=String.fromCharCode(55296|xe>>10,56320|xe&1023)):$e&1?O+=String.fromCharCode((xe&31)<<6|N[ce++]&63):O+=String.fromCharCode((xe&15)<<12|(N[ce++]&63)<<6|N[ce++]&63):O+=String.fromCharCode(xe)}},yn=null,gn=null;function Yt(N,O){if(O){for(var ce=new be(N.length),xe=0;xe<N.length;++xe)ce[xe]=N.charCodeAt(xe);return ce}if(qt)return qt.encode(N);for(var $e=N.length,Pe=new be(N.length+(N.length>>1)),Xe=0,lt=function(Ot){Pe[Xe++]=Ot},xe=0;xe<$e;++xe){if(Xe+5>Pe.length){var Zt=new be(Xe+8+($e-xe<<1));Zt.set(Pe),Pe=Zt}var Kt=N.charCodeAt(xe);Kt<128||O?lt(Kt):Kt<2048?(lt(192|Kt>>6),lt(128|Kt&63)):Kt>55295&&Kt<57344?(Kt=65536+(Kt&1047552)|N.charCodeAt(++xe)&1023,lt(240|Kt>>18),lt(128|Kt>>12&63),lt(128|Kt>>6&63),lt(128|Kt&63)):(lt(224|Kt>>12),lt(128|Kt>>6&63),lt(128|Kt&63))}return Z(Pe,0,Xe)}function Tt(N,O){if(O){for(var ce="",xe=0;xe<N.length;xe+=16384)ce+=String.fromCharCode.apply(null,N.subarray(xe,xe+16384));return ce}else{if(Mt)return Mt.decode(N);var $e=An(N),Pe=$e.s,ce=$e.r;return ce.length&&ee(8),Pe}}var Qt=function(N){return N==1?3:N<6?2:N==9?1:0},ln=function(N,O){return O+30+Ie(N,O+26)+Ie(N,O+28)},sn=function(N,O,ce){var xe=Ie(N,O+28),$e=Tt(N.subarray(O+46,O+46+xe),!(Ie(N,O+8)&2048)),Pe=O+46+xe,Xe=Re(N,O+20),lt=ce&&Xe==4294967295?wn(N,Pe):[Xe,Re(N,O+24),Re(N,O+42)],Zt=lt[0],Kt=lt[1],Ot=lt[2];return[Ie(N,O+10),Zt,Kt,$e,Pe+Ie(N,O+30)+Ie(N,O+32),Ot]},wn=function(N,O){for(;Ie(N,O)!=1;O+=4+Ie(N,O+2));return[ht(N,O+12),ht(N,O+4),ht(N,O+20)]},Un=function(N){var O=0;if(N)for(var ce in N){var xe=N[ce].length;xe>65535&&ee(9),O+=xe+4}return O},un=function(N,O,ce,xe,$e,Pe,Xe,lt){var Zt=xe.length,Kt=ce.extra,Ot=lt&&lt.length,Gt=Un(Kt);Ye(N,O,Xe!=null?33639248:67324752),O+=4,Xe!=null&&(N[O++]=20,N[O++]=ce.os),N[O]=20,O+=2,N[O++]=ce.flag<<1|(Pe<0&&8),N[O++]=$e&&8,N[O++]=ce.compression&255,N[O++]=ce.compression>>8;var pe=new Date(ce.mtime==null?Date.now():ce.mtime),Ve=pe.getFullYear()-1980;if((Ve<0||Ve>119)&&ee(10),Ye(N,O,Ve<<25|pe.getMonth()+1<<21|pe.getDate()<<16|pe.getHours()<<11|pe.getMinutes()<<5|pe.getSeconds()>>1),O+=4,Pe!=-1&&(Ye(N,O,ce.crc),Ye(N,O+4,Pe<0?-Pe-2:Pe),Ye(N,O+8,ce.size)),Ye(N,O+12,Zt),Ye(N,O+14,Gt),O+=16,Xe!=null&&(Ye(N,O,Ot),Ye(N,O+6,ce.attrs),Ye(N,O+10,Xe),O+=14),N.set(xe,O),O+=Zt,Gt)for(var Ze in Kt){var ke=Kt[Ze],tt=ke.length;Ye(N,O,+Ze),Ye(N,O+2,tt),N.set(ke,O+4),O+=4+tt}return Ot&&(N.set(lt,O),O+=Ot),O},rn=function(N,O,ce,xe,$e){Ye(N,O,101010256),Ye(N,O+8,ce),Ye(N,O+10,ce),Ye(N,O+12,xe),Ye(N,O+16,$e)},Me=null,ct=null,St=null,wt=null;function Wt(N,O,ce){ce||(ce=O,O={}),typeof ce!="function"&&ee(7);var xe={};Ue(N,"",xe,O);var $e=Object.keys(xe),Pe=$e.length,Xe=0,lt=0,Zt=Pe,Kt=new Array(Pe),Ot=[],Gt=function(){for(var tt=0;tt<Ot.length;++tt)Ot[tt]()},pe=function(tt,Je){Bn(function(){ce(tt,Je)})};Bn(function(){pe=ce});var Ve=function(){var tt=new be(lt+22),Je=Xe,at=lt-Xe;lt=0;for(var ut=0;ut<Zt;++ut){var pt=Kt[ut];try{var ze=pt.c.length;un(tt,lt,pt,pt.f,pt.u,ze);var it=30+pt.f.length+Un(pt.extra),ot=lt+it;tt.set(pt.c,ot),un(tt,Xe,pt,pt.f,pt.u,ze,lt,pt.m),Xe+=16+it+(pt.m?pt.m.length:0),lt=ot+ze}catch(yt){return pe(yt,null)}}rn(tt,Xe,Kt.length,at,Je),pe(null,tt)};Pe||Ve();for(var Ze=function(tt){var Je=$e[tt],at=xe[Je],ut=at[0],pt=at[1],ze=Le(),it=ut.length;ze.p(ut);var ot=Yt(Je),yt=ot.length,ft=pt.comment,Jt=ft&&Yt(ft),on=Jt&&Jt.length,En=Un(pt.extra),kn=pt.level==0?0:8,Cn=function(Rn,Pn){if(Rn)Gt(),pe(Rn,null);else{var _n=Pn.length;Kt[tt]=It(pt,{size:it,crc:ze.d(),c:Pn,f:ot,m:Jt,u:yt!=Je.length||Jt&&ft.length!=on,compression:kn}),Xe+=30+yt+En+_n,lt+=76+2*(yt+En)+(on||0)+_n,--Pe||Ve()}};if(yt>65535&&Cn(ee(11,0,1),null),!kn)Cn(null,ut);else if(it<16e4)try{Cn(null,zt(ut,pt))}catch(Rn){Cn(Rn,null)}else Ot.push(Ln(ut,pt,Cn))},ke=0;ke<Zt;++ke)Ze(ke);return Gt}function st(N,O){O||(O={});var ce={},xe=[];Ue(N,"",ce,O);var $e=0,Pe=0;for(var Xe in ce){var lt=ce[Xe],Zt=lt[0],Kt=lt[1],Ot=Kt.level==0?0:8,Gt=Yt(Xe),pe=Gt.length,Ve=Kt.comment,Ze=Ve&&Yt(Ve),ke=Ze&&Ze.length,tt=Un(Kt.extra);pe>65535&&ee(11);var Je=Ot?zt(Zt,Kt):Zt,at=Je.length,ut=Le();ut.p(Zt),xe.push(It(Kt,{size:Zt.length,crc:ut.d(),c:Je,f:Gt,m:Ze,u:pe!=Xe.length||Ze&&Ve.length!=ke,o:$e,compression:Ot})),$e+=30+pe+tt+at,Pe+=76+2*(pe+tt)+(ke||0)+at}for(var pt=new be(Pe+22),ze=$e,it=Pe-$e,ot=0;ot<xe.length;++ot){var Gt=xe[ot];un(pt,Gt.o,Gt,Gt.f,Gt.u,Gt.c.length);var yt=30+Gt.f.length+Un(Gt.extra);pt.set(Gt.c,Gt.o+yt),un(pt,$e,Gt,Gt.f,Gt.u,Gt.c.length,Gt.o,Gt.m),$e+=16+yt+(Gt.m?Gt.m.length:0)}return rn(pt,$e,xe.length,it,ze),pt}var Bt=null,Ht=null,nn=null,mn=null,Bn=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(N){N()};function Dn(N,O,ce){ce||(ce=O,O={}),typeof ce!="function"&&ee(7);var xe=[],$e=function(){for(var tt=0;tt<xe.length;++tt)xe[tt]()},Pe={},Xe=function(tt,Je){Bn(function(){ce(tt,Je)})};Bn(function(){Xe=ce});for(var lt=N.length-22;Re(N,lt)!=101010256;--lt)if(!lt||N.length-lt>65558)return Xe(ee(13,0,1),null),$e;var Zt=Ie(N,lt+8);if(Zt){var Kt=Zt,Ot=Re(N,lt+16),Gt=Ot==4294967295||Kt==65535;if(Gt){var pe=Re(N,lt-12);Gt=Re(N,pe)==101075792,Gt&&(Kt=Zt=Re(N,pe+32),Ot=Re(N,pe+48))}for(var Ve=O&&O.filter,Ze=function(tt){var Je=sn(N,Ot,Gt),at=Je[0],ut=Je[1],pt=Je[2],ze=Je[3],it=Je[4],ot=Je[5],yt=ln(N,ot);Ot=it;var ft=function(on,En){on?($e(),Xe(on,null)):(En&&(Pe[ze]=En),--Zt||Xe(null,Pe))};if(!Ve||Ve({name:ze,size:ut,originalSize:pt,compression:at}))if(!at)ft(null,Z(N,yt,yt+ut));else if(at==8){var Jt=N.subarray(yt,yt+ut);if(pt<524288||ut>.8*pt)try{ft(null,je(Jt,{out:new be(pt)}))}catch(on){ft(on,null)}else xe.push(Ke(Jt,{size:pt},ft))}else ft(ee(14,"unknown compression type "+at,1),null);else ft(null,null)},ke=0;ke<Kt;++ke)Ze(ke)}else Xe(null,{});return $e}function Ct(N,O){for(var ce={},xe=N.length-22;Re(N,xe)!=101010256;--xe)(!xe||N.length-xe>65558)&&ee(13);var $e=Ie(N,xe+8);if(!$e)return{};var Pe=Re(N,xe+16),Xe=Pe==4294967295||$e==65535;if(Xe){var lt=Re(N,xe-12);Xe=Re(N,lt)==101075792,Xe&&($e=Re(N,lt+32),Pe=Re(N,lt+48))}for(var Zt=O&&O.filter,Kt=0;Kt<$e;++Kt){var Ot=sn(N,Pe,Xe),Gt=Ot[0],pe=Ot[1],Ve=Ot[2],Ze=Ot[3],ke=Ot[4],tt=Ot[5],Je=ln(N,tt);Pe=ke,(!Zt||Zt({name:Ze,size:pe,originalSize:Ve,compression:Gt}))&&(Gt?Gt==8?ce[Ze]=je(N.subarray(Je,Je+pe),{out:new be(Ve)}):ee(14,"unknown compression type "+Gt):ce[Ze]=Z(N,Je,Je+pe))}return ce}},64270:function(Zn){(function(Dt,x){Zn.exports=x()})(this,function(){"use strict";var Dt=function(c,r){return Dt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Dt(c,r)};function x(c,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Dt(c,r);function e(){this.constructor=c}c.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var M=function(){return M=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},M.apply(this,arguments)};function me(c,r,e,t){function n(i){return i instanceof e?i:new e(function(s){s(i)})}return new(e||(e=Promise))(function(i,s){function a(l){try{u(t.next(l))}catch(f){s(f)}}function o(l){try{u(t.throw(l))}catch(f){s(f)}}function u(l){l.done?i(l.value):n(l.value).then(a,o)}u((t=t.apply(c,r||[])).next())})}function be(c,r){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,n,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(l){return o([u,l])}}function o(u){if(t)throw new TypeError("Generator is already executing.");for(;e;)try{if(t=1,n&&(i=u[0]&2?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,n=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1],i=u;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(u);break}i[2]&&e.ops.pop(),e.trys.pop();continue}u=r.call(c,e)}catch(l){u=[6,l],n=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function we(c,r,e){if(e||arguments.length===2)for(var t=0,n=r.length,i;t<n;t++)(i||!(t in r))&&(i||(i=Array.prototype.slice.call(r,0,t)),i[t]=r[t]);return c.concat(i||r)}for(var W=function(){function c(r,e,t,n){this.left=r,this.top=e,this.width=t,this.height=n}return c.prototype.add=function(r,e,t,n){return new c(this.left+r,this.top+e,this.width+t,this.height+n)},c.fromClientRect=function(r,e){return new c(e.left+r.windowBounds.left,e.top+r.windowBounds.top,e.width,e.height)},c.fromDOMRectList=function(r,e){var t=Array.from(e).find(function(n){return n.width!==0});return t?new c(t.left+r.windowBounds.left,t.top+r.windowBounds.top,t.width,t.height):c.EMPTY},c.EMPTY=new c(0,0,0,0),c}(),d=function(c,r){return W.fromClientRect(c,r.getBoundingClientRect())},ye=function(c){var r=c.body,e=c.documentElement;if(!r||!e)throw new Error("Unable to get document size");var t=Math.max(Math.max(r.scrollWidth,e.scrollWidth),Math.max(r.offsetWidth,e.offsetWidth),Math.max(r.clientWidth,e.clientWidth)),n=Math.max(Math.max(r.scrollHeight,e.scrollHeight),Math.max(r.offsetHeight,e.offsetHeight),Math.max(r.clientHeight,e.clientHeight));return new W(0,0,t,n)},G=function(c){for(var r=[],e=0,t=c.length;e<t;){var n=c.charCodeAt(e++);if(n>=55296&&n<=56319&&e<t){var i=c.charCodeAt(e++);(i&64512)===56320?r.push(((n&1023)<<10)+(i&1023)+65536):(r.push(n),e--)}else r.push(n)}return r},A=function(){for(var c=[],r=0;r<arguments.length;r++)c[r]=arguments[r];if(String.fromCodePoint)return String.fromCodePoint.apply(String,c);var e=c.length;if(!e)return"";for(var t=[],n=-1,i="";++n<e;){var s=c[n];s<=65535?t.push(s):(s-=65536,t.push((s>>10)+55296,s%1024+56320)),(n+1===e||t.length>16384)&&(i+=String.fromCharCode.apply(String,t),t.length=0)}return i},S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),p=0;p<S.length;p++)k[S.charCodeAt(p)]=p;for(var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",B=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),F=0;F<m.length;F++)B[m.charCodeAt(F)]=F;for(var V=function(c){var r=c.length*.75,e=c.length,t,n=0,i,s,a,o;c[c.length-1]==="="&&(r--,c[c.length-2]==="="&&r--);var u=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(r):new Array(r),l=Array.isArray(u)?u:new Uint8Array(u);for(t=0;t<e;t+=4)i=B[c.charCodeAt(t)],s=B[c.charCodeAt(t+1)],a=B[c.charCodeAt(t+2)],o=B[c.charCodeAt(t+3)],l[n++]=i<<2|s>>4,l[n++]=(s&15)<<4|a>>2,l[n++]=(a&3)<<6|o&63;return u},j=function(c){for(var r=c.length,e=[],t=0;t<r;t+=2)e.push(c[t+1]<<8|c[t]);return e},se=function(c){for(var r=c.length,e=[],t=0;t<r;t+=4)e.push(c[t+3]<<24|c[t+2]<<16|c[t+1]<<8|c[t]);return e},H=5,X=11,P=2,R=X-H,fe=65536>>H,de=1<<H,ie=de-1,q=1024>>H,ge=fe+q,z=ge,Fe=32,Z=z+Fe,U=65536>>X,K=1<<R,ee=K-1,he=function(c,r,e){return c.slice?c.slice(r,e):new Uint16Array(Array.prototype.slice.call(c,r,e))},ae=function(c,r,e){return c.slice?c.slice(r,e):new Uint32Array(Array.prototype.slice.call(c,r,e))},_=function(c,r){var e=V(c),t=Array.isArray(e)?se(e):new Uint32Array(e),n=Array.isArray(e)?j(e):new Uint16Array(e),i=24,s=he(n,i/2,t[4]/2),a=t[5]===2?he(n,(i+t[4])/2):ae(t,Math.ceil((i+t[4])/4));return new y(t[0],t[1],t[2],t[3],s,a)},y=function(){function c(r,e,t,n,i,s){this.initialValue=r,this.errorValue=e,this.highStart=t,this.highValueIndex=n,this.index=i,this.data=s}return c.prototype.get=function(r){var e;if(r>=0){if(r<55296||r>56319&&r<=65535)return e=this.index[r>>H],e=(e<<P)+(r&ie),this.data[e];if(r<=65535)return e=this.index[fe+(r-55296>>H)],e=(e<<P)+(r&ie),this.data[e];if(r<this.highStart)return e=Z-U+(r>>X),e=this.index[e],e+=r>>H&ee,e=this.index[e],e=(e<<P)+(r&ie),this.data[e];if(r<=1114111)return this.data[this.highValueIndex]}return this.errorValue},c}(),Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Qe=0;Qe<Y.length;Qe++)ue[Y.charCodeAt(Qe)]=Qe;var et="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",gt=50,bt=1,Vt=2,Rt=3,te=4,Le=5,mt=7,Ne=8,It=9,He=10,Se=11,I=12,g=13,v=14,Q=15,b=16,w=17,D=18,Ae=19,L=20,oe=21,re=22,Be=23,Ce=24,Ie=25,Re=26,ht=27,Ye=28,nt=29,At=30,Ut=31,Et=32,vt=33,tn=34,en=35,Pt=36,dn=37,Ln=38,zt=39,cn=40,qe=41,Ke=42,je=43,le=[9001,65288],Ee="!",ve="\xD7",Te="\xF7",ne=_(et),Nt=[At,Pt],$t=[bt,Vt,Rt,Le],Ft=[He,Ne],vn=[ht,Re],tr=$t.concat(Ft),Kn=[Ln,zt,cn,tn,en],Mn=[Q,g],In=function(c,r){r===void 0&&(r="strict");var e=[],t=[],n=[];return c.forEach(function(i,s){var a=ne.get(i);if(a>gt?(n.push(!0),a-=gt):n.push(!1),["normal","auto","loose"].indexOf(r)!==-1&&[8208,8211,12316,12448].indexOf(i)!==-1)return t.push(s),e.push(b);if(a===te||a===Se){if(s===0)return t.push(s),e.push(At);var o=e[s-1];return tr.indexOf(o)===-1?(t.push(t[s-1]),e.push(o)):(t.push(s),e.push(At))}if(t.push(s),a===Ut)return e.push(r==="strict"?oe:dn);if(a===Ke||a===nt)return e.push(At);if(a===je)return i>=131072&&i<=196605||i>=196608&&i<=262141?e.push(dn):e.push(At);e.push(a)}),[t,e,n]},nr=function(c,r,e,t){var n=t[e];if(Array.isArray(c)?c.indexOf(n)!==-1:c===n)for(var i=e;i<=t.length;){i++;var s=t[i];if(s===r)return!0;if(s!==He)break}if(n===He)for(var i=e;i>0;){i--;var a=t[i];if(Array.isArray(c)?c.indexOf(a)!==-1:c===a)for(var o=e;o<=t.length;){o++;var s=t[o];if(s===r)return!0;if(s!==He)break}if(a!==He)break}return!1},fr=function(c,r){for(var e=c;e>=0;){var t=r[e];if(t===He)e--;else return t}return 0},qn=function(c,r,e,t,n){if(e[t]===0)return ve;var i=t-1;if(Array.isArray(n)&&n[i]===!0)return ve;var s=i-1,a=i+1,o=r[i],u=s>=0?r[s]:0,l=r[a];if(o===Vt&&l===Rt)return ve;if($t.indexOf(o)!==-1)return Ee;if($t.indexOf(l)!==-1||Ft.indexOf(l)!==-1)return ve;if(fr(i,r)===Ne)return Te;if(ne.get(c[i])===Se||(o===Et||o===vt)&&ne.get(c[a])===Se||o===mt||l===mt||o===It||[He,g,Q].indexOf(o)===-1&&l===It||[w,D,Ae,Ce,Ye].indexOf(l)!==-1||fr(i,r)===re||nr(Be,re,i,r)||nr([w,D],oe,i,r)||nr(I,I,i,r))return ve;if(o===He)return Te;if(o===Be||l===Be)return ve;if(l===b||o===b)return Te;if([g,Q,oe].indexOf(l)!==-1||o===v||u===Pt&&Mn.indexOf(o)!==-1||o===Ye&&l===Pt||l===L||Nt.indexOf(l)!==-1&&o===Ie||Nt.indexOf(o)!==-1&&l===Ie||o===ht&&[dn,Et,vt].indexOf(l)!==-1||[dn,Et,vt].indexOf(o)!==-1&&l===Re||Nt.indexOf(o)!==-1&&vn.indexOf(l)!==-1||vn.indexOf(o)!==-1&&Nt.indexOf(l)!==-1||[ht,Re].indexOf(o)!==-1&&(l===Ie||[re,Q].indexOf(l)!==-1&&r[a+1]===Ie)||[re,Q].indexOf(o)!==-1&&l===Ie||o===Ie&&[Ie,Ye,Ce].indexOf(l)!==-1)return ve;if([Ie,Ye,Ce,w,D].indexOf(l)!==-1)for(var f=i;f>=0;){var h=r[f];if(h===Ie)return ve;if([Ye,Ce].indexOf(h)!==-1)f--;else break}if([ht,Re].indexOf(l)!==-1)for(var f=[w,D].indexOf(o)!==-1?s:i;f>=0;){var h=r[f];if(h===Ie)return ve;if([Ye,Ce].indexOf(h)!==-1)f--;else break}if(Ln===o&&[Ln,zt,tn,en].indexOf(l)!==-1||[zt,tn].indexOf(o)!==-1&&[zt,cn].indexOf(l)!==-1||[cn,en].indexOf(o)!==-1&&l===cn||Kn.indexOf(o)!==-1&&[L,Re].indexOf(l)!==-1||Kn.indexOf(l)!==-1&&o===ht||Nt.indexOf(o)!==-1&&Nt.indexOf(l)!==-1||o===Ce&&Nt.indexOf(l)!==-1||Nt.concat(Ie).indexOf(o)!==-1&&l===re&&le.indexOf(c[a])===-1||Nt.concat(Ie).indexOf(l)!==-1&&o===D)return ve;if(o===qe&&l===qe){for(var E=e[i],C=1;E>0&&(E--,r[E]===qe);)C++;if(C%2!==0)return ve}return o===Et&&l===vt?ve:Te},ur=function(c,r){r||(r={lineBreak:"normal",wordBreak:"normal"});var e=In(c,r.lineBreak),t=e[0],n=e[1],i=e[2];(r.wordBreak==="break-all"||r.wordBreak==="break-word")&&(n=n.map(function(a){return[Ie,At,Ke].indexOf(a)!==-1?dn:a}));var s=r.wordBreak==="keep-all"?i.map(function(a,o){return a&&c[o]>=19968&&c[o]<=40959}):void 0;return[t,n,s]},$n=function(){function c(r,e,t,n){this.codePoints=r,this.required=e===Ee,this.start=t,this.end=n}return c.prototype.slice=function(){return A.apply(void 0,this.codePoints.slice(this.start,this.end))},c}(),Nn=function(c,r){var e=G(c),t=ur(e,r),n=t[0],i=t[1],s=t[2],a=e.length,o=0,u=0;return{next:function(){if(u>=a)return{done:!0,value:null};for(var l=ve;u<a&&(l=qn(e,i,n,++u,s))===ve;);if(l!==ve||u===a){var f=new $n(e,l,o,u);return o=u,{value:f,done:!1}}return{done:!0,value:null}}}},Ge=1,Ue=2,qt=4,Mt=8,an=10,An=47,yn=92,gn=9,Yt=32,Tt=34,Qt=61,ln=35,sn=36,wn=37,Un=39,un=40,rn=41,Me=95,ct=45,St=33,wt=60,Wt=62,st=64,Bt=91,Ht=93,nn=61,mn=123,Bn=63,Dn=125,Ct=124,N=126,O=128,ce=65533,xe=42,$e=43,Pe=44,Xe=58,lt=59,Zt=46,Kt=0,Ot=8,Gt=11,pe=14,Ve=31,Ze=127,ke=-1,tt=48,Je=97,at=101,ut=102,pt=117,ze=122,it=65,ot=69,yt=70,ft=85,Jt=90,on=function(c){return c>=tt&&c<=57},En=function(c){return c>=55296&&c<=57343},kn=function(c){return on(c)||c>=it&&c<=yt||c>=Je&&c<=ut},Cn=function(c){return c>=Je&&c<=ze},Rn=function(c){return c>=it&&c<=Jt},Pn=function(c){return Cn(c)||Rn(c)},_n=function(c){return c>=O},Wn=function(c){return c===an||c===gn||c===Yt},Hn=function(c){return Pn(c)||_n(c)||c===Me},Jn=function(c){return Hn(c)||on(c)||c===ct},pn=function(c){return c>=Kt&&c<=Ot||c===Gt||c>=pe&&c<=Ve||c===Ze},rr=function(c,r){return c!==yn?!1:r!==an},hr=function(c,r,e){return c===ct?Hn(r)||rr(r,e):Hn(c)?!0:!!(c===yn&&rr(c,r))},zn=function(c,r,e){return c===$e||c===ct?on(r)?!0:r===Zt&&on(e):on(c===Zt?r:c)},Vn=function(c){var r=0,e=1;(c[r]===$e||c[r]===ct)&&(c[r]===ct&&(e=-1),r++);for(var t=[];on(c[r]);)t.push(c[r++]);var n=t.length?parseInt(A.apply(void 0,t),10):0;c[r]===Zt&&r++;for(var i=[];on(c[r]);)i.push(c[r++]);var s=i.length,a=s?parseInt(A.apply(void 0,i),10):0;(c[r]===ot||c[r]===at)&&r++;var o=1;(c[r]===$e||c[r]===ct)&&(c[r]===ct&&(o=-1),r++);for(var u=[];on(c[r]);)u.push(c[r++]);var l=u.length?parseInt(A.apply(void 0,u),10):0;return e*(n+a*Math.pow(10,-s))*Math.pow(10,o*l)},jn={type:2},Fn={type:3},Yn={type:4},Sn={type:13},vr={type:8},lr={type:21},pr={type:9},Ir={type:10},zr={type:11},ni={type:12},jr={type:14},Jr={type:23},Yr={type:1},cr={type:25},Fr={type:24},Pr={type:26},er={type:27},On={type:28},fn={type:29},Gn={type:31},Er={type:32},Sr=function(){function c(){this._value=[]}return c.prototype.write=function(r){this._value=this._value.concat(G(r))},c.prototype.read=function(){for(var r=[],e=this.consumeToken();e!==Er;)r.push(e),e=this.consumeToken();return r},c.prototype.consumeToken=function(){var r=this.consumeCodePoint();switch(r){case Tt:return this.consumeStringToken(Tt);case ln:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),n=this.peekCodePoint(2);if(Jn(e)||rr(t,n)){var i=hr(e,t,n)?Ue:Ge,s=this.consumeName();return{type:5,value:s,flags:i}}break;case sn:if(this.peekCodePoint(0)===Qt)return this.consumeCodePoint(),Sn;break;case Un:return this.consumeStringToken(Un);case un:return jn;case rn:return Fn;case xe:if(this.peekCodePoint(0)===Qt)return this.consumeCodePoint(),jr;break;case $e:if(zn(r,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(r),this.consumeNumericToken();break;case Pe:return Yn;case ct:var a=r,o=this.peekCodePoint(0),u=this.peekCodePoint(1);if(zn(a,o,u))return this.reconsumeCodePoint(r),this.consumeNumericToken();if(hr(a,o,u))return this.reconsumeCodePoint(r),this.consumeIdentLikeToken();if(o===ct&&u===Wt)return this.consumeCodePoint(),this.consumeCodePoint(),Fr;break;case Zt:if(zn(r,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(r),this.consumeNumericToken();break;case An:if(this.peekCodePoint(0)===xe)for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(l===xe&&(l=this.consumeCodePoint(),l===An))return this.consumeToken();if(l===ke)return this.consumeToken()}break;case Xe:return Pr;case lt:return er;case wt:if(this.peekCodePoint(0)===St&&this.peekCodePoint(1)===ct&&this.peekCodePoint(2)===ct)return this.consumeCodePoint(),this.consumeCodePoint(),cr;break;case st:var f=this.peekCodePoint(0),h=this.peekCodePoint(1),E=this.peekCodePoint(2);if(hr(f,h,E)){var s=this.consumeName();return{type:7,value:s}}break;case Bt:return On;case yn:if(rr(r,this.peekCodePoint(0)))return this.reconsumeCodePoint(r),this.consumeIdentLikeToken();break;case Ht:return fn;case nn:if(this.peekCodePoint(0)===Qt)return this.consumeCodePoint(),vr;break;case mn:return zr;case Dn:return ni;case pt:case ft:var C=this.peekCodePoint(0),T=this.peekCodePoint(1);return C===$e&&(kn(T)||T===Bn)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(r),this.consumeIdentLikeToken();case Ct:if(this.peekCodePoint(0)===Qt)return this.consumeCodePoint(),pr;if(this.peekCodePoint(0)===Ct)return this.consumeCodePoint(),lr;break;case N:if(this.peekCodePoint(0)===Qt)return this.consumeCodePoint(),Ir;break;case ke:return Er}return Wn(r)?(this.consumeWhiteSpace(),Gn):on(r)?(this.reconsumeCodePoint(r),this.consumeNumericToken()):Hn(r)?(this.reconsumeCodePoint(r),this.consumeIdentLikeToken()):{type:6,value:A(r)}},c.prototype.consumeCodePoint=function(){var r=this._value.shift();return typeof r=="undefined"?-1:r},c.prototype.reconsumeCodePoint=function(r){this._value.unshift(r)},c.prototype.peekCodePoint=function(r){return r>=this._value.length?-1:this._value[r]},c.prototype.consumeUnicodeRangeToken=function(){for(var r=[],e=this.consumeCodePoint();kn(e)&&r.length<6;)r.push(e),e=this.consumeCodePoint();for(var t=!1;e===Bn&&r.length<6;)r.push(e),e=this.consumeCodePoint(),t=!0;if(t){var n=parseInt(A.apply(void 0,r.map(function(o){return o===Bn?tt:o})),16),i=parseInt(A.apply(void 0,r.map(function(o){return o===Bn?yt:o})),16);return{type:30,start:n,end:i}}var s=parseInt(A.apply(void 0,r),16);if(this.peekCodePoint(0)===ct&&kn(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var a=[];kn(e)&&a.length<6;)a.push(e),e=this.consumeCodePoint();var i=parseInt(A.apply(void 0,a),16);return{type:30,start:s,end:i}}else return{type:30,start:s,end:s}},c.prototype.consumeIdentLikeToken=function(){var r=this.consumeName();return r.toLowerCase()==="url"&&this.peekCodePoint(0)===un?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===un?(this.consumeCodePoint(),{type:19,value:r}):{type:20,value:r}},c.prototype.consumeUrlToken=function(){var r=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===ke)return{type:22,value:""};var e=this.peekCodePoint(0);if(e===Un||e===Tt){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===ke||this.peekCodePoint(0)===rn)?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),Jr)}for(;;){var n=this.consumeCodePoint();if(n===ke||n===rn)return{type:22,value:A.apply(void 0,r)};if(Wn(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===ke||this.peekCodePoint(0)===rn?(this.consumeCodePoint(),{type:22,value:A.apply(void 0,r)}):(this.consumeBadUrlRemnants(),Jr);if(n===Tt||n===Un||n===un||pn(n))return this.consumeBadUrlRemnants(),Jr;if(n===yn)if(rr(n,this.peekCodePoint(0)))r.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Jr;else r.push(n)}},c.prototype.consumeWhiteSpace=function(){for(;Wn(this.peekCodePoint(0));)this.consumeCodePoint()},c.prototype.consumeBadUrlRemnants=function(){for(;;){var r=this.consumeCodePoint();if(r===rn||r===ke)return;rr(r,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},c.prototype.consumeStringSlice=function(r){for(var e=5e4,t="";r>0;){var n=Math.min(e,r);t+=A.apply(void 0,this._value.splice(0,n)),r-=n}return this._value.shift(),t},c.prototype.consumeStringToken=function(r){var e="",t=0;do{var n=this._value[t];if(n===ke||n===void 0||n===r)return e+=this.consumeStringSlice(t),{type:0,value:e};if(n===an)return this._value.splice(0,t),Yr;if(n===yn){var i=this._value[t+1];i!==ke&&i!==void 0&&(i===an?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):rr(n,i)&&(e+=this.consumeStringSlice(t),e+=A(this.consumeEscapedCodePoint()),t=-1))}t++}while(!0)},c.prototype.consumeNumber=function(){var r=[],e=qt,t=this.peekCodePoint(0);for((t===$e||t===ct)&&r.push(this.consumeCodePoint());on(this.peekCodePoint(0));)r.push(this.consumeCodePoint());t=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(t===Zt&&on(n))for(r.push(this.consumeCodePoint(),this.consumeCodePoint()),e=Mt;on(this.peekCodePoint(0));)r.push(this.consumeCodePoint());t=this.peekCodePoint(0),n=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((t===ot||t===at)&&((n===$e||n===ct)&&on(i)||on(n)))for(r.push(this.consumeCodePoint(),this.consumeCodePoint()),e=Mt;on(this.peekCodePoint(0));)r.push(this.consumeCodePoint());return[Vn(r),e]},c.prototype.consumeNumericToken=function(){var r=this.consumeNumber(),e=r[0],t=r[1],n=this.peekCodePoint(0),i=this.peekCodePoint(1),s=this.peekCodePoint(2);if(hr(n,i,s)){var a=this.consumeName();return{type:15,number:e,flags:t,unit:a}}return n===wn?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}},c.prototype.consumeEscapedCodePoint=function(){var r=this.consumeCodePoint();if(kn(r)){for(var e=A(r);kn(this.peekCodePoint(0))&&e.length<6;)e+=A(this.consumeCodePoint());Wn(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return t===0||En(t)||t>1114111?ce:t}return r===ke?ce:r},c.prototype.consumeName=function(){for(var r="";;){var e=this.consumeCodePoint();if(Jn(e))r+=A(e);else if(rr(e,this.peekCodePoint(0)))r+=A(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(e),r}},c}(),ii=function(){function c(r){this._tokens=r}return c.create=function(r){var e=new Sr;return e.write(r),new c(e.read())},c.parseValue=function(r){return c.create(r).parseComponentValue()},c.parseValues=function(r){return c.create(r).parseComponentValues()},c.prototype.parseComponentValue=function(){for(var r=this.consumeToken();r.type===31;)r=this.consumeToken();if(r.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(r);var e=this.consumeComponentValue();do r=this.consumeToken();while(r.type===31);if(r.type===32)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},c.prototype.parseComponentValues=function(){for(var r=[];;){var e=this.consumeComponentValue();if(e.type===32)return r;r.push(e),r.push()}},c.prototype.consumeComponentValue=function(){var r=this.consumeToken();switch(r.type){case 11:case 28:case 2:return this.consumeSimpleBlock(r.type);case 19:return this.consumeFunction(r)}return r},c.prototype.consumeSimpleBlock=function(r){for(var e={type:r,values:[]},t=this.consumeToken();;){if(t.type===32||Ur(t,r))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},c.prototype.consumeFunction=function(r){for(var e={name:r.value,values:[],type:18};;){var t=this.consumeToken();if(t.type===32||t.type===3)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},c.prototype.consumeToken=function(){var r=this._tokens.shift();return typeof r=="undefined"?Er:r},c.prototype.reconsumeToken=function(r){this._tokens.unshift(r)},c}(),$r=function(c){return c.type===15},Zr=function(c){return c.type===17},hn=function(c){return c.type===20},sr=function(c){return c.type===0},Cr=function(c,r){return hn(c)&&c.value===r},_r=function(c){return c.type!==31},br=function(c){return c.type!==31&&c.type!==4},Vr=function(c){var r=[],e=[];return c.forEach(function(t){if(t.type===4){if(e.length===0)throw new Error("Error parsing function args, zero tokens for arg");r.push(e),e=[];return}t.type!==31&&e.push(t)}),e.length&&r.push(e),r},Ur=function(c,r){return r===11&&c.type===12||r===28&&c.type===29?!0:r===2&&c.type===3},si=function(c){return c.type===17||c.type===15},Or=function(c){return c.type===16||si(c)},ji=function(c){return c.length>1?[c[0],c[1]]:[c[0]]},xr={type:17,number:0,flags:qt},Ni={type:16,number:50,flags:qt},Si={type:16,number:100,flags:qt},hi=function(c,r,e){var t=c[0],n=c[1];return[Mr(t,r),Mr(typeof n!="undefined"?n:t,e)]},Mr=function(c,r){if(c.type===16)return c.number/100*r;if($r(c))switch(c.unit){case"rem":case"em":return 16*c.number;case"px":default:return c.number}return c.number},Yi="deg",Ui="grad",Xi="rad",wi="turn",ki={name:"angle",parse:function(c,r){if(r.type===15)switch(r.unit){case Yi:return Math.PI*r.number/180;case Ui:return Math.PI/200*r.number;case Xi:return r.number;case wi:return Math.PI*2*r.number}throw new Error("Unsupported angle type")}},Hi=function(c){return c.type===15&&(c.unit===Yi||c.unit===Ui||c.unit===Xi||c.unit===wi)},Ji=function(c){var r=c.filter(hn).map(function(e){return e.value}).join(" ");switch(r){case"to bottom right":case"to right bottom":case"left top":case"top left":return[xr,xr];case"to top":case"bottom":return fi(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[xr,Si];case"to right":case"left":return fi(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Si,Si];case"to bottom":case"top":return fi(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Si,xr];case"to left":case"right":return fi(270)}return 0},fi=function(c){return Math.PI*c/180},Ti={name:"color",parse:function(c,r){if(r.type===18){var e=ai[r.name];if(typeof e=="undefined")throw new Error('Attempting to parse an unsupported color function "'+r.name+'"');return e(c,r.values)}if(r.type===5){if(r.value.length===3){var t=r.value.substring(0,1),n=r.value.substring(1,2),i=r.value.substring(2,3);return _i(parseInt(t+t,16),parseInt(n+n,16),parseInt(i+i,16),1)}if(r.value.length===4){var t=r.value.substring(0,1),n=r.value.substring(1,2),i=r.value.substring(2,3),s=r.value.substring(3,4);return _i(parseInt(t+t,16),parseInt(n+n,16),parseInt(i+i,16),parseInt(s+s,16)/255)}if(r.value.length===6){var t=r.value.substring(0,2),n=r.value.substring(2,4),i=r.value.substring(4,6);return _i(parseInt(t,16),parseInt(n,16),parseInt(i,16),1)}if(r.value.length===8){var t=r.value.substring(0,2),n=r.value.substring(2,4),i=r.value.substring(4,6),s=r.value.substring(6,8);return _i(parseInt(t,16),parseInt(n,16),parseInt(i,16),parseInt(s,16)/255)}}if(r.type===20){var a=Qr[r.value.toUpperCase()];if(typeof a!="undefined")return a}return Qr.TRANSPARENT}},ui=function(c){return(255&c)===0},oi=function(c){var r=255&c,e=255&c>>8,t=255&c>>16,n=255&c>>24;return r<255?"rgba("+n+","+t+","+e+","+r/255+")":"rgb("+n+","+t+","+e+")"},_i=function(c,r,e,t){return(c<<24|r<<16|e<<8|Math.round(t*255)<<0)>>>0},Ki=function(c,r){if(c.type===17)return c.number;if(c.type===16){var e=r===3?1:255;return r===3?c.number/100*e:Math.round(c.number/100*e)}return 0},Dr=function(c,r){var e=r.filter(br);if(e.length===3){var t=e.map(Ki),n=t[0],i=t[1],s=t[2];return _i(n,i,s,1)}if(e.length===4){var a=e.map(Ki),n=a[0],i=a[1],s=a[2],o=a[3];return _i(n,i,s,o)}return 0};function gr(c,r,e){return e<0&&(e+=1),e>=1&&(e-=1),e<1/6?(r-c)*e*6+c:e<1/2?r:e<2/3?(r-c)*6*(2/3-e)+c:c}var Kr=function(c,r){var e=r.filter(br),t=e[0],n=e[1],i=e[2],s=e[3],a=(t.type===17?fi(t.number):ki.parse(c,t))/(Math.PI*2),o=Or(n)?n.number/100:0,u=Or(i)?i.number/100:0,l=typeof s!="undefined"&&Or(s)?Mr(s,1):1;if(o===0)return _i(u*255,u*255,u*255,1);var f=u<=.5?u*(o+1):u+o-u*o,h=u*2-f,E=gr(h,f,a+1/3),C=gr(h,f,a),T=gr(h,f,a-1/3);return _i(E*255,C*255,T*255,l)},ai={hsl:Kr,hsla:Kr,rgb:Dr,rgba:Dr},Wr=function(c,r){return Ti.parse(c,ii.create(r).parseComponentValue())},Qr={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},Ai={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(c,r){return r.map(function(e){if(hn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},yi={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},pi=function(c,r){var e=Ti.parse(c,r[0]),t=r[1];return t&&Or(t)?{color:e,stop:t}:{color:e,stop:null}},Fi=function(c,r){var e=c[0],t=c[c.length-1];e.stop===null&&(e.stop=xr),t.stop===null&&(t.stop=Si);for(var n=[],i=0,s=0;s<c.length;s++){var a=c[s].stop;if(a!==null){var o=Mr(a,r);o>i?n.push(o):n.push(i),i=o}else n.push(null)}for(var u=null,s=0;s<n.length;s++){var l=n[s];if(l===null)u===null&&(u=s);else if(u!==null){for(var f=s-u,h=n[u-1],E=(l-h)/(f+1),C=1;C<=f;C++)n[u+C-1]=E*C;u=null}}return c.map(function(T,J){var $=T.color;return{color:$,stop:Math.max(Math.min(1,n[J]/r),0)}})},Di=function(c,r,e){var t=r/2,n=e/2,i=Mr(c[0],r)-t,s=n-Mr(c[1],e);return(Math.atan2(s,i)+Math.PI*2)%(Math.PI*2)},qi=function(c,r,e){var t=typeof c=="number"?c:Di(c,r,e),n=Math.abs(r*Math.sin(t))+Math.abs(e*Math.cos(t)),i=r/2,s=e/2,a=n/2,o=Math.sin(t-Math.PI/2)*a,u=Math.cos(t-Math.PI/2)*a;return[n,i-u,i+u,s-o,s+o]},Nr=function(c,r){return Math.sqrt(c*c+r*r)},ns=function(c,r,e,t,n){var i=[[0,0],[0,r],[c,0],[c,r]];return i.reduce(function(s,a){var o=a[0],u=a[1],l=Nr(e-o,t-u);return(n?l<s.optimumDistance:l>s.optimumDistance)?{optimumCorner:a,optimumDistance:l}:s},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},ws=function(c,r,e,t,n){var i=0,s=0;switch(c.size){case 0:c.shape===0?i=s=Math.min(Math.abs(r),Math.abs(r-t),Math.abs(e),Math.abs(e-n)):c.shape===1&&(i=Math.min(Math.abs(r),Math.abs(r-t)),s=Math.min(Math.abs(e),Math.abs(e-n)));break;case 2:if(c.shape===0)i=s=Math.min(Nr(r,e),Nr(r,e-n),Nr(r-t,e),Nr(r-t,e-n));else if(c.shape===1){var a=Math.min(Math.abs(e),Math.abs(e-n))/Math.min(Math.abs(r),Math.abs(r-t)),o=ns(t,n,r,e,!0),u=o[0],l=o[1];i=Nr(u-r,(l-e)/a),s=a*i}break;case 1:c.shape===0?i=s=Math.max(Math.abs(r),Math.abs(r-t),Math.abs(e),Math.abs(e-n)):c.shape===1&&(i=Math.max(Math.abs(r),Math.abs(r-t)),s=Math.max(Math.abs(e),Math.abs(e-n)));break;case 3:if(c.shape===0)i=s=Math.max(Nr(r,e),Nr(r,e-n),Nr(r-t,e),Nr(r-t,e-n));else if(c.shape===1){var a=Math.max(Math.abs(e),Math.abs(e-n))/Math.max(Math.abs(r),Math.abs(r-t)),f=ns(t,n,r,e,!1),u=f[0],l=f[1];i=Nr(u-r,(l-e)/a),s=a*i}break}return Array.isArray(c.size)&&(i=Mr(c.size[0],t),s=c.size.length===2?Mr(c.size[1],n):i),[i,s]},us=function(c,r){var e=fi(180),t=[];return Vr(r).forEach(function(n,i){if(i===0){var s=n[0];if(s.type===20&&s.value==="to"){e=Ji(n);return}else if(Hi(s)){e=ki.parse(c,s);return}}var a=pi(c,n);t.push(a)}),{angle:e,stops:t,type:1}},rs=function(c,r){var e=fi(180),t=[];return Vr(r).forEach(function(n,i){if(i===0){var s=n[0];if(s.type===20&&["top","left","right","bottom"].indexOf(s.value)!==-1){e=Ji(n);return}else if(Hi(s)){e=(ki.parse(c,s)+fi(270))%fi(360);return}}var a=pi(c,n);t.push(a)}),{angle:e,stops:t,type:1}},Us=function(c,r){var e=fi(180),t=[],n=1,i=0,s=3,a=[];return Vr(r).forEach(function(o,u){var l=o[0];if(u===0){if(hn(l)&&l.value==="linear"){n=1;return}else if(hn(l)&&l.value==="radial"){n=2;return}}if(l.type===18){if(l.name==="from"){var f=Ti.parse(c,l.values[0]);t.push({stop:xr,color:f})}else if(l.name==="to"){var f=Ti.parse(c,l.values[0]);t.push({stop:Si,color:f})}else if(l.name==="color-stop"){var h=l.values.filter(br);if(h.length===2){var f=Ti.parse(c,h[1]),E=h[0];Zr(E)&&t.push({stop:{type:16,number:E.number*100,flags:E.flags},color:f})}}}}),n===1?{angle:(e+fi(180))%fi(360),stops:t,type:n}:{size:s,shape:i,stops:t,position:a,type:n}},qr="closest-side",Gr="farthest-side",Xt="closest-corner",di="farthest-corner",ci="circle",Ii="ellipse",Bs="cover",cs="contain",ks=function(c,r){var e=0,t=3,n=[],i=[];return Vr(r).forEach(function(s,a){var o=!0;if(a===0){var u=!1;o=s.reduce(function(f,h){if(u)if(hn(h))switch(h.value){case"center":return i.push(Ni),f;case"top":case"left":return i.push(xr),f;case"right":case"bottom":return i.push(Si),f}else(Or(h)||si(h))&&i.push(h);else if(hn(h))switch(h.value){case ci:return e=0,!1;case Ii:return e=1,!1;case"at":return u=!0,!1;case qr:return t=0,!1;case Bs:case Gr:return t=1,!1;case cs:case Xt:return t=2,!1;case di:return t=3,!1}else if(si(h)||Or(h))return Array.isArray(t)||(t=[]),t.push(h),!1;return f},o)}if(o){var l=pi(c,s);n.push(l)}}),{size:t,shape:e,stops:n,position:i,type:2}},is=function(c,r){var e=0,t=3,n=[],i=[];return Vr(r).forEach(function(s,a){var o=!0;if(a===0?o=s.reduce(function(l,f){if(hn(f))switch(f.value){case"center":return i.push(Ni),!1;case"top":case"left":return i.push(xr),!1;case"right":case"bottom":return i.push(Si),!1}else if(Or(f)||si(f))return i.push(f),!1;return l},o):a===1&&(o=s.reduce(function(l,f){if(hn(f))switch(f.value){case ci:return e=0,!1;case Ii:return e=1,!1;case cs:case qr:return t=0,!1;case Gr:return t=1,!1;case Xt:return t=2,!1;case Bs:case di:return t=3,!1}else if(si(f)||Or(f))return Array.isArray(t)||(t=[]),t.push(f),!1;return l},o)),o){var u=pi(c,s);n.push(u)}}),{size:t,shape:e,stops:n,position:i,type:2}},fs=function(c){return c.type===1},ss=function(c){return c.type===2},Ri={name:"image",parse:function(c,r){if(r.type===22){var e={url:r.value,type:0};return c.cache.addImage(r.value),e}if(r.type===18){var t=Ia[r.name];if(typeof t=="undefined")throw new Error('Attempting to parse an unsupported image function "'+r.name+'"');return t(c,r.values)}throw new Error("Unsupported image type "+r.type)}};function ds(c){return!(c.type===20&&c.value==="none")&&(c.type!==18||!!Ia[c.name])}var Ia={"linear-gradient":us,"-moz-linear-gradient":rs,"-ms-linear-gradient":rs,"-o-linear-gradient":rs,"-webkit-linear-gradient":rs,"radial-gradient":ks,"-moz-radial-gradient":is,"-ms-radial-gradient":is,"-o-radial-gradient":is,"-webkit-radial-gradient":is,"-webkit-gradient":Us},Fa={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(c,r){if(r.length===0)return[];var e=r[0];return e.type===20&&e.value==="none"?[]:r.filter(function(t){return br(t)&&ds(t)}).map(function(t){return Ri.parse(c,t)})}},Da={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(c,r){return r.map(function(e){if(hn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},uo={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(c,r){return Vr(r).map(function(e){return e.filter(Or)}).map(ji)}},Ra={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(c,r){return Vr(r).map(function(e){return e.filter(hn).map(function(t){return t.value}).join(" ")}).map(la)}},la=function(c){switch(c){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}},Gi;(function(c){c.AUTO="auto",c.CONTAIN="contain",c.COVER="cover"})(Gi||(Gi={}));var as={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(c,r){return Vr(r).map(function(e){return e.filter(ua)})}},ua=function(c){return hn(c)||Or(c)},hs=function(c){return{name:"border-"+c+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},ca=hs("top"),Ws=hs("right"),La=hs("bottom"),Ps=hs("left"),zs=function(c){return{name:"border-radius-"+c,initialValue:"0 0",prefix:!1,type:1,parse:function(r,e){return ji(e.filter(Or))}}},Ua=zs("top-left"),js=zs("top-right"),fa=zs("bottom-right"),da=zs("bottom-left"),Cs=function(c){return{name:"border-"+c+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(r,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},co=Cs("top"),Rr=Cs("right"),kr=Cs("bottom"),mi=Cs("left"),Bi=function(c){return{name:"border-"+c+"-width",initialValue:"0",type:0,prefix:!1,parse:function(r,e){return $r(e)?e.number:0}}},gi=Bi("top"),bs=Bi("right"),gs=Bi("bottom"),ps=Bi("left"),ms={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ha={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(c,r){switch(r){case"rtl":return 1;case"ltr":default:return 0}}},gl={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(c,r){return r.filter(hn).reduce(function(e,t){return e|pl(t.value)},0)}},pl=function(c){switch(c){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},ml={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(c,r){switch(r){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},vl={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(c,r){return r.type===20&&r.value==="normal"?0:r.type===17||r.type===15?r.number:0}},ka;(function(c){c.NORMAL="normal",c.STRICT="strict"})(ka||(ka={}));var Pa={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(c,r){switch(r){case"strict":return ka.STRICT;case"normal":default:return ka.NORMAL}}},_l={name:"line-height",initialValue:"normal",prefix:!1,type:4},fo=function(c,r){return hn(c)&&c.value==="normal"?1.2*r:c.type===17?r*c.number:Or(c)?Mr(c,r):r},aA={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(c,r){return r.type===20&&r.value==="none"?null:Ri.parse(c,r)}},yl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(c,r){switch(r){case"inside":return 0;case"outside":default:return 1}}},ga={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(c,r){switch(r){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}}},bi=function(c){return{name:"margin-"+c,initialValue:"0",prefix:!1,type:4}},os=bi("top"),ho=bi("right"),El=bi("bottom"),Oa=bi("left"),wl={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(c,r){return r.filter(hn).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Bl={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(c,r){switch(r){case"break-word":return"break-word";case"normal":default:return"normal"}}},Qa=function(c){return{name:"padding-"+c,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Cl=Qa("top"),oA=Qa("right"),AA=Qa("bottom"),go=Qa("left"),lA={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(c,r){switch(r){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},bl={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(c,r){switch(r){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},uA={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(c,r){return r.length===1&&Cr(r[0],"none")?[]:Vr(r).map(function(e){for(var t={color:Qr.TRANSPARENT,offsetX:xr,offsetY:xr,blur:xr},n=0,i=0;i<e.length;i++){var s=e[i];si(s)?(n===0?t.offsetX=s:n===1?t.offsetY=s:t.blur=s,n++):t.color=Ti.parse(c,s)}return t})}},xl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(c,r){switch(r){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},cA={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(c,r){if(r.type===20&&r.value==="none")return null;if(r.type===18){var e=Tl[r.name];if(typeof e=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+r.name+'"');return e(r.values)}return null}},Sl=function(c){var r=c.filter(function(e){return e.type===17}).map(function(e){return e.number});return r.length===6?r:null},fA=function(c){var r=c.filter(function(o){return o.type===17}).map(function(o){return o.number}),e=r[0],t=r[1];r[2],r[3];var n=r[4],i=r[5];r[6],r[7],r[8],r[9],r[10],r[11];var s=r[12],a=r[13];return r[14],r[15],r.length===16?[e,t,n,i,s,a]:null},Tl={matrix:Sl,matrix3d:fA},dA={type:16,number:50,flags:qt},Il=[dA,dA],hA={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(c,r){var e=r.filter(Or);return e.length!==2?Il:[e[0],e[1]]}},Fl={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(c,r){switch(r){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Ys;(function(c){c.NORMAL="normal",c.BREAK_ALL="break-all",c.KEEP_ALL="keep-all"})(Ys||(Ys={}));for(var pa={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(c,r){switch(r){case"break-all":return Ys.BREAK_ALL;case"keep-all":return Ys.KEEP_ALL;case"normal":default:return Ys.NORMAL}}},gA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(c,r){if(r.type===20)return{auto:!0,order:0};if(Zr(r))return{auto:!1,order:r.number};throw new Error("Invalid z-index number parsed")}},po={name:"time",parse:function(c,r){if(r.type===15)switch(r.unit.toLowerCase()){case"s":return 1e3*r.number;case"ms":return r.number}throw new Error("Unsupported time type")}},Ei={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(c,r){return Zr(r)?r.number:1}},xs={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},mo={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(c,r){return r.filter(hn).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return e!==0})}},Dl={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(c,r){var e=[],t=[];return r.forEach(function(n){switch(n.type){case 20:case 0:e.push(n.value);break;case 17:e.push(n.number.toString());break;case 4:t.push(e.join(" ")),e.length=0;break}}),e.length&&t.push(e.join(" ")),t.map(function(n){return n.indexOf(" ")===-1?n:"'"+n+"'"})}},Rl={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},vo={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(c,r){if(Zr(r))return r.number;if(hn(r))switch(r.value){case"bold":return 700;case"normal":default:return 400}return 400}},_o={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(c,r){return r.filter(hn).map(function(e){return e.value})}},Xs={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(c,r){switch(r){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},vi=function(c,r){return(c&r)!==0},Ss={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(c,r){if(r.length===0)return[];var e=r[0];return e.type===20&&e.value==="none"?[]:r}},kt={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(c,r){if(r.length===0)return null;var e=r[0];if(e.type===20&&e.value==="none")return null;for(var t=[],n=r.filter(_r),i=0;i<n.length;i++){var s=n[i],a=n[i+1];if(s.type===20){var o=a&&Zr(a)?a.number:1;t.push({counter:s.value,increment:o})}}return t}},pA={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(c,r){if(r.length===0)return[];for(var e=[],t=r.filter(_r),n=0;n<t.length;n++){var i=t[n],s=t[n+1];if(hn(i)&&i.value!=="none"){var a=s&&Zr(s)?s.number:0;e.push({counter:i.value,reset:a})}}return e}},yo={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(c,r){return r.filter($r).map(function(e){return po.parse(c,e)})}},Ll={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(c,r){if(r.length===0)return null;var e=r[0];if(e.type===20&&e.value==="none")return null;var t=[],n=r.filter(sr);if(n.length%2!==0)return null;for(var i=0;i<n.length;i+=2){var s=n[i].value,a=n[i+1].value;t.push({open:s,close:a})}return t}},Js=function(c,r,e){if(!c)return"";var t=c[Math.min(r,c.length-1)];return t?e?t.open:t.close:""},Ul={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(c,r){return r.length===1&&Cr(r[0],"none")?[]:Vr(r).map(function(e){for(var t={color:255,offsetX:xr,offsetY:xr,blur:xr,spread:xr,inset:!1},n=0,i=0;i<e.length;i++){var s=e[i];Cr(s,"inset")?t.inset=!0:si(s)?(n===0?t.offsetX=s:n===1?t.offsetY=s:n===2?t.blur=s:t.spread=s,n++):t.color=Ti.parse(c,s)}return t})}},kl={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(c,r){var e=[0,1,2],t=[];return r.filter(hn).forEach(function(n){switch(n.value){case"stroke":t.push(1);break;case"fill":t.push(0);break;case"markers":t.push(2);break}}),e.forEach(function(n){t.indexOf(n)===-1&&t.push(n)}),t}},Pl={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Ol={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(c,r){return $r(r)?r.number:0}},Ql=function(){function c(r,e){var t,n;this.animationDuration=or(r,yo,e.animationDuration),this.backgroundClip=or(r,Ai,e.backgroundClip),this.backgroundColor=or(r,yi,e.backgroundColor),this.backgroundImage=or(r,Fa,e.backgroundImage),this.backgroundOrigin=or(r,Da,e.backgroundOrigin),this.backgroundPosition=or(r,uo,e.backgroundPosition),this.backgroundRepeat=or(r,Ra,e.backgroundRepeat),this.backgroundSize=or(r,as,e.backgroundSize),this.borderTopColor=or(r,ca,e.borderTopColor),this.borderRightColor=or(r,Ws,e.borderRightColor),this.borderBottomColor=or(r,La,e.borderBottomColor),this.borderLeftColor=or(r,Ps,e.borderLeftColor),this.borderTopLeftRadius=or(r,Ua,e.borderTopLeftRadius),this.borderTopRightRadius=or(r,js,e.borderTopRightRadius),this.borderBottomRightRadius=or(r,fa,e.borderBottomRightRadius),this.borderBottomLeftRadius=or(r,da,e.borderBottomLeftRadius),this.borderTopStyle=or(r,co,e.borderTopStyle),this.borderRightStyle=or(r,Rr,e.borderRightStyle),this.borderBottomStyle=or(r,kr,e.borderBottomStyle),this.borderLeftStyle=or(r,mi,e.borderLeftStyle),this.borderTopWidth=or(r,gi,e.borderTopWidth),this.borderRightWidth=or(r,bs,e.borderRightWidth),this.borderBottomWidth=or(r,gs,e.borderBottomWidth),this.borderLeftWidth=or(r,ps,e.borderLeftWidth),this.boxShadow=or(r,Ul,e.boxShadow),this.color=or(r,ms,e.color),this.direction=or(r,ha,e.direction),this.display=or(r,gl,e.display),this.float=or(r,ml,e.cssFloat),this.fontFamily=or(r,Dl,e.fontFamily),this.fontSize=or(r,Rl,e.fontSize),this.fontStyle=or(r,Xs,e.fontStyle),this.fontVariant=or(r,_o,e.fontVariant),this.fontWeight=or(r,vo,e.fontWeight),this.letterSpacing=or(r,vl,e.letterSpacing),this.lineBreak=or(r,Pa,e.lineBreak),this.lineHeight=or(r,_l,e.lineHeight),this.listStyleImage=or(r,aA,e.listStyleImage),this.listStylePosition=or(r,yl,e.listStylePosition),this.listStyleType=or(r,ga,e.listStyleType),this.marginTop=or(r,os,e.marginTop),this.marginRight=or(r,ho,e.marginRight),this.marginBottom=or(r,El,e.marginBottom),this.marginLeft=or(r,Oa,e.marginLeft),this.opacity=or(r,Ei,e.opacity);var i=or(r,wl,e.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=or(r,Bl,e.overflowWrap),this.paddingTop=or(r,Cl,e.paddingTop),this.paddingRight=or(r,oA,e.paddingRight),this.paddingBottom=or(r,AA,e.paddingBottom),this.paddingLeft=or(r,go,e.paddingLeft),this.paintOrder=or(r,kl,e.paintOrder),this.position=or(r,bl,e.position),this.textAlign=or(r,lA,e.textAlign),this.textDecorationColor=or(r,xs,(t=e.textDecorationColor)!==null&&t!==void 0?t:e.color),this.textDecorationLine=or(r,mo,(n=e.textDecorationLine)!==null&&n!==void 0?n:e.textDecoration),this.textShadow=or(r,uA,e.textShadow),this.textTransform=or(r,xl,e.textTransform),this.transform=or(r,cA,e.transform),this.transformOrigin=or(r,hA,e.transformOrigin),this.visibility=or(r,Fl,e.visibility),this.webkitTextStrokeColor=or(r,Pl,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=or(r,Ol,e.webkitTextStrokeWidth),this.wordBreak=or(r,pa,e.wordBreak),this.zIndex=or(r,gA,e.zIndex)}return c.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},c.prototype.isTransparent=function(){return ui(this.backgroundColor)},c.prototype.isTransformed=function(){return this.transform!==null},c.prototype.isPositioned=function(){return this.position!==0},c.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},c.prototype.isFloating=function(){return this.float!==0},c.prototype.isInlineLevel=function(){return vi(this.display,4)||vi(this.display,33554432)||vi(this.display,268435456)||vi(this.display,536870912)||vi(this.display,67108864)||vi(this.display,134217728)},c}(),qs=function(){function c(r,e){this.content=or(r,Ss,e.content),this.quotes=or(r,Ll,e.quotes)}return c}(),Ma=function(){function c(r,e){this.counterIncrement=or(r,kt,e.counterIncrement),this.counterReset=or(r,pA,e.counterReset)}return c}(),or=function(c,r,e){var t=new Sr,n=e!==null&&typeof e!="undefined"?e.toString():r.initialValue;t.write(n);var i=new ii(t.read());switch(r.type){case 2:var s=i.parseComponentValue();return r.parse(c,hn(s)?s.value:r.initialValue);case 0:return r.parse(c,i.parseComponentValue());case 1:return r.parse(c,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(r.format){case"angle":return ki.parse(c,i.parseComponentValue());case"color":return Ti.parse(c,i.parseComponentValue());case"image":return Ri.parse(c,i.parseComponentValue());case"length":var a=i.parseComponentValue();return si(a)?a:xr;case"length-percentage":var o=i.parseComponentValue();return Or(o)?o:xr;case"time":return po.parse(c,i.parseComponentValue())}break}},Na="data-html2canvas-debug",$i=function(c){var r=c.getAttribute(Na);switch(r){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Eo=function(c,r){var e=$i(c);return e===1||r===e},es=function(){function c(r,e){if(this.context=r,this.textNodes=[],this.elements=[],this.flags=0,Eo(e,3))debugger;this.styles=new Ql(r,window.getComputedStyle(e,null)),Po(e)&&(this.styles.animationDuration.some(function(t){return t>0})&&(e.style.animationDuration="0s"),this.styles.transform!==null&&(e.style.transform="none")),this.bounds=d(this.context,e),Eo(e,4)&&(this.flags|=16)}return c}(),mA="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",vA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ma=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),va=0;va<vA.length;va++)ma[vA.charCodeAt(va)]=va;for(var vs=function(c){var r=c.length*.75,e=c.length,t,n=0,i,s,a,o;c[c.length-1]==="="&&(r--,c[c.length-2]==="="&&r--);var u=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(r):new Array(r),l=Array.isArray(u)?u:new Uint8Array(u);for(t=0;t<e;t+=4)i=ma[c.charCodeAt(t)],s=ma[c.charCodeAt(t+1)],a=ma[c.charCodeAt(t+2)],o=ma[c.charCodeAt(t+3)],l[n++]=i<<2|s>>4,l[n++]=(s&15)<<4|a>>2,l[n++]=(a&3)<<6|o&63;return u},Ha=function(c){for(var r=c.length,e=[],t=0;t<r;t+=2)e.push(c[t+1]<<8|c[t]);return e},_A=function(c){for(var r=c.length,e=[],t=0;t<r;t+=4)e.push(c[t+3]<<24|c[t+2]<<16|c[t+1]<<8|c[t]);return e},Os=5,_a=11,Qs=2,Ml=_a-Os,yA=65536>>Os,EA=1<<Os,Ka=EA-1,wA=1024>>Os,Nl=yA+wA,wo=Nl,BA=32,ya=wo+BA,Bo=65536>>_a,Hl=1<<Ml,Kl=Hl-1,Co=function(c,r,e){return c.slice?c.slice(r,e):new Uint16Array(Array.prototype.slice.call(c,r,e))},CA=function(c,r,e){return c.slice?c.slice(r,e):new Uint32Array(Array.prototype.slice.call(c,r,e))},Gl=function(c,r){var e=vs(c),t=Array.isArray(e)?_A(e):new Uint32Array(e),n=Array.isArray(e)?Ha(e):new Uint16Array(e),i=24,s=Co(n,i/2,t[4]/2),a=t[5]===2?Co(n,(i+t[4])/2):CA(t,Math.ceil((i+t[4])/4));return new $l(t[0],t[1],t[2],t[3],s,a)},$l=function(){function c(r,e,t,n,i,s){this.initialValue=r,this.errorValue=e,this.highStart=t,this.highValueIndex=n,this.index=i,this.data=s}return c.prototype.get=function(r){var e;if(r>=0){if(r<55296||r>56319&&r<=65535)return e=this.index[r>>Os],e=(e<<Qs)+(r&Ka),this.data[e];if(r<=65535)return e=this.index[yA+(r-55296>>Os)],e=(e<<Qs)+(r&Ka),this.data[e];if(r<this.highStart)return e=ya-Bo+(r>>_a),e=this.index[e],e+=r>>Os&Kl,e=this.index[e],e=(e<<Qs)+(r&Ka),this.data[e];if(r<=1114111)return this.data[this.highValueIndex]}return this.errorValue},c}(),bo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zl=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ea=0;ea<bo.length;ea++)Zl[bo.charCodeAt(ea)]=ea;var xo=1,bA=2,xi=3,Vl=4,xA=5,ju=7,Wl=8,SA=9,TA=10,ta=11,IA=12,Ms=13,FA=14,So=15,zl=function(c){for(var r=[],e=0,t=c.length;e<t;){var n=c.charCodeAt(e++);if(n>=55296&&n<=56319&&e<t){var i=c.charCodeAt(e++);(i&64512)===56320?r.push(((n&1023)<<10)+(i&1023)+65536):(r.push(n),e--)}else r.push(n)}return r},As=function(){for(var c=[],r=0;r<arguments.length;r++)c[r]=arguments[r];if(String.fromCodePoint)return String.fromCodePoint.apply(String,c);var e=c.length;if(!e)return"";for(var t=[],n=-1,i="";++n<e;){var s=c[n];s<=65535?t.push(s):(s-=65536,t.push((s>>10)+55296,s%1024+56320)),(n+1===e||t.length>16384)&&(i+=String.fromCharCode.apply(String,t),t.length=0)}return i},DA=Gl(mA),Pi="\xD7",To="\xF7",jl=function(c){return DA.get(c)},Yl=function(c,r,e){var t=e-2,n=r[t],i=r[e-1],s=r[e];if(i===bA&&s===xi)return Pi;if(i===bA||i===xi||i===Vl||s===bA||s===xi||s===Vl)return To;if(i===Wl&&[Wl,SA,ta,IA].indexOf(s)!==-1||(i===ta||i===SA)&&(s===SA||s===TA)||(i===IA||i===TA)&&s===TA||s===Ms||s===xA||s===ju||i===xo)return Pi;if(i===Ms&&s===FA){for(;n===xA;)n=r[--t];if(n===FA)return Pi}if(i===So&&s===So){for(var a=0;n===So;)a++,n=r[--t];if(a%2===0)return Pi}return To},Xl=function(c){var r=zl(c),e=r.length,t=0,n=0,i=r.map(jl);return{next:function(){if(t>=e)return{done:!0,value:null};for(var s=Pi;t<e&&(s=Yl(r,i,++t))===Pi;);if(s!==Pi||t===e){var a=As.apply(null,r.slice(n,t));return n=t,{value:a,done:!1}}return{done:!0,value:null}}}},Jl=function(c){for(var r=Xl(c),e=[],t;!(t=r.next()).done;)t.value&&e.push(t.value.slice());return e},ql=function(c){var r=123;if(c.createRange){var e=c.createRange();if(e.getBoundingClientRect){var t=c.createElement("boundtest");t.style.height=r+"px",t.style.display="block",c.body.appendChild(t),e.selectNode(t);var n=e.getBoundingClientRect(),i=Math.round(n.height);if(c.body.removeChild(t),i===r)return!0}}return!1},RA=function(c){var r=c.createElement("boundtest");r.style.width="50px",r.style.display="block",r.style.fontSize="12px",r.style.letterSpacing="0px",r.style.wordSpacing="0px",c.body.appendChild(r);var e=c.createRange();r.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var t=r.firstChild,n=G(t.data).map(function(o){return A(o)}),i=0,s={},a=n.every(function(o,u){e.setStart(t,i),e.setEnd(t,i+o.length);var l=e.getBoundingClientRect();i+=o.length;var f=l.x>s.x||l.y>s.y;return s=l,u===0?!0:f});return c.body.removeChild(r),a},eu=function(){return typeof new Image().crossOrigin!="undefined"},tu=function(){return typeof new XMLHttpRequest().responseType=="string"},nu=function(c){var r=new Image,e=c.createElement("canvas"),t=e.getContext("2d");if(!t)return!1;r.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{t.drawImage(r,0,0),e.toDataURL()}catch(n){return!1}return!0},LA=function(c){return c[0]===0&&c[1]===255&&c[2]===0&&c[3]===255},ru=function(c){var r=c.createElement("canvas"),e=100;r.width=e,r.height=e;var t=r.getContext("2d");if(!t)return Promise.reject(!1);t.fillStyle="rgb(0, 255, 0)",t.fillRect(0,0,e,e);var n=new Image,i=r.toDataURL();n.src=i;var s=Io(e,e,0,0,n);return t.fillStyle="red",t.fillRect(0,0,e,e),UA(s).then(function(a){t.drawImage(a,0,0);var o=t.getImageData(0,0,e,e).data;t.fillStyle="red",t.fillRect(0,0,e,e);var u=c.createElement("div");return u.style.backgroundImage="url("+i+")",u.style.height=e+"px",LA(o)?UA(Io(e,e,0,0,u)):Promise.reject(!1)}).then(function(a){return t.drawImage(a,0,0),LA(t.getImageData(0,0,e,e).data)}).catch(function(){return!1})},Io=function(c,r,e,t,n){var i="http://www.w3.org/2000/svg",s=document.createElementNS(i,"svg"),a=document.createElementNS(i,"foreignObject");return s.setAttributeNS(null,"width",c.toString()),s.setAttributeNS(null,"height",r.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",e.toString()),a.setAttributeNS(null,"y",t.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(a),a.appendChild(n),s},UA=function(c){return new Promise(function(r,e){var t=new Image;t.onload=function(){return r(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(c))})},Ci={get SUPPORT_RANGE_BOUNDS(){var c=ql(document);return Object.defineProperty(Ci,"SUPPORT_RANGE_BOUNDS",{value:c}),c},get SUPPORT_WORD_BREAKING(){var c=Ci.SUPPORT_RANGE_BOUNDS&&RA(document);return Object.defineProperty(Ci,"SUPPORT_WORD_BREAKING",{value:c}),c},get SUPPORT_SVG_DRAWING(){var c=nu(document);return Object.defineProperty(Ci,"SUPPORT_SVG_DRAWING",{value:c}),c},get SUPPORT_FOREIGNOBJECT_DRAWING(){var c=typeof Array.from=="function"&&typeof window.fetch=="function"?ru(document):Promise.resolve(!1);return Object.defineProperty(Ci,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:c}),c},get SUPPORT_CORS_IMAGES(){var c=eu();return Object.defineProperty(Ci,"SUPPORT_CORS_IMAGES",{value:c}),c},get SUPPORT_RESPONSE_TYPE(){var c=tu();return Object.defineProperty(Ci,"SUPPORT_RESPONSE_TYPE",{value:c}),c},get SUPPORT_CORS_XHR(){var c="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ci,"SUPPORT_CORS_XHR",{value:c}),c},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var c=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Ci,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:c}),c}},na=function(){function c(r,e){this.text=r,this.bounds=e}return c}(),Fo=function(c,r,e,t){var n=su(r,e),i=[],s=0;return n.forEach(function(a){if(e.textDecorationLine.length||a.trim().length>0)if(Ci.SUPPORT_RANGE_BOUNDS){var o=Ga(t,s,a.length).getClientRects();if(o.length>1){var u=Ea(a),l=0;u.forEach(function(h){i.push(new na(h,W.fromDOMRectList(c,Ga(t,l+s,h.length).getClientRects()))),l+=h.length})}else i.push(new na(a,W.fromDOMRectList(c,o)))}else{var f=t.splitText(a.length);i.push(new na(a,iu(c,t))),t=f}else Ci.SUPPORT_RANGE_BOUNDS||(t=t.splitText(a.length));s+=a.length}),i},iu=function(c,r){var e=r.ownerDocument;if(e){var t=e.createElement("html2canvaswrapper");t.appendChild(r.cloneNode(!0));var n=r.parentNode;if(n){n.replaceChild(t,r);var i=d(c,t);return t.firstChild&&n.replaceChild(t.firstChild,t),i}}return W.EMPTY},Ga=function(c,r,e){var t=c.ownerDocument;if(!t)throw new Error("Node has no owner document");var n=t.createRange();return n.setStart(c,r),n.setEnd(c,r+e),n},Ea=function(c){if(Ci.SUPPORT_NATIVE_TEXT_SEGMENTATION){var r=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(r.segment(c)).map(function(e){return e.segment})}return Jl(c)},kA=function(c,r){if(Ci.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(e.segment(c)).map(function(t){return t.segment})}return ou(c,r)},su=function(c,r){return r.letterSpacing!==0?Ea(c):kA(c,r)},au=[32,160,4961,65792,65793,4153,4241],ou=function(c,r){for(var e=Nn(c,{lineBreak:r.lineBreak,wordBreak:r.overflowWrap==="break-word"?"break-word":r.wordBreak}),t=[],n,i=function(){if(n.value){var s=n.value.slice(),a=G(s),o="";a.forEach(function(u){au.indexOf(u)===-1?o+=A(u):(o.length&&t.push(o),t.push(A(u)),o="")}),o.length&&t.push(o)}};!(n=e.next()).done;)i();return t},Au=function(){function c(r,e,t){this.text=lu(e.data,t.textTransform),this.textBounds=Fo(r,this.text,t,e)}return c}(),lu=function(c,r){switch(r){case 1:return c.toLowerCase();case 3:return c.replace($a,uu);case 2:return c.toUpperCase();default:return c}},$a=/(^|\s|:|-|\(|\))([a-z])/g,uu=function(c,r,e){return c.length>0?r+e.toUpperCase():c},wa=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this;return n.src=t.currentSrc||t.src,n.intrinsicWidth=t.naturalWidth,n.intrinsicHeight=t.naturalHeight,n.context.cache.addImage(n.src),n}return r}(es),PA=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this;return n.canvas=t,n.intrinsicWidth=t.width,n.intrinsicHeight=t.height,n}return r}(es),OA=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this,i=new XMLSerializer,s=d(e,t);return t.setAttribute("width",s.width+"px"),t.setAttribute("height",s.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(t)),n.intrinsicWidth=t.width.baseVal.value,n.intrinsicHeight=t.height.baseVal.value,n.context.cache.addImage(n.svg),n}return r}(es),Do=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this;return n.value=t.value,n}return r}(es),Ro=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this;return n.start=t.start,n.reversed=typeof t.reversed=="boolean"&&t.reversed===!0,n}return r}(es),cu=[{type:15,flags:0,unit:"px",number:3}],fu=[{type:16,flags:0,number:50}],du=function(c){return c.width>c.height?new W(c.left+(c.width-c.height)/2,c.top,c.height,c.height):c.width<c.height?new W(c.left,c.top+(c.height-c.width)/2,c.width,c.width):c},QA=function(c){var r=c.type===hu?new Array(c.value.length+1).join("\u2022"):c.value;return r.length===0?c.placeholder||"":r},Za="checkbox",Va="radio",hu="password",MA=707406591,Wa=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this;switch(n.type=t.type.toLowerCase(),n.checked=t.checked,n.value=QA(t),(n.type===Za||n.type===Va)&&(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=du(n.bounds)),n.type){case Za:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=cu;break;case Va:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=fu;break}return n}return r}(es),Lo=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this,i=t.options[t.selectedIndex||0];return n.value=i&&i.text||"",n}return r}(es),Ns=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this;return n.value=t.value,n}return r}(es),Oi=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this;n.src=t.src,n.width=parseInt(t.width,10)||0,n.height=parseInt(t.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.documentElement){n.tree=Hs(e,t.contentWindow.document.documentElement);var i=t.contentWindow.document.documentElement?Wr(e,getComputedStyle(t.contentWindow.document.documentElement).backgroundColor):Qr.TRANSPARENT,s=t.contentWindow.document.body?Wr(e,getComputedStyle(t.contentWindow.document.body).backgroundColor):Qr.TRANSPARENT;n.backgroundColor=ui(i)?ui(s)?n.styles.backgroundColor:s:i}}catch(a){}return n}return r}(es),gu=["OL","UL","MENU"],Ba=function(c,r,e,t){for(var n=r.firstChild,i=void 0;n;n=i)if(i=n.nextSibling,NA(n)&&n.data.trim().length>0)e.textNodes.push(new Au(c,n,e.styles));else if(_s(n))if(ts(n)&&n.assignedNodes)n.assignedNodes().forEach(function(a){return Ba(c,a,e,t)});else{var s=Uo(c,n);s.styles.isVisible()&&(ko(n,s,t)?s.flags|=4:pu(s.styles)&&(s.flags|=2),gu.indexOf(n.tagName)!==-1&&(s.flags|=8),e.elements.push(s),n.slot,n.shadowRoot?Ba(c,n.shadowRoot,s,t):!Ja(n)&&!ja(n)&&!Zi(n)&&Ba(c,n,s,t))}},Uo=function(c,r){return Oo(r)?new wa(c,r):HA(r)?new PA(c,r):ja(r)?new OA(c,r):ra(r)?new Do(c,r):za(r)?new Ro(c,r):mu(r)?new Wa(c,r):Zi(r)?new Lo(c,r):Ja(r)?new Ns(c,r):Qo(r)?new Oi(c,r):new es(c,r)},Hs=function(c,r){var e=Uo(c,r);return e.flags|=4,Ba(c,r,e,e),e},ko=function(c,r,e){return r.styles.isPositionedWithZIndex()||r.styles.opacity<1||r.styles.isTransformed()||Ya(c)&&e.styles.isTransparent()},pu=function(c){return c.isPositioned()||c.isFloating()},NA=function(c){return c.nodeType===Node.TEXT_NODE},_s=function(c){return c.nodeType===Node.ELEMENT_NODE},Po=function(c){return _s(c)&&typeof c.style!="undefined"&&!Ts(c)},Ts=function(c){return typeof c.className=="object"},ra=function(c){return c.tagName==="LI"},za=function(c){return c.tagName==="OL"},mu=function(c){return c.tagName==="INPUT"},vu=function(c){return c.tagName==="HTML"},ja=function(c){return c.tagName==="svg"},Ya=function(c){return c.tagName==="BODY"},HA=function(c){return c.tagName==="CANVAS"},Xa=function(c){return c.tagName==="VIDEO"},Oo=function(c){return c.tagName==="IMG"},Qo=function(c){return c.tagName==="IFRAME"},KA=function(c){return c.tagName==="STYLE"},Is=function(c){return c.tagName==="SCRIPT"},Ja=function(c){return c.tagName==="TEXTAREA"},Zi=function(c){return c.tagName==="SELECT"},ts=function(c){return c.tagName==="SLOT"},Mo=function(c){return c.tagName.indexOf("-")>0},_u=function(){function c(){this.counters={}}return c.prototype.getCounterValue=function(r){var e=this.counters[r];return e&&e.length?e[e.length-1]:1},c.prototype.getCounterValues=function(r){var e=this.counters[r];return e||[]},c.prototype.pop=function(r){var e=this;r.forEach(function(t){return e.counters[t].pop()})},c.prototype.parse=function(r){var e=this,t=r.counterIncrement,n=r.counterReset,i=!0;t!==null&&t.forEach(function(a){var o=e.counters[a.counter];o&&a.increment!==0&&(i=!1,o.length||o.push(1),o[Math.max(0,o.length-1)]+=a.increment)});var s=[];return i&&n.forEach(function(a){var o=e.counters[a.counter];s.push(a.counter),o||(o=e.counters[a.counter]=[]),o.push(a.reset)}),s},c}(),No={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"]},GA={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"]},Ks=function(c,r,e,t,n,i){return c<r||c>e?$s(c,n,i.length>0):t.integers.reduce(function(s,a,o){for(;c>=a;)c-=a,s+=t.values[o];return s},"")+i},Vi=function(c,r,e,t){var n="";do e||c--,n=t(c)+n,c/=r;while(c*r>=r);return n},ri=function(c,r,e,t,n){var i=e-r+1;return(c<0?"-":"")+(Vi(Math.abs(c),i,t,function(s){return A(Math.floor(s%i)+r)})+n)},Gs=function(c,r,e){e===void 0&&(e=". ");var t=r.length;return Vi(Math.abs(c),t,!1,function(n){return r[Math.floor(n%t)]})+e},ia=1,Fs=2,Ds=4,Ca=8,ys=function(c,r,e,t,n,i){if(c<-9999||c>9999)return $s(c,4,n.length>0);var s=Math.abs(c),a=n;if(s===0)return r[0]+a;for(var o=0;s>0&&o<=4;o++){var u=s%10;u===0&&vi(i,ia)&&a!==""?a=r[u]+a:u>1||u===1&&o===0||u===1&&o===1&&vi(i,Fs)||u===1&&o===1&&vi(i,Ds)&&c>100||u===1&&o>1&&vi(i,Ca)?a=r[u]+(o>0?e[o-1]:"")+a:u===1&&o>0&&(a=e[o-1]+a),s=Math.floor(s/10)}return(c<0?t:"")+a},Rs="\u5341\u767E\u5343\u842C",Ho="\u62FE\u4F70\u4EDF\u842C",$A="\u30DE\u30A4\u30CA\u30B9",Ko="\uB9C8\uC774\uB108\uC2A4",$s=function(c,r,e){var t=e?". ":"",n=e?"\u3001":"",i=e?", ":"",s=e?" ":"";switch(r){case 0:return"\u2022"+s;case 1:return"\u25E6"+s;case 2:return"\u25FE"+s;case 5:var a=ri(c,48,57,!0,t);return a.length<4?"0"+a:a;case 4:return Gs(c,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",n);case 6:return Ks(c,1,3999,No,3,t).toLowerCase();case 7:return Ks(c,1,3999,No,3,t);case 8:return ri(c,945,969,!1,t);case 9:return ri(c,97,122,!1,t);case 10:return ri(c,65,90,!1,t);case 11:return ri(c,1632,1641,!0,t);case 12:case 49:return Ks(c,1,9999,GA,3,t);case 35:return Ks(c,1,9999,GA,3,t).toLowerCase();case 13:return ri(c,2534,2543,!0,t);case 14:case 30:return ri(c,6112,6121,!0,t);case 15:return Gs(c,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",n);case 16:return Gs(c,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",n);case 17:case 48:return ys(c,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Rs,"\u8CA0",n,Fs|Ds|Ca);case 47:return ys(c,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ho,"\u8CA0",n,ia|Fs|Ds|Ca);case 42:return ys(c,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Rs,"\u8D1F",n,Fs|Ds|Ca);case 41:return ys(c,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ho,"\u8D1F",n,ia|Fs|Ds|Ca);case 26:return ys(c,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",$A,n,0);case 25:return ys(c,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",$A,n,ia|Fs|Ds);case 31:return ys(c,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Ko,i,ia|Fs|Ds);case 33:return ys(c,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Ko,i,0);case 32:return ys(c,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Ko,i,ia|Fs|Ds);case 18:return ri(c,2406,2415,!0,t);case 20:return Ks(c,1,19999,Eu,3,t);case 21:return ri(c,2790,2799,!0,t);case 22:return ri(c,2662,2671,!0,t);case 22:return Ks(c,1,10999,yu,3,t);case 23:return Gs(c,"\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 Gs(c,"\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 ri(c,3302,3311,!0,t);case 28:return Gs(c,"\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",n);case 29:return Gs(c,"\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",n);case 34:return ri(c,3792,3801,!0,t);case 37:return ri(c,6160,6169,!0,t);case 38:return ri(c,4160,4169,!0,t);case 39:return ri(c,2918,2927,!0,t);case 40:return ri(c,1776,1785,!0,t);case 43:return ri(c,3046,3055,!0,t);case 44:return ri(c,3174,3183,!0,t);case 45:return ri(c,3664,3673,!0,t);case 46:return ri(c,3872,3881,!0,t);case 3:default:return ri(c,48,57,!0,t)}},Go="data-html2canvas-ignore",$o=function(){function c(r,e,t){if(this.context=r,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new _u,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return c.prototype.toIFrame=function(r,e){var t=this,n=wu(r,e);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var i=r.defaultView.pageXOffset,s=r.defaultView.pageYOffset,a=n.contentWindow,o=a.document,u=Cu(n).then(function(){return me(t,void 0,void 0,function(){var l,f;return be(this,function(h){switch(h.label){case 0:return this.scrolledElements.forEach(qa),a&&(a.scrollTo(e.left,e.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==e.top||a.scrollX!==e.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-e.left,a.scrollY-e.top,0,0))),l=this.options.onclone,f=this.clonedReferenceElement,typeof f=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:h.sent(),h.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Zo(o)]:[3,4];case 3:h.sent(),h.label=4;case 4:return typeof l=="function"?[2,Promise.resolve().then(function(){return l(o,f)}).then(function(){return n})]:[2,n]}})})});return o.open(),o.write(VA(document.doctype)+"<html></html>"),Wo(this.referenceElement.ownerDocument,i,s),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),u},c.prototype.createElementClone=function(r){if(Eo(r,2))debugger;if(HA(r))return this.createCanvasClone(r);if(Xa(r))return this.createVideoClone(r);if(KA(r))return this.createStyleClone(r);var e=r.cloneNode(!1);return Oo(e)&&(Oo(r)&&r.currentSrc&&r.currentSrc!==r.src&&(e.src=r.currentSrc,e.srcset=""),e.loading==="lazy"&&(e.loading="eager")),Mo(e)?this.createCustomElementClone(e):e},c.prototype.createCustomElementClone=function(r){var e=document.createElement("html2canvascustomelement");return Vo(r.style,e),e},c.prototype.createStyleClone=function(r){try{var e=r.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce(function(i,s){return s&&typeof s.cssText=="string"?i+s.cssText:i},""),n=r.cloneNode(!1);return n.textContent=t,n}}catch(i){if(this.context.logger.error("Unable to access cssRules property",i),i.name!=="SecurityError")throw i}return r.cloneNode(!1)},c.prototype.createCanvasClone=function(r){var e;if(this.options.inlineImages&&r.ownerDocument){var t=r.ownerDocument.createElement("img");try{return t.src=r.toDataURL(),t}catch(u){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",r)}}var n=r.cloneNode(!1);try{n.width=r.width,n.height=r.height;var i=r.getContext("2d"),s=n.getContext("2d");if(s)if(!this.options.allowTaint&&i)s.putImageData(i.getImageData(0,0,r.width,r.height),0,0);else{var a=(e=r.getContext("webgl2"))!==null&&e!==void 0?e:r.getContext("webgl");if(a){var o=a.getContextAttributes();(o==null?void 0:o.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",r)}s.drawImage(r,0,0)}return n}catch(u){this.context.logger.info("Unable to clone canvas as it is tainted",r)}return n},c.prototype.createVideoClone=function(r){var e=r.ownerDocument.createElement("canvas");e.width=r.offsetWidth,e.height=r.offsetHeight;var t=e.getContext("2d");try{return t&&(t.drawImage(r,0,0,e.width,e.height),this.options.allowTaint||t.getImageData(0,0,e.width,e.height)),e}catch(i){this.context.logger.info("Unable to clone video as it is tainted",r)}var n=r.ownerDocument.createElement("canvas");return n.width=r.offsetWidth,n.height=r.offsetHeight,n},c.prototype.appendChildNode=function(r,e,t){(!_s(e)||!Is(e)&&!e.hasAttribute(Go)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(e)))&&(!this.options.copyStyles||!_s(e)||!KA(e))&&r.appendChild(this.cloneNode(e,t))},c.prototype.cloneChildNodes=function(r,e,t){for(var n=this,i=r.shadowRoot?r.shadowRoot.firstChild:r.firstChild;i;i=i.nextSibling)if(_s(i)&&ts(i)&&typeof i.assignedNodes=="function"){var s=i.assignedNodes();s.length&&s.forEach(function(a){return n.appendChildNode(e,a,t)})}else this.appendChildNode(e,i,t)},c.prototype.cloneNode=function(r,e){if(NA(r))return document.createTextNode(r.data);if(!r.ownerDocument)return r.cloneNode(!1);var t=r.ownerDocument.defaultView;if(t&&_s(r)&&(Po(r)||Ts(r))){var n=this.createElementClone(r);n.style.transitionProperty="none";var i=t.getComputedStyle(r),s=t.getComputedStyle(r,":before"),a=t.getComputedStyle(r,":after");this.referenceElement===r&&Po(n)&&(this.clonedReferenceElement=n),Ya(n)&&xu(n);var o=this.counters.parse(new Ma(this.context,i)),u=this.resolvePseudoContent(r,n,s,Ls.BEFORE);Mo(r)&&(e=!0),Xa(r)||this.cloneChildNodes(r,n,e),u&&n.insertBefore(u,n.firstChild);var l=this.resolvePseudoContent(r,n,a,Ls.AFTER);return l&&n.appendChild(l),this.counters.pop(o),(i&&(this.options.copyStyles||Ts(r))&&!Qo(r)||e)&&Vo(i,n),(r.scrollTop!==0||r.scrollLeft!==0)&&this.scrolledElements.push([n,r.scrollLeft,r.scrollTop]),(Ja(r)||Zi(r))&&(Ja(n)||Zi(n))&&(n.value=r.value),n}return r.cloneNode(!1)},c.prototype.resolvePseudoContent=function(r,e,t,n){var i=this;if(t){var s=t.content,a=e.ownerDocument;if(!(!a||!s||s==="none"||s==="-moz-alt-content"||t.display==="none")){this.counters.parse(new Ma(this.context,t));var o=new qs(this.context,t),u=a.createElement("html2canvaspseudoelement");Vo(t,u),o.content.forEach(function(f){if(f.type===0)u.appendChild(a.createTextNode(f.value));else if(f.type===22){var h=a.createElement("img");h.src=f.value,h.style.opacity="1",u.appendChild(h)}else if(f.type===18){if(f.name==="attr"){var E=f.values.filter(hn);E.length&&u.appendChild(a.createTextNode(r.getAttribute(E[0].value)||""))}else if(f.name==="counter"){var C=f.values.filter(br),T=C[0],J=C[1];if(T&&hn(T)){var $=i.counters.getCounterValue(T.value),_e=J&&hn(J)?ga.parse(i.context,J.value):3;u.appendChild(a.createTextNode($s($,_e,!1)))}}else if(f.name==="counters"){var Oe=f.values.filter(br),T=Oe[0],De=Oe[1],J=Oe[2];if(T&&hn(T)){var rt=i.counters.getCounterValues(T.value),We=J&&hn(J)?ga.parse(i.context,J.value):3,Lt=De&&De.type===0?De.value:"",dt=rt.map(function(xt){return $s(xt,We,!1)}).join(Lt);u.appendChild(a.createTextNode(dt))}}}else if(f.type===20)switch(f.value){case"open-quote":u.appendChild(a.createTextNode(Js(o.quotes,i.quoteDepth++,!0)));break;case"close-quote":u.appendChild(a.createTextNode(Js(o.quotes,--i.quoteDepth,!1)));break;default:u.appendChild(a.createTextNode(f.value))}}),u.className=zo+" "+jo;var l=n===Ls.BEFORE?" "+zo:" "+jo;return Ts(e)?e.className.baseValue+=l:e.className+=l,u}}},c.destroy=function(r){return r.parentNode?(r.parentNode.removeChild(r),!0):!1},c}(),Ls;(function(c){c[c.BEFORE=0]="BEFORE",c[c.AFTER=1]="AFTER"})(Ls||(Ls={}));var wu=function(c,r){var e=c.createElement("iframe");return e.className="html2canvas-container",e.style.visibility="hidden",e.style.position="fixed",e.style.left="-10000px",e.style.top="0px",e.style.border="0",e.width=r.width.toString(),e.height=r.height.toString(),e.scrolling="no",e.setAttribute(Go,"true"),c.body.appendChild(e),e},Bu=function(c){return new Promise(function(r){if(c.complete){r();return}if(!c.src){r();return}c.onload=r,c.onerror=r})},Zo=function(c){return Promise.all([].slice.call(c.images,0).map(Bu))},Cu=function(c){return new Promise(function(r,e){var t=c.contentWindow;if(!t)return e("No window assigned for iframe");var n=t.document;t.onload=c.onload=function(){t.onload=c.onload=null;var i=setInterval(function(){n.body.childNodes.length>0&&n.readyState==="complete"&&(clearInterval(i),r(c))},50)}})},ZA=["all","d","content"],Vo=function(c,r){for(var e=c.length-1;e>=0;e--){var t=c.item(e);ZA.indexOf(t)===-1&&r.style.setProperty(t,c.getPropertyValue(t))}return r},VA=function(c){var r="";return c&&(r+="<!DOCTYPE ",c.name&&(r+=c.name),c.internalSubset&&(r+=c.internalSubset),c.publicId&&(r+='"'+c.publicId+'"'),c.systemId&&(r+='"'+c.systemId+'"'),r+=">"),r},Wo=function(c,r,e){c&&c.defaultView&&(r!==c.defaultView.pageXOffset||e!==c.defaultView.pageYOffset)&&c.defaultView.scrollTo(r,e)},qa=function(c){var r=c[0],e=c[1],t=c[2];r.scrollLeft=e,r.scrollTop=t},bu=":before",WA=":after",zo="___html2canvas___pseudoelement_before",jo="___html2canvas___pseudoelement_after",eo=`{
content: "" !important;
display: none !important;
}`,xu=function(c){Yo(c,"."+zo+bu+eo+`
.`+jo+WA+eo)},Yo=function(c,r){var e=c.ownerDocument;if(e){var t=e.createElement("style");t.textContent=r,c.appendChild(t)}},zA=function(){function c(){}return c.getOrigin=function(r){var e=c._link;return e?(e.href=r,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},c.isSameOrigin=function(r){return c.getOrigin(r)===c._origin},c.setContext=function(r){c._link=r.document.createElement("a"),c._origin=c.getOrigin(r.location.href)},c._origin="about:blank",c}(),Su=function(){function c(r,e){this.context=r,this._options=e,this._cache={}}return c.prototype.addImage=function(r){var e=Promise.resolve();return this.has(r)||(ba(r)||Tu(r))&&(this._cache[r]=this.loadImage(r)).catch(function(){}),e},c.prototype.match=function(r){return this._cache[r]},c.prototype.loadImage=function(r){return me(this,void 0,void 0,function(){var e,t,n,i,s=this;return be(this,function(a){switch(a.label){case 0:return e=zA.isSameOrigin(r),t=!to(r)&&this._options.useCORS===!0&&Ci.SUPPORT_CORS_IMAGES&&!e,n=!to(r)&&!e&&!ba(r)&&typeof this._options.proxy=="string"&&Ci.SUPPORT_CORS_XHR&&!t,!e&&this._options.allowTaint===!1&&!to(r)&&!ba(r)&&!n&&!t?[2]:(i=r,n?[4,this.proxy(i)]:[3,2]);case 1:i=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+r.substring(0,256)),[4,new Promise(function(o,u){var l=new Image;l.onload=function(){return o(l)},l.onerror=u,(Iu(i)||t)&&(l.crossOrigin="anonymous"),l.src=i,l.complete===!0&&setTimeout(function(){return o(l)},500),s._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},c.prototype.has=function(r){return typeof this._cache[r]!="undefined"},c.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},c.prototype.proxy=function(r){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var n=r.substring(0,256);return new Promise(function(i,s){var a=Ci.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(o.status===200)if(a==="text")i(o.response);else{var f=new FileReader;f.addEventListener("load",function(){return i(f.result)},!1),f.addEventListener("error",function(h){return s(h)},!1),f.readAsDataURL(o.response)}else s("Failed to proxy resource "+n+" with status code "+o.status)},o.onerror=s;var u=t.indexOf("?")>-1?"&":"?";if(o.open("GET",""+t+u+"url="+encodeURIComponent(r)+"&responseType="+a),a!=="text"&&o instanceof XMLHttpRequest&&(o.responseType=a),e._options.imageTimeout){var l=e._options.imageTimeout;o.timeout=l,o.ontimeout=function(){return s("Timed out ("+l+"ms) proxying "+n)}}o.send()})},c}(),Xo=/^data:image\/svg\+xml/i,jA=/^data:image\/.*;base64,/i,YA=/^data:image\/.*/i,Tu=function(c){return Ci.SUPPORT_SVG_DRAWING||!XA(c)},to=function(c){return YA.test(c)},Iu=function(c){return jA.test(c)},ba=function(c){return c.substr(0,4)==="blob"},XA=function(c){return c.substr(-3).toLowerCase()==="svg"||Xo.test(c)},ir=function(){function c(r,e){this.type=0,this.x=r,this.y=e}return c.prototype.add=function(r,e){return new c(this.x+r,this.y+e)},c}(),sa=function(c,r,e){return new ir(c.x+(r.x-c.x)*e,c.y+(r.y-c.y)*e)},aa=function(){function c(r,e,t,n){this.type=1,this.start=r,this.startControl=e,this.endControl=t,this.end=n}return c.prototype.subdivide=function(r,e){var t=sa(this.start,this.startControl,r),n=sa(this.startControl,this.endControl,r),i=sa(this.endControl,this.end,r),s=sa(t,n,r),a=sa(n,i,r),o=sa(s,a,r);return e?new c(this.start,t,s,o):new c(o,a,i,this.end)},c.prototype.add=function(r,e){return new c(this.start.add(r,e),this.startControl.add(r,e),this.endControl.add(r,e),this.end.add(r,e))},c.prototype.reverse=function(){return new c(this.end,this.endControl,this.startControl,this.start)},c}(),Qi=function(c){return c.type===1},Jo=function(){function c(r){var e=r.styles,t=r.bounds,n=hi(e.borderTopLeftRadius,t.width,t.height),i=n[0],s=n[1],a=hi(e.borderTopRightRadius,t.width,t.height),o=a[0],u=a[1],l=hi(e.borderBottomRightRadius,t.width,t.height),f=l[0],h=l[1],E=hi(e.borderBottomLeftRadius,t.width,t.height),C=E[0],T=E[1],J=[];J.push((i+o)/t.width),J.push((C+f)/t.width),J.push((s+T)/t.height),J.push((u+h)/t.height);var $=Math.max.apply(Math,J);$>1&&(i/=$,s/=$,o/=$,u/=$,f/=$,h/=$,C/=$,T/=$);var _e=t.width-o,Oe=t.height-h,De=t.width-f,rt=t.height-T,We=e.borderTopWidth,Lt=e.borderRightWidth,dt=e.borderBottomWidth,_t=e.borderLeftWidth,jt=Mr(e.paddingTop,r.bounds.width),xt=Mr(e.paddingRight,r.bounds.width),xn=Mr(e.paddingBottom,r.bounds.width),bn=Mr(e.paddingLeft,r.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?li(t.left+_t/3,t.top+We/3,i-_t/3,s-We/3,ei.TOP_LEFT):new ir(t.left+_t/3,t.top+We/3),this.topRightBorderDoubleOuterBox=i>0||s>0?li(t.left+_e,t.top+We/3,o-Lt/3,u-We/3,ei.TOP_RIGHT):new ir(t.left+t.width-Lt/3,t.top+We/3),this.bottomRightBorderDoubleOuterBox=f>0||h>0?li(t.left+De,t.top+Oe,f-Lt/3,h-dt/3,ei.BOTTOM_RIGHT):new ir(t.left+t.width-Lt/3,t.top+t.height-dt/3),this.bottomLeftBorderDoubleOuterBox=C>0||T>0?li(t.left+_t/3,t.top+rt,C-_t/3,T-dt/3,ei.BOTTOM_LEFT):new ir(t.left+_t/3,t.top+t.height-dt/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?li(t.left+_t*2/3,t.top+We*2/3,i-_t*2/3,s-We*2/3,ei.TOP_LEFT):new ir(t.left+_t*2/3,t.top+We*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?li(t.left+_e,t.top+We*2/3,o-Lt*2/3,u-We*2/3,ei.TOP_RIGHT):new ir(t.left+t.width-Lt*2/3,t.top+We*2/3),this.bottomRightBorderDoubleInnerBox=f>0||h>0?li(t.left+De,t.top+Oe,f-Lt*2/3,h-dt*2/3,ei.BOTTOM_RIGHT):new ir(t.left+t.width-Lt*2/3,t.top+t.height-dt*2/3),this.bottomLeftBorderDoubleInnerBox=C>0||T>0?li(t.left+_t*2/3,t.top+rt,C-_t*2/3,T-dt*2/3,ei.BOTTOM_LEFT):new ir(t.left+_t*2/3,t.top+t.height-dt*2/3),this.topLeftBorderStroke=i>0||s>0?li(t.left+_t/2,t.top+We/2,i-_t/2,s-We/2,ei.TOP_LEFT):new ir(t.left+_t/2,t.top+We/2),this.topRightBorderStroke=i>0||s>0?li(t.left+_e,t.top+We/2,o-Lt/2,u-We/2,ei.TOP_RIGHT):new ir(t.left+t.width-Lt/2,t.top+We/2),this.bottomRightBorderStroke=f>0||h>0?li(t.left+De,t.top+Oe,f-Lt/2,h-dt/2,ei.BOTTOM_RIGHT):new ir(t.left+t.width-Lt/2,t.top+t.height-dt/2),this.bottomLeftBorderStroke=C>0||T>0?li(t.left+_t/2,t.top+rt,C-_t/2,T-dt/2,ei.BOTTOM_LEFT):new ir(t.left+_t/2,t.top+t.height-dt/2),this.topLeftBorderBox=i>0||s>0?li(t.left,t.top,i,s,ei.TOP_LEFT):new ir(t.left,t.top),this.topRightBorderBox=o>0||u>0?li(t.left+_e,t.top,o,u,ei.TOP_RIGHT):new ir(t.left+t.width,t.top),this.bottomRightBorderBox=f>0||h>0?li(t.left+De,t.top+Oe,f,h,ei.BOTTOM_RIGHT):new ir(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=C>0||T>0?li(t.left,t.top+rt,C,T,ei.BOTTOM_LEFT):new ir(t.left,t.top+t.height),this.topLeftPaddingBox=i>0||s>0?li(t.left+_t,t.top+We,Math.max(0,i-_t),Math.max(0,s-We),ei.TOP_LEFT):new ir(t.left+_t,t.top+We),this.topRightPaddingBox=o>0||u>0?li(t.left+Math.min(_e,t.width-Lt),t.top+We,_e>t.width+Lt?0:Math.max(0,o-Lt),Math.max(0,u-We),ei.TOP_RIGHT):new ir(t.left+t.width-Lt,t.top+We),this.bottomRightPaddingBox=f>0||h>0?li(t.left+Math.min(De,t.width-_t),t.top+Math.min(Oe,t.height-dt),Math.max(0,f-Lt),Math.max(0,h-dt),ei.BOTTOM_RIGHT):new ir(t.left+t.width-Lt,t.top+t.height-dt),this.bottomLeftPaddingBox=C>0||T>0?li(t.left+_t,t.top+Math.min(rt,t.height-dt),Math.max(0,C-_t),Math.max(0,T-dt),ei.BOTTOM_LEFT):new ir(t.left+_t,t.top+t.height-dt),this.topLeftContentBox=i>0||s>0?li(t.left+_t+bn,t.top+We+jt,Math.max(0,i-(_t+bn)),Math.max(0,s-(We+jt)),ei.TOP_LEFT):new ir(t.left+_t+bn,t.top+We+jt),this.topRightContentBox=o>0||u>0?li(t.left+Math.min(_e,t.width+_t+bn),t.top+We+jt,_e>t.width+_t+bn?0:o-_t+bn,u-(We+jt),ei.TOP_RIGHT):new ir(t.left+t.width-(Lt+xt),t.top+We+jt),this.bottomRightContentBox=f>0||h>0?li(t.left+Math.min(De,t.width-(_t+bn)),t.top+Math.min(Oe,t.height+We+jt),Math.max(0,f-(Lt+xt)),h-(dt+xn),ei.BOTTOM_RIGHT):new ir(t.left+t.width-(Lt+xt),t.top+t.height-(dt+xn)),this.bottomLeftContentBox=C>0||T>0?li(t.left+_t+bn,t.top+rt,Math.max(0,C-(_t+bn)),T-(dt+xn),ei.BOTTOM_LEFT):new ir(t.left+_t+bn,t.top+t.height-(dt+xn))}return c}(),ei;(function(c){c[c.TOP_LEFT=0]="TOP_LEFT",c[c.TOP_RIGHT=1]="TOP_RIGHT",c[c.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",c[c.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(ei||(ei={}));var li=function(c,r,e,t,n){var i=4*((Math.sqrt(2)-1)/3),s=e*i,a=t*i,o=c+e,u=r+t;switch(n){case ei.TOP_LEFT:return new aa(new ir(c,u),new ir(c,u-a),new ir(o-s,r),new ir(o,r));case ei.TOP_RIGHT:return new aa(new ir(c,r),new ir(c+s,r),new ir(o,u-a),new ir(o,u));case ei.BOTTOM_RIGHT:return new aa(new ir(o,r),new ir(o,r+a),new ir(c+s,u),new ir(c,u));case ei.BOTTOM_LEFT:default:return new aa(new ir(o,u),new ir(o-s,u),new ir(c,r+a),new ir(c,r))}},Zs=function(c){return[c.topLeftBorderBox,c.topRightBorderBox,c.bottomRightBorderBox,c.bottomLeftBorderBox]},Fu=function(c){return[c.topLeftContentBox,c.topRightContentBox,c.bottomRightContentBox,c.bottomLeftContentBox]},xa=function(c){return[c.topLeftPaddingBox,c.topRightPaddingBox,c.bottomRightPaddingBox,c.bottomLeftPaddingBox]},JA=function(){function c(r,e,t){this.offsetX=r,this.offsetY=e,this.matrix=t,this.type=0,this.target=6}return c}(),no=function(){function c(r,e){this.path=r,this.target=e,this.type=1}return c}(),qA=function(){function c(r){this.opacity=r,this.type=2,this.target=6}return c}(),Du=function(c){return c.type===0},el=function(c){return c.type===1},Ru=function(c){return c.type===2},tl=function(c,r){return c.length===r.length?c.some(function(e,t){return e===r[t]}):!1},nl=function(c,r,e,t,n){return c.map(function(i,s){switch(s){case 0:return i.add(r,e);case 1:return i.add(r+t,e);case 2:return i.add(r+t,e+n);case 3:return i.add(r,e+n)}return i})},rl=function(){function c(r){this.element=r,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return c}(),il=function(){function c(r,e){if(this.container=r,this.parent=e,this.effects=[],this.curves=new Jo(this.container),this.container.styles.opacity<1&&this.effects.push(new qA(this.container.styles.opacity)),this.container.styles.transform!==null){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new JA(t,n,i))}if(this.container.styles.overflowX!==0){var s=Zs(this.curves),a=xa(this.curves);tl(s,a)?this.effects.push(new no(s,6)):(this.effects.push(new no(s,2)),this.effects.push(new no(a,4)))}}return c.prototype.getEffects=function(r){for(var e=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,n=this.effects.slice(0);t;){var i=t.effects.filter(function(o){return!el(o)});if(e||t.container.styles.position!==0||!t.parent){if(n.unshift.apply(n,i),e=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var s=Zs(t.curves),a=xa(t.curves);tl(s,a)||n.unshift(new no(a,6))}}else n.unshift.apply(n,i);t=t.parent}return n.filter(function(o){return vi(o.target,r)})},c}(),qo=function(c,r,e,t){c.container.elements.forEach(function(n){var i=vi(n.flags,4),s=vi(n.flags,2),a=new il(n,c);vi(n.styles.display,2048)&&t.push(a);var o=vi(n.flags,8)?[]:t;if(i||s){var u=i||n.styles.isPositioned()?e:r,l=new rl(a);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var f=n.styles.zIndex.order;if(f<0){var h=0;u.negativeZIndex.some(function(C,T){return f>C.element.container.styles.zIndex.order?(h=T,!1):h>0}),u.negativeZIndex.splice(h,0,l)}else if(f>0){var E=0;u.positiveZIndex.some(function(C,T){return f>=C.element.container.styles.zIndex.order?(E=T+1,!1):E>0}),u.positiveZIndex.splice(E,0,l)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(l)}else n.styles.isFloating()?u.nonPositionedFloats.push(l):u.nonPositionedInlineLevel.push(l);qo(a,l,i?l:e,o)}else n.styles.isInlineLevel()?r.inlineLevel.push(a):r.nonInlineLevel.push(a),qo(a,r,e,o);vi(n.flags,8)&&sl(n,o)})},sl=function(c,r){for(var e=c instanceof Ro?c.start:1,t=c instanceof Ro?c.reversed:!1,n=0;n<r.length;n++){var i=r[n];i.container instanceof Do&&typeof i.container.value=="number"&&i.container.value!==0&&(e=i.container.value),i.listValue=$s(e,i.container.styles.listStyleType,!0),e+=t?-1:1}},Lu=function(c){var r=new il(c,null),e=new rl(r),t=[];return qo(r,e,e,t),sl(r.container,t),e},al=function(c,r){switch(r){case 0:return Wi(c.topLeftBorderBox,c.topLeftPaddingBox,c.topRightBorderBox,c.topRightPaddingBox);case 1:return Wi(c.topRightBorderBox,c.topRightPaddingBox,c.bottomRightBorderBox,c.bottomRightPaddingBox);case 2:return Wi(c.bottomRightBorderBox,c.bottomRightPaddingBox,c.bottomLeftBorderBox,c.bottomLeftPaddingBox);case 3:default:return Wi(c.bottomLeftBorderBox,c.bottomLeftPaddingBox,c.topLeftBorderBox,c.topLeftPaddingBox)}},ol=function(c,r){switch(r){case 0:return Wi(c.topLeftBorderBox,c.topLeftBorderDoubleOuterBox,c.topRightBorderBox,c.topRightBorderDoubleOuterBox);case 1:return Wi(c.topRightBorderBox,c.topRightBorderDoubleOuterBox,c.bottomRightBorderBox,c.bottomRightBorderDoubleOuterBox);case 2:return Wi(c.bottomRightBorderBox,c.bottomRightBorderDoubleOuterBox,c.bottomLeftBorderBox,c.bottomLeftBorderDoubleOuterBox);case 3:default:return Wi(c.bottomLeftBorderBox,c.bottomLeftBorderDoubleOuterBox,c.topLeftBorderBox,c.topLeftBorderDoubleOuterBox)}},Uu=function(c,r){switch(r){case 0:return Wi(c.topLeftBorderDoubleInnerBox,c.topLeftPaddingBox,c.topRightBorderDoubleInnerBox,c.topRightPaddingBox);case 1:return Wi(c.topRightBorderDoubleInnerBox,c.topRightPaddingBox,c.bottomRightBorderDoubleInnerBox,c.bottomRightPaddingBox);case 2:return Wi(c.bottomRightBorderDoubleInnerBox,c.bottomRightPaddingBox,c.bottomLeftBorderDoubleInnerBox,c.bottomLeftPaddingBox);case 3:default:return Wi(c.bottomLeftBorderDoubleInnerBox,c.bottomLeftPaddingBox,c.topLeftBorderDoubleInnerBox,c.topLeftPaddingBox)}},ku=function(c,r){switch(r){case 0:return ro(c.topLeftBorderStroke,c.topRightBorderStroke);case 1:return ro(c.topRightBorderStroke,c.bottomRightBorderStroke);case 2:return ro(c.bottomRightBorderStroke,c.bottomLeftBorderStroke);case 3:default:return ro(c.bottomLeftBorderStroke,c.topLeftBorderStroke)}},ro=function(c,r){var e=[];return Qi(c)?e.push(c.subdivide(.5,!1)):e.push(c),Qi(r)?e.push(r.subdivide(.5,!0)):e.push(r),e},Wi=function(c,r,e,t){var n=[];return Qi(c)?n.push(c.subdivide(.5,!1)):n.push(c),Qi(e)?n.push(e.subdivide(.5,!0)):n.push(e),Qi(t)?n.push(t.subdivide(.5,!0).reverse()):n.push(t),Qi(r)?n.push(r.subdivide(.5,!1).reverse()):n.push(r),n},io=function(c){var r=c.bounds,e=c.styles;return r.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},so=function(c){var r=c.styles,e=c.bounds,t=Mr(r.paddingLeft,e.width),n=Mr(r.paddingRight,e.width),i=Mr(r.paddingTop,e.width),s=Mr(r.paddingBottom,e.width);return e.add(t+r.borderLeftWidth,i+r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth+t+n),-(r.borderTopWidth+r.borderBottomWidth+i+s))},ao=function(c,r){return c===0?r.bounds:c===2?so(r):io(r)},Pu=function(c,r){return c===0?r.bounds:c===2?so(r):io(r)},eA=function(c,r,e){var t=ao(Vs(c.styles.backgroundOrigin,r),c),n=Pu(Vs(c.styles.backgroundClip,r),c),i=Al(Vs(c.styles.backgroundSize,r),e,t),s=i[0],a=i[1],o=hi(Vs(c.styles.backgroundPosition,r),t.width-s,t.height-a),u=Ou(Vs(c.styles.backgroundRepeat,r),o,i,t,n),l=Math.round(t.left+o[0]),f=Math.round(t.top+o[1]);return[u,l,f,s,a]},oa=function(c){return hn(c)&&c.value===Gi.AUTO},oo=function(c){return typeof c=="number"},Al=function(c,r,e){var t=r[0],n=r[1],i=r[2],s=c[0],a=c[1];if(!s)return[0,0];if(Or(s)&&a&&Or(a))return[Mr(s,e.width),Mr(a,e.height)];var o=oo(i);if(hn(s)&&(s.value===Gi.CONTAIN||s.value===Gi.COVER)){if(oo(i)){var u=e.width/e.height;return u<i!=(s.value===Gi.COVER)?[e.width,e.width/i]:[e.height*i,e.height]}return[e.width,e.height]}var l=oo(t),f=oo(n),h=l||f;if(oa(s)&&(!a||oa(a))){if(l&&f)return[t,n];if(!o&&!h)return[e.width,e.height];if(h&&o){var E=l?t:n*i,C=f?n:t/i;return[E,C]}var T=l?t:e.width,J=f?n:e.height;return[T,J]}if(o){var $=0,_e=0;return Or(s)?$=Mr(s,e.width):Or(a)&&(_e=Mr(a,e.height)),oa(s)?$=_e*i:(!a||oa(a))&&(_e=$/i),[$,_e]}var Oe=null,De=null;if(Or(s)?Oe=Mr(s,e.width):a&&Or(a)&&(De=Mr(a,e.height)),Oe!==null&&(!a||oa(a))&&(De=l&&f?Oe/t*n:e.height),De!==null&&oa(s)&&(Oe=l&&f?De/n*t:e.width),Oe!==null&&De!==null)return[Oe,De];throw new Error("Unable to calculate background-size for element")},Vs=function(c,r){var e=c[r];return typeof e=="undefined"?c[0]:e},Ou=function(c,r,e,t,n){var i=r[0],s=r[1],a=e[0],o=e[1];switch(c){case 2:return[new ir(Math.round(t.left),Math.round(t.top+s)),new ir(Math.round(t.left+t.width),Math.round(t.top+s)),new ir(Math.round(t.left+t.width),Math.round(o+t.top+s)),new ir(Math.round(t.left),Math.round(o+t.top+s))];case 3:return[new ir(Math.round(t.left+i),Math.round(t.top)),new ir(Math.round(t.left+i+a),Math.round(t.top)),new ir(Math.round(t.left+i+a),Math.round(t.height+t.top)),new ir(Math.round(t.left+i),Math.round(t.height+t.top))];case 1:return[new ir(Math.round(t.left+i),Math.round(t.top+s)),new ir(Math.round(t.left+i+a),Math.round(t.top+s)),new ir(Math.round(t.left+i+a),Math.round(t.top+s+o)),new ir(Math.round(t.left+i),Math.round(t.top+s+o))];default:return[new ir(Math.round(n.left),Math.round(n.top)),new ir(Math.round(n.left+n.width),Math.round(n.top)),new ir(Math.round(n.left+n.width),Math.round(n.height+n.top)),new ir(Math.round(n.left),Math.round(n.height+n.top))]}},tA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",nA="Hidden Text",Ao=function(){function c(r){this._data={},this._document=r}return c.prototype.parseMetrics=function(r,e){var t=this._document.createElement("div"),n=this._document.createElement("img"),i=this._document.createElement("span"),s=this._document.body;t.style.visibility="hidden",t.style.fontFamily=r,t.style.fontSize=e,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",s.appendChild(t),n.src=tA,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",i.style.fontFamily=r,i.style.fontSize=e,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(nA)),t.appendChild(i),t.appendChild(n);var a=n.offsetTop-i.offsetTop+2;t.removeChild(i),t.appendChild(this._document.createTextNode(nA)),t.style.lineHeight="normal",n.style.verticalAlign="super";var o=n.offsetTop-t.offsetTop+2;return s.removeChild(t),{baseline:a,middle:o}},c.prototype.getMetrics=function(r,e){var t=r+" "+e;return typeof this._data[t]=="undefined"&&(this._data[t]=this.parseMetrics(r,e)),this._data[t]},c}(),ll=function(){function c(r,e){this.context=r,this.options=e}return c}(),Qu=1e4,Mu=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this;return n._activeEffects=[],n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),t.canvas||(n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px"),n.fontMetrics=new Ao(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),n}return r.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(n){return t.applyEffect(n)})},r.prototype.applyEffect=function(e){this.ctx.save(),Ru(e)&&(this.ctx.globalAlpha=e.opacity),Du(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),el(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},r.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},r.prototype.renderStack=function(e){return me(this,void 0,void 0,function(){var t;return be(this,function(n){switch(n.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},r.prototype.renderNode=function(e){return me(this,void 0,void 0,function(){return be(this,function(t){switch(t.label){case 0:if(vi(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},r.prototype.renderTextWithLetterSpacing=function(e,t,n){var i=this;if(t===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n);else{var s=Ea(e.text);s.reduce(function(a,o){return i.ctx.fillText(o,a,e.bounds.top+n),a+i.ctx.measureText(o).width},e.bounds.left)}},r.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),n=Hu(e.fontFamily).join(", "),i=$r(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,i,n].join(" "),n,i]},r.prototype.renderTextNode=function(e,t){return me(this,void 0,void 0,function(){var n,i,s,a,o,u,l,f,h=this;return be(this,function(E){return n=this.createFontStyle(t),i=n[0],s=n[1],a=n[2],this.ctx.font=i,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(s,a),u=o.baseline,l=o.middle,f=t.paintOrder,e.textBounds.forEach(function(C){f.forEach(function(T){switch(T){case 0:h.ctx.fillStyle=oi(t.color),h.renderTextWithLetterSpacing(C,t.letterSpacing,u);var J=t.textShadow;J.length&&C.text.trim().length&&(J.slice(0).reverse().forEach(function($){h.ctx.shadowColor=oi($.color),h.ctx.shadowOffsetX=$.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=$.offsetY.number*h.options.scale,h.ctx.shadowBlur=$.blur.number,h.renderTextWithLetterSpacing(C,t.letterSpacing,u)}),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),t.textDecorationLine.length&&(h.ctx.fillStyle=oi(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function($){switch($){case 1:h.ctx.fillRect(C.bounds.left,Math.round(C.bounds.top+u),C.bounds.width,1);break;case 2:h.ctx.fillRect(C.bounds.left,Math.round(C.bounds.top),C.bounds.width,1);break;case 3:h.ctx.fillRect(C.bounds.left,Math.ceil(C.bounds.top+l),C.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&C.text.trim().length&&(h.ctx.strokeStyle=oi(t.webkitTextStrokeColor),h.ctx.lineWidth=t.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(C.text,C.bounds.left,C.bounds.top+u)),h.ctx.strokeStyle="",h.ctx.lineWidth=0,h.ctx.lineJoin="miter";break}})}),[2]})})},r.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=so(e),s=xa(t);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},r.prototype.renderNodeContent=function(e){return me(this,void 0,void 0,function(){var t,n,i,s,a,o,_e,_e,u,l,f,h,De,E,C,rt,T,J,$,_e,Oe,De,rt;return be(this,function(We){switch(We.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,n=e.curves,i=t.styles,s=0,a=t.textNodes,We.label=1;case 1:return s<a.length?(o=a[s],[4,this.renderTextNode(o,i)]):[3,4];case 2:We.sent(),We.label=3;case 3:return s++,[3,1];case 4:if(!(t instanceof wa))return[3,8];We.label=5;case 5:return We.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return _e=We.sent(),this.renderReplacedElement(t,n,_e),[3,8];case 7:return We.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof PA&&this.renderReplacedElement(t,n,t.canvas),!(t instanceof OA))return[3,12];We.label=9;case 9:return We.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return _e=We.sent(),this.renderReplacedElement(t,n,_e),[3,12];case 11:return We.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof Oi&&t.tree?(u=new r(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,u.render(t.tree)]):[3,14];case 13:l=We.sent(),t.width&&t.height&&this.ctx.drawImage(l,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),We.label=14;case 14:if(t instanceof Wa&&(f=Math.min(t.bounds.width,t.bounds.height),t.type===Za?t.checked&&(this.ctx.save(),this.path([new ir(t.bounds.left+f*.39363,t.bounds.top+f*.79),new ir(t.bounds.left+f*.16,t.bounds.top+f*.5549),new ir(t.bounds.left+f*.27347,t.bounds.top+f*.44071),new ir(t.bounds.left+f*.39694,t.bounds.top+f*.5649),new ir(t.bounds.left+f*.72983,t.bounds.top+f*.23),new ir(t.bounds.left+f*.84,t.bounds.top+f*.34085),new ir(t.bounds.left+f*.39363,t.bounds.top+f*.79)]),this.ctx.fillStyle=oi(MA),this.ctx.fill(),this.ctx.restore()):t.type===Va&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+f/2,t.bounds.top+f/2,f/4,0,Math.PI*2,!0),this.ctx.fillStyle=oi(MA),this.ctx.fill(),this.ctx.restore())),Nu(t)&&t.value.length){switch(h=this.createFontStyle(i),De=h[0],E=h[1],C=this.fontMetrics.getMetrics(De,E).baseline,this.ctx.font=De,this.ctx.fillStyle=oi(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=cl(t.styles.textAlign),rt=so(t),T=0,t.styles.textAlign){case 1:T+=rt.width/2;break;case 2:T+=rt.width;break}J=rt.add(T,0,0,-rt.height/2+1),this.ctx.save(),this.path([new ir(rt.left,rt.top),new ir(rt.left+rt.width,rt.top),new ir(rt.left+rt.width,rt.top+rt.height),new ir(rt.left,rt.top+rt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new na(t.value,J),i.letterSpacing,C),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!vi(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if($=t.styles.listStyleImage,$.type!==0)return[3,18];_e=void 0,Oe=$.url,We.label=15;case 15:return We.trys.push([15,17,,18]),[4,this.context.cache.match(Oe)];case 16:return _e=We.sent(),this.ctx.drawImage(_e,t.bounds.left-(_e.width+10),t.bounds.top),[3,18];case 17:return We.sent(),this.context.logger.error("Error loading list-style-image "+Oe),[3,18];case 18:return[3,20];case 19:e.listValue&&t.styles.listStyleType!==-1&&(De=this.createFontStyle(i)[0],this.ctx.font=De,this.ctx.fillStyle=oi(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",rt=new W(t.bounds.left,t.bounds.top+Mr(t.styles.paddingTop,t.bounds.width),t.bounds.width,fo(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new na(e.listValue,rt),i.letterSpacing,fo(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),We.label=20;case 20:return[2]}})})},r.prototype.renderStackContent=function(e){return me(this,void 0,void 0,function(){var t,n,$,i,s,$,a,o,$,u,l,$,f,h,$,E,C,$,T,J,$;return be(this,function(_e){switch(_e.label){case 0:if(vi(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:_e.sent(),t=0,n=e.negativeZIndex,_e.label=2;case 2:return t<n.length?($=n[t],[4,this.renderStack($)]):[3,5];case 3:_e.sent(),_e.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:_e.sent(),i=0,s=e.nonInlineLevel,_e.label=7;case 7:return i<s.length?($=s[i],[4,this.renderNode($)]):[3,10];case 8:_e.sent(),_e.label=9;case 9:return i++,[3,7];case 10:a=0,o=e.nonPositionedFloats,_e.label=11;case 11:return a<o.length?($=o[a],[4,this.renderStack($)]):[3,14];case 12:_e.sent(),_e.label=13;case 13:return a++,[3,11];case 14:u=0,l=e.nonPositionedInlineLevel,_e.label=15;case 15:return u<l.length?($=l[u],[4,this.renderStack($)]):[3,18];case 16:_e.sent(),_e.label=17;case 17:return u++,[3,15];case 18:f=0,h=e.inlineLevel,_e.label=19;case 19:return f<h.length?($=h[f],[4,this.renderNode($)]):[3,22];case 20:_e.sent(),_e.label=21;case 21:return f++,[3,19];case 22:E=0,C=e.zeroOrAutoZIndexOrTransformedOrOpacity,_e.label=23;case 23:return E<C.length?($=C[E],[4,this.renderStack($)]):[3,26];case 24:_e.sent(),_e.label=25;case 25:return E++,[3,23];case 26:T=0,J=e.positiveZIndex,_e.label=27;case 27:return T<J.length?($=J[T],[4,this.renderStack($)]):[3,30];case 28:_e.sent(),_e.label=29;case 29:return T++,[3,27];case 30:return[2]}})})},r.prototype.mask=function(e){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(e.slice(0).reverse()),this.ctx.closePath()},r.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},r.prototype.formatPath=function(e){var t=this;e.forEach(function(n,i){var s=Qi(n)?n.start:n;i===0?t.ctx.moveTo(s.x,s.y):t.ctx.lineTo(s.x,s.y),Qi(n)&&t.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},r.prototype.renderRepeat=function(e,t,n,i){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,i),this.ctx.fill(),this.ctx.translate(-n,-i)},r.prototype.resizeImage=function(e,t,n){var i;if(e.width===t&&e.height===n)return e;var s=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,a=s.createElement("canvas");a.width=Math.max(1,t),a.height=Math.max(1,n);var o=a.getContext("2d");return o.drawImage(e,0,0,e.width,e.height,0,0,t,n),a},r.prototype.renderBackgroundImage=function(e){return me(this,void 0,void 0,function(){var t,n,i,s,a,o;return be(this,function(u){switch(u.label){case 0:t=e.styles.backgroundImage.length-1,n=function(l){var f,h,E,jt,ar,Xn,bn,wr,dt,C,jt,ar,Xn,bn,wr,T,J,$,_e,Oe,De,rt,We,Lt,dt,_t,jt,xt,xn,bn,wr,mr,ar,Xn,dr,Ar,Tn,Qn,Br,yr,Tr,Lr;return be(this,function(Hr){switch(Hr.label){case 0:if(l.type!==0)return[3,5];f=void 0,h=l.url,Hr.label=1;case 1:return Hr.trys.push([1,3,,4]),[4,i.context.cache.match(h)];case 2:return f=Hr.sent(),[3,4];case 3:return Hr.sent(),i.context.logger.error("Error loading background-image "+h),[3,4];case 4:return f&&(E=eA(e,t,[f.width,f.height,f.width/f.height]),jt=E[0],ar=E[1],Xn=E[2],bn=E[3],wr=E[4],dt=i.ctx.createPattern(i.resizeImage(f,bn,wr),"repeat"),i.renderRepeat(jt,dt,ar,Xn)),[3,6];case 5:fs(l)?(C=eA(e,t,[null,null,null]),jt=C[0],ar=C[1],Xn=C[2],bn=C[3],wr=C[4],T=qi(l.angle,bn,wr),J=T[0],$=T[1],_e=T[2],Oe=T[3],De=T[4],rt=document.createElement("canvas"),rt.width=bn,rt.height=wr,We=rt.getContext("2d"),Lt=We.createLinearGradient($,Oe,_e,De),Fi(l.stops,J).forEach(function(Xr){return Lt.addColorStop(Xr.stop,oi(Xr.color))}),We.fillStyle=Lt,We.fillRect(0,0,bn,wr),bn>0&&wr>0&&(dt=i.ctx.createPattern(rt,"repeat"),i.renderRepeat(jt,dt,ar,Xn))):ss(l)&&(_t=eA(e,t,[null,null,null]),jt=_t[0],xt=_t[1],xn=_t[2],bn=_t[3],wr=_t[4],mr=l.position.length===0?[Ni]:l.position,ar=Mr(mr[0],bn),Xn=Mr(mr[mr.length-1],wr),dr=ws(l,ar,Xn,bn,wr),Ar=dr[0],Tn=dr[1],Ar>0&&Tn>0&&(Qn=i.ctx.createRadialGradient(xt+ar,xn+Xn,0,xt+ar,xn+Xn,Ar),Fi(l.stops,Ar*2).forEach(function(Xr){return Qn.addColorStop(Xr.stop,oi(Xr.color))}),i.path(jt),i.ctx.fillStyle=Qn,Ar!==Tn?(Br=e.bounds.left+.5*e.bounds.width,yr=e.bounds.top+.5*e.bounds.height,Tr=Tn/Ar,Lr=1/Tr,i.ctx.save(),i.ctx.translate(Br,yr),i.ctx.transform(1,0,0,Tr,0,0),i.ctx.translate(-Br,-yr),i.ctx.fillRect(xt,Lr*(xn-yr)+yr,bn,wr*Lr),i.ctx.restore()):i.ctx.fill())),Hr.label=6;case 6:return t--,[2]}})},i=this,s=0,a=e.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return s<a.length?(o=a[s],[5,n(o)]):[3,4];case 2:u.sent(),u.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},r.prototype.renderSolidBorder=function(e,t,n){return me(this,void 0,void 0,function(){return be(this,function(i){return this.path(al(n,t)),this.ctx.fillStyle=oi(e),this.ctx.fill(),[2]})})},r.prototype.renderDoubleBorder=function(e,t,n,i){return me(this,void 0,void 0,function(){var s,a;return be(this,function(o){switch(o.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,i)]:[3,2];case 1:return o.sent(),[2];case 2:return s=ol(i,n),this.path(s),this.ctx.fillStyle=oi(e),this.ctx.fill(),a=Uu(i,n),this.path(a),this.ctx.fill(),[2]}})})},r.prototype.renderNodeBackgroundAndBorders=function(e){return me(this,void 0,void 0,function(){var t,n,i,s,a,o,u,l,f=this;return be(this,function(h){switch(h.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!ui(t.backgroundColor)||t.backgroundImage.length,i=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],s=ul(Vs(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),ui(t.backgroundColor)||(this.ctx.fillStyle=oi(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:h.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(E){f.ctx.save();var C=Zs(e.curves),T=E.inset?0:Qu,J=nl(C,-T+(E.inset?1:-1)*E.spread.number,(E.inset?1:-1)*E.spread.number,E.spread.number*(E.inset?-2:2),E.spread.number*(E.inset?-2:2));E.inset?(f.path(C),f.ctx.clip(),f.mask(J)):(f.mask(C),f.ctx.clip(),f.path(J)),f.ctx.shadowOffsetX=E.offsetX.number+T,f.ctx.shadowOffsetY=E.offsetY.number,f.ctx.shadowColor=oi(E.color),f.ctx.shadowBlur=E.blur.number,f.ctx.fillStyle=E.inset?oi(E.color):"rgba(0,0,0,1)",f.ctx.fill(),f.ctx.restore()}),h.label=2;case 2:a=0,o=0,u=i,h.label=3;case 3:return o<u.length?(l=u[o],l.style!==0&&!ui(l.color)&&l.width>0?l.style!==2?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,a,e.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,a,e.curves,3)];case 6:return h.sent(),[3,11];case 7:return l.style!==4?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,a,e.curves)];case 8:return h.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,a,e.curves)];case 10:h.sent(),h.label=11;case 11:a++,h.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},r.prototype.renderDashedDottedBorder=function(e,t,n,i,s){return me(this,void 0,void 0,function(){var a,o,u,l,f,h,E,C,T,J,$,_e,Oe,De,rt,We,rt,We;return be(this,function(Lt){return this.ctx.save(),a=ku(i,n),o=al(i,n),s===2&&(this.path(o),this.ctx.clip()),Qi(o[0])?(u=o[0].start.x,l=o[0].start.y):(u=o[0].x,l=o[0].y),Qi(o[1])?(f=o[1].end.x,h=o[1].end.y):(f=o[1].x,h=o[1].y),n===0||n===2?E=Math.abs(u-f):E=Math.abs(l-h),this.ctx.beginPath(),s===3?this.formatPath(a):this.formatPath(o.slice(0,2)),C=t<3?t*3:t*2,T=t<3?t*2:t,s===3&&(C=t,T=t),J=!0,E<=C*2?J=!1:E<=C*2+T?($=E/(2*C+T),C*=$,T*=$):(_e=Math.floor((E+T)/(C+T)),Oe=(E-_e*C)/(_e-1),De=(E-(_e+1)*C)/_e,T=De<=0||Math.abs(T-Oe)<Math.abs(T-De)?Oe:De),J&&(s===3?this.ctx.setLineDash([0,C+T]):this.ctx.setLineDash([C,T])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=oi(e),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(Qi(o[0])&&(rt=o[3],We=o[0],this.ctx.beginPath(),this.formatPath([new ir(rt.end.x,rt.end.y),new ir(We.start.x,We.start.y)]),this.ctx.stroke()),Qi(o[1])&&(rt=o[1],We=o[2],this.ctx.beginPath(),this.formatPath([new ir(rt.end.x,rt.end.y),new ir(We.start.x,We.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},r.prototype.render=function(e){return me(this,void 0,void 0,function(){var t;return be(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=oi(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=Lu(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},r}(ll),Nu=function(c){return c instanceof Ns||c instanceof Lo?!0:c instanceof Wa&&c.type!==Va&&c.type!==Za},ul=function(c,r){switch(c){case 0:return Zs(r);case 2:return Fu(r);case 1:default:return xa(r)}},cl=function(c){switch(c){case 1:return"center";case 2:return"right";case 0:default:return"left"}},fl=["-apple-system","system-ui"],Hu=function(c){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?c.filter(function(r){return fl.indexOf(r)===-1}):c},Ku=function(c){x(r,c);function r(e,t){var n=c.call(this,e,t)||this;return n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=t,n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),n}return r.prototype.render=function(e){return me(this,void 0,void 0,function(){var t,n;return be(this,function(i){switch(i.label){case 0:return t=Io(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Gu(t)];case 1:return n=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=oi(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},r}(ll),Gu=function(c){return new Promise(function(r,e){var t=new Image;t.onload=function(){r(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(c))})},$u=function(){function c(r){var e=r.id,t=r.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return c.prototype.debug=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,we([this.id,this.getTime()+"ms"],r)):this.info.apply(this,r))},c.prototype.getTime=function(){return Date.now()-this.start},c.prototype.info=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,we([this.id,this.getTime()+"ms"],r))},c.prototype.warn=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,we([this.id,this.getTime()+"ms"],r)):this.info.apply(this,r))},c.prototype.error=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,we([this.id,this.getTime()+"ms"],r)):this.info.apply(this,r))},c.instances={},c}(),Zu=function(){function c(r,e){var t;this.windowBounds=e,this.instanceName="#"+c.instanceCount++,this.logger=new $u({id:this.instanceName,enabled:r.logging}),this.cache=(t=r.cache)!==null&&t!==void 0?t:new Su(this,r)}return c.instanceCount=1,c}(),dl=function(c,r){return r===void 0&&(r={}),rA(c,r)};typeof window!="undefined"&&zA.setContext(window);var rA=function(c,r){return me(void 0,void 0,void 0,function(){var e,t,n,i,s,a,o,u,l,f,h,E,C,T,J,$,_e,Oe,De,rt,Lt,We,Lt,dt,_t,jt,xt,xn,bn,wr,mr,ar,Xn,dr,Ar,Tn,Qn,Br,yr,Tr;return be(this,function(Lr){switch(Lr.label){case 0:if(!c||typeof c!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=c.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(t=e.defaultView,!t)throw new Error("Document is not attached to a Window");return n={allowTaint:(dt=r.allowTaint)!==null&&dt!==void 0?dt:!1,imageTimeout:(_t=r.imageTimeout)!==null&&_t!==void 0?_t:15e3,proxy:r.proxy,useCORS:(jt=r.useCORS)!==null&&jt!==void 0?jt:!1},i=M({logging:(xt=r.logging)!==null&&xt!==void 0?xt:!0,cache:r.cache},n),s={windowWidth:(xn=r.windowWidth)!==null&&xn!==void 0?xn:t.innerWidth,windowHeight:(bn=r.windowHeight)!==null&&bn!==void 0?bn:t.innerHeight,scrollX:(wr=r.scrollX)!==null&&wr!==void 0?wr:t.pageXOffset,scrollY:(mr=r.scrollY)!==null&&mr!==void 0?mr:t.pageYOffset},a=new W(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),o=new Zu(i,a),u=(ar=r.foreignObjectRendering)!==null&&ar!==void 0?ar:!1,l={allowTaint:(Xn=r.allowTaint)!==null&&Xn!==void 0?Xn:!1,onclone:r.onclone,ignoreElements:r.ignoreElements,inlineImages:u,copyStyles:u},o.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),f=new $o(o,c,l),h=f.clonedReferenceElement,h?[4,f.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return E=Lr.sent(),C=Ya(h)||vu(h)?ye(h.ownerDocument):d(o,h),T=C.width,J=C.height,$=C.left,_e=C.top,Oe=Vu(o,h,r.backgroundColor),De={canvas:r.canvas,backgroundColor:Oe,scale:(Ar=(dr=r.scale)!==null&&dr!==void 0?dr:t.devicePixelRatio)!==null&&Ar!==void 0?Ar:1,x:((Tn=r.x)!==null&&Tn!==void 0?Tn:0)+$,y:((Qn=r.y)!==null&&Qn!==void 0?Qn:0)+_e,width:(Br=r.width)!==null&&Br!==void 0?Br:Math.ceil(T),height:(yr=r.height)!==null&&yr!==void 0?yr:Math.ceil(J)},u?(o.logger.debug("Document cloned, using foreign object rendering"),Lt=new Ku(o,De),[4,Lt.render(h)]):[3,3];case 2:return rt=Lr.sent(),[3,5];case 3:return o.logger.debug("Document cloned, element located at "+$+","+_e+" with size "+T+"x"+J+" using computed rendering"),o.logger.debug("Starting DOM parsing"),We=Hs(o,h),Oe===We.styles.backgroundColor&&(We.styles.backgroundColor=Qr.TRANSPARENT),o.logger.debug("Starting renderer for element at "+De.x+","+De.y+" with size "+De.width+"x"+De.height),Lt=new Mu(o,De),[4,Lt.render(We)];case 4:rt=Lr.sent(),Lr.label=5;case 5:return(!((Tr=r.removeContainer)!==null&&Tr!==void 0)||Tr)&&($o.destroy(E)||o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),o.logger.debug("Finished rendering"),[2,rt]}})})},Vu=function(c,r,e){var t=r.ownerDocument,n=t.documentElement?Wr(c,getComputedStyle(t.documentElement).backgroundColor):Qr.TRANSPARENT,i=t.body?Wr(c,getComputedStyle(t.body).backgroundColor):Qr.TRANSPARENT,s=typeof e=="string"?Wr(c,e):e===null?Qr.TRANSPARENT:4294967295;return r===t.documentElement?ui(n)?ui(i)?s:i:n:s};return dl})},67467:function(Zn,Dt){Dt.read=function(x,M,me,be,we){var W,d,ye=we*8-be-1,G=(1<<ye)-1,A=G>>1,S=-7,k=me?we-1:0,p=me?-1:1,m=x[M+k];for(k+=p,W=m&(1<<-S)-1,m>>=-S,S+=ye;S>0;W=W*256+x[M+k],k+=p,S-=8);for(d=W&(1<<-S)-1,W>>=-S,S+=be;S>0;d=d*256+x[M+k],k+=p,S-=8);if(W===0)W=1-A;else{if(W===G)return d?NaN:(m?-1:1)*(1/0);d=d+Math.pow(2,be),W=W-A}return(m?-1:1)*d*Math.pow(2,W-be)},Dt.write=function(x,M,me,be,we,W){var d,ye,G,A=W*8-we-1,S=(1<<A)-1,k=S>>1,p=we===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=be?0:W-1,B=be?1:-1,F=M<0||M===0&&1/M<0?1:0;for(M=Math.abs(M),isNaN(M)||M===1/0?(ye=isNaN(M)?1:0,d=S):(d=Math.floor(Math.log(M)/Math.LN2),M*(G=Math.pow(2,-d))<1&&(d--,G*=2),d+k>=1?M+=p/G:M+=p*Math.pow(2,1-k),M*G>=2&&(d++,G/=2),d+k>=S?(ye=0,d=S):d+k>=1?(ye=(M*G-1)*Math.pow(2,we),d=d+k):(ye=M*Math.pow(2,k-1)*Math.pow(2,we),d=0));we>=8;x[me+m]=ye&255,m+=B,ye/=256,we-=8);for(d=d<<we|ye,A+=we;A>0;x[me+m]=d&255,m+=B,d/=256,A-=8);x[me+m-B]|=F*128}},53184:function(Zn,Dt,x){"use strict";var M,me;function be(we,W,d){var ye=function(G,A){return we.js_beautify(G,A)};return ye.js=we.js_beautify,ye.css=W.css_beautify,ye.html=d.html_beautify,ye.js_beautify=we.js_beautify,ye.css_beautify=W.css_beautify,ye.html_beautify=d.html_beautify,ye}M=[x(58553),x(87804),x(40998)],me=function(we,W,d){return be(we,W,d)}.apply(Dt,M),me!==void 0&&(Zn.exports=me)},87804:function(Zn,Dt){var x,M;(function(){var me;(function(){"use strict";var we=[,,function(G){function A(p){this.__parent=p,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=[]}A.prototype.clone_empty=function(){var p=new A(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},A.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},A.prototype.has_match=function(p){for(var m=this.__items.length-1;m>=0;m--)if(this.__items[m].match(p))return!0;return!1},A.prototype.set_indent=function(p,m){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=m||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.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)},A.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},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(p){this.__items.push(p);var m=p.lastIndexOf(`
`);m!==-1?this.__character_count=p.length-m:this.__character_count+=p.length},A.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function S(p,m){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),m=m||"",p.indent_level>0&&(m=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=m,this.__base_string_length=m.length}S.prototype.get_indent_size=function(p,m){var B=this.__base_string_length;return m=m||0,p<0&&(B=0),B+=p*this.__indent_size,B+=m,B},S.prototype.get_indent_string=function(p,m){var B=this.__base_string;return m=m||0,p<0&&(p=0,B=""),m+=p*this.__indent_size,this.__ensure_cache(m),B+=this.__cache[m],B},S.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},S.prototype.__add_column=function(){var p=this.__cache.length,m=0,B="";this.__indent_size&&p>=this.__indent_size&&(m=Math.floor(p/this.__indent_size),p-=m*this.__indent_size,B=new Array(m+1).join(this.__indent_string)),p&&(B+=new Array(p+1).join(" ")),this.__cache.push(B)};function k(p,m){this.__indent_cache=new S(p,m),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}k.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},k.prototype.get_line_number=function(){return this.__lines.length},k.prototype.get_indent_string=function(p,m){return this.__indent_cache.get_indent_string(p,m)},k.prototype.get_indent_size=function(p,m){return this.__indent_cache.get_indent_size(p,m)},k.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},k.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},k.prototype.get_code=function(p){this.trim(!0);var m=this.current_line.pop();m&&(m[m.length-1]===`
`&&(m=m.replace(/\n+$/g,"")),this.current_line.push(m)),this._end_with_newline&&this.__add_outputline();var B=this.__lines.join(`
`);return p!==`
`&&(B=B.replace(/[\n]/g,p)),B},k.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},k.prototype.set_indent=function(p,m){return p=p||0,m=m||0,this.next_line.set_indent(p,m),this.__lines.length>1?(this.current_line.set_indent(p,m),!0):(this.current_line.set_indent(),!1)},k.prototype.add_raw_token=function(p){for(var m=0;m<p.newlines;m++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},k.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},k.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(" "))},k.prototype.remove_indent=function(p){for(var m=this.__lines.length;p<m;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},k.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&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},k.prototype.just_added_newline=function(){return this.current_line.is_empty()},k.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},k.prototype.ensure_empty_line_above=function(p,m){for(var B=this.__lines.length-2;B>=0;){var F=this.__lines[B];if(F.is_empty())break;if(F.item(0).indexOf(p)!==0&&F.item(-1)!==m){this.__lines.splice(B+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}B--}},G.exports.Output=k},,,,function(G){function A(p,m){this.raw_options=S(p,m),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}A.prototype._get_array=function(p,m){var B=this.raw_options[p],F=m||[];return typeof B=="object"?B!==null&&typeof B.concat=="function"&&(F=B.concat()):typeof B=="string"&&(F=B.split(/[^a-zA-Z0-9_\/\-]+/)),F},A.prototype._get_boolean=function(p,m){var B=this.raw_options[p],F=B===void 0?!!m:!!B;return F},A.prototype._get_characters=function(p,m){var B=this.raw_options[p],F=m||"";return typeof B=="string"&&(F=B.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),F},A.prototype._get_number=function(p,m){var B=this.raw_options[p];m=parseInt(m,10),isNaN(m)&&(m=0);var F=parseInt(B,10);return isNaN(F)&&(F=m),F},A.prototype._get_selection=function(p,m,B){var F=this._get_selection_list(p,m,B);if(F.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
`+m+`
You passed in: '`+this.raw_options[p]+"'");return F[0]},A.prototype._get_selection_list=function(p,m,B){if(!m||m.length===0)throw new Error("Selection list cannot be empty.");if(B=B||[m[0]],!this._is_valid_selection(B,m))throw new Error("Invalid Default Value!");var F=this._get_array(p,B);if(!this._is_valid_selection(F,m))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
`+m+`
You passed in: '`+this.raw_options[p]+"'");return F},A.prototype._is_valid_selection=function(p,m){return p.length&&m.length&&!p.some(function(B){return m.indexOf(B)===-1})};function S(p,m){var B={};p=k(p);var F;for(F in p)F!==m&&(B[F]=p[F]);if(m&&p[m])for(F in p[m])B[F]=p[m][F];return B}function k(p){var m={},B;for(B in p){var F=B.replace(/-/g,"_");m[F]=p[B]}return m}G.exports.Options=A,G.exports.normalizeOpts=k,G.exports.mergeOpts=S},,function(G){var A=RegExp.prototype.hasOwnProperty("sticky");function S(k){this.__input=k||"",this.__input_length=this.__input.length,this.__position=0}S.prototype.restart=function(){this.__position=0},S.prototype.back=function(){this.__position>0&&(this.__position-=1)},S.prototype.hasNext=function(){return this.__position<this.__input_length},S.prototype.next=function(){var k=null;return this.hasNext()&&(k=this.__input.charAt(this.__position),this.__position+=1),k},S.prototype.peek=function(k){var p=null;return k=k||0,k+=this.__position,k>=0&&k<this.__input_length&&(p=this.__input.charAt(k)),p},S.prototype.__match=function(k,p){k.lastIndex=p;var m=k.exec(this.__input);return m&&!(A&&k.sticky)&&m.index!==p&&(m=null),m},S.prototype.test=function(k,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(k,p):!1},S.prototype.testChar=function(k,p){var m=this.peek(p);return k.lastIndex=0,m!==null&&k.test(m)},S.prototype.match=function(k){var p=this.__match(k,this.__position);return p?this.__position+=p[0].length:p=null,p},S.prototype.read=function(k,p,m){var B="",F;return k&&(F=this.match(k),F&&(B+=F[0])),p&&(F||!k)&&(B+=this.readUntil(p,m)),B},S.prototype.readUntil=function(k,p){var m="",B=this.__position;k.lastIndex=this.__position;var F=k.exec(this.__input);return F?(B=F.index,p&&(B+=F[0].length)):B=this.__input_length,m=this.__input.substring(this.__position,B),this.__position=B,m},S.prototype.readUntilAfter=function(k){return this.readUntil(k,!0)},S.prototype.get_regexp=function(k,p){var m=null,B="g";return p&&A&&(B="y"),typeof k=="string"&&k!==""?m=new RegExp(k,B):k&&(m=new RegExp(k.source,B)),m},S.prototype.get_literal_regexp=function(k){return RegExp(k.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},S.prototype.peekUntilAfter=function(k){var p=this.__position,m=this.readUntilAfter(k);return this.__position=p,m},S.prototype.lookBack=function(k){var p=this.__position-1;return p>=k.length&&this.__input.substring(p-k.length,p).toLowerCase()===k},G.exports.InputScanner=S},,,,,function(G){function A(S,k){S=typeof S=="string"?S:S.source,k=typeof k=="string"?k:k.source,this.__directives_block_pattern=new RegExp(S+/ beautify( \w+[:]\w+)+ /.source+k,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(S+/\sbeautify\signore:end\s/.source+k,"g")}A.prototype.get_directives=function(S){if(!S.match(this.__directives_block_pattern))return null;var k={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(S);p;)k[p[1]]=p[2],p=this.__directive_pattern.exec(S);return k},A.prototype.readIgnored=function(S){return S.readUntilAfter(this.__directives_end_ignore_pattern)},G.exports.Directives=A},,function(G,A,S){var k=S(16).Beautifier,p=S(17).Options;function m(B,F){var V=new k(B,F);return V.beautify()}G.exports=m,G.exports.defaultOptions=function(){return new p}},function(G,A,S){var k=S(17).Options,p=S(2).Output,m=S(8).InputScanner,B=S(13).Directives,F=new B(/\/\*/,/\*\//),V=/\r\n|[\r\n]/,j=/\r\n|[\r\n]/g,se=/\s/,H=/(?:\s|\n)+/g,X=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,P=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function R(fe,de){this._source_text=fe||"",this._options=new k(de),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"]}R.prototype.eatString=function(fe){var de="";for(this._ch=this._input.next();this._ch;){if(de+=this._ch,this._ch==="\\")de+=this._input.next();else if(fe.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return de},R.prototype.eatWhitespace=function(fe){for(var de=se.test(this._input.peek()),ie=0;se.test(this._input.peek());)this._ch=this._input.next(),fe&&this._ch===`
`&&(ie===0||ie<this._options.max_preserve_newlines)&&(ie++,this._output.add_new_line(!0));return de},R.prototype.foundNestedPseudoClass=function(){for(var fe=0,de=1,ie=this._input.peek(de);ie;){if(ie==="{")return!0;if(ie==="(")fe+=1;else if(ie===")"){if(fe===0)return!1;fe-=1}else if(ie===";"||ie==="}")return!1;de++,ie=this._input.peek(de)}return!1},R.prototype.print_string=function(fe){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(fe)},R.prototype.preserveSingleSpace=function(fe){fe&&(this._output.space_before_token=!0)},R.prototype.indent=function(){this._indentLevel++},R.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},R.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var fe=this._source_text,de=this._options.eol;de==="auto"&&(de=`
`,fe&&V.test(fe||"")&&(de=fe.match(V)[0])),fe=fe.replace(j,`
`);var ie=fe.match(/^[\t ]*/)[0];this._output=new p(this._options,ie),this._input=new m(fe),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var q=0,ge=!1,z=!1,Fe=!1,Z=!1,U=!1,K=this._ch,ee=!1,he,ae,_;he=this._input.read(H),ae=he!=="",_=K,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),K=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var y=this._input.read(X),Y=F.get_directives(y);Y&&Y.ignore==="start"&&(y+=F.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(P)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(ae),this.print_string(this._ch);var ue=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ue.match(/[ :]$/)&&(ue=this.eatString(": ").replace(/\s+$/,""),this.print_string(ue),this._output.space_before_token=!0),q===0&&ue.indexOf(":")!==-1&&(z=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(ae),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Qe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Qe.match(/[ :]$/)&&(Qe=this.eatString(": ").replace(/\s+$/,""),this.print_string(Qe),this._output.space_before_token=!0),q===0&&Qe.indexOf(":")!==-1?(z=!0,this.indent()):Qe in this.NESTED_AT_RULE?(this._nestedLevel+=1,Qe in this.CONDITIONAL_GROUP_RULE&&(Fe=!0)):q===0&&!z&&(Z=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(ae),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")z&&(z=!1,this.outdent()),Z=!1,Fe?(Fe=!1,ge=this._indentLevel>=this._nestedLevel):ge=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&ge&&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)):(_==="("?this._output.space_before_token=!1:_!==","&&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(),_==="{"&&this._output.trim(!0),z&&(this.outdent(),z=!1),this.print_string(this._ch),ge=!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 et=0;et<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;et++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[et])){ee=!0;break}(ge||Fe)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!Z&&q===0?(this.print_string(":"),z||(z=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var gt=_==='"'||_==="'";this.preserveSingleSpace(gt||ae),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")ee=!1,q===0?(z&&(this.outdent(),z=!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(),q++,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(")")),q&&(q--,this.outdent()));else{var bt=!1;this._input.lookBack("with")&&(bt=!0),this.preserveSingleSpace(ae||bt),this.print_string(this._ch),z&&_==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),U=!0):(this.eatWhitespace(),q++,this.indent())}else if(this._ch===")")q&&(q--,this.outdent()),U&&this._input.peek()===";"&&this._options.selector_separator_newline&&(U=!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&&(!z||U)&&q===0&&!Z?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!z&&q===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&&se.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(ae),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),se.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 Vt=_==='"'||_==="'";this.preserveSingleSpace(Vt||ae),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&ee&&this._output.add_new_line()}var Rt=this._output.get_code(de);return Rt},G.exports.Beautifier=R},function(G,A,S){var k=S(6).Options;function p(m){k.call(this,m,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var B=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||B;var F=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var V=0;V<F.length;V++)F[V]!=="expand"?this.brace_style="collapse":this.brace_style=F[V]}p.prototype=new k,G.exports.Options=p}],W={};function d(G){var A=W[G];if(A!==void 0)return A.exports;var S=W[G]={exports:{}};return we[G](S,S.exports,d),S.exports}var ye=d(15);me=ye})();var be=me;x=[],M=function(){return{css_beautify:be}}.apply(Dt,x),M!==void 0&&(Zn.exports=M)})()},40998:function(Zn,Dt,x){var M,me;(function(){var be;(function(){"use strict";var ye=[,,function(k){function p(F){this.__parent=F,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=[]}p.prototype.clone_empty=function(){var F=new p(this.__parent);return F.set_indent(this.__indent_count,this.__alignment_count),F},p.prototype.item=function(F){return F<0?this.__items[this.__items.length+F]:this.__items[F]},p.prototype.has_match=function(F){for(var V=this.__items.length-1;V>=0;V--)if(this.__items[V].match(F))return!0;return!1},p.prototype.set_indent=function(F,V){this.is_empty()&&(this.__indent_count=F||0,this.__alignment_count=V||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},p.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)},p.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},p.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var F=this.__parent.current_line;return F.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),F.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),F.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,F.__items[0]===" "&&(F.__items.splice(0,1),F.__character_count-=1),!0}return!1},p.prototype.is_empty=function(){return this.__items.length===0},p.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},p.prototype.push=function(F){this.__items.push(F);var V=F.lastIndexOf(`
`);V!==-1?this.__character_count=F.length-V:this.__character_count+=F.length},p.prototype.pop=function(){var F=null;return this.is_empty()||(F=this.__items.pop(),this.__character_count-=F.length),F},p.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},p.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},p.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},p.prototype.toString=function(){var F="";return this.is_empty()?this.__parent.indent_empty_lines&&(F=this.__parent.get_indent_string(this.__indent_count)):(F=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),F+=this.__items.join("")),F};function m(F,V){this.__cache=[""],this.__indent_size=F.indent_size,this.__indent_string=F.indent_char,F.indent_with_tabs||(this.__indent_string=new Array(F.indent_size+1).join(F.indent_char)),V=V||"",F.indent_level>0&&(V=new Array(F.indent_level+1).join(this.__indent_string)),this.__base_string=V,this.__base_string_length=V.length}m.prototype.get_indent_size=function(F,V){var j=this.__base_string_length;return V=V||0,F<0&&(j=0),j+=F*this.__indent_size,j+=V,j},m.prototype.get_indent_string=function(F,V){var j=this.__base_string;return V=V||0,F<0&&(F=0,j=""),V+=F*this.__indent_size,this.__ensure_cache(V),j+=this.__cache[V],j},m.prototype.__ensure_cache=function(F){for(;F>=this.__cache.length;)this.__add_column()},m.prototype.__add_column=function(){var F=this.__cache.length,V=0,j="";this.__indent_size&&F>=this.__indent_size&&(V=Math.floor(F/this.__indent_size),F-=V*this.__indent_size,j=new Array(V+1).join(this.__indent_string)),F&&(j+=new Array(F+1).join(" ")),this.__cache.push(j)};function B(F,V){this.__indent_cache=new m(F,V),this.raw=!1,this._end_with_newline=F.end_with_newline,this.indent_size=F.indent_size,this.wrap_line_length=F.wrap_line_length,this.indent_empty_lines=F.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new p(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}B.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},B.prototype.get_line_number=function(){return this.__lines.length},B.prototype.get_indent_string=function(F,V){return this.__indent_cache.get_indent_string(F,V)},B.prototype.get_indent_size=function(F,V){return this.__indent_cache.get_indent_size(F,V)},B.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},B.prototype.add_new_line=function(F){return this.is_empty()||!F&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},B.prototype.get_code=function(F){this.trim(!0);var V=this.current_line.pop();V&&(V[V.length-1]===`
`&&(V=V.replace(/\n+$/g,"")),this.current_line.push(V)),this._end_with_newline&&this.__add_outputline();var j=this.__lines.join(`
`);return F!==`
`&&(j=j.replace(/[\n]/g,F)),j},B.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},B.prototype.set_indent=function(F,V){return F=F||0,V=V||0,this.next_line.set_indent(F,V),this.__lines.length>1?(this.current_line.set_indent(F,V),!0):(this.current_line.set_indent(),!1)},B.prototype.add_raw_token=function(F){for(var V=0;V<F.newlines;V++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(F.whitespace_before),this.current_line.push(F.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},B.prototype.add_token=function(F){this.__add_space_before_token(),this.current_line.push(F),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},B.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(" "))},B.prototype.remove_indent=function(F){for(var V=this.__lines.length;F<V;)this.__lines[F]._remove_indent(),F++;this.current_line._remove_wrap_indent()},B.prototype.trim=function(F){for(F=F===void 0?!1:F,this.current_line.trim();F&&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},B.prototype.just_added_newline=function(){return this.current_line.is_empty()},B.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},B.prototype.ensure_empty_line_above=function(F,V){for(var j=this.__lines.length-2;j>=0;){var se=this.__lines[j];if(se.is_empty())break;if(se.item(0).indexOf(F)!==0&&se.item(-1)!==V){this.__lines.splice(j+1,0,new p(this)),this.previous_line=this.__lines[this.__lines.length-2];break}j--}},k.exports.Output=B},function(k){function p(m,B,F,V){this.type=m,this.text=B,this.comments_before=null,this.newlines=F||0,this.whitespace_before=V||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}k.exports.Token=p},,,function(k){function p(F,V){this.raw_options=m(F,V),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"])}p.prototype._get_array=function(F,V){var j=this.raw_options[F],se=V||[];return typeof j=="object"?j!==null&&typeof j.concat=="function"&&(se=j.concat()):typeof j=="string"&&(se=j.split(/[^a-zA-Z0-9_\/\-]+/)),se},p.prototype._get_boolean=function(F,V){var j=this.raw_options[F],se=j===void 0?!!V:!!j;return se},p.prototype._get_characters=function(F,V){var j=this.raw_options[F],se=V||"";return typeof j=="string"&&(se=j.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),se},p.prototype._get_number=function(F,V){var j=this.raw_options[F];V=parseInt(V,10),isNaN(V)&&(V=0);var se=parseInt(j,10);return isNaN(se)&&(se=V),se},p.prototype._get_selection=function(F,V,j){var se=this._get_selection_list(F,V,j);if(se.length!==1)throw new Error("Invalid Option Value: The option '"+F+`' can only be one of the following values:
`+V+`
You passed in: '`+this.raw_options[F]+"'");return se[0]},p.prototype._get_selection_list=function(F,V,j){if(!V||V.length===0)throw new Error("Selection list cannot be empty.");if(j=j||[V[0]],!this._is_valid_selection(j,V))throw new Error("Invalid Default Value!");var se=this._get_array(F,j);if(!this._is_valid_selection(se,V))throw new Error("Invalid Option Value: The option '"+F+`' can contain only the following values:
`+V+`
You passed in: '`+this.raw_options[F]+"'");return se},p.prototype._is_valid_selection=function(F,V){return F.length&&V.length&&!F.some(function(j){return V.indexOf(j)===-1})};function m(F,V){var j={};F=B(F);var se;for(se in F)se!==V&&(j[se]=F[se]);if(V&&F[V])for(se in F[V])j[se]=F[V][se];return j}function B(F){var V={},j;for(j in F){var se=j.replace(/-/g,"_");V[se]=F[j]}return V}k.exports.Options=p,k.exports.normalizeOpts=B,k.exports.mergeOpts=m},,function(k){var p=RegExp.prototype.hasOwnProperty("sticky");function m(B){this.__input=B||"",this.__input_length=this.__input.length,this.__position=0}m.prototype.restart=function(){this.__position=0},m.prototype.back=function(){this.__position>0&&(this.__position-=1)},m.prototype.hasNext=function(){return this.__position<this.__input_length},m.prototype.next=function(){var B=null;return this.hasNext()&&(B=this.__input.charAt(this.__position),this.__position+=1),B},m.prototype.peek=function(B){var F=null;return B=B||0,B+=this.__position,B>=0&&B<this.__input_length&&(F=this.__input.charAt(B)),F},m.prototype.__match=function(B,F){B.lastIndex=F;var V=B.exec(this.__input);return V&&!(p&&B.sticky)&&V.index!==F&&(V=null),V},m.prototype.test=function(B,F){return F=F||0,F+=this.__position,F>=0&&F<this.__input_length?!!this.__match(B,F):!1},m.prototype.testChar=function(B,F){var V=this.peek(F);return B.lastIndex=0,V!==null&&B.test(V)},m.prototype.match=function(B){var F=this.__match(B,this.__position);return F?this.__position+=F[0].length:F=null,F},m.prototype.read=function(B,F,V){var j="",se;return B&&(se=this.match(B),se&&(j+=se[0])),F&&(se||!B)&&(j+=this.readUntil(F,V)),j},m.prototype.readUntil=function(B,F){var V="",j=this.__position;B.lastIndex=this.__position;var se=B.exec(this.__input);return se?(j=se.index,F&&(j+=se[0].length)):j=this.__input_length,V=this.__input.substring(this.__position,j),this.__position=j,V},m.prototype.readUntilAfter=function(B){return this.readUntil(B,!0)},m.prototype.get_regexp=function(B,F){var V=null,j="g";return F&&p&&(j="y"),typeof B=="string"&&B!==""?V=new RegExp(B,j):B&&(V=new RegExp(B.source,j)),V},m.prototype.get_literal_regexp=function(B){return RegExp(B.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},m.prototype.peekUntilAfter=function(B){var F=this.__position,V=this.readUntilAfter(B);return this.__position=F,V},m.prototype.lookBack=function(B){var F=this.__position-1;return F>=B.length&&this.__input.substring(F-B.length,F).toLowerCase()===B},k.exports.InputScanner=m},function(k,p,m){var B=m(8).InputScanner,F=m(3).Token,V=m(10).TokenStream,j=m(11).WhitespacePattern,se={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},H=function(X,P){this._input=new B(X),this._options=P||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new j(this._input)};H.prototype.tokenize=function(){this._input.restart(),this.__tokens=new V,this._reset();for(var X,P=new F(se.START,""),R=null,fe=[],de=new V;P.type!==se.EOF;){for(X=this._get_next_token(P,R);this._is_comment(X);)de.add(X),X=this._get_next_token(P,R);de.isEmpty()||(X.comments_before=de,de=new V),X.parent=R,this._is_opening(X)?(fe.push(R),R=X):R&&this._is_closing(X,R)&&(X.opened=R,R.closed=X,R=fe.pop(),X.parent=R),X.previous=P,P.next=X,this.__tokens.add(X),P=X}return this.__tokens},H.prototype._is_first_token=function(){return this.__tokens.isEmpty()},H.prototype._reset=function(){},H.prototype._get_next_token=function(X,P){this._readWhitespace();var R=this._input.read(/.+/g);return R?this._create_token(se.RAW,R):this._create_token(se.EOF,"")},H.prototype._is_comment=function(X){return!1},H.prototype._is_opening=function(X){return!1},H.prototype._is_closing=function(X,P){return!1},H.prototype._create_token=function(X,P){var R=new F(X,P,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return R},H.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},k.exports.Tokenizer=H,k.exports.TOKEN=se},function(k){function p(m){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=m}p.prototype.restart=function(){this.__position=0},p.prototype.isEmpty=function(){return this.__tokens_length===0},p.prototype.hasNext=function(){return this.__position<this.__tokens_length},p.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__tokens[this.__position],this.__position+=1),m},p.prototype.peek=function(m){var B=null;return m=m||0,m+=this.__position,m>=0&&m<this.__tokens_length&&(B=this.__tokens[m]),B},p.prototype.add=function(m){this.__parent_token&&(m.parent=this.__parent_token),this.__tokens.push(m),this.__tokens_length+=1},k.exports.TokenStream=p},function(k,p,m){var B=m(12).Pattern;function F(V,j){B.call(this,V,j),j?this._line_regexp=this._input.get_regexp(j._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}F.prototype=new B,F.prototype.__set_whitespace_patterns=function(V,j){V+="\\t ",j+="\\n\\r",this._match_pattern=this._input.get_regexp("["+V+j+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+j+"]")},F.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var V=this._input.read(this._match_pattern);if(V===" ")this.whitespace_before_token=" ";else if(V){var j=this.__split(this._newline_regexp,V);this.newline_count=j.length-1,this.whitespace_before_token=j[this.newline_count]}return V},F.prototype.matching=function(V,j){var se=this._create();return se.__set_whitespace_patterns(V,j),se._update(),se},F.prototype._create=function(){return new F(this._input,this)},F.prototype.__split=function(V,j){V.lastIndex=0;for(var se=0,H=[],X=V.exec(j);X;)H.push(j.substring(se,X.index)),se=X.index+X[0].length,X=V.exec(j);return se<j.length?H.push(j.substring(se,j.length)):H.push(""),H},k.exports.WhitespacePattern=F},function(k){function p(m,B){this._input=m,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,B&&(this._starting_pattern=this._input.get_regexp(B._starting_pattern,!0),this._match_pattern=this._input.get_regexp(B._match_pattern,!0),this._until_pattern=this._input.get_regexp(B._until_pattern),this._until_after=B._until_after)}p.prototype.read=function(){var m=this._input.read(this._starting_pattern);return(!this._starting_pattern||m)&&(m+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),m},p.prototype.read_match=function(){return this._input.match(this._match_pattern)},p.prototype.until_after=function(m){var B=this._create();return B._until_after=!0,B._until_pattern=this._input.get_regexp(m),B._update(),B},p.prototype.until=function(m){var B=this._create();return B._until_after=!1,B._until_pattern=this._input.get_regexp(m),B._update(),B},p.prototype.starting_with=function(m){var B=this._create();return B._starting_pattern=this._input.get_regexp(m,!0),B._update(),B},p.prototype.matching=function(m){var B=this._create();return B._match_pattern=this._input.get_regexp(m,!0),B._update(),B},p.prototype._create=function(){return new p(this._input,this)},p.prototype._update=function(){},k.exports.Pattern=p},function(k){function p(m,B){m=typeof m=="string"?m:m.source,B=typeof B=="string"?B:B.source,this.__directives_block_pattern=new RegExp(m+/ beautify( \w+[:]\w+)+ /.source+B,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(m+/\sbeautify\signore:end\s/.source+B,"g")}p.prototype.get_directives=function(m){if(!m.match(this.__directives_block_pattern))return null;var B={};this.__directive_pattern.lastIndex=0;for(var F=this.__directive_pattern.exec(m);F;)B[F[1]]=F[2],F=this.__directive_pattern.exec(m);return B},p.prototype.readIgnored=function(m){return m.readUntilAfter(this.__directives_end_ignore_pattern)},k.exports.Directives=p},function(k,p,m){var B=m(12).Pattern,F={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function V(j,se){B.call(this,j,se),this.__template_pattern=null,this._disabled=Object.assign({},F),this._excluded=Object.assign({},F),se&&(this.__template_pattern=this._input.get_regexp(se.__template_pattern),this._excluded=Object.assign(this._excluded,se._excluded),this._disabled=Object.assign(this._disabled,se._disabled));var H=new B(j);this.__patterns={handlebars_comment:H.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:H.starting_with(/{{{/).until_after(/}}}/),handlebars:H.starting_with(/{{/).until_after(/}}/),php:H.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:H.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:H.starting_with(/{%/).until_after(/%}/),django_value:H.starting_with(/{{/).until_after(/}}/),django_comment:H.starting_with(/{#/).until_after(/#}/),smarty:H.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:H.starting_with(/{\*/).until_after(/\*}/),smarty_literal:H.starting_with(/{literal}/).until_after(/{\/literal}/)}}V.prototype=new B,V.prototype._create=function(){return new V(this._input,this)},V.prototype._update=function(){this.__set_templated_pattern()},V.prototype.disable=function(j){var se=this._create();return se._disabled[j]=!0,se._update(),se},V.prototype.read_options=function(j){var se=this._create();for(var H in F)se._disabled[H]=j.templating.indexOf(H)===-1;return se._update(),se},V.prototype.exclude=function(j){var se=this._create();return se._excluded[j]=!0,se._update(),se},V.prototype.read=function(){var j="";this._match_pattern?j=this._input.read(this._starting_pattern):j=this._input.read(this._starting_pattern,this.__template_pattern);for(var se=this._read_template();se;)this._match_pattern?se+=this._input.read(this._match_pattern):se+=this._input.readUntil(this.__template_pattern),j+=se,se=this._read_template();return this._until_after&&(j+=this._input.readUntilAfter(this._until_pattern)),j},V.prototype.__set_templated_pattern=function(){var j=[];this._disabled.php||j.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||j.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||j.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||j.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(j.push(this.__patterns.django._starting_pattern.source),j.push(this.__patterns.django_value._starting_pattern.source),j.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||j.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&j.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+j.join("|")+")")},V.prototype._read_template=function(){var j="",se=this._input.peek();if(se==="<"){var H=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&H==="?"&&(j=j||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&H==="%"&&(j=j||this.__patterns.erb.read())}else se==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(j=j||this.__patterns.handlebars_comment.read(),j=j||this.__patterns.handlebars_unescaped.read(),j=j||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(j=j||this.__patterns.django_value.read()),this._excluded.django||(j=j||this.__patterns.django_comment.read(),j=j||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(j=j||this.__patterns.smarty_comment.read(),j=j||this.__patterns.smarty_literal.read(),j=j||this.__patterns.smarty.read()));return j},k.exports.TemplatablePattern=V},,,,function(k,p,m){var B=m(19).Beautifier,F=m(20).Options;function V(j,se,H,X){var P=new B(j,se,H,X);return P.beautify()}k.exports=V,k.exports.defaultOptions=function(){return new F}},function(k,p,m){var B=m(20).Options,F=m(2).Output,V=m(21).Tokenizer,j=m(21).TOKEN,se=/\r\n|[\r\n]/,H=/\r\n|[\r\n]/g,X=function(Z,U){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 F(Z,U)};X.prototype.current_line_has_match=function(Z){return this._output.current_line.has_match(Z)},X.prototype.set_space_before_token=function(Z,U){this._output.space_before_token=Z,this._output.non_breaking_space=U},X.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},X.prototype.add_raw_token=function(Z){this._output.add_raw_token(Z)},X.prototype.print_preserved_newlines=function(Z){var U=0;Z.type!==j.TEXT&&Z.previous.type!==j.TEXT&&(U=Z.newlines?1:0),this.preserve_newlines&&(U=Z.newlines<this.max_preserve_newlines+1?Z.newlines:this.max_preserve_newlines+1);for(var K=0;K<U;K++)this.print_newline(K>0);return U!==0},X.prototype.traverse_whitespace=function(Z){return Z.whitespace_before||Z.newlines?(this.print_preserved_newlines(Z)||(this._output.space_before_token=!0),!0):!1},X.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},X.prototype.print_newline=function(Z){this._output.add_new_line(Z)},X.prototype.print_token=function(Z){Z.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(Z.text))},X.prototype.indent=function(){this.indent_level++},X.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},X.prototype.get_full_indent=function(Z){return Z=this.indent_level+(Z||0),Z<1?"":this._output.get_indent_string(Z)};var P=function(Z){for(var U=null,K=Z.next;K.type!==j.EOF&&Z.closed!==K;){if(K.type===j.ATTRIBUTE&&K.text==="type"){K.next&&K.next.type===j.EQUALS&&K.next.next&&K.next.next.type===j.VALUE&&(U=K.next.next.text);break}K=K.next}return U},R=function(Z,U){var K=null,ee=null;return U.closed?(Z==="script"?K="text/javascript":Z==="style"&&(K="text/css"),K=P(U)||K,K.search("text/css")>-1?ee="css":K.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?ee="javascript":K.search(/(text|application|dojo)\/(x-)?(html)/)>-1?ee="html":K.search(/test\/null/)>-1&&(ee="null"),ee):null};function fe(Z,U){return U.indexOf(Z)!==-1}function de(Z,U,K){this.parent=Z||null,this.tag=U?U.tag_name:"",this.indent_level=K||0,this.parser_token=U||null}function ie(Z){this._printer=Z,this._current_frame=null}ie.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ie.prototype.record_tag=function(Z){var U=new de(this._current_frame,Z,this._printer.indent_level);this._current_frame=U},ie.prototype._try_pop_frame=function(Z){var U=null;return Z&&(U=Z.parser_token,this._printer.indent_level=Z.indent_level,this._current_frame=Z.parent),U},ie.prototype._get_frame=function(Z,U){for(var K=this._current_frame;K&&Z.indexOf(K.tag)===-1;){if(U&&U.indexOf(K.tag)!==-1){K=null;break}K=K.parent}return K},ie.prototype.try_pop=function(Z,U){var K=this._get_frame([Z],U);return this._try_pop_frame(K)},ie.prototype.indent_to_tag=function(Z){var U=this._get_frame(Z);U&&(this._printer.indent_level=U.indent_level)};function q(Z,U,K,ee){this._source_text=Z||"",U=U||{},this._js_beautify=K,this._css_beautify=ee,this._tag_stack=null;var he=new B(U,"html");this._options=he,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"}q.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var Z=this._source_text,U=this._options.eol;this._options.eol==="auto"&&(U=`
`,Z&&se.test(Z)&&(U=Z.match(se)[0])),Z=Z.replace(H,`
`);var K=Z.match(/^[\t ]*/)[0],ee={text:"",type:""},he=new ge(this._options),ae=new X(this._options,K),_=new V(Z,this._options).tokenize();this._tag_stack=new ie(ae);for(var y=null,Y=_.next();Y.type!==j.EOF;)Y.type===j.TAG_OPEN||Y.type===j.COMMENT?(y=this._handle_tag_open(ae,Y,he,ee,_),he=y):Y.type===j.ATTRIBUTE||Y.type===j.EQUALS||Y.type===j.VALUE||Y.type===j.TEXT&&!he.tag_complete?y=this._handle_inside_tag(ae,Y,he,ee):Y.type===j.TAG_CLOSE?y=this._handle_tag_close(ae,Y,he):Y.type===j.TEXT?y=this._handle_text(ae,Y,he):Y.type===j.CONTROL_FLOW_OPEN?y=this._handle_control_flow_open(ae,Y):Y.type===j.CONTROL_FLOW_CLOSE?y=this._handle_control_flow_close(ae,Y):ae.add_raw_token(Y),ee=y,Y=_.next();var ue=ae._output.get_code(U);return ue},q.prototype._handle_control_flow_open=function(Z,U){var K={text:U.text,type:U.type};return Z.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),U.newlines?Z.print_preserved_newlines(U):Z.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),Z.print_token(U),Z.indent(),K},q.prototype._handle_control_flow_close=function(Z,U){var K={text:U.text,type:U.type};return Z.deindent(),U.newlines?Z.print_preserved_newlines(U):Z.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),Z.print_token(U),K},q.prototype._handle_tag_close=function(Z,U,K){var ee={text:U.text,type:U.type};return Z.alignment_size=0,K.tag_complete=!0,Z.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),K.is_unformatted?Z.add_raw_token(U):(K.tag_start_char==="<"&&(Z.set_space_before_token(U.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&K.has_wrapped_attrs&&Z.print_newline(!1)),Z.print_token(U)),K.indent_content&&!(K.is_unformatted||K.is_content_unformatted)&&(Z.indent(),K.indent_content=!1),!K.is_inline_element&&!(K.is_unformatted||K.is_content_unformatted)&&Z.set_wrap_point(),ee},q.prototype._handle_inside_tag=function(Z,U,K,ee){var he=K.has_wrapped_attrs,ae={text:U.text,type:U.type};return Z.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),K.is_unformatted?Z.add_raw_token(U):K.tag_start_char==="{"&&U.type===j.TEXT?Z.print_preserved_newlines(U)?(U.newlines=0,Z.add_raw_token(U)):Z.print_token(U):(U.type===j.ATTRIBUTE?Z.set_space_before_token(!0):(U.type===j.EQUALS||U.type===j.VALUE&&U.previous.type===j.EQUALS)&&Z.set_space_before_token(!1),U.type===j.ATTRIBUTE&&K.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(Z.traverse_whitespace(U),he=he||U.newlines!==0),this._is_wrap_attributes_force&&K.attr_count>=this._options.wrap_attributes_min_attrs&&(ee.type!==j.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(Z.print_newline(!1),he=!0)),Z.print_token(U),he=he||Z.previous_token_wrapped(),K.has_wrapped_attrs=he),ae},q.prototype._handle_text=function(Z,U,K){var ee={text:U.text,type:"TK_CONTENT"};return K.custom_beautifier_name?this._print_custom_beatifier_text(Z,U,K):K.is_unformatted||K.is_content_unformatted?Z.add_raw_token(U):(Z.traverse_whitespace(U),Z.print_token(U)),ee},q.prototype._print_custom_beatifier_text=function(Z,U,K){var ee=this;if(U.text!==""){var he=U.text,ae,_=1,y="",Y="";K.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?ae=this._js_beautify:K.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?ae=this._css_beautify:K.custom_beautifier_name==="html"&&(ae=function(Vt,Rt){var te=new q(Vt,Rt,ee._js_beautify,ee._css_beautify);return te.beautify()}),this._options.indent_scripts==="keep"?_=0:this._options.indent_scripts==="separate"&&(_=-Z.indent_level);var ue=Z.get_full_indent(_);if(he=he.replace(/\n[ \t]*$/,""),K.custom_beautifier_name!=="html"&&he[0]==="<"&&he.match(/^(<!--|<!\[CDATA\[)/)){var Qe=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(he);if(!Qe){Z.add_raw_token(U);return}y=ue+Qe[1]+`
`,he=Qe[4],Qe[5]&&(Y=ue+Qe[5]),he=he.replace(/\n[ \t]*$/,""),(Qe[2]||Qe[3].indexOf(`
`)!==-1)&&(Qe=Qe[3].match(/[ \t]+$/),Qe&&(U.whitespace_before=Qe[0]))}if(he)if(ae){var et=function(){this.eol=`
`};et.prototype=this._options.raw_options;var gt=new et;he=ae(ue+he,gt)}else{var bt=U.whitespace_before;bt&&(he=he.replace(new RegExp(`
(`+bt+")?","g"),`
`)),he=ue+he.replace(/\n/g,`
`+ue)}y&&(he?he=y+he+`
`+Y:he=y+Y),Z.print_newline(!1),he&&(U.text=he,U.whitespace_before="",U.newlines=0,Z.add_raw_token(U),Z.print_newline(!0))}},q.prototype._handle_tag_open=function(Z,U,K,ee,he){var ae=this._get_tag_open_token(U);if((K.is_unformatted||K.is_content_unformatted)&&!K.is_empty_element&&U.type===j.TAG_OPEN&&!ae.is_start_tag?(Z.add_raw_token(U),ae.start_tag_token=this._tag_stack.try_pop(ae.tag_name)):(Z.traverse_whitespace(U),this._set_tag_position(Z,U,ae,K,ee),ae.is_inline_element||Z.set_wrap_point(),Z.print_token(U)),ae.is_start_tag&&this._is_wrap_attributes_force){var _=0,y;do y=he.peek(_),y.type===j.ATTRIBUTE&&(ae.attr_count+=1),_+=1;while(y.type!==j.EOF&&y.type!==j.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(ae.alignment_size=U.text.length+1),!ae.tag_complete&&!ae.is_unformatted&&(Z.alignment_size=ae.alignment_size),ae};var ge=function(Z,U,K){if(this.parent=U||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="",!K)this.tag_complete=!0;else{var ee;this.tag_start_char=K.text[0],this.text=K.text,this.tag_start_char==="<"?(ee=K.text.match(/^<([^\s>]*)/),this.tag_check=ee?ee[1]:""):(ee=K.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=ee?ee[1]:"",(K.text.startsWith("{{#>")||K.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&K.next!==null?this.tag_check=K.next.text.split(" ")[0]:this.tag_check=K.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),K.type===j.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||K.closed&&K.closed.text==="/>";var he=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(he=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!Z.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(he)))}};q.prototype._get_tag_open_token=function(Z){var U=new ge(this._options,this._tag_stack.get_parser_token(),Z);return U.alignment_size=this._options.wrap_attributes_indent_size,U.is_end_tag=U.is_end_tag||fe(U.tag_check,this._options.void_elements),U.is_empty_element=U.tag_complete||U.is_start_tag&&U.is_end_tag,U.is_unformatted=!U.tag_complete&&fe(U.tag_check,this._options.unformatted),U.is_content_unformatted=!U.is_empty_element&&fe(U.tag_check,this._options.content_unformatted),U.is_inline_element=fe(U.tag_name,this._options.inline)||this._options.inline_custom_elements&&U.tag_name.includes("-")||U.tag_start_char==="{",U},q.prototype._set_tag_position=function(Z,U,K,ee,he){if(K.is_empty_element||(K.is_end_tag?K.start_tag_token=this._tag_stack.try_pop(K.tag_name):(this._do_optional_end_element(K)&&(K.is_inline_element||Z.print_newline(!1)),this._tag_stack.record_tag(K),(K.tag_name==="script"||K.tag_name==="style")&&!(K.is_unformatted||K.is_content_unformatted)&&(K.custom_beautifier_name=R(K.tag_check,U)))),fe(K.tag_check,this._options.extra_liners)&&(Z.print_newline(!1),Z._output.just_added_blankline()||Z.print_newline(!0)),K.is_empty_element){if(K.tag_start_char==="{"&&K.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),K.indent_content=!0;var ae=Z.current_line_has_match(/{{#if/);ae||Z.print_newline(!1)}K.tag_name==="!--"&&he.type===j.TAG_CLOSE&&ee.is_end_tag&&K.text.indexOf(`
`)===-1||(K.is_inline_element||K.is_unformatted||Z.print_newline(!1),this._calcluate_parent_multiline(Z,K))}else if(K.is_end_tag){var _=!1;_=K.start_tag_token&&K.start_tag_token.multiline_content,_=_||!K.is_inline_element&&!(ee.is_inline_element||ee.is_unformatted)&&!(he.type===j.TAG_CLOSE&&K.start_tag_token===ee)&&he.type!=="TK_CONTENT",(K.is_content_unformatted||K.is_unformatted)&&(_=!1),_&&Z.print_newline(!1)}else K.indent_content=!K.custom_beautifier_name,K.tag_start_char==="<"&&(K.tag_name==="html"?K.indent_content=this._options.indent_inner_html:K.tag_name==="head"?K.indent_content=this._options.indent_head_inner_html:K.tag_name==="body"&&(K.indent_content=this._options.indent_body_inner_html)),!(K.is_inline_element||K.is_unformatted)&&(he.type!=="TK_CONTENT"||K.is_content_unformatted)&&Z.print_newline(!1),this._calcluate_parent_multiline(Z,K)},q.prototype._calcluate_parent_multiline=function(Z,U){U.parent&&Z._output.just_added_newline()&&!((U.is_inline_element||U.is_unformatted)&&U.parent.is_inline_element)&&(U.parent.multiline_content=!0)};var z=["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"],Fe=["a","audio","del","ins","map","noscript","video"];q.prototype._do_optional_end_element=function(Z){var U=null;if(!(Z.is_empty_element||!Z.is_start_tag||!Z.parent)){if(Z.tag_name==="body")U=U||this._tag_stack.try_pop("head");else if(Z.tag_name==="li")U=U||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(Z.tag_name==="dd"||Z.tag_name==="dt")U=U||this._tag_stack.try_pop("dt",["dl"]),U=U||this._tag_stack.try_pop("dd",["dl"]);else if(Z.parent.tag_name==="p"&&z.indexOf(Z.tag_name)!==-1){var K=Z.parent.parent;(!K||Fe.indexOf(K.tag_name)===-1)&&(U=U||this._tag_stack.try_pop("p"))}else Z.tag_name==="rp"||Z.tag_name==="rt"?(U=U||this._tag_stack.try_pop("rt",["ruby","rtc"]),U=U||this._tag_stack.try_pop("rp",["ruby","rtc"])):Z.tag_name==="optgroup"?U=U||this._tag_stack.try_pop("optgroup",["select"]):Z.tag_name==="option"?U=U||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):Z.tag_name==="colgroup"?U=U||this._tag_stack.try_pop("caption",["table"]):Z.tag_name==="thead"?(U=U||this._tag_stack.try_pop("caption",["table"]),U=U||this._tag_stack.try_pop("colgroup",["table"])):Z.tag_name==="tbody"||Z.tag_name==="tfoot"?(U=U||this._tag_stack.try_pop("caption",["table"]),U=U||this._tag_stack.try_pop("colgroup",["table"]),U=U||this._tag_stack.try_pop("thead",["table"]),U=U||this._tag_stack.try_pop("tbody",["table"])):Z.tag_name==="tr"?(U=U||this._tag_stack.try_pop("caption",["table"]),U=U||this._tag_stack.try_pop("colgroup",["table"]),U=U||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(Z.tag_name==="th"||Z.tag_name==="td")&&(U=U||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),U=U||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return Z.parent=this._tag_stack.get_parser_token(),U}},k.exports.Beautifier=q},function(k,p,m){var B=m(6).Options;function F(V){B.call(this,V,"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"])}F.prototype=new B,k.exports.Options=F},function(k,p,m){var B=m(9).Tokenizer,F=m(9).TOKEN,V=m(13).Directives,j=m(14).TemplatablePattern,se=m(12).Pattern,H={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:F.START,RAW:F.RAW,EOF:F.EOF},X=new V(/<\!--/,/-->/),P=function(R,fe){B.call(this,R,fe),this._current_tag_name="";var de=new j(this._input).read_options(this._options),ie=new se(this._input);if(this.__patterns={word:de.until(/[\n\r\t <]/),word_control_flow_close_excluded:de.until(/[\n\r\t <}]/),single_quote:de.until_after(/'/),double_quote:de.until_after(/"/),attribute:de.until(/[\n\r\t =>]|\/>/),element_name:de.until(/[\n\r\t >\/]/),angular_control_flow_start:ie.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ie.starting_with(/{{!--/).until_after(/--}}/),handlebars:ie.starting_with(/{{/).until_after(/}}/),handlebars_open:ie.until(/[\n\r\t }]/),handlebars_raw_close:ie.until(/}}/),comment:ie.starting_with(/<!--/).until_after(/-->/),cdata:ie.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ie.starting_with(/<!\[/).until_after(/]>/),processing:ie.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 q=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ie.matching(q).until_after(q)}};P.prototype=new B,P.prototype._is_comment=function(R){return!1},P.prototype._is_opening=function(R){return R.type===H.TAG_OPEN||R.type===H.CONTROL_FLOW_OPEN},P.prototype._is_closing=function(R,fe){return R.type===H.TAG_CLOSE&&fe&&((R.text===">"||R.text==="/>")&&fe.text[0]==="<"||R.text==="}}"&&fe.text[0]==="{"&&fe.text[1]==="{")||R.type===H.CONTROL_FLOW_CLOSE&&R.text==="}"&&fe.text.endsWith("{")},P.prototype._reset=function(){this._current_tag_name=""},P.prototype._get_next_token=function(R,fe){var de=null;this._readWhitespace();var ie=this._input.peek();return ie===null?this._create_token(H.EOF,""):(de=de||this._read_open_handlebars(ie,fe),de=de||this._read_attribute(ie,R,fe),de=de||this._read_close(ie,fe),de=de||this._read_script_and_style(ie,R),de=de||this._read_control_flows(ie,fe),de=de||this._read_raw_content(ie,R,fe),de=de||this._read_content_word(ie,fe),de=de||this._read_comment_or_cdata(ie),de=de||this._read_processing(ie),de=de||this._read_open(ie,fe),de=de||this._create_token(H.UNKNOWN,this._input.next()),de)},P.prototype._read_comment_or_cdata=function(R){var fe=null,de=null,ie=null;if(R==="<"){var q=this._input.peek(1);q==="!"&&(de=this.__patterns.comment.read(),de?(ie=X.get_directives(de),ie&&ie.ignore==="start"&&(de+=X.readIgnored(this._input))):de=this.__patterns.cdata.read()),de&&(fe=this._create_token(H.COMMENT,de),fe.directives=ie)}return fe},P.prototype._read_processing=function(R){var fe=null,de=null,ie=null;if(R==="<"){var q=this._input.peek(1);(q==="!"||q==="?")&&(de=this.__patterns.conditional_comment.read(),de=de||this.__patterns.processing.read()),de&&(fe=this._create_token(H.COMMENT,de),fe.directives=ie)}return fe},P.prototype._read_open=function(R,fe){var de=null,ie=null;return(!fe||fe.type===H.CONTROL_FLOW_OPEN)&&R==="<"&&(de=this._input.next(),this._input.peek()==="/"&&(de+=this._input.next()),de+=this.__patterns.element_name.read(),ie=this._create_token(H.TAG_OPEN,de)),ie},P.prototype._read_open_handlebars=function(R,fe){var de=null,ie=null;return(!fe||fe.type===H.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&R==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(de=this.__patterns.handlebars_comment.read(),de=de||this.__patterns.handlebars.read(),ie=this._create_token(H.COMMENT,de)):(de=this.__patterns.handlebars_open.read(),ie=this._create_token(H.TAG_OPEN,de))),ie},P.prototype._read_control_flows=function(R,fe){var de="",ie=null;if(!this._options.templating.includes("angular"))return ie;if(R==="@"){if(de=this.__patterns.angular_control_flow_start.read(),de==="")return ie;for(var q=de.endsWith("(")?1:0,ge=0;!(de.endsWith("{")&&q===ge);){var z=this._input.next();if(z===null)break;z==="("?q++:z===")"&&ge++,de+=z}ie=this._create_token(H.CONTROL_FLOW_OPEN,de)}else R==="}"&&fe&&fe.type===H.CONTROL_FLOW_OPEN&&(de=this._input.next(),ie=this._create_token(H.CONTROL_FLOW_CLOSE,de));return ie},P.prototype._read_close=function(R,fe){var de=null,ie=null;return fe&&fe.type===H.TAG_OPEN&&(fe.text[0]==="<"&&(R===">"||R==="/"&&this._input.peek(1)===">")?(de=this._input.next(),R==="/"&&(de+=this._input.next()),ie=this._create_token(H.TAG_CLOSE,de)):fe.text[0]==="{"&&R==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ie=this._create_token(H.TAG_CLOSE,"}}"))),ie},P.prototype._read_attribute=function(R,fe,de){var ie=null,q="";if(de&&de.text[0]==="<")if(R==="=")ie=this._create_token(H.EQUALS,this._input.next());else if(R==='"'||R==="'"){var ge=this._input.next();R==='"'?ge+=this.__patterns.double_quote.read():ge+=this.__patterns.single_quote.read(),ie=this._create_token(H.VALUE,ge)}else q=this.__patterns.attribute.read(),q&&(fe.type===H.EQUALS?ie=this._create_token(H.VALUE,q):ie=this._create_token(H.ATTRIBUTE,q));return ie},P.prototype._is_content_unformatted=function(R){return this._options.void_elements.indexOf(R)===-1&&(this._options.content_unformatted.indexOf(R)!==-1||this._options.unformatted.indexOf(R)!==-1)},P.prototype._read_raw_content=function(R,fe,de){var ie="";if(de&&de.text[0]==="{")ie=this.__patterns.handlebars_raw_close.read();else if(fe.type===H.TAG_CLOSE&&fe.opened.text[0]==="<"&&fe.text[0]!=="/"){var q=fe.opened.text.substr(1).toLowerCase();this._is_content_unformatted(q)&&(ie=this._input.readUntil(new RegExp("</"+q+"[\\n\\r\\t ]*?>","ig")))}return ie?this._create_token(H.TEXT,ie):null},P.prototype._read_script_and_style=function(R,fe){if(fe.type===H.TAG_CLOSE&&fe.opened.text[0]==="<"&&fe.text[0]!=="/"){var de=fe.opened.text.substr(1).toLowerCase();if(de==="script"||de==="style"){var ie=this._read_comment_or_cdata(R);if(ie)return ie.type=H.TEXT,ie;var q=this._input.readUntil(new RegExp("</"+de+"[\\n\\r\\t ]*?>","ig"));if(q)return this._create_token(H.TEXT,q)}}return null},P.prototype._read_content_word=function(R,fe){var de="";return this._options.unformatted_content_delimiter&&R===this._options.unformatted_content_delimiter[0]&&(de=this.__patterns.unformatted_content_delimiter.read()),de||(de=fe&&fe.type===H.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),de?this._create_token(H.TEXT,de):null},k.exports.Tokenizer=P,k.exports.TOKEN=H}],G={};function A(k){var p=G[k];if(p!==void 0)return p.exports;var m=G[k]={exports:{}};return ye[k](m,m.exports,A),m.exports}var S=A(18);be=S})();var we=be;if(1)M=[x,x(58553),x(87804)],me=function(ye){var G=x(58553),A=x(87804);return{html_beautify:function(S,k){return we(S,k,G.js_beautify,A.css_beautify)}}}.apply(Dt,M),me!==void 0&&(Zn.exports=me);else var W,d})()},58553:function(Zn,Dt){var x,M;(function(){var me;(function(){"use strict";var we=[function(G,A,S){var k=S(1).Beautifier,p=S(5).Options;function m(B,F){var V=new k(B,F);return V.beautify()}G.exports=m,G.exports.defaultOptions=function(){return new p}},function(G,A,S){var k=S(2).Output,p=S(3).Token,m=S(4),B=S(5).Options,F=S(7).Tokenizer,V=S(7).line_starters,j=S(7).positionable_operators,se=S(7).TOKEN;function H(y,Y){return Y.indexOf(y)!==-1}function X(y){return y.replace(/^\s+/g,"")}function P(y){for(var Y={},ue=0;ue<y.length;ue++)Y[y[ue].replace(/-/g,"_")]=y[ue];return Y}function R(y,Y){return y&&y.type===se.RESERVED&&y.text===Y}function fe(y,Y){return y&&y.type===se.RESERVED&&H(y.text,Y)}var de=["case","return","do","if","throw","else","await","break","continue","async"],ie=["before-newline","after-newline","preserve-newline"],q=P(ie),ge=[q.before_newline,q.preserve_newline],z={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Fe(y,Y){Y.multiline_frame||Y.mode===z.ForInitializer||Y.mode===z.Conditional||y.remove_indent(Y.start_line_index)}function Z(y){y=y.replace(m.allLineBreaks,`
`);for(var Y=[],ue=y.indexOf(`
`);ue!==-1;)Y.push(y.substring(0,ue)),y=y.substring(ue+1),ue=y.indexOf(`
`);return y.length&&Y.push(y),Y}function U(y){return y===z.ArrayLiteral}function K(y){return H(y,[z.Expression,z.ForInitializer,z.Conditional])}function ee(y,Y){for(var ue=0;ue<y.length;ue++){var Qe=y[ue].trim();if(Qe.charAt(0)!==Y)return!1}return!0}function he(y,Y){for(var ue=0,Qe=y.length,et;ue<Qe;ue++)if(et=y[ue],et&&et.indexOf(Y)!==0)return!1;return!0}function ae(y,Y){Y=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 B(Y)}ae.prototype.create_flags=function(y,Y){var ue=0;y&&(ue=y.indentation_level,!this._output.just_added_newline()&&y.line_indent_level>ue&&(ue=y.line_indent_level));var Qe={mode:Y,parent:y,last_token:y?y.last_token:new p(se.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:ue,alignment:0,line_indent_level:y?y.line_indent_level:ue,start_line_index:this._output.get_line_number(),ternary_depth:0};return Qe},ae.prototype._reset=function(y){var Y=y.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new k(this._options,Y),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(z.BlockStatement);var ue=new F(y,this._options);return this._tokens=ue.tokenize(),y},ae.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var y,Y=this._reset(this._source_text),ue=this._options.eol;this._options.eol==="auto"&&(ue=`
`,Y&&m.lineBreak.test(Y||"")&&(ue=Y.match(m.lineBreak)[0]));for(var Qe=this._tokens.next();Qe;)this.handle_token(Qe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Qe,Qe=this._tokens.next();return y=this._output.get_code(ue),y},ae.prototype.handle_token=function(y,Y){y.type===se.START_EXPR?this.handle_start_expr(y):y.type===se.END_EXPR?this.handle_end_expr(y):y.type===se.START_BLOCK?this.handle_start_block(y):y.type===se.END_BLOCK?this.handle_end_block(y):y.type===se.WORD?this.handle_word(y):y.type===se.RESERVED?this.handle_word(y):y.type===se.SEMICOLON?this.handle_semicolon(y):y.type===se.STRING?this.handle_string(y):y.type===se.EQUALS?this.handle_equals(y):y.type===se.OPERATOR?this.handle_operator(y):y.type===se.COMMA?this.handle_comma(y):y.type===se.BLOCK_COMMENT?this.handle_block_comment(y,Y):y.type===se.COMMENT?this.handle_comment(y,Y):y.type===se.DOT?this.handle_dot(y):y.type===se.EOF?this.handle_eof(y):y.type===se.UNKNOWN?this.handle_unknown(y,Y):this.handle_unknown(y,Y)},ae.prototype.handle_whitespace_and_comments=function(y,Y){var ue=y.newlines,Qe=this._options.keep_array_indentation&&U(this._flags.mode);if(y.comments_before)for(var et=y.comments_before.next();et;)this.handle_whitespace_and_comments(et,Y),this.handle_token(et,Y),et=y.comments_before.next();if(Qe)for(var gt=0;gt<ue;gt+=1)this.print_newline(gt>0,Y);else if(this._options.max_preserve_newlines&&ue>this._options.max_preserve_newlines&&(ue=this._options.max_preserve_newlines),this._options.preserve_newlines&&ue>1){this.print_newline(!1,Y);for(var bt=1;bt<ue;bt+=1)this.print_newline(!0,Y)}};var _=["async","break","continue","return","throw","yield"];ae.prototype.allow_wrap_or_preserved_newline=function(y,Y){if(Y=Y===void 0?!1:Y,!this._output.just_added_newline()){var ue=this._options.preserve_newlines&&y.newlines||Y,Qe=H(this._flags.last_token.text,j)||H(y.text,j);if(Qe){var et=H(this._flags.last_token.text,j)&&H(this._options.operator_position,ge)||H(y.text,j);ue=ue&&et}if(ue)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(fe(this._flags.last_token,_))return;this._output.set_wrap_point()}}},ae.prototype.print_newline=function(y,Y){if(!Y&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==se.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ue=this._tokens.peek();this._flags.mode===z.Statement&&!(this._flags.if_block&&R(ue,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(y)&&(this._flags.multiline_frame=!0)},ae.prototype.print_token_line_indentation=function(y){this._output.just_added_newline()&&(this._options.keep_array_indentation&&y.newlines&&(y.text==="["||U(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))},ae.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===se.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Y=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Y),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)},ae.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},ae.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))},ae.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)},ae.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===z.Statement&&Fe(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},ae.prototype.start_of_object_property=function(){return this._flags.parent.mode===z.ObjectLiteral&&this._flags.mode===z.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||fe(this._flags.last_token,["get","set"]))},ae.prototype.start_of_statement=function(y){var Y=!1;return Y=Y||fe(this._flags.last_token,["var","let","const"])&&y.type===se.WORD,Y=Y||R(this._flags.last_token,"do"),Y=Y||!(this._flags.parent.mode===z.ObjectLiteral&&this._flags.mode===z.Statement)&&fe(this._flags.last_token,_)&&!y.newlines,Y=Y||R(this._flags.last_token,"else")&&!(R(y,"if")&&!y.comments_before),Y=Y||this._flags.last_token.type===se.END_EXPR&&(this._previous_flags.mode===z.ForInitializer||this._previous_flags.mode===z.Conditional),Y=Y||this._flags.last_token.type===se.WORD&&this._flags.mode===z.BlockStatement&&!this._flags.in_case&&!(y.text==="--"||y.text==="++")&&this._last_last_text!=="function"&&y.type!==se.WORD&&y.type!==se.RESERVED,Y=Y||this._flags.mode===z.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||fe(this._flags.last_token,["get","set"])),Y?(this.set_mode(z.Statement),this.indent(),this.handle_whitespace_and_comments(y,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(y,fe(y,["do","for","if","while"])),!0):!1},ae.prototype.handle_start_expr=function(y){this.start_of_statement(y)||this.handle_whitespace_and_comments(y);var Y=z.Expression;if(y.text==="["){if(this._flags.last_token.type===se.WORD||this._flags.last_token.text===")"){fe(this._flags.last_token,V)&&(this._output.space_before_token=!0),this.print_token(y),this.set_mode(Y),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Y=z.ArrayLiteral,U(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),H(this._flags.last_token.type,[se.START_EXPR,se.END_EXPR,se.WORD,se.OPERATOR,se.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===se.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Y=z.ForInitializer):H(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Y=z.Conditional):H(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:(H(this._flags.last_token.text,V)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===se.EQUALS||this._flags.last_token.type===se.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(y);else if(this._flags.last_token.type===se.WORD){this._output.space_before_token=!1;var ue=this._tokens.peek(-3);if(this._options.space_after_named_function&&ue){var Qe=this._tokens.peek(-4);fe(ue,["async","function"])||ue.text==="*"&&fe(Qe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===z.ObjectLiteral?(ue.text==="{"||ue.text===","||ue.text==="*"&&(Qe.text==="{"||Qe.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(y);(this._flags.last_token.type===se.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(H(this._last_last_text,["function","yield"])||this._flags.mode===z.ObjectLiteral&&H(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===se.START_BLOCK?this.print_newline():(this._flags.last_token.type===se.END_EXPR||this._flags.last_token.type===se.START_EXPR||this._flags.last_token.type===se.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===se.COMMA)&&this.allow_wrap_or_preserved_newline(y,y.newlines),this.print_token(y),this.set_mode(Y),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},ae.prototype.handle_end_expr=function(y){for(;this._flags.mode===z.Statement;)this.restore_mode();this.handle_whitespace_and_comments(y),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(y,y.text==="]"&&U(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===se.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(),Fe(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===z.Conditional&&(this._previous_flags.mode=z.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},ae.prototype.handle_start_block=function(y){this.handle_whitespace_and_comments(y);var Y=this._tokens.peek(),ue=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===se.END_EXPR?(this.set_mode(z.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(z.BlockStatement):ue&&(H(ue.text,[":",","])&&H(Y.type,[se.STRING,se.WORD,se.RESERVED])||H(Y.text,["get","set","..."])&&H(ue.type,[se.WORD,se.RESERVED]))?H(this._last_last_text,["class","interface"])&&!H(ue.text,[":",","])?this.set_mode(z.BlockStatement):this.set_mode(z.ObjectLiteral):this._flags.last_token.type===se.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(z.BlockStatement):H(this._flags.last_token.type,[se.EQUALS,se.START_EXPR,se.COMMA,se.OPERATOR])||fe(this._flags.last_token,["return","throw","import","default"])?this.set_mode(z.ObjectLiteral):this.set_mode(z.BlockStatement),this._flags.last_token&&fe(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Qe=!Y.comments_before&&Y.text==="}",et=Qe&&this._flags.last_word==="function"&&this._flags.last_token.type===se.END_EXPR;if(this._options.brace_preserve_inline){var gt=0,bt=null;this._flags.inline_frame=!0;do if(gt+=1,bt=this._tokens.peek(gt-1),bt.newlines){this._flags.inline_frame=!1;break}while(bt.type!==se.EOF&&!(bt.type===se.END_BLOCK&&bt.opened===y))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&y.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==se.OPERATOR&&(et||this._flags.last_token.type===se.EQUALS||fe(this._flags.last_token,de)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(U(this._previous_flags.mode)&&(this._flags.last_token.type===se.START_EXPR||this._flags.last_token.type===se.COMMA)&&((this._flags.last_token.type===se.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===se.COMMA||this._flags.last_token.type===se.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!==se.OPERATOR&&this._flags.last_token.type!==se.START_EXPR&&(H(this._flags.last_token.type,[se.START_BLOCK,se.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(y),this.indent(),!Qe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},ae.prototype.handle_end_block=function(y){for(this.handle_whitespace_and_comments(y);this._flags.mode===z.Statement;)this.restore_mode();var Y=this._flags.last_token.type===se.START_BLOCK;this._flags.inline_frame&&!Y?this._output.space_before_token=!0:this._options.brace_style==="expand"?Y||this.print_newline():Y||(U(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)},ae.prototype.handle_word=function(y){if(y.type===se.RESERVED){if(H(y.text,["set","get"])&&this._flags.mode!==z.ObjectLiteral)y.type=se.WORD;else if(y.text==="import"&&H(this._tokens.peek().text,["(","."]))y.type=se.WORD;else if(H(y.text,["as","from"])&&!this._flags.import_block)y.type=se.WORD;else if(this._flags.mode===z.ObjectLiteral){var Y=this._tokens.peek();Y.text===":"&&(y.type=se.WORD)}}if(this.start_of_statement(y)?fe(this._flags.last_token,["var","let","const"])&&y.type===se.WORD&&(this._flags.declaration_statement=!0):y.newlines&&!K(this._flags.mode)&&(this._flags.last_token.type!==se.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==se.EQUALS&&(this._options.preserve_newlines||!fe(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(R(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&&R(y,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===z.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&fe(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===se.COMMA||this._flags.last_token.type===se.START_EXPR||this._flags.last_token.type===se.EQUALS||this._flags.last_token.type===se.OPERATOR)&&!this.start_of_object_property()&&!(H(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===z.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(y),R(y,"function")){(H(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(H(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===se.OPERATOR))&&!this._output.just_added_blankline()&&!y.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===se.RESERVED||this._flags.last_token.type===se.WORD?fe(this._flags.last_token,["get","set","new","export"])||fe(this._flags.last_token,_)?this._output.space_before_token=!0:R(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===se.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(K(this._flags.mode)||U(this._flags.mode))||this.print_newline(),this.print_token(y),this._flags.last_word=y.text;return}var ue="NONE";if(this._flags.last_token.type===se.END_BLOCK?this._previous_flags.inline_frame?ue="SPACE":fe(y,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&y.newlines?ue="NEWLINE":(ue="SPACE",this._output.space_before_token=!0):ue="NEWLINE":this._flags.last_token.type===se.SEMICOLON&&this._flags.mode===z.BlockStatement?ue="NEWLINE":this._flags.last_token.type===se.SEMICOLON&&K(this._flags.mode)?ue="SPACE":this._flags.last_token.type===se.STRING?ue="NEWLINE":this._flags.last_token.type===se.RESERVED||this._flags.last_token.type===se.WORD||this._flags.last_token.text==="*"&&(H(this._last_last_text,["function","yield"])||this._flags.mode===z.ObjectLiteral&&H(this._last_last_text,["{",","]))?ue="SPACE":this._flags.last_token.type===se.START_BLOCK?this._flags.inline_frame?ue="SPACE":ue="NEWLINE":this._flags.last_token.type===se.END_EXPR&&(this._output.space_before_token=!0,ue="NEWLINE"),fe(y,V)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ue="SPACE":ue="NEWLINE"),fe(y,["else","catch","finally"]))if((!(this._flags.last_token.type===se.END_BLOCK&&this._previous_flags.mode===z.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 Qe=this._output.current_line;Qe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ue==="NEWLINE"?fe(this._flags.last_token,de)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&fe(y,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==se.END_EXPR?(this._flags.last_token.type!==se.START_EXPR||!fe(y,["var","let","const"]))&&this._flags.last_token.text!==":"&&(R(y,"if")&&R(y.previous,"else")?this._output.space_before_token=!0:this.print_newline()):fe(y,V)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&U(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ue==="SPACE"&&(this._output.space_before_token=!0);y.previous&&(y.previous.type===se.WORD||y.previous.type===se.RESERVED)&&(this._output.space_before_token=!0),this.print_token(y),this._flags.last_word=y.text,y.type===se.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&&R(y,"from")&&(this._flags.import_block=!1))},ae.prototype.handle_semicolon=function(y){this.start_of_statement(y)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(y);for(var Y=this._tokens.peek();this._flags.mode===z.Statement&&!(this._flags.if_block&&R(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(y)},ae.prototype.handle_string=function(y){y.text.startsWith("`")&&y.newlines===0&&y.whitespace_before===""&&(y.previous.text===")"||this._flags.last_token.type===se.WORD)||(this.start_of_statement(y)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(y),this._flags.last_token.type===se.RESERVED||this._flags.last_token.type===se.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===se.COMMA||this._flags.last_token.type===se.START_EXPR||this._flags.last_token.type===se.EQUALS||this._flags.last_token.type===se.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(y):y.text.startsWith("`")&&this._flags.last_token.type===se.END_EXPR&&(y.previous.text==="]"||y.previous.text===")")&&y.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(y)},ae.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},ae.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?(K(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===z.ObjectLiteral||this._flags.mode===z.Statement&&this._flags.parent.mode===z.ObjectLiteral?(this._flags.mode===z.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(y)},ae.prototype.handle_operator=function(y){var Y=y.text==="*"&&(fe(this._flags.last_token,["function","yield"])||H(this._flags.last_token.type,[se.START_BLOCK,se.COMMA,se.END_BLOCK,se.SEMICOLON])),ue=H(y.text,["-","+"])&&(H(this._flags.last_token.type,[se.START_BLOCK,se.START_EXPR,se.EQUALS,se.OPERATOR])||H(this._flags.last_token.text,V)||this._flags.last_token.text===",");if(!this.start_of_statement(y)){var Qe=!Y;this.handle_whitespace_and_comments(y,Qe)}if(y.text==="*"&&this._flags.last_token.type===se.DOT){this.print_token(y);return}if(y.text==="::"){this.print_token(y);return}if(H(y.text,["-","+"])&&this.start_of_object_property()){this.print_token(y);return}if(this._flags.last_token.type===se.OPERATOR&&H(this._options.operator_position,ge)&&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!==se.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 et=!0,gt=!0,bt=!1;if(y.text===":"?this._flags.ternary_depth===0?et=!1:(this._flags.ternary_depth-=1,bt=!0):y.text==="?"&&(this._flags.ternary_depth+=1),!ue&&!Y&&this._options.preserve_newlines&&H(y.text,j)){var Vt=y.text===":",Rt=Vt&&bt,te=Vt&&!bt;switch(this._options.operator_position){case q.before_newline:this._output.space_before_token=!te,this.print_token(y),(!Vt||Rt)&&this.allow_wrap_or_preserved_newline(y),this._output.space_before_token=!0;return;case q.after_newline:this._output.space_before_token=!0,!Vt||Rt?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 q.preserve_newline:te||this.allow_wrap_or_preserved_newline(y),et=!(this._output.just_added_newline()||te),this._output.space_before_token=et,this.print_token(y),this._output.space_before_token=!0;return}}if(Y){this.allow_wrap_or_preserved_newline(y),et=!1;var Le=this._tokens.peek();gt=Le&&H(Le.type,[se.WORD,se.RESERVED])}else if(y.text==="...")this.allow_wrap_or_preserved_newline(y),et=this._flags.last_token.type===se.START_BLOCK,gt=!1;else if(H(y.text,["--","++","!","~"])||ue){if((this._flags.last_token.type===se.COMMA||this._flags.last_token.type===se.START_EXPR)&&this.allow_wrap_or_preserved_newline(y),et=!1,gt=!1,y.newlines&&(y.text==="--"||y.text==="++"||y.text==="~")){var mt=fe(this._flags.last_token,de)&&y.newlines;mt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(mt,!0)}this._flags.last_token.text===";"&&K(this._flags.mode)&&(et=!0),this._flags.last_token.type===se.RESERVED?et=!0:this._flags.last_token.type===se.END_EXPR?et=!(this._flags.last_token.text==="]"&&(y.text==="--"||y.text==="++")):this._flags.last_token.type===se.OPERATOR&&(et=H(y.text,["--","-","++","+"])&&H(this._flags.last_token.text,["--","-","++","+"]),H(y.text,["+","-"])&&H(this._flags.last_token.text,["--","++"])&&(gt=!0)),(this._flags.mode===z.BlockStatement&&!this._flags.inline_frame||this._flags.mode===z.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||et,this.print_token(y),this._output.space_before_token=gt},ae.prototype.handle_block_comment=function(y,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,Y),this.print_token(y),y.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!m.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,Y)},ae.prototype.print_block_commment=function(y,Y){var ue=Z(y.text),Qe,et=!1,gt=!1,bt=y.whitespace_before,Vt=bt.length;if(this.print_newline(!1,Y),this.print_token_line_indentation(y),this._output.add_token(ue[0]),this.print_newline(!1,Y),ue.length>1){for(ue=ue.slice(1),et=ee(ue,"*"),gt=he(ue,bt),et&&(this._flags.alignment=1),Qe=0;Qe<ue.length;Qe++)et?(this.print_token_line_indentation(y),this._output.add_token(X(ue[Qe]))):gt&&ue[Qe]?(this.print_token_line_indentation(y),this._output.add_token(ue[Qe].substring(Vt))):(this._output.current_line.set_indent(-1),this._output.add_token(ue[Qe])),this.print_newline(!1,Y);this._flags.alignment=0}},ae.prototype.handle_comment=function(y,Y){y.newlines?this.print_newline(!1,Y):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(y),this.print_newline(!1,Y)},ae.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),fe(this._flags.last_token,de)?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)},ae.prototype.handle_unknown=function(y,Y){this.print_token(y),y.text[y.text.length-1]===`
`&&this.print_newline(!1,Y)},ae.prototype.handle_eof=function(y){for(;this._flags.mode===z.Statement;)this.restore_mode();this.handle_whitespace_and_comments(y)},G.exports.Beautifier=ae},function(G){function A(p){this.__parent=p,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=[]}A.prototype.clone_empty=function(){var p=new A(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},A.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},A.prototype.has_match=function(p){for(var m=this.__items.length-1;m>=0;m--)if(this.__items[m].match(p))return!0;return!1},A.prototype.set_indent=function(p,m){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=m||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.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)},A.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},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(p){this.__items.push(p);var m=p.lastIndexOf(`
`);m!==-1?this.__character_count=p.length-m:this.__character_count+=p.length},A.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function S(p,m){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),m=m||"",p.indent_level>0&&(m=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=m,this.__base_string_length=m.length}S.prototype.get_indent_size=function(p,m){var B=this.__base_string_length;return m=m||0,p<0&&(B=0),B+=p*this.__indent_size,B+=m,B},S.prototype.get_indent_string=function(p,m){var B=this.__base_string;return m=m||0,p<0&&(p=0,B=""),m+=p*this.__indent_size,this.__ensure_cache(m),B+=this.__cache[m],B},S.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},S.prototype.__add_column=function(){var p=this.__cache.length,m=0,B="";this.__indent_size&&p>=this.__indent_size&&(m=Math.floor(p/this.__indent_size),p-=m*this.__indent_size,B=new Array(m+1).join(this.__indent_string)),p&&(B+=new Array(p+1).join(" ")),this.__cache.push(B)};function k(p,m){this.__indent_cache=new S(p,m),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}k.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},k.prototype.get_line_number=function(){return this.__lines.length},k.prototype.get_indent_string=function(p,m){return this.__indent_cache.get_indent_string(p,m)},k.prototype.get_indent_size=function(p,m){return this.__indent_cache.get_indent_size(p,m)},k.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},k.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},k.prototype.get_code=function(p){this.trim(!0);var m=this.current_line.pop();m&&(m[m.length-1]===`
`&&(m=m.replace(/\n+$/g,"")),this.current_line.push(m)),this._end_with_newline&&this.__add_outputline();var B=this.__lines.join(`
`);return p!==`
`&&(B=B.replace(/[\n]/g,p)),B},k.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},k.prototype.set_indent=function(p,m){return p=p||0,m=m||0,this.next_line.set_indent(p,m),this.__lines.length>1?(this.current_line.set_indent(p,m),!0):(this.current_line.set_indent(),!1)},k.prototype.add_raw_token=function(p){for(var m=0;m<p.newlines;m++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},k.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},k.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(" "))},k.prototype.remove_indent=function(p){for(var m=this.__lines.length;p<m;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},k.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&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},k.prototype.just_added_newline=function(){return this.current_line.is_empty()},k.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},k.prototype.ensure_empty_line_above=function(p,m){for(var B=this.__lines.length-2;B>=0;){var F=this.__lines[B];if(F.is_empty())break;if(F.item(0).indexOf(p)!==0&&F.item(-1)!==m){this.__lines.splice(B+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}B--}},G.exports.Output=k},function(G){function A(S,k,p,m){this.type=S,this.text=k,this.comments_before=null,this.newlines=p||0,this.whitespace_before=m||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}G.exports.Token=A},function(G,A){var S="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",k="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",m="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",B="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",F="(?:"+B+"|["+S+p+"])",V="(?:"+B+"|["+k+p+m+"])*";A.identifier=new RegExp(F+V,"g"),A.identifierStart=new RegExp(F),A.identifierMatch=new RegExp("(?:"+B+"|["+k+p+m+"])+");var j=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;A.newline=/[\n\r\u2028\u2029]/,A.lineBreak=new RegExp(`\r
|`+A.newline.source),A.allLineBreaks=new RegExp(A.lineBreak.source,"g")},function(G,A,S){var k=S(6).Options,p=["before-newline","after-newline","preserve-newline"];function m(B){k.call(this,B,"js");var F=this.raw_options.brace_style||null;F==="expand-strict"?this.raw_options.brace_style="expand":F==="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 V=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var j=0;j<V.length;j++)V[j]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=V[j];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",p),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}m.prototype=new k,G.exports.Options=m},function(G){function A(p,m){this.raw_options=S(p,m),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}A.prototype._get_array=function(p,m){var B=this.raw_options[p],F=m||[];return typeof B=="object"?B!==null&&typeof B.concat=="function"&&(F=B.concat()):typeof B=="string"&&(F=B.split(/[^a-zA-Z0-9_\/\-]+/)),F},A.prototype._get_boolean=function(p,m){var B=this.raw_options[p],F=B===void 0?!!m:!!B;return F},A.prototype._get_characters=function(p,m){var B=this.raw_options[p],F=m||"";return typeof B=="string"&&(F=B.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),F},A.prototype._get_number=function(p,m){var B=this.raw_options[p];m=parseInt(m,10),isNaN(m)&&(m=0);var F=parseInt(B,10);return isNaN(F)&&(F=m),F},A.prototype._get_selection=function(p,m,B){var F=this._get_selection_list(p,m,B);if(F.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
`+m+`
You passed in: '`+this.raw_options[p]+"'");return F[0]},A.prototype._get_selection_list=function(p,m,B){if(!m||m.length===0)throw new Error("Selection list cannot be empty.");if(B=B||[m[0]],!this._is_valid_selection(B,m))throw new Error("Invalid Default Value!");var F=this._get_array(p,B);if(!this._is_valid_selection(F,m))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
`+m+`
You passed in: '`+this.raw_options[p]+"'");return F},A.prototype._is_valid_selection=function(p,m){return p.length&&m.length&&!p.some(function(B){return m.indexOf(B)===-1})};function S(p,m){var B={};p=k(p);var F;for(F in p)F!==m&&(B[F]=p[F]);if(m&&p[m])for(F in p[m])B[F]=p[m][F];return B}function k(p){var m={},B;for(B in p){var F=B.replace(/-/g,"_");m[F]=p[B]}return m}G.exports.Options=A,G.exports.normalizeOpts=k,G.exports.mergeOpts=S},function(G,A,S){var k=S(8).InputScanner,p=S(9).Tokenizer,m=S(9).TOKEN,B=S(13).Directives,F=S(4),V=S(12).Pattern,j=S(14).TemplatablePattern;function se(ee,he){return he.indexOf(ee)!==-1}var H={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:m.START,RAW:m.RAW,EOF:m.EOF},X=new B(/\/\*/,/\*\//),P=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,R=/[0-9]/,fe=/[^\d\.]/,de=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ie=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ie=ie.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ie="\\?\\.(?!\\d) "+ie,ie=ie.replace(/ /g,"|");var q=new RegExp(ie),ge="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),z=ge.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Fe=new RegExp("^(?:"+z.join("|")+")$"),Z,U=function(ee,he){p.call(this,ee,he),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var ae=new V(this._input),_=new j(this._input).read_options(this._options);this.__patterns={template:_,identifier:_.starting_with(F.identifier).matching(F.identifierMatch),number:ae.matching(P),punct:ae.matching(q),comment:ae.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:ae.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:ae.matching(/<!--/),html_comment_end:ae.matching(/-->/),include:ae.starting_with(/#include/).until_after(F.lineBreak),shebang:ae.starting_with(/#!/).until_after(F.lineBreak),xml:ae.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:_.until(/['\\\n\r\u2028\u2029]/),double_quote:_.until(/["\\\n\r\u2028\u2029]/),template_text:_.until(/[`\\$]/),template_expression:_.until(/[`}\\]/)}};U.prototype=new p,U.prototype._is_comment=function(ee){return ee.type===H.COMMENT||ee.type===H.BLOCK_COMMENT||ee.type===H.UNKNOWN},U.prototype._is_opening=function(ee){return ee.type===H.START_BLOCK||ee.type===H.START_EXPR},U.prototype._is_closing=function(ee,he){return(ee.type===H.END_BLOCK||ee.type===H.END_EXPR)&&he&&(ee.text==="]"&&he.text==="["||ee.text===")"&&he.text==="("||ee.text==="}"&&he.text==="{")},U.prototype._reset=function(){Z=!1},U.prototype._get_next_token=function(ee,he){var ae=null;this._readWhitespace();var _=this._input.peek();return _===null?this._create_token(H.EOF,""):(ae=ae||this._read_non_javascript(_),ae=ae||this._read_string(_),ae=ae||this._read_pair(_,this._input.peek(1)),ae=ae||this._read_word(ee),ae=ae||this._read_singles(_),ae=ae||this._read_comment(_),ae=ae||this._read_regexp(_,ee),ae=ae||this._read_xml(_,ee),ae=ae||this._read_punctuation(),ae=ae||this._create_token(H.UNKNOWN,this._input.next()),ae)},U.prototype._read_word=function(ee){var he;if(he=this.__patterns.identifier.read(),he!=="")return he=he.replace(F.allLineBreaks,`
`),!(ee.type===H.DOT||ee.type===H.RESERVED&&(ee.text==="set"||ee.text==="get"))&&Fe.test(he)?(he==="in"||he==="of")&&(ee.type===H.WORD||ee.type===H.STRING)?this._create_token(H.OPERATOR,he):this._create_token(H.RESERVED,he):this._create_token(H.WORD,he);if(he=this.__patterns.number.read(),he!=="")return this._create_token(H.WORD,he)},U.prototype._read_singles=function(ee){var he=null;return ee==="("||ee==="["?he=this._create_token(H.START_EXPR,ee):ee===")"||ee==="]"?he=this._create_token(H.END_EXPR,ee):ee==="{"?he=this._create_token(H.START_BLOCK,ee):ee==="}"?he=this._create_token(H.END_BLOCK,ee):ee===";"?he=this._create_token(H.SEMICOLON,ee):ee==="."&&fe.test(this._input.peek(1))?he=this._create_token(H.DOT,ee):ee===","&&(he=this._create_token(H.COMMA,ee)),he&&this._input.next(),he},U.prototype._read_pair=function(ee,he){var ae=null;return ee==="#"&&he==="{"&&(ae=this._create_token(H.START_BLOCK,ee+he)),ae&&(this._input.next(),this._input.next()),ae},U.prototype._read_punctuation=function(){var ee=this.__patterns.punct.read();if(ee!=="")return ee==="="?this._create_token(H.EQUALS,ee):ee==="?."?this._create_token(H.DOT,ee):this._create_token(H.OPERATOR,ee)},U.prototype._read_non_javascript=function(ee){var he="";if(ee==="#"){if(this._is_first_token()&&(he=this.__patterns.shebang.read(),he))return this._create_token(H.UNKNOWN,he.trim()+`
`);if(he=this.__patterns.include.read(),he)return this._create_token(H.UNKNOWN,he.trim()+`
`);ee=this._input.next();var ae="#";if(this._input.hasNext()&&this._input.testChar(R)){do ee=this._input.next(),ae+=ee;while(this._input.hasNext()&&ee!=="#"&&ee!=="=");return ee==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(ae+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(ae+="{}",this._input.next(),this._input.next())),this._create_token(H.WORD,ae)}this._input.back()}else if(ee==="<"&&this._is_first_token()){if(he=this.__patterns.html_comment_start.read(),he){for(;this._input.hasNext()&&!this._input.testChar(F.newline);)he+=this._input.next();return Z=!0,this._create_token(H.COMMENT,he)}}else if(Z&&ee==="-"&&(he=this.__patterns.html_comment_end.read(),he))return Z=!1,this._create_token(H.COMMENT,he);return null},U.prototype._read_comment=function(ee){var he=null;if(ee==="/"){var ae="";if(this._input.peek(1)==="*"){ae=this.__patterns.block_comment.read();var _=X.get_directives(ae);_&&_.ignore==="start"&&(ae+=X.readIgnored(this._input)),ae=ae.replace(F.allLineBreaks,`
`),he=this._create_token(H.BLOCK_COMMENT,ae),he.directives=_}else this._input.peek(1)==="/"&&(ae=this.__patterns.comment.read(),he=this._create_token(H.COMMENT,ae))}return he},U.prototype._read_string=function(ee){if(ee==="`"||ee==="'"||ee==='"'){var he=this._input.next();return this.has_char_escapes=!1,ee==="`"?he+=this._read_string_recursive("`",!0,"${"):he+=this._read_string_recursive(ee),this.has_char_escapes&&this._options.unescape_strings&&(he=K(he)),this._input.peek()===ee&&(he+=this._input.next()),he=he.replace(F.allLineBreaks,`
`),this._create_token(H.STRING,he)}return null},U.prototype._allow_regexp_or_xml=function(ee){return ee.type===H.RESERVED&&se(ee.text,["return","case","throw","else","do","typeof","yield"])||ee.type===H.END_EXPR&&ee.text===")"&&ee.opened.previous.type===H.RESERVED&&se(ee.opened.previous.text,["if","while","for"])||se(ee.type,[H.COMMENT,H.START_EXPR,H.START_BLOCK,H.START,H.END_BLOCK,H.OPERATOR,H.EQUALS,H.EOF,H.SEMICOLON,H.COMMA])},U.prototype._read_regexp=function(ee,he){if(ee==="/"&&this._allow_regexp_or_xml(he)){for(var ae=this._input.next(),_=!1,y=!1;this._input.hasNext()&&(_||y||this._input.peek()!==ee)&&!this._input.testChar(F.newline);)ae+=this._input.peek(),_?_=!1:(_=this._input.peek()==="\\",this._input.peek()==="["?y=!0:this._input.peek()==="]"&&(y=!1)),this._input.next();return this._input.peek()===ee&&(ae+=this._input.next(),ae+=this._input.read(F.identifier)),this._create_token(H.STRING,ae)}return null},U.prototype._read_xml=function(ee,he){if(this._options.e4x&&ee==="<"&&this._allow_regexp_or_xml(he)){var ae="",_=this.__patterns.xml.read_match();if(_){for(var y=_[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Y=y.indexOf("{")===0,ue=0;_;){var Qe=!!_[1],et=_[2],gt=!!_[_.length-1]||et.slice(0,8)==="![CDATA[";if(!gt&&(et===y||Y&&et.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Qe?--ue:++ue),ae+=_[0],ue<=0)break;_=this.__patterns.xml.read_match()}return _||(ae+=this._input.match(/[\s\S]*/g)[0]),ae=ae.replace(F.allLineBreaks,`
`),this._create_token(H.STRING,ae)}}return null};function K(ee){for(var he="",ae=0,_=new k(ee),y=null;_.hasNext();)if(y=_.match(/([\s]|[^\\]|\\\\)+/g),y&&(he+=y[0]),_.peek()==="\\"){if(_.next(),_.peek()==="x")y=_.match(/x([0-9A-Fa-f]{2})/g);else if(_.peek()==="u")y=_.match(/u([0-9A-Fa-f]{4})/g),y||(y=_.match(/u\{([0-9A-Fa-f]+)\}/g));else{he+="\\",_.hasNext()&&(he+=_.next());continue}if(!y||(ae=parseInt(y[1],16),ae>126&&ae<=255&&y[0].indexOf("x")===0))return ee;ae>=0&&ae<32||ae>1114111?he+="\\"+y[0]:ae===34||ae===39||ae===92?he+="\\"+String.fromCharCode(ae):he+=String.fromCharCode(ae)}return he}U.prototype._read_string_recursive=function(ee,he,ae){var _,y;ee==="'"?y=this.__patterns.single_quote:ee==='"'?y=this.__patterns.double_quote:ee==="`"?y=this.__patterns.template_text:ee==="}"&&(y=this.__patterns.template_expression);for(var Y=y.read(),ue="";this._input.hasNext();){if(ue=this._input.next(),ue===ee||!he&&F.newline.test(ue)){this._input.back();break}else ue==="\\"&&this._input.hasNext()?(_=this._input.peek(),_==="x"||_==="u"?this.has_char_escapes=!0:_==="\r"&&this._input.peek(1)===`
`&&this._input.next(),ue+=this._input.next()):ae&&(ae==="${"&&ue==="$"&&this._input.peek()==="{"&&(ue+=this._input.next()),ae===ue&&(ee==="`"?ue+=this._read_string_recursive("}",he,"`"):ue+=this._read_string_recursive("`",he,"${"),this._input.hasNext()&&(ue+=this._input.next())));ue+=y.read(),Y+=ue}return Y},G.exports.Tokenizer=U,G.exports.TOKEN=H,G.exports.positionable_operators=de.slice(),G.exports.line_starters=ge.slice()},function(G){var A=RegExp.prototype.hasOwnProperty("sticky");function S(k){this.__input=k||"",this.__input_length=this.__input.length,this.__position=0}S.prototype.restart=function(){this.__position=0},S.prototype.back=function(){this.__position>0&&(this.__position-=1)},S.prototype.hasNext=function(){return this.__position<this.__input_length},S.prototype.next=function(){var k=null;return this.hasNext()&&(k=this.__input.charAt(this.__position),this.__position+=1),k},S.prototype.peek=function(k){var p=null;return k=k||0,k+=this.__position,k>=0&&k<this.__input_length&&(p=this.__input.charAt(k)),p},S.prototype.__match=function(k,p){k.lastIndex=p;var m=k.exec(this.__input);return m&&!(A&&k.sticky)&&m.index!==p&&(m=null),m},S.prototype.test=function(k,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(k,p):!1},S.prototype.testChar=function(k,p){var m=this.peek(p);return k.lastIndex=0,m!==null&&k.test(m)},S.prototype.match=function(k){var p=this.__match(k,this.__position);return p?this.__position+=p[0].length:p=null,p},S.prototype.read=function(k,p,m){var B="",F;return k&&(F=this.match(k),F&&(B+=F[0])),p&&(F||!k)&&(B+=this.readUntil(p,m)),B},S.prototype.readUntil=function(k,p){var m="",B=this.__position;k.lastIndex=this.__position;var F=k.exec(this.__input);return F?(B=F.index,p&&(B+=F[0].length)):B=this.__input_length,m=this.__input.substring(this.__position,B),this.__position=B,m},S.prototype.readUntilAfter=function(k){return this.readUntil(k,!0)},S.prototype.get_regexp=function(k,p){var m=null,B="g";return p&&A&&(B="y"),typeof k=="string"&&k!==""?m=new RegExp(k,B):k&&(m=new RegExp(k.source,B)),m},S.prototype.get_literal_regexp=function(k){return RegExp(k.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},S.prototype.peekUntilAfter=function(k){var p=this.__position,m=this.readUntilAfter(k);return this.__position=p,m},S.prototype.lookBack=function(k){var p=this.__position-1;return p>=k.length&&this.__input.substring(p-k.length,p).toLowerCase()===k},G.exports.InputScanner=S},function(G,A,S){var k=S(8).InputScanner,p=S(3).Token,m=S(10).TokenStream,B=S(11).WhitespacePattern,F={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},V=function(j,se){this._input=new k(j),this._options=se||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new B(this._input)};V.prototype.tokenize=function(){this._input.restart(),this.__tokens=new m,this._reset();for(var j,se=new p(F.START,""),H=null,X=[],P=new m;se.type!==F.EOF;){for(j=this._get_next_token(se,H);this._is_comment(j);)P.add(j),j=this._get_next_token(se,H);P.isEmpty()||(j.comments_before=P,P=new m),j.parent=H,this._is_opening(j)?(X.push(H),H=j):H&&this._is_closing(j,H)&&(j.opened=H,H.closed=j,H=X.pop(),j.parent=H),j.previous=se,se.next=j,this.__tokens.add(j),se=j}return this.__tokens},V.prototype._is_first_token=function(){return this.__tokens.isEmpty()},V.prototype._reset=function(){},V.prototype._get_next_token=function(j,se){this._readWhitespace();var H=this._input.read(/.+/g);return H?this._create_token(F.RAW,H):this._create_token(F.EOF,"")},V.prototype._is_comment=function(j){return!1},V.prototype._is_opening=function(j){return!1},V.prototype._is_closing=function(j,se){return!1},V.prototype._create_token=function(j,se){var H=new p(j,se,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return H},V.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},G.exports.Tokenizer=V,G.exports.TOKEN=F},function(G){function A(S){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=S}A.prototype.restart=function(){this.__position=0},A.prototype.isEmpty=function(){return this.__tokens_length===0},A.prototype.hasNext=function(){return this.__position<this.__tokens_length},A.prototype.next=function(){var S=null;return this.hasNext()&&(S=this.__tokens[this.__position],this.__position+=1),S},A.prototype.peek=function(S){var k=null;return S=S||0,S+=this.__position,S>=0&&S<this.__tokens_length&&(k=this.__tokens[S]),k},A.prototype.add=function(S){this.__parent_token&&(S.parent=this.__parent_token),this.__tokens.push(S),this.__tokens_length+=1},G.exports.TokenStream=A},function(G,A,S){var k=S(12).Pattern;function p(m,B){k.call(this,m,B),B?this._line_regexp=this._input.get_regexp(B._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}p.prototype=new k,p.prototype.__set_whitespace_patterns=function(m,B){m+="\\t ",B+="\\n\\r",this._match_pattern=this._input.get_regexp("["+m+B+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+B+"]")},p.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var m=this._input.read(this._match_pattern);if(m===" ")this.whitespace_before_token=" ";else if(m){var B=this.__split(this._newline_regexp,m);this.newline_count=B.length-1,this.whitespace_before_token=B[this.newline_count]}return m},p.prototype.matching=function(m,B){var F=this._create();return F.__set_whitespace_patterns(m,B),F._update(),F},p.prototype._create=function(){return new p(this._input,this)},p.prototype.__split=function(m,B){m.lastIndex=0;for(var F=0,V=[],j=m.exec(B);j;)V.push(B.substring(F,j.index)),F=j.index+j[0].length,j=m.exec(B);return F<B.length?V.push(B.substring(F,B.length)):V.push(""),V},G.exports.WhitespacePattern=p},function(G){function A(S,k){this._input=S,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,k&&(this._starting_pattern=this._input.get_regexp(k._starting_pattern,!0),this._match_pattern=this._input.get_regexp(k._match_pattern,!0),this._until_pattern=this._input.get_regexp(k._until_pattern),this._until_after=k._until_after)}A.prototype.read=function(){var S=this._input.read(this._starting_pattern);return(!this._starting_pattern||S)&&(S+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),S},A.prototype.read_match=function(){return this._input.match(this._match_pattern)},A.prototype.until_after=function(S){var k=this._create();return k._until_after=!0,k._until_pattern=this._input.get_regexp(S),k._update(),k},A.prototype.until=function(S){var k=this._create();return k._until_after=!1,k._until_pattern=this._input.get_regexp(S),k._update(),k},A.prototype.starting_with=function(S){var k=this._create();return k._starting_pattern=this._input.get_regexp(S,!0),k._update(),k},A.prototype.matching=function(S){var k=this._create();return k._match_pattern=this._input.get_regexp(S,!0),k._update(),k},A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){},G.exports.Pattern=A},function(G){function A(S,k){S=typeof S=="string"?S:S.source,k=typeof k=="string"?k:k.source,this.__directives_block_pattern=new RegExp(S+/ beautify( \w+[:]\w+)+ /.source+k,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(S+/\sbeautify\signore:end\s/.source+k,"g")}A.prototype.get_directives=function(S){if(!S.match(this.__directives_block_pattern))return null;var k={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(S);p;)k[p[1]]=p[2],p=this.__directive_pattern.exec(S);return k},A.prototype.readIgnored=function(S){return S.readUntilAfter(this.__directives_end_ignore_pattern)},G.exports.Directives=A},function(G,A,S){var k=S(12).Pattern,p={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function m(B,F){k.call(this,B,F),this.__template_pattern=null,this._disabled=Object.assign({},p),this._excluded=Object.assign({},p),F&&(this.__template_pattern=this._input.get_regexp(F.__template_pattern),this._excluded=Object.assign(this._excluded,F._excluded),this._disabled=Object.assign(this._disabled,F._disabled));var V=new k(B);this.__patterns={handlebars_comment:V.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:V.starting_with(/{{{/).until_after(/}}}/),handlebars:V.starting_with(/{{/).until_after(/}}/),php:V.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:V.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:V.starting_with(/{%/).until_after(/%}/),django_value:V.starting_with(/{{/).until_after(/}}/),django_comment:V.starting_with(/{#/).until_after(/#}/),smarty:V.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:V.starting_with(/{\*/).until_after(/\*}/),smarty_literal:V.starting_with(/{literal}/).until_after(/{\/literal}/)}}m.prototype=new k,m.prototype._create=function(){return new m(this._input,this)},m.prototype._update=function(){this.__set_templated_pattern()},m.prototype.disable=function(B){var F=this._create();return F._disabled[B]=!0,F._update(),F},m.prototype.read_options=function(B){var F=this._create();for(var V in p)F._disabled[V]=B.templating.indexOf(V)===-1;return F._update(),F},m.prototype.exclude=function(B){var F=this._create();return F._excluded[B]=!0,F._update(),F},m.prototype.read=function(){var B="";this._match_pattern?B=this._input.read(this._starting_pattern):B=this._input.read(this._starting_pattern,this.__template_pattern);for(var F=this._read_template();F;)this._match_pattern?F+=this._input.read(this._match_pattern):F+=this._input.readUntil(this.__template_pattern),B+=F,F=this._read_template();return this._until_after&&(B+=this._input.readUntilAfter(this._until_pattern)),B},m.prototype.__set_templated_pattern=function(){var B=[];this._disabled.php||B.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||B.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||B.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||B.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(B.push(this.__patterns.django._starting_pattern.source),B.push(this.__patterns.django_value._starting_pattern.source),B.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||B.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&B.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+B.join("|")+")")},m.prototype._read_template=function(){var B="",F=this._input.peek();if(F==="<"){var V=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&V==="?"&&(B=B||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&V==="%"&&(B=B||this.__patterns.erb.read())}else F==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(B=B||this.__patterns.handlebars_comment.read(),B=B||this.__patterns.handlebars_unescaped.read(),B=B||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(B=B||this.__patterns.django_value.read()),this._excluded.django||(B=B||this.__patterns.django_comment.read(),B=B||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(B=B||this.__patterns.smarty_comment.read(),B=B||this.__patterns.smarty_literal.read(),B=B||this.__patterns.smarty.read()));return B},G.exports.TemplatablePattern=m}],W={};function d(G){var A=W[G];if(A!==void 0)return A.exports;var S=W[G]={exports:{}};return we[G](S,S.exports,d),S.exports}var ye=d(0);me=ye})();var be=me;x=[],M=function(){return{js_beautify:be}}.apply(Dt,x),M!==void 0&&(Zn.exports=M)})()},32834:function(Zn){(function(Dt,x){Zn.exports=x()})(this,function(){"use strict";function Dt(qe,Ke){for(var je=0;je<Ke.length;je++){var le=Ke[je];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(qe,le.key,le)}}function x(qe,Ke,je){return Ke&&Dt(qe.prototype,Ke),je&&Dt(qe,je),qe}function M(qe,Ke){if(qe){if(typeof qe=="string")return me(qe,Ke);var je=Object.prototype.toString.call(qe).slice(8,-1);if(je==="Object"&&qe.constructor&&(je=qe.constructor.name),je==="Map"||je==="Set")return Array.from(qe);if(je==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(je))return me(qe,Ke)}}function me(qe,Ke){(Ke==null||Ke>qe.length)&&(Ke=qe.length);for(var je=0,le=new Array(Ke);je<Ke;je++)le[je]=qe[je];return le}function be(qe,Ke){var je=typeof Symbol!="undefined"&&qe[Symbol.iterator]||qe["@@iterator"];if(je)return(je=je.call(qe)).next.bind(je);if(Array.isArray(qe)||(je=M(qe))||Ke&&qe&&typeof qe.length=="number"){je&&(qe=je);var le=0;return function(){return le>=qe.length?{done:!0}:{done:!1,value:qe[le++]}}}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 we={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 d(qe){we.exports.defaults=qe}we.exports={defaults:W(),getDefaults:W,changeDefaults:d};var ye=/[&<>"']/,G=/[&<>"']/g,A=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p=function(Ke){return k[Ke]};function m(qe,Ke){if(Ke){if(ye.test(qe))return qe.replace(G,p)}else if(A.test(qe))return qe.replace(S,p);return qe}var B=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function F(qe){return qe.replace(B,function(Ke,je){return je=je.toLowerCase(),je==="colon"?":":je.charAt(0)==="#"?je.charAt(1)==="x"?String.fromCharCode(parseInt(je.substring(2),16)):String.fromCharCode(+je.substring(1)):""})}var V=/(^|[^\[])\^/g;function j(qe,Ke){qe=qe.source||qe,Ke=Ke||"";var je={replace:function(Ee,ve){return ve=ve.source||ve,ve=ve.replace(V,"$1"),qe=qe.replace(Ee,ve),je},getRegex:function(){return new RegExp(qe,Ke)}};return je}var se=/[^\w:]/g,H=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function X(qe,Ke,je){if(qe){var le;try{le=decodeURIComponent(F(je)).replace(se,"").toLowerCase()}catch(Ee){return null}if(le.indexOf("javascript:")===0||le.indexOf("vbscript:")===0||le.indexOf("data:")===0)return null}Ke&&!H.test(je)&&(je=ie(Ke,je));try{je=encodeURI(je).replace(/%25/g,"%")}catch(Ee){return null}return je}var P={},R=/^[^:]+:\/*[^/]*$/,fe=/^([^:]+:)[\s\S]*$/,de=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ie(qe,Ke){P[" "+qe]||(R.test(qe)?P[" "+qe]=qe+"/":P[" "+qe]=Fe(qe,"/",!0)),qe=P[" "+qe];var je=qe.indexOf(":")===-1;return Ke.substring(0,2)==="//"?je?Ke:qe.replace(fe,"$1")+Ke:Ke.charAt(0)==="/"?je?Ke:qe.replace(de,"$1")+Ke:qe+Ke}var q={exec:function(){}};function ge(qe){for(var Ke=1,je,le;Ke<arguments.length;Ke++){je=arguments[Ke];for(le in je)Object.prototype.hasOwnProperty.call(je,le)&&(qe[le]=je[le])}return qe}function z(qe,Ke){var je=qe.replace(/\|/g,function(ve,Te,ne){for(var Nt=!1,$t=Te;--$t>=0&&ne[$t]==="\\";)Nt=!Nt;return Nt?"|":" |"}),le=je.split(/ \|/),Ee=0;if(le.length>Ke)le.splice(Ke);else for(;le.length<Ke;)le.push("");for(;Ee<le.length;Ee++)le[Ee]=le[Ee].trim().replace(/\\\|/g,"|");return le}function Fe(qe,Ke,je){var le=qe.length;if(le===0)return"";for(var Ee=0;Ee<le;){var ve=qe.charAt(le-Ee-1);if(ve===Ke&&!je)Ee++;else if(ve!==Ke&&je)Ee++;else break}return qe.substr(0,le-Ee)}function Z(qe,Ke){if(qe.indexOf(Ke[1])===-1)return-1;for(var je=qe.length,le=0,Ee=0;Ee<je;Ee++)if(qe[Ee]==="\\")Ee++;else if(qe[Ee]===Ke[0])le++;else if(qe[Ee]===Ke[1]&&(le--,le<0))return Ee;return-1}function U(qe){qe&&qe.sanitize&&!qe.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 K(qe,Ke){if(Ke<1)return"";for(var je="";Ke>1;)Ke&1&&(je+=qe),Ke>>=1,qe+=qe;return je+qe}var ee={escape:m,unescape:F,edit:j,cleanUrl:X,resolveUrl:ie,noopTest:q,merge:ge,splitCells:z,rtrim:Fe,findClosingBracket:Z,checkSanitizeDeprecation:U,repeatString:K},he=we.exports.defaults,ae=ee.rtrim,_=ee.splitCells,y=ee.escape,Y=ee.findClosingBracket;function ue(qe,Ke,je){var le=Ke.href,Ee=Ke.title?y(Ke.title):null,ve=qe[1].replace(/\\([\[\]])/g,"$1");return qe[0].charAt(0)!=="!"?{type:"link",raw:je,href:le,title:Ee,text:ve}:{type:"image",raw:je,href:le,title:Ee,text:y(ve)}}function Qe(qe,Ke){var je=qe.match(/^(\s+)(?:```)/);if(je===null)return Ke;var le=je[1];return Ke.split(`
`).map(function(Ee){var ve=Ee.match(/^\s+/);if(ve===null)return Ee;var Te=ve[0];return Te.length>=le.length?Ee.slice(le.length):Ee}).join(`
`)}var et=function(){function qe(je){this.options=je||he}var Ke=qe.prototype;return Ke.space=function(le){var Ee=this.rules.block.newline.exec(le);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
`}},Ke.code=function(le){var Ee=this.rules.block.code.exec(le);if(Ee){var ve=Ee[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?ve:ae(ve,`
`)}}},Ke.fences=function(le){var Ee=this.rules.block.fences.exec(le);if(Ee){var ve=Ee[0],Te=Qe(ve,Ee[3]||"");return{type:"code",raw:ve,lang:Ee[2]?Ee[2].trim():Ee[2],text:Te}}},Ke.heading=function(le){var Ee=this.rules.block.heading.exec(le);if(Ee){var ve=Ee[2].trim();if(/#$/.test(ve)){var Te=ae(ve,"#");(this.options.pedantic||!Te||/ $/.test(Te))&&(ve=Te.trim())}return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:ve}}},Ke.nptable=function(le){var Ee=this.rules.block.nptable.exec(le);if(Ee){var ve={type:"table",header:_(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
`):[],raw:Ee[0]};if(ve.header.length===ve.align.length){var Te=ve.align.length,ne;for(ne=0;ne<Te;ne++)/^ *-+: *$/.test(ve.align[ne])?ve.align[ne]="right":/^ *:-+: *$/.test(ve.align[ne])?ve.align[ne]="center":/^ *:-+ *$/.test(ve.align[ne])?ve.align[ne]="left":ve.align[ne]=null;for(Te=ve.cells.length,ne=0;ne<Te;ne++)ve.cells[ne]=_(ve.cells[ne],ve.header.length);return ve}}},Ke.hr=function(le){var Ee=this.rules.block.hr.exec(le);if(Ee)return{type:"hr",raw:Ee[0]}},Ke.blockquote=function(le){var Ee=this.rules.block.blockquote.exec(le);if(Ee){var ve=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:ve}}},Ke.list=function(le){var Ee=this.rules.block.list.exec(le);if(Ee){var ve=Ee[0],Te=Ee[2],ne=Te.length>1,Nt={type:"list",raw:ve,ordered:ne,start:ne?+Te.slice(0,-1):"",loose:!1,items:[]},$t=Ee[0].match(this.rules.block.item),Ft=!1,vn,tr,Kn,Mn,In,nr,fr,qn,ur,$n=$t.length;Kn=this.rules.block.listItemStart.exec($t[0]);for(var Nn=0;Nn<$n;Nn++){if(vn=$t[Nn],ve=vn,this.options.pedantic||(ur=vn.match(new RegExp("\\n\\s*\\n {0,"+(Kn[0].length-1)+"}\\S")),ur&&(In=vn.length-ur.index+$t.slice(Nn+1).join(`
`).length,Nt.raw=Nt.raw.substring(0,Nt.raw.length-In),vn=vn.substring(0,ur.index),ve=vn,$n=Nn+1)),Nn!==$n-1){if(Mn=this.rules.block.listItemStart.exec($t[Nn+1]),this.options.pedantic?Mn[1].length>Kn[1].length:Mn[1].length>=Kn[0].length||Mn[1].length>3){$t.splice(Nn,2,$t[Nn]+(!this.options.pedantic&&Mn[1].length<Kn[0].length&&!$t[Nn].match(/\n$/)?"":`
`)+$t[Nn+1]),Nn--,$n--;continue}else(!this.options.pedantic||this.options.smartLists?Mn[2][Mn[2].length-1]!==Te[Te.length-1]:ne===(Mn[2].length===1))&&(In=$t.slice(Nn+1).join(`
`).length,Nt.raw=Nt.raw.substring(0,Nt.raw.length-In),Nn=$n-1);Kn=Mn}tr=vn.length,vn=vn.replace(/^ *([*+-]|\d+[.)]) ?/,""),~vn.indexOf(`
`)&&(tr-=vn.length,vn=this.options.pedantic?vn.replace(/^ {1,4}/gm,""):vn.replace(new RegExp("^ {1,"+tr+"}","gm"),"")),vn=ae(vn,`
`),Nn!==$n-1&&(ve=ve+`
`),nr=Ft||/\n\n(?!\s*$)/.test(ve),Nn!==$n-1&&(Ft=ve.slice(-2)===`
`,nr||(nr=Ft)),nr&&(Nt.loose=!0),this.options.gfm&&(fr=/^\[[ xX]\] /.test(vn),qn=void 0,fr&&(qn=vn[1]!==" ",vn=vn.replace(/^\[[ xX]\] +/,""))),Nt.items.push({type:"list_item",raw:ve,task:fr,checked:qn,loose:nr,text:vn})}return Nt}},Ke.html=function(le){var Ee=this.rules.block.html.exec(le);if(Ee)return{type:this.options.sanitize?"paragraph":"html",raw:Ee[0],pre:!this.options.sanitizer&&(Ee[1]==="pre"||Ee[1]==="script"||Ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):y(Ee[0]):Ee[0]}},Ke.def=function(le){var Ee=this.rules.block.def.exec(le);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var ve=Ee[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:ve,raw:Ee[0],href:Ee[2],title:Ee[3]}}},Ke.table=function(le){var Ee=this.rules.block.table.exec(le);if(Ee){var ve={type:"table",header:_(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
`):[]};if(ve.header.length===ve.align.length){ve.raw=Ee[0];var Te=ve.align.length,ne;for(ne=0;ne<Te;ne++)/^ *-+: *$/.test(ve.align[ne])?ve.align[ne]="right":/^ *:-+: *$/.test(ve.align[ne])?ve.align[ne]="center":/^ *:-+ *$/.test(ve.align[ne])?ve.align[ne]="left":ve.align[ne]=null;for(Te=ve.cells.length,ne=0;ne<Te;ne++)ve.cells[ne]=_(ve.cells[ne].replace(/^ *\| *| *\| *$/g,""),ve.header.length);return ve}}},Ke.lheading=function(le){var Ee=this.rules.block.lheading.exec(le);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},Ke.paragraph=function(le){var Ee=this.rules.block.paragraph.exec(le);if(Ee)return{type:"paragraph",raw:Ee[0],text:Ee[1].charAt(Ee[1].length-1)===`
`?Ee[1].slice(0,-1):Ee[1]}},Ke.text=function(le){var Ee=this.rules.block.text.exec(le);if(Ee)return{type:"text",raw:Ee[0],text:Ee[0]}},Ke.escape=function(le){var Ee=this.rules.inline.escape.exec(le);if(Ee)return{type:"escape",raw:Ee[0],text:y(Ee[1])}},Ke.tag=function(le,Ee,ve){var Te=this.rules.inline.tag.exec(le);if(Te)return!Ee&&/^<a /i.test(Te[0])?Ee=!0:Ee&&/^<\/a>/i.test(Te[0])&&(Ee=!1),!ve&&/^<(pre|code|kbd|script)(\s|>)/i.test(Te[0])?ve=!0:ve&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Te[0])&&(ve=!1),{type:this.options.sanitize?"text":"html",raw:Te[0],inLink:Ee,inRawBlock:ve,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Te[0]):y(Te[0]):Te[0]}},Ke.link=function(le){var Ee=this.rules.inline.link.exec(le);if(Ee){var ve=Ee[2].trim();if(!this.options.pedantic&&/^</.test(ve)){if(!/>$/.test(ve))return;var Te=ae(ve.slice(0,-1),"\\");if((ve.length-Te.length)%2===0)return}else{var ne=Y(Ee[2],"()");if(ne>-1){var Nt=Ee[0].indexOf("!")===0?5:4,$t=Nt+Ee[1].length+ne;Ee[2]=Ee[2].substring(0,ne),Ee[0]=Ee[0].substring(0,$t).trim(),Ee[3]=""}}var Ft=Ee[2],vn="";if(this.options.pedantic){var tr=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ft);tr&&(Ft=tr[1],vn=tr[3])}else vn=Ee[3]?Ee[3].slice(1,-1):"";return Ft=Ft.trim(),/^</.test(Ft)&&(this.options.pedantic&&!/>$/.test(ve)?Ft=Ft.slice(1):Ft=Ft.slice(1,-1)),ue(Ee,{href:Ft&&Ft.replace(this.rules.inline._escapes,"$1"),title:vn&&vn.replace(this.rules.inline._escapes,"$1")},Ee[0])}},Ke.reflink=function(le,Ee){var ve;if((ve=this.rules.inline.reflink.exec(le))||(ve=this.rules.inline.nolink.exec(le))){var Te=(ve[2]||ve[1]).replace(/\s+/g," ");if(Te=Ee[Te.toLowerCase()],!Te||!Te.href){var ne=ve[0].charAt(0);return{type:"text",raw:ne,text:ne}}return ue(ve,Te,ve[0])}},Ke.emStrong=function(le,Ee,ve){ve===void 0&&(ve="");var Te=this.rules.inline.emStrong.lDelim.exec(le);if(Te&&!(Te[3]&&ve.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 ne=Te[1]||Te[2]||"";if(!ne||ne&&(ve===""||this.rules.inline.punctuation.exec(ve))){var Nt=Te[0].length-1,$t,Ft,vn=Nt,tr=0,Kn=Te[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Kn.lastIndex=0,Ee=Ee.slice(-1*le.length+Nt);(Te=Kn.exec(Ee))!=null;)if($t=Te[1]||Te[2]||Te[3]||Te[4]||Te[5]||Te[6],!!$t){if(Ft=$t.length,Te[3]||Te[4]){vn+=Ft;continue}else if((Te[5]||Te[6])&&Nt%3&&!((Nt+Ft)%3)){tr+=Ft;continue}if(vn-=Ft,!(vn>0))return Ft=Math.min(Ft,Ft+vn+tr),Math.min(Nt,Ft)%2?{type:"em",raw:le.slice(0,Nt+Te.index+Ft+1),text:le.slice(1,Nt+Te.index+Ft)}:{type:"strong",raw:le.slice(0,Nt+Te.index+Ft+1),text:le.slice(2,Nt+Te.index+Ft-1)}}}}},Ke.codespan=function(le){var Ee=this.rules.inline.code.exec(le);if(Ee){var ve=Ee[2].replace(/\n/g," "),Te=/[^ ]/.test(ve),ne=/^ /.test(ve)&&/ $/.test(ve);return Te&&ne&&(ve=ve.substring(1,ve.length-1)),ve=y(ve,!0),{type:"codespan",raw:Ee[0],text:ve}}},Ke.br=function(le){var Ee=this.rules.inline.br.exec(le);if(Ee)return{type:"br",raw:Ee[0]}},Ke.del=function(le){var Ee=this.rules.inline.del.exec(le);if(Ee)return{type:"del",raw:Ee[0],text:Ee[2]}},Ke.autolink=function(le,Ee){var ve=this.rules.inline.autolink.exec(le);if(ve){var Te,ne;return ve[2]==="@"?(Te=y(this.options.mangle?Ee(ve[1]):ve[1]),ne="mailto:"+Te):(Te=y(ve[1]),ne=Te),{type:"link",raw:ve[0],text:Te,href:ne,tokens:[{type:"text",raw:Te,text:Te}]}}},Ke.url=function(le,Ee){var ve;if(ve=this.rules.inline.url.exec(le)){var Te,ne;if(ve[2]==="@")Te=y(this.options.mangle?Ee(ve[0]):ve[0]),ne="mailto:"+Te;else{var Nt;do Nt=ve[0],ve[0]=this.rules.inline._backpedal.exec(ve[0])[0];while(Nt!==ve[0]);Te=y(ve[0]),ve[1]==="www."?ne="http://"+Te:ne=Te}return{type:"link",raw:ve[0],text:Te,href:ne,tokens:[{type:"text",raw:Te,text:Te}]}}},Ke.inlineText=function(le,Ee,ve){var Te=this.rules.inline.text.exec(le);if(Te){var ne;return Ee?ne=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Te[0]):y(Te[0]):Te[0]:ne=y(this.options.smartypants?ve(Te[0]):Te[0]),{type:"text",raw:Te[0],text:ne}}},qe}(),gt=ee.noopTest,bt=ee.edit,Vt=ee.merge,Rt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:gt,table:gt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Rt._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Rt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Rt.def=bt(Rt.def).replace("label",Rt._label).replace("title",Rt._title).getRegex(),Rt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Rt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Rt.item=bt(Rt.item,"gm").replace(/bull/g,Rt.bullet).getRegex(),Rt.listItemStart=bt(/^( *)(bull) */).replace("bull",Rt.bullet).getRegex(),Rt.list=bt(Rt.list).replace(/bull/g,Rt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Rt.def.source+")").getRegex(),Rt._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",Rt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Rt.html=bt(Rt.html,"i").replace("comment",Rt._comment).replace("tag",Rt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rt.paragraph=bt(Rt._paragraph).replace("hr",Rt.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",Rt._tag).getRegex(),Rt.blockquote=bt(Rt.blockquote).replace("paragraph",Rt.paragraph).getRegex(),Rt.normal=Vt({},Rt),Rt.gfm=Vt({},Rt.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*|$)"}),Rt.gfm.nptable=bt(Rt.gfm.nptable).replace("hr",Rt.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",Rt._tag).getRegex(),Rt.gfm.table=bt(Rt.gfm.table).replace("hr",Rt.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",Rt._tag).getRegex(),Rt.pedantic=Vt({},Rt.normal,{html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Rt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gt,paragraph:bt(Rt.normal._paragraph).replace("hr",Rt.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Rt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var te={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:gt,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:gt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};te._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",te.punctuation=bt(te.punctuation).replace(/punctuation/g,te._punctuation).getRegex(),te.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,te.escapedEmSt=/\\\*|\\_/g,te._comment=bt(Rt._comment).replace("(?:-->|$)","-->").getRegex(),te.emStrong.lDelim=bt(te.emStrong.lDelim).replace(/punct/g,te._punctuation).getRegex(),te.emStrong.rDelimAst=bt(te.emStrong.rDelimAst,"g").replace(/punct/g,te._punctuation).getRegex(),te.emStrong.rDelimUnd=bt(te.emStrong.rDelimUnd,"g").replace(/punct/g,te._punctuation).getRegex(),te._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,te._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,te._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])?)+(?![-_])/,te.autolink=bt(te.autolink).replace("scheme",te._scheme).replace("email",te._email).getRegex(),te._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,te.tag=bt(te.tag).replace("comment",te._comment).replace("attribute",te._attribute).getRegex(),te._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,te._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,te._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,te.link=bt(te.link).replace("label",te._label).replace("href",te._href).replace("title",te._title).getRegex(),te.reflink=bt(te.reflink).replace("label",te._label).getRegex(),te.reflinkSearch=bt(te.reflinkSearch,"g").replace("reflink",te.reflink).replace("nolink",te.nolink).getRegex(),te.normal=Vt({},te),te.pedantic=Vt({},te.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:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",te._label).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te._label).getRegex()}),te.gfm=Vt({},te.normal,{escape:bt(te.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),te.gfm.url=bt(te.gfm.url,"i").replace("email",te.gfm._extended_email).getRegex(),te.breaks=Vt({},te.gfm,{br:bt(te.br).replace("{2,}","*").getRegex(),text:bt(te.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Le={block:Rt,inline:te},mt=et,Ne=we.exports.defaults,It=Le.block,He=Le.inline,Se=ee.repeatString;function I(qe){return qe.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(qe){var Ke="",je,le,Ee=qe.length;for(je=0;je<Ee;je++)le=qe.charCodeAt(je),Math.random()>.5&&(le="x"+le.toString(16)),Ke+="&#"+le+";";return Ke}var v=function(){function qe(je){this.tokens=[],this.tokens.links=Object.create(null),this.options=je||Ne,this.options.tokenizer=this.options.tokenizer||new mt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var le={block:It.normal,inline:He.normal};this.options.pedantic?(le.block=It.pedantic,le.inline=He.pedantic):this.options.gfm&&(le.block=It.gfm,this.options.breaks?le.inline=He.breaks:le.inline=He.gfm),this.tokenizer.rules=le}qe.lex=function(le,Ee){var ve=new qe(Ee);return ve.lex(le)},qe.lexInline=function(le,Ee){var ve=new qe(Ee);return ve.inlineTokens(le)};var Ke=qe.prototype;return Ke.lex=function(le){return le=le.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(le,this.tokens,!0),this.inline(this.tokens),this.tokens},Ke.blockTokens=function(le,Ee,ve){Ee===void 0&&(Ee=[]),ve===void 0&&(ve=!0),this.options.pedantic&&(le=le.replace(/^ +$/gm,""));for(var Te,ne,Nt,$t;le;){if(Te=this.tokenizer.space(le)){le=le.substring(Te.raw.length),Te.type&&Ee.push(Te);continue}if(Te=this.tokenizer.code(le)){le=le.substring(Te.raw.length),$t=Ee[Ee.length-1],$t&&$t.type==="paragraph"?($t.raw+=`
`+Te.raw,$t.text+=`
`+Te.text):Ee.push(Te);continue}if(Te=this.tokenizer.fences(le)){le=le.substring(Te.raw.length),Ee.push(Te);continue}if(Te=this.tokenizer.heading(le)){le=le.substring(Te.raw.length),Ee.push(Te);continue}if(Te=this.tokenizer.nptable(le)){le=le.substring(Te.raw.length),Ee.push(Te);continue}if(Te=this.tokenizer.hr(le)){le=le.substring(Te.raw.length),Ee.push(Te);continue}if(Te=this.tokenizer.blockquote(le)){le=le.substring(Te.raw.length),Te.tokens=this.blockTokens(Te.text,[],ve),Ee.push(Te);continue}if(Te=this.tokenizer.list(le)){for(le=le.substring(Te.raw.length),Nt=Te.items.length,ne=0;ne<Nt;ne++)Te.items[ne].tokens=this.blockTokens(Te.items[ne].text,[],!1);Ee.push(Te);continue}if(Te=this.tokenizer.html(le)){le=le.substring(Te.raw.length),Ee.push(Te);continue}if(ve&&(Te=this.tokenizer.def(le))){le=le.substring(Te.raw.length),this.tokens.links[Te.tag]||(this.tokens.links[Te.tag]={href:Te.href,title:Te.title});continue}if(Te=this.tokenizer.table(le)){le=le.substring(Te.raw.length),Ee.push(Te);continue}if(Te=this.tokenizer.lheading(le)){le=le.substring(Te.raw.length),Ee.push(Te);continue}if(ve&&(Te=this.tokenizer.paragraph(le))){le=le.substring(Te.raw.length),Ee.push(Te);continue}if(Te=this.tokenizer.text(le)){le=le.substring(Te.raw.length),$t=Ee[Ee.length-1],$t&&$t.type==="text"?($t.raw+=`
`+Te.raw,$t.text+=`
`+Te.text):Ee.push(Te);continue}if(le){var Ft="Infinite loop on byte: "+le.charCodeAt(0);if(this.options.silent){console.error(Ft);break}else throw new Error(Ft)}}return Ee},Ke.inline=function(le){var Ee,ve,Te,ne,Nt,$t,Ft=le.length;for(Ee=0;Ee<Ft;Ee++)switch($t=le[Ee],$t.type){case"paragraph":case"text":case"heading":{$t.tokens=[],this.inlineTokens($t.text,$t.tokens);break}case"table":{for($t.tokens={header:[],cells:[]},ne=$t.header.length,ve=0;ve<ne;ve++)$t.tokens.header[ve]=[],this.inlineTokens($t.header[ve],$t.tokens.header[ve]);for(ne=$t.cells.length,ve=0;ve<ne;ve++)for(Nt=$t.cells[ve],$t.tokens.cells[ve]=[],Te=0;Te<Nt.length;Te++)$t.tokens.cells[ve][Te]=[],this.inlineTokens(Nt[Te],$t.tokens.cells[ve][Te]);break}case"blockquote":{this.inline($t.tokens);break}case"list":{for(ne=$t.items.length,ve=0;ve<ne;ve++)this.inline($t.items[ve].tokens);break}}return le},Ke.inlineTokens=function(le,Ee,ve,Te){Ee===void 0&&(Ee=[]),ve===void 0&&(ve=!1),Te===void 0&&(Te=!1);var ne,Nt,$t=le,Ft,vn,tr;if(this.tokens.links){var Kn=Object.keys(this.tokens.links);if(Kn.length>0)for(;(Ft=this.tokenizer.rules.inline.reflinkSearch.exec($t))!=null;)Kn.includes(Ft[0].slice(Ft[0].lastIndexOf("[")+1,-1))&&($t=$t.slice(0,Ft.index)+"["+Se("a",Ft[0].length-2)+"]"+$t.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ft=this.tokenizer.rules.inline.blockSkip.exec($t))!=null;)$t=$t.slice(0,Ft.index)+"["+Se("a",Ft[0].length-2)+"]"+$t.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Ft=this.tokenizer.rules.inline.escapedEmSt.exec($t))!=null;)$t=$t.slice(0,Ft.index)+"++"+$t.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;le;){if(vn||(tr=""),vn=!1,ne=this.tokenizer.escape(le)){le=le.substring(ne.raw.length),Ee.push(ne);continue}if(ne=this.tokenizer.tag(le,ve,Te)){le=le.substring(ne.raw.length),ve=ne.inLink,Te=ne.inRawBlock;var Mn=Ee[Ee.length-1];Mn&&ne.type==="text"&&Mn.type==="text"?(Mn.raw+=ne.raw,Mn.text+=ne.text):Ee.push(ne);continue}if(ne=this.tokenizer.link(le)){le=le.substring(ne.raw.length),ne.type==="link"&&(ne.tokens=this.inlineTokens(ne.text,[],!0,Te)),Ee.push(ne);continue}if(ne=this.tokenizer.reflink(le,this.tokens.links)){le=le.substring(ne.raw.length);var In=Ee[Ee.length-1];ne.type==="link"?(ne.tokens=this.inlineTokens(ne.text,[],!0,Te),Ee.push(ne)):In&&ne.type==="text"&&In.type==="text"?(In.raw+=ne.raw,In.text+=ne.text):Ee.push(ne);continue}if(ne=this.tokenizer.emStrong(le,$t,tr)){le=le.substring(ne.raw.length),ne.tokens=this.inlineTokens(ne.text,[],ve,Te),Ee.push(ne);continue}if(ne=this.tokenizer.codespan(le)){le=le.substring(ne.raw.length),Ee.push(ne);continue}if(ne=this.tokenizer.br(le)){le=le.substring(ne.raw.length),Ee.push(ne);continue}if(ne=this.tokenizer.del(le)){le=le.substring(ne.raw.length),ne.tokens=this.inlineTokens(ne.text,[],ve,Te),Ee.push(ne);continue}if(ne=this.tokenizer.autolink(le,g)){le=le.substring(ne.raw.length),Ee.push(ne);continue}if(!ve&&(ne=this.tokenizer.url(le,g))){le=le.substring(ne.raw.length),Ee.push(ne);continue}if(ne=this.tokenizer.inlineText(le,Te,I)){le=le.substring(ne.raw.length),ne.raw.slice(-1)!=="_"&&(tr=ne.raw.slice(-1)),vn=!0,Nt=Ee[Ee.length-1],Nt&&Nt.type==="text"?(Nt.raw+=ne.raw,Nt.text+=ne.text):Ee.push(ne);continue}if(le){var nr="Infinite loop on byte: "+le.charCodeAt(0);if(this.options.silent){console.error(nr);break}else throw new Error(nr)}}return Ee},x(qe,null,[{key:"rules",get:function(){return{block:It,inline:He}}}]),qe}(),Q=we.exports.defaults,b=ee.cleanUrl,w=ee.escape,D=function(){function qe(je){this.options=je||Q}var Ke=qe.prototype;return Ke.code=function(le,Ee,ve){var Te=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var ne=this.options.highlight(le,Te);ne!=null&&ne!==le&&(ve=!0,le=ne)}return le=le.replace(/\n$/,"")+`
`,Te?'<pre><code class="'+this.options.langPrefix+w(Te,!0)+'">'+(ve?le:w(le,!0))+`</code></pre>
`:"<pre><code>"+(ve?le:w(le,!0))+`</code></pre>
`},Ke.blockquote=function(le){return`<blockquote>
`+le+`</blockquote>
`},Ke.html=function(le){return le},Ke.heading=function(le,Ee,ve,Te){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+Te.slug(ve)+'">'+le+"</h"+Ee+`>
`:"<h"+Ee+">"+le+"</h"+Ee+`>
`},Ke.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Ke.list=function(le,Ee,ve){var Te=Ee?"ol":"ul",ne=Ee&&ve!==1?' start="'+ve+'"':"";return"<"+Te+ne+`>
`+le+"</"+Te+`>
`},Ke.listitem=function(le){return"<li>"+le+`</li>
`},Ke.checkbox=function(le){return"<input "+(le?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ke.paragraph=function(le){return"<p>"+le+`</p>
`},Ke.table=function(le,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
<thead>
`+le+`</thead>
`+Ee+`</table>
`},Ke.tablerow=function(le){return`<tr>
`+le+`</tr>
`},Ke.tablecell=function(le,Ee){var ve=Ee.header?"th":"td",Te=Ee.align?"<"+ve+' align="'+Ee.align+'">':"<"+ve+">";return Te+le+"</"+ve+`>
`},Ke.strong=function(le){return"<strong>"+le+"</strong>"},Ke.em=function(le){return"<em>"+le+"</em>"},Ke.codespan=function(le){return"<code>"+le+"</code>"},Ke.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ke.del=function(le){return"<del>"+le+"</del>"},Ke.link=function(le,Ee,ve){if(le=b(this.options.sanitize,this.options.baseUrl,le),le===null)return ve;var Te='<a href="'+w(le)+'"';return Ee&&(Te+=' title="'+Ee+'"'),Te+=">"+ve+"</a>",Te},Ke.image=function(le,Ee,ve){if(le=b(this.options.sanitize,this.options.baseUrl,le),le===null)return ve;var Te='<img src="'+le+'" alt="'+ve+'"';return Ee&&(Te+=' title="'+Ee+'"'),Te+=this.options.xhtml?"/>":">",Te},Ke.text=function(le){return le},qe}(),Ae=function(){function qe(){}var Ke=qe.prototype;return Ke.strong=function(le){return le},Ke.em=function(le){return le},Ke.codespan=function(le){return le},Ke.del=function(le){return le},Ke.html=function(le){return le},Ke.text=function(le){return le},Ke.link=function(le,Ee,ve){return""+ve},Ke.image=function(le,Ee,ve){return""+ve},Ke.br=function(){return""},qe}(),L=function(){function qe(){this.seen={}}var Ke=qe.prototype;return Ke.serialize=function(le){return le.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Ke.getNextSafeSlug=function(le,Ee){var ve=le,Te=0;if(this.seen.hasOwnProperty(ve)){Te=this.seen[le];do Te++,ve=le+"-"+Te;while(this.seen.hasOwnProperty(ve))}return Ee||(this.seen[le]=Te,this.seen[ve]=0),ve},Ke.slug=function(le,Ee){Ee===void 0&&(Ee={});var ve=this.serialize(le);return this.getNextSafeSlug(ve,Ee.dryrun)},qe}(),oe=D,re=Ae,Be=L,Ce=we.exports.defaults,Ie=ee.unescape,Re=function(){function qe(je){this.options=je||Ce,this.options.renderer=this.options.renderer||new oe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new re,this.slugger=new Be}qe.parse=function(le,Ee){var ve=new qe(Ee);return ve.parse(le)},qe.parseInline=function(le,Ee){var ve=new qe(Ee);return ve.parseInline(le)};var Ke=qe.prototype;return Ke.parse=function(le,Ee){Ee===void 0&&(Ee=!0);var ve="",Te,ne,Nt,$t,Ft,vn,tr,Kn,Mn,In,nr,fr,qn,ur,$n,Nn,Ge,Ue,qt=le.length;for(Te=0;Te<qt;Te++)switch(In=le[Te],In.type){case"space":continue;case"hr":{ve+=this.renderer.hr();continue}case"heading":{ve+=this.renderer.heading(this.parseInline(In.tokens),In.depth,Ie(this.parseInline(In.tokens,this.textRenderer)),this.slugger);continue}case"code":{ve+=this.renderer.code(In.text,In.lang,In.escaped);continue}case"table":{for(Kn="",tr="",$t=In.header.length,ne=0;ne<$t;ne++)tr+=this.renderer.tablecell(this.parseInline(In.tokens.header[ne]),{header:!0,align:In.align[ne]});for(Kn+=this.renderer.tablerow(tr),Mn="",$t=In.cells.length,ne=0;ne<$t;ne++){for(vn=In.tokens.cells[ne],tr="",Ft=vn.length,Nt=0;Nt<Ft;Nt++)tr+=this.renderer.tablecell(this.parseInline(vn[Nt]),{header:!1,align:In.align[Nt]});Mn+=this.renderer.tablerow(tr)}ve+=this.renderer.table(Kn,Mn);continue}case"blockquote":{Mn=this.parse(In.tokens),ve+=this.renderer.blockquote(Mn);continue}case"list":{for(nr=In.ordered,fr=In.start,qn=In.loose,$t=In.items.length,Mn="",ne=0;ne<$t;ne++)$n=In.items[ne],Nn=$n.checked,Ge=$n.task,ur="",$n.task&&(Ue=this.renderer.checkbox(Nn),qn?$n.tokens.length>0&&$n.tokens[0].type==="text"?($n.tokens[0].text=Ue+" "+$n.tokens[0].text,$n.tokens[0].tokens&&$n.tokens[0].tokens.length>0&&$n.tokens[0].tokens[0].type==="text"&&($n.tokens[0].tokens[0].text=Ue+" "+$n.tokens[0].tokens[0].text)):$n.tokens.unshift({type:"text",text:Ue}):ur+=Ue),ur+=this.parse($n.tokens,qn),Mn+=this.renderer.listitem(ur,Ge,Nn);ve+=this.renderer.list(Mn,nr,fr);continue}case"html":{ve+=this.renderer.html(In.text);continue}case"paragraph":{ve+=this.renderer.paragraph(this.parseInline(In.tokens));continue}case"text":{for(Mn=In.tokens?this.parseInline(In.tokens):In.text;Te+1<qt&&le[Te+1].type==="text";)In=le[++Te],Mn+=`
`+(In.tokens?this.parseInline(In.tokens):In.text);ve+=Ee?this.renderer.paragraph(Mn):Mn;continue}default:{var Mt='Token with "'+In.type+'" type was not found.';if(this.options.silent){console.error(Mt);return}else throw new Error(Mt)}}return ve},Ke.parseInline=function(le,Ee){Ee=Ee||this.renderer;var ve="",Te,ne,Nt=le.length;for(Te=0;Te<Nt;Te++)switch(ne=le[Te],ne.type){case"escape":{ve+=Ee.text(ne.text);break}case"html":{ve+=Ee.html(ne.text);break}case"link":{ve+=Ee.link(ne.href,ne.title,this.parseInline(ne.tokens,Ee));break}case"image":{ve+=Ee.image(ne.href,ne.title,ne.text);break}case"strong":{ve+=Ee.strong(this.parseInline(ne.tokens,Ee));break}case"em":{ve+=Ee.em(this.parseInline(ne.tokens,Ee));break}case"codespan":{ve+=Ee.codespan(ne.text);break}case"br":{ve+=Ee.br();break}case"del":{ve+=Ee.del(this.parseInline(ne.tokens,Ee));break}case"text":{ve+=Ee.text(ne.text);break}default:{var $t='Token with "'+ne.type+'" type was not found.';if(this.options.silent){console.error($t);return}else throw new Error($t)}}return ve},qe}(),ht=v,Ye=Re,nt=et,At=D,Ut=Ae,Et=L,vt=ee.merge,tn=ee.checkSanitizeDeprecation,en=ee.escape,Pt=we.exports.getDefaults,dn=we.exports.changeDefaults,Ln=we.exports.defaults;function zt(qe,Ke,je){if(typeof qe=="undefined"||qe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof qe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(qe)+", string expected");if(typeof Ke=="function"&&(je=Ke,Ke=null),Ke=vt({},zt.defaults,Ke||{}),tn(Ke),je){var le=Ke.highlight,Ee;try{Ee=ht.lex(qe,Ke)}catch(Nt){return je(Nt)}var ve=function($t){var Ft;if(!$t)try{Ke.walkTokens&&zt.walkTokens(Ee,Ke.walkTokens),Ft=Ye.parse(Ee,Ke)}catch(vn){$t=vn}return Ke.highlight=le,$t?je($t):je(null,Ft)};if(!le||le.length<3||(delete Ke.highlight,!Ee.length))return ve();var Te=0;zt.walkTokens(Ee,function(Nt){Nt.type==="code"&&(Te++,setTimeout(function(){le(Nt.text,Nt.lang,function($t,Ft){if($t)return ve($t);Ft!=null&&Ft!==Nt.text&&(Nt.text=Ft,Nt.escaped=!0),Te--,Te===0&&ve()})},0))}),Te===0&&ve();return}try{var ne=ht.lex(qe,Ke);return Ke.walkTokens&&zt.walkTokens(ne,Ke.walkTokens),Ye.parse(ne,Ke)}catch(Nt){if(Nt.message+=`
Please report this to https://github.com/markedjs/marked.`,Ke.silent)return"<p>An error occurred:</p><pre>"+en(Nt.message+"",!0)+"</pre>";throw Nt}}zt.options=zt.setOptions=function(qe){return vt(zt.defaults,qe),dn(zt.defaults),zt},zt.getDefaults=Pt,zt.defaults=Ln,zt.use=function(qe){var Ke=vt({},qe);if(qe.renderer&&function(){var le=zt.defaults.renderer||new At,Ee=function(ne){var Nt=le[ne];le[ne]=function(){for(var $t=arguments.length,Ft=new Array($t),vn=0;vn<$t;vn++)Ft[vn]=arguments[vn];var tr=qe.renderer[ne].apply(le,Ft);return tr===!1&&(tr=Nt.apply(le,Ft)),tr}};for(var ve in qe.renderer)Ee(ve);Ke.renderer=le}(),qe.tokenizer&&function(){var le=zt.defaults.tokenizer||new nt,Ee=function(ne){var Nt=le[ne];le[ne]=function(){for(var $t=arguments.length,Ft=new Array($t),vn=0;vn<$t;vn++)Ft[vn]=arguments[vn];var tr=qe.tokenizer[ne].apply(le,Ft);return tr===!1&&(tr=Nt.apply(le,Ft)),tr}};for(var ve in qe.tokenizer)Ee(ve);Ke.tokenizer=le}(),qe.walkTokens){var je=zt.defaults.walkTokens;Ke.walkTokens=function(le){qe.walkTokens(le),je&&je(le)}}zt.setOptions(Ke)},zt.walkTokens=function(qe,Ke){for(var je=be(qe),le;!(le=je()).done;){var Ee=le.value;switch(Ke(Ee),Ee.type){case"table":{for(var ve=be(Ee.tokens.header),Te;!(Te=ve()).done;){var ne=Te.value;zt.walkTokens(ne,Ke)}for(var Nt=be(Ee.tokens.cells),$t;!($t=Nt()).done;)for(var Ft=$t.value,vn=be(Ft),tr;!(tr=vn()).done;){var Kn=tr.value;zt.walkTokens(Kn,Ke)}break}case"list":{zt.walkTokens(Ee.items,Ke);break}default:Ee.tokens&&zt.walkTokens(Ee.tokens,Ke)}}},zt.parseInline=function(qe,Ke){if(typeof qe=="undefined"||qe===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof qe!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(qe)+", string expected");Ke=vt({},zt.defaults,Ke||{}),tn(Ke);try{var je=ht.lexInline(qe,Ke);return Ke.walkTokens&&zt.walkTokens(je,Ke.walkTokens),Ye.parseInline(je,Ke)}catch(le){if(le.message+=`
Please report this to https://github.com/markedjs/marked.`,Ke.silent)return"<p>An error occurred:</p><pre>"+en(le.message+"",!0)+"</pre>";throw le}},zt.Parser=Ye,zt.parser=Ye.parse,zt.Renderer=At,zt.TextRenderer=Ut,zt.Lexer=ht,zt.lexer=ht.lex,zt.Tokenizer=nt,zt.Slugger=Et,zt.parse=zt;var cn=zt;return cn})},11690:function(Zn){const Dt=/[&<>"']/,x=/[&<>"']/g,M=/[<>"']|&(?!#?\w+;)/,me=/[<>"']|&(?!#?\w+;)/g,be={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we=ie=>be[ie];function W(ie,q){if(q){if(Dt.test(ie))return ie.replace(x,we)}else if(M.test(ie))return ie.replace(me,we);return ie}const d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ye(ie){return ie.replace(d,(q,ge)=>(ge=ge.toLowerCase(),ge==="colon"?":":ge.charAt(0)==="#"?ge.charAt(1)==="x"?String.fromCharCode(parseInt(ge.substring(2),16)):String.fromCharCode(+ge.substring(1)):""))}const G=/(^|[^\[])\^/g;function A(ie,q){ie=ie.source||ie,q=q||"";const ge={replace:(z,Fe)=>(Fe=Fe.source||Fe,Fe=Fe.replace(G,"$1"),ie=ie.replace(z,Fe),ge),getRegex:()=>new RegExp(ie,q)};return ge}const S=/[^\w:]/g,k=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(ie,q,ge){if(ie){let z;try{z=decodeURIComponent(ye(ge)).replace(S,"").toLowerCase()}catch(Fe){return null}if(z.indexOf("javascript:")===0||z.indexOf("vbscript:")===0||z.indexOf("data:")===0)return null}q&&!k.test(ge)&&(ge=j(q,ge));try{ge=encodeURI(ge).replace(/%25/g,"%")}catch(z){return null}return ge}const m={},B=/^[^:]+:\/*[^/]*$/,F=/^([^:]+:)[\s\S]*$/,V=/^([^:]+:\/*[^/]*)[\s\S]*$/;function j(ie,q){m[" "+ie]||(B.test(ie)?m[" "+ie]=ie+"/":m[" "+ie]=P(ie,"/",!0)),ie=m[" "+ie];const ge=ie.indexOf(":")===-1;return q.substring(0,2)==="//"?ge?q:ie.replace(F,"$1")+q:q.charAt(0)==="/"?ge?q:ie.replace(V,"$1")+q:ie+q}const se={exec:function(){}};function H(ie){let q=1,ge,z;for(;q<arguments.length;q++){ge=arguments[q];for(z in ge)Object.prototype.hasOwnProperty.call(ge,z)&&(ie[z]=ge[z])}return ie}function X(ie,q){const ge=ie.replace(/\|/g,(Z,U,K)=>{let ee=!1,he=U;for(;--he>=0&&K[he]==="\\";)ee=!ee;return ee?"|":" |"}),z=ge.split(/ \|/);let Fe=0;if(z.length>q)z.splice(q);else for(;z.length<q;)z.push("");for(;Fe<z.length;Fe++)z[Fe]=z[Fe].trim().replace(/\\\|/g,"|");return z}function P(ie,q,ge){const z=ie.length;if(z===0)return"";let Fe=0;for(;Fe<z;){const Z=ie.charAt(z-Fe-1);if(Z===q&&!ge)Fe++;else if(Z!==q&&ge)Fe++;else break}return ie.substr(0,z-Fe)}function R(ie,q){if(ie.indexOf(q[1])===-1)return-1;const ge=ie.length;let z=0,Fe=0;for(;Fe<ge;Fe++)if(ie[Fe]==="\\")Fe++;else if(ie[Fe]===q[0])z++;else if(ie[Fe]===q[1]&&(z--,z<0))return Fe;return-1}function fe(ie){ie&&ie.sanitize&&!ie.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 de(ie,q){if(q<1)return"";let ge="";for(;q>1;)q&1&&(ge+=ie),q>>=1,ie+=ie;return ge+ie}Zn.exports={escape:W,unescape:ye,edit:A,cleanUrl:p,resolveUrl:j,noopTest:se,merge:H,splitCells:X,rtrim:P,findClosingBracket:R,checkSanitizeDeprecation:fe,repeatString:de}},75918:function(Zn,Dt,x){"use strict";x.d(Dt,{Wi:function(){return d},Z0:function(){return ye},aU:function(){return W},eZ:function(){return A},wY:function(){return G}});var M=x(4348),me=x(69323),be=x(13268),we=function(S,k,p,m){function B(F){return F instanceof p?F:new p(function(V){V(F)})}return new(p||(p=Promise))(function(F,V){function j(X){try{H(m.next(X))}catch(P){V(P)}}function se(X){try{H(m.throw(X))}catch(P){V(P)}}function H(X){X.done?F(X.value):B(X.value).then(j,se)}H((m=m.apply(S,k||[])).next())})};class W extends me.JT{constructor(k,p="",m="",B=!0,F){super(),this._onDidChange=this._register(new M.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=k,this._label=p,this._cssClass=m,this._enabled=B,this._actionCallback=F}get id(){return this._id}get label(){return this._label}set label(k){this._setLabel(k)}_setLabel(k){this._label!==k&&(this._label=k,this._onDidChange.fire({label:k}))}get tooltip(){return this._tooltip||""}set tooltip(k){this._setTooltip(k)}_setTooltip(k){this._tooltip!==k&&(this._tooltip=k,this._onDidChange.fire({tooltip:k}))}get class(){return this._cssClass}set class(k){this._setClass(k)}_setClass(k){this._cssClass!==k&&(this._cssClass=k,this._onDidChange.fire({class:k}))}get enabled(){return this._enabled}set enabled(k){this._setEnabled(k)}_setEnabled(k){this._enabled!==k&&(this._enabled=k,this._onDidChange.fire({enabled:k}))}get checked(){return this._checked}set checked(k){this._setChecked(k)}_setChecked(k){this._checked!==k&&(this._checked=k,this._onDidChange.fire({checked:k}))}run(k,p){return we(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(k))})}}class d extends me.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new M.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new M.Q5),this.onDidRun=this._onDidRun.event}run(k,p){return we(this,void 0,void 0,function*(){if(!k.enabled)return;this._onBeforeRun.fire({action:k});let m;try{yield this.runAction(k,p)}catch(B){m=B}this._onDidRun.fire({action:k,error:m})})}runAction(k,p){return we(this,void 0,void 0,function*(){yield k.run(p)})}}class ye extends W{constructor(k){super(ye.ID,k,k?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ye.ID="vs.actions.separator";class G{constructor(k,p,m,B){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=k,this.label=p,this.class=B,this._actions=m}get actions(){return this._actions}dispose(){}run(){return we(this,void 0,void 0,function*(){})}}class A extends W{constructor(){super(A.ID,be.N("submenu.empty","(empty)"),void 0,!1)}}A.ID="vs.actions.empty"},76068:function(Zn,Dt,x){"use strict";x.d(Dt,{ok:function(){return M}});function M(me,be){if(!me)throw new Error(be?`Assertion failed (${be})`:"Assertion Failed")}},52615:function(Zn,Dt,x){"use strict";x.d(Dt,{CM:function(){return W},JL:function(){return d},dT:function(){return G},fK:function(){return we},lA:function(){return ye}});var M=x(4348);class me{constructor(){this._icons=new Map,this._onDidRegister=new M.Q5}add(S){const k=this._icons.get(S.id);k?S.description?k.description=S.description:console.error(`Duplicate registration of codicon ${S.id}`):(this._icons.set(S.id,S),this._onDidRegister.fire(S))}get(S){return this._icons.get(S)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const be=new me,we=be;function W(A,S){return new ye(A,S)}function d(A){return A?A.replace(/\$\((.*?)\)/g,(S,k)=>` ${k} `).trim():""}class ye{constructor(S,k,p){this.id=S,this.definition=k,this.description=p,be.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var G;(function(A){A.iconNameSegment="[A-Za-z0-9]+",A.iconNameExpression="[A-Za-z0-9\\-]+",A.iconModifierExpression="~[A-Za-z]+";const S=new RegExp(`^(${A.iconNameExpression})(${A.iconModifierExpression})?$`);function k(B){if(B instanceof ye)return["codicon","codicon-"+B.id];const F=S.exec(B.id);if(!F)return k(ye.error);let[,V,j]=F;const se=["codicon","codicon-"+V];return j&&se.push("codicon-modifier-"+j.substr(1)),se}A.asClassNameArray=k;function p(B){return k(B).join(" ")}A.asClassName=p;function m(B){return"."+k(B).join(".")}A.asCSSSelector=m})(G||(G={})),function(A){A.add=new A("add",{fontCharacter:"\\ea60"}),A.plus=new A("plus",A.add.definition),A.gistNew=new A("gist-new",A.add.definition),A.repoCreate=new A("repo-create",A.add.definition),A.lightbulb=new A("lightbulb",{fontCharacter:"\\ea61"}),A.lightBulb=new A("light-bulb",{fontCharacter:"\\ea61"}),A.repo=new A("repo",{fontCharacter:"\\ea62"}),A.repoDelete=new A("repo-delete",{fontCharacter:"\\ea62"}),A.gistFork=new A("gist-fork",{fontCharacter:"\\ea63"}),A.repoForked=new A("repo-forked",{fontCharacter:"\\ea63"}),A.gitPullRequest=new A("git-pull-request",{fontCharacter:"\\ea64"}),A.gitPullRequestAbandoned=new A("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),A.recordKeys=new A("record-keys",{fontCharacter:"\\ea65"}),A.keyboard=new A("keyboard",{fontCharacter:"\\ea65"}),A.tag=new A("tag",{fontCharacter:"\\ea66"}),A.tagAdd=new A("tag-add",{fontCharacter:"\\ea66"}),A.tagRemove=new A("tag-remove",{fontCharacter:"\\ea66"}),A.person=new A("person",{fontCharacter:"\\ea67"}),A.personFollow=new A("person-follow",{fontCharacter:"\\ea67"}),A.personOutline=new A("person-outline",{fontCharacter:"\\ea67"}),A.personFilled=new A("person-filled",{fontCharacter:"\\ea67"}),A.gitBranch=new A("git-branch",{fontCharacter:"\\ea68"}),A.gitBranchCreate=new A("git-branch-create",{fontCharacter:"\\ea68"}),A.gitBranchDelete=new A("git-branch-delete",{fontCharacter:"\\ea68"}),A.sourceControl=new A("source-control",{fontCharacter:"\\ea68"}),A.mirror=new A("mirror",{fontCharacter:"\\ea69"}),A.mirrorPublic=new A("mirror-public",{fontCharacter:"\\ea69"}),A.star=new A("star",{fontCharacter:"\\ea6a"}),A.starAdd=new A("star-add",{fontCharacter:"\\ea6a"}),A.starDelete=new A("star-delete",{fontCharacter:"\\ea6a"}),A.starEmpty=new A("star-empty",{fontCharacter:"\\ea6a"}),A.comment=new A("comment",{fontCharacter:"\\ea6b"}),A.commentAdd=new A("comment-add",{fontCharacter:"\\ea6b"}),A.alert=new A("alert",{fontCharacter:"\\ea6c"}),A.warning=new A("warning",{fontCharacter:"\\ea6c"}),A.search=new A("search",{fontCharacter:"\\ea6d"}),A.searchSave=new A("search-save",{fontCharacter:"\\ea6d"}),A.logOut=new A("log-out",{fontCharacter:"\\ea6e"}),A.signOut=new A("sign-out",{fontCharacter:"\\ea6e"}),A.logIn=new A("log-in",{fontCharacter:"\\ea6f"}),A.signIn=new A("sign-in",{fontCharacter:"\\ea6f"}),A.eye=new A("eye",{fontCharacter:"\\ea70"}),A.eyeUnwatch=new A("eye-unwatch",{fontCharacter:"\\ea70"}),A.eyeWatch=new A("eye-watch",{fontCharacter:"\\ea70"}),A.circleFilled=new A("circle-filled",{fontCharacter:"\\ea71"}),A.primitiveDot=new A("primitive-dot",{fontCharacter:"\\ea71"}),A.closeDirty=new A("close-dirty",{fontCharacter:"\\ea71"}),A.debugBreakpoint=new A("debug-breakpoint",{fontCharacter:"\\ea71"}),A.debugBreakpointDisabled=new A("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),A.debugHint=new A("debug-hint",{fontCharacter:"\\ea71"}),A.primitiveSquare=new A("primitive-square",{fontCharacter:"\\ea72"}),A.edit=new A("edit",{fontCharacter:"\\ea73"}),A.pencil=new A("pencil",{fontCharacter:"\\ea73"}),A.info=new A("info",{fontCharacter:"\\ea74"}),A.issueOpened=new A("issue-opened",{fontCharacter:"\\ea74"}),A.gistPrivate=new A("gist-private",{fontCharacter:"\\ea75"}),A.gitForkPrivate=new A("git-fork-private",{fontCharacter:"\\ea75"}),A.lock=new A("lock",{fontCharacter:"\\ea75"}),A.mirrorPrivate=new A("mirror-private",{fontCharacter:"\\ea75"}),A.close=new A("close",{fontCharacter:"\\ea76"}),A.removeClose=new A("remove-close",{fontCharacter:"\\ea76"}),A.x=new A("x",{fontCharacter:"\\ea76"}),A.repoSync=new A("repo-sync",{fontCharacter:"\\ea77"}),A.sync=new A("sync",{fontCharacter:"\\ea77"}),A.clone=new A("clone",{fontCharacter:"\\ea78"}),A.desktopDownload=new A("desktop-download",{fontCharacter:"\\ea78"}),A.beaker=new A("beaker",{fontCharacter:"\\ea79"}),A.microscope=new A("microscope",{fontCharacter:"\\ea79"}),A.vm=new A("vm",{fontCharacter:"\\ea7a"}),A.deviceDesktop=new A("device-desktop",{fontCharacter:"\\ea7a"}),A.file=new A("file",{fontCharacter:"\\ea7b"}),A.fileText=new A("file-text",{fontCharacter:"\\ea7b"}),A.more=new A("more",{fontCharacter:"\\ea7c"}),A.ellipsis=new A("ellipsis",{fontCharacter:"\\ea7c"}),A.kebabHorizontal=new A("kebab-horizontal",{fontCharacter:"\\ea7c"}),A.mailReply=new A("mail-reply",{fontCharacter:"\\ea7d"}),A.reply=new A("reply",{fontCharacter:"\\ea7d"}),A.organization=new A("organization",{fontCharacter:"\\ea7e"}),A.organizationFilled=new A("organization-filled",{fontCharacter:"\\ea7e"}),A.organizationOutline=new A("organization-outline",{fontCharacter:"\\ea7e"}),A.newFile=new A("new-file",{fontCharacter:"\\ea7f"}),A.fileAdd=new A("file-add",{fontCharacter:"\\ea7f"}),A.newFolder=new A("new-folder",{fontCharacter:"\\ea80"}),A.fileDirectoryCreate=new A("file-directory-create",{fontCharacter:"\\ea80"}),A.trash=new A("trash",{fontCharacter:"\\ea81"}),A.trashcan=new A("trashcan",{fontCharacter:"\\ea81"}),A.history=new A("history",{fontCharacter:"\\ea82"}),A.clock=new A("clock",{fontCharacter:"\\ea82"}),A.folder=new A("folder",{fontCharacter:"\\ea83"}),A.fileDirectory=new A("file-directory",{fontCharacter:"\\ea83"}),A.symbolFolder=new A("symbol-folder",{fontCharacter:"\\ea83"}),A.logoGithub=new A("logo-github",{fontCharacter:"\\ea84"}),A.markGithub=new A("mark-github",{fontCharacter:"\\ea84"}),A.github=new A("github",{fontCharacter:"\\ea84"}),A.terminal=new A("terminal",{fontCharacter:"\\ea85"}),A.console=new A("console",{fontCharacter:"\\ea85"}),A.repl=new A("repl",{fontCharacter:"\\ea85"}),A.zap=new A("zap",{fontCharacter:"\\ea86"}),A.symbolEvent=new A("symbol-event",{fontCharacter:"\\ea86"}),A.error=new A("error",{fontCharacter:"\\ea87"}),A.stop=new A("stop",{fontCharacter:"\\ea87"}),A.variable=new A("variable",{fontCharacter:"\\ea88"}),A.symbolVariable=new A("symbol-variable",{fontCharacter:"\\ea88"}),A.array=new A("array",{fontCharacter:"\\ea8a"}),A.symbolArray=new A("symbol-array",{fontCharacter:"\\ea8a"}),A.symbolModule=new A("symbol-module",{fontCharacter:"\\ea8b"}),A.symbolPackage=new A("symbol-package",{fontCharacter:"\\ea8b"}),A.symbolNamespace=new A("symbol-namespace",{fontCharacter:"\\ea8b"}),A.symbolObject=new A("symbol-object",{fontCharacter:"\\ea8b"}),A.symbolMethod=new A("symbol-method",{fontCharacter:"\\ea8c"}),A.symbolFunction=new A("symbol-function",{fontCharacter:"\\ea8c"}),A.symbolConstructor=new A("symbol-constructor",{fontCharacter:"\\ea8c"}),A.symbolBoolean=new A("symbol-boolean",{fontCharacter:"\\ea8f"}),A.symbolNull=new A("symbol-null",{fontCharacter:"\\ea8f"}),A.symbolNumeric=new A("symbol-numeric",{fontCharacter:"\\ea90"}),A.symbolNumber=new A("symbol-number",{fontCharacter:"\\ea90"}),A.symbolStructure=new A("symbol-structure",{fontCharacter:"\\ea91"}),A.symbolStruct=new A("symbol-struct",{fontCharacter:"\\ea91"}),A.symbolParameter=new A("symbol-parameter",{fontCharacter:"\\ea92"}),A.symbolTypeParameter=new A("symbol-type-parameter",{fontCharacter:"\\ea92"}),A.symbolKey=new A("symbol-key",{fontCharacter:"\\ea93"}),A.symbolText=new A("symbol-text",{fontCharacter:"\\ea93"}),A.symbolReference=new A("symbol-reference",{fontCharacter:"\\ea94"}),A.goToFile=new A("go-to-file",{fontCharacter:"\\ea94"}),A.symbolEnum=new A("symbol-enum",{fontCharacter:"\\ea95"}),A.symbolValue=new A("symbol-value",{fontCharacter:"\\ea95"}),A.symbolRuler=new A("symbol-ruler",{fontCharacter:"\\ea96"}),A.symbolUnit=new A("symbol-unit",{fontCharacter:"\\ea96"}),A.activateBreakpoints=new A("activate-breakpoints",{fontCharacter:"\\ea97"}),A.archive=new A("archive",{fontCharacter:"\\ea98"}),A.arrowBoth=new A("arrow-both",{fontCharacter:"\\ea99"}),A.arrowDown=new A("arrow-down",{fontCharacter:"\\ea9a"}),A.arrowLeft=new A("arrow-left",{fontCharacter:"\\ea9b"}),A.arrowRight=new A("arrow-right",{fontCharacter:"\\ea9c"}),A.arrowSmallDown=new A("arrow-small-down",{fontCharacter:"\\ea9d"}),A.arrowSmallLeft=new A("arrow-small-left",{fontCharacter:"\\ea9e"}),A.arrowSmallRight=new A("arrow-small-right",{fontCharacter:"\\ea9f"}),A.arrowSmallUp=new A("arrow-small-up",{fontCharacter:"\\eaa0"}),A.arrowUp=new A("arrow-up",{fontCharacter:"\\eaa1"}),A.bell=new A("bell",{fontCharacter:"\\eaa2"}),A.bold=new A("bold",{fontCharacter:"\\eaa3"}),A.book=new A("book",{fontCharacter:"\\eaa4"}),A.bookmark=new A("bookmark",{fontCharacter:"\\eaa5"}),A.debugBreakpointConditionalUnverified=new A("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),A.debugBreakpointConditional=new A("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),A.debugBreakpointConditionalDisabled=new A("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),A.debugBreakpointDataUnverified=new A("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),A.debugBreakpointData=new A("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),A.debugBreakpointDataDisabled=new A("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),A.debugBreakpointLogUnverified=new A("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),A.debugBreakpointLog=new A("debug-breakpoint-log",{fontCharacter:"\\eaab"}),A.debugBreakpointLogDisabled=new A("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),A.briefcase=new A("briefcase",{fontCharacter:"\\eaac"}),A.broadcast=new A("broadcast",{fontCharacter:"\\eaad"}),A.browser=new A("browser",{fontCharacter:"\\eaae"}),A.bug=new A("bug",{fontCharacter:"\\eaaf"}),A.calendar=new A("calendar",{fontCharacter:"\\eab0"}),A.caseSensitive=new A("case-sensitive",{fontCharacter:"\\eab1"}),A.check=new A("check",{fontCharacter:"\\eab2"}),A.checklist=new A("checklist",{fontCharacter:"\\eab3"}),A.chevronDown=new A("chevron-down",{fontCharacter:"\\eab4"}),A.dropDownButton=new A("drop-down-button",A.chevronDown.definition),A.chevronLeft=new A("chevron-left",{fontCharacter:"\\eab5"}),A.chevronRight=new A("chevron-right",{fontCharacter:"\\eab6"}),A.chevronUp=new A("chevron-up",{fontCharacter:"\\eab7"}),A.chromeClose=new A("chrome-close",{fontCharacter:"\\eab8"}),A.chromeMaximize=new A("chrome-maximize",{fontCharacter:"\\eab9"}),A.chromeMinimize=new A("chrome-minimize",{fontCharacter:"\\eaba"}),A.chromeRestore=new A("chrome-restore",{fontCharacter:"\\eabb"}),A.circleOutline=new A("circle-outline",{fontCharacter:"\\eabc"}),A.debugBreakpointUnverified=new A("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),A.circleSlash=new A("circle-slash",{fontCharacter:"\\eabd"}),A.circuitBoard=new A("circuit-board",{fontCharacter:"\\eabe"}),A.clearAll=new A("clear-all",{fontCharacter:"\\eabf"}),A.clippy=new A("clippy",{fontCharacter:"\\eac0"}),A.closeAll=new A("close-all",{fontCharacter:"\\eac1"}),A.cloudDownload=new A("cloud-download",{fontCharacter:"\\eac2"}),A.cloudUpload=new A("cloud-upload",{fontCharacter:"\\eac3"}),A.code=new A("code",{fontCharacter:"\\eac4"}),A.collapseAll=new A("collapse-all",{fontCharacter:"\\eac5"}),A.colorMode=new A("color-mode",{fontCharacter:"\\eac6"}),A.commentDiscussion=new A("comment-discussion",{fontCharacter:"\\eac7"}),A.compareChanges=new A("compare-changes",{fontCharacter:"\\eafd"}),A.creditCard=new A("credit-card",{fontCharacter:"\\eac9"}),A.dash=new A("dash",{fontCharacter:"\\eacc"}),A.dashboard=new A("dashboard",{fontCharacter:"\\eacd"}),A.database=new A("database",{fontCharacter:"\\eace"}),A.debugContinue=new A("debug-continue",{fontCharacter:"\\eacf"}),A.debugDisconnect=new A("debug-disconnect",{fontCharacter:"\\ead0"}),A.debugPause=new A("debug-pause",{fontCharacter:"\\ead1"}),A.debugRestart=new A("debug-restart",{fontCharacter:"\\ead2"}),A.debugStart=new A("debug-start",{fontCharacter:"\\ead3"}),A.debugStepInto=new A("debug-step-into",{fontCharacter:"\\ead4"}),A.debugStepOut=new A("debug-step-out",{fontCharacter:"\\ead5"}),A.debugStepOver=new A("debug-step-over",{fontCharacter:"\\ead6"}),A.debugStop=new A("debug-stop",{fontCharacter:"\\ead7"}),A.debug=new A("debug",{fontCharacter:"\\ead8"}),A.deviceCameraVideo=new A("device-camera-video",{fontCharacter:"\\ead9"}),A.deviceCamera=new A("device-camera",{fontCharacter:"\\eada"}),A.deviceMobile=new A("device-mobile",{fontCharacter:"\\eadb"}),A.diffAdded=new A("diff-added",{fontCharacter:"\\eadc"}),A.diffIgnored=new A("diff-ignored",{fontCharacter:"\\eadd"}),A.diffModified=new A("diff-modified",{fontCharacter:"\\eade"}),A.diffRemoved=new A("diff-removed",{fontCharacter:"\\eadf"}),A.diffRenamed=new A("diff-renamed",{fontCharacter:"\\eae0"}),A.diff=new A("diff",{fontCharacter:"\\eae1"}),A.discard=new A("discard",{fontCharacter:"\\eae2"}),A.editorLayout=new A("editor-layout",{fontCharacter:"\\eae3"}),A.emptyWindow=new A("empty-window",{fontCharacter:"\\eae4"}),A.exclude=new A("exclude",{fontCharacter:"\\eae5"}),A.extensions=new A("extensions",{fontCharacter:"\\eae6"}),A.eyeClosed=new A("eye-closed",{fontCharacter:"\\eae7"}),A.fileBinary=new A("file-binary",{fontCharacter:"\\eae8"}),A.fileCode=new A("file-code",{fontCharacter:"\\eae9"}),A.fileMedia=new A("file-media",{fontCharacter:"\\eaea"}),A.filePdf=new A("file-pdf",{fontCharacter:"\\eaeb"}),A.fileSubmodule=new A("file-submodule",{fontCharacter:"\\eaec"}),A.fileSymlinkDirectory=new A("file-symlink-directory",{fontCharacter:"\\eaed"}),A.fileSymlinkFile=new A("file-symlink-file",{fontCharacter:"\\eaee"}),A.fileZip=new A("file-zip",{fontCharacter:"\\eaef"}),A.files=new A("files",{fontCharacter:"\\eaf0"}),A.filter=new A("filter",{fontCharacter:"\\eaf1"}),A.flame=new A("flame",{fontCharacter:"\\eaf2"}),A.foldDown=new A("fold-down",{fontCharacter:"\\eaf3"}),A.foldUp=new A("fold-up",{fontCharacter:"\\eaf4"}),A.fold=new A("fold",{fontCharacter:"\\eaf5"}),A.folderActive=new A("folder-active",{fontCharacter:"\\eaf6"}),A.folderOpened=new A("folder-opened",{fontCharacter:"\\eaf7"}),A.gear=new A("gear",{fontCharacter:"\\eaf8"}),A.gift=new A("gift",{fontCharacter:"\\eaf9"}),A.gistSecret=new A("gist-secret",{fontCharacter:"\\eafa"}),A.gist=new A("gist",{fontCharacter:"\\eafb"}),A.gitCommit=new A("git-commit",{fontCharacter:"\\eafc"}),A.gitCompare=new A("git-compare",{fontCharacter:"\\eafd"}),A.gitMerge=new A("git-merge",{fontCharacter:"\\eafe"}),A.githubAction=new A("github-action",{fontCharacter:"\\eaff"}),A.githubAlt=new A("github-alt",{fontCharacter:"\\eb00"}),A.globe=new A("globe",{fontCharacter:"\\eb01"}),A.grabber=new A("grabber",{fontCharacter:"\\eb02"}),A.graph=new A("graph",{fontCharacter:"\\eb03"}),A.gripper=new A("gripper",{fontCharacter:"\\eb04"}),A.heart=new A("heart",{fontCharacter:"\\eb05"}),A.home=new A("home",{fontCharacter:"\\eb06"}),A.horizontalRule=new A("horizontal-rule",{fontCharacter:"\\eb07"}),A.hubot=new A("hubot",{fontCharacter:"\\eb08"}),A.inbox=new A("inbox",{fontCharacter:"\\eb09"}),A.issueClosed=new A("issue-closed",{fontCharacter:"\\eba4"}),A.issueReopened=new A("issue-reopened",{fontCharacter:"\\eb0b"}),A.issues=new A("issues",{fontCharacter:"\\eb0c"}),A.italic=new A("italic",{fontCharacter:"\\eb0d"}),A.jersey=new A("jersey",{fontCharacter:"\\eb0e"}),A.json=new A("json",{fontCharacter:"\\eb0f"}),A.kebabVertical=new A("kebab-vertical",{fontCharacter:"\\eb10"}),A.key=new A("key",{fontCharacter:"\\eb11"}),A.law=new A("law",{fontCharacter:"\\eb12"}),A.lightbulbAutofix=new A("lightbulb-autofix",{fontCharacter:"\\eb13"}),A.linkExternal=new A("link-external",{fontCharacter:"\\eb14"}),A.link=new A("link",{fontCharacter:"\\eb15"}),A.listOrdered=new A("list-ordered",{fontCharacter:"\\eb16"}),A.listUnordered=new A("list-unordered",{fontCharacter:"\\eb17"}),A.liveShare=new A("live-share",{fontCharacter:"\\eb18"}),A.loading=new A("loading",{fontCharacter:"\\eb19"}),A.location=new A("location",{fontCharacter:"\\eb1a"}),A.mailRead=new A("mail-read",{fontCharacter:"\\eb1b"}),A.mail=new A("mail",{fontCharacter:"\\eb1c"}),A.markdown=new A("markdown",{fontCharacter:"\\eb1d"}),A.megaphone=new A("megaphone",{fontCharacter:"\\eb1e"}),A.mention=new A("mention",{fontCharacter:"\\eb1f"}),A.milestone=new A("milestone",{fontCharacter:"\\eb20"}),A.mortarBoard=new A("mortar-board",{fontCharacter:"\\eb21"}),A.move=new A("move",{fontCharacter:"\\eb22"}),A.multipleWindows=new A("multiple-windows",{fontCharacter:"\\eb23"}),A.mute=new A("mute",{fontCharacter:"\\eb24"}),A.noNewline=new A("no-newline",{fontCharacter:"\\eb25"}),A.note=new A("note",{fontCharacter:"\\eb26"}),A.octoface=new A("octoface",{fontCharacter:"\\eb27"}),A.openPreview=new A("open-preview",{fontCharacter:"\\eb28"}),A.package_=new A("package",{fontCharacter:"\\eb29"}),A.paintcan=new A("paintcan",{fontCharacter:"\\eb2a"}),A.pin=new A("pin",{fontCharacter:"\\eb2b"}),A.play=new A("play",{fontCharacter:"\\eb2c"}),A.run=new A("run",{fontCharacter:"\\eb2c"}),A.plug=new A("plug",{fontCharacter:"\\eb2d"}),A.preserveCase=new A("preserve-case",{fontCharacter:"\\eb2e"}),A.preview=new A("preview",{fontCharacter:"\\eb2f"}),A.project=new A("project",{fontCharacter:"\\eb30"}),A.pulse=new A("pulse",{fontCharacter:"\\eb31"}),A.question=new A("question",{fontCharacter:"\\eb32"}),A.quote=new A("quote",{fontCharacter:"\\eb33"}),A.radioTower=new A("radio-tower",{fontCharacter:"\\eb34"}),A.reactions=new A("reactions",{fontCharacter:"\\eb35"}),A.references=new A("references",{fontCharacter:"\\eb36"}),A.refresh=new A("refresh",{fontCharacter:"\\eb37"}),A.regex=new A("regex",{fontCharacter:"\\eb38"}),A.remoteExplorer=new A("remote-explorer",{fontCharacter:"\\eb39"}),A.remote=new A("remote",{fontCharacter:"\\eb3a"}),A.remove=new A("remove",{fontCharacter:"\\eb3b"}),A.replaceAll=new A("replace-all",{fontCharacter:"\\eb3c"}),A.replace=new A("replace",{fontCharacter:"\\eb3d"}),A.repoClone=new A("repo-clone",{fontCharacter:"\\eb3e"}),A.repoForcePush=new A("repo-force-push",{fontCharacter:"\\eb3f"}),A.repoPull=new A("repo-pull",{fontCharacter:"\\eb40"}),A.repoPush=new A("repo-push",{fontCharacter:"\\eb41"}),A.report=new A("report",{fontCharacter:"\\eb42"}),A.requestChanges=new A("request-changes",{fontCharacter:"\\eb43"}),A.rocket=new A("rocket",{fontCharacter:"\\eb44"}),A.rootFolderOpened=new A("root-folder-opened",{fontCharacter:"\\eb45"}),A.rootFolder=new A("root-folder",{fontCharacter:"\\eb46"}),A.rss=new A("rss",{fontCharacter:"\\eb47"}),A.ruby=new A("ruby",{fontCharacter:"\\eb48"}),A.saveAll=new A("save-all",{fontCharacter:"\\eb49"}),A.saveAs=new A("save-as",{fontCharacter:"\\eb4a"}),A.save=new A("save",{fontCharacter:"\\eb4b"}),A.screenFull=new A("screen-full",{fontCharacter:"\\eb4c"}),A.screenNormal=new A("screen-normal",{fontCharacter:"\\eb4d"}),A.searchStop=new A("search-stop",{fontCharacter:"\\eb4e"}),A.server=new A("server",{fontCharacter:"\\eb50"}),A.settingsGear=new A("settings-gear",{fontCharacter:"\\eb51"}),A.settings=new A("settings",{fontCharacter:"\\eb52"}),A.shield=new A("shield",{fontCharacter:"\\eb53"}),A.smiley=new A("smiley",{fontCharacter:"\\eb54"}),A.sortPrecedence=new A("sort-precedence",{fontCharacter:"\\eb55"}),A.splitHorizontal=new A("split-horizontal",{fontCharacter:"\\eb56"}),A.splitVertical=new A("split-vertical",{fontCharacter:"\\eb57"}),A.squirrel=new A("squirrel",{fontCharacter:"\\eb58"}),A.starFull=new A("star-full",{fontCharacter:"\\eb59"}),A.starHalf=new A("star-half",{fontCharacter:"\\eb5a"}),A.symbolClass=new A("symbol-class",{fontCharacter:"\\eb5b"}),A.symbolColor=new A("symbol-color",{fontCharacter:"\\eb5c"}),A.symbolConstant=new A("symbol-constant",{fontCharacter:"\\eb5d"}),A.symbolEnumMember=new A("symbol-enum-member",{fontCharacter:"\\eb5e"}),A.symbolField=new A("symbol-field",{fontCharacter:"\\eb5f"}),A.symbolFile=new A("symbol-file",{fontCharacter:"\\eb60"}),A.symbolInterface=new A("symbol-interface",{fontCharacter:"\\eb61"}),A.symbolKeyword=new A("symbol-keyword",{fontCharacter:"\\eb62"}),A.symbolMisc=new A("symbol-misc",{fontCharacter:"\\eb63"}),A.symbolOperator=new A("symbol-operator",{fontCharacter:"\\eb64"}),A.symbolProperty=new A("symbol-property",{fontCharacter:"\\eb65"}),A.wrench=new A("wrench",{fontCharacter:"\\eb65"}),A.wrenchSubaction=new A("wrench-subaction",{fontCharacter:"\\eb65"}),A.symbolSnippet=new A("symbol-snippet",{fontCharacter:"\\eb66"}),A.tasklist=new A("tasklist",{fontCharacter:"\\eb67"}),A.telescope=new A("telescope",{fontCharacter:"\\eb68"}),A.textSize=new A("text-size",{fontCharacter:"\\eb69"}),A.threeBars=new A("three-bars",{fontCharacter:"\\eb6a"}),A.thumbsdown=new A("thumbsdown",{fontCharacter:"\\eb6b"}),A.thumbsup=new A("thumbsup",{fontCharacter:"\\eb6c"}),A.tools=new A("tools",{fontCharacter:"\\eb6d"}),A.triangleDown=new A("triangle-down",{fontCharacter:"\\eb6e"}),A.triangleLeft=new A("triangle-left",{fontCharacter:"\\eb6f"}),A.triangleRight=new A("triangle-right",{fontCharacter:"\\eb70"}),A.triangleUp=new A("triangle-up",{fontCharacter:"\\eb71"}),A.twitter=new A("twitter",{fontCharacter:"\\eb72"}),A.unfold=new A("unfold",{fontCharacter:"\\eb73"}),A.unlock=new A("unlock",{fontCharacter:"\\eb74"}),A.unmute=new A("unmute",{fontCharacter:"\\eb75"}),A.unverified=new A("unverified",{fontCharacter:"\\eb76"}),A.verified=new A("verified",{fontCharacter:"\\eb77"}),A.versions=new A("versions",{fontCharacter:"\\eb78"}),A.vmActive=new A("vm-active",{fontCharacter:"\\eb79"}),A.vmOutline=new A("vm-outline",{fontCharacter:"\\eb7a"}),A.vmRunning=new A("vm-running",{fontCharacter:"\\eb7b"}),A.watch=new A("watch",{fontCharacter:"\\eb7c"}),A.whitespace=new A("whitespace",{fontCharacter:"\\eb7d"}),A.wholeWord=new A("whole-word",{fontCharacter:"\\eb7e"}),A.window=new A("window",{fontCharacter:"\\eb7f"}),A.wordWrap=new A("word-wrap",{fontCharacter:"\\eb80"}),A.zoomIn=new A("zoom-in",{fontCharacter:"\\eb81"}),A.zoomOut=new A("zoom-out",{fontCharacter:"\\eb82"}),A.listFilter=new A("list-filter",{fontCharacter:"\\eb83"}),A.listFlat=new A("list-flat",{fontCharacter:"\\eb84"}),A.listSelection=new A("list-selection",{fontCharacter:"\\eb85"}),A.selection=new A("selection",{fontCharacter:"\\eb85"}),A.listTree=new A("list-tree",{fontCharacter:"\\eb86"}),A.debugBreakpointFunctionUnverified=new A("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),A.debugBreakpointFunction=new A("debug-breakpoint-function",{fontCharacter:"\\eb88"}),A.debugBreakpointFunctionDisabled=new A("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),A.debugStackframeActive=new A("debug-stackframe-active",{fontCharacter:"\\eb89"}),A.debugStackframeDot=new A("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),A.debugStackframe=new A("debug-stackframe",{fontCharacter:"\\eb8b"}),A.debugStackframeFocused=new A("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),A.debugBreakpointUnsupported=new A("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),A.symbolString=new A("symbol-string",{fontCharacter:"\\eb8d"}),A.debugReverseContinue=new A("debug-reverse-continue",{fontCharacter:"\\eb8e"}),A.debugStepBack=new A("debug-step-back",{fontCharacter:"\\eb8f"}),A.debugRestartFrame=new A("debug-restart-frame",{fontCharacter:"\\eb90"}),A.callIncoming=new A("call-incoming",{fontCharacter:"\\eb92"}),A.callOutgoing=new A("call-outgoing",{fontCharacter:"\\eb93"}),A.menu=new A("menu",{fontCharacter:"\\eb94"}),A.expandAll=new A("expand-all",{fontCharacter:"\\eb95"}),A.feedback=new A("feedback",{fontCharacter:"\\eb96"}),A.groupByRefType=new A("group-by-ref-type",{fontCharacter:"\\eb97"}),A.ungroupByRefType=new A("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),A.account=new A("account",{fontCharacter:"\\eb99"}),A.bellDot=new A("bell-dot",{fontCharacter:"\\eb9a"}),A.debugConsole=new A("debug-console",{fontCharacter:"\\eb9b"}),A.library=new A("library",{fontCharacter:"\\eb9c"}),A.output=new A("output",{fontCharacter:"\\eb9d"}),A.runAll=new A("run-all",{fontCharacter:"\\eb9e"}),A.syncIgnored=new A("sync-ignored",{fontCharacter:"\\eb9f"}),A.pinned=new A("pinned",{fontCharacter:"\\eba0"}),A.githubInverted=new A("github-inverted",{fontCharacter:"\\eba1"}),A.debugAlt=new A("debug-alt",{fontCharacter:"\\eb91"}),A.serverProcess=new A("server-process",{fontCharacter:"\\eba2"}),A.serverEnvironment=new A("server-environment",{fontCharacter:"\\eba3"}),A.pass=new A("pass",{fontCharacter:"\\eba4"}),A.stopCircle=new A("stop-circle",{fontCharacter:"\\eba5"}),A.playCircle=new A("play-circle",{fontCharacter:"\\eba6"}),A.record=new A("record",{fontCharacter:"\\eba7"}),A.debugAltSmall=new A("debug-alt-small",{fontCharacter:"\\eba8"}),A.vmConnect=new A("vm-connect",{fontCharacter:"\\eba9"}),A.cloud=new A("cloud",{fontCharacter:"\\ebaa"}),A.merge=new A("merge",{fontCharacter:"\\ebab"}),A.exportIcon=new A("export",{fontCharacter:"\\ebac"}),A.graphLeft=new A("graph-left",{fontCharacter:"\\ebad"}),A.magnet=new A("magnet",{fontCharacter:"\\ebae"}),A.notebook=new A("notebook",{fontCharacter:"\\ebaf"}),A.redo=new A("redo",{fontCharacter:"\\ebb0"}),A.checkAll=new A("check-all",{fontCharacter:"\\ebb1"}),A.pinnedDirty=new A("pinned-dirty",{fontCharacter:"\\ebb2"}),A.passFilled=new A("pass-filled",{fontCharacter:"\\ebb3"}),A.circleLargeFilled=new A("circle-large-filled",{fontCharacter:"\\ebb4"}),A.circleLargeOutline=new A("circle-large-outline",{fontCharacter:"\\ebb5"}),A.combine=new A("combine",{fontCharacter:"\\ebb6"}),A.gather=new A("gather",{fontCharacter:"\\ebb6"}),A.table=new A("table",{fontCharacter:"\\ebb7"}),A.variableGroup=new A("variable-group",{fontCharacter:"\\ebb8"}),A.typeHierarchy=new A("type-hierarchy",{fontCharacter:"\\ebb9"}),A.typeHierarchySub=new A("type-hierarchy-sub",{fontCharacter:"\\ebba"}),A.typeHierarchySuper=new A("type-hierarchy-super",{fontCharacter:"\\ebbb"}),A.gitPullRequestCreate=new A("git-pull-request-create",{fontCharacter:"\\ebbc"}),A.runAbove=new A("run-above",{fontCharacter:"\\ebbd"}),A.runBelow=new A("run-below",{fontCharacter:"\\ebbe"}),A.notebookTemplate=new A("notebook-template",{fontCharacter:"\\ebbf"}),A.debugRerun=new A("debug-rerun",{fontCharacter:"\\ebc0"}),A.workspaceTrusted=new A("workspace-trusted",{fontCharacter:"\\ebc1"}),A.workspaceUntrusted=new A("workspace-untrusted",{fontCharacter:"\\ebc2"}),A.workspaceUnspecified=new A("workspace-unspecified",{fontCharacter:"\\ebc3"}),A.terminalCmd=new A("terminal-cmd",{fontCharacter:"\\ebc4"}),A.terminalDebian=new A("terminal-debian",{fontCharacter:"\\ebc5"}),A.terminalLinux=new A("terminal-linux",{fontCharacter:"\\ebc6"}),A.terminalPowershell=new A("terminal-powershell",{fontCharacter:"\\ebc7"}),A.terminalTmux=new A("terminal-tmux",{fontCharacter:"\\ebc8"}),A.terminalUbuntu=new A("terminal-ubuntu",{fontCharacter:"\\ebc9"}),A.terminalBash=new A("terminal-bash",{fontCharacter:"\\ebca"}),A.arrowSwap=new A("arrow-swap",{fontCharacter:"\\ebcb"}),A.copy=new A("copy",{fontCharacter:"\\ebcc"}),A.personAdd=new A("person-add",{fontCharacter:"\\ebcd"}),A.filterFilled=new A("filter-filled",{fontCharacter:"\\ebce"}),A.wand=new A("wand",{fontCharacter:"\\ebcf"}),A.debugLineByLine=new A("debug-line-by-line",{fontCharacter:"\\ebd0"}),A.inspect=new A("inspect",{fontCharacter:"\\ebd1"}),A.layers=new A("layers",{fontCharacter:"\\ebd2"}),A.layersDot=new A("layers-dot",{fontCharacter:"\\ebd3"}),A.layersActive=new A("layers-active",{fontCharacter:"\\ebd4"}),A.compass=new A("compass",{fontCharacter:"\\ebd5"}),A.compassDot=new A("compass-dot",{fontCharacter:"\\ebd6"}),A.compassActive=new A("compass-active",{fontCharacter:"\\ebd7"}),A.azure=new A("azure",{fontCharacter:"\\ebd8"}),A.issueDraft=new A("issue-draft",{fontCharacter:"\\ebd9"}),A.gitPullRequestClosed=new A("git-pull-request-closed",{fontCharacter:"\\ebda"}),A.gitPullRequestDraft=new A("git-pull-request-draft",{fontCharacter:"\\ebdb"}),A.debugAll=new A("debug-all",{fontCharacter:"\\ebdc"}),A.debugCoverage=new A("debug-coverage",{fontCharacter:"\\ebdd"}),A.runErrors=new A("run-errors",{fontCharacter:"\\ebde"}),A.folderLibrary=new A("folder-library",{fontCharacter:"\\ebdf"}),A.debugContinueSmall=new A("debug-continue-small",{fontCharacter:"\\ebe0"}),A.beakerStop=new A("beaker-stop",{fontCharacter:"\\ebe1"}),A.graphLine=new A("graph-line",{fontCharacter:"\\ebe2"}),A.graphScatter=new A("graph-scatter",{fontCharacter:"\\ebe3"}),A.pieChart=new A("pie-chart",{fontCharacter:"\\ebe4"}),A.bracket=new A("bracket",A.json.definition),A.bracketDot=new A("bracket-dot",{fontCharacter:"\\ebe5"}),A.bracketError=new A("bracket-error",{fontCharacter:"\\ebe6"}),A.lockSmall=new A("lock-small",{fontCharacter:"\\ebe7"}),A.azureDevops=new A("azure-devops",{fontCharacter:"\\ebe8"}),A.verifiedFilled=new A("verified-filled",{fontCharacter:"\\ebe9"})}(ye||(ye={}))},79881:function(Zn,Dt,x){"use strict";x.d(Dt,{B8:function(){return k},Cp:function(){return we},F0:function(){return G},L6:function(){return S},VV:function(){return ye},b1:function(){return A},dL:function(){return be},ri:function(){return W}});class M{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
`+m.stack):m},0)}}emit(m){this.listeners.forEach(B=>{B(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const me=new M;function be(p){ye(p)||me.onUnexpectedError(p)}function we(p){ye(p)||me.onUnexpectedExternalError(p)}function W(p){if(p instanceof Error){let{name:m,message:B}=p;const F=p.stacktrace||p.stack;return{$isError:!0,name:m,message:B,stack:F}}return p}const d="Canceled";function ye(p){return p instanceof Error&&p.name===d&&p.message===d}function G(){const p=new Error(d);return p.name=p.message,p}function A(p){return p?new Error(`Illegal argument: ${p}`):new Error("Illegal argument")}function S(p){return p?new Error(`Illegal state: ${p}`):new Error("Illegal state")}class k extends Error{constructor(m){super("NotSupported"),m&&(this.message=m)}}},4348:function(Zn,Dt,x){"use strict";x.d(Dt,{D0:function(){return k},E7:function(){return p},K3:function(){return S},Q5:function(){return A},ZD:function(){return m},ju:function(){return W}});var M=x(79881),me=x(69323),be=x(34502),we=x(95830),W;(function(B){B.None=()=>me.JT.None;function F(K){return(ee,he=null,ae)=>{let _=!1,y;return y=K(Y=>{if(!_)return y?y.dispose():_=!0,ee.call(he,Y)},null,ae),_&&y.dispose(),y}}B.once=F;function V(K,ee){return R((he,ae=null,_)=>K(y=>he.call(ae,ee(y)),null,_))}B.map=V;function j(K,ee){return R((he,ae=null,_)=>K(y=>{ee(y),he.call(ae,y)},null,_))}B.forEach=j;function se(K,ee){return R((he,ae=null,_)=>K(y=>ee(y)&&he.call(ae,y),null,_))}B.filter=se;function H(K){return K}B.signal=H;function X(...K){return(ee,he=null,ae)=>(0,me.F8)(...K.map(_=>_(y=>ee.call(he,y),null,ae)))}B.any=X;function P(K,ee,he){let ae=he;return V(K,_=>(ae=ee(ae,_),ae))}B.reduce=P;function R(K){let ee;const he=new A({onFirstListenerAdd(){ee=K(he.fire,he)},onLastListenerRemove(){ee.dispose()}});return he.event}function fe(K,ee,he=100,ae=!1,_){let y,Y,ue,Qe=0;const et=new A({leakWarningThreshold:_,onFirstListenerAdd(){y=K(gt=>{Qe++,Y=ee(Y,gt),ae&&!ue&&(et.fire(Y),Y=void 0),clearTimeout(ue),ue=setTimeout(()=>{const bt=Y;Y=void 0,ue=void 0,(!ae||Qe>1)&&et.fire(bt),Qe=0},he)})},onLastListenerRemove(){y.dispose()}});return et.event}B.debounce=fe;function de(K,ee=(he,ae)=>he===ae){let he=!0,ae;return se(K,_=>{const y=he||!ee(_,ae);return he=!1,ae=_,y})}B.latch=de;function ie(K,ee){return[B.filter(K,ee),B.filter(K,he=>!ee(he))]}B.split=ie;function q(K,ee=!1,he=[]){let ae=he.slice(),_=K(ue=>{ae?ae.push(ue):Y.fire(ue)});const y=()=>{ae&&ae.forEach(ue=>Y.fire(ue)),ae=null},Y=new A({onFirstListenerAdd(){_||(_=K(ue=>Y.fire(ue)))},onFirstListenerDidAdd(){ae&&(ee?setTimeout(y):y())},onLastListenerRemove(){_&&_.dispose(),_=null}});return Y.event}B.buffer=q;class ge{constructor(ee){this.event=ee}map(ee){return new ge(V(this.event,ee))}forEach(ee){return new ge(j(this.event,ee))}filter(ee){return new ge(se(this.event,ee))}reduce(ee,he){return new ge(P(this.event,ee,he))}latch(){return new ge(de(this.event))}debounce(ee,he=100,ae=!1,_){return new ge(fe(this.event,ee,he,ae,_))}on(ee,he,ae){return this.event(ee,he,ae)}once(ee,he,ae){return F(this.event)(ee,he,ae)}}function z(K){return new ge(K)}B.chain=z;function Fe(K,ee,he=ae=>ae){const ae=(...ue)=>Y.fire(he(...ue)),_=()=>K.on(ee,ae),y=()=>K.removeListener(ee,ae),Y=new A({onFirstListenerAdd:_,onLastListenerRemove:y});return Y.event}B.fromNodeEventEmitter=Fe;function Z(K,ee,he=ae=>ae){const ae=(...ue)=>Y.fire(he(...ue)),_=()=>K.addEventListener(ee,ae),y=()=>K.removeEventListener(ee,ae),Y=new A({onFirstListenerAdd:_,onLastListenerRemove:y});return Y.event}B.fromDOMEventEmitter=Z;function U(K){return new Promise(ee=>F(K)(ee))}B.toPromise=U})(W||(W={}));class d{constructor(F){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${F}_${d._idPool++}`}start(F){this._stopWatch=new we.G(!0),this._listenerCount=F}stop(){if(this._stopWatch){const F=this._stopWatch.elapsed();this._elapsedOverall+=F,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${F.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}d._idPool=0;let ye=-1;class G{constructor(F,V=Math.random().toString(18).slice(2,5)){this.customThreshold=F,this.name=V,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(F){let V=ye;if(typeof this.customThreshold=="number"&&(V=this.customThreshold),V<=0||F<V)return;this._stacks||(this._stacks=new Map);const j=new Error().stack.split(`
`).slice(3).join(`
`),se=this._stacks.get(j)||0;if(this._stacks.set(j,se+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=V*.5;let H,X=0;for(const[P,R]of this._stacks)(!H||X<R)&&(H=P,X=R);console.warn(`[${this.name}] potential listener LEAK detected, having ${F} listeners already. MOST frequent listener (${X}):`),console.warn(H)}return()=>{const H=this._stacks.get(j)||0;this._stacks.set(j,H-1)}}}class A{constructor(F){var V;this._disposed=!1,this._options=F,this._leakageMon=ye>0?new G(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((V=this._options)===null||V===void 0)&&V._profName?new d(this._options._profName):void 0}get event(){return this._event||(this._event=(F,V,j)=>{var se;this._listeners||(this._listeners=new be.S);const H=this._listeners.isEmpty();H&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const X=this._listeners.push(V?[F,V]:F);H&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,F,V);const P=(se=this._leakageMon)===null||se===void 0?void 0:se.check(this._listeners.size),R=(0,me.OF)(()=>{P&&P(),this._disposed||(X(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return j instanceof me.SL?j.add(R):Array.isArray(j)&&j.push(R),R}),this._event}fire(F){var V,j;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new be.S);for(let se of this._listeners)this._deliveryQueue.push([se,F]);for((V=this._perfMon)===null||V===void 0||V.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[se,H]=this._deliveryQueue.shift();try{typeof se=="function"?se.call(void 0,H):se[0].call(se[1],H)}catch(X){(0,M.dL)(X)}}(j=this._perfMon)===null||j===void 0||j.stop()}}dispose(){var F,V,j,se,H;this._disposed||(this._disposed=!0,(F=this._listeners)===null||F===void 0||F.clear(),(V=this._deliveryQueue)===null||V===void 0||V.clear(),(se=(j=this._options)===null||j===void 0?void 0:j.onLastListenerRemove)===null||se===void 0||se.call(j),(H=this._leakageMon)===null||H===void 0||H.dispose())}}class S extends A{constructor(F){super(F),this._isPaused=0,this._eventQueue=new be.S,this._mergeFn=F==null?void 0:F.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const F=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(F))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(F){this._listeners&&(this._isPaused!==0?this._eventQueue.push(F):super.fire(F))}}class k extends S{constructor(F){var V;super(F),this._delay=(V=F.delay)!==null&&V!==void 0?V:100}fire(F){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(F)}}class p{constructor(){this.buffers=[]}wrapEvent(F){return(V,j,se)=>F(H=>{const X=this.buffers[this.buffers.length-1];X?X.push(()=>V.call(j,H)):V.call(j,H)},void 0,se)}bufferEvents(F){const V=[];this.buffers.push(V);const j=F();return this.buffers.pop(),V.forEach(se=>se()),j}}class m{constructor(){this.listening=!1,this.inputEvent=W.None,this.inputEventListener=me.JT.None,this.emitter=new A({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(F){this.inputEvent=F,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=F(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Zn,Dt,x){"use strict";x.d(Dt,{I:function(){return M}});function M(me){const be=this;let we=!1,W;return function(){return we||(we=!0,W=me.apply(be,arguments)),W}}},88226:function(Zn,Dt,x){"use strict";x.d(Dt,{$:function(){return M}});var M;(function(me){function be(X){return X&&typeof X=="object"&&typeof X[Symbol.iterator]=="function"}me.is=be;const we=Object.freeze([]);function W(){return we}me.empty=W;function*d(X){yield X}me.single=d;function ye(X){return X||we}me.from=ye;function G(X){return!X||X[Symbol.iterator]().next().done===!0}me.isEmpty=G;function A(X){return X[Symbol.iterator]().next().value}me.first=A;function S(X,P){for(const R of X)if(P(R))return!0;return!1}me.some=S;function k(X,P){for(const R of X)if(P(R))return R}me.find=k;function*p(X,P){for(const R of X)P(R)&&(yield R)}me.filter=p;function*m(X,P){let R=0;for(const fe of X)yield P(fe,R++)}me.map=m;function*B(...X){for(const P of X)for(const R of P)yield R}me.concat=B;function*F(X){for(const P of X)for(const R of P)yield R}me.concatNested=F;function V(X,P,R){let fe=R;for(const de of X)fe=P(fe,de);return fe}me.reduce=V;function*j(X,P,R=X.length){for(P<0&&(P+=X.length),R<0?R+=X.length:R>X.length&&(R=X.length);P<R;P++)yield X[P]}me.slice=j;function se(X,P=Number.POSITIVE_INFINITY){const R=[];if(P===0)return[R,X];const fe=X[Symbol.iterator]();for(let de=0;de<P;de++){const ie=fe.next();if(ie.done)return[R,me.empty()];R.push(ie.value)}return[R,{[Symbol.iterator](){return fe}}]}me.consume=se;function H(X,P,R=(fe,de)=>fe===de){const fe=X[Symbol.iterator](),de=P[Symbol.iterator]();for(;;){const ie=fe.next(),q=de.next();if(ie.done!==q.done)return!1;if(ie.done)return!0;if(!R(ie.value,q.value))return!1}}me.equals=H})(M||(M={}))},69323:function(Zn,Dt,x){"use strict";x.d(Dt,{B9:function(){return m},F8:function(){return B},JT:function(){return j},Jz:function(){return H},OF:function(){return F},SL:function(){return V},Wf:function(){return p},XK:function(){return se},dk:function(){return S}});var M=x(17845),me=x(88226);const be=!1;let we=null;function W(X){we=X}if(be){const X="__is_disposable_tracked__";W(new class{trackDisposable(P){const R=new Error("Potentially leaked disposable").stack;setTimeout(()=>{P[X]||console.log(R)},3e3)}setParent(P,R){if(P&&P!==j.None)try{P[X]=!0}catch(fe){}}markAsDisposed(P){if(P&&P!==j.None)try{P[X]=!0}catch(R){}}markAsSingleton(P){}})}function d(X){return we==null||we.trackDisposable(X),X}function ye(X){we==null||we.markAsDisposed(X)}function G(X,P){we==null||we.setParent(X,P)}function A(X,P){if(we)for(const R of X)we.setParent(R,P)}function S(X){return we==null||we.markAsSingleton(X),X}class k extends Error{constructor(P){super(`Encountered errors while disposing of store. Errors: [${P.join(", ")}]`),this.errors=P}}function p(X){return typeof X.dispose=="function"&&X.dispose.length===0}function m(X){if(me.$.is(X)){let P=[];for(const R of X)if(R)try{R.dispose()}catch(fe){P.push(fe)}if(P.length===1)throw P[0];if(P.length>1)throw new k(P);return Array.isArray(X)?[]:X}else if(X)return X.dispose(),X}function B(...X){const P=F(()=>m(X));return A(X,P),P}function F(X){const P=d({dispose:(0,M.I)(()=>{ye(P),X()})});return P}class V{constructor(){this._toDispose=new Set,this._isDisposed=!1,d(this)}dispose(){this._isDisposed||(ye(this),this._isDisposed=!0,this.clear())}clear(){try{m(this._toDispose.values())}finally{this._toDispose.clear()}}add(P){if(!P)return P;if(P===this)throw new Error("Cannot register a disposable on itself!");return G(P,this),this._isDisposed?V.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(P),P}}V.DISABLE_DISPOSED_WARNING=!1;class j{constructor(){this._store=new V,d(this),G(this._store,this)}dispose(){ye(this),this._store.dispose()}_register(P){if(P===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(P)}}j.None=Object.freeze({dispose(){}});class se{constructor(){this._isDisposed=!1,d(this)}get value(){return this._isDisposed?void 0:this._value}set value(P){var R;this._isDisposed||P===this._value||((R=this._value)===null||R===void 0||R.dispose(),P&&G(P,this),this._value=P)}clear(){this.value=void 0}dispose(){var P;this._isDisposed=!0,ye(this),(P=this._value)===null||P===void 0||P.dispose(),this._value=void 0}clearAndLeak(){const P=this._value;return this._value=void 0,P&&G(P,null),P}}class H{constructor(P){this.object=P}dispose(){}}},34502:function(Zn,Dt,x){"use strict";x.d(Dt,{S:function(){return me}});class M{constructor(we){this.element=we,this.next=M.Undefined,this.prev=M.Undefined}}M.Undefined=new M(void 0);class me{constructor(){this._first=M.Undefined,this._last=M.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===M.Undefined}clear(){let we=this._first;for(;we!==M.Undefined;){const W=we.next;we.prev=M.Undefined,we.next=M.Undefined,we=W}this._first=M.Undefined,this._last=M.Undefined,this._size=0}unshift(we){return this._insert(we,!1)}push(we){return this._insert(we,!0)}_insert(we,W){const d=new M(we);if(this._first===M.Undefined)this._first=d,this._last=d;else if(W){const G=this._last;this._last=d,d.prev=G,G.next=d}else{const G=this._first;this._first=d,d.next=G,G.prev=d}this._size+=1;let ye=!1;return()=>{ye||(ye=!0,this._remove(d))}}shift(){if(this._first!==M.Undefined){const we=this._first.element;return this._remove(this._first),we}}pop(){if(this._last!==M.Undefined){const we=this._last.element;return this._remove(this._last),we}}_remove(we){if(we.prev!==M.Undefined&&we.next!==M.Undefined){const W=we.prev;W.next=we.next,we.next.prev=W}else we.prev===M.Undefined&&we.next===M.Undefined?(this._first=M.Undefined,this._last=M.Undefined):we.next===M.Undefined?(this._last=this._last.prev,this._last.next=M.Undefined):we.prev===M.Undefined&&(this._first=this._first.next,this._first.prev=M.Undefined);this._size-=1}*[Symbol.iterator](){let we=this._first;for(;we!==M.Undefined;)yield we.element,we=we.next}}},23345:function(Zn,Dt,x){"use strict";x.d(Dt,{$L:function(){return fe},ED:function(){return H},IJ:function(){return P},OS:function(){return ge},WE:function(){return ie},dz:function(){return X},gn:function(){return de},li:function(){return F},r:function(){return Z},tY:function(){return R},xS:function(){return q}});var M=x(97671),me;const be="en";let we=!1,W=!1,d=!1,ye=!1,G=!1,A=!1,S=!1,k,p=null,m=null,B;const F=typeof self=="object"?self:typeof x.g=="object"?x.g:{};let V;typeof F.vscode!="undefined"&&typeof F.vscode.process!="undefined"?V=F.vscode.process:typeof M!="undefined"&&(V=M);const j=typeof((me=V==null?void 0:V.versions)===null||me===void 0?void 0:me.electron)=="string"&&V.type==="renderer";if(typeof navigator=="object"&&!j)B=navigator.userAgent,we=B.indexOf("Windows")>=0,W=B.indexOf("Macintosh")>=0,S=(B.indexOf("Macintosh")>=0||B.indexOf("iPad")>=0||B.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,d=B.indexOf("Linux")>=0,A=!0,k=navigator.language,p=k;else if(typeof V=="object"){we=V.platform==="win32",W=V.platform==="darwin",d=V.platform==="linux",ye=d&&!!V.env.SNAP&&!!V.env.SNAP_REVISION,k=be,p=be;const U=V.env.VSCODE_NLS_CONFIG;if(U)try{const K=JSON.parse(U),ee=K.availableLanguages["*"];k=K.locale,p=ee||be,m=K._translationsConfigFile}catch(K){}G=!0}else console.error("Unable to resolve platform.");let se=0;W?se=1:we?se=3:d&&(se=2);const H=we,X=W,P=d,R=G,fe=A,de=S,ie=B,q=function(){if(F.setImmediate)return F.setImmediate.bind(F);if(typeof F.postMessage=="function"&&!F.importScripts){let ee=[];F.addEventListener("message",ae=>{if(ae.data&&ae.data.vscodeSetImmediateId)for(let _=0,y=ee.length;_<y;_++){const Y=ee[_];if(Y.id===ae.data.vscodeSetImmediateId){ee.splice(_,1),Y.callback();return}}});let he=0;return ae=>{const _=++he;ee.push({id:_,callback:ae}),F.postMessage({vscodeSetImmediateId:_},"*")}}if(typeof(V==null?void 0:V.nextTick)=="function")return V.nextTick.bind(V);const K=Promise.resolve();return ee=>K.then(ee)}(),ge=W||S?2:we?1:3;let z=!0,Fe=!1;function Z(){if(!Fe){Fe=!0;const U=new Uint8Array(2);U[0]=1,U[1]=2,z=new Uint16Array(U.buffer)[0]===513}return z}},95830:function(Zn,Dt,x){"use strict";x.d(Dt,{G:function(){return be}});var M=x(23345);const me=M.li.performance&&typeof M.li.performance.now=="function";class be{constructor(W){this._highResolution=me&&W,this._startTime=this._now(),this._stopTime=-1}static create(W=!0){return new be(W)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?M.li.performance.now():Date.now()}}},82983:function(Zn,Dt,x){"use strict";x.d(Dt,{$i:function(){return Qe},C8:function(){return Rt},GF:function(){return k},HO:function(){return he},IO:function(){return p},K7:function(){return Vt},Kw:function(){return mt},LC:function(){return F},Mh:function(){return q},P1:function(){return ge},PJ:function(){return Ne},Qe:function(){return et},R1:function(){return S},RP:function(){return Y},S6:function(){return It},TT:function(){return H},Ut:function(){return _},V8:function(){return V},WU:function(){return be},YK:function(){return Fe},YU:function(){return we},ZG:function(){return z},ZH:function(){return U},ab:function(){return gt},c1:function(){return te},df:function(){return fe},ec:function(){return W},fi:function(){return He},fy:function(){return d},j3:function(){return ye},j_:function(){return P},m5:function(){return M},mK:function(){return R},mr:function(){return m},oH:function(){return g},oL:function(){return G},ok:function(){return ie},ow:function(){return j},qq:function(){return de},qu:function(){return se},rL:function(){return Z},uS:function(){return Le},un:function(){return A},uq:function(){return B},vH:function(){return ee},xe:function(){return bt},zY:function(){return X}});function M(w){return!w||typeof w!="string"?!0:w.trim().length===0}const me=/{(\d+)}/g;function be(w,...D){return D.length===0?w:w.replace(me,function(Ae,L){const oe=parseInt(L,10);return isNaN(oe)||oe<0||oe>=D.length?Ae:D[oe]})}function we(w){return w.replace(/[<>&]/g,function(D){switch(D){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return D}})}function W(w){return w.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function d(w,D=" "){const Ae=ye(w,D);return G(Ae,D)}function ye(w,D){if(!w||!D)return w;const Ae=D.length;if(Ae===0||w.length===0)return w;let L=0;for(;w.indexOf(D,L)===L;)L=L+Ae;return w.substring(L)}function G(w,D){if(!w||!D)return w;const Ae=D.length,L=w.length;if(Ae===0||L===0)return w;let oe=L,re=-1;for(;re=w.lastIndexOf(D,oe-1),!(re===-1||re+Ae!==oe);){if(re===0)return"";oe=re}return w.substring(0,oe)}function A(w){return w.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function S(w){return w.replace(/\*/g,"")}function k(w,D,Ae={}){if(!w)throw new Error("Cannot create regex from empty string");D||(w=W(w)),Ae.wholeWord&&(/\B/.test(w.charAt(0))||(w="\\b"+w),/\B/.test(w.charAt(w.length-1))||(w=w+"\\b"));let L="";return Ae.global&&(L+="g"),Ae.matchCase||(L+="i"),Ae.multiline&&(L+="m"),Ae.unicode&&(L+="u"),new RegExp(w,L)}function p(w){return w.source==="^"||w.source==="^$"||w.source==="$"||w.source==="^\\s*$"?!1:!!(w.exec("")&&w.lastIndex===0)}function m(w){return(w.global?"g":"")+(w.ignoreCase?"i":"")+(w.multiline?"m":"")+(w.unicode?"u":"")}function B(w){return w.split(/\r\n|\r|\n/)}function F(w){for(let D=0,Ae=w.length;D<Ae;D++){const L=w.charCodeAt(D);if(L!==32&&L!==9)return D}return-1}function V(w,D=0,Ae=w.length){for(let L=D;L<Ae;L++){const oe=w.charCodeAt(L);if(oe!==32&&oe!==9)return w.substring(D,L)}return w.substring(D,Ae)}function j(w,D=w.length-1){for(let Ae=D;Ae>=0;Ae--){const L=w.charCodeAt(Ae);if(L!==32&&L!==9)return Ae}return-1}function se(w,D){return w<D?-1:w>D?1:0}function H(w,D,Ae=0,L=w.length,oe=0,re=D.length){for(;Ae<L&&oe<re;Ae++,oe++){let Ie=w.charCodeAt(Ae),Re=D.charCodeAt(oe);if(Ie<Re)return-1;if(Ie>Re)return 1}const Be=L-Ae,Ce=re-oe;return Be<Ce?-1:Be>Ce?1:0}function X(w,D){return P(w,D,0,w.length,0,D.length)}function P(w,D,Ae=0,L=w.length,oe=0,re=D.length){for(;Ae<L&&oe<re;Ae++,oe++){let Ie=w.charCodeAt(Ae),Re=D.charCodeAt(oe);if(Ie===Re)continue;if(Ie>=128||Re>=128)return H(w.toLowerCase(),D.toLowerCase(),Ae,L,oe,re);R(Ie)&&(Ie-=32),R(Re)&&(Re-=32);const ht=Ie-Re;if(ht!==0)return ht}const Be=L-Ae,Ce=re-oe;return Be<Ce?-1:Be>Ce?1:0}function R(w){return w>=97&&w<=122}function fe(w){return w>=65&&w<=90}function de(w,D){return w.length===D.length&&P(w,D)===0}function ie(w,D){const Ae=D.length;return D.length>w.length?!1:P(w,D,0,Ae)===0}function q(w,D){let Ae,L=Math.min(w.length,D.length);for(Ae=0;Ae<L;Ae++)if(w.charCodeAt(Ae)!==D.charCodeAt(Ae))return Ae;return L}function ge(w,D){let Ae,L=Math.min(w.length,D.length);const oe=w.length-1,re=D.length-1;for(Ae=0;Ae<L;Ae++)if(w.charCodeAt(oe-Ae)!==D.charCodeAt(re-Ae))return Ae;return L}function z(w){return 55296<=w&&w<=56319}function Fe(w){return 56320<=w&&w<=57343}function Z(w,D){return(w-55296<<10)+(D-56320)+65536}function U(w,D,Ae){const L=w.charCodeAt(Ae);if(z(L)&&Ae+1<D){const oe=w.charCodeAt(Ae+1);if(Fe(oe))return Z(L,oe)}return L}function K(w,D){const Ae=w.charCodeAt(D-1);if(Fe(Ae)&&D>1){const L=w.charCodeAt(D-2);if(z(L))return Z(L,Ae)}return Ae}function ee(w,D){const Ae=Se.getInstance(),L=D,oe=w.length,re=U(w,oe,D);D+=re>=65536?2:1;let Be=Ae.getGraphemeBreakType(re);for(;D<oe;){const Ce=U(w,oe,D),Ie=Ae.getGraphemeBreakType(Ce);if(He(Be,Ie))break;D+=Ce>=65536?2:1,Be=Ie}return D-L}function he(w,D){const Ae=Se.getInstance(),L=D,oe=K(w,D);D-=oe>=65536?2:1;let re=Ae.getGraphemeBreakType(oe);for(;D>0;){const Be=K(w,D),Ce=Ae.getGraphemeBreakType(Be);if(He(Ce,re))break;D-=Be>=65536?2:1,re=Ce}return L-D}const ae=/(?:[\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 _(w){return ae.test(w)}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 Y(w){return y.test(w)}const ue=/^[\t\n\r\x20-\x7E]*$/;function Qe(w){return ue.test(w)}const et=/[\u2028\u2029]/;function gt(w){return et.test(w)}function bt(w){for(let D=0,Ae=w.length;D<Ae;D++)if(Vt(w.charCodeAt(D)))return!0;return!1}function Vt(w){return w=+w,w>=11904&&w<=55215||w>=63744&&w<=64255||w>=65281&&w<=65374}function Rt(w){return w>=127462&&w<=127487||w===8986||w===8987||w===9200||w===9203||w>=9728&&w<=10175||w===11088||w===11093||w>=127744&&w<=128591||w>=128640&&w<=128764||w>=128992&&w<=129003||w>=129280&&w<=129535||w>=129648&&w<=129750}const te="\uFEFF";function Le(w){return!!(w&&w.length>0&&w.charCodeAt(0)===65279)}function mt(w,D=!1){return w?(D&&(w=w.replace(/\\./g,"")),w.toLowerCase()!==w):!1}function Ne(w){return w=w%(2*26),w<26?String.fromCharCode(97+w):String.fromCharCode(65+w-26)}function It(w){return Se.getInstance().getGraphemeBreakType(w)}function He(w,D){return w===0?D!==5&&D!==7:w===2&&D===3?!1:w===4||w===2||w===3||D===4||D===2||D===3?!0:!(w===8&&(D===8||D===9||D===11||D===12)||(w===11||w===9)&&(D===9||D===10)||(w===12||w===10)&&D===10||D===5||D===13||D===7||w===1||w===13&&D===14||w===6&&D===6)}class Se{constructor(){this._data=I()}static getInstance(){return Se._INSTANCE||(Se._INSTANCE=new Se),Se._INSTANCE}getGraphemeBreakType(D){if(D<32)return D===10?3:D===13?2:4;if(D<127)return 0;const Ae=this._data,L=Ae.length/3;let oe=1;for(;oe<=L;)if(D<Ae[3*oe])oe=2*oe;else if(D>Ae[3*oe+1])oe=2*oe+1;else return Ae[3*oe+2];return 0}}Se._INSTANCE=null;function I(){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(w,D){if(w===0)return 0;const Ae=v(w,D);if(Ae!==void 0)return Ae;const L=K(D,w);return w-=Q(L),w}function v(w,D){let Ae=K(D,w);for(w-=Q(Ae);b(Ae)||Ae===65039||Ae===8419;){if(w===0)return;Ae=K(D,w),w-=Q(Ae)}if(Rt(Ae)){if(w>=0){const L=K(D,w);L===8205&&(w-=Q(L))}return w}}function Q(w){return w>=65536?2:1}function b(w){return 127995<=w&&w<=127999}},72999:function(Zn,Dt,x){"use strict";x.d(Dt,{$E:function(){return F},$K:function(){return ye},D8:function(){return p},HD:function(){return me},IU:function(){return V},Jp:function(){return G},Kn:function(){return be},cW:function(){return S},f6:function(){return j},hj:function(){return we},jn:function(){return W},kJ:function(){return M},mf:function(){return k},o8:function(){return d},p_:function(){return A},vE:function(){return se}});function M(H){return Array.isArray(H)}function me(H){return typeof H=="string"}function be(H){return typeof H=="object"&&H!==null&&!Array.isArray(H)&&!(H instanceof RegExp)&&!(H instanceof Date)}function we(H){return typeof H=="number"&&!isNaN(H)}function W(H){return H===!0||H===!1}function d(H){return typeof H=="undefined"}function ye(H){return!G(H)}function G(H){return d(H)||H===null}function A(H,X){if(!H)throw new Error(X?`Unexpected type, expected '${X}'`:"Unexpected type")}function S(H){if(G(H))throw new Error("Assertion Failed: argument is undefined or null");return H}function k(H){return typeof H=="function"}function p(H,X){const P=Math.min(H.length,X.length);for(let R=0;R<P;R++)m(H[R],X[R])}function m(H,X){if(me(X)){if(typeof H!==X)throw new Error(`argument does not match constraint: typeof ${X}`)}else if(k(X)){try{if(H instanceof X)return}catch(P){}if(!G(H)&&H.constructor===X||X.length===1&&X.call(void 0,H)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function B(H){let X=[],P=Object.getPrototypeOf(H);for(;Object.prototype!==P;)X=X.concat(Object.getOwnPropertyNames(P)),P=Object.getPrototypeOf(P);return X}function F(H){const X=[];for(const P of B(H))typeof H[P]=="function"&&X.push(P);return X}function V(H,X){const P=fe=>function(){const de=Array.prototype.slice.call(arguments,0);return X(fe,de)};let R={};for(const fe of H)R[fe]=P(fe);return R}function j(H){return H===null?void 0:H}function se(H,X="Unreachable"){throw new Error(X)}},13268:function(Zn,Dt,x){"use strict";x.d(Dt,{N:function(){return me}});function M(be,we){let W;return we.length===0?W=be:W=be.replace(/\{(\d+)\}/g,function(d,ye){const G=ye[0];return typeof we[G]!="undefined"?we[G]:d}),W}function me(be,we,...W){return M(we,W)}},96236:function(Zn,Dt,x){"use strict";x.d(Dt,{BH:function(){return V},NZ:function(){return j},U8:function(){return se},co:function(){return F},eH:function(){return B},vr:function(){return m}});var M=x(75918),me=x(52615),be=x(4348),we=x(88226),W=x(69323),d=x(34502),ye=x(35884),G=x(90689),A=x(16925),S=x(49055),k=function(H,X,P,R){var fe=arguments.length,de=fe<3?X:R===null?R=Object.getOwnPropertyDescriptor(X,P):R,ie;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(H,X,P,R);else for(var q=H.length-1;q>=0;q--)(ie=H[q])&&(de=(fe<3?ie(de):fe>3?ie(X,P,de):ie(X,P))||de);return fe>3&&de&&Object.defineProperty(X,P,de),de},p=function(H,X){return function(P,R){X(P,R,H)}};function m(H){return H.command!==void 0}class B{constructor(X){this.id=B._idPool++,this._debugName=X}}B._idPool=0,B.CommandPalette=new B("CommandPalette"),B.EditorContext=new B("EditorContext"),B.SimpleEditorContext=new B("SimpleEditorContext"),B.EditorContextCopy=new B("EditorContextCopy"),B.EditorContextPeek=new B("EditorContextPeek"),B.MenubarEditMenu=new B("MenubarEditMenu"),B.MenubarCopy=new B("MenubarCopy"),B.MenubarGoMenu=new B("MenubarGoMenu"),B.MenubarSelectionMenu=new B("MenubarSelectionMenu"),B.InlineCompletionsActions=new B("InlineCompletionsActions");const F=(0,A.yh)("menuService"),V=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new be.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:H=>H===B.CommandPalette}}addCommand(H){return this.addCommands(we.$.single(H))}addCommands(H){for(const X of H)this._commands.set(X.id,X);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,W.OF)(()=>{let X=!1;for(const P of H)X=this._commands.delete(P.id)||X;X&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(H){return this._commands.get(H)}getCommands(){const H=new Map;return this._commands.forEach((X,P)=>H.set(P,X)),H}appendMenuItem(H,X){return this.appendMenuItems(we.$.single({id:H,item:X}))}appendMenuItems(H){const X=new Set,P=new d.S;for(const{id:R,item:fe}of H){let de=this._menuItems.get(R);de||(de=new d.S,this._menuItems.set(R,de)),P.push(de.push(fe)),X.add(R)}return this._onDidChangeMenu.fire(X),(0,W.OF)(()=>{if(P.size>0){for(let R of P)R();this._onDidChangeMenu.fire(X),P.clear()}})}getMenuItems(H){let X;return this._menuItems.has(H)?X=[...this._menuItems.get(H)]:X=[],H===B.CommandPalette&&this._appendImplicitItems(X),X}_appendImplicitItems(H){const X=new Set;for(const P of H)m(P)&&(X.add(P.command.id),P.alt&&X.add(P.alt.id));this._commands.forEach((P,R)=>{X.has(R)||H.push({command:P})})}};class j extends M.wY{constructor(X,P,R,fe){super(`submenuitem.${X.submenu.id}`,typeof X.title=="string"?X.title:X.title.value,[],"submenu"),this.item=X,this._menuService=P,this._contextKeyService=R,this._options=fe}get actions(){const X=[],P=this._menuService.createMenu(this.item.submenu,this._contextKeyService),R=P.getActions(this._options);P.dispose();for(const[,fe]of R)fe.length>0&&(X.push(...fe),X.push(new M.Z0));return X.length&&X.pop(),X}}let se=class ic{constructor(X,P,R,fe,de){var ie,q;if(this._commandService=de,this.id=X.id,this.label=R!=null&&R.renderShortTitle&&X.shortTitle?typeof X.shortTitle=="string"?X.shortTitle:X.shortTitle.value:typeof X.title=="string"?X.title:X.title.value,this.tooltip=(q=typeof X.tooltip=="string"?X.tooltip:(ie=X.tooltip)===null||ie===void 0?void 0:ie.value)!==null&&q!==void 0?q:"",this.enabled=!X.precondition||fe.contextMatchesRules(X.precondition),this.checked=void 0,X.toggled){const ge=X.toggled.condition?X.toggled:{condition:X.toggled};this.checked=fe.contextMatchesRules(ge.condition),this.checked&&ge.tooltip&&(this.tooltip=typeof ge.tooltip=="string"?ge.tooltip:ge.tooltip.value),ge.title&&(this.label=typeof ge.title=="string"?ge.title:ge.title.value)}this.item=X,this.alt=P?new ic(P,void 0,R,fe,de):void 0,this._options=R,S.kS.isThemeIcon(X.icon)&&(this.class=me.dT.asClassName(X.icon))}dispose(){}run(...X){var P,R;let fe=[];return!((P=this._options)===null||P===void 0)&&P.arg&&(fe=[...fe,this._options.arg]),!((R=this._options)===null||R===void 0)&&R.shouldForwardArgs&&(fe=[...fe,...X]),this._commandService.executeCommand(this.id,...fe)}};se=k([p(3,G.i6),p(4,ye.H)],se)},35884:function(Zn,Dt,x){"use strict";x.d(Dt,{H:function(){return ye},P:function(){return G}});var M=x(4348),me=x(88226),be=x(69323),we=x(34502),W=x(72999),d=x(16925);const ye=(0,d.yh)("commandService"),G=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new M.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(A,S){if(!A)throw new Error("invalid command");if(typeof A=="string"){if(!S)throw new Error("invalid command");return this.registerCommand({id:A,handler:S})}if(A.description){const F=[];for(let j of A.description.args)F.push(j.constraint);const V=A.handler;A.handler=function(j,...se){return(0,W.D8)(se,F),V(j,...se)}}const{id:k}=A;let p=this._commands.get(k);p||(p=new we.S,this._commands.set(k,p));let m=p.unshift(A),B=(0,be.OF)(()=>{m();const F=this._commands.get(k);F!=null&&F.isEmpty()&&this._commands.delete(k)});return this._onDidRegisterCommand.fire(k),B}registerCommandAlias(A,S){return G.registerCommand(A,(k,...p)=>k.get(ye).executeCommand(S,...p))}getCommand(A){const S=this._commands.get(A);if(!(!S||S.isEmpty()))return me.$.first(S)}getCommands(){const A=new Map;for(const S of this._commands.keys()){const k=this.getCommand(S);k&&A.set(S,k)}return A}};G.registerCommand("noop",()=>{})},90689:function(Zn,Dt,x){"use strict";x.d(Dt,{Ao:function(){return ye},Eq:function(){return Z},Fb:function(){return G},K8:function(){return ee},i6:function(){return Fe},uy:function(){return z}});var M=x(23345),me=x(82983),be=x(16925);let we=M.WE||"";const W=new Map;W.set("false",!1),W.set("true",!0),W.set("isMac",M.dz),W.set("isLinux",M.IJ),W.set("isWindows",M.ED),W.set("isWeb",M.$L),W.set("isMacNative",M.dz&&!M.$L),W.set("isEdge",we.indexOf("Edg/")>=0),W.set("isFirefox",we.indexOf("Firefox")>=0),W.set("isChrome",we.indexOf("Chrome")>=0),W.set("isSafari",we.indexOf("Safari")>=0);const d=Object.prototype.hasOwnProperty;class ye{static has(_){return p.create(_)}static equals(_,y){return m.create(_,y)}static regex(_,y){return fe.create(_,y)}static not(_){return j.create(_)}static and(..._){return q.create(_,null)}static or(..._){return ge.create(_,null,!0)}static deserialize(_,y=!1){if(_)return this._deserializeOrExpression(_,y)}static _deserializeOrExpression(_,y){let Y=_.split("||");return ge.create(Y.map(ue=>this._deserializeAndExpression(ue,y)),null,!0)}static _deserializeAndExpression(_,y){let Y=_.split("&&");return q.create(Y.map(ue=>this._deserializeOne(ue,y)),null)}static _deserializeOne(_,y){if(_=_.trim(),_.indexOf("!=")>=0){let Y=_.split("!=");return V.create(Y[0].trim(),this._deserializeValue(Y[1],y))}if(_.indexOf("==")>=0){let Y=_.split("==");return m.create(Y[0].trim(),this._deserializeValue(Y[1],y))}if(_.indexOf("=~")>=0){let Y=_.split("=~");return fe.create(Y[0].trim(),this._deserializeRegexValue(Y[1],y))}if(_.indexOf(" in ")>=0){let Y=_.split(" in ");return B.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(_)){const Y=_.split(">=");return X.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(_)){const Y=_.split(">");return H.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(_)){const Y=_.split("<=");return R.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(_)){const Y=_.split("<");return P.create(Y[0].trim(),Y[1].trim())}return/^\!\s*/.test(_)?j.create(_.substr(1).trim()):p.create(_)}static _deserializeValue(_,y){if(_=_.trim(),_==="true")return!0;if(_==="false")return!1;let Y=/^'([^']*)'$/.exec(_);return Y?Y[1].trim():_}static _deserializeRegexValue(_,y){if((0,me.m5)(_)){if(y)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let Y=_.indexOf("/"),ue=_.lastIndexOf("/");if(Y===ue||Y<0){if(y)throw new Error(`bad regexp-value '${_}', missing /-enclosure`);return console.warn(`bad regexp-value '${_}', missing /-enclosure`),null}let Qe=_.slice(Y+1,ue),et=_[ue+1]==="i"?"i":"";try{return new RegExp(Qe,et)}catch(gt){if(y)throw new Error(`bad regexp-value '${_}', parse error: ${gt}`);return console.warn(`bad regexp-value '${_}', parse error: ${gt}`),null}}}function G(ae,_){const y=ae?ae.substituteConstants():void 0,Y=_?_.substituteConstants():void 0;return!y&&!Y?!0:!y||!Y?!1:y.equals(Y)}function A(ae,_){return ae.cmp(_)}class S{constructor(){this.type=0}cmp(_){return this.type-_.type}equals(_){return _.type===this.type}substituteConstants(){return this}evaluate(_){return!1}serialize(){return"false"}keys(){return[]}negate(){return k.INSTANCE}}S.INSTANCE=new S;class k{constructor(){this.type=1}cmp(_){return this.type-_.type}equals(_){return _.type===this.type}substituteConstants(){return this}evaluate(_){return!0}serialize(){return"true"}keys(){return[]}negate(){return S.INSTANCE}}k.INSTANCE=new k;class p{constructor(_,y){this.key=_,this.negated=y,this.type=2}static create(_,y=null){const Y=W.get(_);return typeof Y=="boolean"?Y?k.INSTANCE:S.INSTANCE:new p(_,y)}cmp(_){return _.type!==this.type?this.type-_.type:U(this.key,_.key)}equals(_){return _.type===this.type?this.key===_.key:!1}substituteConstants(){const _=W.get(this.key);return typeof _=="boolean"?_?k.INSTANCE:S.INSTANCE:this}evaluate(_){return!!_.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=j.create(this.key,this)),this.negated}}class m{constructor(_,y,Y){this.key=_,this.value=y,this.negated=Y,this.type=4}static create(_,y,Y=null){if(typeof y=="boolean")return y?p.create(_,Y):j.create(_,Y);const ue=W.get(_);return typeof ue=="boolean"?y===(ue?"true":"false")?k.INSTANCE:S.INSTANCE:new m(_,y,Y)}cmp(_){return _.type!==this.type?this.type-_.type:K(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){const _=W.get(this.key);if(typeof _=="boolean"){const y=_?"true":"false";return this.value===y?k.INSTANCE:S.INSTANCE}return this}evaluate(_){return _.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this.key,this.value,this)),this.negated}}class B{constructor(_,y){this.key=_,this.valueKey=y,this.type=10,this.negated=null}static create(_,y){return new B(_,y)}cmp(_){return _.type!==this.type?this.type-_.type:K(this.key,this.valueKey,_.key,_.valueKey)}equals(_){return _.type===this.type?this.key===_.key&&this.valueKey===_.valueKey:!1}substituteConstants(){return this}evaluate(_){const y=_.getValue(this.valueKey),Y=_.getValue(this.key);return Array.isArray(y)?y.indexOf(Y)>=0:typeof Y=="string"&&typeof y=="object"&&y!==null?d.call(y,Y):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=F.create(this)),this.negated}}class F{constructor(_){this._actual=_,this.type=11}static create(_){return new F(_)}cmp(_){return _.type!==this.type?this.type-_.type:this._actual.cmp(_._actual)}equals(_){return _.type===this.type?this._actual.equals(_._actual):!1}substituteConstants(){return this}evaluate(_){return!this._actual.evaluate(_)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class V{constructor(_,y,Y){this.key=_,this.value=y,this.negated=Y,this.type=5}static create(_,y,Y=null){if(typeof y=="boolean")return y?j.create(_,Y):p.create(_,Y);const ue=W.get(_);return typeof ue=="boolean"?y===(ue?"true":"false")?S.INSTANCE:k.INSTANCE:new V(_,y,Y)}cmp(_){return _.type!==this.type?this.type-_.type:K(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){const _=W.get(this.key);if(typeof _=="boolean"){const y=_?"true":"false";return this.value===y?S.INSTANCE:k.INSTANCE}return this}evaluate(_){return _.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this.value,this)),this.negated}}class j{constructor(_,y){this.key=_,this.negated=y,this.type=3}static create(_,y=null){const Y=W.get(_);return typeof Y=="boolean"?Y?S.INSTANCE:k.INSTANCE:new j(_,y)}cmp(_){return _.type!==this.type?this.type-_.type:U(this.key,_.key)}equals(_){return _.type===this.type?this.key===_.key:!1}substituteConstants(){const _=W.get(this.key);return typeof _=="boolean"?_?S.INSTANCE:k.INSTANCE:this}evaluate(_){return!_.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this)),this.negated}}function se(ae,_){if(typeof ae=="string"){const y=parseFloat(ae);isNaN(y)||(ae=y)}return typeof ae=="string"||typeof ae=="number"?_(ae):S.INSTANCE}class H{constructor(_,y,Y){this.key=_,this.value=y,this.negated=Y,this.type=12}static create(_,y,Y=null){return se(y,ue=>new H(_,ue,Y))}cmp(_){return _.type!==this.type?this.type-_.type:K(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class X{constructor(_,y,Y){this.key=_,this.value=y,this.negated=Y,this.type=13}static create(_,y,Y=null){return se(y,ue=>new X(_,ue,Y))}cmp(_){return _.type!==this.type?this.type-_.type:K(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.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 P{constructor(_,y,Y){this.key=_,this.value=y,this.negated=Y,this.type=14}static create(_,y,Y=null){return se(y,ue=>new P(_,ue,Y))}cmp(_){return _.type!==this.type?this.type-_.type:K(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.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 R{constructor(_,y,Y){this.key=_,this.value=y,this.negated=Y,this.type=15}static create(_,y,Y=null){return se(y,ue=>new R(_,ue,Y))}cmp(_){return _.type!==this.type?this.type-_.type:K(this.key,this.value,_.key,_.value)}equals(_){return _.type===this.type?this.key===_.key&&this.value===_.value:!1}substituteConstants(){return this}evaluate(_){return typeof this.value=="string"?!1:parseFloat(_.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=H.create(this.key,this.value,this)),this.negated}}class fe{constructor(_,y){this.key=_,this.regexp=y,this.type=7,this.negated=null}static create(_,y){return new fe(_,y)}cmp(_){if(_.type!==this.type)return this.type-_.type;if(this.key<_.key)return-1;if(this.key>_.key)return 1;const y=this.regexp?this.regexp.source:"",Y=_.regexp?_.regexp.source:"";return y<Y?-1:y>Y?1:0}equals(_){if(_.type===this.type){const y=this.regexp?this.regexp.source:"",Y=_.regexp?_.regexp.source:"";return this.key===_.key&&y===Y}return!1}substituteConstants(){return this}evaluate(_){let y=_.getValue(this.key);return this.regexp?this.regexp.test(y):!1}serialize(){const _=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${_}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=de.create(this)),this.negated}}class de{constructor(_){this._actual=_,this.type=8}static create(_){return new de(_)}cmp(_){return _.type!==this.type?this.type-_.type:this._actual.cmp(_._actual)}equals(_){return _.type===this.type?this._actual.equals(_._actual):!1}substituteConstants(){return this}evaluate(_){return!this._actual.evaluate(_)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ie(ae){let _=null;for(let y=0,Y=ae.length;y<Y;y++){const ue=ae[y].substituteConstants();if(ae[y]!==ue&&_===null){_=[];for(let Qe=0;Qe<y;Qe++)_[Qe]=ae[Qe]}_!==null&&(_[y]=ue)}return _===null?ae:_}class q{constructor(_,y){this.expr=_,this.negated=y,this.type=6}static create(_,y){return q._normalizeArr(_,y)}cmp(_){if(_.type!==this.type)return this.type-_.type;if(this.expr.length<_.expr.length)return-1;if(this.expr.length>_.expr.length)return 1;for(let y=0,Y=this.expr.length;y<Y;y++){const ue=A(this.expr[y],_.expr[y]);if(ue!==0)return ue}return 0}equals(_){if(_.type===this.type){if(this.expr.length!==_.expr.length)return!1;for(let y=0,Y=this.expr.length;y<Y;y++)if(!this.expr[y].equals(_.expr[y]))return!1;return!0}return!1}substituteConstants(){const _=ie(this.expr);return _===this.expr?this:q.create(_,this.negated)}evaluate(_){for(let y=0,Y=this.expr.length;y<Y;y++)if(!this.expr[y].evaluate(_))return!1;return!0}static _normalizeArr(_,y){const Y=[];let ue=!1;for(const Qe of _)if(Qe){if(Qe.type===1){ue=!0;continue}if(Qe.type===0)return S.INSTANCE;if(Qe.type===6){Y.push(...Qe.expr);continue}Y.push(Qe)}if(Y.length===0&&ue)return k.INSTANCE;if(Y.length!==0){if(Y.length===1)return Y[0];Y.sort(A);for(let Qe=1;Qe<Y.length;Qe++)Y[Qe-1].equals(Y[Qe])&&(Y.splice(Qe,1),Qe--);if(Y.length===1)return Y[0];for(;Y.length>1;){const Qe=Y[Y.length-1];if(Qe.type!==9)break;Y.pop();const et=Y.pop(),gt=Y.length===0,bt=ge.create(Qe.expr.map(Vt=>q.create([Vt,et],null)),null,gt);bt&&(Y.push(bt),Y.sort(A))}return Y.length===1?Y[0]:new q(Y,y)}}serialize(){return this.expr.map(_=>_.serialize()).join(" && ")}keys(){const _=[];for(let y of this.expr)_.push(...y.keys());return _}negate(){if(!this.negated){const _=[];for(let y of this.expr)_.push(y.negate());this.negated=ge.create(_,this,!0)}return this.negated}}class ge{constructor(_,y){this.expr=_,this.negated=y,this.type=9}static create(_,y,Y){return ge._normalizeArr(_,y,Y)}cmp(_){if(_.type!==this.type)return this.type-_.type;if(this.expr.length<_.expr.length)return-1;if(this.expr.length>_.expr.length)return 1;for(let y=0,Y=this.expr.length;y<Y;y++){const ue=A(this.expr[y],_.expr[y]);if(ue!==0)return ue}return 0}equals(_){if(_.type===this.type){if(this.expr.length!==_.expr.length)return!1;for(let y=0,Y=this.expr.length;y<Y;y++)if(!this.expr[y].equals(_.expr[y]))return!1;return!0}return!1}substituteConstants(){const _=ie(this.expr);return _===this.expr?this:ge.create(_,this.negated,!1)}evaluate(_){for(let y=0,Y=this.expr.length;y<Y;y++)if(this.expr[y].evaluate(_))return!0;return!1}static _normalizeArr(_,y,Y){let ue=[],Qe=!1;if(_){for(let et=0,gt=_.length;et<gt;et++){const bt=_[et];if(bt){if(bt.type===0){Qe=!0;continue}if(bt.type===1)return k.INSTANCE;if(bt.type===9){ue=ue.concat(bt.expr);continue}ue.push(bt)}}if(ue.length===0&&Qe)return S.INSTANCE;ue.sort(A)}if(ue.length!==0){if(ue.length===1)return ue[0];for(let et=1;et<ue.length;et++)ue[et-1].equals(ue[et])&&(ue.splice(et,1),et--);if(ue.length===1)return ue[0];if(Y){for(let et=0;et<ue.length;et++)for(let gt=et+1;gt<ue.length;gt++)ee(ue[et],ue[gt])&&(ue.splice(gt,1),gt--);if(ue.length===1)return ue[0]}return new ge(ue,y)}}serialize(){return this.expr.map(_=>_.serialize()).join(" || ")}keys(){const _=[];for(let y of this.expr)_.push(...y.keys());return _}negate(){if(!this.negated){let _=[];for(let y of this.expr)_.push(y.negate());for(;_.length>1;){const y=_.shift(),Y=_.shift(),ue=[];for(const et of he(y))for(const gt of he(Y))ue.push(q.create([et,gt],null));const Qe=_.length===0;_.unshift(ge.create(ue,null,Qe))}this.negated=_[0]}return this.negated}}class z extends p{constructor(_,y,Y){super(_,null),this._defaultValue=y,typeof Y=="object"?z._info.push(Object.assign(Object.assign({},Y),{key:_})):Y!==!0&&z._info.push({key:_,description:Y,type:y!=null?typeof y:void 0})}static all(){return z._info.values()}bindTo(_){return _.createKey(this.key,this._defaultValue)}getValue(_){return _.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(_){return m.create(this.key,_)}}z._info=[];const Fe=(0,be.yh)("contextKeyService"),Z="setContext";function U(ae,_){return ae<_?-1:ae>_?1:0}function K(ae,_,y,Y){return ae<y?-1:ae>y?1:_<Y?-1:_>Y?1:0}function ee(ae,_){if(_.type===6&&ae.type!==9&&ae.type!==6){for(const ue of _.expr)if(ae.equals(ue))return!0}const y=ae.negate(),Y=he(y).concat(he(_));Y.sort(A);for(let ue=0;ue<Y.length;ue++){const et=Y[ue].negate();for(let gt=ue+1;gt<Y.length;gt++){const bt=Y[gt];if(et.equals(bt))return!0}}return!1}function he(ae){return ae.type===9?ae.expr:[ae]}},16925:function(Zn,Dt,x){"use strict";x.d(Dt,{I8:function(){return M},TG:function(){return me},jt:function(){return W},yh:function(){return we}});var M;(function(d){d.serviceIds=new Map,d.DI_TARGET="$di$target",d.DI_DEPENDENCIES="$di$dependencies";function ye(G){return G[d.DI_DEPENDENCIES]||[]}d.getServiceDependencies=ye})(M||(M={}));const me=we("instantiationService");function be(d,ye,G,A){ye[M.DI_TARGET]===ye?ye[M.DI_DEPENDENCIES].push({id:d,index:G,optional:A}):(ye[M.DI_DEPENDENCIES]=[{id:d,index:G,optional:A}],ye[M.DI_TARGET]=ye)}function we(d){if(M.serviceIds.has(d))return M.serviceIds.get(d);const ye=function(G,A,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");be(ye,G,S,!1)};return ye.toString=()=>d,M.serviceIds.set(d,ye),ye}function W(d){return function(ye,G,A){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");be(d,ye,A,!0)}}},44650:function(Zn,Dt,x){"use strict";x.d(Dt,{B:function(){return we}});var M=x(76068),me=x(72999);class be{constructor(){this.data=new Map}add(d,ye){M.ok(me.HD(d)),M.ok(me.Kn(ye)),M.ok(!this.data.has(d),"There is already an extension with this id"),this.data.set(d,ye)}as(d){return this.data.get(d)||null}}const we=new be},66213:function(Zn,Dt,x){"use strict";x.d(Dt,{e:function(){return M}});var M;(function(me){me.DARK="dark",me.LIGHT="light",me.HIGH_CONTRAST="hc"})(M||(M={}))},49055:function(Zn,Dt,x){"use strict";x.d(Dt,{EN:function(){return A},IP:function(){return p},Ic:function(){return F},XE:function(){return ye},bB:function(){return V},kS:function(){return S},m6:function(){return k}});var M=x(52615),me=x(4348),be=x(69323),we=x(16925),W=x(44650),d=x(66213);const ye=(0,we.yh)("themeService");var G;(function(j){function se(H){return H&&typeof H=="object"&&typeof H.id=="string"}j.isThemeColor=se})(G||(G={}));function A(j){return{id:j}}var S;(function(j){function se(de){return de&&typeof de=="object"&&typeof de.id=="string"&&(typeof de.color=="undefined"||G.isThemeColor(de.color))}j.isThemeIcon=se;const H=new RegExp(`^\\$\\((${M.dT.iconNameExpression}(?:${M.dT.iconModifierExpression})?)\\)$`);function X(de){const ie=H.exec(de);if(!ie)return;let[,q]=ie;return{id:q}}j.fromString=X;function P(de,ie){let q=de.id;const ge=q.lastIndexOf("~");return ge!==-1&&(q=q.substring(0,ge)),ie&&(q=`${q}~${ie}`),{id:q}}j.modify=P;function R(de,ie){var q,ge;return de.id===ie.id&&((q=de.color)===null||q===void 0?void 0:q.id)===((ge=ie.color)===null||ge===void 0?void 0:ge.id)}j.isEqual=R;function fe(de,ie){return{id:de.id,color:ie?A(ie):void 0}}j.asThemeIcon=fe,j.asClassNameArray=M.dT.asClassNameArray,j.asClassName=M.dT.asClassName,j.asCSSSelector=M.dT.asCSSSelector})(S||(S={}));function k(j){switch(j){case d.e.DARK:return"vs-dark";case d.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const p={ThemingContribution:"base.contributions.theming"};class m{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new me.Q5}onColorThemeChange(se){return this.themingParticipants.push(se),this.onThemingParticipantAddedEmitter.fire(se),(0,be.OF)(()=>{const H=this.themingParticipants.indexOf(se);this.themingParticipants.splice(H,1)})}getThemingParticipants(){return this.themingParticipants}}let B=new m;W.B.add(p.ThemingContribution,B);function F(j){return B.onColorThemeChange(j)}class V extends be.JT{constructor(se){super(),this.themeService=se,this.theme=se.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(H=>this.onThemeChange(H)))}onThemeChange(se){this.theme=se,this.updateStyles()}updateStyles(){}}},16632:function(Zn,Dt,x){"use strict";var M=x(72308),me=x(77321),be=x(49618),we=x(52487),W=x(74416),d=x(92310),ye=x.n(d),G=x(18929),A=x(59301),S=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],k=(0,A.forwardRef)(function(p,m){var B=p.prefixCls,F=B===void 0?"rc-checkbox":B,V=p.className,j=p.style,se=p.checked,H=p.disabled,X=p.defaultChecked,P=X===void 0?!1:X,R=p.type,fe=R===void 0?"checkbox":R,de=p.title,ie=p.onChange,q=(0,W.Z)(p,S),ge=(0,A.useRef)(null),z=(0,A.useRef)(null),Fe=(0,G.Z)(P,{value:se}),Z=(0,we.Z)(Fe,2),U=Z[0],K=Z[1];(0,A.useImperativeHandle)(m,function(){return{focus:function(_){var y;(y=ge.current)===null||y===void 0||y.focus(_)},blur:function(){var _;(_=ge.current)===null||_===void 0||_.blur()},input:ge.current,nativeElement:z.current}});var ee=ye()(F,V,(0,be.Z)((0,be.Z)({},"".concat(F,"-checked"),U),"".concat(F,"-disabled"),H)),he=function(_){H||("checked"in p||K(_.target.checked),ie==null||ie({target:(0,me.Z)((0,me.Z)({},p),{},{type:fe,checked:_.target.checked}),stopPropagation:function(){_.stopPropagation()},preventDefault:function(){_.preventDefault()},nativeEvent:_.nativeEvent}))};return A.createElement("span",{className:ee,title:de,style:j,ref:z},A.createElement("input",(0,M.Z)({},q,{className:"".concat(F,"-input"),ref:ge,onChange:he,disabled:H,checked:!!U,type:fe})),A.createElement("span",{className:"".concat(F,"-inner")}))});Dt.Z=k},96478:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return de}});var M=x(72308),me=x(49618),be=x(52487),we=x(74416),W=x(65352),d=x(92310),ye=x.n(d),G=x(8654),A=x(59301),S=x(10228),k=x(16089),p=S.Z.ESC,m=S.Z.TAB;function B(ie){var q=ie.visible,ge=ie.triggerRef,z=ie.onVisibleChange,Fe=ie.autoFocus,Z=ie.overlayRef,U=A.useRef(!1),K=function(){if(q){var _,y;(_=ge.current)===null||_===void 0||(y=_.focus)===null||y===void 0||y.call(_),z==null||z(!1)}},ee=function(){var _;return(_=Z.current)!==null&&_!==void 0&&_.focus?(Z.current.focus(),U.current=!0,!0):!1},he=function(_){switch(_.keyCode){case p:K();break;case m:{var y=!1;U.current||(y=ee()),y?_.preventDefault():K();break}}};A.useEffect(function(){return q?(window.addEventListener("keydown",he),Fe&&(0,k.Z)(ee,3),function(){window.removeEventListener("keydown",he),U.current=!1}):function(){U.current=!1}},[q])}var F=(0,A.forwardRef)(function(ie,q){var ge=ie.overlay,z=ie.arrow,Fe=ie.prefixCls,Z=(0,A.useMemo)(function(){var K;return typeof ge=="function"?K=ge():K=ge,K},[ge]),U=(0,G.sQ)(q,(0,G.C4)(Z));return A.createElement(A.Fragment,null,z&&A.createElement("div",{className:"".concat(Fe,"-arrow")}),A.cloneElement(Z,{ref:(0,G.Yr)(Z)?U:void 0}))}),V=F,j={adjustX:1,adjustY:1},se=[0,0],H={topLeft:{points:["bl","tl"],overflow:j,offset:[0,-4],targetOffset:se},top:{points:["bc","tc"],overflow:j,offset:[0,-4],targetOffset:se},topRight:{points:["br","tr"],overflow:j,offset:[0,-4],targetOffset:se},bottomLeft:{points:["tl","bl"],overflow:j,offset:[0,4],targetOffset:se},bottom:{points:["tc","bc"],overflow:j,offset:[0,4],targetOffset:se},bottomRight:{points:["tr","br"],overflow:j,offset:[0,4],targetOffset:se}},X=H,P=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function R(ie,q){var ge,z=ie.arrow,Fe=z===void 0?!1:z,Z=ie.prefixCls,U=Z===void 0?"rc-dropdown":Z,K=ie.transitionName,ee=ie.animation,he=ie.align,ae=ie.placement,_=ae===void 0?"bottomLeft":ae,y=ie.placements,Y=y===void 0?X:y,ue=ie.getPopupContainer,Qe=ie.showAction,et=ie.hideAction,gt=ie.overlayClassName,bt=ie.overlayStyle,Vt=ie.visible,Rt=ie.trigger,te=Rt===void 0?["hover"]:Rt,Le=ie.autoFocus,mt=ie.overlay,Ne=ie.children,It=ie.onVisibleChange,He=(0,we.Z)(ie,P),Se=A.useState(),I=(0,be.Z)(Se,2),g=I[0],v=I[1],Q="visible"in ie?Vt:g,b=A.useRef(null),w=A.useRef(null),D=A.useRef(null);A.useImperativeHandle(q,function(){return b.current});var Ae=function(Ye){v(Ye),It==null||It(Ye)};B({visible:Q,triggerRef:D,onVisibleChange:Ae,autoFocus:Le,overlayRef:w});var L=function(Ye){var nt=ie.onOverlayClick;v(!1),nt&&nt(Ye)},oe=function(){return A.createElement(V,{ref:w,overlay:mt,prefixCls:U,arrow:Fe})},re=function(){return typeof mt=="function"?oe:oe()},Be=function(){var Ye=ie.minOverlayWidthMatchTrigger,nt=ie.alignPoint;return"minOverlayWidthMatchTrigger"in ie?Ye:!nt},Ce=function(){var Ye=ie.openClassName;return Ye!==void 0?Ye:"".concat(U,"-open")},Ie=A.cloneElement(Ne,{className:ye()((ge=Ne.props)===null||ge===void 0?void 0:ge.className,Q&&Ce()),ref:(0,G.Yr)(Ne)?(0,G.sQ)(D,(0,G.C4)(Ne)):void 0}),Re=et;return!Re&&te.indexOf("contextMenu")!==-1&&(Re=["click"]),A.createElement(W.Z,(0,M.Z)({builtinPlacements:Y},He,{prefixCls:U,ref:b,popupClassName:ye()(gt,(0,me.Z)({},"".concat(U,"-show-arrow"),Fe)),popupStyle:bt,action:te,showAction:Qe,hideAction:Re,popupPlacement:_,popupAlign:he,popupTransitionName:K,popupAnimation:ee,popupVisible:Q,stretch:Be()?"minWidth":"",popup:re(),onPopupVisibleChange:Ae,onPopupClick:L,getPopupContainer:ue}),Ie)}var fe=A.forwardRef(R),de=fe},20922:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return te}});var M=x(72308),me=x(49618),be=x(62853),we=x(52487),W=x(74416),d=x(96949),ye=x(55090);function G(){return typeof BigInt=="function"}function A(Le){return!Le&&Le!==0&&!Number.isNaN(Le)||!String(Le).trim()}function S(Le){var mt=Le.trim(),Ne=mt.startsWith("-");Ne&&(mt=mt.slice(1)),mt=mt.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),mt.startsWith(".")&&(mt="0".concat(mt));var It=mt||"0",He=It.split("."),Se=He[0]||"0",I=He[1]||"0";Se==="0"&&I==="0"&&(Ne=!1);var g=Ne?"-":"";return{negative:Ne,negativeStr:g,trimStr:It,integerStr:Se,decimalStr:I,fullStr:"".concat(g).concat(It)}}function k(Le){var mt=String(Le);return!Number.isNaN(Number(mt))&&mt.includes("e")}function p(Le){var mt=String(Le);if(k(Le)){var Ne=Number(mt.slice(mt.indexOf("e-")+2)),It=mt.match(/\.(\d+)/);return It!=null&&It[1]&&(Ne+=It[1].length),Ne}return mt.includes(".")&&B(mt)?mt.length-mt.indexOf(".")-1:0}function m(Le){var mt=String(Le);if(k(Le)){if(Le>Number.MAX_SAFE_INTEGER)return String(G()?BigInt(Le).toString():Number.MAX_SAFE_INTEGER);if(Le<Number.MIN_SAFE_INTEGER)return String(G()?BigInt(Le).toString():Number.MIN_SAFE_INTEGER);mt=Le.toFixed(p(mt))}return S(mt).fullStr}function B(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 F=function(){function Le(mt){if((0,d.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),A(mt)){this.empty=!0;return}if(this.origin=String(mt),mt==="-"||Number.isNaN(mt)){this.nan=!0;return}var Ne=mt;if(k(Ne)&&(Ne=Number(Ne)),Ne=typeof Ne=="string"?Ne:m(Ne),B(Ne)){var It=S(Ne);this.negative=It.negative;var He=It.trimStr.split(".");this.integer=BigInt(He[0]);var Se=He[1]||"0";this.decimal=BigInt(Se),this.decimalLen=Se.length}else this.nan=!0}return(0,ye.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(Ne){var It="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Ne,"0"));return BigInt(It)}},{key:"negate",value:function(){var Ne=new Le(this.toString());return Ne.negative=!Ne.negative,Ne}},{key:"cal",value:function(Ne,It,He){var Se=Math.max(this.getDecimalStr().length,Ne.getDecimalStr().length),I=this.alignDecimal(Se),g=Ne.alignDecimal(Se),v=It(I,g).toString(),Q=He(Se),b=S(v),w=b.negativeStr,D=b.trimStr,Ae="".concat(w).concat(D.padStart(Q+1,"0"));return new Le("".concat(Ae.slice(0,-Q),".").concat(Ae.slice(-Q)))}},{key:"add",value:function(Ne){if(this.isInvalidate())return new Le(Ne);var It=new Le(Ne);return It.isInvalidate()?this:this.cal(It,function(He,Se){return He+Se},function(He){return He})}},{key:"multi",value:function(Ne){var It=new Le(Ne);return this.isInvalidate()||It.isInvalidate()?new Le(NaN):this.cal(It,function(He,Se){return He*Se},function(He){return He*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(Ne){return this.toString()===(Ne==null?void 0:Ne.toString())}},{key:"lessEquals",value:function(Ne){return this.add(Ne.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ne?this.isInvalidate()?"":S("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Le}(),V=function(){function Le(mt){if((0,d.Z)(this,Le),(0,me.Z)(this,"origin",""),(0,me.Z)(this,"number",void 0),(0,me.Z)(this,"empty",void 0),A(mt)){this.empty=!0;return}this.origin=String(mt),this.number=Number(mt)}return(0,ye.Z)(Le,[{key:"negate",value:function(){return new Le(-this.toNumber())}},{key:"add",value:function(Ne){if(this.isInvalidate())return new Le(Ne);var It=Number(Ne);if(Number.isNaN(It))return this;var He=this.number+It;if(He>Number.MAX_SAFE_INTEGER)return new Le(Number.MAX_SAFE_INTEGER);if(He<Number.MIN_SAFE_INTEGER)return new Le(Number.MIN_SAFE_INTEGER);var Se=Math.max(p(this.number),p(It));return new Le(He.toFixed(Se))}},{key:"multi",value:function(Ne){var It=Number(Ne);if(this.isInvalidate()||Number.isNaN(It))return new Le(NaN);var He=this.number*It;if(He>Number.MAX_SAFE_INTEGER)return new Le(Number.MAX_SAFE_INTEGER);if(He<Number.MIN_SAFE_INTEGER)return new Le(Number.MIN_SAFE_INTEGER);var Se=Math.max(p(this.number),p(It));return new Le(He.toFixed(Se))}},{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(Ne){return this.toNumber()===(Ne==null?void 0:Ne.toNumber())}},{key:"lessEquals",value:function(Ne){return this.add(Ne.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ne?this.isInvalidate()?"":m(this.number):this.origin}}]),Le}();function j(Le){return G()?new F(Le):new V(Le)}function se(Le,mt,Ne){var It=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Le==="")return"";var He=S(Le),Se=He.negativeStr,I=He.integerStr,g=He.decimalStr,v="".concat(mt).concat(g),Q="".concat(Se).concat(I);if(Ne>=0){var b=Number(g[Ne]);if(b>=5&&!It){var w=j(Le).add("".concat(Se,"0.").concat("0".repeat(Ne)).concat(10-b));return se(w.toString(),mt,Ne,It)}return Ne===0?Q:"".concat(Q).concat(mt).concat(g.padEnd(Ne,"0").slice(0,Ne))}return v===".0"?Q:"".concat(Q).concat(v)}var H=j,X=x(92310),P=x.n(X),R=x(36901),fe=x(34280);function de(Le,mt){return typeof Proxy!="undefined"&&Le?new Proxy(Le,{get:function(It,He){if(mt[He])return mt[He];var Se=It[He];return typeof Se=="function"?Se.bind(It):Se}}):Le}var ie=x(8654),q=x(59301),ge=x(48736);function z(Le,mt){var Ne=(0,q.useRef)(null);function It(){try{var Se=Le.selectionStart,I=Le.selectionEnd,g=Le.value,v=g.substring(0,Se),Q=g.substring(I);Ne.current={start:Se,end:I,value:g,beforeTxt:v,afterTxt:Q}}catch(b){}}function He(){if(Le&&Ne.current&&mt)try{var Se=Le.value,I=Ne.current,g=I.beforeTxt,v=I.afterTxt,Q=I.start,b=Se.length;if(Se.startsWith(g))b=g.length;else if(Se.endsWith(v))b=Se.length-Ne.current.afterTxt.length;else{var w=g[Q-1],D=Se.indexOf(w,Q-1);D!==-1&&(b=D+1)}Le.setSelectionRange(b,b)}catch(Ae){(0,ge.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Ae.message))}}return[It,He]}var Fe=x(49658),Z=function(){var mt=(0,q.useState)(!1),Ne=(0,we.Z)(mt,2),It=Ne[0],He=Ne[1];return(0,fe.Z)(function(){He((0,Fe.Z)())},[]),It},U=Z,K=x(16089),ee=200,he=600;function ae(Le){var mt=Le.prefixCls,Ne=Le.upNode,It=Le.downNode,He=Le.upDisabled,Se=Le.downDisabled,I=Le.onStep,g=q.useRef(),v=q.useRef([]),Q=q.useRef();Q.current=I;var b=function(){clearTimeout(g.current)},w=function(Ie,Re){Ie.preventDefault(),b(),Q.current(Re);function ht(){Q.current(Re),g.current=setTimeout(ht,ee)}g.current=setTimeout(ht,he)};q.useEffect(function(){return function(){b(),v.current.forEach(function(Ce){return K.Z.cancel(Ce)})}},[]);var D=U();if(D)return null;var Ae="".concat(mt,"-handler"),L=P()(Ae,"".concat(Ae,"-up"),(0,me.Z)({},"".concat(Ae,"-up-disabled"),He)),oe=P()(Ae,"".concat(Ae,"-down"),(0,me.Z)({},"".concat(Ae,"-down-disabled"),Se)),re=function(){return v.current.push((0,K.Z)(b))},Be={unselectable:"on",role:"button",onMouseUp:re,onMouseLeave:re};return q.createElement("div",{className:"".concat(Ae,"-wrap")},q.createElement("span",(0,M.Z)({},Be,{onMouseDown:function(Ie){w(Ie,!0)},"aria-label":"Increase Value","aria-disabled":He,className:L}),Ne||q.createElement("span",{unselectable:"on",className:"".concat(mt,"-handler-up-inner")})),q.createElement("span",(0,M.Z)({},Be,{onMouseDown:function(Ie){w(Ie,!1)},"aria-label":"Decrease Value","aria-disabled":Se,className:oe}),It||q.createElement("span",{unselectable:"on",className:"".concat(mt,"-handler-down-inner")})))}function _(Le){var mt=typeof Le=="number"?m(Le):S(Le).fullStr,Ne=mt.includes(".");return Ne?S(mt.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Le+"0"}var y=x(30292),Y=function(){var Le=(0,q.useRef)(0),mt=function(){K.Z.cancel(Le.current)};return(0,q.useEffect)(function(){return mt},[]),function(Ne){mt(),Le.current=(0,K.Z)(function(){Ne()})}},ue=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],Qe=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],et=function(mt,Ne){return mt||Ne.isEmpty()?Ne.toString():Ne.toNumber()},gt=function(mt){var Ne=H(mt);return Ne.isInvalidate()?null:Ne},bt=q.forwardRef(function(Le,mt){var Ne=Le.prefixCls,It=Le.className,He=Le.style,Se=Le.min,I=Le.max,g=Le.step,v=g===void 0?1:g,Q=Le.defaultValue,b=Le.value,w=Le.disabled,D=Le.readOnly,Ae=Le.upHandler,L=Le.downHandler,oe=Le.keyboard,re=Le.changeOnWheel,Be=re===void 0?!1:re,Ce=Le.controls,Ie=Ce===void 0?!0:Ce,Re=Le.classNames,ht=Le.stringMode,Ye=Le.parser,nt=Le.formatter,At=Le.precision,Ut=Le.decimalSeparator,Et=Le.onChange,vt=Le.onInput,tn=Le.onPressEnter,en=Le.onStep,Pt=Le.changeOnBlur,dn=Pt===void 0?!0:Pt,Ln=Le.domRef,zt=(0,W.Z)(Le,ue),cn="".concat(Ne,"-input"),qe=q.useRef(null),Ke=q.useState(!1),je=(0,we.Z)(Ke,2),le=je[0],Ee=je[1],ve=q.useRef(!1),Te=q.useRef(!1),ne=q.useRef(!1),Nt=q.useState(function(){return H(b!=null?b:Q)}),$t=(0,we.Z)(Nt,2),Ft=$t[0],vn=$t[1];function tr(st){b===void 0&&vn(st)}var Kn=q.useCallback(function(st,Bt){if(!Bt)return At>=0?At:Math.max(p(st),p(v))},[At,v]),Mn=q.useCallback(function(st){var Bt=String(st);if(Ye)return Ye(Bt);var Ht=Bt;return Ut&&(Ht=Ht.replace(Ut,".")),Ht.replace(/[^\w.-]+/g,"")},[Ye,Ut]),In=q.useRef(""),nr=q.useCallback(function(st,Bt){if(nt)return nt(st,{userTyping:Bt,input:String(In.current)});var Ht=typeof st=="number"?m(st):st;if(!Bt){var nn=Kn(Ht,Bt);if(B(Ht)&&(Ut||nn>=0)){var mn=Ut||".";Ht=se(Ht,mn,nn)}}return Ht},[nt,Kn,Ut]),fr=q.useState(function(){var st=Q!=null?Q:b;return Ft.isInvalidate()&&["string","number"].includes((0,be.Z)(st))?Number.isNaN(st)?"":st:nr(Ft.toString(),!1)}),qn=(0,we.Z)(fr,2),ur=qn[0],$n=qn[1];In.current=ur;function Nn(st,Bt){$n(nr(st.isInvalidate()?st.toString(!1):st.toString(!Bt),Bt))}var Ge=q.useMemo(function(){return gt(I)},[I,At]),Ue=q.useMemo(function(){return gt(Se)},[Se,At]),qt=q.useMemo(function(){return!Ge||!Ft||Ft.isInvalidate()?!1:Ge.lessEquals(Ft)},[Ge,Ft]),Mt=q.useMemo(function(){return!Ue||!Ft||Ft.isInvalidate()?!1:Ft.lessEquals(Ue)},[Ue,Ft]),an=z(qe.current,le),An=(0,we.Z)(an,2),yn=An[0],gn=An[1],Yt=function(Bt){return Ge&&!Bt.lessEquals(Ge)?Ge:Ue&&!Ue.lessEquals(Bt)?Ue:null},Tt=function(Bt){return!Yt(Bt)},Qt=function(Bt,Ht){var nn=Bt,mn=Tt(nn)||nn.isEmpty();if(!nn.isEmpty()&&!Ht&&(nn=Yt(nn)||nn,mn=!0),!D&&!w&&mn){var Bn=nn.toString(),Dn=Kn(Bn,Ht);return Dn>=0&&(nn=H(se(Bn,".",Dn)),Tt(nn)||(nn=H(se(Bn,".",Dn,!0)))),nn.equals(Ft)||(tr(nn),Et==null||Et(nn.isEmpty()?null:et(ht,nn)),b===void 0&&Nn(nn,Ht)),nn}return Ft},ln=Y(),sn=function st(Bt){if(yn(),In.current=Bt,$n(Bt),!Te.current){var Ht=Mn(Bt),nn=H(Ht);nn.isNaN()||Qt(nn,!0)}vt==null||vt(Bt),ln(function(){var mn=Bt;Ye||(mn=Bt.replace(/。/g,".")),mn!==Bt&&st(mn)})},wn=function(){Te.current=!0},Un=function(){Te.current=!1,sn(qe.current.value)},un=function(Bt){sn(Bt.target.value)},rn=function(Bt){var Ht;if(!(Bt&&qt||!Bt&&Mt)){ve.current=!1;var nn=H(ne.current?_(v):v);Bt||(nn=nn.negate());var mn=(Ft||H(0)).add(nn.toString()),Bn=Qt(mn,!1);en==null||en(et(ht,Bn),{offset:ne.current?_(v):v,type:Bt?"up":"down"}),(Ht=qe.current)===null||Ht===void 0||Ht.focus()}},Me=function(Bt){var Ht=H(Mn(ur)),nn;Ht.isNaN()?nn=Qt(Ft,Bt):nn=Qt(Ht,Bt),b!==void 0?Nn(Ft,!1):nn.isNaN()||Nn(nn,!1)},ct=function(){ve.current=!0},St=function(Bt){var Ht=Bt.key,nn=Bt.shiftKey;ve.current=!0,ne.current=nn,Ht==="Enter"&&(Te.current||(ve.current=!1),Me(!1),tn==null||tn(Bt)),oe!==!1&&!Te.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Ht)&&(rn(Ht==="Up"||Ht==="ArrowUp"),Bt.preventDefault())},wt=function(){ve.current=!1,ne.current=!1};q.useEffect(function(){if(Be&&le){var st=function(nn){rn(nn.deltaY<0),nn.preventDefault()},Bt=qe.current;if(Bt)return Bt.addEventListener("wheel",st,{passive:!1}),function(){return Bt.removeEventListener("wheel",st)}}});var Wt=function(){dn&&Me(!1),Ee(!1),ve.current=!1};return(0,fe.o)(function(){Ft.isInvalidate()||Nn(Ft,!1)},[At,nt]),(0,fe.o)(function(){var st=H(b);vn(st);var Bt=H(Mn(ur));(!st.equals(Bt)||!ve.current||nt)&&Nn(st,ve.current)},[b]),(0,fe.o)(function(){nt&&gn()},[ur]),q.createElement("div",{ref:Ln,className:P()(Ne,It,(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(Ne,"-focused"),le),"".concat(Ne,"-disabled"),w),"".concat(Ne,"-readonly"),D),"".concat(Ne,"-not-a-number"),Ft.isNaN()),"".concat(Ne,"-out-of-range"),!Ft.isInvalidate()&&!Tt(Ft))),style:He,onFocus:function(){Ee(!0)},onBlur:Wt,onKeyDown:St,onKeyUp:wt,onCompositionStart:wn,onCompositionEnd:Un,onBeforeInput:ct},Ie&&q.createElement(ae,{prefixCls:Ne,upNode:Ae,downNode:L,upDisabled:qt,downDisabled:Mt,onStep:rn}),q.createElement("div",{className:"".concat(cn,"-wrap")},q.createElement("input",(0,M.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Se,"aria-valuemax":I,"aria-valuenow":Ft.isInvalidate()?null:Ft.toString(),step:v},zt,{ref:(0,ie.sQ)(qe,mt),className:cn,value:ur,onChange:un,disabled:w,readOnly:D}))))}),Vt=q.forwardRef(function(Le,mt){var Ne=Le.disabled,It=Le.style,He=Le.prefixCls,Se=He===void 0?"rc-input-number":He,I=Le.value,g=Le.prefix,v=Le.suffix,Q=Le.addonBefore,b=Le.addonAfter,w=Le.className,D=Le.classNames,Ae=(0,W.Z)(Le,Qe),L=q.useRef(null),oe=q.useRef(null),re=q.useRef(null),Be=function(Ie){re.current&&(0,y.nH)(re.current,Ie)};return q.useImperativeHandle(mt,function(){return de(re.current,{focus:Be,nativeElement:L.current.nativeElement||oe.current})}),q.createElement(R.BaseInput,{className:w,triggerFocus:Be,prefixCls:Se,value:I,disabled:Ne,style:It,prefix:g,suffix:v,addonAfter:b,addonBefore:Q,classNames:D,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:L},q.createElement(bt,(0,M.Z)({prefixCls:Se,disabled:Ne,ref:re,domRef:oe,className:D==null?void 0:D.input},Ae)))}),Rt=Vt,te=Rt},66003:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return ye}});var M=x(74416),me=x(77321),be=x(62853),we=x(59301),W=["show"];function d(G,A){if(!A.max)return!0;var S=A.strategy(G);return S<=A.max}function ye(G,A){return we.useMemo(function(){var S={};A&&(S.show=(0,be.Z)(A)==="object"&&A.formatter?A.formatter:!!A),S=(0,me.Z)((0,me.Z)({},S),G);var k=S,p=k.show,m=(0,M.Z)(k,W);return(0,me.Z)((0,me.Z)({},m),{},{show:!!p,showFormatter:typeof p=="function"?p:void 0,strategy:m.strategy||function(B){return B.length}})},[G,A])}},36901:function(Zn,Dt,x){"use strict";x.r(Dt),x.d(Dt,{BaseInput:function(){return S},default:function(){return X}});var M=x(77321),me=x(72308),be=x(49618),we=x(62853),W=x(92310),d=x.n(W),ye=x(59301),G=x(30292),A=ye.forwardRef(function(P,R){var fe,de,ie,q=P.inputElement,ge=P.children,z=P.prefixCls,Fe=P.prefix,Z=P.suffix,U=P.addonBefore,K=P.addonAfter,ee=P.className,he=P.style,ae=P.disabled,_=P.readOnly,y=P.focused,Y=P.triggerFocus,ue=P.allowClear,Qe=P.value,et=P.handleReset,gt=P.hidden,bt=P.classes,Vt=P.classNames,Rt=P.dataAttrs,te=P.styles,Le=P.components,mt=P.onClear,Ne=ge!=null?ge:q,It=(Le==null?void 0:Le.affixWrapper)||"span",He=(Le==null?void 0:Le.groupWrapper)||"span",Se=(Le==null?void 0:Le.wrapper)||"span",I=(Le==null?void 0:Le.groupAddon)||"span",g=(0,ye.useRef)(null),v=function(Ut){var Et;(Et=g.current)!==null&&Et!==void 0&&Et.contains(Ut.target)&&(Y==null||Y())},Q=(0,G.X3)(P),b=(0,ye.cloneElement)(Ne,{value:Qe,className:d()((fe=Ne.props)===null||fe===void 0?void 0:fe.className,!Q&&(Vt==null?void 0:Vt.variant))||null}),w=(0,ye.useRef)(null);if(ye.useImperativeHandle(R,function(){return{nativeElement:w.current||g.current}}),Q){var D=null;if(ue){var Ae=!ae&&!_&&Qe,L="".concat(z,"-clear-icon"),oe=(0,we.Z)(ue)==="object"&&ue!==null&&ue!==void 0&&ue.clearIcon?ue.clearIcon:"\u2716";D=ye.createElement("button",{type:"button",tabIndex:-1,onClick:function(Ut){et==null||et(Ut),mt==null||mt()},onMouseDown:function(Ut){return Ut.preventDefault()},className:d()(L,(0,be.Z)((0,be.Z)({},"".concat(L,"-hidden"),!Ae),"".concat(L,"-has-suffix"),!!Z))},oe)}var re="".concat(z,"-affix-wrapper"),Be=d()(re,(0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)({},"".concat(z,"-disabled"),ae),"".concat(re,"-disabled"),ae),"".concat(re,"-focused"),y),"".concat(re,"-readonly"),_),"".concat(re,"-input-with-clear-btn"),Z&&ue&&Qe),bt==null?void 0:bt.affixWrapper,Vt==null?void 0:Vt.affixWrapper,Vt==null?void 0:Vt.variant),Ce=(Z||ue)&&ye.createElement("span",{className:d()("".concat(z,"-suffix"),Vt==null?void 0:Vt.suffix),style:te==null?void 0:te.suffix},D,Z);b=ye.createElement(It,(0,me.Z)({className:Be,style:te==null?void 0:te.affixWrapper,onClick:v},Rt==null?void 0:Rt.affixWrapper,{ref:g}),Fe&&ye.createElement("span",{className:d()("".concat(z,"-prefix"),Vt==null?void 0:Vt.prefix),style:te==null?void 0:te.prefix},Fe),b,Ce)}if((0,G.He)(P)){var Ie="".concat(z,"-group"),Re="".concat(Ie,"-addon"),ht="".concat(Ie,"-wrapper"),Ye=d()("".concat(z,"-wrapper"),Ie,bt==null?void 0:bt.wrapper,Vt==null?void 0:Vt.wrapper),nt=d()(ht,(0,be.Z)({},"".concat(ht,"-disabled"),ae),bt==null?void 0:bt.group,Vt==null?void 0:Vt.groupWrapper);b=ye.createElement(He,{className:nt,ref:w},ye.createElement(Se,{className:Ye},U&&ye.createElement(I,{className:Re},U),b,K&&ye.createElement(I,{className:Re},K)))}return ye.cloneElement(b,{className:d()((de=b.props)===null||de===void 0?void 0:de.className,ee)||null,style:(0,M.Z)((0,M.Z)({},(ie=b.props)===null||ie===void 0?void 0:ie.style),he),hidden:gt})}),S=A,k=x(80702),p=x(52487),m=x(74416),B=x(18929),F=x(2738),V=x(66003),j=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],se=(0,ye.forwardRef)(function(P,R){var fe=P.autoComplete,de=P.onChange,ie=P.onFocus,q=P.onBlur,ge=P.onPressEnter,z=P.onKeyDown,Fe=P.onKeyUp,Z=P.prefixCls,U=Z===void 0?"rc-input":Z,K=P.disabled,ee=P.htmlSize,he=P.className,ae=P.maxLength,_=P.suffix,y=P.showCount,Y=P.count,ue=P.type,Qe=ue===void 0?"text":ue,et=P.classes,gt=P.classNames,bt=P.styles,Vt=P.onCompositionStart,Rt=P.onCompositionEnd,te=(0,m.Z)(P,j),Le=(0,ye.useState)(!1),mt=(0,p.Z)(Le,2),Ne=mt[0],It=mt[1],He=(0,ye.useRef)(!1),Se=(0,ye.useRef)(!1),I=(0,ye.useRef)(null),g=(0,ye.useRef)(null),v=function(cn){I.current&&(0,G.nH)(I.current,cn)},Q=(0,B.Z)(P.defaultValue,{value:P.value}),b=(0,p.Z)(Q,2),w=b[0],D=b[1],Ae=w==null?"":String(w),L=(0,ye.useState)(null),oe=(0,p.Z)(L,2),re=oe[0],Be=oe[1],Ce=(0,V.Z)(Y,y),Ie=Ce.max||ae,Re=Ce.strategy(Ae),ht=!!Ie&&Re>Ie;(0,ye.useImperativeHandle)(R,function(){var zt;return{focus:v,blur:function(){var qe;(qe=I.current)===null||qe===void 0||qe.blur()},setSelectionRange:function(qe,Ke,je){var le;(le=I.current)===null||le===void 0||le.setSelectionRange(qe,Ke,je)},select:function(){var qe;(qe=I.current)===null||qe===void 0||qe.select()},input:I.current,nativeElement:((zt=g.current)===null||zt===void 0?void 0:zt.nativeElement)||I.current}}),(0,ye.useEffect)(function(){Se.current&&(Se.current=!1),It(function(zt){return zt&&K?!1:zt})},[K]);var Ye=function(cn,qe,Ke){var je=qe;if(!He.current&&Ce.exceedFormatter&&Ce.max&&Ce.strategy(qe)>Ce.max){if(je=Ce.exceedFormatter(qe,{max:Ce.max}),qe!==je){var le,Ee;Be([((le=I.current)===null||le===void 0?void 0:le.selectionStart)||0,((Ee=I.current)===null||Ee===void 0?void 0:Ee.selectionEnd)||0])}}else if(Ke.source==="compositionEnd")return;D(je),I.current&&(0,G.rJ)(I.current,cn,de,je)};(0,ye.useEffect)(function(){if(re){var zt;(zt=I.current)===null||zt===void 0||zt.setSelectionRange.apply(zt,(0,k.Z)(re))}},[re]);var nt=function(cn){Ye(cn,cn.target.value,{source:"change"})},At=function(cn){He.current=!1,Ye(cn,cn.currentTarget.value,{source:"compositionEnd"}),Rt==null||Rt(cn)},Ut=function(cn){ge&&cn.key==="Enter"&&!Se.current&&(Se.current=!0,ge(cn)),z==null||z(cn)},Et=function(cn){cn.key==="Enter"&&(Se.current=!1),Fe==null||Fe(cn)},vt=function(cn){It(!0),ie==null||ie(cn)},tn=function(cn){Se.current&&(Se.current=!1),It(!1),q==null||q(cn)},en=function(cn){D(""),v(),I.current&&(0,G.rJ)(I.current,cn,de)},Pt=ht&&"".concat(U,"-out-of-range"),dn=function(){var cn=(0,F.Z)(P,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ye.createElement("input",(0,me.Z)({autoComplete:fe},cn,{onChange:nt,onFocus:vt,onBlur:tn,onKeyDown:Ut,onKeyUp:Et,className:d()(U,(0,be.Z)({},"".concat(U,"-disabled"),K),gt==null?void 0:gt.input),style:bt==null?void 0:bt.input,ref:I,size:ee,type:Qe,onCompositionStart:function(Ke){He.current=!0,Vt==null||Vt(Ke)},onCompositionEnd:At}))},Ln=function(){var cn=Number(Ie)>0;if(_||Ce.show){var qe=Ce.showFormatter?Ce.showFormatter({value:Ae,count:Re,maxLength:Ie}):"".concat(Re).concat(cn?" / ".concat(Ie):"");return ye.createElement(ye.Fragment,null,Ce.show&&ye.createElement("span",{className:d()("".concat(U,"-show-count-suffix"),(0,be.Z)({},"".concat(U,"-show-count-has-suffix"),!!_),gt==null?void 0:gt.count),style:(0,M.Z)({},bt==null?void 0:bt.count)},qe),_)}return null};return ye.createElement(S,(0,me.Z)({},te,{prefixCls:U,className:d()(he,Pt),handleReset:en,value:Ae,focused:Ne,triggerFocus:v,suffix:Ln(),disabled:K,classes:et,classNames:gt,styles:bt}),dn())}),H=se,X=H},30292:function(Zn,Dt,x){"use strict";x.d(Dt,{He:function(){return M},X3:function(){return me},nH:function(){return W},rJ:function(){return we}});function M(d){return!!(d.addonBefore||d.addonAfter)}function me(d){return!!(d.prefix||d.suffix||d.allowClear)}function be(d,ye,G){var A=ye.cloneNode(!0),S=Object.create(d,{target:{value:A},currentTarget:{value:A}});return A.value=G,typeof ye.selectionStart=="number"&&typeof ye.selectionEnd=="number"&&(A.selectionStart=ye.selectionStart,A.selectionEnd=ye.selectionEnd),A.setSelectionRange=function(){ye.setSelectionRange.apply(ye,arguments)},S}function we(d,ye,G,A){if(G){var S=ye;if(ye.type==="click"){S=be(ye,d,""),G(S);return}if(d.type!=="file"&&A!==void 0){S=be(ye,d,A),G(S);return}G(S)}}function W(d,ye){if(d){d.focus(ye);var G=ye||{},A=G.cursor;if(A){var S=d.value.length;switch(A){case"start":d.setSelectionRange(0,0);break;case"end":d.setSelectionRange(S,S);break;default:d.setSelectionRange(0,S)}}}}},28321:function(Zn,Dt,x){"use strict";x.d(Dt,{iz:function(){return Mt},ck:function(){return je},BW:function(){return gn},sN:function(){return je},Wd:function(){return Ue},ZP:function(){return rn},Xl:function(){return ge}});var M=x(72308),me=x(49618),be=x(77321),we=x(80702),W=x(52487),d=x(74416),ye=x(92310),G=x.n(ye),A=x(11780),S=x(18929),k=x(13697),p=x(48736),m=x(59301),B=x(4676),F=m.createContext(null);function V(Me,ct){return Me===void 0?null:"".concat(Me,"-").concat(ct)}function j(Me){var ct=m.useContext(F);return V(ct,Me)}var se=x(80547),H=["children","locked"],X=m.createContext(null);function P(Me,ct){var St=(0,be.Z)({},Me);return Object.keys(ct).forEach(function(wt){var Wt=ct[wt];Wt!==void 0&&(St[wt]=Wt)}),St}function R(Me){var ct=Me.children,St=Me.locked,wt=(0,d.Z)(Me,H),Wt=m.useContext(X),st=(0,se.Z)(function(){return P(Wt,wt)},[Wt,wt],function(Bt,Ht){return!St&&(Bt[0]!==Ht[0]||!(0,k.Z)(Bt[1],Ht[1],!0))});return m.createElement(X.Provider,{value:st},ct)}var fe=[],de=m.createContext(null);function ie(){return m.useContext(de)}var q=m.createContext(fe);function ge(Me){var ct=m.useContext(q);return m.useMemo(function(){return Me!==void 0?[].concat((0,we.Z)(ct),[Me]):ct},[ct,Me])}var z=m.createContext(null),Fe=m.createContext({}),Z=Fe,U=x(29194);function K(Me){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,U.Z)(Me)){var St=Me.nodeName.toLowerCase(),wt=["input","select","textarea","button"].includes(St)||Me.isContentEditable||St==="a"&&!!Me.getAttribute("href"),Wt=Me.getAttribute("tabindex"),st=Number(Wt),Bt=null;return Wt&&!Number.isNaN(st)?Bt=st:wt&&Bt===null&&(Bt=0),wt&&Me.disabled&&(Bt=null),Bt!==null&&(Bt>=0||ct&&Bt<0)}return!1}function ee(Me){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=(0,we.Z)(Me.querySelectorAll("*")).filter(function(wt){return K(wt,ct)});return K(Me,ct)&&St.unshift(Me),St}var he=null;function ae(){he=document.activeElement}function _(){he=null}function y(){if(he)try{he.focus()}catch(Me){}}function Y(Me,ct){if(ct.keyCode===9){var St=ee(Me),wt=St[ct.shiftKey?0:St.length-1],Wt=wt===document.activeElement||Me===document.activeElement;if(Wt){var st=St[ct.shiftKey?St.length-1:0];st.focus(),ct.preventDefault()}}}var ue=x(10228),Qe=x(16089),et=ue.Z.LEFT,gt=ue.Z.RIGHT,bt=ue.Z.UP,Vt=ue.Z.DOWN,Rt=ue.Z.ENTER,te=ue.Z.ESC,Le=ue.Z.HOME,mt=ue.Z.END,Ne=[bt,Vt,et,gt];function It(Me,ct,St,wt){var Wt,st="prev",Bt="next",Ht="children",nn="parent";if(Me==="inline"&&wt===Rt)return{inlineTrigger:!0};var mn=(0,me.Z)((0,me.Z)({},bt,st),Vt,Bt),Bn=(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},et,St?Bt:st),gt,St?st:Bt),Vt,Ht),Rt,Ht),Dn=(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},bt,st),Vt,Bt),Rt,Ht),te,nn),et,St?Ht:nn),gt,St?nn:Ht),Ct={inline:mn,horizontal:Bn,vertical:Dn,inlineSub:mn,horizontalSub:Dn,verticalSub:Dn},N=(Wt=Ct["".concat(Me).concat(ct?"":"Sub")])===null||Wt===void 0?void 0:Wt[wt];switch(N){case st:return{offset:-1,sibling:!0};case Bt:return{offset:1,sibling:!0};case nn:return{offset:-1,sibling:!1};case Ht:return{offset:1,sibling:!1};default:return null}}function He(Me){for(var ct=Me;ct;){if(ct.getAttribute("data-menu-list"))return ct;ct=ct.parentElement}return null}function Se(Me,ct){for(var St=Me||document.activeElement;St;){if(ct.has(St))return St;St=St.parentElement}return null}function I(Me,ct){var St=ee(Me,!0);return St.filter(function(wt){return ct.has(wt)})}function g(Me,ct,St){var wt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Me)return null;var Wt=I(Me,ct),st=Wt.length,Bt=Wt.findIndex(function(Ht){return St===Ht});return wt<0?Bt===-1?Bt=st-1:Bt-=1:wt>0&&(Bt+=1),Bt=(Bt+st)%st,Wt[Bt]}var v=function(ct,St){var wt=new Set,Wt=new Map,st=new Map;return ct.forEach(function(Bt){var Ht=document.querySelector("[data-menu-id='".concat(V(St,Bt),"']"));Ht&&(wt.add(Ht),st.set(Ht,Bt),Wt.set(Bt,Ht))}),{elements:wt,key2element:Wt,element2key:st}};function Q(Me,ct,St,wt,Wt,st,Bt,Ht,nn,mn){var Bn=m.useRef(),Dn=m.useRef();Dn.current=ct;var Ct=function(){Qe.Z.cancel(Bn.current)};return m.useEffect(function(){return function(){Ct()}},[]),function(N){var O=N.which;if([].concat(Ne,[Rt,te,Le,mt]).includes(O)){var ce=st(),xe=v(ce,wt),$e=xe,Pe=$e.elements,Xe=$e.key2element,lt=$e.element2key,Zt=Xe.get(ct),Kt=Se(Zt,Pe),Ot=lt.get(Kt),Gt=It(Me,Bt(Ot,!0).length===1,St,O);if(!Gt&&O!==Le&&O!==mt)return;(Ne.includes(O)||[Le,mt].includes(O))&&N.preventDefault();var pe=function(pt){if(pt){var ze=pt,it=pt.querySelector("a");it!=null&&it.getAttribute("href")&&(ze=it);var ot=lt.get(pt);Ht(ot),Ct(),Bn.current=(0,Qe.Z)(function(){Dn.current===ot&&ze.focus()})}};if([Le,mt].includes(O)||Gt.sibling||!Kt){var Ve;!Kt||Me==="inline"?Ve=Wt.current:Ve=He(Kt);var Ze,ke=I(Ve,Pe);O===Le?Ze=ke[0]:O===mt?Ze=ke[ke.length-1]:Ze=g(Ve,Pe,Kt,Gt.offset),pe(Ze)}else if(Gt.inlineTrigger)nn(Ot);else if(Gt.offset>0)nn(Ot,!0),Ct(),Bn.current=(0,Qe.Z)(function(){xe=v(ce,wt);var ut=Kt.getAttribute("aria-controls"),pt=document.getElementById(ut),ze=g(pt,xe.elements);pe(ze)},5);else if(Gt.offset<0){var tt=Bt(Ot,!0),Je=tt[tt.length-2],at=Xe.get(Je);nn(Je,!1),pe(at)}}mn==null||mn(N)}}function b(Me){Promise.resolve().then(Me)}var w="__RC_UTIL_PATH_SPLIT__",D=function(ct){return ct.join(w)},Ae=function(ct){return ct.split(w)},L="rc-menu-more";function oe(){var Me=m.useState({}),ct=(0,W.Z)(Me,2),St=ct[1],wt=(0,m.useRef)(new Map),Wt=(0,m.useRef)(new Map),st=m.useState([]),Bt=(0,W.Z)(st,2),Ht=Bt[0],nn=Bt[1],mn=(0,m.useRef)(0),Bn=(0,m.useRef)(!1),Dn=function(){Bn.current||St({})},Ct=(0,m.useCallback)(function(Xe,lt){var Zt=D(lt);Wt.current.set(Zt,Xe),wt.current.set(Xe,Zt),mn.current+=1;var Kt=mn.current;b(function(){Kt===mn.current&&Dn()})},[]),N=(0,m.useCallback)(function(Xe,lt){var Zt=D(lt);Wt.current.delete(Zt),wt.current.delete(Xe)},[]),O=(0,m.useCallback)(function(Xe){nn(Xe)},[]),ce=(0,m.useCallback)(function(Xe,lt){var Zt=wt.current.get(Xe)||"",Kt=Ae(Zt);return lt&&Ht.includes(Kt[0])&&Kt.unshift(L),Kt},[Ht]),xe=(0,m.useCallback)(function(Xe,lt){return Xe.filter(function(Zt){return Zt!==void 0}).some(function(Zt){var Kt=ce(Zt,!0);return Kt.includes(lt)})},[ce]),$e=function(){var lt=(0,we.Z)(wt.current.keys());return Ht.length&&lt.push(L),lt},Pe=(0,m.useCallback)(function(Xe){var lt="".concat(wt.current.get(Xe)).concat(w),Zt=new Set;return(0,we.Z)(Wt.current.keys()).forEach(function(Kt){Kt.startsWith(lt)&&Zt.add(Wt.current.get(Kt))}),Zt},[]);return m.useEffect(function(){return function(){Bn.current=!0}},[]),{registerPath:Ct,unregisterPath:N,refreshOverflowKeys:O,isSubPathKey:xe,getKeyPath:ce,getKeys:$e,getSubPathKeys:Pe}}function re(Me){var ct=m.useRef(Me);ct.current=Me;var St=m.useCallback(function(){for(var wt,Wt=arguments.length,st=new Array(Wt),Bt=0;Bt<Wt;Bt++)st[Bt]=arguments[Bt];return(wt=ct.current)===null||wt===void 0?void 0:wt.call.apply(wt,[ct].concat(st))},[]);return Me?St:void 0}var Be=Math.random().toFixed(5).toString().slice(2),Ce=0;function Ie(Me){var ct=(0,S.Z)(Me,{value:Me}),St=(0,W.Z)(ct,2),wt=St[0],Wt=St[1];return m.useEffect(function(){Ce+=1;var st="".concat(Be,"-").concat(Ce);Wt("rc-menu-uuid-".concat(st))},[]),wt}var Re=x(96949),ht=x(55090),Ye=x(77205),nt=x(38793),At=x(2738),Ut=x(8654);function Et(Me,ct,St,wt){var Wt=m.useContext(X),st=Wt.activeKey,Bt=Wt.onActive,Ht=Wt.onInactive,nn={active:st===Me};return ct||(nn.onMouseEnter=function(mn){St==null||St({key:Me,domEvent:mn}),Bt(Me)},nn.onMouseLeave=function(mn){wt==null||wt({key:Me,domEvent:mn}),Ht(Me)}),nn}function vt(Me){var ct=m.useContext(X),St=ct.mode,wt=ct.rtl,Wt=ct.inlineIndent;if(St!=="inline")return null;var st=Me;return wt?{paddingRight:st*Wt}:{paddingLeft:st*Wt}}function tn(Me){var ct=Me.icon,St=Me.props,wt=Me.children,Wt;return ct===null||ct===!1?null:(typeof ct=="function"?Wt=m.createElement(ct,(0,be.Z)({},St)):typeof ct!="boolean"&&(Wt=ct),Wt||wt||null)}var en=["item"];function Pt(Me){var ct=Me.item,St=(0,d.Z)(Me,en);return Object.defineProperty(St,"item",{get:function(){return(0,p.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),ct}}),St}var dn=["title","attribute","elementRef"],Ln=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],zt=["active"],cn=function(Me){(0,Ye.Z)(St,Me);var ct=(0,nt.Z)(St);function St(){return(0,Re.Z)(this,St),ct.apply(this,arguments)}return(0,ht.Z)(St,[{key:"render",value:function(){var Wt=this.props,st=Wt.title,Bt=Wt.attribute,Ht=Wt.elementRef,nn=(0,d.Z)(Wt,dn),mn=(0,At.Z)(nn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,p.ZP)(!Bt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),m.createElement(A.Z.Item,(0,M.Z)({},Bt,{title:typeof st=="string"?st:void 0},mn,{ref:Ht}))}}]),St}(m.Component),qe=m.forwardRef(function(Me,ct){var St=Me.style,wt=Me.className,Wt=Me.eventKey,st=Me.warnKey,Bt=Me.disabled,Ht=Me.itemIcon,nn=Me.children,mn=Me.role,Bn=Me.onMouseEnter,Dn=Me.onMouseLeave,Ct=Me.onClick,N=Me.onKeyDown,O=Me.onFocus,ce=(0,d.Z)(Me,Ln),xe=j(Wt),$e=m.useContext(X),Pe=$e.prefixCls,Xe=$e.onItemClick,lt=$e.disabled,Zt=$e.overflowDisabled,Kt=$e.itemIcon,Ot=$e.selectedKeys,Gt=$e.onActive,pe=m.useContext(Z),Ve=pe._internalRenderMenuItem,Ze="".concat(Pe,"-item"),ke=m.useRef(),tt=m.useRef(),Je=lt||Bt,at=(0,Ut.x1)(ct,tt),ut=ge(Wt),pt=function(_n){return{key:Wt,keyPath:(0,we.Z)(ut).reverse(),item:ke.current,domEvent:_n}},ze=Ht||Kt,it=Et(Wt,Je,Bn,Dn),ot=it.active,yt=(0,d.Z)(it,zt),ft=Ot.includes(Wt),Jt=vt(ut.length),on=function(_n){if(!Je){var Wn=pt(_n);Ct==null||Ct(Pt(Wn)),Xe(Wn)}},En=function(_n){if(N==null||N(_n),_n.which===ue.Z.ENTER){var Wn=pt(_n);Ct==null||Ct(Pt(Wn)),Xe(Wn)}},kn=function(_n){Gt(Wt),O==null||O(_n)},Cn={};Me.role==="option"&&(Cn["aria-selected"]=ft);var Rn=m.createElement(cn,(0,M.Z)({ref:ke,elementRef:at,role:mn===null?"none":mn||"menuitem",tabIndex:Bt?null:-1,"data-menu-id":Zt&&xe?null:xe},(0,At.Z)(ce,["extra"]),yt,Cn,{component:"li","aria-disabled":Bt,style:(0,be.Z)((0,be.Z)({},Jt),St),className:G()(Ze,(0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(Ze,"-active"),ot),"".concat(Ze,"-selected"),ft),"".concat(Ze,"-disabled"),Je),wt),onClick:on,onKeyDown:En,onFocus:kn}),nn,m.createElement(tn,{props:(0,be.Z)((0,be.Z)({},Me),{},{isSelected:ft}),icon:ze}));return Ve&&(Rn=Ve(Rn,Me,{selected:ft})),Rn});function Ke(Me,ct){var St=Me.eventKey,wt=ie(),Wt=ge(St);return m.useEffect(function(){if(wt)return wt.registerPath(St,Wt),function(){wt.unregisterPath(St,Wt)}},[Wt]),wt?null:m.createElement(qe,(0,M.Z)({},Me,{ref:ct}))}var je=m.forwardRef(Ke),le=["className","children"],Ee=function(ct,St){var wt=ct.className,Wt=ct.children,st=(0,d.Z)(ct,le),Bt=m.useContext(X),Ht=Bt.prefixCls,nn=Bt.mode,mn=Bt.rtl;return m.createElement("ul",(0,M.Z)({className:G()(Ht,mn&&"".concat(Ht,"-rtl"),"".concat(Ht,"-sub"),"".concat(Ht,"-").concat(nn==="inline"?"inline":"vertical"),wt),role:"menu"},st,{"data-menu-list":!0,ref:St}),Wt)},ve=m.forwardRef(Ee);ve.displayName="SubMenuList";var Te=ve,ne=x(11592);function Nt(Me,ct){return(0,ne.Z)(Me).map(function(St,wt){if(m.isValidElement(St)){var Wt,st,Bt=St.key,Ht=(Wt=(st=St.props)===null||st===void 0?void 0:st.eventKey)!==null&&Wt!==void 0?Wt:Bt,nn=Ht==null;nn&&(Ht="tmp_key-".concat([].concat((0,we.Z)(ct),[wt]).join("-")));var mn={key:Ht,eventKey:Ht};return m.cloneElement(St,mn)}return St})}var $t=x(65352),Ft={adjustX:1,adjustY:1},vn={topLeft:{points:["bl","tl"],overflow:Ft},topRight:{points:["br","tr"],overflow:Ft},bottomLeft:{points:["tl","bl"],overflow:Ft},bottomRight:{points:["tr","br"],overflow:Ft},leftTop:{points:["tr","tl"],overflow:Ft},leftBottom:{points:["br","bl"],overflow:Ft},rightTop:{points:["tl","tr"],overflow:Ft},rightBottom:{points:["bl","br"],overflow:Ft}},tr={topLeft:{points:["bl","tl"],overflow:Ft},topRight:{points:["br","tr"],overflow:Ft},bottomLeft:{points:["tl","bl"],overflow:Ft},bottomRight:{points:["tr","br"],overflow:Ft},rightTop:{points:["tr","tl"],overflow:Ft},rightBottom:{points:["br","bl"],overflow:Ft},leftTop:{points:["tl","tr"],overflow:Ft},leftBottom:{points:["bl","br"],overflow:Ft}},Kn=null;function Mn(Me,ct,St){if(ct)return ct;if(St)return St[Me]||St.other}var In={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function nr(Me){var ct=Me.prefixCls,St=Me.visible,wt=Me.children,Wt=Me.popup,st=Me.popupStyle,Bt=Me.popupClassName,Ht=Me.popupOffset,nn=Me.disabled,mn=Me.mode,Bn=Me.onVisibleChange,Dn=m.useContext(X),Ct=Dn.getPopupContainer,N=Dn.rtl,O=Dn.subMenuOpenDelay,ce=Dn.subMenuCloseDelay,xe=Dn.builtinPlacements,$e=Dn.triggerSubMenuAction,Pe=Dn.forceSubMenuRender,Xe=Dn.rootClassName,lt=Dn.motion,Zt=Dn.defaultMotions,Kt=m.useState(!1),Ot=(0,W.Z)(Kt,2),Gt=Ot[0],pe=Ot[1],Ve=N?(0,be.Z)((0,be.Z)({},tr),xe):(0,be.Z)((0,be.Z)({},vn),xe),Ze=In[mn],ke=Mn(mn,lt,Zt),tt=m.useRef(ke);mn!=="inline"&&(tt.current=ke);var Je=(0,be.Z)((0,be.Z)({},tt.current),{},{leavedClassName:"".concat(ct,"-hidden"),removeOnLeave:!1,motionAppear:!0}),at=m.useRef();return m.useEffect(function(){return at.current=(0,Qe.Z)(function(){pe(St)}),function(){Qe.Z.cancel(at.current)}},[St]),m.createElement($t.Z,{prefixCls:ct,popupClassName:G()("".concat(ct,"-popup"),(0,me.Z)({},"".concat(ct,"-rtl"),N),Bt,Xe),stretch:mn==="horizontal"?"minWidth":null,getPopupContainer:Ct,builtinPlacements:Ve,popupPlacement:Ze,popupVisible:Gt,popup:Wt,popupStyle:st,popupAlign:Ht&&{offset:Ht},action:nn?[]:[$e],mouseEnterDelay:O,mouseLeaveDelay:ce,onPopupVisibleChange:Bn,forceRender:Pe,popupMotion:Je,fresh:!0},wt)}var fr=x(77900);function qn(Me){var ct=Me.id,St=Me.open,wt=Me.keyPath,Wt=Me.children,st="inline",Bt=m.useContext(X),Ht=Bt.prefixCls,nn=Bt.forceSubMenuRender,mn=Bt.motion,Bn=Bt.defaultMotions,Dn=Bt.mode,Ct=m.useRef(!1);Ct.current=Dn===st;var N=m.useState(!Ct.current),O=(0,W.Z)(N,2),ce=O[0],xe=O[1],$e=Ct.current?St:!1;m.useEffect(function(){Ct.current&&xe(!1)},[Dn]);var Pe=(0,be.Z)({},Mn(st,mn,Bn));wt.length>1&&(Pe.motionAppear=!1);var Xe=Pe.onVisibleChanged;return Pe.onVisibleChanged=function(lt){return!Ct.current&&!lt&&xe(!0),Xe==null?void 0:Xe(lt)},ce?null:m.createElement(R,{mode:st,locked:!Ct.current},m.createElement(fr.default,(0,M.Z)({visible:$e},Pe,{forceRender:nn,removeOnLeave:!1,leavedClassName:"".concat(Ht,"-hidden")}),function(lt){var Zt=lt.className,Kt=lt.style;return m.createElement(Te,{id:ct,className:Zt,style:Kt},Wt)}))}var ur=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],$n=["active"],Nn=m.forwardRef(function(Me,ct){var St=Me.style,wt=Me.className,Wt=Me.title,st=Me.eventKey,Bt=Me.warnKey,Ht=Me.disabled,nn=Me.internalPopupClose,mn=Me.children,Bn=Me.itemIcon,Dn=Me.expandIcon,Ct=Me.popupClassName,N=Me.popupOffset,O=Me.popupStyle,ce=Me.onClick,xe=Me.onMouseEnter,$e=Me.onMouseLeave,Pe=Me.onTitleClick,Xe=Me.onTitleMouseEnter,lt=Me.onTitleMouseLeave,Zt=(0,d.Z)(Me,ur),Kt=j(st),Ot=m.useContext(X),Gt=Ot.prefixCls,pe=Ot.mode,Ve=Ot.openKeys,Ze=Ot.disabled,ke=Ot.overflowDisabled,tt=Ot.activeKey,Je=Ot.selectedKeys,at=Ot.itemIcon,ut=Ot.expandIcon,pt=Ot.onItemClick,ze=Ot.onOpenChange,it=Ot.onActive,ot=m.useContext(Z),yt=ot._internalRenderSubMenuItem,ft=m.useContext(z),Jt=ft.isSubPathKey,on=ge(),En="".concat(Gt,"-submenu"),kn=Ze||Ht,Cn=m.useRef(),Rn=m.useRef(),Pn=Bn!=null?Bn:at,_n=Dn!=null?Dn:ut,Wn=Ve.includes(st),Hn=!ke&&Wn,Jn=Jt(Je,st),pn=Et(st,kn,Xe,lt),rr=pn.active,hr=(0,d.Z)(pn,$n),zn=m.useState(!1),Vn=(0,W.Z)(zn,2),jn=Vn[0],Fn=Vn[1],Yn=function(fn){kn||Fn(fn)},Sn=function(fn){Yn(!0),xe==null||xe({key:st,domEvent:fn})},vr=function(fn){Yn(!1),$e==null||$e({key:st,domEvent:fn})},lr=m.useMemo(function(){return rr||(pe!=="inline"?jn||Jt([tt],st):!1)},[pe,rr,tt,jn,st,Jt]),pr=vt(on.length),Ir=function(fn){kn||(Pe==null||Pe({key:st,domEvent:fn}),pe==="inline"&&ze(st,!Wn))},zr=re(function(On){ce==null||ce(Pt(On)),pt(On)}),ni=function(fn){pe!=="inline"&&ze(st,fn)},jr=function(){it(st)},Jr=Kt&&"".concat(Kt,"-popup"),Yr=m.useMemo(function(){return m.createElement(tn,{icon:pe!=="horizontal"?_n:void 0,props:(0,be.Z)((0,be.Z)({},Me),{},{isOpen:Hn,isSubMenu:!0})},m.createElement("i",{className:"".concat(En,"-arrow")}))},[pe,_n,Me,Hn,En]),cr=m.createElement("div",(0,M.Z)({role:"menuitem",style:pr,className:"".concat(En,"-title"),tabIndex:kn?null:-1,ref:Cn,title:typeof Wt=="string"?Wt:null,"data-menu-id":ke&&Kt?null:Kt,"aria-expanded":Hn,"aria-haspopup":!0,"aria-controls":Jr,"aria-disabled":kn,onClick:Ir,onFocus:jr},hr),Wt,Yr),Fr=m.useRef(pe);if(pe!=="inline"&&on.length>1?Fr.current="vertical":Fr.current=pe,!ke){var Pr=Fr.current;cr=m.createElement(nr,{mode:Pr,prefixCls:En,visible:!nn&&Hn&&pe!=="inline",popupClassName:Ct,popupOffset:N,popupStyle:O,popup:m.createElement(R,{mode:Pr==="horizontal"?"vertical":Pr},m.createElement(Te,{id:Jr,ref:Rn},mn)),disabled:kn,onVisibleChange:ni},cr)}var er=m.createElement(A.Z.Item,(0,M.Z)({ref:ct,role:"none"},Zt,{component:"li",style:St,className:G()(En,"".concat(En,"-").concat(pe),wt,(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(En,"-open"),Hn),"".concat(En,"-active"),lr),"".concat(En,"-selected"),Jn),"".concat(En,"-disabled"),kn)),onMouseEnter:Sn,onMouseLeave:vr}),cr,!ke&&m.createElement(qn,{id:Jr,open:Hn,keyPath:on},mn));return yt&&(er=yt(er,Me,{selected:Jn,active:lr,open:Hn,disabled:kn})),m.createElement(R,{onItemClick:zr,mode:pe==="horizontal"?"vertical":pe,itemIcon:Pn,expandIcon:_n},er)}),Ge=m.forwardRef(function(Me,ct){var St=Me.eventKey,wt=Me.children,Wt=ge(St),st=Nt(wt,Wt),Bt=ie();m.useEffect(function(){if(Bt)return Bt.registerPath(St,Wt),function(){Bt.unregisterPath(St,Wt)}},[Wt]);var Ht;return Bt?Ht=st:Ht=m.createElement(Nn,(0,M.Z)({ref:ct},Me),st),m.createElement(q.Provider,{value:Wt},Ht)}),Ue=Ge,qt=x(62853);function Mt(Me){var ct=Me.className,St=Me.style,wt=m.useContext(X),Wt=wt.prefixCls,st=ie();return st?null:m.createElement("li",{role:"separator",className:G()("".concat(Wt,"-item-divider"),ct),style:St})}var an=["className","title","eventKey","children"],An=m.forwardRef(function(Me,ct){var St=Me.className,wt=Me.title,Wt=Me.eventKey,st=Me.children,Bt=(0,d.Z)(Me,an),Ht=m.useContext(X),nn=Ht.prefixCls,mn="".concat(nn,"-item-group");return m.createElement("li",(0,M.Z)({ref:ct,role:"presentation"},Bt,{onClick:function(Dn){return Dn.stopPropagation()},className:G()(mn,St)}),m.createElement("div",{role:"presentation",className:"".concat(mn,"-title"),title:typeof wt=="string"?wt:void 0},wt),m.createElement("ul",{role:"group",className:"".concat(mn,"-list")},st))}),yn=m.forwardRef(function(Me,ct){var St=Me.eventKey,wt=Me.children,Wt=ge(St),st=Nt(wt,Wt),Bt=ie();return Bt?st:m.createElement(An,(0,M.Z)({ref:ct},(0,At.Z)(Me,["warnKey"])),st)}),gn=yn,Yt=["label","children","key","type","extra"];function Tt(Me,ct,St){var wt=ct.item,Wt=ct.group,st=ct.submenu,Bt=ct.divider;return(Me||[]).map(function(Ht,nn){if(Ht&&(0,qt.Z)(Ht)==="object"){var mn=Ht,Bn=mn.label,Dn=mn.children,Ct=mn.key,N=mn.type,O=mn.extra,ce=(0,d.Z)(mn,Yt),xe=Ct!=null?Ct:"tmp-".concat(nn);return Dn||N==="group"?N==="group"?m.createElement(Wt,(0,M.Z)({key:xe},ce,{title:Bn}),Tt(Dn,ct,St)):m.createElement(st,(0,M.Z)({key:xe},ce,{title:Bn}),Tt(Dn,ct,St)):N==="divider"?m.createElement(Bt,(0,M.Z)({key:xe},ce)):m.createElement(wt,(0,M.Z)({key:xe},ce,{extra:O}),Bn,(!!O||O===0)&&m.createElement("span",{className:"".concat(St,"-item-extra")},O))}return null}).filter(function(Ht){return Ht})}function Qt(Me,ct,St,wt,Wt){var st=Me,Bt=(0,be.Z)({divider:Mt,item:je,group:gn,submenu:Ue},wt);return ct&&(st=Tt(ct,Bt,Wt)),Nt(st,St)}var ln=["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"],sn=[],wn=m.forwardRef(function(Me,ct){var St,wt=Me,Wt=wt.prefixCls,st=Wt===void 0?"rc-menu":Wt,Bt=wt.rootClassName,Ht=wt.style,nn=wt.className,mn=wt.tabIndex,Bn=mn===void 0?0:mn,Dn=wt.items,Ct=wt.children,N=wt.direction,O=wt.id,ce=wt.mode,xe=ce===void 0?"vertical":ce,$e=wt.inlineCollapsed,Pe=wt.disabled,Xe=wt.disabledOverflow,lt=wt.subMenuOpenDelay,Zt=lt===void 0?.1:lt,Kt=wt.subMenuCloseDelay,Ot=Kt===void 0?.1:Kt,Gt=wt.forceSubMenuRender,pe=wt.defaultOpenKeys,Ve=wt.openKeys,Ze=wt.activeKey,ke=wt.defaultActiveFirst,tt=wt.selectable,Je=tt===void 0?!0:tt,at=wt.multiple,ut=at===void 0?!1:at,pt=wt.defaultSelectedKeys,ze=wt.selectedKeys,it=wt.onSelect,ot=wt.onDeselect,yt=wt.inlineIndent,ft=yt===void 0?24:yt,Jt=wt.motion,on=wt.defaultMotions,En=wt.triggerSubMenuAction,kn=En===void 0?"hover":En,Cn=wt.builtinPlacements,Rn=wt.itemIcon,Pn=wt.expandIcon,_n=wt.overflowedIndicator,Wn=_n===void 0?"...":_n,Hn=wt.overflowedIndicatorPopupClassName,Jn=wt.getPopupContainer,pn=wt.onClick,rr=wt.onOpenChange,hr=wt.onKeyDown,zn=wt.openAnimation,Vn=wt.openTransitionName,jn=wt._internalRenderMenuItem,Fn=wt._internalRenderSubMenuItem,Yn=wt._internalComponents,Sn=(0,d.Z)(wt,ln),vr=m.useMemo(function(){return[Qt(Ct,Dn,sn,Yn,st),Qt(Ct,Dn,sn,{},st)]},[Ct,Dn,Yn]),lr=(0,W.Z)(vr,2),pr=lr[0],Ir=lr[1],zr=m.useState(!1),ni=(0,W.Z)(zr,2),jr=ni[0],Jr=ni[1],Yr=m.useRef(),cr=Ie(O),Fr=N==="rtl",Pr=(0,S.Z)(pe,{value:Ve,postState:function(Gr){return Gr||sn}}),er=(0,W.Z)(Pr,2),On=er[0],fn=er[1],Gn=function(Gr){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function di(){fn(Gr),rr==null||rr(Gr)}Xt?(0,B.flushSync)(di):di()},Er=m.useState(On),Sr=(0,W.Z)(Er,2),ii=Sr[0],$r=Sr[1],Zr=m.useRef(!1),hn=m.useMemo(function(){return(xe==="inline"||xe==="vertical")&&$e?["vertical",$e]:[xe,!1]},[xe,$e]),sr=(0,W.Z)(hn,2),Cr=sr[0],_r=sr[1],br=Cr==="inline",Vr=m.useState(Cr),Ur=(0,W.Z)(Vr,2),si=Ur[0],Or=Ur[1],ji=m.useState(_r),xr=(0,W.Z)(ji,2),Ni=xr[0],Si=xr[1];m.useEffect(function(){Or(Cr),Si(_r),Zr.current&&(br?fn(ii):Gn(sn))},[Cr,_r]);var hi=m.useState(0),Mr=(0,W.Z)(hi,2),Yi=Mr[0],Ui=Mr[1],Xi=Yi>=pr.length-1||si!=="horizontal"||Xe;m.useEffect(function(){br&&$r(On)},[On]),m.useEffect(function(){return Zr.current=!0,function(){Zr.current=!1}},[]);var wi=oe(),ki=wi.registerPath,Hi=wi.unregisterPath,Ji=wi.refreshOverflowKeys,fi=wi.isSubPathKey,Ti=wi.getKeyPath,ui=wi.getKeys,oi=wi.getSubPathKeys,_i=m.useMemo(function(){return{registerPath:ki,unregisterPath:Hi}},[ki,Hi]),Ki=m.useMemo(function(){return{isSubPathKey:fi}},[fi]);m.useEffect(function(){Ji(Xi?sn:pr.slice(Yi+1).map(function(qr){return qr.key}))},[Yi,Xi]);var Dr=(0,S.Z)(Ze||ke&&((St=pr[0])===null||St===void 0?void 0:St.key),{value:Ze}),gr=(0,W.Z)(Dr,2),Kr=gr[0],ai=gr[1],Wr=re(function(qr){ai(qr)}),Qr=re(function(){ai(void 0)});(0,m.useImperativeHandle)(ct,function(){return{list:Yr.current,focus:function(Gr){var Xt,di=ui(),ci=v(di,cr),Ii=ci.elements,Bs=ci.key2element,cs=ci.element2key,ks=I(Yr.current,Ii),is=Kr!=null?Kr:ks[0]?cs.get(ks[0]):(Xt=pr.find(function(Ri){return!Ri.props.disabled}))===null||Xt===void 0?void 0:Xt.key,fs=Bs.get(is);if(is&&fs){var ss;fs==null||(ss=fs.focus)===null||ss===void 0||ss.call(fs,Gr)}}}});var Ai=(0,S.Z)(pt||[],{value:ze,postState:function(Gr){return Array.isArray(Gr)?Gr:Gr==null?sn:[Gr]}}),yi=(0,W.Z)(Ai,2),pi=yi[0],Fi=yi[1],Di=function(Gr){if(Je){var Xt=Gr.key,di=pi.includes(Xt),ci;ut?di?ci=pi.filter(function(Bs){return Bs!==Xt}):ci=[].concat((0,we.Z)(pi),[Xt]):ci=[Xt],Fi(ci);var Ii=(0,be.Z)((0,be.Z)({},Gr),{},{selectedKeys:ci});di?ot==null||ot(Ii):it==null||it(Ii)}!ut&&On.length&&si!=="inline"&&Gn(sn)},qi=re(function(qr){pn==null||pn(Pt(qr)),Di(qr)}),Nr=re(function(qr,Gr){var Xt=On.filter(function(ci){return ci!==qr});if(Gr)Xt.push(qr);else if(si!=="inline"){var di=oi(qr);Xt=Xt.filter(function(ci){return!di.has(ci)})}(0,k.Z)(On,Xt,!0)||Gn(Xt,!0)}),ns=function(Gr,Xt){var di=Xt!=null?Xt:!On.includes(Gr);Nr(Gr,di)},ws=Q(si,Kr,Fr,cr,Yr,ui,Ti,ai,ns,hr);m.useEffect(function(){Jr(!0)},[]);var us=m.useMemo(function(){return{_internalRenderMenuItem:jn,_internalRenderSubMenuItem:Fn}},[jn,Fn]),rs=si!=="horizontal"||Xe?pr:pr.map(function(qr,Gr){return m.createElement(R,{key:qr.key,overflowDisabled:Gr>Yi},qr)}),Us=m.createElement(A.Z,(0,M.Z)({id:O,ref:Yr,prefixCls:"".concat(st,"-overflow"),component:"ul",itemComponent:je,className:G()(st,"".concat(st,"-root"),"".concat(st,"-").concat(si),nn,(0,me.Z)((0,me.Z)({},"".concat(st,"-inline-collapsed"),Ni),"".concat(st,"-rtl"),Fr),Bt),dir:N,style:Ht,role:"menu",tabIndex:Bn,data:rs,renderRawItem:function(Gr){return Gr},renderRawRest:function(Gr){var Xt=Gr.length,di=Xt?pr.slice(-Xt):null;return m.createElement(Ue,{eventKey:L,title:Wn,disabled:Xi,internalPopupClose:Xt===0,popupClassName:Hn},di)},maxCount:si!=="horizontal"||Xe?A.Z.INVALIDATE:A.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Gr){Ui(Gr)},onKeyDown:ws},Sn));return m.createElement(Z.Provider,{value:us},m.createElement(F.Provider,{value:cr},m.createElement(R,{prefixCls:st,rootClassName:Bt,mode:si,openKeys:On,rtl:Fr,disabled:Pe,motion:jr?Jt:null,defaultMotions:jr?on:null,activeKey:Kr,onActive:Wr,onInactive:Qr,selectedKeys:pi,inlineIndent:ft,subMenuOpenDelay:Zt,subMenuCloseDelay:Ot,forceSubMenuRender:Gt,builtinPlacements:Cn,triggerSubMenuAction:kn,getPopupContainer:Jn,itemIcon:Rn,expandIcon:Pn,onItemClick:qi,onOpenChange:Nr},m.createElement(z.Provider,{value:Ki},Us),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(de.Provider,{value:_i},Ir)))))}),Un=wn,un=Un;un.Item=je,un.SubMenu=Ue,un.ItemGroup=gn,un.Divider=Mt;var rn=un},11780:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return ae}});var M=x(72308),me=x(77321),be=x(52487),we=x(74416),W=x(59301),d=x(92310),ye=x.n(d),G=x(29301),A=x(34280),S=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],k=void 0;function p(_,y){var Y=_.prefixCls,ue=_.invalidate,Qe=_.item,et=_.renderItem,gt=_.responsive,bt=_.responsiveDisabled,Vt=_.registerSize,Rt=_.itemKey,te=_.className,Le=_.style,mt=_.children,Ne=_.display,It=_.order,He=_.component,Se=He===void 0?"div":He,I=(0,we.Z)(_,S),g=gt&&!Ne;function v(Ae){Vt(Rt,Ae)}W.useEffect(function(){return function(){v(null)}},[]);var Q=et&&Qe!==k?et(Qe,{index:It}):mt,b;ue||(b={opacity:g?0:1,height:g?0:k,overflowY:g?"hidden":k,order:gt?It:k,pointerEvents:g?"none":k,position:g?"absolute":k});var w={};g&&(w["aria-hidden"]=!0);var D=W.createElement(Se,(0,M.Z)({className:ye()(!ue&&Y,te),style:(0,me.Z)((0,me.Z)({},b),Le)},w,I,{ref:y}),Q);return gt&&(D=W.createElement(G.Z,{onResize:function(L){var oe=L.offsetWidth;v(oe)},disabled:bt},D)),D}var m=W.forwardRef(p);m.displayName="Item";var B=m,F=x(6089),V=x(4676),j=x(16089);function se(_){if(typeof MessageChannel=="undefined")(0,j.Z)(_);else{var y=new MessageChannel;y.port1.onmessage=function(){return _()},y.port2.postMessage(void 0)}}function H(){var _=W.useRef(null),y=function(ue){_.current||(_.current=[],se(function(){(0,V.unstable_batchedUpdates)(function(){_.current.forEach(function(Qe){Qe()}),_.current=null})})),_.current.push(ue)};return y}function X(_,y){var Y=W.useState(y),ue=(0,be.Z)(Y,2),Qe=ue[0],et=ue[1],gt=(0,F.Z)(function(bt){_(function(){et(bt)})});return[Qe,gt]}var P=W.createContext(null),R=["component"],fe=["className"],de=["className"],ie=function(y,Y){var ue=W.useContext(P);if(!ue){var Qe=y.component,et=Qe===void 0?"div":Qe,gt=(0,we.Z)(y,R);return W.createElement(et,(0,M.Z)({},gt,{ref:Y}))}var bt=ue.className,Vt=(0,we.Z)(ue,fe),Rt=y.className,te=(0,we.Z)(y,de);return W.createElement(P.Provider,{value:null},W.createElement(B,(0,M.Z)({ref:Y,className:ye()(bt,Rt)},Vt,te)))},q=W.forwardRef(ie);q.displayName="RawItem";var ge=q,z=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Fe="responsive",Z="invalidate";function U(_){return"+ ".concat(_.length," ...")}function K(_,y){var Y=_.prefixCls,ue=Y===void 0?"rc-overflow":Y,Qe=_.data,et=Qe===void 0?[]:Qe,gt=_.renderItem,bt=_.renderRawItem,Vt=_.itemKey,Rt=_.itemWidth,te=Rt===void 0?10:Rt,Le=_.ssr,mt=_.style,Ne=_.className,It=_.maxCount,He=_.renderRest,Se=_.renderRawRest,I=_.suffix,g=_.component,v=g===void 0?"div":g,Q=_.itemComponent,b=_.onVisibleChange,w=(0,we.Z)(_,z),D=Le==="full",Ae=H(),L=X(Ae,null),oe=(0,be.Z)(L,2),re=oe[0],Be=oe[1],Ce=re||0,Ie=X(Ae,new Map),Re=(0,be.Z)(Ie,2),ht=Re[0],Ye=Re[1],nt=X(Ae,0),At=(0,be.Z)(nt,2),Ut=At[0],Et=At[1],vt=X(Ae,0),tn=(0,be.Z)(vt,2),en=tn[0],Pt=tn[1],dn=X(Ae,0),Ln=(0,be.Z)(dn,2),zt=Ln[0],cn=Ln[1],qe=(0,W.useState)(null),Ke=(0,be.Z)(qe,2),je=Ke[0],le=Ke[1],Ee=(0,W.useState)(null),ve=(0,be.Z)(Ee,2),Te=ve[0],ne=ve[1],Nt=W.useMemo(function(){return Te===null&&D?Number.MAX_SAFE_INTEGER:Te||0},[Te,re]),$t=(0,W.useState)(!1),Ft=(0,be.Z)($t,2),vn=Ft[0],tr=Ft[1],Kn="".concat(ue,"-item"),Mn=Math.max(Ut,en),In=It===Fe,nr=et.length&&In,fr=It===Z,qn=nr||typeof It=="number"&&et.length>It,ur=(0,W.useMemo)(function(){var un=et;return nr?re===null&&D?un=et:un=et.slice(0,Math.min(et.length,Ce/te)):typeof It=="number"&&(un=et.slice(0,It)),un},[et,te,re,It,nr]),$n=(0,W.useMemo)(function(){return nr?et.slice(Nt+1):et.slice(ur.length)},[et,ur,nr,Nt]),Nn=(0,W.useCallback)(function(un,rn){var Me;return typeof Vt=="function"?Vt(un):(Me=Vt&&(un==null?void 0:un[Vt]))!==null&&Me!==void 0?Me:rn},[Vt]),Ge=(0,W.useCallback)(gt||function(un){return un},[gt]);function Ue(un,rn,Me){Te===un&&(rn===void 0||rn===je)||(ne(un),Me||(tr(un<et.length-1),b==null||b(un)),rn!==void 0&&le(rn))}function qt(un,rn){Be(rn.clientWidth)}function Mt(un,rn){Ye(function(Me){var ct=new Map(Me);return rn===null?ct.delete(un):ct.set(un,rn),ct})}function an(un,rn){Pt(rn),Et(en)}function An(un,rn){cn(rn)}function yn(un){return ht.get(Nn(ur[un],un))}(0,A.Z)(function(){if(Ce&&typeof Mn=="number"&&ur){var un=zt,rn=ur.length,Me=rn-1;if(!rn){Ue(0,null);return}for(var ct=0;ct<rn;ct+=1){var St=yn(ct);if(D&&(St=St||0),St===void 0){Ue(ct-1,void 0,!0);break}if(un+=St,Me===0&&un<=Ce||ct===Me-1&&un+yn(Me)<=Ce){Ue(Me,null);break}else if(un+Mn>Ce){Ue(ct-1,un-St-zt+en);break}}I&&yn(0)+zt>Ce&&le(null)}},[Ce,ht,en,zt,Nn,ur]);var gn=vn&&!!$n.length,Yt={};je!==null&&nr&&(Yt={position:"absolute",left:je,top:0});var Tt={prefixCls:Kn,responsive:nr,component:Q,invalidate:fr},Qt=bt?function(un,rn){var Me=Nn(un,rn);return W.createElement(P.Provider,{key:Me,value:(0,me.Z)((0,me.Z)({},Tt),{},{order:rn,item:un,itemKey:Me,registerSize:Mt,display:rn<=Nt})},bt(un,rn))}:function(un,rn){var Me=Nn(un,rn);return W.createElement(B,(0,M.Z)({},Tt,{order:rn,key:Me,item:un,renderItem:Ge,itemKey:Me,registerSize:Mt,display:rn<=Nt}))},ln={order:gn?Nt:Number.MAX_SAFE_INTEGER,className:"".concat(Kn,"-rest"),registerSize:an,display:gn},sn=He||U,wn=Se?W.createElement(P.Provider,{value:(0,me.Z)((0,me.Z)({},Tt),ln)},Se($n)):W.createElement(B,(0,M.Z)({},Tt,ln),typeof sn=="function"?sn($n):sn),Un=W.createElement(v,(0,M.Z)({className:ye()(!fr&&ue,Ne),style:mt,ref:y},w),ur.map(Qt),qn?wn:null,I&&W.createElement(B,(0,M.Z)({},Tt,{responsive:In,responsiveDisabled:!nr,order:Nt,className:"".concat(Kn,"-suffix"),registerSize:An,display:!0,style:Yt}),I));return In?W.createElement(G.Z,{onResize:qt,disabled:!nr},Un):Un}var ee=W.forwardRef(K);ee.displayName="Overflow",ee.Item=ge,ee.RESPONSIVE=Fe,ee.INVALIDATE=Z;var he=ee,ae=he},23425:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return de}});var M=x(49618),me=x(72308),be=x(62853),we=x(77321),W=x(52487),d=x(92310),ye=x.n(d),G=x(18929),A=x(10228),S=x(26112),k=x(48736),p=x(59301),m=x(17119),B=[10,20,50,100],F=function(q){var ge=q.pageSizeOptions,z=ge===void 0?B:ge,Fe=q.locale,Z=q.changeSize,U=q.pageSize,K=q.goButton,ee=q.quickGo,he=q.rootPrefixCls,ae=q.disabled,_=q.buildOptionText,y=q.showSizeChanger,Y=q.sizeChangerRender,ue=p.useState(""),Qe=(0,W.Z)(ue,2),et=Qe[0],gt=Qe[1],bt=function(){return!et||Number.isNaN(et)?void 0:Number(et)},Vt=typeof _=="function"?_:function(I){return"".concat(I," ").concat(Fe.items_per_page)},Rt=function(g){gt(g.target.value)},te=function(g){K||et===""||(gt(""),!(g.relatedTarget&&(g.relatedTarget.className.indexOf("".concat(he,"-item-link"))>=0||g.relatedTarget.className.indexOf("".concat(he,"-item"))>=0))&&(ee==null||ee(bt())))},Le=function(g){et!==""&&(g.keyCode===A.Z.ENTER||g.type==="click")&&(gt(""),ee==null||ee(bt()))},mt=function(){return z.some(function(g){return g.toString()===U.toString()})?z:z.concat([U]).sort(function(g,v){var Q=Number.isNaN(Number(g))?0:Number(g),b=Number.isNaN(Number(v))?0:Number(v);return Q-b})},Ne="".concat(he,"-options");if(!y&&!ee)return null;var It=null,He=null,Se=null;return y&&Y&&(It=Y({disabled:ae,size:U,onSizeChange:function(g){Z==null||Z(Number(g))},"aria-label":Fe.page_size,className:"".concat(Ne,"-size-changer"),options:mt().map(function(I){return{label:Vt(I),value:I}})})),ee&&(K&&(Se=typeof K=="boolean"?p.createElement("button",{type:"button",onClick:Le,onKeyUp:Le,disabled:ae,className:"".concat(Ne,"-quick-jumper-button")},Fe.jump_to_confirm):p.createElement("span",{onClick:Le,onKeyUp:Le},K)),He=p.createElement("div",{className:"".concat(Ne,"-quick-jumper")},Fe.jump_to,p.createElement("input",{disabled:ae,type:"text",value:et,onChange:Rt,onKeyUp:Le,onBlur:te,"aria-label":Fe.page}),Fe.page,Se)),p.createElement("li",{className:Ne},It,He)},V=F,j=function(q){var ge=q.rootPrefixCls,z=q.page,Fe=q.active,Z=q.className,U=q.showTitle,K=q.onClick,ee=q.onKeyPress,he=q.itemRender,ae="".concat(ge,"-item"),_=ye()(ae,"".concat(ae,"-").concat(z),(0,M.Z)((0,M.Z)({},"".concat(ae,"-active"),Fe),"".concat(ae,"-disabled"),!z),Z),y=function(){K(z)},Y=function(et){ee(et,K,z)},ue=he(z,"page",p.createElement("a",{rel:"nofollow"},z));return ue?p.createElement("li",{title:U?String(z):null,className:_,onClick:y,onKeyDown:Y,tabIndex:0},ue):null},se=j,H=function(q,ge,z){return z};function X(){}function P(ie){var q=Number(ie);return typeof q=="number"&&!Number.isNaN(q)&&isFinite(q)&&Math.floor(q)===q}function R(ie,q,ge){var z=typeof ie=="undefined"?q:ie;return Math.floor((ge-1)/z)+1}var fe=function(q){var ge=q.prefixCls,z=ge===void 0?"rc-pagination":ge,Fe=q.selectPrefixCls,Z=Fe===void 0?"rc-select":Fe,U=q.className,K=q.current,ee=q.defaultCurrent,he=ee===void 0?1:ee,ae=q.total,_=ae===void 0?0:ae,y=q.pageSize,Y=q.defaultPageSize,ue=Y===void 0?10:Y,Qe=q.onChange,et=Qe===void 0?X:Qe,gt=q.hideOnSinglePage,bt=q.align,Vt=q.showPrevNextJumpers,Rt=Vt===void 0?!0:Vt,te=q.showQuickJumper,Le=q.showLessItems,mt=q.showTitle,Ne=mt===void 0?!0:mt,It=q.onShowSizeChange,He=It===void 0?X:It,Se=q.locale,I=Se===void 0?m.Z:Se,g=q.style,v=q.totalBoundaryShowSizeChanger,Q=v===void 0?50:v,b=q.disabled,w=q.simple,D=q.showTotal,Ae=q.showSizeChanger,L=Ae===void 0?_>Q:Ae,oe=q.sizeChangerRender,re=q.pageSizeOptions,Be=q.itemRender,Ce=Be===void 0?H:Be,Ie=q.jumpPrevIcon,Re=q.jumpNextIcon,ht=q.prevIcon,Ye=q.nextIcon,nt=p.useRef(null),At=(0,G.Z)(10,{value:y,defaultValue:ue}),Ut=(0,W.Z)(At,2),Et=Ut[0],vt=Ut[1],tn=(0,G.Z)(1,{value:K,defaultValue:he,postState:function(Xe){return Math.max(1,Math.min(Xe,R(void 0,Et,_)))}}),en=(0,W.Z)(tn,2),Pt=en[0],dn=en[1],Ln=p.useState(Pt),zt=(0,W.Z)(Ln,2),cn=zt[0],qe=zt[1];(0,p.useEffect)(function(){qe(Pt)},[Pt]);var Ke=et!==X,je="current"in q,le=Math.max(1,Pt-(Le?3:5)),Ee=Math.min(R(void 0,Et,_),Pt+(Le?3:5));function ve(Pe,Xe){var lt=Pe||p.createElement("button",{type:"button","aria-label":Xe,className:"".concat(z,"-item-link")});return typeof Pe=="function"&&(lt=p.createElement(Pe,(0,we.Z)({},q))),lt}function Te(Pe){var Xe=Pe.target.value,lt=R(void 0,Et,_),Zt;return Xe===""?Zt=Xe:Number.isNaN(Number(Xe))?Zt=cn:Xe>=lt?Zt=lt:Zt=Number(Xe),Zt}function ne(Pe){return P(Pe)&&Pe!==Pt&&P(_)&&_>0}var Nt=_>Et?te:!1;function $t(Pe){(Pe.keyCode===A.Z.UP||Pe.keyCode===A.Z.DOWN)&&Pe.preventDefault()}function Ft(Pe){var Xe=Te(Pe);switch(Xe!==cn&&qe(Xe),Pe.keyCode){case A.Z.ENTER:Kn(Xe);break;case A.Z.UP:Kn(Xe-1);break;case A.Z.DOWN:Kn(Xe+1);break;default:break}}function vn(Pe){Kn(Te(Pe))}function tr(Pe){var Xe=R(Pe,Et,_),lt=Pt>Xe&&Xe!==0?Xe:Pt;vt(Pe),qe(lt),He==null||He(Pt,Pe),dn(lt),et==null||et(lt,Pe)}function Kn(Pe){if(ne(Pe)&&!b){var Xe=R(void 0,Et,_),lt=Pe;return Pe>Xe?lt=Xe:Pe<1&&(lt=1),lt!==cn&&qe(lt),dn(lt),et==null||et(lt,Et),lt}return Pt}var Mn=Pt>1,In=Pt<R(void 0,Et,_);function nr(){Mn&&Kn(Pt-1)}function fr(){In&&Kn(Pt+1)}function qn(){Kn(le)}function ur(){Kn(Ee)}function $n(Pe,Xe){if(Pe.key==="Enter"||Pe.charCode===A.Z.ENTER||Pe.keyCode===A.Z.ENTER){for(var lt=arguments.length,Zt=new Array(lt>2?lt-2:0),Kt=2;Kt<lt;Kt++)Zt[Kt-2]=arguments[Kt];Xe.apply(void 0,Zt)}}function Nn(Pe){$n(Pe,nr)}function Ge(Pe){$n(Pe,fr)}function Ue(Pe){$n(Pe,qn)}function qt(Pe){$n(Pe,ur)}function Mt(Pe){var Xe=Ce(Pe,"prev",ve(ht,"prev page"));return p.isValidElement(Xe)?p.cloneElement(Xe,{disabled:!Mn}):Xe}function an(Pe){var Xe=Ce(Pe,"next",ve(Ye,"next page"));return p.isValidElement(Xe)?p.cloneElement(Xe,{disabled:!In}):Xe}function An(Pe){(Pe.type==="click"||Pe.keyCode===A.Z.ENTER)&&Kn(cn)}var yn=null,gn=(0,S.Z)(q,{aria:!0,data:!0}),Yt=D&&p.createElement("li",{className:"".concat(z,"-total-text")},D(_,[_===0?0:(Pt-1)*Et+1,Pt*Et>_?_:Pt*Et])),Tt=null,Qt=R(void 0,Et,_);if(gt&&_<=Et)return null;var ln=[],sn={rootPrefixCls:z,onClick:Kn,onKeyPress:$n,showTitle:Ne,itemRender:Ce,page:-1},wn=Pt-1>0?Pt-1:0,Un=Pt+1<Qt?Pt+1:Qt,un=te&&te.goButton,rn=(0,be.Z)(w)==="object"?w.readOnly:!w,Me=un,ct=null;w&&(un&&(typeof un=="boolean"?Me=p.createElement("button",{type:"button",onClick:An,onKeyUp:An},I.jump_to_confirm):Me=p.createElement("span",{onClick:An,onKeyUp:An},un),Me=p.createElement("li",{title:Ne?"".concat(I.jump_to).concat(Pt,"/").concat(Qt):null,className:"".concat(z,"-simple-pager")},Me)),ct=p.createElement("li",{title:Ne?"".concat(Pt,"/").concat(Qt):null,className:"".concat(z,"-simple-pager")},rn?cn:p.createElement("input",{type:"text","aria-label":I.jump_to,value:cn,disabled:b,onKeyDown:$t,onKeyUp:Ft,onChange:Ft,onBlur:vn,size:3}),p.createElement("span",{className:"".concat(z,"-slash")},"/"),Qt));var St=Le?1:2;if(Qt<=3+St*2){Qt||ln.push(p.createElement(se,(0,me.Z)({},sn,{key:"noPager",page:1,className:"".concat(z,"-item-disabled")})));for(var wt=1;wt<=Qt;wt+=1)ln.push(p.createElement(se,(0,me.Z)({},sn,{key:wt,page:wt,active:Pt===wt})))}else{var Wt=Le?I.prev_3:I.prev_5,st=Le?I.next_3:I.next_5,Bt=Ce(le,"jump-prev",ve(Ie,"prev page")),Ht=Ce(Ee,"jump-next",ve(Re,"next page"));Rt&&(yn=Bt?p.createElement("li",{title:Ne?Wt:null,key:"prev",onClick:qn,tabIndex:0,onKeyDown:Ue,className:ye()("".concat(z,"-jump-prev"),(0,M.Z)({},"".concat(z,"-jump-prev-custom-icon"),!!Ie))},Bt):null,Tt=Ht?p.createElement("li",{title:Ne?st:null,key:"next",onClick:ur,tabIndex:0,onKeyDown:qt,className:ye()("".concat(z,"-jump-next"),(0,M.Z)({},"".concat(z,"-jump-next-custom-icon"),!!Re))},Ht):null);var nn=Math.max(1,Pt-St),mn=Math.min(Pt+St,Qt);Pt-1<=St&&(mn=1+St*2),Qt-Pt<=St&&(nn=Qt-St*2);for(var Bn=nn;Bn<=mn;Bn+=1)ln.push(p.createElement(se,(0,me.Z)({},sn,{key:Bn,page:Bn,active:Pt===Bn})));if(Pt-1>=St*2&&Pt!==3&&(ln[0]=p.cloneElement(ln[0],{className:ye()("".concat(z,"-item-after-jump-prev"),ln[0].props.className)}),ln.unshift(yn)),Qt-Pt>=St*2&&Pt!==Qt-2){var Dn=ln[ln.length-1];ln[ln.length-1]=p.cloneElement(Dn,{className:ye()("".concat(z,"-item-before-jump-next"),Dn.props.className)}),ln.push(Tt)}nn!==1&&ln.unshift(p.createElement(se,(0,me.Z)({},sn,{key:1,page:1}))),mn!==Qt&&ln.push(p.createElement(se,(0,me.Z)({},sn,{key:Qt,page:Qt})))}var Ct=Mt(wn);if(Ct){var N=!Mn||!Qt;Ct=p.createElement("li",{title:Ne?I.prev_page:null,onClick:nr,tabIndex:N?null:0,onKeyDown:Nn,className:ye()("".concat(z,"-prev"),(0,M.Z)({},"".concat(z,"-disabled"),N)),"aria-disabled":N},Ct)}var O=an(Un);if(O){var ce,xe;w?(ce=!In,xe=Mn?0:null):(ce=!In||!Qt,xe=ce?null:0),O=p.createElement("li",{title:Ne?I.next_page:null,onClick:fr,tabIndex:xe,onKeyDown:Ge,className:ye()("".concat(z,"-next"),(0,M.Z)({},"".concat(z,"-disabled"),ce)),"aria-disabled":ce},O)}var $e=ye()(z,U,(0,M.Z)((0,M.Z)((0,M.Z)((0,M.Z)((0,M.Z)({},"".concat(z,"-start"),bt==="start"),"".concat(z,"-center"),bt==="center"),"".concat(z,"-end"),bt==="end"),"".concat(z,"-simple"),w),"".concat(z,"-disabled"),b));return p.createElement("ul",(0,me.Z)({className:$e,style:g,ref:nt},gn),Yt,Ct,w?ct:ln,O,p.createElement(V,{locale:I,rootPrefixCls:z,disabled:b,selectPrefixCls:Z,changeSize:tr,pageSize:Et,pageSizeOptions:re,quickGo:Nt?Kn:null,goButton:Me,showSizeChanger:L,sizeChangerRender:oe}))},de=fe},29301:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return Z}});var M=x(72308),me=x(59301),be=x(11592),we=x(48736),W=x(77321),d=x(62853),ye=x(76846),G=x(8654),A=me.createContext(null);function S(U){var K=U.children,ee=U.onBatchResize,he=me.useRef(0),ae=me.useRef([]),_=me.useContext(A),y=me.useCallback(function(Y,ue,Qe){he.current+=1;var et=he.current;ae.current.push({size:Y,element:ue,data:Qe}),Promise.resolve().then(function(){et===he.current&&(ee==null||ee(ae.current),ae.current=[])}),_==null||_(Y,ue,Qe)},[ee,_]);return me.createElement(A.Provider,{value:y},K)}var k=x(76374),p=new Map;function m(U){U.forEach(function(K){var ee,he=K.target;(ee=p.get(he))===null||ee===void 0||ee.forEach(function(ae){return ae(he)})})}var B=new k.Z(m),F=null,V=null;function j(U,K){p.has(U)||(p.set(U,new Set),B.observe(U)),p.get(U).add(K)}function se(U,K){p.has(U)&&(p.get(U).delete(K),p.get(U).size||(B.unobserve(U),p.delete(U)))}var H=x(96949),X=x(55090),P=x(77205),R=x(38793),fe=function(U){(0,P.Z)(ee,U);var K=(0,R.Z)(ee);function ee(){return(0,H.Z)(this,ee),K.apply(this,arguments)}return(0,X.Z)(ee,[{key:"render",value:function(){return this.props.children}}]),ee}(me.Component);function de(U,K){var ee=U.children,he=U.disabled,ae=me.useRef(null),_=me.useRef(null),y=me.useContext(A),Y=typeof ee=="function",ue=Y?ee(ae):ee,Qe=me.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),et=!Y&&me.isValidElement(ue)&&(0,G.Yr)(ue),gt=et?(0,G.C4)(ue):null,bt=(0,G.x1)(gt,ae),Vt=function(){var mt;return(0,ye.ZP)(ae.current)||(ae.current&&(0,d.Z)(ae.current)==="object"?(0,ye.ZP)((mt=ae.current)===null||mt===void 0?void 0:mt.nativeElement):null)||(0,ye.ZP)(_.current)};me.useImperativeHandle(K,function(){return Vt()});var Rt=me.useRef(U);Rt.current=U;var te=me.useCallback(function(Le){var mt=Rt.current,Ne=mt.onResize,It=mt.data,He=Le.getBoundingClientRect(),Se=He.width,I=He.height,g=Le.offsetWidth,v=Le.offsetHeight,Q=Math.floor(Se),b=Math.floor(I);if(Qe.current.width!==Q||Qe.current.height!==b||Qe.current.offsetWidth!==g||Qe.current.offsetHeight!==v){var w={width:Q,height:b,offsetWidth:g,offsetHeight:v};Qe.current=w;var D=g===Math.round(Se)?Se:g,Ae=v===Math.round(I)?I:v,L=(0,W.Z)((0,W.Z)({},w),{},{offsetWidth:D,offsetHeight:Ae});y==null||y(L,Le,It),Ne&&Promise.resolve().then(function(){Ne(L,Le)})}},[]);return me.useEffect(function(){var Le=Vt();return Le&&!he&&j(Le,te),function(){return se(Le,te)}},[ae.current,he]),me.createElement(fe,{ref:_},et?me.cloneElement(ue,{ref:bt}):ue)}var ie=me.forwardRef(de),q=ie,ge="rc-observer-key";function z(U,K){var ee=U.children,he=typeof ee=="function"?[ee]:(0,be.Z)(ee);return he.map(function(ae,_){var y=(ae==null?void 0:ae.key)||"".concat(ge,"-").concat(_);return me.createElement(q,(0,M.Z)({},U,{key:y,ref:_===0?K:void 0}),ae)})}var Fe=me.forwardRef(z);Fe.Collection=S;var Z=Fe},69582:function(Zn,Dt,x){"use strict";x.d(Dt,{ZP:function(){return ye}});var M=x(52487),me=x(59301),be=x(47273),we=0,W=(0,be.Z)();function d(){var G;return W?(G=we,we+=1):G="TEST_OR_SSR",G}function ye(G){var A=me.useState(),S=(0,M.Z)(A,2),k=S[0],p=S[1];return me.useEffect(function(){p("rc_select_".concat(d()))},[]),G||k}},45560:function(Zn,Dt,x){"use strict";x.d(Dt,{Ac:function(){return ht},Xo:function(){return nt},Wx:function(){return Ut},ZP:function(){return Nn},lk:function(){return X}});var M=x(72308),me=x(80702),be=x(49618),we=x(77321),W=x(52487),d=x(74416),ye=x(62853),G=x(18929),A=x(48736),S=x(59301),k=x(92310),p=x.n(k),m=x(34280),B=x(49658),F=x(8654),V=function(Ue){var qt=Ue.className,Mt=Ue.customizeIcon,an=Ue.customizeIconProps,An=Ue.children,yn=Ue.onMouseDown,gn=Ue.onClick,Yt=typeof Mt=="function"?Mt(an):Mt;return S.createElement("span",{className:qt,onMouseDown:function(Qt){Qt.preventDefault(),yn==null||yn(Qt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:gn,"aria-hidden":!0},Yt!==void 0?Yt:S.createElement("span",{className:p()(qt.split(/\s+/).map(function(Tt){return"".concat(Tt,"-icon")}))},An))},j=V,se=function(Ue,qt,Mt,an,An){var yn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,gn=arguments.length>6?arguments[6]:void 0,Yt=arguments.length>7?arguments[7]:void 0,Tt=S.useMemo(function(){if((0,ye.Z)(an)==="object")return an.clearIcon;if(An)return An},[an,An]),Qt=S.useMemo(function(){return!!(!yn&&an&&(Mt.length||gn)&&!(Yt==="combobox"&&gn===""))},[an,yn,Mt.length,gn,Yt]);return{allowClear:Qt,clearIcon:S.createElement(j,{className:"".concat(Ue,"-clear"),onMouseDown:qt,customizeIcon:Tt},"\xD7")}},H=S.createContext(null);function X(){return S.useContext(H)}function P(){var Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ue=S.useState(!1),qt=(0,W.Z)(Ue,2),Mt=qt[0],an=qt[1],An=S.useRef(null),yn=function(){window.clearTimeout(An.current)};S.useEffect(function(){return yn},[]);var gn=function(Tt,Qt){yn(),An.current=window.setTimeout(function(){an(Tt),Qt&&Qt()},Ge)};return[Mt,gn,yn]}function R(){var Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ue=S.useRef(null),qt=S.useRef(null);S.useEffect(function(){return function(){window.clearTimeout(qt.current)}},[]);function Mt(an){(an||Ue.current===null)&&(Ue.current=an),window.clearTimeout(qt.current),qt.current=window.setTimeout(function(){Ue.current=null},Ge)}return[function(){return Ue.current},Mt]}function fe(Ge,Ue,qt,Mt){var an=S.useRef(null);an.current={open:Ue,triggerOpen:qt,customizedTrigger:Mt},S.useEffect(function(){function An(yn){var gn;if(!((gn=an.current)!==null&&gn!==void 0&&gn.customizedTrigger)){var Yt=yn.target;Yt.shadowRoot&&yn.composed&&(Yt=yn.composedPath()[0]||Yt),an.current.open&&Ge().filter(function(Tt){return Tt}).every(function(Tt){return!Tt.contains(Yt)&&Tt!==Yt})&&an.current.triggerOpen(!1)}}return window.addEventListener("mousedown",An),function(){return window.removeEventListener("mousedown",An)}},[])}var de=x(10228);function ie(Ge){return Ge&&![de.Z.ESC,de.Z.SHIFT,de.Z.BACKSPACE,de.Z.TAB,de.Z.WIN_KEY,de.Z.ALT,de.Z.META,de.Z.WIN_KEY_RIGHT,de.Z.CTRL,de.Z.SEMICOLON,de.Z.EQUALS,de.Z.CAPS_LOCK,de.Z.CONTEXT_MENU,de.Z.F1,de.Z.F2,de.Z.F3,de.Z.F4,de.Z.F5,de.Z.F6,de.Z.F7,de.Z.F8,de.Z.F9,de.Z.F10,de.Z.F11,de.Z.F12].includes(Ge)}var q=x(26112),ge=x(11780),z=function(Ue,qt){var Mt,an=Ue.prefixCls,An=Ue.id,yn=Ue.inputElement,gn=Ue.disabled,Yt=Ue.tabIndex,Tt=Ue.autoFocus,Qt=Ue.autoComplete,ln=Ue.editable,sn=Ue.activeDescendantId,wn=Ue.value,Un=Ue.maxLength,un=Ue.onKeyDown,rn=Ue.onMouseDown,Me=Ue.onChange,ct=Ue.onPaste,St=Ue.onCompositionStart,wt=Ue.onCompositionEnd,Wt=Ue.onBlur,st=Ue.open,Bt=Ue.attrs,Ht=yn||S.createElement("input",null),nn=Ht,mn=nn.ref,Bn=nn.props,Dn=Bn.onKeyDown,Ct=Bn.onChange,N=Bn.onMouseDown,O=Bn.onCompositionStart,ce=Bn.onCompositionEnd,xe=Bn.onBlur,$e=Bn.style;return(0,A.Kp)(!("maxLength"in Ht.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ht=S.cloneElement(Ht,(0,we.Z)((0,we.Z)((0,we.Z)({type:"search"},Bn),{},{id:An,ref:(0,F.sQ)(qt,mn),disabled:gn,tabIndex:Yt,autoComplete:Qt||"off",autoFocus:Tt,className:p()("".concat(an,"-selection-search-input"),(Mt=Ht)===null||Mt===void 0||(Mt=Mt.props)===null||Mt===void 0?void 0:Mt.className),role:"combobox","aria-expanded":st||!1,"aria-haspopup":"listbox","aria-owns":"".concat(An,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(An,"_list"),"aria-activedescendant":st?sn:void 0},Bt),{},{value:ln?wn:"",maxLength:Un,readOnly:!ln,unselectable:ln?null:"on",style:(0,we.Z)((0,we.Z)({},$e),{},{opacity:ln?null:0}),onKeyDown:function(Xe){un(Xe),Dn&&Dn(Xe)},onMouseDown:function(Xe){rn(Xe),N&&N(Xe)},onChange:function(Xe){Me(Xe),Ct&&Ct(Xe)},onCompositionStart:function(Xe){St(Xe),O&&O(Xe)},onCompositionEnd:function(Xe){wt(Xe),ce&&ce(Xe)},onPaste:ct,onBlur:function(Xe){Wt(Xe),xe&&xe(Xe)}})),Ht},Fe=S.forwardRef(z),Z=Fe;function U(Ge){return Array.isArray(Ge)?Ge:Ge!==void 0?[Ge]:[]}var K=typeof window!="undefined"&&window.document&&window.document.documentElement,ee=K;function he(Ge){return Ge!=null}function ae(Ge){return!Ge&&Ge!==0}function _(Ge){return["string","number"].includes((0,ye.Z)(Ge))}function y(Ge){var Ue=void 0;return Ge&&(_(Ge.title)?Ue=Ge.title.toString():_(Ge.label)&&(Ue=Ge.label.toString())),Ue}function Y(Ge,Ue){ee?S.useLayoutEffect(Ge,Ue):S.useEffect(Ge,Ue)}function ue(Ge){var Ue;return(Ue=Ge.key)!==null&&Ue!==void 0?Ue:Ge.value}var Qe=function(Ue){Ue.preventDefault(),Ue.stopPropagation()},et=function(Ue){var qt=Ue.id,Mt=Ue.prefixCls,an=Ue.values,An=Ue.open,yn=Ue.searchValue,gn=Ue.autoClearSearchValue,Yt=Ue.inputRef,Tt=Ue.placeholder,Qt=Ue.disabled,ln=Ue.mode,sn=Ue.showSearch,wn=Ue.autoFocus,Un=Ue.autoComplete,un=Ue.activeDescendantId,rn=Ue.tabIndex,Me=Ue.removeIcon,ct=Ue.maxTagCount,St=Ue.maxTagTextLength,wt=Ue.maxTagPlaceholder,Wt=wt===void 0?function(pt){return"+ ".concat(pt.length," ...")}:wt,st=Ue.tagRender,Bt=Ue.onToggleOpen,Ht=Ue.onRemove,nn=Ue.onInputChange,mn=Ue.onInputPaste,Bn=Ue.onInputKeyDown,Dn=Ue.onInputMouseDown,Ct=Ue.onInputCompositionStart,N=Ue.onInputCompositionEnd,O=Ue.onInputBlur,ce=S.useRef(null),xe=(0,S.useState)(0),$e=(0,W.Z)(xe,2),Pe=$e[0],Xe=$e[1],lt=(0,S.useState)(!1),Zt=(0,W.Z)(lt,2),Kt=Zt[0],Ot=Zt[1],Gt="".concat(Mt,"-selection"),pe=An||ln==="multiple"&&gn===!1||ln==="tags"?yn:"",Ve=ln==="tags"||ln==="multiple"&&gn===!1||sn&&(An||Kt);Y(function(){Xe(ce.current.scrollWidth)},[pe]);var Ze=function(ze,it,ot,yt,ft){return S.createElement("span",{title:y(ze),className:p()("".concat(Gt,"-item"),(0,be.Z)({},"".concat(Gt,"-item-disabled"),ot))},S.createElement("span",{className:"".concat(Gt,"-item-content")},it),yt&&S.createElement(j,{className:"".concat(Gt,"-item-remove"),onMouseDown:Qe,onClick:ft,customizeIcon:Me},"\xD7"))},ke=function(ze,it,ot,yt,ft,Jt){var on=function(kn){Qe(kn),Bt(!An)};return S.createElement("span",{onMouseDown:on},st({label:it,value:ze,disabled:ot,closable:yt,onClose:ft,isMaxTag:!!Jt}))},tt=function(ze){var it=ze.disabled,ot=ze.label,yt=ze.value,ft=!Qt&&!it,Jt=ot;if(typeof St=="number"&&(typeof ot=="string"||typeof ot=="number")){var on=String(Jt);on.length>St&&(Jt="".concat(on.slice(0,St),"..."))}var En=function(Cn){Cn&&Cn.stopPropagation(),Ht(ze)};return typeof st=="function"?ke(yt,Jt,it,ft,En):Ze(ze,Jt,it,ft,En)},Je=function(ze){if(!an.length)return null;var it=typeof Wt=="function"?Wt(ze):Wt;return typeof st=="function"?ke(void 0,it,!1,!1,void 0,!0):Ze({title:it},it,!1)},at=S.createElement("div",{className:"".concat(Gt,"-search"),style:{width:Pe},onFocus:function(){Ot(!0)},onBlur:function(){Ot(!1)}},S.createElement(Z,{ref:Yt,open:An,prefixCls:Mt,id:qt,inputElement:null,disabled:Qt,autoFocus:wn,autoComplete:Un,editable:Ve,activeDescendantId:un,value:pe,onKeyDown:Bn,onMouseDown:Dn,onChange:nn,onPaste:mn,onCompositionStart:Ct,onCompositionEnd:N,onBlur:O,tabIndex:rn,attrs:(0,q.Z)(Ue,!0)}),S.createElement("span",{ref:ce,className:"".concat(Gt,"-search-mirror"),"aria-hidden":!0},pe,"\xA0")),ut=S.createElement(ge.Z,{prefixCls:"".concat(Gt,"-overflow"),data:an,renderItem:tt,renderRest:Je,suffix:at,itemKey:ue,maxCount:ct});return S.createElement("span",{className:"".concat(Gt,"-wrap")},ut,!an.length&&!pe&&S.createElement("span",{className:"".concat(Gt,"-placeholder")},Tt))},gt=et,bt=function(Ue){var qt=Ue.inputElement,Mt=Ue.prefixCls,an=Ue.id,An=Ue.inputRef,yn=Ue.disabled,gn=Ue.autoFocus,Yt=Ue.autoComplete,Tt=Ue.activeDescendantId,Qt=Ue.mode,ln=Ue.open,sn=Ue.values,wn=Ue.placeholder,Un=Ue.tabIndex,un=Ue.showSearch,rn=Ue.searchValue,Me=Ue.activeValue,ct=Ue.maxLength,St=Ue.onInputKeyDown,wt=Ue.onInputMouseDown,Wt=Ue.onInputChange,st=Ue.onInputPaste,Bt=Ue.onInputCompositionStart,Ht=Ue.onInputCompositionEnd,nn=Ue.onInputBlur,mn=Ue.title,Bn=S.useState(!1),Dn=(0,W.Z)(Bn,2),Ct=Dn[0],N=Dn[1],O=Qt==="combobox",ce=O||un,xe=sn[0],$e=rn||"";O&&Me&&!Ct&&($e=Me),S.useEffect(function(){O&&N(!1)},[O,Me]);var Pe=Qt!=="combobox"&&!ln&&!un?!1:!!$e,Xe=mn===void 0?y(xe):mn,lt=S.useMemo(function(){return xe?null:S.createElement("span",{className:"".concat(Mt,"-selection-placeholder"),style:Pe?{visibility:"hidden"}:void 0},wn)},[xe,Pe,wn,Mt]);return S.createElement("span",{className:"".concat(Mt,"-selection-wrap")},S.createElement("span",{className:"".concat(Mt,"-selection-search")},S.createElement(Z,{ref:An,prefixCls:Mt,id:an,open:ln,inputElement:qt,disabled:yn,autoFocus:gn,autoComplete:Yt,editable:ce,activeDescendantId:Tt,value:$e,onKeyDown:St,onMouseDown:wt,onChange:function(Kt){N(!0),Wt(Kt)},onPaste:st,onCompositionStart:Bt,onCompositionEnd:Ht,onBlur:nn,tabIndex:Un,attrs:(0,q.Z)(Ue,!0),maxLength:O?ct:void 0})),!O&&xe?S.createElement("span",{className:"".concat(Mt,"-selection-item"),title:Xe,style:Pe?{visibility:"hidden"}:void 0},xe.label):null,lt)},Vt=bt,Rt=function(Ue,qt){var Mt=(0,S.useRef)(null),an=(0,S.useRef)(!1),An=Ue.prefixCls,yn=Ue.open,gn=Ue.mode,Yt=Ue.showSearch,Tt=Ue.tokenWithEnter,Qt=Ue.disabled,ln=Ue.prefix,sn=Ue.autoClearSearchValue,wn=Ue.onSearch,Un=Ue.onSearchSubmit,un=Ue.onToggleOpen,rn=Ue.onInputKeyDown,Me=Ue.onInputBlur,ct=Ue.domRef;S.useImperativeHandle(qt,function(){return{focus:function(Xe){Mt.current.focus(Xe)},blur:function(){Mt.current.blur()}}});var St=R(0),wt=(0,W.Z)(St,2),Wt=wt[0],st=wt[1],Bt=function(Xe){var lt=Xe.which,Zt=Mt.current instanceof HTMLTextAreaElement;!Zt&&yn&&(lt===de.Z.UP||lt===de.Z.DOWN)&&Xe.preventDefault(),rn&&rn(Xe),lt===de.Z.ENTER&&gn==="tags"&&!an.current&&!yn&&(Un==null||Un(Xe.target.value)),!(Zt&&!yn&&~[de.Z.UP,de.Z.DOWN,de.Z.LEFT,de.Z.RIGHT].indexOf(lt))&&ie(lt)&&un(!0)},Ht=function(){st(!0)},nn=(0,S.useRef)(null),mn=function(Xe){wn(Xe,!0,an.current)!==!1&&un(!0)},Bn=function(){an.current=!0},Dn=function(Xe){an.current=!1,gn!=="combobox"&&mn(Xe.target.value)},Ct=function(Xe){var lt=Xe.target.value;if(Tt&&nn.current&&/[\r\n]/.test(nn.current)){var Zt=nn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");lt=lt.replace(Zt,nn.current)}nn.current=null,mn(lt)},N=function(Xe){var lt=Xe.clipboardData,Zt=lt==null?void 0:lt.getData("text");nn.current=Zt||""},O=function(Xe){var lt=Xe.target;if(lt!==Mt.current){var Zt=document.body.style.msTouchAction!==void 0;Zt?setTimeout(function(){Mt.current.focus()}):Mt.current.focus()}},ce=function(Xe){var lt=Wt();Xe.target!==Mt.current&&!lt&&!(gn==="combobox"&&Qt)&&Xe.preventDefault(),(gn!=="combobox"&&(!Yt||!lt)||!yn)&&(yn&&sn!==!1&&wn("",!0,!1),un())},xe={inputRef:Mt,onInputKeyDown:Bt,onInputMouseDown:Ht,onInputChange:Ct,onInputPaste:N,onInputCompositionStart:Bn,onInputCompositionEnd:Dn,onInputBlur:Me},$e=gn==="multiple"||gn==="tags"?S.createElement(gt,(0,M.Z)({},Ue,xe)):S.createElement(Vt,(0,M.Z)({},Ue,xe));return S.createElement("div",{ref:ct,className:"".concat(An,"-selector"),onClick:O,onMouseDown:ce},ln&&S.createElement("div",{className:"".concat(An,"-prefix")},ln),$e)},te=S.forwardRef(Rt),Le=te,mt=x(65352),Ne=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],It=function(Ue){var qt=Ue===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:qt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:qt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:qt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:qt,adjustY:1},htmlRegion:"scroll"}}},He=function(Ue,qt){var Mt=Ue.prefixCls,an=Ue.disabled,An=Ue.visible,yn=Ue.children,gn=Ue.popupElement,Yt=Ue.animation,Tt=Ue.transitionName,Qt=Ue.dropdownStyle,ln=Ue.dropdownClassName,sn=Ue.direction,wn=sn===void 0?"ltr":sn,Un=Ue.placement,un=Ue.builtinPlacements,rn=Ue.dropdownMatchSelectWidth,Me=Ue.dropdownRender,ct=Ue.dropdownAlign,St=Ue.getPopupContainer,wt=Ue.empty,Wt=Ue.getTriggerDOMNode,st=Ue.onPopupVisibleChange,Bt=Ue.onPopupMouseEnter,Ht=(0,d.Z)(Ue,Ne),nn="".concat(Mt,"-dropdown"),mn=gn;Me&&(mn=Me(gn));var Bn=S.useMemo(function(){return un||It(rn)},[un,rn]),Dn=Yt?"".concat(nn,"-").concat(Yt):Tt,Ct=typeof rn=="number",N=S.useMemo(function(){return Ct?null:rn===!1?"minWidth":"width"},[rn,Ct]),O=Qt;Ct&&(O=(0,we.Z)((0,we.Z)({},O),{},{width:rn}));var ce=S.useRef(null);return S.useImperativeHandle(qt,function(){return{getPopupElement:function(){var $e;return($e=ce.current)===null||$e===void 0?void 0:$e.popupElement}}}),S.createElement(mt.Z,(0,M.Z)({},Ht,{showAction:st?["click"]:[],hideAction:st?["click"]:[],popupPlacement:Un||(wn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Bn,prefixCls:nn,popupTransitionName:Dn,popup:S.createElement("div",{onMouseEnter:Bt},mn),ref:ce,stretch:N,popupAlign:ct,popupVisible:An,getPopupContainer:St,popupClassName:p()(ln,(0,be.Z)({},"".concat(nn,"-empty"),wt)),popupStyle:O,getTriggerDOMNode:Wt,onPopupVisibleChange:st}),yn)},Se=S.forwardRef(He),I=Se,g=x(68413);function v(Ge,Ue){var qt=Ge.key,Mt;return"value"in Ge&&(Mt=Ge.value),qt!=null?qt:Mt!==void 0?Mt:"rc-index-key-".concat(Ue)}function Q(Ge){return typeof Ge!="undefined"&&!Number.isNaN(Ge)}function b(Ge,Ue){var qt=Ge||{},Mt=qt.label,an=qt.value,An=qt.options,yn=qt.groupLabel,gn=Mt||(Ue?"children":"label");return{label:gn,value:an||"value",options:An||"options",groupLabel:yn||gn}}function w(Ge){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},qt=Ue.fieldNames,Mt=Ue.childrenAsData,an=[],An=b(qt,!1),yn=An.label,gn=An.value,Yt=An.options,Tt=An.groupLabel;function Qt(ln,sn){Array.isArray(ln)&&ln.forEach(function(wn){if(sn||!(Yt in wn)){var Un=wn[gn];an.push({key:v(wn,an.length),groupOption:sn,data:wn,label:wn[yn],value:Un})}else{var un=wn[Tt];un===void 0&&Mt&&(un=wn.label),an.push({key:v(wn,an.length),group:!0,data:wn,label:un}),Qt(wn[Yt],!0)}})}return Qt(Ge,!1),an}function D(Ge){var Ue=(0,we.Z)({},Ge);return"props"in Ue||Object.defineProperty(Ue,"props",{get:function(){return(0,A.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ue}}),Ue}var Ae=function(Ue,qt,Mt){if(!qt||!qt.length)return null;var an=!1,An=function gn(Yt,Tt){var Qt=(0,g.Z)(Tt),ln=Qt[0],sn=Qt.slice(1);if(!ln)return[Yt];var wn=Yt.split(ln);return an=an||wn.length>1,wn.reduce(function(Un,un){return[].concat((0,me.Z)(Un),(0,me.Z)(gn(un,sn)))},[]).filter(Boolean)},yn=An(Ue,qt);return an?typeof Mt!="undefined"?yn.slice(0,Mt):yn:null},L=S.createContext(null),oe=L;function re(Ge){var Ue=Ge.visible,qt=Ge.values;if(!Ue)return null;var Mt=50;return S.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(qt.slice(0,Mt).map(function(an){var An=an.label,yn=an.value;return["number","string"].includes((0,ye.Z)(An))?An:yn}).join(", ")),qt.length>Mt?", ...":null)}var Be=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Ce=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Ie=function(Ue){return Ue==="tags"||Ue==="multiple"},Re=S.forwardRef(function(Ge,Ue){var qt,Mt=Ge.id,an=Ge.prefixCls,An=Ge.className,yn=Ge.showSearch,gn=Ge.tagRender,Yt=Ge.direction,Tt=Ge.omitDomProps,Qt=Ge.displayValues,ln=Ge.onDisplayValuesChange,sn=Ge.emptyOptions,wn=Ge.notFoundContent,Un=wn===void 0?"Not Found":wn,un=Ge.onClear,rn=Ge.mode,Me=Ge.disabled,ct=Ge.loading,St=Ge.getInputElement,wt=Ge.getRawInputElement,Wt=Ge.open,st=Ge.defaultOpen,Bt=Ge.onDropdownVisibleChange,Ht=Ge.activeValue,nn=Ge.onActiveValueChange,mn=Ge.activeDescendantId,Bn=Ge.searchValue,Dn=Ge.autoClearSearchValue,Ct=Ge.onSearch,N=Ge.onSearchSplit,O=Ge.tokenSeparators,ce=Ge.allowClear,xe=Ge.prefix,$e=Ge.suffixIcon,Pe=Ge.clearIcon,Xe=Ge.OptionList,lt=Ge.animation,Zt=Ge.transitionName,Kt=Ge.dropdownStyle,Ot=Ge.dropdownClassName,Gt=Ge.dropdownMatchSelectWidth,pe=Ge.dropdownRender,Ve=Ge.dropdownAlign,Ze=Ge.placement,ke=Ge.builtinPlacements,tt=Ge.getPopupContainer,Je=Ge.showAction,at=Je===void 0?[]:Je,ut=Ge.onFocus,pt=Ge.onBlur,ze=Ge.onKeyUp,it=Ge.onKeyDown,ot=Ge.onMouseDown,yt=(0,d.Z)(Ge,Be),ft=Ie(rn),Jt=(yn!==void 0?yn:ft)||rn==="combobox",on=(0,we.Z)({},yt);Ce.forEach(function(Dr){delete on[Dr]}),Tt==null||Tt.forEach(function(Dr){delete on[Dr]});var En=S.useState(!1),kn=(0,W.Z)(En,2),Cn=kn[0],Rn=kn[1];S.useEffect(function(){Rn((0,B.Z)())},[]);var Pn=S.useRef(null),_n=S.useRef(null),Wn=S.useRef(null),Hn=S.useRef(null),Jn=S.useRef(null),pn=S.useRef(!1),rr=P(),hr=(0,W.Z)(rr,3),zn=hr[0],Vn=hr[1],jn=hr[2];S.useImperativeHandle(Ue,function(){var Dr,gr;return{focus:(Dr=Hn.current)===null||Dr===void 0?void 0:Dr.focus,blur:(gr=Hn.current)===null||gr===void 0?void 0:gr.blur,scrollTo:function(ai){var Wr;return(Wr=Jn.current)===null||Wr===void 0?void 0:Wr.scrollTo(ai)},nativeElement:Pn.current||_n.current}});var Fn=S.useMemo(function(){var Dr;if(rn!=="combobox")return Bn;var gr=(Dr=Qt[0])===null||Dr===void 0?void 0:Dr.value;return typeof gr=="string"||typeof gr=="number"?String(gr):""},[Bn,rn,Qt]),Yn=rn==="combobox"&&typeof St=="function"&&St()||null,Sn=typeof wt=="function"&&wt(),vr=(0,F.x1)(_n,Sn==null||(qt=Sn.props)===null||qt===void 0?void 0:qt.ref),lr=S.useState(!1),pr=(0,W.Z)(lr,2),Ir=pr[0],zr=pr[1];(0,m.Z)(function(){zr(!0)},[]);var ni=(0,G.Z)(!1,{defaultValue:st,value:Wt}),jr=(0,W.Z)(ni,2),Jr=jr[0],Yr=jr[1],cr=Ir?Jr:!1,Fr=!Un&&sn;(Me||Fr&&cr&&rn==="combobox")&&(cr=!1);var Pr=Fr?!1:cr,er=S.useCallback(function(Dr){var gr=Dr!==void 0?Dr:!cr;Me||(Yr(gr),cr!==gr&&(Bt==null||Bt(gr)))},[Me,cr,Yr,Bt]),On=S.useMemo(function(){return(O||[]).some(function(Dr){return[`
`,`\r
`].includes(Dr)})},[O]),fn=S.useContext(oe)||{},Gn=fn.maxCount,Er=fn.rawValues,Sr=function(gr,Kr,ai){if(!(ft&&Q(Gn)&&(Er==null?void 0:Er.size)>=Gn)){var Wr=!0,Qr=gr;nn==null||nn(null);var Ai=Ae(gr,O,Q(Gn)?Gn-Er.size:void 0),yi=ai?null:Ai;return rn!=="combobox"&&yi&&(Qr="",N==null||N(yi),er(!1),Wr=!1),Ct&&Fn!==Qr&&Ct(Qr,{source:Kr?"typing":"effect"}),Wr}},ii=function(gr){!gr||!gr.trim()||Ct(gr,{source:"submit"})};S.useEffect(function(){!cr&&!ft&&rn!=="combobox"&&Sr("",!1,!1)},[cr]),S.useEffect(function(){Jr&&Me&&Yr(!1),Me&&!pn.current&&Vn(!1)},[Me]);var $r=R(),Zr=(0,W.Z)($r,2),hn=Zr[0],sr=Zr[1],Cr=S.useRef(!1),_r=function(gr){var Kr=hn(),ai=gr.key,Wr=ai==="Enter";if(Wr&&(rn!=="combobox"&&gr.preventDefault(),cr||er(!0)),sr(!!Fn),ai==="Backspace"&&!Kr&&ft&&!Fn&&Qt.length){for(var Qr=(0,me.Z)(Qt),Ai=null,yi=Qr.length-1;yi>=0;yi-=1){var pi=Qr[yi];if(!pi.disabled){Qr.splice(yi,1),Ai=pi;break}}Ai&&ln(Qr,{type:"remove",values:[Ai]})}for(var Fi=arguments.length,Di=new Array(Fi>1?Fi-1:0),qi=1;qi<Fi;qi++)Di[qi-1]=arguments[qi];if(cr&&(!Wr||!Cr.current)){var Nr;Wr&&(Cr.current=!0),(Nr=Jn.current)===null||Nr===void 0||Nr.onKeyDown.apply(Nr,[gr].concat(Di))}it==null||it.apply(void 0,[gr].concat(Di))},br=function(gr){for(var Kr=arguments.length,ai=new Array(Kr>1?Kr-1:0),Wr=1;Wr<Kr;Wr++)ai[Wr-1]=arguments[Wr];if(cr){var Qr;(Qr=Jn.current)===null||Qr===void 0||Qr.onKeyUp.apply(Qr,[gr].concat(ai))}gr.key==="Enter"&&(Cr.current=!1),ze==null||ze.apply(void 0,[gr].concat(ai))},Vr=function(gr){var Kr=Qt.filter(function(ai){return ai!==gr});ln(Kr,{type:"remove",values:[gr]})},Ur=function(){Cr.current=!1},si=S.useRef(!1),Or=function(){Vn(!0),Me||(ut&&!si.current&&ut.apply(void 0,arguments),at.includes("focus")&&er(!0)),si.current=!0},ji=function(){pn.current=!0,Vn(!1,function(){si.current=!1,pn.current=!1,er(!1)}),!Me&&(Fn&&(rn==="tags"?Ct(Fn,{source:"submit"}):rn==="multiple"&&Ct("",{source:"blur"})),pt&&pt.apply(void 0,arguments))},xr=[];S.useEffect(function(){return function(){xr.forEach(function(Dr){return clearTimeout(Dr)}),xr.splice(0,xr.length)}},[]);var Ni=function(gr){var Kr,ai=gr.target,Wr=(Kr=Wn.current)===null||Kr===void 0?void 0:Kr.getPopupElement();if(Wr&&Wr.contains(ai)){var Qr=setTimeout(function(){var Fi=xr.indexOf(Qr);if(Fi!==-1&&xr.splice(Fi,1),jn(),!Cn&&!Wr.contains(document.activeElement)){var Di;(Di=Hn.current)===null||Di===void 0||Di.focus()}});xr.push(Qr)}for(var Ai=arguments.length,yi=new Array(Ai>1?Ai-1:0),pi=1;pi<Ai;pi++)yi[pi-1]=arguments[pi];ot==null||ot.apply(void 0,[gr].concat(yi))},Si=S.useState({}),hi=(0,W.Z)(Si,2),Mr=hi[1];function Yi(){Mr({})}var Ui;Sn&&(Ui=function(gr){er(gr)}),fe(function(){var Dr;return[Pn.current,(Dr=Wn.current)===null||Dr===void 0?void 0:Dr.getPopupElement()]},Pr,er,!!Sn);var Xi=S.useMemo(function(){return(0,we.Z)((0,we.Z)({},Ge),{},{notFoundContent:Un,open:cr,triggerOpen:Pr,id:Mt,showSearch:Jt,multiple:ft,toggleOpen:er})},[Ge,Un,Pr,cr,Mt,Jt,ft,er]),wi=!!$e||ct,ki;wi&&(ki=S.createElement(j,{className:p()("".concat(an,"-arrow"),(0,be.Z)({},"".concat(an,"-arrow-loading"),ct)),customizeIcon:$e,customizeIconProps:{loading:ct,searchValue:Fn,open:cr,focused:zn,showSearch:Jt}}));var Hi=function(){var gr;un==null||un(),(gr=Hn.current)===null||gr===void 0||gr.focus(),ln([],{type:"clear",values:Qt}),Sr("",!1,!1)},Ji=se(an,Hi,Qt,ce,Pe,Me,Fn,rn),fi=Ji.allowClear,Ti=Ji.clearIcon,ui=S.createElement(Xe,{ref:Jn}),oi=p()(an,An,(0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)({},"".concat(an,"-focused"),zn),"".concat(an,"-multiple"),ft),"".concat(an,"-single"),!ft),"".concat(an,"-allow-clear"),ce),"".concat(an,"-show-arrow"),wi),"".concat(an,"-disabled"),Me),"".concat(an,"-loading"),ct),"".concat(an,"-open"),cr),"".concat(an,"-customize-input"),Yn),"".concat(an,"-show-search"),Jt)),_i=S.createElement(I,{ref:Wn,disabled:Me,prefixCls:an,visible:Pr,popupElement:ui,animation:lt,transitionName:Zt,dropdownStyle:Kt,dropdownClassName:Ot,direction:Yt,dropdownMatchSelectWidth:Gt,dropdownRender:pe,dropdownAlign:Ve,placement:Ze,builtinPlacements:ke,getPopupContainer:tt,empty:sn,getTriggerDOMNode:function(gr){return _n.current||gr},onPopupVisibleChange:Ui,onPopupMouseEnter:Yi},Sn?S.cloneElement(Sn,{ref:vr}):S.createElement(Le,(0,M.Z)({},Ge,{domRef:_n,prefixCls:an,inputElement:Yn,ref:Hn,id:Mt,prefix:xe,showSearch:Jt,autoClearSearchValue:Dn,mode:rn,activeDescendantId:mn,tagRender:gn,values:Qt,open:cr,onToggleOpen:er,activeValue:Ht,searchValue:Fn,onSearch:Sr,onSearchSubmit:ii,onRemove:Vr,tokenWithEnter:On,onInputBlur:Ur}))),Ki;return Sn?Ki=_i:Ki=S.createElement("div",(0,M.Z)({className:oi},on,{ref:Pn,onMouseDown:Ni,onKeyDown:_r,onKeyUp:br,onFocus:Or,onBlur:ji}),S.createElement(re,{visible:zn&&!cr,values:Qt}),_i,ki,fi&&Ti),S.createElement(H.Provider,{value:Xi},Ki)}),ht=Re,Ye=function(){return null};Ye.isSelectOptGroup=!0;var nt=Ye,At=function(){return null};At.isSelectOption=!0;var Ut=At,Et=x(80547),vt=x(2738),tn=x(45680);function en(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Pt=["disabled","title","children","style","className"];function dn(Ge){return typeof Ge=="string"||typeof Ge=="number"}var Ln=function(Ue,qt){var Mt=X(),an=Mt.prefixCls,An=Mt.id,yn=Mt.open,gn=Mt.multiple,Yt=Mt.mode,Tt=Mt.searchValue,Qt=Mt.toggleOpen,ln=Mt.notFoundContent,sn=Mt.onPopupScroll,wn=S.useContext(oe),Un=wn.maxCount,un=wn.flattenOptions,rn=wn.onActiveValue,Me=wn.defaultActiveFirstOption,ct=wn.onSelect,St=wn.menuItemSelectedIcon,wt=wn.rawValues,Wt=wn.fieldNames,st=wn.virtual,Bt=wn.direction,Ht=wn.listHeight,nn=wn.listItemHeight,mn=wn.optionRender,Bn="".concat(an,"-item"),Dn=(0,Et.Z)(function(){return un},[yn,un],function(Je,at){return at[0]&&Je[1]!==at[1]}),Ct=S.useRef(null),N=S.useMemo(function(){return gn&&Q(Un)&&(wt==null?void 0:wt.size)>=Un},[gn,Un,wt==null?void 0:wt.size]),O=function(at){at.preventDefault()},ce=function(at){var ut;(ut=Ct.current)===null||ut===void 0||ut.scrollTo(typeof at=="number"?{index:at}:at)},xe=S.useCallback(function(Je){return Yt==="combobox"?!1:wt.has(Je)},[Yt,(0,me.Z)(wt).toString(),wt.size]),$e=function(at){for(var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,pt=Dn.length,ze=0;ze<pt;ze+=1){var it=(at+ze*ut+pt)%pt,ot=Dn[it]||{},yt=ot.group,ft=ot.data;if(!yt&&!(ft!=null&&ft.disabled)&&(xe(ft.value)||!N))return it}return-1},Pe=S.useState(function(){return $e(0)}),Xe=(0,W.Z)(Pe,2),lt=Xe[0],Zt=Xe[1],Kt=function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Zt(at);var pt={source:ut?"keyboard":"mouse"},ze=Dn[at];if(!ze){rn(null,-1,pt);return}rn(ze.value,at,pt)};(0,S.useEffect)(function(){Kt(Me!==!1?$e(0):-1)},[Dn.length,Tt]);var Ot=S.useCallback(function(Je){return Yt==="combobox"?String(Je).toLowerCase()===Tt.toLowerCase():wt.has(Je)},[Yt,Tt,(0,me.Z)(wt).toString(),wt.size]);(0,S.useEffect)(function(){var Je=setTimeout(function(){if(!gn&&yn&&wt.size===1){var ut=Array.from(wt)[0],pt=Dn.findIndex(function(ze){var it=ze.data;return it.value===ut});pt!==-1&&(Kt(pt),ce(pt))}});if(yn){var at;(at=Ct.current)===null||at===void 0||at.scrollTo(void 0)}return function(){return clearTimeout(Je)}},[yn,Tt]);var Gt=function(at){at!==void 0&&ct(at,{selected:!wt.has(at)}),gn||Qt(!1)};if(S.useImperativeHandle(qt,function(){return{onKeyDown:function(at){var ut=at.which,pt=at.ctrlKey;switch(ut){case de.Z.N:case de.Z.P:case de.Z.UP:case de.Z.DOWN:{var ze=0;if(ut===de.Z.UP?ze=-1:ut===de.Z.DOWN?ze=1:en()&&pt&&(ut===de.Z.N?ze=1:ut===de.Z.P&&(ze=-1)),ze!==0){var it=$e(lt+ze,ze);ce(it),Kt(it,!0)}break}case de.Z.TAB:case de.Z.ENTER:{var ot,yt=Dn[lt];yt&&!(yt!=null&&(ot=yt.data)!==null&&ot!==void 0&&ot.disabled)&&!N?Gt(yt.value):Gt(void 0),yn&&at.preventDefault();break}case de.Z.ESC:Qt(!1),yn&&at.stopPropagation()}},onKeyUp:function(){},scrollTo:function(at){ce(at)}}}),Dn.length===0)return S.createElement("div",{role:"listbox",id:"".concat(An,"_list"),className:"".concat(Bn,"-empty"),onMouseDown:O},ln);var pe=Object.keys(Wt).map(function(Je){return Wt[Je]}),Ve=function(at){return at.label};function Ze(Je,at){var ut=Je.group;return{role:ut?"presentation":"option",id:"".concat(An,"_list_").concat(at)}}var ke=function(at){var ut=Dn[at];if(!ut)return null;var pt=ut.data||{},ze=pt.value,it=ut.group,ot=(0,q.Z)(pt,!0),yt=Ve(ut);return ut?S.createElement("div",(0,M.Z)({"aria-label":typeof yt=="string"&&!it?yt:null},ot,{key:at},Ze(ut,at),{"aria-selected":Ot(ze)}),ze):null},tt={role:"listbox",id:"".concat(An,"_list")};return S.createElement(S.Fragment,null,st&&S.createElement("div",(0,M.Z)({},tt,{style:{height:0,width:0,overflow:"hidden"}}),ke(lt-1),ke(lt),ke(lt+1)),S.createElement(tn.Z,{itemKey:"key",ref:Ct,data:Dn,height:Ht,itemHeight:nn,fullHeight:!1,onMouseDown:O,onScroll:sn,virtual:st,direction:Bt,innerProps:st?null:tt},function(Je,at){var ut=Je.group,pt=Je.groupOption,ze=Je.data,it=Je.label,ot=Je.value,yt=ze.key;if(ut){var ft,Jt=(ft=ze.title)!==null&&ft!==void 0?ft:dn(it)?it.toString():void 0;return S.createElement("div",{className:p()(Bn,"".concat(Bn,"-group"),ze.className),title:Jt},it!==void 0?it:yt)}var on=ze.disabled,En=ze.title,kn=ze.children,Cn=ze.style,Rn=ze.className,Pn=(0,d.Z)(ze,Pt),_n=(0,vt.Z)(Pn,pe),Wn=xe(ot),Hn=on||!Wn&&N,Jn="".concat(Bn,"-option"),pn=p()(Bn,Jn,Rn,(0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)({},"".concat(Jn,"-grouped"),pt),"".concat(Jn,"-active"),lt===at&&!Hn),"".concat(Jn,"-disabled"),Hn),"".concat(Jn,"-selected"),Wn)),rr=Ve(Je),hr=!St||typeof St=="function"||Wn,zn=typeof rr=="number"?rr:rr||ot,Vn=dn(zn)?zn.toString():void 0;return En!==void 0&&(Vn=En),S.createElement("div",(0,M.Z)({},(0,q.Z)(_n),st?{}:Ze(Je,at),{"aria-selected":Ot(ot),className:pn,title:Vn,onMouseMove:function(){lt===at||Hn||Kt(at)},onClick:function(){Hn||Gt(ot)},style:Cn}),S.createElement("div",{className:"".concat(Jn,"-content")},typeof mn=="function"?mn(Je,{index:at}):zn),S.isValidElement(St)||Wn,hr&&S.createElement(j,{className:"".concat(Bn,"-option-state"),customizeIcon:St,customizeIconProps:{value:ot,disabled:Hn,isSelected:Wn}},Wn?"\u2713":null))}))},zt=S.forwardRef(Ln),cn=zt,qe=function(Ge,Ue){var qt=S.useRef({values:new Map,options:new Map}),Mt=S.useMemo(function(){var An=qt.current,yn=An.values,gn=An.options,Yt=Ge.map(function(ln){if(ln.label===void 0){var sn;return(0,we.Z)((0,we.Z)({},ln),{},{label:(sn=yn.get(ln.value))===null||sn===void 0?void 0:sn.label})}return ln}),Tt=new Map,Qt=new Map;return Yt.forEach(function(ln){Tt.set(ln.value,ln),Qt.set(ln.value,Ue.get(ln.value)||gn.get(ln.value))}),qt.current.values=Tt,qt.current.options=Qt,Yt},[Ge,Ue]),an=S.useCallback(function(An){return Ue.get(An)||qt.current.options.get(An)},[Ue]);return[Mt,an]};function Ke(Ge,Ue){return U(Ge).join("").toUpperCase().includes(Ue)}var je=function(Ge,Ue,qt,Mt,an){return S.useMemo(function(){if(!qt||Mt===!1)return Ge;var An=Ue.options,yn=Ue.label,gn=Ue.value,Yt=[],Tt=typeof Mt=="function",Qt=qt.toUpperCase(),ln=Tt?Mt:function(wn,Un){return an?Ke(Un[an],Qt):Un[An]?Ke(Un[yn!=="children"?yn:"label"],Qt):Ke(Un[gn],Qt)},sn=Tt?function(wn){return D(wn)}:function(wn){return wn};return Ge.forEach(function(wn){if(wn[An]){var Un=ln(qt,sn(wn));if(Un)Yt.push(wn);else{var un=wn[An].filter(function(rn){return ln(qt,sn(rn))});un.length&&Yt.push((0,we.Z)((0,we.Z)({},wn),{},(0,be.Z)({},An,un)))}return}ln(qt,sn(wn))&&Yt.push(wn)}),Yt},[Ge,Mt,an,qt,Ue])},le=x(69582),Ee=x(11592),ve=["children","value"],Te=["children"];function ne(Ge){var Ue=Ge,qt=Ue.key,Mt=Ue.props,an=Mt.children,An=Mt.value,yn=(0,d.Z)(Mt,ve);return(0,we.Z)({key:qt,value:An!==void 0?An:qt,children:an},yn)}function Nt(Ge){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Ee.Z)(Ge).map(function(qt,Mt){if(!S.isValidElement(qt)||!qt.type)return null;var an=qt,An=an.type.isSelectOptGroup,yn=an.key,gn=an.props,Yt=gn.children,Tt=(0,d.Z)(gn,Te);return Ue||!An?ne(qt):(0,we.Z)((0,we.Z)({key:"__RC_SELECT_GRP__".concat(yn===null?Mt:yn,"__"),label:yn},Tt),{},{options:Nt(Yt)})}).filter(function(qt){return qt})}var $t=function(Ue,qt,Mt,an,An){return S.useMemo(function(){var yn=Ue,gn=!Ue;gn&&(yn=Nt(qt));var Yt=new Map,Tt=new Map,Qt=function(wn,Un,un){un&&typeof un=="string"&&wn.set(Un[un],Un)},ln=function sn(wn){for(var Un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,un=0;un<wn.length;un+=1){var rn=wn[un];!rn[Mt.options]||Un?(Yt.set(rn[Mt.value],rn),Qt(Tt,rn,Mt.label),Qt(Tt,rn,an),Qt(Tt,rn,An)):sn(rn[Mt.options],!0)}};return ln(yn),{options:yn,valueOptions:Yt,labelOptions:Tt}},[Ue,qt,Mt,an,An])},Ft=$t;function vn(Ge){var Ue=S.useRef();Ue.current=Ge;var qt=S.useCallback(function(){return Ue.current.apply(Ue,arguments)},[]);return qt}function tr(Ge){var Ue=Ge.mode,qt=Ge.options,Mt=Ge.children,an=Ge.backfill,An=Ge.allowClear,yn=Ge.placeholder,gn=Ge.getInputElement,Yt=Ge.showSearch,Tt=Ge.onSearch,Qt=Ge.defaultOpen,ln=Ge.autoFocus,sn=Ge.labelInValue,wn=Ge.value,Un=Ge.inputValue,un=Ge.optionLabelProp,rn=isMultiple(Ue),Me=Yt!==void 0?Yt:rn||Ue==="combobox",ct=qt||convertChildrenToData(Mt);if(warning(Ue!=="tags"||ct.every(function(st){return!st.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ue==="tags"||Ue==="combobox"){var St=ct.some(function(st){return st.options?st.options.some(function(Bt){return typeof("value"in Bt?Bt.value:Bt.key)=="number"}):typeof("value"in st?st.value:st.key)=="number"});warning(!St,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ue!=="combobox"||!un,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ue==="combobox"||!an,"`backfill` only works with `combobox` mode."),warning(Ue==="combobox"||!gn,"`getInputElement` only work with `combobox` mode."),noteOnce(Ue!=="combobox"||!gn||!An||!yn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Tt&&!Me&&Ue!=="combobox"&&Ue!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Qt||ln,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),wn!=null){var wt=toArray(wn);warning(!sn||wt.every(function(st){return _typeof(st)==="object"&&("key"in st||"value"in st)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!rn||Array.isArray(wn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Mt){var Wt=null;toNodeArray(Mt).some(function(st){if(!React.isValidElement(st)||!st.type)return!1;var Bt=st,Ht=Bt.type;if(Ht.isSelectOption)return!1;if(Ht.isSelectOptGroup){var nn=toNodeArray(st.props.children).every(function(mn){return!React.isValidElement(mn)||!st.type||mn.type.isSelectOption?!0:(Wt=mn.type,!1)});return!nn}return Wt=Ht,!0}),Wt&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Wt.displayName||Wt.name||Wt,"`.")),warning(Un===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Kn(Ge,Ue){if(Ge){var qt=function Mt(an){for(var An=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yn=0;yn<an.length;yn++){var gn=an[yn];if(gn[Ue==null?void 0:Ue.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!An&&Array.isArray(gn[Ue==null?void 0:Ue.options])&&Mt(gn[Ue==null?void 0:Ue.options],!0))break}};qt(Ge)}}var Mn=null,In=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],nr=["inputValue"];function fr(Ge){return!Ge||(0,ye.Z)(Ge)!=="object"}var qn=S.forwardRef(function(Ge,Ue){var qt=Ge.id,Mt=Ge.mode,an=Ge.prefixCls,An=an===void 0?"rc-select":an,yn=Ge.backfill,gn=Ge.fieldNames,Yt=Ge.inputValue,Tt=Ge.searchValue,Qt=Ge.onSearch,ln=Ge.autoClearSearchValue,sn=ln===void 0?!0:ln,wn=Ge.onSelect,Un=Ge.onDeselect,un=Ge.dropdownMatchSelectWidth,rn=un===void 0?!0:un,Me=Ge.filterOption,ct=Ge.filterSort,St=Ge.optionFilterProp,wt=Ge.optionLabelProp,Wt=Ge.options,st=Ge.optionRender,Bt=Ge.children,Ht=Ge.defaultActiveFirstOption,nn=Ge.menuItemSelectedIcon,mn=Ge.virtual,Bn=Ge.direction,Dn=Ge.listHeight,Ct=Dn===void 0?200:Dn,N=Ge.listItemHeight,O=N===void 0?20:N,ce=Ge.labelRender,xe=Ge.value,$e=Ge.defaultValue,Pe=Ge.labelInValue,Xe=Ge.onChange,lt=Ge.maxCount,Zt=(0,d.Z)(Ge,In),Kt=(0,le.ZP)(qt),Ot=Ie(Mt),Gt=!!(!Wt&&Bt),pe=S.useMemo(function(){return Me===void 0&&Mt==="combobox"?!1:Me},[Me,Mt]),Ve=S.useMemo(function(){return b(gn,Gt)},[JSON.stringify(gn),Gt]),Ze=(0,G.Z)("",{value:Tt!==void 0?Tt:Yt,postState:function(On){return On||""}}),ke=(0,W.Z)(Ze,2),tt=ke[0],Je=ke[1],at=Ft(Wt,Bt,Ve,St,wt),ut=at.valueOptions,pt=at.labelOptions,ze=at.options,it=S.useCallback(function(er){var On=U(er);return On.map(function(fn){var Gn,Er,Sr,ii,$r;if(fr(fn))Gn=fn;else{var Zr;Sr=fn.key,Er=fn.label,Gn=(Zr=fn.value)!==null&&Zr!==void 0?Zr:Sr}var hn=ut.get(Gn);if(hn){var sr;if(Er===void 0&&(Er=hn==null?void 0:hn[wt||Ve.label]),Sr===void 0&&(Sr=(sr=hn==null?void 0:hn.key)!==null&&sr!==void 0?sr:Gn),ii=hn==null?void 0:hn.disabled,$r=hn==null?void 0:hn.title,0)var Cr}return{label:Er,value:Gn,key:Sr,disabled:ii,title:$r}})},[Ve,wt,ut]),ot=(0,G.Z)($e,{value:xe}),yt=(0,W.Z)(ot,2),ft=yt[0],Jt=yt[1],on=S.useMemo(function(){var er,On=Ot&&ft===null?[]:ft,fn=it(On);return Mt==="combobox"&&ae((er=fn[0])===null||er===void 0?void 0:er.value)?[]:fn},[ft,it,Mt,Ot]),En=qe(on,ut),kn=(0,W.Z)(En,2),Cn=kn[0],Rn=kn[1],Pn=S.useMemo(function(){if(!Mt&&Cn.length===1){var er=Cn[0];if(er.value===null&&(er.label===null||er.label===void 0))return[]}return Cn.map(function(On){var fn;return(0,we.Z)((0,we.Z)({},On),{},{label:(fn=typeof ce=="function"?ce(On):On.label)!==null&&fn!==void 0?fn:On.value})})},[Mt,Cn,ce]),_n=S.useMemo(function(){return new Set(Cn.map(function(er){return er.value}))},[Cn]);S.useEffect(function(){if(Mt==="combobox"){var er,On=(er=Cn[0])===null||er===void 0?void 0:er.value;Je(he(On)?String(On):"")}},[Cn]);var Wn=vn(function(er,On){var fn=On!=null?On:er;return(0,be.Z)((0,be.Z)({},Ve.value,er),Ve.label,fn)}),Hn=S.useMemo(function(){if(Mt!=="tags")return ze;var er=(0,me.Z)(ze),On=function(Gn){return ut.has(Gn)};return(0,me.Z)(Cn).sort(function(fn,Gn){return fn.value<Gn.value?-1:1}).forEach(function(fn){var Gn=fn.value;On(Gn)||er.push(Wn(Gn,fn.label))}),er},[Wn,ze,ut,Cn,Mt]),Jn=je(Hn,Ve,tt,pe,St),pn=S.useMemo(function(){return Mt!=="tags"||!tt||Jn.some(function(er){return er[St||"value"]===tt})||Jn.some(function(er){return er[Ve.value]===tt})?Jn:[Wn(tt)].concat((0,me.Z)(Jn))},[Wn,St,Mt,Jn,tt,Ve]),rr=function er(On){var fn=(0,me.Z)(On).sort(function(Gn,Er){return ct(Gn,Er,{searchValue:tt})});return fn.map(function(Gn){return Array.isArray(Gn.options)?(0,we.Z)((0,we.Z)({},Gn),{},{options:Gn.options.length>0?er(Gn.options):Gn.options}):Gn})},hr=S.useMemo(function(){return ct?rr(pn):pn},[pn,ct,tt]),zn=S.useMemo(function(){return w(hr,{fieldNames:Ve,childrenAsData:Gt})},[hr,Ve,Gt]),Vn=function(On){var fn=it(On);if(Jt(fn),Xe&&(fn.length!==Cn.length||fn.some(function(Sr,ii){var $r;return(($r=Cn[ii])===null||$r===void 0?void 0:$r.value)!==(Sr==null?void 0:Sr.value)}))){var Gn=Pe?fn:fn.map(function(Sr){return Sr.value}),Er=fn.map(function(Sr){return D(Rn(Sr.value))});Xe(Ot?Gn:Gn[0],Ot?Er:Er[0])}},jn=S.useState(null),Fn=(0,W.Z)(jn,2),Yn=Fn[0],Sn=Fn[1],vr=S.useState(0),lr=(0,W.Z)(vr,2),pr=lr[0],Ir=lr[1],zr=Ht!==void 0?Ht:Mt!=="combobox",ni=S.useCallback(function(er,On){var fn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Gn=fn.source,Er=Gn===void 0?"keyboard":Gn;Ir(On),yn&&Mt==="combobox"&&er!==null&&Er==="keyboard"&&Sn(String(er))},[yn,Mt]),jr=function(On,fn,Gn){var Er=function(){var Vr,Ur=Rn(On);return[Pe?{label:Ur==null?void 0:Ur[Ve.label],value:On,key:(Vr=Ur==null?void 0:Ur.key)!==null&&Vr!==void 0?Vr:On}:On,D(Ur)]};if(fn&&wn){var Sr=Er(),ii=(0,W.Z)(Sr,2),$r=ii[0],Zr=ii[1];wn($r,Zr)}else if(!fn&&Un&&Gn!=="clear"){var hn=Er(),sr=(0,W.Z)(hn,2),Cr=sr[0],_r=sr[1];Un(Cr,_r)}},Jr=vn(function(er,On){var fn,Gn=Ot?On.selected:!0;Gn?fn=Ot?[].concat((0,me.Z)(Cn),[er]):[er]:fn=Cn.filter(function(Er){return Er.value!==er}),Vn(fn),jr(er,Gn),Mt==="combobox"?Sn(""):(!Ie||sn)&&(Je(""),Sn(""))}),Yr=function(On,fn){Vn(On);var Gn=fn.type,Er=fn.values;(Gn==="remove"||Gn==="clear")&&Er.forEach(function(Sr){jr(Sr.value,!1,Gn)})},cr=function(On,fn){if(Je(On),Sn(null),fn.source==="submit"){var Gn=(On||"").trim();if(Gn){var Er=Array.from(new Set([].concat((0,me.Z)(_n),[Gn])));Vn(Er),jr(Gn,!0),Je("")}return}fn.source!=="blur"&&(Mt==="combobox"&&Vn(On),Qt==null||Qt(On))},Fr=function(On){var fn=On;Mt!=="tags"&&(fn=On.map(function(Er){var Sr=pt.get(Er);return Sr==null?void 0:Sr.value}).filter(function(Er){return Er!==void 0}));var Gn=Array.from(new Set([].concat((0,me.Z)(_n),(0,me.Z)(fn))));Vn(Gn),Gn.forEach(function(Er){jr(Er,!0)})},Pr=S.useMemo(function(){var er=mn!==!1&&rn!==!1;return(0,we.Z)((0,we.Z)({},at),{},{flattenOptions:zn,onActiveValue:ni,defaultActiveFirstOption:zr,onSelect:Jr,menuItemSelectedIcon:nn,rawValues:_n,fieldNames:Ve,virtual:er,direction:Bn,listHeight:Ct,listItemHeight:O,childrenAsData:Gt,maxCount:lt,optionRender:st})},[lt,at,zn,ni,zr,Jr,nn,_n,Ve,mn,rn,Bn,Ct,O,Gt,st]);return S.createElement(oe.Provider,{value:Pr},S.createElement(ht,(0,M.Z)({},Zt,{id:Kt,prefixCls:An,ref:Ue,omitDomProps:nr,mode:Mt,displayValues:Pn,onDisplayValuesChange:Yr,direction:Bn,searchValue:tt,onSearch:cr,autoClearSearchValue:sn,onSearchSplit:Fr,dropdownMatchSelectWidth:rn,OptionList:cn,emptyOptions:!zn.length,activeValue:Yn,activeDescendantId:"".concat(Kt,"_list_").concat(pr)})))}),ur=qn;ur.Option=Ut,ur.OptGroup=nt;var $n=ur,Nn=$n},67204:function(Zn,Dt,x){"use strict";x.d(Dt,{R:function(){return me},w:function(){return M}});var M={},me="rc-table-internal-hook"},78612:function(Zn,Dt,x){"use strict";x.d(Dt,{L:function(){return V},Z:function(){return P}});var M=x(52487),me=x(49618),be=x(80702),we=x(62853),W=x(77321),d=x(74416),ye=x(11592),G=x(48736),A=x(59301),S=x(67204),k=x(90494);function p(R){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof fe=="number"?fe:fe.endsWith("%")?R*parseFloat(fe)/100:null}function m(R,fe,de){return A.useMemo(function(){if(fe&&fe>0){var ie=0,q=0;R.forEach(function(he){var ae=p(fe,he.width);ae?ie+=ae:q+=1});var ge=Math.max(fe,de),z=Math.max(ge-ie,q),Fe=q,Z=z/q,U=0,K=R.map(function(he){var ae=(0,W.Z)({},he),_=p(fe,ae.width);if(_)ae.width=_;else{var y=Math.floor(Z);ae.width=Fe===1?z:y,z-=y,Fe-=1}return U+=ae.width,ae});if(U<ge){var ee=ge/U;z=ge,K.forEach(function(he,ae){var _=Math.floor(he.width*ee);he.width=ae===K.length-1?z:_,z-=_})}return[K,Math.max(U,ge)]}return[R,fe]},[R,fe,de])}var B=["children"],F=["fixed"];function V(R){return(0,ye.Z)(R).filter(function(fe){return A.isValidElement(fe)}).map(function(fe){var de=fe.key,ie=fe.props,q=ie.children,ge=(0,d.Z)(ie,B),z=(0,W.Z)({key:de},ge);return q&&(z.children=V(q)),z})}function j(R){return R.filter(function(fe){return fe&&(0,we.Z)(fe)==="object"&&!fe.hidden}).map(function(fe){var de=fe.children;return de&&de.length>0?(0,W.Z)((0,W.Z)({},fe),{},{children:j(de)}):fe})}function se(R){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return R.filter(function(de){return de&&(0,we.Z)(de)==="object"}).reduce(function(de,ie,q){var ge=ie.fixed,z=ge===!0?"left":ge,Fe="".concat(fe,"-").concat(q),Z=ie.children;return Z&&Z.length>0?[].concat((0,be.Z)(de),(0,be.Z)(se(Z,Fe).map(function(U){return(0,W.Z)({fixed:z},U)}))):[].concat((0,be.Z)(de),[(0,W.Z)((0,W.Z)({key:Fe},ie),{},{fixed:z})])},[])}function H(R){return R.map(function(fe){var de=fe.fixed,ie=(0,d.Z)(fe,F),q=de;return de==="left"?q="right":de==="right"&&(q="left"),(0,W.Z)({fixed:q},ie)})}function X(R,fe){var de=R.prefixCls,ie=R.columns,q=R.children,ge=R.expandable,z=R.expandedKeys,Fe=R.columnTitle,Z=R.getRowKey,U=R.onTriggerExpand,K=R.expandIcon,ee=R.rowExpandable,he=R.expandIconColumnIndex,ae=R.direction,_=R.expandRowByClick,y=R.columnWidth,Y=R.fixed,ue=R.scrollWidth,Qe=R.clientWidth,et=A.useMemo(function(){var It=ie||V(q)||[];return j(It.slice())},[ie,q]),gt=A.useMemo(function(){if(ge){var It=et.slice();if(!It.includes(S.w)){var He=he||0;He>=0&&(He||Y==="left"||!Y)&&It.splice(He,0,S.w),Y==="right"&&It.splice(et.length,0,S.w)}var Se=It.indexOf(S.w);It=It.filter(function(Q,b){return Q!==S.w||b===Se});var I=et[Se],g;Y?g=Y:g=I?I.fixed:null;var v=(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},k.v,{className:"".concat(de,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Fe),"fixed",g),"className","".concat(de,"-row-expand-icon-cell")),"width",y),"render",function(b,w,D){var Ae=Z(w,D),L=z.has(Ae),oe=ee?ee(w):!0,re=K({prefixCls:de,expanded:L,expandable:oe,record:w,onExpand:U});return _?A.createElement("span",{onClick:function(Ce){return Ce.stopPropagation()}},re):re});return It.map(function(Q){return Q===S.w?v:Q})}return et.filter(function(Q){return Q!==S.w})},[ge,et,Z,z,K,ae]),bt=A.useMemo(function(){var It=gt;return fe&&(It=fe(It)),It.length||(It=[{render:function(){return null}}]),It},[fe,gt,ae]),Vt=A.useMemo(function(){return ae==="rtl"?H(se(bt)):se(bt)},[bt,ae,ue]),Rt=A.useMemo(function(){for(var It=-1,He=Vt.length-1;He>=0;He-=1){var Se=Vt[He].fixed;if(Se==="left"||Se===!0){It=He;break}}if(It>=0)for(var I=0;I<=It;I+=1){var g=Vt[I].fixed;if(g!=="left"&&g!==!0)return!0}var v=Vt.findIndex(function(w){var D=w.fixed;return D==="right"});if(v>=0)for(var Q=v;Q<Vt.length;Q+=1){var b=Vt[Q].fixed;if(b!=="right")return!0}return!1},[Vt]),te=m(Vt,ue,Qe),Le=(0,M.Z)(te,2),mt=Le[0],Ne=Le[1];return[bt,mt,Ne,Rt]}var P=X},16596:function(Zn,Dt,x){"use strict";x.d(Dt,{w2:function(){return M.w},vP:function(){return cn.v},RQ:function(){return M.R},ER:function(){return Ae},Q$:function(){return wt},TN:function(){return Kt}});var M=x(67204),me=x(52487),be=x(6089),we=x(34280),W=x(13697),d=x(59301),ye=x(4676);function G(pe){var Ve=d.createContext(void 0),Ze=function(tt){var Je=tt.value,at=tt.children,ut=d.useRef(Je);ut.current=Je;var pt=d.useState(function(){return{getValue:function(){return ut.current},listeners:new Set}}),ze=(0,me.Z)(pt,1),it=ze[0];return(0,we.Z)(function(){(0,ye.unstable_batchedUpdates)(function(){it.listeners.forEach(function(ot){ot(Je)})})},[Je]),d.createElement(Ve.Provider,{value:it},at)};return{Context:Ve,Provider:Ze,defaultValue:pe}}function A(pe,Ve){var Ze=(0,be.Z)(typeof Ve=="function"?Ve:function(ot){if(Ve===void 0)return ot;if(!Array.isArray(Ve))return ot[Ve];var yt={};return Ve.forEach(function(ft){yt[ft]=ot[ft]}),yt}),ke=d.useContext(pe==null?void 0:pe.Context),tt=ke||{},Je=tt.listeners,at=tt.getValue,ut=d.useRef();ut.current=Ze(ke?at():pe==null?void 0:pe.defaultValue);var pt=d.useState({}),ze=(0,me.Z)(pt,2),it=ze[1];return(0,we.Z)(function(){if(!ke)return;function ot(yt){var ft=Ze(yt);(0,W.Z)(ut.current,ft,!0)||it({})}return Je.add(ot),function(){Je.delete(ot)}},[ke]),ut.current}var S=x(72308),k=x(8654);function p(){var pe=d.createContext(null);function Ve(){return d.useContext(pe)}function Ze(tt,Je){var at=(0,k.Yr)(tt),ut=function(ze,it){var ot=at?{ref:it}:{},yt=d.useRef(0),ft=d.useRef(ze),Jt=Ve();return Jt!==null?d.createElement(tt,(0,S.Z)({},ze,ot)):((!Je||Je(ft.current,ze))&&(yt.current+=1),ft.current=ze,d.createElement(pe.Provider,{value:yt.current},d.createElement(tt,(0,S.Z)({},ze,ot))))};return at?d.forwardRef(ut):ut}function ke(tt,Je){var at=(0,k.Yr)(tt),ut=function(ze,it){var ot=at?{ref:it}:{};return Ve(),d.createElement(tt,(0,S.Z)({},ze,ot))};return at?d.memo(d.forwardRef(ut),Je):d.memo(ut,Je)}return{makeImmutable:Ze,responseImmutable:ke,useImmutableMark:Ve}}var m=p(),B=m.makeImmutable,F=m.responseImmutable,V=m.useImmutableMark,j=p(),se=j.makeImmutable,H=j.responseImmutable,X=j.useImmutableMark,P=G(),R=P;function fe(pe,Ve){var Ze=React.useRef(0);Ze.current+=1;var ke=React.useRef(pe),tt=[];Object.keys(pe||{}).map(function(at){var ut;(pe==null?void 0:pe[at])!==((ut=ke.current)===null||ut===void 0?void 0:ut[at])&&tt.push(at)}),ke.current=pe;var Je=React.useRef([]);return tt.length&&(Je.current=tt),React.useDebugValue(Ze.current),React.useDebugValue(Je.current.join(", ")),Ve&&console.log("".concat(Ve,":"),Ze.current,Je.current),Ze.current}var de=null,ie=null,q=x(62853),ge=x(77321),z=x(49618),Fe=x(92310),Z=x.n(Fe),U=x(80547),K=x(97938),ee=x(48736),he=d.createContext({renderWithProps:!1}),ae=he,_="RC_TABLE_KEY";function y(pe){return pe==null?[]:Array.isArray(pe)?pe:[pe]}function Y(pe){var Ve=[],Ze={};return pe.forEach(function(ke){for(var tt=ke||{},Je=tt.key,at=tt.dataIndex,ut=Je||y(at).join("-")||_;Ze[ut];)ut="".concat(ut,"_next");Ze[ut]=!0,Ve.push(ut)}),Ve}function ue(pe){return pe!=null}function Qe(pe){return typeof pe=="number"&&!Number.isNaN(pe)}function et(pe){return pe&&(0,q.Z)(pe)==="object"&&!Array.isArray(pe)&&!d.isValidElement(pe)}function gt(pe,Ve,Ze,ke,tt,Je){var at=d.useContext(ae),ut=X(),pt=(0,U.Z)(function(){if(ue(ke))return[ke];var ze=Ve==null||Ve===""?[]:Array.isArray(Ve)?Ve:[Ve],it=(0,K.Z)(pe,ze),ot=it,yt=void 0;if(tt){var ft=tt(it,pe,Ze);et(ft)?(ot=ft.children,yt=ft.props,at.renderWithProps=!0):ot=ft}return[ot,yt]},[ut,pe,ke,Ve,tt,Ze],function(ze,it){if(Je){var ot=(0,me.Z)(ze,2),yt=ot[1],ft=(0,me.Z)(it,2),Jt=ft[1];return Je(Jt,yt)}return at.renderWithProps?!0:!(0,W.Z)(ze,it,!0)});return pt}function bt(pe,Ve,Ze,ke){var tt=pe+Ve-1;return pe<=ke&&tt>=Ze}function Vt(pe,Ve){return A(R,function(Ze){var ke=bt(pe,Ve||1,Ze.hoverStartRow,Ze.hoverEndRow);return[ke,Ze.onHover]})}var Rt=x(70425),te=function(Ve){var Ze=Ve.ellipsis,ke=Ve.rowType,tt=Ve.children,Je,at=Ze===!0?{showTitle:!0}:Ze;return at&&(at.showTitle||ke==="header")&&(typeof tt=="string"||typeof tt=="number"?Je=tt.toString():d.isValidElement(tt)&&typeof tt.props.children=="string"&&(Je=tt.props.children)),Je};function Le(pe){var Ve,Ze,ke,tt,Je,at,ut,pt,ze=pe.component,it=pe.children,ot=pe.ellipsis,yt=pe.scope,ft=pe.prefixCls,Jt=pe.className,on=pe.align,En=pe.record,kn=pe.render,Cn=pe.dataIndex,Rn=pe.renderIndex,Pn=pe.shouldCellUpdate,_n=pe.index,Wn=pe.rowType,Hn=pe.colSpan,Jn=pe.rowSpan,pn=pe.fixLeft,rr=pe.fixRight,hr=pe.firstFixLeft,zn=pe.lastFixLeft,Vn=pe.firstFixRight,jn=pe.lastFixRight,Fn=pe.appendNode,Yn=pe.additionalProps,Sn=Yn===void 0?{}:Yn,vr=pe.isSticky,lr="".concat(ft,"-cell"),pr=A(R,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Ir=pr.supportSticky,zr=pr.allColumnsFixedLeft,ni=pr.rowHoverable,jr=gt(En,Cn,Rn,it,kn,Pn),Jr=(0,me.Z)(jr,2),Yr=Jr[0],cr=Jr[1],Fr={},Pr=typeof pn=="number"&&Ir,er=typeof rr=="number"&&Ir;Pr&&(Fr.position="sticky",Fr.left=pn),er&&(Fr.position="sticky",Fr.right=rr);var On=(Ve=(Ze=(ke=cr==null?void 0:cr.colSpan)!==null&&ke!==void 0?ke:Sn.colSpan)!==null&&Ze!==void 0?Ze:Hn)!==null&&Ve!==void 0?Ve:1,fn=(tt=(Je=(at=cr==null?void 0:cr.rowSpan)!==null&&at!==void 0?at:Sn.rowSpan)!==null&&Je!==void 0?Je:Jn)!==null&&tt!==void 0?tt:1,Gn=Vt(_n,fn),Er=(0,me.Z)(Gn,2),Sr=Er[0],ii=Er[1],$r=(0,Rt.zX)(function(Vr){var Ur;En&&ii(_n,_n+fn-1),Sn==null||(Ur=Sn.onMouseEnter)===null||Ur===void 0||Ur.call(Sn,Vr)}),Zr=(0,Rt.zX)(function(Vr){var Ur;En&&ii(-1,-1),Sn==null||(Ur=Sn.onMouseLeave)===null||Ur===void 0||Ur.call(Sn,Vr)});if(On===0||fn===0)return null;var hn=(ut=Sn.title)!==null&&ut!==void 0?ut:te({rowType:Wn,ellipsis:ot,children:Yr}),sr=Z()(lr,Jt,(pt={},(0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)(pt,"".concat(lr,"-fix-left"),Pr&&Ir),"".concat(lr,"-fix-left-first"),hr&&Ir),"".concat(lr,"-fix-left-last"),zn&&Ir),"".concat(lr,"-fix-left-all"),zn&&zr&&Ir),"".concat(lr,"-fix-right"),er&&Ir),"".concat(lr,"-fix-right-first"),Vn&&Ir),"".concat(lr,"-fix-right-last"),jn&&Ir),"".concat(lr,"-ellipsis"),ot),"".concat(lr,"-with-append"),Fn),"".concat(lr,"-fix-sticky"),(Pr||er)&&vr&&Ir),(0,z.Z)(pt,"".concat(lr,"-row-hover"),!cr&&Sr)),Sn.className,cr==null?void 0:cr.className),Cr={};on&&(Cr.textAlign=on);var _r=(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({},cr==null?void 0:cr.style),Fr),Cr),Sn.style),br=Yr;return(0,q.Z)(br)==="object"&&!Array.isArray(br)&&!d.isValidElement(br)&&(br=null),ot&&(zn||Vn)&&(br=d.createElement("span",{className:"".concat(lr,"-content")},br)),d.createElement(ze,(0,S.Z)({},cr,Sn,{className:sr,style:_r,title:hn,scope:yt,onMouseEnter:ni?$r:void 0,onMouseLeave:ni?Zr:void 0,colSpan:On!==1?On:null,rowSpan:fn!==1?fn:null}),Fn,br)}var mt=d.memo(Le);function Ne(pe,Ve,Ze,ke,tt){var Je=Ze[pe]||{},at=Ze[Ve]||{},ut,pt;Je.fixed==="left"?ut=ke.left[tt==="rtl"?Ve:pe]:at.fixed==="right"&&(pt=ke.right[tt==="rtl"?pe:Ve]);var ze=!1,it=!1,ot=!1,yt=!1,ft=Ze[Ve+1],Jt=Ze[pe-1],on=ft&&!ft.fixed||Jt&&!Jt.fixed||Ze.every(function(Pn){return Pn.fixed==="left"});if(tt==="rtl"){if(ut!==void 0){var En=Jt&&Jt.fixed==="left";yt=!En&&on}else if(pt!==void 0){var kn=ft&&ft.fixed==="right";ot=!kn&&on}}else if(ut!==void 0){var Cn=ft&&ft.fixed==="left";ze=!Cn&&on}else if(pt!==void 0){var Rn=Jt&&Jt.fixed==="right";it=!Rn&&on}return{fixLeft:ut,fixRight:pt,lastFixLeft:ze,firstFixRight:it,lastFixRight:ot,firstFixLeft:yt,isSticky:ke.isSticky}}var It=d.createContext({}),He=It;function Se(pe){var Ve=pe.className,Ze=pe.index,ke=pe.children,tt=pe.colSpan,Je=tt===void 0?1:tt,at=pe.rowSpan,ut=pe.align,pt=A(R,["prefixCls","direction"]),ze=pt.prefixCls,it=pt.direction,ot=d.useContext(He),yt=ot.scrollColumnIndex,ft=ot.stickyOffsets,Jt=ot.flattenColumns,on=Ze+Je-1,En=on+1===yt?Je+1:Je,kn=Ne(Ze,Ze+En-1,Jt,ft,it);return d.createElement(mt,(0,S.Z)({className:Ve,index:Ze,component:"td",prefixCls:ze,record:null,dataIndex:null,align:ut,colSpan:En,rowSpan:at,render:function(){return ke}},kn))}var I=x(74416),g=["children"];function v(pe){var Ve=pe.children,Ze=(0,I.Z)(pe,g);return d.createElement("tr",Ze,Ve)}function Q(pe){var Ve=pe.children;return Ve}Q.Row=v,Q.Cell=Se;var b=Q;function w(pe){var Ve=pe.children,Ze=pe.stickyOffsets,ke=pe.flattenColumns,tt=A(R,"prefixCls"),Je=ke.length-1,at=ke[Je],ut=d.useMemo(function(){return{stickyOffsets:Ze,flattenColumns:ke,scrollColumnIndex:at!=null&&at.scrollbar?Je:null}},[at,ke,Je,Ze]);return d.createElement(He.Provider,{value:ut},d.createElement("tfoot",{className:"".concat(tt,"-summary")},Ve))}var D=H(w),Ae=b,L=x(29301),oe=x(29194),re=x(24514),Be=x(75152),Ce=x(26112);function Ie(pe,Ve,Ze,ke,tt,Je,at){pe.push({record:Ve,indent:Ze,index:at});var ut=Je(Ve),pt=tt==null?void 0:tt.has(ut);if(Ve&&Array.isArray(Ve[ke])&&pt)for(var ze=0;ze<Ve[ke].length;ze+=1)Ie(pe,Ve[ke][ze],Ze+1,ke,tt,Je,ze)}function Re(pe,Ve,Ze,ke){var tt=d.useMemo(function(){if(Ze!=null&&Ze.size){for(var Je=[],at=0;at<(pe==null?void 0:pe.length);at+=1){var ut=pe[at];Ie(Je,ut,0,Ve,Ze,ke,at)}return Je}return pe==null?void 0:pe.map(function(pt,ze){return{record:pt,indent:0,index:ze}})},[pe,Ve,Ze,ke]);return tt}function ht(pe,Ve,Ze,ke){var tt=A(R,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Je=tt.flattenColumns,at=tt.expandableType,ut=tt.expandedKeys,pt=tt.childrenColumnName,ze=tt.onTriggerExpand,it=tt.rowExpandable,ot=tt.onRow,yt=tt.expandRowByClick,ft=tt.rowClassName,Jt=at==="nest",on=at==="row"&&(!it||it(pe)),En=on||Jt,kn=ut&&ut.has(Ve),Cn=pt&&pe&&pe[pt],Rn=(0,Rt.zX)(ze),Pn=ot==null?void 0:ot(pe,Ze),_n=Pn==null?void 0:Pn.onClick,Wn=function(rr){yt&&En&&ze(pe,rr);for(var hr=arguments.length,zn=new Array(hr>1?hr-1:0),Vn=1;Vn<hr;Vn++)zn[Vn-1]=arguments[Vn];_n==null||_n.apply(void 0,[rr].concat(zn))},Hn;typeof ft=="string"?Hn=ft:typeof ft=="function"&&(Hn=ft(pe,Ze,ke));var Jn=Y(Je);return(0,ge.Z)((0,ge.Z)({},tt),{},{columnsKey:Jn,nestExpandable:Jt,expanded:kn,hasNestChildren:Cn,record:pe,onTriggerExpand:Rn,rowSupportExpand:on,expandable:En,rowProps:(0,ge.Z)((0,ge.Z)({},Pn),{},{className:Z()(Hn,Pn==null?void 0:Pn.className),onClick:Wn})})}function Ye(pe){var Ve=pe.prefixCls,Ze=pe.children,ke=pe.component,tt=pe.cellComponent,Je=pe.className,at=pe.expanded,ut=pe.colSpan,pt=pe.isEmpty,ze=A(R,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),it=ze.scrollbarSize,ot=ze.fixHeader,yt=ze.fixColumn,ft=ze.componentWidth,Jt=ze.horizonScroll,on=Ze;return(pt?Jt&&ft:yt)&&(on=d.createElement("div",{style:{width:ft-(ot&&!pt?it:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ve,"-expanded-row-fixed")},on)),d.createElement(ke,{className:Je,style:{display:at?null:"none"}},d.createElement(mt,{component:tt,prefixCls:Ve,colSpan:ut},on))}var nt=Ye;function At(pe){var Ve=pe.prefixCls,Ze=pe.record,ke=pe.onExpand,tt=pe.expanded,Je=pe.expandable,at="".concat(Ve,"-row-expand-icon");if(!Je)return d.createElement("span",{className:Z()(at,"".concat(Ve,"-row-spaced"))});var ut=function(ze){ke(Ze,ze),ze.stopPropagation()};return d.createElement("span",{className:Z()(at,(0,z.Z)((0,z.Z)({},"".concat(Ve,"-row-expanded"),tt),"".concat(Ve,"-row-collapsed"),!tt)),onClick:ut})}function Ut(pe,Ve,Ze){var ke=[];function tt(Je){(Je||[]).forEach(function(at,ut){ke.push(Ve(at,ut)),tt(at[Ze])})}return tt(pe),ke}function Et(pe,Ve,Ze,ke){return typeof pe=="string"?pe:typeof pe=="function"?pe(Ve,Ze,ke):""}function vt(pe,Ve,Ze,ke,tt){var Je=pe.record,at=pe.prefixCls,ut=pe.columnsKey,pt=pe.fixedInfoList,ze=pe.expandIconColumnIndex,it=pe.nestExpandable,ot=pe.indentSize,yt=pe.expandIcon,ft=pe.expanded,Jt=pe.hasNestChildren,on=pe.onTriggerExpand,En=ut[Ze],kn=pt[Ze],Cn;Ze===(ze||0)&&it&&(Cn=d.createElement(d.Fragment,null,d.createElement("span",{style:{paddingLeft:"".concat(ot*ke,"px")},className:"".concat(at,"-row-indent indent-level-").concat(ke)}),yt({prefixCls:at,expanded:ft,expandable:Jt,record:Je,onExpand:on})));var Rn;return Ve.onCell&&(Rn=Ve.onCell(Je,tt)),{key:En,fixedInfo:kn,appendCellNode:Cn,additionalCellProps:Rn||{}}}function tn(pe){var Ve=pe.className,Ze=pe.style,ke=pe.record,tt=pe.index,Je=pe.renderIndex,at=pe.rowKey,ut=pe.indent,pt=ut===void 0?0:ut,ze=pe.rowComponent,it=pe.cellComponent,ot=pe.scopeCellComponent,yt=ht(ke,at,tt,pt),ft=yt.prefixCls,Jt=yt.flattenColumns,on=yt.expandedRowClassName,En=yt.expandedRowRender,kn=yt.rowProps,Cn=yt.expanded,Rn=yt.rowSupportExpand,Pn=d.useRef(!1);Pn.current||(Pn.current=Cn);var _n=Et(on,ke,tt,pt),Wn=d.createElement(ze,(0,S.Z)({},kn,{"data-row-key":at,className:Z()(Ve,"".concat(ft,"-row"),"".concat(ft,"-row-level-").concat(pt),kn==null?void 0:kn.className,(0,z.Z)({},_n,pt>=1)),style:(0,ge.Z)((0,ge.Z)({},Ze),kn==null?void 0:kn.style)}),Jt.map(function(pn,rr){var hr=pn.render,zn=pn.dataIndex,Vn=pn.className,jn=vt(yt,pn,rr,pt,tt),Fn=jn.key,Yn=jn.fixedInfo,Sn=jn.appendCellNode,vr=jn.additionalCellProps;return d.createElement(mt,(0,S.Z)({className:Vn,ellipsis:pn.ellipsis,align:pn.align,scope:pn.rowScope,component:pn.rowScope?ot:it,prefixCls:ft,key:Fn,record:ke,index:tt,renderIndex:Je,dataIndex:zn,render:hr,shouldCellUpdate:pn.shouldCellUpdate},Yn,{appendNode:Sn,additionalProps:vr}))})),Hn;if(Rn&&(Pn.current||Cn)){var Jn=En(ke,tt,pt+1,Cn);Hn=d.createElement(nt,{expanded:Cn,className:Z()("".concat(ft,"-expanded-row"),"".concat(ft,"-expanded-row-level-").concat(pt+1),_n),prefixCls:ft,component:ze,cellComponent:it,colSpan:Jt.length,isEmpty:!1},Jn)}return d.createElement(d.Fragment,null,Wn,Hn)}var en=H(tn);function Pt(pe){var Ve=pe.columnKey,Ze=pe.onColumnResize,ke=d.useRef();return d.useEffect(function(){ke.current&&Ze(Ve,ke.current.offsetWidth)},[]),d.createElement(L.Z,{data:Ve},d.createElement("td",{ref:ke,style:{padding:0,border:0,height:0}},d.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function dn(pe){var Ve=pe.prefixCls,Ze=pe.columnsKey,ke=pe.onColumnResize;return d.createElement("tr",{"aria-hidden":"true",className:"".concat(Ve,"-measure-row"),style:{height:0,fontSize:0}},d.createElement(L.Z.Collection,{onBatchResize:function(Je){Je.forEach(function(at){var ut=at.data,pt=at.size;ke(ut,pt.offsetWidth)})}},Ze.map(function(tt){return d.createElement(Pt,{key:tt,columnKey:tt,onColumnResize:ke})})))}function Ln(pe){var Ve=pe.data,Ze=pe.measureColumnWidth,ke=A(R,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),tt=ke.prefixCls,Je=ke.getComponent,at=ke.onColumnResize,ut=ke.flattenColumns,pt=ke.getRowKey,ze=ke.expandedKeys,it=ke.childrenColumnName,ot=ke.emptyNode,yt=Re(Ve,it,ze,pt),ft=d.useRef({renderWithProps:!1}),Jt=Je(["body","wrapper"],"tbody"),on=Je(["body","row"],"tr"),En=Je(["body","cell"],"td"),kn=Je(["body","cell"],"th"),Cn;Ve.length?Cn=yt.map(function(Pn,_n){var Wn=Pn.record,Hn=Pn.indent,Jn=Pn.index,pn=pt(Wn,_n);return d.createElement(en,{key:pn,rowKey:pn,record:Wn,index:_n,renderIndex:Jn,rowComponent:on,cellComponent:En,scopeCellComponent:kn,indent:Hn})}):Cn=d.createElement(nt,{expanded:!0,className:"".concat(tt,"-placeholder"),prefixCls:tt,component:on,cellComponent:En,colSpan:ut.length,isEmpty:!0},ot);var Rn=Y(ut);return d.createElement(ae.Provider,{value:ft.current},d.createElement(Jt,{className:"".concat(tt,"-tbody")},Ze&&d.createElement(dn,{prefixCls:tt,columnsKey:Rn,onColumnResize:at}),Cn))}var zt=H(Ln),cn=x(90494),qe=["columnType"];function Ke(pe){for(var Ve=pe.colWidths,Ze=pe.columns,ke=pe.columCount,tt=A(R,["tableLayout"]),Je=tt.tableLayout,at=[],ut=ke||Ze.length,pt=!1,ze=ut-1;ze>=0;ze-=1){var it=Ve[ze],ot=Ze&&Ze[ze],yt=void 0,ft=void 0;if(ot&&(yt=ot[cn.v],Je==="auto"&&(ft=ot.minWidth)),it||ft||yt||pt){var Jt=yt||{},on=Jt.columnType,En=(0,I.Z)(Jt,qe);at.unshift(d.createElement("col",(0,S.Z)({key:ze,style:{width:it,minWidth:ft}},En))),pt=!0}}return d.createElement("colgroup",null,at)}var je=Ke,le=x(80702),Ee=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function ve(pe,Ve){return(0,d.useMemo)(function(){for(var Ze=[],ke=0;ke<Ve;ke+=1){var tt=pe[ke];if(tt!==void 0)Ze[ke]=tt;else return null}return Ze},[pe.join("_"),Ve])}var Te=d.forwardRef(function(pe,Ve){var Ze=pe.className,ke=pe.noData,tt=pe.columns,Je=pe.flattenColumns,at=pe.colWidths,ut=pe.columCount,pt=pe.stickyOffsets,ze=pe.direction,it=pe.fixHeader,ot=pe.stickyTopOffset,yt=pe.stickyBottomOffset,ft=pe.stickyClassName,Jt=pe.onScroll,on=pe.maxContentScroll,En=pe.children,kn=(0,I.Z)(pe,Ee),Cn=A(R,["prefixCls","scrollbarSize","isSticky","getComponent"]),Rn=Cn.prefixCls,Pn=Cn.scrollbarSize,_n=Cn.isSticky,Wn=Cn.getComponent,Hn=Wn(["header","table"],"table"),Jn=_n&&!it?0:Pn,pn=d.useRef(null),rr=d.useCallback(function(vr){(0,k.mH)(Ve,vr),(0,k.mH)(pn,vr)},[]);d.useEffect(function(){var vr;function lr(pr){var Ir=pr,zr=Ir.currentTarget,ni=Ir.deltaX;ni&&(Jt({currentTarget:zr,scrollLeft:zr.scrollLeft+ni}),pr.preventDefault())}return(vr=pn.current)===null||vr===void 0||vr.addEventListener("wheel",lr,{passive:!1}),function(){var pr;(pr=pn.current)===null||pr===void 0||pr.removeEventListener("wheel",lr)}},[]);var hr=d.useMemo(function(){return Je.every(function(vr){return vr.width})},[Je]),zn=Je[Je.length-1],Vn={fixed:zn?zn.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Rn,"-cell-scrollbar")}}},jn=(0,d.useMemo)(function(){return Jn?[].concat((0,le.Z)(tt),[Vn]):tt},[Jn,tt]),Fn=(0,d.useMemo)(function(){return Jn?[].concat((0,le.Z)(Je),[Vn]):Je},[Jn,Je]),Yn=(0,d.useMemo)(function(){var vr=pt.right,lr=pt.left;return(0,ge.Z)((0,ge.Z)({},pt),{},{left:ze==="rtl"?[].concat((0,le.Z)(lr.map(function(pr){return pr+Jn})),[0]):lr,right:ze==="rtl"?vr:[].concat((0,le.Z)(vr.map(function(pr){return pr+Jn})),[0]),isSticky:_n})},[Jn,pt,_n]),Sn=ve(at,ut);return d.createElement("div",{style:(0,ge.Z)({overflow:"hidden"},_n?{top:ot,bottom:yt}:{}),ref:rr,className:Z()(Ze,(0,z.Z)({},ft,!!ft))},d.createElement(Hn,{style:{tableLayout:"fixed",visibility:ke||Sn?null:"hidden"}},(!ke||!on||hr)&&d.createElement(je,{colWidths:Sn?[].concat((0,le.Z)(Sn),[Jn]):[],columCount:ut+1,columns:Fn}),En((0,ge.Z)((0,ge.Z)({},kn),{},{stickyOffsets:Yn,columns:jn,flattenColumns:Fn}))))}),ne=d.memo(Te),Nt=function(Ve){var Ze=Ve.cells,ke=Ve.stickyOffsets,tt=Ve.flattenColumns,Je=Ve.rowComponent,at=Ve.cellComponent,ut=Ve.onHeaderRow,pt=Ve.index,ze=A(R,["prefixCls","direction"]),it=ze.prefixCls,ot=ze.direction,yt;ut&&(yt=ut(Ze.map(function(Jt){return Jt.column}),pt));var ft=Y(Ze.map(function(Jt){return Jt.column}));return d.createElement(Je,yt,Ze.map(function(Jt,on){var En=Jt.column,kn=Ne(Jt.colStart,Jt.colEnd,tt,ke,ot),Cn;return En&&En.onHeaderCell&&(Cn=Jt.column.onHeaderCell(En)),d.createElement(mt,(0,S.Z)({},Jt,{scope:En.title?Jt.colSpan>1?"colgroup":"col":null,ellipsis:En.ellipsis,align:En.align,component:at,prefixCls:it,key:ft[on]},kn,{additionalProps:Cn,rowType:"header"}))}))},$t=Nt;function Ft(pe){var Ve=[];function Ze(at,ut){var pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ve[pt]=Ve[pt]||[];var ze=ut,it=at.filter(Boolean).map(function(ot){var yt={key:ot.key,className:ot.className||"",children:ot.title,column:ot,colStart:ze},ft=1,Jt=ot.children;return Jt&&Jt.length>0&&(ft=Ze(Jt,ze,pt+1).reduce(function(on,En){return on+En},0),yt.hasSubColumns=!0),"colSpan"in ot&&(ft=ot.colSpan),"rowSpan"in ot&&(yt.rowSpan=ot.rowSpan),yt.colSpan=ft,yt.colEnd=yt.colStart+ft-1,Ve[pt].push(yt),ze+=ft,ft});return it}Ze(pe,0);for(var ke=Ve.length,tt=function(ut){Ve[ut].forEach(function(pt){!("rowSpan"in pt)&&!pt.hasSubColumns&&(pt.rowSpan=ke-ut)})},Je=0;Je<ke;Je+=1)tt(Je);return Ve}var vn=function(Ve){var Ze=Ve.stickyOffsets,ke=Ve.columns,tt=Ve.flattenColumns,Je=Ve.onHeaderRow,at=A(R,["prefixCls","getComponent"]),ut=at.prefixCls,pt=at.getComponent,ze=d.useMemo(function(){return Ft(ke)},[ke]),it=pt(["header","wrapper"],"thead"),ot=pt(["header","row"],"tr"),yt=pt(["header","cell"],"th");return d.createElement(it,{className:"".concat(ut,"-thead")},ze.map(function(ft,Jt){var on=d.createElement($t,{key:Jt,flattenColumns:tt,cells:ft,stickyOffsets:Ze,rowComponent:ot,cellComponent:yt,onHeaderRow:Je,index:Jt});return on}))},tr=H(vn),Kn=x(78612);function Mn(pe,Ve,Ze){var ke=(0,cn.g)(pe),tt=ke.expandIcon,Je=ke.expandedRowKeys,at=ke.defaultExpandedRowKeys,ut=ke.defaultExpandAllRows,pt=ke.expandedRowRender,ze=ke.onExpand,it=ke.onExpandedRowsChange,ot=ke.childrenColumnName,yt=tt||At,ft=ot||"children",Jt=d.useMemo(function(){return pt?"row":pe.expandable&&pe.internalHooks===M.R&&pe.expandable.__PARENT_RENDER_ICON__||Ve.some(function(_n){return _n&&(0,q.Z)(_n)==="object"&&_n[ft]})?"nest":!1},[!!pt,Ve]),on=d.useState(function(){return at||(ut?Ut(Ve,Ze,ft):[])}),En=(0,me.Z)(on,2),kn=En[0],Cn=En[1],Rn=d.useMemo(function(){return new Set(Je||kn||[])},[Je,kn]),Pn=d.useCallback(function(_n){var Wn=Ze(_n,Ve.indexOf(_n)),Hn,Jn=Rn.has(Wn);Jn?(Rn.delete(Wn),Hn=(0,le.Z)(Rn)):Hn=[].concat((0,le.Z)(Rn),[Wn]),Cn(Hn),ze&&ze(!Jn,_n),it&&it(Hn)},[Ze,Rn,Ve,ze,it]);return[ke,Jt,Rn,yt,ft,Pn]}function In(pe,Ve,Ze){var ke=pe.map(function(tt,Je){return Ne(Je,Je,pe,Ve,Ze)});return(0,U.Z)(function(){return ke},[ke],function(tt,Je){return!(0,W.Z)(tt,Je)})}function nr(pe){var Ve=(0,d.useRef)(pe),Ze=(0,d.useState)({}),ke=(0,me.Z)(Ze,2),tt=ke[1],Je=(0,d.useRef)(null),at=(0,d.useRef)([]);function ut(pt){at.current.push(pt);var ze=Promise.resolve();Je.current=ze,ze.then(function(){if(Je.current===ze){var it=at.current,ot=Ve.current;at.current=[],it.forEach(function(yt){Ve.current=yt(Ve.current)}),Je.current=null,ot!==Ve.current&&tt({})}})}return(0,d.useEffect)(function(){return function(){Je.current=null}},[]),[Ve.current,ut]}function fr(pe){var Ve=(0,d.useRef)(pe||null),Ze=(0,d.useRef)();function ke(){window.clearTimeout(Ze.current)}function tt(at){Ve.current=at,ke(),Ze.current=window.setTimeout(function(){Ve.current=null,Ze.current=void 0},100)}function Je(){return Ve.current}return(0,d.useEffect)(function(){return ke},[]),[tt,Je]}function qn(){var pe=d.useState(-1),Ve=(0,me.Z)(pe,2),Ze=Ve[0],ke=Ve[1],tt=d.useState(-1),Je=(0,me.Z)(tt,2),at=Je[0],ut=Je[1],pt=d.useCallback(function(ze,it){ke(ze),ut(it)},[]);return[Ze,at,pt]}var ur=x(47273),$n=(0,ur.Z)()?window:null;function Nn(pe,Ve){var Ze=(0,q.Z)(pe)==="object"?pe:{},ke=Ze.offsetHeader,tt=ke===void 0?0:ke,Je=Ze.offsetSummary,at=Je===void 0?0:Je,ut=Ze.offsetScroll,pt=ut===void 0?0:ut,ze=Ze.getContainer,it=ze===void 0?function(){return $n}:ze,ot=it()||$n,yt=!!pe;return d.useMemo(function(){return{isSticky:yt,stickyClassName:yt?"".concat(Ve,"-sticky-holder"):"",offsetHeader:tt,offsetSummary:at,offsetScroll:pt,container:ot}},[yt,pt,tt,at,Ve,ot])}function Ge(pe,Ve,Ze){var ke=(0,d.useMemo)(function(){var tt=Ve.length,Je=function(ze,it,ot){for(var yt=[],ft=0,Jt=ze;Jt!==it;Jt+=ot)yt.push(ft),Ve[Jt].fixed&&(ft+=pe[Jt]||0);return yt},at=Je(0,tt,1),ut=Je(tt-1,-1,-1).reverse();return Ze==="rtl"?{left:ut,right:at}:{left:at,right:ut}},[pe,Ve,Ze]);return ke}var Ue=Ge;function qt(pe){var Ve=pe.className,Ze=pe.children;return d.createElement("div",{className:Ve},Ze)}var Mt=qt,an=x(8224),An=x(16089),yn=x(76846);function gn(pe){var Ve=(0,yn.bn)(pe),Ze=Ve.getBoundingClientRect(),ke=document.documentElement;return{left:Ze.left+(window.pageXOffset||ke.scrollLeft)-(ke.clientLeft||document.body.clientLeft||0),top:Ze.top+(window.pageYOffset||ke.scrollTop)-(ke.clientTop||document.body.clientTop||0)}}var Yt=function(Ve,Ze){var ke,tt,Je=Ve.scrollBodyRef,at=Ve.onScroll,ut=Ve.offsetScroll,pt=Ve.container,ze=Ve.direction,it=A(R,"prefixCls"),ot=((ke=Je.current)===null||ke===void 0?void 0:ke.scrollWidth)||0,yt=((tt=Je.current)===null||tt===void 0?void 0:tt.clientWidth)||0,ft=ot&&yt*(yt/ot),Jt=d.useRef(),on=nr({scrollLeft:0,isHiddenScrollBar:!0}),En=(0,me.Z)(on,2),kn=En[0],Cn=En[1],Rn=d.useRef({delta:0,x:0}),Pn=d.useState(!1),_n=(0,me.Z)(Pn,2),Wn=_n[0],Hn=_n[1],Jn=d.useRef(null);d.useEffect(function(){return function(){An.Z.cancel(Jn.current)}},[]);var pn=function(){Hn(!1)},rr=function(Fn){Fn.persist(),Rn.current.delta=Fn.pageX-kn.scrollLeft,Rn.current.x=0,Hn(!0),Fn.preventDefault()},hr=function(Fn){var Yn,Sn=Fn||((Yn=window)===null||Yn===void 0?void 0:Yn.event),vr=Sn.buttons;if(!Wn||vr===0){Wn&&Hn(!1);return}var lr=Rn.current.x+Fn.pageX-Rn.current.x-Rn.current.delta,pr=ze==="rtl";lr=Math.max(pr?ft-yt:0,Math.min(pr?0:yt-ft,lr));var Ir=!pr||Math.abs(lr)+Math.abs(ft)<yt;Ir&&(at({scrollLeft:lr/yt*(ot+2)}),Rn.current.x=Fn.pageX)},zn=function(){An.Z.cancel(Jn.current),Jn.current=(0,An.Z)(function(){if(Je.current){var Fn=gn(Je.current).top,Yn=Fn+Je.current.offsetHeight,Sn=pt===window?document.documentElement.scrollTop+window.innerHeight:gn(pt).top+pt.clientHeight;Yn-(0,Be.Z)()<=Sn||Fn>=Sn-ut?Cn(function(vr){return(0,ge.Z)((0,ge.Z)({},vr),{},{isHiddenScrollBar:!0})}):Cn(function(vr){return(0,ge.Z)((0,ge.Z)({},vr),{},{isHiddenScrollBar:!1})})}})},Vn=function(Fn){Cn(function(Yn){return(0,ge.Z)((0,ge.Z)({},Yn),{},{scrollLeft:Fn/ot*yt||0})})};return d.useImperativeHandle(Ze,function(){return{setScrollLeft:Vn,checkScrollBarVisible:zn}}),d.useEffect(function(){var jn=(0,an.Z)(document.body,"mouseup",pn,!1),Fn=(0,an.Z)(document.body,"mousemove",hr,!1);return zn(),function(){jn.remove(),Fn.remove()}},[ft,Wn]),d.useEffect(function(){if(Je.current){for(var jn=[],Fn=(0,yn.bn)(Je.current);Fn;)jn.push(Fn),Fn=Fn.parentElement;return jn.forEach(function(Yn){return Yn.addEventListener("scroll",zn,!1)}),window.addEventListener("resize",zn,!1),window.addEventListener("scroll",zn,!1),pt.addEventListener("scroll",zn,!1),function(){jn.forEach(function(Yn){return Yn.removeEventListener("scroll",zn)}),window.removeEventListener("resize",zn),window.removeEventListener("scroll",zn),pt.removeEventListener("scroll",zn)}}},[pt]),d.useEffect(function(){kn.isHiddenScrollBar||Cn(function(jn){var Fn=Je.current;return Fn?(0,ge.Z)((0,ge.Z)({},jn),{},{scrollLeft:Fn.scrollLeft/Fn.scrollWidth*Fn.clientWidth}):jn})},[kn.isHiddenScrollBar]),ot<=yt||!ft||kn.isHiddenScrollBar?null:d.createElement("div",{style:{height:(0,Be.Z)(),width:yt,bottom:ut},className:"".concat(it,"-sticky-scroll")},d.createElement("div",{onMouseDown:rr,ref:Jt,className:Z()("".concat(it,"-sticky-scroll-bar"),(0,z.Z)({},"".concat(it,"-sticky-scroll-bar-active"),Wn)),style:{width:"".concat(ft,"px"),transform:"translate3d(".concat(kn.scrollLeft,"px, 0, 0)")}}))},Tt=d.forwardRef(Yt);function Qt(pe){return null}var ln=Qt;function sn(pe){return null}var wn=sn,Un="rc-table",un=[],rn={};function Me(){return"No Data"}function ct(pe,Ve){var Ze=(0,ge.Z)({rowKey:"key",prefixCls:Un,emptyText:Me},pe),ke=Ze.prefixCls,tt=Ze.className,Je=Ze.rowClassName,at=Ze.style,ut=Ze.data,pt=Ze.rowKey,ze=Ze.scroll,it=Ze.tableLayout,ot=Ze.direction,yt=Ze.title,ft=Ze.footer,Jt=Ze.summary,on=Ze.caption,En=Ze.id,kn=Ze.showHeader,Cn=Ze.components,Rn=Ze.emptyText,Pn=Ze.onRow,_n=Ze.onHeaderRow,Wn=Ze.onScroll,Hn=Ze.internalHooks,Jn=Ze.transformColumns,pn=Ze.internalRefs,rr=Ze.tailor,hr=Ze.getContainerWidth,zn=Ze.sticky,Vn=Ze.rowHoverable,jn=Vn===void 0?!0:Vn,Fn=ut||un,Yn=!!Fn.length,Sn=Hn===M.R,vr=d.useCallback(function(Rr,kr){return(0,K.Z)(Cn,Rr)||kr},[Cn]),lr=d.useMemo(function(){return typeof pt=="function"?pt:function(Rr){var kr=Rr&&Rr[pt];return kr}},[pt]),pr=vr(["body"]),Ir=qn(),zr=(0,me.Z)(Ir,3),ni=zr[0],jr=zr[1],Jr=zr[2],Yr=Mn(Ze,Fn,lr),cr=(0,me.Z)(Yr,6),Fr=cr[0],Pr=cr[1],er=cr[2],On=cr[3],fn=cr[4],Gn=cr[5],Er=ze==null?void 0:ze.x,Sr=d.useState(0),ii=(0,me.Z)(Sr,2),$r=ii[0],Zr=ii[1],hn=(0,Kn.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({},Ze),Fr),{},{expandable:!!Fr.expandedRowRender,columnTitle:Fr.columnTitle,expandedKeys:er,getRowKey:lr,onTriggerExpand:Gn,expandIcon:On,expandIconColumnIndex:Fr.expandIconColumnIndex,direction:ot,scrollWidth:Sn&&rr&&typeof Er=="number"?Er:null,clientWidth:$r}),Sn?Jn:null),sr=(0,me.Z)(hn,4),Cr=sr[0],_r=sr[1],br=sr[2],Vr=sr[3],Ur=br!=null?br:Er,si=d.useMemo(function(){return{columns:Cr,flattenColumns:_r}},[Cr,_r]),Or=d.useRef(),ji=d.useRef(),xr=d.useRef(),Ni=d.useRef();d.useImperativeHandle(Ve,function(){return{nativeElement:Or.current,scrollTo:function(kr){var mi;if(xr.current instanceof HTMLElement){var Bi=kr.index,gi=kr.top,bs=kr.key;if(Qe(gi)){var gs;(gs=xr.current)===null||gs===void 0||gs.scrollTo({top:gi})}else{var ps,ms=bs!=null?bs:lr(Fn[Bi]);(ps=xr.current.querySelector('[data-row-key="'.concat(ms,'"]')))===null||ps===void 0||ps.scrollIntoView()}}else(mi=xr.current)!==null&&mi!==void 0&&mi.scrollTo&&xr.current.scrollTo(kr)}}});var Si=d.useRef(),hi=d.useState(!1),Mr=(0,me.Z)(hi,2),Yi=Mr[0],Ui=Mr[1],Xi=d.useState(!1),wi=(0,me.Z)(Xi,2),ki=wi[0],Hi=wi[1],Ji=nr(new Map),fi=(0,me.Z)(Ji,2),Ti=fi[0],ui=fi[1],oi=Y(_r),_i=oi.map(function(Rr){return Ti.get(Rr)}),Ki=d.useMemo(function(){return _i},[_i.join("_")]),Dr=Ue(Ki,_r,ot),gr=ze&&ue(ze.y),Kr=ze&&ue(Ur)||!!Fr.fixed,ai=Kr&&_r.some(function(Rr){var kr=Rr.fixed;return kr}),Wr=d.useRef(),Qr=Nn(zn,ke),Ai=Qr.isSticky,yi=Qr.offsetHeader,pi=Qr.offsetSummary,Fi=Qr.offsetScroll,Di=Qr.stickyClassName,qi=Qr.container,Nr=d.useMemo(function(){return Jt==null?void 0:Jt(Fn)},[Jt,Fn]),ns=(gr||Ai)&&d.isValidElement(Nr)&&Nr.type===b&&Nr.props.fixed,ws,us,rs;gr&&(us={overflowY:Yn?"scroll":"auto",maxHeight:ze.y}),Kr&&(ws={overflowX:"auto"},gr||(us={overflowY:"hidden"}),rs={width:Ur===!0?"auto":Ur,minWidth:"100%"});var Us=d.useCallback(function(Rr,kr){(0,oe.Z)(Or.current)&&ui(function(mi){if(mi.get(Rr)!==kr){var Bi=new Map(mi);return Bi.set(Rr,kr),Bi}return mi})},[]),qr=fr(null),Gr=(0,me.Z)(qr,2),Xt=Gr[0],di=Gr[1];function ci(Rr,kr){kr&&(typeof kr=="function"?kr(Rr):kr.scrollLeft!==Rr&&(kr.scrollLeft=Rr,kr.scrollLeft!==Rr&&setTimeout(function(){kr.scrollLeft=Rr},0)))}var Ii=(0,be.Z)(function(Rr){var kr=Rr.currentTarget,mi=Rr.scrollLeft,Bi=ot==="rtl",gi=typeof mi=="number"?mi:kr.scrollLeft,bs=kr||rn;if(!di()||di()===bs){var gs;Xt(bs),ci(gi,ji.current),ci(gi,xr.current),ci(gi,Si.current),ci(gi,(gs=Wr.current)===null||gs===void 0?void 0:gs.setScrollLeft)}var ps=kr||ji.current;if(ps){var ms=Sn&&rr&&typeof Ur=="number"?Ur:ps.scrollWidth,ha=ps.clientWidth;if(ms===ha){Ui(!1),Hi(!1);return}Bi?(Ui(-gi<ms-ha),Hi(-gi>0)):(Ui(gi>0),Hi(gi<ms-ha))}}),Bs=(0,be.Z)(function(Rr){Ii(Rr),Wn==null||Wn(Rr)}),cs=function(){if(Kr&&xr.current){var kr;Ii({currentTarget:(0,yn.bn)(xr.current),scrollLeft:(kr=xr.current)===null||kr===void 0?void 0:kr.scrollLeft})}else Ui(!1),Hi(!1)},ks=function(kr){var mi,Bi=kr.width;(mi=Wr.current)===null||mi===void 0||mi.checkScrollBarVisible();var gi=Or.current?Or.current.offsetWidth:Bi;Sn&&hr&&Or.current&&(gi=hr(Or.current,gi)||gi),gi!==$r&&(cs(),Zr(gi))},is=d.useRef(!1);d.useEffect(function(){is.current&&cs()},[Kr,ut,Cr.length]),d.useEffect(function(){is.current=!0},[]);var fs=d.useState(0),ss=(0,me.Z)(fs,2),Ri=ss[0],ds=ss[1],Ia=d.useState(!0),Fa=(0,me.Z)(Ia,2),Da=Fa[0],uo=Fa[1];d.useEffect(function(){(!rr||!Sn)&&(xr.current instanceof Element?ds((0,Be.o)(xr.current).width):ds((0,Be.o)(Ni.current).width)),uo((0,re.G)("position","sticky"))},[]),d.useEffect(function(){Sn&&pn&&(pn.body.current=xr.current)});var Ra=d.useCallback(function(Rr){return d.createElement(d.Fragment,null,d.createElement(tr,Rr),ns==="top"&&d.createElement(D,Rr,Nr))},[ns,Nr]),la=d.useCallback(function(Rr){return d.createElement(D,Rr,Nr)},[Nr]),Gi=vr(["table"],"table"),as=d.useMemo(function(){return it||(ai?Ur==="max-content"?"auto":"fixed":gr||Ai||_r.some(function(Rr){var kr=Rr.ellipsis;return kr})?"fixed":"auto")},[gr,ai,_r,it,Ai]),ua,hs={colWidths:Ki,columCount:_r.length,stickyOffsets:Dr,onHeaderRow:_n,fixHeader:gr,scroll:ze},ca=d.useMemo(function(){return Yn?null:typeof Rn=="function"?Rn():Rn},[Yn,Rn]),Ws=d.createElement(zt,{data:Fn,measureColumnWidth:gr||Kr||Ai}),La=d.createElement(je,{colWidths:_r.map(function(Rr){var kr=Rr.width;return kr}),columns:_r}),Ps=on!=null?d.createElement("caption",{className:"".concat(ke,"-caption")},on):void 0,zs=(0,Ce.Z)(Ze,{data:!0}),Ua=(0,Ce.Z)(Ze,{aria:!0});if(gr||Ai){var js;typeof pr=="function"?(js=pr(Fn,{scrollbarSize:Ri,ref:xr,onScroll:Ii}),hs.colWidths=_r.map(function(Rr,kr){var mi=Rr.width,Bi=kr===_r.length-1?mi-Ri:mi;return typeof Bi=="number"&&!Number.isNaN(Bi)?Bi:0})):js=d.createElement("div",{style:(0,ge.Z)((0,ge.Z)({},ws),us),onScroll:Bs,ref:xr,className:Z()("".concat(ke,"-body"))},d.createElement(Gi,(0,S.Z)({style:(0,ge.Z)((0,ge.Z)({},rs),{},{tableLayout:as})},Ua),Ps,La,Ws,!ns&&Nr&&d.createElement(D,{stickyOffsets:Dr,flattenColumns:_r},Nr)));var fa=(0,ge.Z)((0,ge.Z)((0,ge.Z)({noData:!Fn.length,maxContentScroll:Kr&&Ur==="max-content"},hs),si),{},{direction:ot,stickyClassName:Di,onScroll:Ii});ua=d.createElement(d.Fragment,null,kn!==!1&&d.createElement(ne,(0,S.Z)({},fa,{stickyTopOffset:yi,className:"".concat(ke,"-header"),ref:ji}),Ra),js,ns&&ns!=="top"&&d.createElement(ne,(0,S.Z)({},fa,{stickyBottomOffset:pi,className:"".concat(ke,"-summary"),ref:Si}),la),Ai&&xr.current&&xr.current instanceof Element&&d.createElement(Tt,{ref:Wr,offsetScroll:Fi,scrollBodyRef:xr,onScroll:Ii,container:qi,direction:ot}))}else ua=d.createElement("div",{style:(0,ge.Z)((0,ge.Z)({},ws),us),className:Z()("".concat(ke,"-content")),onScroll:Ii,ref:xr},d.createElement(Gi,(0,S.Z)({style:(0,ge.Z)((0,ge.Z)({},rs),{},{tableLayout:as})},Ua),Ps,La,kn!==!1&&d.createElement(tr,(0,S.Z)({},hs,si)),Ws,Nr&&d.createElement(D,{stickyOffsets:Dr,flattenColumns:_r},Nr)));var da=d.createElement("div",(0,S.Z)({className:Z()(ke,tt,(0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)({},"".concat(ke,"-rtl"),ot==="rtl"),"".concat(ke,"-ping-left"),Yi),"".concat(ke,"-ping-right"),ki),"".concat(ke,"-layout-fixed"),it==="fixed"),"".concat(ke,"-fixed-header"),gr),"".concat(ke,"-fixed-column"),ai),"".concat(ke,"-fixed-column-gapped"),ai&&Vr),"".concat(ke,"-scroll-horizontal"),Kr),"".concat(ke,"-has-fix-left"),_r[0]&&_r[0].fixed),"".concat(ke,"-has-fix-right"),_r[_r.length-1]&&_r[_r.length-1].fixed==="right")),style:at,id:En,ref:Or},zs),yt&&d.createElement(Mt,{className:"".concat(ke,"-title")},yt(Fn)),d.createElement("div",{ref:Ni,className:"".concat(ke,"-container")},ua),ft&&d.createElement(Mt,{className:"".concat(ke,"-footer")},ft(Fn)));Kr&&(da=d.createElement(L.Z,{onResize:ks},da));var Cs=In(_r,Dr,ot),co=d.useMemo(function(){return{scrollX:Ur,prefixCls:ke,getComponent:vr,scrollbarSize:Ri,direction:ot,fixedInfoList:Cs,isSticky:Ai,supportSticky:Da,componentWidth:$r,fixHeader:gr,fixColumn:ai,horizonScroll:Kr,tableLayout:as,rowClassName:Je,expandedRowClassName:Fr.expandedRowClassName,expandIcon:On,expandableType:Pr,expandRowByClick:Fr.expandRowByClick,expandedRowRender:Fr.expandedRowRender,onTriggerExpand:Gn,expandIconColumnIndex:Fr.expandIconColumnIndex,indentSize:Fr.indentSize,allColumnsFixedLeft:_r.every(function(Rr){return Rr.fixed==="left"}),emptyNode:ca,columns:Cr,flattenColumns:_r,onColumnResize:Us,hoverStartRow:ni,hoverEndRow:jr,onHover:Jr,rowExpandable:Fr.rowExpandable,onRow:Pn,getRowKey:lr,expandedKeys:er,childrenColumnName:fn,rowHoverable:jn}},[Ur,ke,vr,Ri,ot,Cs,Ai,Da,$r,gr,ai,Kr,as,Je,Fr.expandedRowClassName,On,Pr,Fr.expandRowByClick,Fr.expandedRowRender,Gn,Fr.expandIconColumnIndex,Fr.indentSize,ca,Cr,_r,Us,ni,jr,Jr,Fr.rowExpandable,Pn,lr,er,fn,jn]);return d.createElement(R.Provider,{value:co},da)}var St=d.forwardRef(ct);function wt(pe){return se(St,pe)}var Wt=wt();Wt.EXPAND_COLUMN=M.w,Wt.INTERNAL_HOOKS=M.R,Wt.Column=ln,Wt.ColumnGroup=wn,Wt.Summary=Ae;var st=Wt,Bt=x(45680),Ht=G(null),nn=G(null);function mn(pe,Ve,Ze){var ke=Ve||1;return Ze[pe+ke]-(Ze[pe]||0)}function Bn(pe){var Ve=pe.rowInfo,Ze=pe.column,ke=pe.colIndex,tt=pe.indent,Je=pe.index,at=pe.component,ut=pe.renderIndex,pt=pe.record,ze=pe.style,it=pe.className,ot=pe.inverse,yt=pe.getHeight,ft=Ze.render,Jt=Ze.dataIndex,on=Ze.className,En=Ze.width,kn=A(nn,["columnsOffset"]),Cn=kn.columnsOffset,Rn=vt(Ve,Ze,ke,tt,Je),Pn=Rn.key,_n=Rn.fixedInfo,Wn=Rn.appendCellNode,Hn=Rn.additionalCellProps,Jn=Hn.style,pn=Hn.colSpan,rr=pn===void 0?1:pn,hr=Hn.rowSpan,zn=hr===void 0?1:hr,Vn=ke-1,jn=mn(Vn,rr,Cn),Fn=rr>1?En-jn:0,Yn=(0,ge.Z)((0,ge.Z)((0,ge.Z)({},Jn),ze),{},{flex:"0 0 ".concat(jn,"px"),width:"".concat(jn,"px"),marginRight:Fn,pointerEvents:"auto"}),Sn=d.useMemo(function(){return ot?zn<=1:rr===0||zn===0||zn>1},[zn,rr,ot]);Sn?Yn.visibility="hidden":ot&&(Yn.height=yt==null?void 0:yt(zn));var vr=Sn?function(){return null}:ft,lr={};return(zn===0||rr===0)&&(lr.rowSpan=1,lr.colSpan=1),d.createElement(mt,(0,S.Z)({className:Z()(on,it),ellipsis:Ze.ellipsis,align:Ze.align,scope:Ze.rowScope,component:at,prefixCls:Ve.prefixCls,key:Pn,record:pt,index:Je,renderIndex:ut,dataIndex:Jt,render:vr,shouldCellUpdate:Ze.shouldCellUpdate},_n,{appendNode:Wn,additionalProps:(0,ge.Z)((0,ge.Z)({},Hn),{},{style:Yn},lr)}))}var Dn=Bn,Ct=["data","index","className","rowKey","style","extra","getHeight"],N=d.forwardRef(function(pe,Ve){var Ze=pe.data,ke=pe.index,tt=pe.className,Je=pe.rowKey,at=pe.style,ut=pe.extra,pt=pe.getHeight,ze=(0,I.Z)(pe,Ct),it=Ze.record,ot=Ze.indent,yt=Ze.index,ft=A(R,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Jt=ft.scrollX,on=ft.flattenColumns,En=ft.prefixCls,kn=ft.fixColumn,Cn=ft.componentWidth,Rn=A(Ht,["getComponent"]),Pn=Rn.getComponent,_n=ht(it,Je,ke,ot),Wn=Pn(["body","row"],"div"),Hn=Pn(["body","cell"],"div"),Jn=_n.rowSupportExpand,pn=_n.expanded,rr=_n.rowProps,hr=_n.expandedRowRender,zn=_n.expandedRowClassName,Vn;if(Jn&&pn){var jn=hr(it,ke,ot+1,pn),Fn=Et(zn,it,ke,ot),Yn={};kn&&(Yn={style:(0,z.Z)({},"--virtual-width","".concat(Cn,"px"))});var Sn="".concat(En,"-expanded-row-cell");Vn=d.createElement(Wn,{className:Z()("".concat(En,"-expanded-row"),"".concat(En,"-expanded-row-level-").concat(ot+1),Fn)},d.createElement(mt,{component:Hn,prefixCls:En,className:Z()(Sn,(0,z.Z)({},"".concat(Sn,"-fixed"),kn)),additionalProps:Yn},jn))}var vr=(0,ge.Z)((0,ge.Z)({},at),{},{width:Jt});ut&&(vr.position="absolute",vr.pointerEvents="none");var lr=d.createElement(Wn,(0,S.Z)({},rr,ze,{"data-row-key":Je,ref:Jn?null:Ve,className:Z()(tt,"".concat(En,"-row"),rr==null?void 0:rr.className,(0,z.Z)({},"".concat(En,"-row-extra"),ut)),style:(0,ge.Z)((0,ge.Z)({},vr),rr==null?void 0:rr.style)}),on.map(function(pr,Ir){return d.createElement(Dn,{key:Ir,component:Hn,rowInfo:_n,column:pr,colIndex:Ir,indent:ot,index:ke,renderIndex:yt,record:it,inverse:ut,getHeight:pt})}));return Jn?d.createElement("div",{ref:Ve},lr,Vn):lr}),O=H(N),ce=O,xe=d.forwardRef(function(pe,Ve){var Ze=pe.data,ke=pe.onScroll,tt=A(R,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Je=tt.flattenColumns,at=tt.onColumnResize,ut=tt.getRowKey,pt=tt.expandedKeys,ze=tt.prefixCls,it=tt.childrenColumnName,ot=tt.scrollX,yt=tt.direction,ft=A(Ht),Jt=ft.sticky,on=ft.scrollY,En=ft.listItemHeight,kn=ft.getComponent,Cn=ft.onScroll,Rn=d.useRef(),Pn=Re(Ze,it,pt,ut),_n=d.useMemo(function(){var Vn=0;return Je.map(function(jn){var Fn=jn.width,Yn=jn.key;return Vn+=Fn,[Yn,Fn,Vn]})},[Je]),Wn=d.useMemo(function(){return _n.map(function(Vn){return Vn[2]})},[_n]);d.useEffect(function(){_n.forEach(function(Vn){var jn=(0,me.Z)(Vn,2),Fn=jn[0],Yn=jn[1];at(Fn,Yn)})},[_n]),d.useImperativeHandle(Ve,function(){var Vn,jn={scrollTo:function(Yn){var Sn;(Sn=Rn.current)===null||Sn===void 0||Sn.scrollTo(Yn)},nativeElement:(Vn=Rn.current)===null||Vn===void 0?void 0:Vn.nativeElement};return Object.defineProperty(jn,"scrollLeft",{get:function(){var Yn;return((Yn=Rn.current)===null||Yn===void 0?void 0:Yn.getScrollInfo().x)||0},set:function(Yn){var Sn;(Sn=Rn.current)===null||Sn===void 0||Sn.scrollTo({left:Yn})}}),jn});var Hn=function(jn,Fn){var Yn,Sn=(Yn=Pn[Fn])===null||Yn===void 0?void 0:Yn.record,vr=jn.onCell;if(vr){var lr,pr=vr(Sn,Fn);return(lr=pr==null?void 0:pr.rowSpan)!==null&&lr!==void 0?lr:1}return 1},Jn=function(jn){var Fn=jn.start,Yn=jn.end,Sn=jn.getSize,vr=jn.offsetY;if(Yn<0)return null;for(var lr=Je.filter(function(On){return Hn(On,Fn)===0}),pr=Fn,Ir=function(fn){if(lr=lr.filter(function(Gn){return Hn(Gn,fn)===0}),!lr.length)return pr=fn,1},zr=Fn;zr>=0&&!Ir(zr);zr-=1);for(var ni=Je.filter(function(On){return Hn(On,Yn)!==1}),jr=Yn,Jr=function(fn){if(ni=ni.filter(function(Gn){return Hn(Gn,fn)!==1}),!ni.length)return jr=Math.max(fn-1,Yn),1},Yr=Yn;Yr<Pn.length&&!Jr(Yr);Yr+=1);for(var cr=[],Fr=function(fn){var Gn=Pn[fn];if(!Gn)return 1;Je.some(function(Er){return Hn(Er,fn)>1})&&cr.push(fn)},Pr=pr;Pr<=jr;Pr+=1)Fr(Pr);var er=cr.map(function(On){var fn=Pn[On],Gn=ut(fn.record,On),Er=function($r){var Zr=On+$r-1,hn=ut(Pn[Zr].record,Zr),sr=Sn(Gn,hn);return sr.bottom-sr.top},Sr=Sn(Gn);return d.createElement(ce,{key:On,data:fn,rowKey:Gn,index:On,style:{top:-vr+Sr.top},extra:!0,getHeight:Er})});return er},pn=d.useMemo(function(){return{columnsOffset:Wn}},[Wn]),rr="".concat(ze,"-tbody"),hr=kn(["body","wrapper"]),zn={};return Jt&&(zn.position="sticky",zn.bottom=0,(0,q.Z)(Jt)==="object"&&Jt.offsetScroll&&(zn.bottom=Jt.offsetScroll)),d.createElement(nn.Provider,{value:pn},d.createElement(Bt.Z,{fullHeight:!1,ref:Rn,prefixCls:"".concat(rr,"-virtual"),styles:{horizontalScrollBar:zn},className:rr,height:on,itemHeight:En||24,data:Pn,itemKey:function(jn){return ut(jn.record)},component:hr,scrollWidth:ot,direction:yt,onVirtualScroll:function(jn){var Fn,Yn=jn.x;ke({currentTarget:(Fn=Rn.current)===null||Fn===void 0?void 0:Fn.nativeElement,scrollLeft:Yn})},onScroll:Cn,extraRender:Jn},function(Vn,jn,Fn){var Yn=ut(Vn.record,jn);return d.createElement(ce,{data:Vn,rowKey:Yn,index:jn,style:Fn.style})}))}),$e=H(xe),Pe=$e,Xe=function(Ve,Ze){var ke=Ze.ref,tt=Ze.onScroll;return d.createElement(Pe,{ref:ke,data:Ve,onScroll:tt})};function lt(pe,Ve){var Ze=pe.data,ke=pe.columns,tt=pe.scroll,Je=pe.sticky,at=pe.prefixCls,ut=at===void 0?Un:at,pt=pe.className,ze=pe.listItemHeight,it=pe.components,ot=pe.onScroll,yt=tt||{},ft=yt.x,Jt=yt.y;typeof ft!="number"&&(ft=1),typeof Jt!="number"&&(Jt=500);var on=(0,Rt.zX)(function(Cn,Rn){return(0,K.Z)(it,Cn)||Rn}),En=(0,Rt.zX)(ot),kn=d.useMemo(function(){return{sticky:Je,scrollY:Jt,listItemHeight:ze,getComponent:on,onScroll:En}},[Je,Jt,ze,on,En]);return d.createElement(Ht.Provider,{value:kn},d.createElement(st,(0,S.Z)({},pe,{className:Z()(pt,"".concat(ut,"-virtual")),scroll:(0,ge.Z)((0,ge.Z)({},tt),{},{x:ft}),components:(0,ge.Z)((0,ge.Z)({},it),{},{body:Ze!=null&&Ze.length?Xe:void 0}),columns:ke,internalHooks:M.R,tailor:!0,ref:Ve})))}var Zt=d.forwardRef(lt);function Kt(pe){return se(Zt,pe)}var Ot=Kt(),Gt=null},90494:function(Zn,Dt,x){"use strict";x.d(Dt,{g:function(){return d},v:function(){return W}});var M=x(77321),me=x(74416),be=x(48736),we=["expandable"],W="RC_TABLE_INTERNAL_COL_DEFINE";function d(ye){var G=ye.expandable,A=(0,me.Z)(ye,we),S;return"expandable"in ye?S=(0,M.Z)((0,M.Z)({},A),G):S=A,S.showExpandColumn===!1&&(S.expandIconColumnIndex=-1),S}},22711:function(Zn,Dt,x){"use strict";x.r(Dt),x.d(Dt,{ResizableTextArea:function(){return Fe},default:function(){return ee}});var M=x(72308),me=x(49618),be=x(77321),we=x(80702),W=x(52487),d=x(74416),ye=x(92310),G=x.n(ye),A=x(36901),S=x(66003),k=x(30292),p=x(18929),m=x(59301),B=x(62853),F=x(29301),V=x(34280),j=x(16089),se=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,H=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],X={},P;function R(he){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=he.getAttribute("id")||he.getAttribute("data-reactid")||he.getAttribute("name");if(ae&&X[_])return X[_];var y=window.getComputedStyle(he),Y=y.getPropertyValue("box-sizing")||y.getPropertyValue("-moz-box-sizing")||y.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(y.getPropertyValue("padding-bottom"))+parseFloat(y.getPropertyValue("padding-top")),Qe=parseFloat(y.getPropertyValue("border-bottom-width"))+parseFloat(y.getPropertyValue("border-top-width")),et=H.map(function(bt){return"".concat(bt,":").concat(y.getPropertyValue(bt))}).join(";"),gt={sizingStyle:et,paddingSize:ue,borderSize:Qe,boxSizing:Y};return ae&&_&&(X[_]=gt),gt}function fe(he){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),P.setAttribute("name","hiddenTextarea"),document.body.appendChild(P)),he.getAttribute("wrap")?P.setAttribute("wrap",he.getAttribute("wrap")):P.removeAttribute("wrap");var Y=R(he,ae),ue=Y.paddingSize,Qe=Y.borderSize,et=Y.boxSizing,gt=Y.sizingStyle;P.setAttribute("style","".concat(gt,";").concat(se)),P.value=he.value||he.placeholder||"";var bt=void 0,Vt=void 0,Rt,te=P.scrollHeight;if(et==="border-box"?te+=Qe:et==="content-box"&&(te-=ue),_!==null||y!==null){P.value=" ";var Le=P.scrollHeight-ue;_!==null&&(bt=Le*_,et==="border-box"&&(bt=bt+ue+Qe),te=Math.max(bt,te)),y!==null&&(Vt=Le*y,et==="border-box"&&(Vt=Vt+ue+Qe),Rt=te>Vt?"":"hidden",te=Math.min(Vt,te))}var mt={height:te,overflowY:Rt,resize:"none"};return bt&&(mt.minHeight=bt),Vt&&(mt.maxHeight=Vt),mt}var de=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ie=0,q=1,ge=2,z=m.forwardRef(function(he,ae){var _=he,y=_.prefixCls,Y=_.defaultValue,ue=_.value,Qe=_.autoSize,et=_.onResize,gt=_.className,bt=_.style,Vt=_.disabled,Rt=_.onChange,te=_.onInternalAutoSize,Le=(0,d.Z)(_,de),mt=(0,p.Z)(Y,{value:ue,postState:function(tn){return tn!=null?tn:""}}),Ne=(0,W.Z)(mt,2),It=Ne[0],He=Ne[1],Se=function(tn){He(tn.target.value),Rt==null||Rt(tn)},I=m.useRef();m.useImperativeHandle(ae,function(){return{textArea:I.current}});var g=m.useMemo(function(){return Qe&&(0,B.Z)(Qe)==="object"?[Qe.minRows,Qe.maxRows]:[]},[Qe]),v=(0,W.Z)(g,2),Q=v[0],b=v[1],w=!!Qe,D=function(){try{if(document.activeElement===I.current){var tn=I.current,en=tn.selectionStart,Pt=tn.selectionEnd,dn=tn.scrollTop;I.current.setSelectionRange(en,Pt),I.current.scrollTop=dn}}catch(Ln){}},Ae=m.useState(ge),L=(0,W.Z)(Ae,2),oe=L[0],re=L[1],Be=m.useState(),Ce=(0,W.Z)(Be,2),Ie=Ce[0],Re=Ce[1],ht=function(){re(ie)};(0,V.Z)(function(){w&&ht()},[ue,Q,b,w]),(0,V.Z)(function(){if(oe===ie)re(q);else if(oe===q){var vt=fe(I.current,!1,Q,b);re(ge),Re(vt)}else D()},[oe]);var Ye=m.useRef(),nt=function(){j.Z.cancel(Ye.current)},At=function(tn){oe===ge&&(et==null||et(tn),Qe&&(nt(),Ye.current=(0,j.Z)(function(){ht()})))};m.useEffect(function(){return nt},[]);var Ut=w?Ie:null,Et=(0,be.Z)((0,be.Z)({},bt),Ut);return(oe===ie||oe===q)&&(Et.overflowY="hidden",Et.overflowX="hidden"),m.createElement(F.Z,{onResize:At,disabled:!(Qe||et)},m.createElement("textarea",(0,M.Z)({},Le,{ref:I,style:Et,className:G()(y,gt,(0,me.Z)({},"".concat(y,"-disabled"),Vt)),disabled:Vt,value:It,onChange:Se})))}),Fe=z,Z=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],U=m.forwardRef(function(he,ae){var _,y=he.defaultValue,Y=he.value,ue=he.onFocus,Qe=he.onBlur,et=he.onChange,gt=he.allowClear,bt=he.maxLength,Vt=he.onCompositionStart,Rt=he.onCompositionEnd,te=he.suffix,Le=he.prefixCls,mt=Le===void 0?"rc-textarea":Le,Ne=he.showCount,It=he.count,He=he.className,Se=he.style,I=he.disabled,g=he.hidden,v=he.classNames,Q=he.styles,b=he.onResize,w=he.onClear,D=he.onPressEnter,Ae=he.readOnly,L=he.autoSize,oe=he.onKeyDown,re=(0,d.Z)(he,Z),Be=(0,p.Z)(y,{value:Y,defaultValue:y}),Ce=(0,W.Z)(Be,2),Ie=Ce[0],Re=Ce[1],ht=Ie==null?"":String(Ie),Ye=m.useState(!1),nt=(0,W.Z)(Ye,2),At=nt[0],Ut=nt[1],Et=m.useRef(!1),vt=m.useState(null),tn=(0,W.Z)(vt,2),en=tn[0],Pt=tn[1],dn=(0,m.useRef)(null),Ln=(0,m.useRef)(null),zt=function(){var Ge;return(Ge=Ln.current)===null||Ge===void 0?void 0:Ge.textArea},cn=function(){zt().focus()};(0,m.useImperativeHandle)(ae,function(){var Nn;return{resizableTextArea:Ln.current,focus:cn,blur:function(){zt().blur()},nativeElement:((Nn=dn.current)===null||Nn===void 0?void 0:Nn.nativeElement)||zt()}}),(0,m.useEffect)(function(){Ut(function(Nn){return!I&&Nn})},[I]);var qe=m.useState(null),Ke=(0,W.Z)(qe,2),je=Ke[0],le=Ke[1];m.useEffect(function(){if(je){var Nn;(Nn=zt()).setSelectionRange.apply(Nn,(0,we.Z)(je))}},[je]);var Ee=(0,S.Z)(It,Ne),ve=(_=Ee.max)!==null&&_!==void 0?_:bt,Te=Number(ve)>0,ne=Ee.strategy(ht),Nt=!!ve&&ne>ve,$t=function(Ge,Ue){var qt=Ue;!Et.current&&Ee.exceedFormatter&&Ee.max&&Ee.strategy(Ue)>Ee.max&&(qt=Ee.exceedFormatter(Ue,{max:Ee.max}),Ue!==qt&&le([zt().selectionStart||0,zt().selectionEnd||0])),Re(qt),(0,k.rJ)(Ge.currentTarget,Ge,et,qt)},Ft=function(Ge){Et.current=!0,Vt==null||Vt(Ge)},vn=function(Ge){Et.current=!1,$t(Ge,Ge.currentTarget.value),Rt==null||Rt(Ge)},tr=function(Ge){$t(Ge,Ge.target.value)},Kn=function(Ge){Ge.key==="Enter"&&D&&D(Ge),oe==null||oe(Ge)},Mn=function(Ge){Ut(!0),ue==null||ue(Ge)},In=function(Ge){Ut(!1),Qe==null||Qe(Ge)},nr=function(Ge){Re(""),cn(),(0,k.rJ)(zt(),Ge,et)},fr=te,qn;Ee.show&&(Ee.showFormatter?qn=Ee.showFormatter({value:ht,count:ne,maxLength:ve}):qn="".concat(ne).concat(Te?" / ".concat(ve):""),fr=m.createElement(m.Fragment,null,fr,m.createElement("span",{className:G()("".concat(mt,"-data-count"),v==null?void 0:v.count),style:Q==null?void 0:Q.count},qn)));var ur=function(Ge){var Ue;b==null||b(Ge),(Ue=zt())!==null&&Ue!==void 0&&Ue.style.height&&Pt(!0)},$n=!L&&!Ne&&!gt;return m.createElement(A.BaseInput,{ref:dn,value:ht,allowClear:gt,handleReset:nr,suffix:fr,prefixCls:mt,classNames:(0,be.Z)((0,be.Z)({},v),{},{affixWrapper:G()(v==null?void 0:v.affixWrapper,(0,me.Z)((0,me.Z)({},"".concat(mt,"-show-count"),Ne),"".concat(mt,"-textarea-allow-clear"),gt))}),disabled:I,focused:At,className:G()(He,Nt&&"".concat(mt,"-out-of-range")),style:(0,be.Z)((0,be.Z)({},Se),en&&!$n?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof qn=="string"?qn:void 0}},hidden:g,readOnly:Ae,onClear:w},m.createElement(Fe,(0,M.Z)({},re,{autoSize:L,maxLength:bt,onKeyDown:Kn,onChange:tr,onFocus:Mn,onBlur:In,onCompositionStart:Ft,onCompositionEnd:vn,className:G()(v==null?void 0:v.textarea),style:(0,be.Z)((0,be.Z)({},Q==null?void 0:Q.textarea),{},{resize:Se==null?void 0:Se.resize}),disabled:I,prefixCls:mt,onResize:ur,ref:Ln,readOnly:Ae})))}),K=U,ee=K},29125:function(Zn,Dt,x){"use strict";x.d(Dt,{G:function(){return we},Z:function(){return se}});var M=x(92310),me=x.n(M),be=x(59301);function we(H){var X=H.children,P=H.prefixCls,R=H.id,fe=H.overlayInnerStyle,de=H.bodyClassName,ie=H.className,q=H.style;return be.createElement("div",{className:me()("".concat(P,"-content"),ie),style:q},be.createElement("div",{className:me()("".concat(P,"-inner"),de),id:R,role:"tooltip",style:fe},typeof X=="function"?X():X))}var W=x(72308),d=x(77321),ye=x(74416),G=x(65352),A={shiftX:64,adjustY:1},S={adjustX:1,shiftY:!0},k=[0,0],p={left:{points:["cr","cl"],overflow:S,offset:[-4,0],targetOffset:k},right:{points:["cl","cr"],overflow:S,offset:[4,0],targetOffset:k},top:{points:["bc","tc"],overflow:A,offset:[0,-4],targetOffset:k},bottom:{points:["tc","bc"],overflow:A,offset:[0,4],targetOffset:k},topLeft:{points:["bl","tl"],overflow:A,offset:[0,-4],targetOffset:k},leftTop:{points:["tr","tl"],overflow:S,offset:[-4,0],targetOffset:k},topRight:{points:["br","tr"],overflow:A,offset:[0,-4],targetOffset:k},rightTop:{points:["tl","tr"],overflow:S,offset:[4,0],targetOffset:k},bottomRight:{points:["tr","br"],overflow:A,offset:[0,4],targetOffset:k},rightBottom:{points:["bl","br"],overflow:S,offset:[4,0],targetOffset:k},bottomLeft:{points:["tl","bl"],overflow:A,offset:[0,4],targetOffset:k},leftBottom:{points:["br","bl"],overflow:S,offset:[-4,0],targetOffset:k}},m=null,B=x(80402),F=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],V=function(X,P){var R=X.overlayClassName,fe=X.trigger,de=fe===void 0?["hover"]:fe,ie=X.mouseEnterDelay,q=ie===void 0?0:ie,ge=X.mouseLeaveDelay,z=ge===void 0?.1:ge,Fe=X.overlayStyle,Z=X.prefixCls,U=Z===void 0?"rc-tooltip":Z,K=X.children,ee=X.onVisibleChange,he=X.afterVisibleChange,ae=X.transitionName,_=X.animation,y=X.motion,Y=X.placement,ue=Y===void 0?"right":Y,Qe=X.align,et=Qe===void 0?{}:Qe,gt=X.destroyTooltipOnHide,bt=gt===void 0?!1:gt,Vt=X.defaultVisible,Rt=X.getTooltipContainer,te=X.overlayInnerStyle,Le=X.arrowContent,mt=X.overlay,Ne=X.id,It=X.showArrow,He=It===void 0?!0:It,Se=X.classNames,I=X.styles,g=(0,ye.Z)(X,F),v=(0,B.Z)(Ne),Q=(0,be.useRef)(null);(0,be.useImperativeHandle)(P,function(){return Q.current});var b=(0,d.Z)({},g);"visible"in X&&(b.popupVisible=X.visible);var w=function(){return be.createElement(we,{key:"content",prefixCls:U,id:v,bodyClassName:Se==null?void 0:Se.body,overlayInnerStyle:(0,d.Z)((0,d.Z)({},te),I==null?void 0:I.body)},mt)},D=function(){var L=be.Children.only(K),oe=(L==null?void 0:L.props)||{},re=(0,d.Z)((0,d.Z)({},oe),{},{"aria-describedby":mt?v:null});return be.cloneElement(K,re)};return be.createElement(G.Z,(0,W.Z)({popupClassName:me()(R,Se==null?void 0:Se.root),prefixCls:U,popup:w,action:de,builtinPlacements:p,popupPlacement:ue,ref:Q,popupAlign:et,getPopupContainer:Rt,onPopupVisibleChange:ee,afterPopupVisibleChange:he,popupTransitionName:ae,popupAnimation:_,popupMotion:y,defaultPopupVisible:Vt,autoDestroy:bt,mouseLeaveDelay:z,popupStyle:(0,d.Z)((0,d.Z)({},Fe),I==null?void 0:I.root),mouseEnterDelay:q,arrow:He},b),D())},j=(0,be.forwardRef)(V),se=j},639:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return X}});var M=x(72308),me=x(49618),be=x(77321),we=x(52487),W=x(74416),d=x(59301),ye=x(92310),G=x.n(ye),A=x(26112),S=x(30699),k=function(R){for(var fe=R.prefixCls,de=R.level,ie=R.isStart,q=R.isEnd,ge="".concat(fe,"-indent-unit"),z=[],Fe=0;Fe<de;Fe+=1)z.push(d.createElement("span",{key:Fe,className:G()(ge,(0,me.Z)((0,me.Z)({},"".concat(ge,"-start"),ie[Fe]),"".concat(ge,"-end"),q[Fe]))}));return d.createElement("span",{"aria-hidden":"true",className:"".concat(fe,"-indent")},z)},p=d.memo(k),m=x(65065),B=x(34061),F=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],V="open",j="close",se="---",H=function(R){var fe,de,ie,q=R.eventKey,ge=R.className,z=R.style,Fe=R.dragOver,Z=R.dragOverGapTop,U=R.dragOverGapBottom,K=R.isLeaf,ee=R.isStart,he=R.isEnd,ae=R.expanded,_=R.selected,y=R.checked,Y=R.halfChecked,ue=R.loading,Qe=R.domRef,et=R.active,gt=R.data,bt=R.onMouseMove,Vt=R.selectable,Rt=(0,W.Z)(R,F),te=d.useContext(S.k),Le=d.useContext(S.y),mt=d.useRef(null),Ne=d.useState(!1),It=(0,we.Z)(Ne,2),He=It[0],Se=It[1],I=!!(te.disabled||R.disabled||(fe=Le.nodeDisabled)!==null&&fe!==void 0&&fe.call(Le,gt)),g=d.useMemo(function(){return!te.checkable||R.checkable===!1?!1:te.checkable},[te.checkable,R.checkable]),v=function(ne){I||te.onNodeSelect(ne,(0,B.F)(R))},Q=function(ne){I||!g||R.disableCheckbox||te.onNodeCheck(ne,(0,B.F)(R),!y)},b=d.useMemo(function(){return typeof Vt=="boolean"?Vt:te.selectable},[Vt,te.selectable]),w=function(ne){te.onNodeClick(ne,(0,B.F)(R)),b?v(ne):Q(ne)},D=function(ne){te.onNodeDoubleClick(ne,(0,B.F)(R))},Ae=function(ne){te.onNodeMouseEnter(ne,(0,B.F)(R))},L=function(ne){te.onNodeMouseLeave(ne,(0,B.F)(R))},oe=function(ne){te.onNodeContextMenu(ne,(0,B.F)(R))},re=d.useMemo(function(){return!!(te.draggable&&(!te.draggable.nodeDraggable||te.draggable.nodeDraggable(gt)))},[te.draggable,gt]),Be=function(ne){ne.stopPropagation(),Se(!0),te.onNodeDragStart(ne,R);try{ne.dataTransfer.setData("text/plain","")}catch(Nt){}},Ce=function(ne){ne.preventDefault(),ne.stopPropagation(),te.onNodeDragEnter(ne,R)},Ie=function(ne){ne.preventDefault(),ne.stopPropagation(),te.onNodeDragOver(ne,R)},Re=function(ne){ne.stopPropagation(),te.onNodeDragLeave(ne,R)},ht=function(ne){ne.stopPropagation(),Se(!1),te.onNodeDragEnd(ne,R)},Ye=function(ne){ne.preventDefault(),ne.stopPropagation(),Se(!1),te.onNodeDrop(ne,R)},nt=function(ne){ue||te.onNodeExpand(ne,(0,B.F)(R))},At=d.useMemo(function(){var Te=(0,m.Z)(te.keyEntities,q)||{},ne=Te.children;return!!(ne||[]).length},[te.keyEntities,q]),Ut=d.useMemo(function(){return K===!1?!1:K||!te.loadData&&!At||te.loadData&&R.loaded&&!At},[K,te.loadData,At,R.loaded]);d.useEffect(function(){ue||typeof te.loadData=="function"&&ae&&!Ut&&!R.loaded&&te.onNodeLoad((0,B.F)(R))},[ue,te.loadData,te.onNodeLoad,ae,Ut,R]);var Et=d.useMemo(function(){var Te;return(Te=te.draggable)!==null&&Te!==void 0&&Te.icon?d.createElement("span",{className:"".concat(te.prefixCls,"-draggable-icon")},te.draggable.icon):null},[te.draggable]),vt=function(ne){var Nt=R.switcherIcon||te.switcherIcon;return typeof Nt=="function"?Nt((0,be.Z)((0,be.Z)({},R),{},{isLeaf:ne})):Nt},tn=function(){if(Ut){var ne=vt(!0);return ne!==!1?d.createElement("span",{className:G()("".concat(te.prefixCls,"-switcher"),"".concat(te.prefixCls,"-switcher-noop"))},ne):null}var Nt=vt(!1);return Nt!==!1?d.createElement("span",{onClick:nt,className:G()("".concat(te.prefixCls,"-switcher"),"".concat(te.prefixCls,"-switcher_").concat(ae?V:j))},Nt):null},en=d.useMemo(function(){if(!g)return null;var Te=typeof g!="boolean"?g:null;return d.createElement("span",{className:G()("".concat(te.prefixCls,"-checkbox"),(0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(te.prefixCls,"-checkbox-checked"),y),"".concat(te.prefixCls,"-checkbox-indeterminate"),!y&&Y),"".concat(te.prefixCls,"-checkbox-disabled"),I||R.disableCheckbox)),onClick:Q,role:"checkbox","aria-checked":Y?"mixed":y,"aria-disabled":I||R.disableCheckbox,"aria-label":"Select ".concat(typeof R.title=="string"?R.title:"tree node")},Te)},[g,y,Y,I,R.disableCheckbox,R.title]),Pt=d.useMemo(function(){return Ut?null:ae?V:j},[Ut,ae]),dn=d.useMemo(function(){return d.createElement("span",{className:G()("".concat(te.prefixCls,"-iconEle"),"".concat(te.prefixCls,"-icon__").concat(Pt||"docu"),(0,me.Z)({},"".concat(te.prefixCls,"-icon_loading"),ue))})},[te.prefixCls,Pt,ue]),Ln=d.useMemo(function(){var Te=!!te.draggable,ne=!R.disabled&&Te&&te.dragOverNodeKey===q;return ne?te.dropIndicatorRender({dropPosition:te.dropPosition,dropLevelOffset:te.dropLevelOffset,indent:te.indent,prefixCls:te.prefixCls,direction:te.direction}):null},[te.dropPosition,te.dropLevelOffset,te.indent,te.prefixCls,te.direction,te.draggable,te.dragOverNodeKey,te.dropIndicatorRender]),zt=d.useMemo(function(){var Te=R.title,ne=Te===void 0?se:Te,Nt="".concat(te.prefixCls,"-node-content-wrapper"),$t;if(te.showIcon){var Ft=R.icon||te.icon;$t=Ft?d.createElement("span",{className:G()("".concat(te.prefixCls,"-iconEle"),"".concat(te.prefixCls,"-icon__customize"))},typeof Ft=="function"?Ft(R):Ft):dn}else te.loadData&&ue&&($t=dn);var vn;return typeof ne=="function"?vn=ne(gt):te.titleRender?vn=te.titleRender(gt):vn=ne,d.createElement("span",{ref:mt,title:typeof ne=="string"?ne:"",className:G()(Nt,"".concat(Nt,"-").concat(Pt||"normal"),(0,me.Z)({},"".concat(te.prefixCls,"-node-selected"),!I&&(_||He))),onMouseEnter:Ae,onMouseLeave:L,onContextMenu:oe,onClick:w,onDoubleClick:D},$t,d.createElement("span",{className:"".concat(te.prefixCls,"-title")},vn),Ln)},[te.prefixCls,te.showIcon,R,te.icon,dn,te.titleRender,gt,Pt,Ae,L,oe,w,D]),cn=(0,A.Z)(Rt,{aria:!0,data:!0}),qe=(0,m.Z)(te.keyEntities,q)||{},Ke=qe.level,je=he[he.length-1],le=!I&&re,Ee=te.draggingNodeKey===q,ve=Vt!==void 0?{"aria-selected":!!Vt}:void 0;return d.createElement("div",(0,M.Z)({ref:Qe,role:"treeitem","aria-expanded":K?void 0:ae,className:G()(ge,"".concat(te.prefixCls,"-treenode"),(ie={},(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)(ie,"".concat(te.prefixCls,"-treenode-disabled"),I),"".concat(te.prefixCls,"-treenode-switcher-").concat(ae?"open":"close"),!K),"".concat(te.prefixCls,"-treenode-checkbox-checked"),y),"".concat(te.prefixCls,"-treenode-checkbox-indeterminate"),Y),"".concat(te.prefixCls,"-treenode-selected"),_),"".concat(te.prefixCls,"-treenode-loading"),ue),"".concat(te.prefixCls,"-treenode-active"),et),"".concat(te.prefixCls,"-treenode-leaf-last"),je),"".concat(te.prefixCls,"-treenode-draggable"),re),"dragging",Ee),(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)(ie,"drop-target",te.dropTargetKey===q),"drop-container",te.dropContainerKey===q),"drag-over",!I&&Fe),"drag-over-gap-top",!I&&Z),"drag-over-gap-bottom",!I&&U),"filter-node",(de=te.filterTreeNode)===null||de===void 0?void 0:de.call(te,(0,B.F)(R))),"".concat(te.prefixCls,"-treenode-leaf"),Ut))),style:z,draggable:le,onDragStart:le?Be:void 0,onDragEnter:re?Ce:void 0,onDragOver:re?Ie:void 0,onDragLeave:re?Re:void 0,onDrop:re?Ye:void 0,onDragEnd:re?ht:void 0,onMouseMove:bt},ve,cn),d.createElement(p,{prefixCls:te.prefixCls,level:Ke,isStart:ee,isEnd:he}),Et,tn(),en,zt)};H.isTreeNode=1;var X=H},30699:function(Zn,Dt,x){"use strict";x.d(Dt,{k:function(){return me},y:function(){return be}});var M=x(59301),me=M.createContext(null),be=M.createContext({})},15018:function(Zn,Dt,x){"use strict";x.d(Dt,{OF:function(){return q.Z},y6:function(){return j.y},ZP:function(){return I}});var M=x(72308),me=x(62853),be=x(77321),we=x(80702),W=x(96949),d=x(55090),ye=x(80237),G=x(77205),A=x(38793),S=x(49618),k=x(92310),p=x.n(k),m=x(10228),B=x(26112),F=x(48736),V=x(59301),j=x(30699),se=function(v){var Q=v.dropPosition,b=v.dropLevelOffset,w=v.indent,D={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Q){case-1:D.top=0,D.left=-b*w;break;case 1:D.bottom=0,D.left=-b*w;break;case 0:D.bottom=0,D.left=w;break}return V.createElement("div",{style:D})},H=se;function X(g){if(g==null)throw new TypeError("Cannot destructure "+g)}var P=x(52487),R=x(74416),fe=x(34280),de=x(45680),ie=x(77900),q=x(639);function ge(g,v){var Q=V.useState(!1),b=(0,P.Z)(Q,2),w=b[0],D=b[1];(0,fe.Z)(function(){if(w)return g(),function(){v()}},[w]),(0,fe.Z)(function(){return D(!0),function(){D(!1)}},[])}var z=ge,Fe=x(34061),Z=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],U=V.forwardRef(function(g,v){var Q=g.className,b=g.style,w=g.motion,D=g.motionNodes,Ae=g.motionType,L=g.onMotionStart,oe=g.onMotionEnd,re=g.active,Be=g.treeNodeRequiredProps,Ce=(0,R.Z)(g,Z),Ie=V.useState(!0),Re=(0,P.Z)(Ie,2),ht=Re[0],Ye=Re[1],nt=V.useContext(j.k),At=nt.prefixCls,Ut=D&&Ae!=="hide";(0,fe.Z)(function(){D&&Ut!==ht&&Ye(Ut)},[D]);var Et=function(){D&&L()},vt=V.useRef(!1),tn=function(){D&&!vt.current&&(vt.current=!0,oe())};z(Et,tn);var en=function(dn){Ut===dn&&tn()};return D?V.createElement(ie.default,(0,M.Z)({ref:v,visible:ht},w,{motionAppear:Ae==="show",onVisibleChanged:en}),function(Pt,dn){var Ln=Pt.className,zt=Pt.style;return V.createElement("div",{ref:dn,className:p()("".concat(At,"-treenode-motion"),Ln),style:zt},D.map(function(cn){var qe=Object.assign({},(X(cn.data),cn.data)),Ke=cn.title,je=cn.key,le=cn.isStart,Ee=cn.isEnd;delete qe.children;var ve=(0,Fe.H8)(je,Be);return V.createElement(q.Z,(0,M.Z)({},qe,ve,{title:Ke,active:re,data:cn.data,key:je,isStart:le,isEnd:Ee}))}))}):V.createElement(q.Z,(0,M.Z)({domRef:v,className:Q,style:b},Ce,{active:re}))}),K=U;function ee(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Q=g.length,b=v.length;if(Math.abs(Q-b)!==1)return{add:!1,key:null};function w(D,Ae){var L=new Map;D.forEach(function(re){L.set(re,!0)});var oe=Ae.filter(function(re){return!L.has(re)});return oe.length===1?oe[0]:null}return Q<b?{add:!0,key:w(g,v)}:{add:!1,key:w(v,g)}}function he(g,v,Q){var b=g.findIndex(function(L){return L.key===Q}),w=g[b+1],D=v.findIndex(function(L){return L.key===Q});if(w){var Ae=v.findIndex(function(L){return L.key===w.key});return v.slice(D+1,Ae)}return v.slice(D+1)}var ae=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],_={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},y=function(){},Y="RC_TREE_MOTION_".concat(Math.random()),ue={key:Y},Qe={key:Y,level:0,index:0,pos:"0",node:ue,nodes:[ue]},et={parent:null,children:[],pos:Qe.pos,data:ue,title:null,key:Y,isStart:[],isEnd:[]};function gt(g,v,Q,b){return v===!1||!Q?g:g.slice(0,Math.ceil(Q/b)+1)}function bt(g){var v=g.key,Q=g.pos;return(0,Fe.km)(v,Q)}function Vt(g){for(var v=String(g.data.key),Q=g;Q.parent;)Q=Q.parent,v="".concat(Q.data.key," > ").concat(v);return v}var Rt=V.forwardRef(function(g,v){var Q=g.prefixCls,b=g.data,w=g.selectable,D=g.checkable,Ae=g.expandedKeys,L=g.selectedKeys,oe=g.checkedKeys,re=g.loadedKeys,Be=g.loadingKeys,Ce=g.halfCheckedKeys,Ie=g.keyEntities,Re=g.disabled,ht=g.dragging,Ye=g.dragOverNodeKey,nt=g.dropPosition,At=g.motion,Ut=g.height,Et=g.itemHeight,vt=g.virtual,tn=g.scrollWidth,en=g.focusable,Pt=g.activeItem,dn=g.focused,Ln=g.tabIndex,zt=g.onKeyDown,cn=g.onFocus,qe=g.onBlur,Ke=g.onActiveChange,je=g.onListChangeStart,le=g.onListChangeEnd,Ee=(0,R.Z)(g,ae),ve=V.useRef(null),Te=V.useRef(null);V.useImperativeHandle(v,function(){return{scrollTo:function(Qt){ve.current.scrollTo(Qt)},getIndentWidth:function(){return Te.current.offsetWidth}}});var ne=V.useState(Ae),Nt=(0,P.Z)(ne,2),$t=Nt[0],Ft=Nt[1],vn=V.useState(b),tr=(0,P.Z)(vn,2),Kn=tr[0],Mn=tr[1],In=V.useState(b),nr=(0,P.Z)(In,2),fr=nr[0],qn=nr[1],ur=V.useState([]),$n=(0,P.Z)(ur,2),Nn=$n[0],Ge=$n[1],Ue=V.useState(null),qt=(0,P.Z)(Ue,2),Mt=qt[0],an=qt[1],An=V.useRef(b);An.current=b;function yn(){var Tt=An.current;Mn(Tt),qn(Tt),Ge([]),an(null),le()}(0,fe.Z)(function(){Ft(Ae);var Tt=ee($t,Ae);if(Tt.key!==null)if(Tt.add){var Qt=Kn.findIndex(function(rn){var Me=rn.key;return Me===Tt.key}),ln=gt(he(Kn,b,Tt.key),vt,Ut,Et),sn=Kn.slice();sn.splice(Qt+1,0,et),qn(sn),Ge(ln),an("show")}else{var wn=b.findIndex(function(rn){var Me=rn.key;return Me===Tt.key}),Un=gt(he(b,Kn,Tt.key),vt,Ut,Et),un=b.slice();un.splice(wn+1,0,et),qn(un),Ge(Un),an("hide")}else Kn!==b&&(Mn(b),qn(b))},[Ae,b]),V.useEffect(function(){ht||yn()},[ht]);var gn=At?fr:b,Yt={expandedKeys:Ae,selectedKeys:L,loadedKeys:re,loadingKeys:Be,checkedKeys:oe,halfCheckedKeys:Ce,dragOverNodeKey:Ye,dropPosition:nt,keyEntities:Ie};return V.createElement(V.Fragment,null,dn&&Pt&&V.createElement("span",{style:_,"aria-live":"assertive"},Vt(Pt)),V.createElement("div",null,V.createElement("input",{style:_,disabled:en===!1||Re,tabIndex:en!==!1?Ln:null,onKeyDown:zt,onFocus:cn,onBlur:qe,value:"",onChange:y,"aria-label":"for screen reader"})),V.createElement("div",{className:"".concat(Q,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},V.createElement("div",{className:"".concat(Q,"-indent")},V.createElement("div",{ref:Te,className:"".concat(Q,"-indent-unit")}))),V.createElement(de.Z,(0,M.Z)({},Ee,{data:gn,itemKey:bt,height:Ut,fullHeight:!1,virtual:vt,itemHeight:Et,scrollWidth:tn,prefixCls:"".concat(Q,"-list"),ref:ve,role:"tree",onVisibleChange:function(Qt){Qt.every(function(ln){return bt(ln)!==Y})&&yn()}}),function(Tt){var Qt=Tt.pos,ln=Object.assign({},(X(Tt.data),Tt.data)),sn=Tt.title,wn=Tt.key,Un=Tt.isStart,un=Tt.isEnd,rn=(0,Fe.km)(wn,Qt);delete ln.key,delete ln.children;var Me=(0,Fe.H8)(rn,Yt);return V.createElement(K,(0,M.Z)({},ln,Me,{title:sn,active:!!Pt&&wn===Pt.key,pos:Qt,data:Tt.data,isStart:Un,isEnd:un,motion:At,motionNodes:wn===Y?Nn:null,motionType:Mt,onMotionStart:je,onMotionEnd:yn,treeNodeRequiredProps:Yt,onMouseMove:function(){Ke(null)}}))}))}),te=Rt,Le=x(82661),mt=x(34643),Ne=x(65065),It=10,He=function(g){(0,G.Z)(Q,g);var v=(0,A.Z)(Q);function Q(){var b;(0,W.Z)(this,Q);for(var w=arguments.length,D=new Array(w),Ae=0;Ae<w;Ae++)D[Ae]=arguments[Ae];return b=v.call.apply(v,[this].concat(D)),(0,S.Z)((0,ye.Z)(b),"destroyed",!1),(0,S.Z)((0,ye.Z)(b),"delayedDragEnterLogic",void 0),(0,S.Z)((0,ye.Z)(b),"loadingRetryTimes",{}),(0,S.Z)((0,ye.Z)(b),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Fe.w$)()}),(0,S.Z)((0,ye.Z)(b),"dragStartMousePosition",null),(0,S.Z)((0,ye.Z)(b),"dragNodeProps",null),(0,S.Z)((0,ye.Z)(b),"currentMouseOverDroppableNodeKey",null),(0,S.Z)((0,ye.Z)(b),"listRef",V.createRef()),(0,S.Z)((0,ye.Z)(b),"onNodeDragStart",function(L,oe){var re=b.state,Be=re.expandedKeys,Ce=re.keyEntities,Ie=b.props.onDragStart,Re=oe.eventKey;b.dragNodeProps=oe,b.dragStartMousePosition={x:L.clientX,y:L.clientY};var ht=(0,Le._5)(Be,Re);b.setState({draggingNodeKey:Re,dragChildrenKeys:(0,Le.wA)(Re,Ce),indent:b.listRef.current.getIndentWidth()}),b.setExpandedKeys(ht),window.addEventListener("dragend",b.onWindowDragEnd),Ie==null||Ie({event:L,node:(0,Fe.F)(oe)})}),(0,S.Z)((0,ye.Z)(b),"onNodeDragEnter",function(L,oe){var re=b.state,Be=re.expandedKeys,Ce=re.keyEntities,Ie=re.dragChildrenKeys,Re=re.flattenNodes,ht=re.indent,Ye=b.props,nt=Ye.onDragEnter,At=Ye.onExpand,Ut=Ye.allowDrop,Et=Ye.direction,vt=oe.pos,tn=oe.eventKey;if(b.currentMouseOverDroppableNodeKey!==tn&&(b.currentMouseOverDroppableNodeKey=tn),!b.dragNodeProps){b.resetDragState();return}var en=(0,Le.OM)(L,b.dragNodeProps,oe,ht,b.dragStartMousePosition,Ut,Re,Ce,Be,Et),Pt=en.dropPosition,dn=en.dropLevelOffset,Ln=en.dropTargetKey,zt=en.dropContainerKey,cn=en.dropTargetPos,qe=en.dropAllowed,Ke=en.dragOverNodeKey;if(Ie.includes(Ln)||!qe){b.resetDragState();return}if(b.delayedDragEnterLogic||(b.delayedDragEnterLogic={}),Object.keys(b.delayedDragEnterLogic).forEach(function(je){clearTimeout(b.delayedDragEnterLogic[je])}),b.dragNodeProps.eventKey!==oe.eventKey&&(L.persist(),b.delayedDragEnterLogic[vt]=window.setTimeout(function(){if(b.state.draggingNodeKey!==null){var je=(0,we.Z)(Be),le=(0,Ne.Z)(Ce,oe.eventKey);le&&(le.children||[]).length&&(je=(0,Le.L0)(Be,oe.eventKey)),b.props.hasOwnProperty("expandedKeys")||b.setExpandedKeys(je),At==null||At(je,{node:(0,Fe.F)(oe),expanded:!0,nativeEvent:L.nativeEvent})}},800)),b.dragNodeProps.eventKey===Ln&&dn===0){b.resetDragState();return}b.setState({dragOverNodeKey:Ke,dropPosition:Pt,dropLevelOffset:dn,dropTargetKey:Ln,dropContainerKey:zt,dropTargetPos:cn,dropAllowed:qe}),nt==null||nt({event:L,node:(0,Fe.F)(oe),expandedKeys:Be})}),(0,S.Z)((0,ye.Z)(b),"onNodeDragOver",function(L,oe){var re=b.state,Be=re.dragChildrenKeys,Ce=re.flattenNodes,Ie=re.keyEntities,Re=re.expandedKeys,ht=re.indent,Ye=b.props,nt=Ye.onDragOver,At=Ye.allowDrop,Ut=Ye.direction;if(b.dragNodeProps){var Et=(0,Le.OM)(L,b.dragNodeProps,oe,ht,b.dragStartMousePosition,At,Ce,Ie,Re,Ut),vt=Et.dropPosition,tn=Et.dropLevelOffset,en=Et.dropTargetKey,Pt=Et.dropContainerKey,dn=Et.dropTargetPos,Ln=Et.dropAllowed,zt=Et.dragOverNodeKey;Be.includes(en)||!Ln||(b.dragNodeProps.eventKey===en&&tn===0?b.state.dropPosition===null&&b.state.dropLevelOffset===null&&b.state.dropTargetKey===null&&b.state.dropContainerKey===null&&b.state.dropTargetPos===null&&b.state.dropAllowed===!1&&b.state.dragOverNodeKey===null||b.resetDragState():vt===b.state.dropPosition&&tn===b.state.dropLevelOffset&&en===b.state.dropTargetKey&&Pt===b.state.dropContainerKey&&dn===b.state.dropTargetPos&&Ln===b.state.dropAllowed&&zt===b.state.dragOverNodeKey||b.setState({dropPosition:vt,dropLevelOffset:tn,dropTargetKey:en,dropContainerKey:Pt,dropTargetPos:dn,dropAllowed:Ln,dragOverNodeKey:zt}),nt==null||nt({event:L,node:(0,Fe.F)(oe)}))}}),(0,S.Z)((0,ye.Z)(b),"onNodeDragLeave",function(L,oe){b.currentMouseOverDroppableNodeKey===oe.eventKey&&!L.currentTarget.contains(L.relatedTarget)&&(b.resetDragState(),b.currentMouseOverDroppableNodeKey=null);var re=b.props.onDragLeave;re==null||re({event:L,node:(0,Fe.F)(oe)})}),(0,S.Z)((0,ye.Z)(b),"onWindowDragEnd",function(L){b.onNodeDragEnd(L,null,!0),window.removeEventListener("dragend",b.onWindowDragEnd)}),(0,S.Z)((0,ye.Z)(b),"onNodeDragEnd",function(L,oe){var re=b.props.onDragEnd;b.setState({dragOverNodeKey:null}),b.cleanDragState(),re==null||re({event:L,node:(0,Fe.F)(oe)}),b.dragNodeProps=null,window.removeEventListener("dragend",b.onWindowDragEnd)}),(0,S.Z)((0,ye.Z)(b),"onNodeDrop",function(L,oe){var re,Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ce=b.state,Ie=Ce.dragChildrenKeys,Re=Ce.dropPosition,ht=Ce.dropTargetKey,Ye=Ce.dropTargetPos,nt=Ce.dropAllowed;if(nt){var At=b.props.onDrop;if(b.setState({dragOverNodeKey:null}),b.cleanDragState(),ht!==null){var Ut=(0,be.Z)((0,be.Z)({},(0,Fe.H8)(ht,b.getTreeNodeRequiredProps())),{},{active:((re=b.getActiveItem())===null||re===void 0?void 0:re.key)===ht,data:(0,Ne.Z)(b.state.keyEntities,ht).node}),Et=Ie.includes(ht);(0,F.ZP)(!Et,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var vt=(0,Le.yx)(Ye),tn={event:L,node:(0,Fe.F)(Ut),dragNode:b.dragNodeProps?(0,Fe.F)(b.dragNodeProps):null,dragNodesKeys:[b.dragNodeProps.eventKey].concat(Ie),dropToGap:Re!==0,dropPosition:Re+Number(vt[vt.length-1])};Be||At==null||At(tn),b.dragNodeProps=null}}}),(0,S.Z)((0,ye.Z)(b),"cleanDragState",function(){var L=b.state.draggingNodeKey;L!==null&&b.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),b.dragStartMousePosition=null,b.currentMouseOverDroppableNodeKey=null}),(0,S.Z)((0,ye.Z)(b),"triggerExpandActionExpand",function(L,oe){var re=b.state,Be=re.expandedKeys,Ce=re.flattenNodes,Ie=oe.expanded,Re=oe.key,ht=oe.isLeaf;if(!(ht||L.shiftKey||L.metaKey||L.ctrlKey)){var Ye=Ce.filter(function(At){return At.key===Re})[0],nt=(0,Fe.F)((0,be.Z)((0,be.Z)({},(0,Fe.H8)(Re,b.getTreeNodeRequiredProps())),{},{data:Ye.data}));b.setExpandedKeys(Ie?(0,Le._5)(Be,Re):(0,Le.L0)(Be,Re)),b.onNodeExpand(L,nt)}}),(0,S.Z)((0,ye.Z)(b),"onNodeClick",function(L,oe){var re=b.props,Be=re.onClick,Ce=re.expandAction;Ce==="click"&&b.triggerExpandActionExpand(L,oe),Be==null||Be(L,oe)}),(0,S.Z)((0,ye.Z)(b),"onNodeDoubleClick",function(L,oe){var re=b.props,Be=re.onDoubleClick,Ce=re.expandAction;Ce==="doubleClick"&&b.triggerExpandActionExpand(L,oe),Be==null||Be(L,oe)}),(0,S.Z)((0,ye.Z)(b),"onNodeSelect",function(L,oe){var re=b.state.selectedKeys,Be=b.state,Ce=Be.keyEntities,Ie=Be.fieldNames,Re=b.props,ht=Re.onSelect,Ye=Re.multiple,nt=oe.selected,At=oe[Ie.key],Ut=!nt;Ut?Ye?re=(0,Le.L0)(re,At):re=[At]:re=(0,Le._5)(re,At);var Et=re.map(function(vt){var tn=(0,Ne.Z)(Ce,vt);return tn?tn.node:null}).filter(Boolean);b.setUncontrolledState({selectedKeys:re}),ht==null||ht(re,{event:"select",selected:Ut,node:oe,selectedNodes:Et,nativeEvent:L.nativeEvent})}),(0,S.Z)((0,ye.Z)(b),"onNodeCheck",function(L,oe,re){var Be=b.state,Ce=Be.keyEntities,Ie=Be.checkedKeys,Re=Be.halfCheckedKeys,ht=b.props,Ye=ht.checkStrictly,nt=ht.onCheck,At=oe.key,Ut,Et={event:"check",node:oe,checked:re,nativeEvent:L.nativeEvent};if(Ye){var vt=re?(0,Le.L0)(Ie,At):(0,Le._5)(Ie,At),tn=(0,Le._5)(Re,At);Ut={checked:vt,halfChecked:tn},Et.checkedNodes=vt.map(function(cn){return(0,Ne.Z)(Ce,cn)}).filter(Boolean).map(function(cn){return cn.node}),b.setUncontrolledState({checkedKeys:vt})}else{var en=(0,mt.S)([].concat((0,we.Z)(Ie),[At]),!0,Ce),Pt=en.checkedKeys,dn=en.halfCheckedKeys;if(!re){var Ln=new Set(Pt);Ln.delete(At);var zt=(0,mt.S)(Array.from(Ln),{checked:!1,halfCheckedKeys:dn},Ce);Pt=zt.checkedKeys,dn=zt.halfCheckedKeys}Ut=Pt,Et.checkedNodes=[],Et.checkedNodesPositions=[],Et.halfCheckedKeys=dn,Pt.forEach(function(cn){var qe=(0,Ne.Z)(Ce,cn);if(qe){var Ke=qe.node,je=qe.pos;Et.checkedNodes.push(Ke),Et.checkedNodesPositions.push({node:Ke,pos:je})}}),b.setUncontrolledState({checkedKeys:Pt},!1,{halfCheckedKeys:dn})}nt==null||nt(Ut,Et)}),(0,S.Z)((0,ye.Z)(b),"onNodeLoad",function(L){var oe,re=L.key,Be=b.state.keyEntities,Ce=(0,Ne.Z)(Be,re);if(!(Ce!=null&&(oe=Ce.children)!==null&&oe!==void 0&&oe.length)){var Ie=new Promise(function(Re,ht){b.setState(function(Ye){var nt=Ye.loadedKeys,At=nt===void 0?[]:nt,Ut=Ye.loadingKeys,Et=Ut===void 0?[]:Ut,vt=b.props,tn=vt.loadData,en=vt.onLoad;if(!tn||At.includes(re)||Et.includes(re))return null;var Pt=tn(L);return Pt.then(function(){var dn=b.state.loadedKeys,Ln=(0,Le.L0)(dn,re);en==null||en(Ln,{event:"load",node:L}),b.setUncontrolledState({loadedKeys:Ln}),b.setState(function(zt){return{loadingKeys:(0,Le._5)(zt.loadingKeys,re)}}),Re()}).catch(function(dn){if(b.setState(function(zt){return{loadingKeys:(0,Le._5)(zt.loadingKeys,re)}}),b.loadingRetryTimes[re]=(b.loadingRetryTimes[re]||0)+1,b.loadingRetryTimes[re]>=It){var Ln=b.state.loadedKeys;(0,F.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),b.setUncontrolledState({loadedKeys:(0,Le.L0)(Ln,re)}),Re()}ht(dn)}),{loadingKeys:(0,Le.L0)(Et,re)}})});return Ie.catch(function(){}),Ie}}),(0,S.Z)((0,ye.Z)(b),"onNodeMouseEnter",function(L,oe){var re=b.props.onMouseEnter;re==null||re({event:L,node:oe})}),(0,S.Z)((0,ye.Z)(b),"onNodeMouseLeave",function(L,oe){var re=b.props.onMouseLeave;re==null||re({event:L,node:oe})}),(0,S.Z)((0,ye.Z)(b),"onNodeContextMenu",function(L,oe){var re=b.props.onRightClick;re&&(L.preventDefault(),re({event:L,node:oe}))}),(0,S.Z)((0,ye.Z)(b),"onFocus",function(){var L=b.props.onFocus;b.setState({focused:!0});for(var oe=arguments.length,re=new Array(oe),Be=0;Be<oe;Be++)re[Be]=arguments[Be];L==null||L.apply(void 0,re)}),(0,S.Z)((0,ye.Z)(b),"onBlur",function(){var L=b.props.onBlur;b.setState({focused:!1}),b.onActiveChange(null);for(var oe=arguments.length,re=new Array(oe),Be=0;Be<oe;Be++)re[Be]=arguments[Be];L==null||L.apply(void 0,re)}),(0,S.Z)((0,ye.Z)(b),"getTreeNodeRequiredProps",function(){var L=b.state,oe=L.expandedKeys,re=L.selectedKeys,Be=L.loadedKeys,Ce=L.loadingKeys,Ie=L.checkedKeys,Re=L.halfCheckedKeys,ht=L.dragOverNodeKey,Ye=L.dropPosition,nt=L.keyEntities;return{expandedKeys:oe||[],selectedKeys:re||[],loadedKeys:Be||[],loadingKeys:Ce||[],checkedKeys:Ie||[],halfCheckedKeys:Re||[],dragOverNodeKey:ht,dropPosition:Ye,keyEntities:nt}}),(0,S.Z)((0,ye.Z)(b),"setExpandedKeys",function(L){var oe=b.state,re=oe.treeData,Be=oe.fieldNames,Ce=(0,Fe.oH)(re,L,Be);b.setUncontrolledState({expandedKeys:L,flattenNodes:Ce},!0)}),(0,S.Z)((0,ye.Z)(b),"onNodeExpand",function(L,oe){var re=b.state.expandedKeys,Be=b.state,Ce=Be.listChanging,Ie=Be.fieldNames,Re=b.props,ht=Re.onExpand,Ye=Re.loadData,nt=oe.expanded,At=oe[Ie.key];if(!Ce){var Ut=re.includes(At),Et=!nt;if((0,F.ZP)(nt&&Ut||!nt&&!Ut,"Expand state not sync with index check"),re=Et?(0,Le.L0)(re,At):(0,Le._5)(re,At),b.setExpandedKeys(re),ht==null||ht(re,{node:oe,expanded:Et,nativeEvent:L.nativeEvent}),Et&&Ye){var vt=b.onNodeLoad(oe);vt&&vt.then(function(){var tn=(0,Fe.oH)(b.state.treeData,re,Ie);b.setUncontrolledState({flattenNodes:tn})}).catch(function(){var tn=b.state.expandedKeys,en=(0,Le._5)(tn,At);b.setExpandedKeys(en)})}}}),(0,S.Z)((0,ye.Z)(b),"onListChangeStart",function(){b.setUncontrolledState({listChanging:!0})}),(0,S.Z)((0,ye.Z)(b),"onListChangeEnd",function(){setTimeout(function(){b.setUncontrolledState({listChanging:!1})})}),(0,S.Z)((0,ye.Z)(b),"onActiveChange",function(L){var oe=b.state.activeKey,re=b.props,Be=re.onActiveChange,Ce=re.itemScrollOffset,Ie=Ce===void 0?0:Ce;oe!==L&&(b.setState({activeKey:L}),L!==null&&b.scrollTo({key:L,offset:Ie}),Be==null||Be(L))}),(0,S.Z)((0,ye.Z)(b),"getActiveItem",function(){var L=b.state,oe=L.activeKey,re=L.flattenNodes;return oe===null?null:re.find(function(Be){var Ce=Be.key;return Ce===oe})||null}),(0,S.Z)((0,ye.Z)(b),"offsetActiveKey",function(L){var oe=b.state,re=oe.flattenNodes,Be=oe.activeKey,Ce=re.findIndex(function(ht){var Ye=ht.key;return Ye===Be});Ce===-1&&L<0&&(Ce=re.length),Ce=(Ce+L+re.length)%re.length;var Ie=re[Ce];if(Ie){var Re=Ie.key;b.onActiveChange(Re)}else b.onActiveChange(null)}),(0,S.Z)((0,ye.Z)(b),"onKeyDown",function(L){var oe=b.state,re=oe.activeKey,Be=oe.expandedKeys,Ce=oe.checkedKeys,Ie=oe.fieldNames,Re=b.props,ht=Re.onKeyDown,Ye=Re.checkable,nt=Re.selectable;switch(L.which){case m.Z.UP:{b.offsetActiveKey(-1),L.preventDefault();break}case m.Z.DOWN:{b.offsetActiveKey(1),L.preventDefault();break}}var At=b.getActiveItem();if(At&&At.data){var Ut=b.getTreeNodeRequiredProps(),Et=At.data.isLeaf===!1||!!(At.data[Ie.children]||[]).length,vt=(0,Fe.F)((0,be.Z)((0,be.Z)({},(0,Fe.H8)(re,Ut)),{},{data:At.data,active:!0}));switch(L.which){case m.Z.LEFT:{Et&&Be.includes(re)?b.onNodeExpand({},vt):At.parent&&b.onActiveChange(At.parent.key),L.preventDefault();break}case m.Z.RIGHT:{Et&&!Be.includes(re)?b.onNodeExpand({},vt):At.children&&At.children.length&&b.onActiveChange(At.children[0].key),L.preventDefault();break}case m.Z.ENTER:case m.Z.SPACE:{Ye&&!vt.disabled&&vt.checkable!==!1&&!vt.disableCheckbox?b.onNodeCheck({},vt,!Ce.includes(re)):!Ye&&nt&&!vt.disabled&&vt.selectable!==!1&&b.onNodeSelect({},vt);break}}}ht==null||ht(L)}),(0,S.Z)((0,ye.Z)(b),"setUncontrolledState",function(L){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!b.destroyed){var Be=!1,Ce=!0,Ie={};Object.keys(L).forEach(function(Re){if(b.props.hasOwnProperty(Re)){Ce=!1;return}Be=!0,Ie[Re]=L[Re]}),Be&&(!oe||Ce)&&b.setState((0,be.Z)((0,be.Z)({},Ie),re))}}),(0,S.Z)((0,ye.Z)(b),"scrollTo",function(L){b.listRef.current.scrollTo(L)}),b}return(0,d.Z)(Q,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var w=this.props,D=w.activeKey,Ae=w.itemScrollOffset,L=Ae===void 0?0:Ae;D!==void 0&&D!==this.state.activeKey&&(this.setState({activeKey:D}),D!==null&&this.scrollTo({key:D,offset:L}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var w=this.state,D=w.focused,Ae=w.flattenNodes,L=w.keyEntities,oe=w.draggingNodeKey,re=w.activeKey,Be=w.dropLevelOffset,Ce=w.dropContainerKey,Ie=w.dropTargetKey,Re=w.dropPosition,ht=w.dragOverNodeKey,Ye=w.indent,nt=this.props,At=nt.prefixCls,Ut=nt.className,Et=nt.style,vt=nt.showLine,tn=nt.focusable,en=nt.tabIndex,Pt=en===void 0?0:en,dn=nt.selectable,Ln=nt.showIcon,zt=nt.icon,cn=nt.switcherIcon,qe=nt.draggable,Ke=nt.checkable,je=nt.checkStrictly,le=nt.disabled,Ee=nt.motion,ve=nt.loadData,Te=nt.filterTreeNode,ne=nt.height,Nt=nt.itemHeight,$t=nt.scrollWidth,Ft=nt.virtual,vn=nt.titleRender,tr=nt.dropIndicatorRender,Kn=nt.onContextMenu,Mn=nt.onScroll,In=nt.direction,nr=nt.rootClassName,fr=nt.rootStyle,qn=(0,B.Z)(this.props,{aria:!0,data:!0}),ur;qe&&((0,me.Z)(qe)==="object"?ur=qe:typeof qe=="function"?ur={nodeDraggable:qe}:ur={});var $n={prefixCls:At,selectable:dn,showIcon:Ln,icon:zt,switcherIcon:cn,draggable:ur,draggingNodeKey:oe,checkable:Ke,checkStrictly:je,disabled:le,keyEntities:L,dropLevelOffset:Be,dropContainerKey:Ce,dropTargetKey:Ie,dropPosition:Re,dragOverNodeKey:ht,indent:Ye,direction:In,dropIndicatorRender:tr,loadData:ve,filterTreeNode:Te,titleRender:vn,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return V.createElement(j.k.Provider,{value:$n},V.createElement("div",{className:p()(At,Ut,nr,(0,S.Z)((0,S.Z)((0,S.Z)({},"".concat(At,"-show-line"),vt),"".concat(At,"-focused"),D),"".concat(At,"-active-focused"),re!==null)),style:fr},V.createElement(te,(0,M.Z)({ref:this.listRef,prefixCls:At,style:Et,data:Ae,disabled:le,selectable:dn,checkable:!!Ke,motion:Ee,dragging:oe!==null,height:ne,itemHeight:Nt,virtual:Ft,focusable:tn,focused:D,tabIndex:Pt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Kn,onScroll:Mn,scrollWidth:$t},this.getTreeNodeRequiredProps(),qn))))}}],[{key:"getDerivedStateFromProps",value:function(w,D){var Ae=D.prevProps,L={prevProps:w};function oe(Pt){return!Ae&&w.hasOwnProperty(Pt)||Ae&&Ae[Pt]!==w[Pt]}var re,Be=D.fieldNames;if(oe("fieldNames")&&(Be=(0,Fe.w$)(w.fieldNames),L.fieldNames=Be),oe("treeData")?re=w.treeData:oe("children")&&((0,F.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),re=(0,Fe.zn)(w.children)),re){L.treeData=re;var Ce=(0,Fe.I8)(re,{fieldNames:Be});L.keyEntities=(0,be.Z)((0,S.Z)({},Y,Qe),Ce.keyEntities)}var Ie=L.keyEntities||D.keyEntities;if(oe("expandedKeys")||Ae&&oe("autoExpandParent"))L.expandedKeys=w.autoExpandParent||!Ae&&w.defaultExpandParent?(0,Le.r7)(w.expandedKeys,Ie):w.expandedKeys;else if(!Ae&&w.defaultExpandAll){var Re=(0,be.Z)({},Ie);delete Re[Y];var ht=[];Object.keys(Re).forEach(function(Pt){var dn=Re[Pt];dn.children&&dn.children.length&&ht.push(dn.key)}),L.expandedKeys=ht}else!Ae&&w.defaultExpandedKeys&&(L.expandedKeys=w.autoExpandParent||w.defaultExpandParent?(0,Le.r7)(w.defaultExpandedKeys,Ie):w.defaultExpandedKeys);if(L.expandedKeys||delete L.expandedKeys,re||L.expandedKeys){var Ye=(0,Fe.oH)(re||D.treeData,L.expandedKeys||D.expandedKeys,Be);L.flattenNodes=Ye}if(w.selectable&&(oe("selectedKeys")?L.selectedKeys=(0,Le.BT)(w.selectedKeys,w):!Ae&&w.defaultSelectedKeys&&(L.selectedKeys=(0,Le.BT)(w.defaultSelectedKeys,w))),w.checkable){var nt;if(oe("checkedKeys")?nt=(0,Le.E6)(w.checkedKeys)||{}:!Ae&&w.defaultCheckedKeys?nt=(0,Le.E6)(w.defaultCheckedKeys)||{}:re&&(nt=(0,Le.E6)(w.checkedKeys)||{checkedKeys:D.checkedKeys,halfCheckedKeys:D.halfCheckedKeys}),nt){var At=nt,Ut=At.checkedKeys,Et=Ut===void 0?[]:Ut,vt=At.halfCheckedKeys,tn=vt===void 0?[]:vt;if(!w.checkStrictly){var en=(0,mt.S)(Et,!0,Ie);Et=en.checkedKeys,tn=en.halfCheckedKeys}L.checkedKeys=Et,L.halfCheckedKeys=tn}}return oe("loadedKeys")&&(L.loadedKeys=w.loadedKeys),L}}]),Q}(V.Component);(0,S.Z)(He,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:H,allowDrop:function(){return!0},expandAction:!1}),(0,S.Z)(He,"TreeNode",q.Z);var Se=He,I=Se},82661:function(Zn,Dt,x){"use strict";x.d(Dt,{BT:function(){return V},E6:function(){return H},L0:function(){return S},OM:function(){return F},_5:function(){return A},r7:function(){return X},wA:function(){return p},yx:function(){return k}});var M=x(80702),me=x(62853),be=x(48736),we=x(59301),W=x(639),d=x(65065),ye=x(34061),G=null;function A(P,R){if(!P)return[];var fe=P.slice(),de=fe.indexOf(R);return de>=0&&fe.splice(de,1),fe}function S(P,R){var fe=(P||[]).slice();return fe.indexOf(R)===-1&&fe.push(R),fe}function k(P){return P.split("-")}function p(P,R){var fe=[],de=(0,d.Z)(R,P);function ie(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];q.forEach(function(ge){var z=ge.key,Fe=ge.children;fe.push(z),ie(Fe)})}return ie(de.children),fe}function m(P){if(P.parent){var R=k(P.pos);return Number(R[R.length-1])===P.parent.children.length-1}return!1}function B(P){var R=k(P.pos);return Number(R[R.length-1])===0}function F(P,R,fe,de,ie,q,ge,z,Fe,Z){var U,K=P.clientX,ee=P.clientY,he=P.target.getBoundingClientRect(),ae=he.top,_=he.height,y=(Z==="rtl"?-1:1)*(((ie==null?void 0:ie.x)||0)-K),Y=(y-12)/de,ue=Fe.filter(function(I){var g;return(g=z[I])===null||g===void 0||(g=g.children)===null||g===void 0?void 0:g.length}),Qe=(0,d.Z)(z,fe.eventKey);if(ee<ae+_/2){var et=ge.findIndex(function(I){return I.key===Qe.key}),gt=et<=0?0:et-1,bt=ge[gt].key;Qe=(0,d.Z)(z,bt)}var Vt=Qe.key,Rt=Qe,te=Qe.key,Le=0,mt=0;if(!ue.includes(Vt))for(var Ne=0;Ne<Y&&m(Qe);Ne+=1)Qe=Qe.parent,mt+=1;var It=R.data,He=Qe.node,Se=!0;return B(Qe)&&Qe.level===0&&ee<ae+_/2&&q({dragNode:It,dropNode:He,dropPosition:-1})&&Qe.key===fe.eventKey?Le=-1:(Rt.children||[]).length&&ue.includes(te)?q({dragNode:It,dropNode:He,dropPosition:0})?Le=0:Se=!1:mt===0?Y>-1.5?q({dragNode:It,dropNode:He,dropPosition:1})?Le=1:Se=!1:q({dragNode:It,dropNode:He,dropPosition:0})?Le=0:q({dragNode:It,dropNode:He,dropPosition:1})?Le=1:Se=!1:q({dragNode:It,dropNode:He,dropPosition:1})?Le=1:Se=!1,{dropPosition:Le,dropLevelOffset:mt,dropTargetKey:Qe.key,dropTargetPos:Qe.pos,dragOverNodeKey:te,dropContainerKey:Le===0?null:((U=Qe.parent)===null||U===void 0?void 0:U.key)||null,dropAllowed:Se}}function V(P,R){if(P){var fe=R.multiple;return fe?P.slice():P.length?[P[0]]:P}}var j=function(R){return R};function se(P,R){if(!P)return[];var fe=R||{},de=fe.processProps,ie=de===void 0?j:de,q=Array.isArray(P)?P:[P];return q.map(function(ge){var z=ge.children,Fe=_objectWithoutProperties(ge,G),Z=se(z,R);return React.createElement(TreeNode,_extends({key:Fe.key},ie(Fe)),Z)})}function H(P){if(!P)return null;var R;if(Array.isArray(P))R={checkedKeys:P,halfCheckedKeys:void 0};else if((0,me.Z)(P)==="object")R={checkedKeys:P.checked||void 0,halfCheckedKeys:P.halfChecked||void 0};else return(0,be.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return R}function X(P,R){var fe=new Set;function de(ie){if(!fe.has(ie)){var q=(0,d.Z)(R,ie);if(q){fe.add(ie);var ge=q.parent,z=q.node;z.disabled||ge&&de(ge.key)}}}return(P||[]).forEach(function(ie){de(ie)}),(0,M.Z)(fe)}},34643:function(Zn,Dt,x){"use strict";x.d(Dt,{S:function(){return ye}});var M=x(48736),me=x(65065);function be(G,A){var S=new Set;return G.forEach(function(k){A.has(k)||S.add(k)}),S}function we(G){var A=G||{},S=A.disabled,k=A.disableCheckbox,p=A.checkable;return!!(S||k)||p===!1}function W(G,A,S,k){for(var p=new Set(G),m=new Set,B=0;B<=S;B+=1){var F=A.get(B)||new Set;F.forEach(function(H){var X=H.key,P=H.node,R=H.children,fe=R===void 0?[]:R;p.has(X)&&!k(P)&&fe.filter(function(de){return!k(de.node)}).forEach(function(de){p.add(de.key)})})}for(var V=new Set,j=S;j>=0;j-=1){var se=A.get(j)||new Set;se.forEach(function(H){var X=H.parent,P=H.node;if(!(k(P)||!H.parent||V.has(H.parent.key))){if(k(H.parent.node)){V.add(X.key);return}var R=!0,fe=!1;(X.children||[]).filter(function(de){return!k(de.node)}).forEach(function(de){var ie=de.key,q=p.has(ie);R&&!q&&(R=!1),!fe&&(q||m.has(ie))&&(fe=!0)}),R&&p.add(X.key),fe&&m.add(X.key),V.add(X.key)}})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(be(m,p))}}function d(G,A,S,k,p){for(var m=new Set(G),B=new Set(A),F=0;F<=k;F+=1){var V=S.get(F)||new Set;V.forEach(function(X){var P=X.key,R=X.node,fe=X.children,de=fe===void 0?[]:fe;!m.has(P)&&!B.has(P)&&!p(R)&&de.filter(function(ie){return!p(ie.node)}).forEach(function(ie){m.delete(ie.key)})})}B=new Set;for(var j=new Set,se=k;se>=0;se-=1){var H=S.get(se)||new Set;H.forEach(function(X){var P=X.parent,R=X.node;if(!(p(R)||!X.parent||j.has(X.parent.key))){if(p(X.parent.node)){j.add(P.key);return}var fe=!0,de=!1;(P.children||[]).filter(function(ie){return!p(ie.node)}).forEach(function(ie){var q=ie.key,ge=m.has(q);fe&&!ge&&(fe=!1),!de&&(ge||B.has(q))&&(de=!0)}),fe||m.delete(P.key),de&&B.add(P.key),j.add(P.key)}})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(be(B,m))}}function ye(G,A,S,k){var p=[],m;k?m=k:m=we;var B=new Set(G.filter(function(se){var H=!!(0,me.Z)(S,se);return H||p.push(se),H})),F=new Map,V=0;Object.keys(S).forEach(function(se){var H=S[se],X=H.level,P=F.get(X);P||(P=new Set,F.set(X,P)),P.add(H),V=Math.max(V,X)}),(0,M.ZP)(!p.length,"Tree missing follow keys: ".concat(p.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var j;return A===!0?j=W(B,F,V,m):j=d(B,A.halfCheckedKeys,F,V,m),j}},65065:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return M}});function M(me,be){return me[be]}},34061:function(Zn,Dt,x){"use strict";x.d(Dt,{F:function(){return X},H8:function(){return H},I8:function(){return se},km:function(){return p},oH:function(){return V},w$:function(){return m},zn:function(){return F}});var M=x(62853),me=x(80702),be=x(77321),we=x(74416),W=x(11592),d=x(2738),ye=x(48736),G=x(65065),A=["children"];function S(P,R){return"".concat(P,"-").concat(R)}function k(P){return P&&P.type&&P.type.isTreeNode}function p(P,R){return P!=null?P:R}function m(P){var R=P||{},fe=R.title,de=R._title,ie=R.key,q=R.children,ge=fe||"title";return{title:ge,_title:de||[ge],key:ie||"key",children:q||"children"}}function B(P,R){var fe=new Map;function de(ie){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ie||[]).forEach(function(ge){var z=ge[R.key],Fe=ge[R.children];warning(z!=null,"Tree node must have a certain key: [".concat(q).concat(z,"]"));var Z=String(z);warning(!fe.has(Z)||z===null||z===void 0,"Same 'key' exist in the Tree: ".concat(Z)),fe.set(Z,!0),de(Fe,"".concat(q).concat(Z," > "))})}de(P)}function F(P){function R(fe){var de=(0,W.Z)(fe);return de.map(function(ie){if(!k(ie))return(0,ye.ZP)(!ie,"Tree/TreeNode can only accept TreeNode as children."),null;var q=ie.key,ge=ie.props,z=ge.children,Fe=(0,we.Z)(ge,A),Z=(0,be.Z)({key:q},Fe),U=R(z);return U.length&&(Z.children=U),Z}).filter(function(ie){return ie})}return R(P)}function V(P,R,fe){var de=m(fe),ie=de._title,q=de.key,ge=de.children,z=new Set(R===!0?[]:R),Fe=[];function Z(U){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return U.map(function(ee,he){for(var ae=S(K?K.pos:"0",he),_=p(ee[q],ae),y,Y=0;Y<ie.length;Y+=1){var ue=ie[Y];if(ee[ue]!==void 0){y=ee[ue];break}}var Qe=Object.assign((0,d.Z)(ee,[].concat((0,me.Z)(ie),[q,ge])),{title:y,key:_,parent:K,pos:ae,children:null,data:ee,isStart:[].concat((0,me.Z)(K?K.isStart:[]),[he===0]),isEnd:[].concat((0,me.Z)(K?K.isEnd:[]),[he===U.length-1])});return Fe.push(Qe),R===!0||z.has(_)?Qe.children=Z(ee[ge]||[],Qe):Qe.children=[],Qe})}return Z(P),Fe}function j(P,R,fe){var de={};(0,M.Z)(fe)==="object"?de=fe:de={externalGetKey:fe},de=de||{};var ie=de,q=ie.childrenPropName,ge=ie.externalGetKey,z=ie.fieldNames,Fe=m(z),Z=Fe.key,U=Fe.children,K=q||U,ee;ge?typeof ge=="string"?ee=function(_){return _[ge]}:typeof ge=="function"&&(ee=function(_){return ge(_)}):ee=function(_,y){return p(_[Z],y)};function he(ae,_,y,Y){var ue=ae?ae[K]:P,Qe=ae?S(y.pos,_):"0",et=ae?[].concat((0,me.Z)(Y),[ae]):[];if(ae){var gt=ee(ae,Qe),bt={node:ae,index:_,pos:Qe,key:gt,parentPos:y.node?y.pos:null,level:y.level+1,nodes:et};R(bt)}ue&&ue.forEach(function(Vt,Rt){he(Vt,Rt,{node:ae,pos:Qe,level:y?y.level+1:-1},et)})}he(null)}function se(P){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},fe=R.initWrapper,de=R.processEntity,ie=R.onProcessFinished,q=R.externalGetKey,ge=R.childrenPropName,z=R.fieldNames,Fe=arguments.length>2?arguments[2]:void 0,Z=q||Fe,U={},K={},ee={posEntities:U,keyEntities:K};return fe&&(ee=fe(ee)||ee),j(P,function(he){var ae=he.node,_=he.index,y=he.pos,Y=he.key,ue=he.parentPos,Qe=he.level,et=he.nodes,gt={node:ae,nodes:et,index:_,key:Y,pos:y,level:Qe},bt=p(Y,y);U[y]=gt,K[bt]=gt,gt.parent=U[ue],gt.parent&&(gt.parent.children=gt.parent.children||[],gt.parent.children.push(gt)),de&&de(gt,ee)},{externalGetKey:Z,childrenPropName:ge,fieldNames:z}),ie&&ie(ee),ee}function H(P,R){var fe=R.expandedKeys,de=R.selectedKeys,ie=R.loadedKeys,q=R.loadingKeys,ge=R.checkedKeys,z=R.halfCheckedKeys,Fe=R.dragOverNodeKey,Z=R.dropPosition,U=R.keyEntities,K=(0,G.Z)(U,P),ee={eventKey:P,expanded:fe.indexOf(P)!==-1,selected:de.indexOf(P)!==-1,loaded:ie.indexOf(P)!==-1,loading:q.indexOf(P)!==-1,checked:ge.indexOf(P)!==-1,halfChecked:z.indexOf(P)!==-1,pos:String(K?K.pos:""),dragOver:Fe===P&&Z===0,dragOverGapTop:Fe===P&&Z===-1,dragOverGapBottom:Fe===P&&Z===1};return ee}function X(P){var R=P.data,fe=P.expanded,de=P.selected,ie=P.checked,q=P.loaded,ge=P.loading,z=P.halfChecked,Fe=P.dragOver,Z=P.dragOverGapTop,U=P.dragOverGapBottom,K=P.pos,ee=P.active,he=P.eventKey,ae=(0,be.Z)((0,be.Z)({},R),{},{expanded:fe,selected:de,checked:ie,loaded:q,loading:ge,halfChecked:z,dragOver:Fe,dragOverGapTop:Z,dragOverGapBottom:U,pos:K,active:ee,key:he});return"props"in ae||Object.defineProperty(ae,"props",{get:function(){return(0,ye.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),P}}),ae}},8224:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return me}});var M=x(4676);function me(be,we,W,d){var ye=M.unstable_batchedUpdates?function(A){M.unstable_batchedUpdates(W,A)}:W;return be!=null&&be.addEventListener&&be.addEventListener(we,ye,d),{remove:function(){be!=null&&be.removeEventListener&&be.removeEventListener(we,ye,d)}}}},24514:function(Zn,Dt,x){"use strict";x.d(Dt,{G:function(){return we}});var M=x(47273),me=function(d){if((0,M.Z)()&&window.document.documentElement){var ye=Array.isArray(d)?d:[d],G=window.document.documentElement;return ye.some(function(A){return A in G.style})}return!1},be=function(d,ye){if(!me(d))return!1;var G=document.createElement("div"),A=G.style[d];return G.style[d]=ye,G.style[d]!==A};function we(W,d){return!Array.isArray(W)&&d!==void 0?be(W,d):me(W)}},49658:function(Zn,Dt){"use strict";Dt.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var x=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(x)||/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(x==null?void 0:x.substr(0,4))}},45680:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return It}});var M=x(72308),me=x(62853),be=x(77321),we=x(49618),W=x(52487),d=x(74416),ye=x(92310),G=x.n(ye),A=x(29301),S=x(70425),k=x(34280),p=x(59301),m=x(4676),B=p.forwardRef(function(He,Se){var I=He.height,g=He.offsetY,v=He.offsetX,Q=He.children,b=He.prefixCls,w=He.onInnerResize,D=He.innerProps,Ae=He.rtl,L=He.extra,oe={},re={display:"flex",flexDirection:"column"};return g!==void 0&&(oe={height:I,position:"relative",overflow:"hidden"},re=(0,be.Z)((0,be.Z)({},re),{},(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)({transform:"translateY(".concat(g,"px)")},Ae?"marginRight":"marginLeft",-v),"position","absolute"),"left",0),"right",0),"top",0))),p.createElement("div",{style:oe},p.createElement(A.Z,{onResize:function(Ce){var Ie=Ce.offsetHeight;Ie&&w&&w()}},p.createElement("div",(0,M.Z)({style:re,className:G()((0,we.Z)({},"".concat(b,"-holder-inner"),b)),ref:Se},D),Q,L)))});B.displayName="Filler";var F=B;function V(He){var Se=He.children,I=He.setRef,g=p.useCallback(function(v){I(v)},[]);return p.cloneElement(Se,{ref:g})}function j(He,Se,I,g,v,Q,b,w){var D=w.getKey;return He.slice(Se,I+1).map(function(Ae,L){var oe=Se+L,re=b(Ae,oe,{style:{width:g},offsetX:v}),Be=D(Ae);return p.createElement(V,{key:Be,setRef:function(Ie){return Q(Ae,Ie)}},re)})}function se(He,Se,I,g){var v=I-He,Q=Se-I,b=Math.min(v,Q)*2;if(g<=b){var w=Math.floor(g/2);return g%2?I+w+1:I-w}return v>Q?I-(g-Q):I+(g-v)}function H(He,Se,I){var g=He.length,v=Se.length,Q,b;if(g===0&&v===0)return null;g<v?(Q=He,b=Se):(Q=Se,b=He);var w={__EMPTY_ITEM__:!0};function D(Ce){return Ce!==void 0?I(Ce):w}for(var Ae=null,L=Math.abs(g-v)!==1,oe=0;oe<b.length;oe+=1){var re=D(Q[oe]),Be=D(b[oe]);if(re!==Be){Ae=oe,L=L||re!==D(b[oe+1]);break}}return Ae===null?null:{index:Ae,multiple:L}}function X(He,Se,I){var g=p.useState(He),v=(0,W.Z)(g,2),Q=v[0],b=v[1],w=p.useState(null),D=(0,W.Z)(w,2),Ae=D[0],L=D[1];return p.useEffect(function(){var oe=H(Q||[],He||[],Se);(oe==null?void 0:oe.index)!==void 0&&(I==null||I(oe.index),L(He[oe.index])),b(He)},[He]),[Ae]}var P=x(16089),R=(typeof navigator=="undefined"?"undefined":(0,me.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),fe=R,de=function(He,Se,I,g){var v=(0,p.useRef)(!1),Q=(0,p.useRef)(null);function b(){clearTimeout(Q.current),v.current=!0,Q.current=setTimeout(function(){v.current=!1},50)}var w=(0,p.useRef)({top:He,bottom:Se,left:I,right:g});return w.current.top=He,w.current.bottom=Se,w.current.left=I,w.current.right=g,function(D,Ae){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,oe=D?Ae<0&&w.current.left||Ae>0&&w.current.right:Ae<0&&w.current.top||Ae>0&&w.current.bottom;return L&&oe?(clearTimeout(Q.current),v.current=!1):(!oe||v.current)&&b(),!v.current&&oe}};function ie(He,Se,I,g,v,Q,b){var w=(0,p.useRef)(0),D=(0,p.useRef)(null),Ae=(0,p.useRef)(null),L=(0,p.useRef)(!1),oe=de(Se,I,g,v);function re(Ye,nt){if(P.Z.cancel(D.current),!oe(!1,nt)){var At=Ye;if(!At._virtualHandled)At._virtualHandled=!0;else return;w.current+=nt,Ae.current=nt,fe||At.preventDefault(),D.current=(0,P.Z)(function(){var Ut=L.current?10:1;b(w.current*Ut,!1),w.current=0})}}function Be(Ye,nt){b(nt,!0),fe||Ye.preventDefault()}var Ce=(0,p.useRef)(null),Ie=(0,p.useRef)(null);function Re(Ye){if(He){P.Z.cancel(Ie.current),Ie.current=(0,P.Z)(function(){Ce.current=null},2);var nt=Ye.deltaX,At=Ye.deltaY,Ut=Ye.shiftKey,Et=nt,vt=At;(Ce.current==="sx"||!Ce.current&&Ut&&At&&!nt)&&(Et=At,vt=0,Ce.current="sx");var tn=Math.abs(Et),en=Math.abs(vt);Ce.current===null&&(Ce.current=Q&&tn>en?"x":"y"),Ce.current==="y"?re(Ye,vt):Be(Ye,Et)}}function ht(Ye){He&&(L.current=Ye.detail===Ae.current)}return[Re,ht]}function q(He,Se,I,g){var v=p.useMemo(function(){return[new Map,[]]},[He,I.id,g]),Q=(0,W.Z)(v,2),b=Q[0],w=Q[1],D=function(L){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L,re=b.get(L),Be=b.get(oe);if(re===void 0||Be===void 0)for(var Ce=He.length,Ie=w.length;Ie<Ce;Ie+=1){var Re,ht=He[Ie],Ye=Se(ht);b.set(Ye,Ie);var nt=(Re=I.get(Ye))!==null&&Re!==void 0?Re:g;if(w[Ie]=(w[Ie-1]||0)+nt,Ye===L&&(re=Ie),Ye===oe&&(Be=Ie),re!==void 0&&Be!==void 0)break}return{top:w[re-1]||0,bottom:w[Be]}};return D}var ge=x(96949),z=x(55090),Fe=function(){function He(){(0,ge.Z)(this,He),(0,we.Z)(this,"maps",void 0),(0,we.Z)(this,"id",0),(0,we.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,z.Z)(He,[{key:"set",value:function(I,g){this.maps[I]=g,this.id+=1,this.diffKeys.add(I)}},{key:"get",value:function(I){return this.maps[I]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),He}(),Z=Fe;function U(He){var Se=parseFloat(He);return isNaN(Se)?0:Se}function K(He,Se,I){var g=p.useState(0),v=(0,W.Z)(g,2),Q=v[0],b=v[1],w=(0,p.useRef)(new Map),D=(0,p.useRef)(new Z),Ae=(0,p.useRef)(0);function L(){Ae.current+=1}function oe(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;L();var Ce=function(){var ht=!1;w.current.forEach(function(Ye,nt){if(Ye&&Ye.offsetParent){var At=Ye.offsetHeight,Ut=getComputedStyle(Ye),Et=Ut.marginTop,vt=Ut.marginBottom,tn=U(Et),en=U(vt),Pt=At+tn+en;D.current.get(nt)!==Pt&&(D.current.set(nt,Pt),ht=!0)}}),ht&&b(function(Ye){return Ye+1})};if(Be)Ce();else{Ae.current+=1;var Ie=Ae.current;Promise.resolve().then(function(){Ie===Ae.current&&Ce()})}}function re(Be,Ce){var Ie=He(Be),Re=w.current.get(Ie);Ce?(w.current.set(Ie,Ce),oe()):w.current.delete(Ie),!Re!=!Ce&&(Ce?Se==null||Se(Be):I==null||I(Be))}return(0,p.useEffect)(function(){return L},[]),[re,oe,D.current,Q]}var ee=14/15;function he(He,Se,I){var g=(0,p.useRef)(!1),v=(0,p.useRef)(0),Q=(0,p.useRef)(0),b=(0,p.useRef)(null),w=(0,p.useRef)(null),D,Ae=function(Be){if(g.current){var Ce=Math.ceil(Be.touches[0].pageX),Ie=Math.ceil(Be.touches[0].pageY),Re=v.current-Ce,ht=Q.current-Ie,Ye=Math.abs(Re)>Math.abs(ht);Ye?v.current=Ce:Q.current=Ie;var nt=I(Ye,Ye?Re:ht,!1,Be);nt&&Be.preventDefault(),clearInterval(w.current),nt&&(w.current=setInterval(function(){Ye?Re*=ee:ht*=ee;var At=Math.floor(Ye?Re:ht);(!I(Ye,At,!0)||Math.abs(At)<=.1)&&clearInterval(w.current)},16))}},L=function(){g.current=!1,D()},oe=function(Be){D(),Be.touches.length===1&&!g.current&&(g.current=!0,v.current=Math.ceil(Be.touches[0].pageX),Q.current=Math.ceil(Be.touches[0].pageY),b.current=Be.target,b.current.addEventListener("touchmove",Ae,{passive:!1}),b.current.addEventListener("touchend",L,{passive:!0}))};D=function(){b.current&&(b.current.removeEventListener("touchmove",Ae),b.current.removeEventListener("touchend",L))},(0,k.Z)(function(){return He&&Se.current.addEventListener("touchstart",oe,{passive:!0}),function(){var re;(re=Se.current)===null||re===void 0||re.removeEventListener("touchstart",oe),D(),clearInterval(w.current)}},[He])}function ae(He){return Math.floor(Math.pow(He,.5))}function _(He,Se){var I="touches"in He?He.touches[0]:He;return I[Se?"pageX":"pageY"]-window[Se?"scrollX":"scrollY"]}function y(He,Se,I){p.useEffect(function(){var g=Se.current;if(He&&g){var v=!1,Q,b,w=function(){P.Z.cancel(Q)},D=function re(){w(),Q=(0,P.Z)(function(){I(b),re()})},Ae=function(Be){if(!(Be.target.draggable||Be.button!==0)){var Ce=Be;Ce._virtualHandled||(Ce._virtualHandled=!0,v=!0)}},L=function(){v=!1,w()},oe=function(Be){if(v){var Ce=_(Be,!1),Ie=g.getBoundingClientRect(),Re=Ie.top,ht=Ie.bottom;if(Ce<=Re){var Ye=Re-Ce;b=-ae(Ye),D()}else if(Ce>=ht){var nt=Ce-ht;b=ae(nt),D()}else w()}};return g.addEventListener("mousedown",Ae),g.ownerDocument.addEventListener("mouseup",L),g.ownerDocument.addEventListener("mousemove",oe),function(){g.removeEventListener("mousedown",Ae),g.ownerDocument.removeEventListener("mouseup",L),g.ownerDocument.removeEventListener("mousemove",oe),w()}}},[He])}var Y=10;function ue(He,Se,I,g,v,Q,b,w){var D=p.useRef(),Ae=p.useState(null),L=(0,W.Z)(Ae,2),oe=L[0],re=L[1];return(0,k.Z)(function(){if(oe&&oe.times<Y){if(!He.current){re(function(Ee){return(0,be.Z)({},Ee)});return}Q();var Be=oe.targetAlign,Ce=oe.originAlign,Ie=oe.index,Re=oe.offset,ht=He.current.clientHeight,Ye=!1,nt=Be,At=null;if(ht){for(var Ut=Be||Ce,Et=0,vt=0,tn=0,en=Math.min(Se.length-1,Ie),Pt=0;Pt<=en;Pt+=1){var dn=v(Se[Pt]);vt=Et;var Ln=I.get(dn);tn=vt+(Ln===void 0?g:Ln),Et=tn}for(var zt=Ut==="top"?Re:ht-Re,cn=en;cn>=0;cn-=1){var qe=v(Se[cn]),Ke=I.get(qe);if(Ke===void 0){Ye=!0;break}if(zt-=Ke,zt<=0)break}switch(Ut){case"top":At=vt-Re;break;case"bottom":At=tn-ht+Re;break;default:{var je=He.current.scrollTop,le=je+ht;vt<je?nt="top":tn>le&&(nt="bottom")}}At!==null&&b(At),At!==oe.lastTop&&(Ye=!0)}Ye&&re((0,be.Z)((0,be.Z)({},oe),{},{times:oe.times+1,targetAlign:nt,lastTop:At}))}},[oe,He.current]),function(Be){if(Be==null){w();return}if(P.Z.cancel(D.current),typeof Be=="number")b(Be);else if(Be&&(0,me.Z)(Be)==="object"){var Ce,Ie=Be.align;"index"in Be?Ce=Be.index:Ce=Se.findIndex(function(Ye){return v(Ye)===Be.key});var Re=Be.offset,ht=Re===void 0?0:Re;re({times:0,index:Ce,offset:ht,originAlign:Ie})}}}var Qe=p.forwardRef(function(He,Se){var I=He.prefixCls,g=He.rtl,v=He.scrollOffset,Q=He.scrollRange,b=He.onStartMove,w=He.onStopMove,D=He.onScroll,Ae=He.horizontal,L=He.spinSize,oe=He.containerSize,re=He.style,Be=He.thumbStyle,Ce=He.showScrollBar,Ie=p.useState(!1),Re=(0,W.Z)(Ie,2),ht=Re[0],Ye=Re[1],nt=p.useState(null),At=(0,W.Z)(nt,2),Ut=At[0],Et=At[1],vt=p.useState(null),tn=(0,W.Z)(vt,2),en=tn[0],Pt=tn[1],dn=!g,Ln=p.useRef(),zt=p.useRef(),cn=p.useState(Ce),qe=(0,W.Z)(cn,2),Ke=qe[0],je=qe[1],le=p.useRef(),Ee=function(){Ce===!0||Ce===!1||(clearTimeout(le.current),je(!0),le.current=setTimeout(function(){je(!1)},3e3))},ve=Q-oe||0,Te=oe-L||0,ne=p.useMemo(function(){if(v===0||ve===0)return 0;var nr=v/ve;return nr*Te},[v,ve,Te]),Nt=function(fr){fr.stopPropagation(),fr.preventDefault()},$t=p.useRef({top:ne,dragging:ht,pageY:Ut,startTop:en});$t.current={top:ne,dragging:ht,pageY:Ut,startTop:en};var Ft=function(fr){Ye(!0),Et(_(fr,Ae)),Pt($t.current.top),b(),fr.stopPropagation(),fr.preventDefault()};p.useEffect(function(){var nr=function($n){$n.preventDefault()},fr=Ln.current,qn=zt.current;return fr.addEventListener("touchstart",nr,{passive:!1}),qn.addEventListener("touchstart",Ft,{passive:!1}),function(){fr.removeEventListener("touchstart",nr),qn.removeEventListener("touchstart",Ft)}},[]);var vn=p.useRef();vn.current=ve;var tr=p.useRef();tr.current=Te,p.useEffect(function(){if(ht){var nr,fr=function($n){var Nn=$t.current,Ge=Nn.dragging,Ue=Nn.pageY,qt=Nn.startTop;P.Z.cancel(nr);var Mt=Ln.current.getBoundingClientRect(),an=oe/(Ae?Mt.width:Mt.height);if(Ge){var An=(_($n,Ae)-Ue)*an,yn=qt;!dn&&Ae?yn-=An:yn+=An;var gn=vn.current,Yt=tr.current,Tt=Yt?yn/Yt:0,Qt=Math.ceil(Tt*gn);Qt=Math.max(Qt,0),Qt=Math.min(Qt,gn),nr=(0,P.Z)(function(){D(Qt,Ae)})}},qn=function(){Ye(!1),w()};return window.addEventListener("mousemove",fr,{passive:!0}),window.addEventListener("touchmove",fr,{passive:!0}),window.addEventListener("mouseup",qn,{passive:!0}),window.addEventListener("touchend",qn,{passive:!0}),function(){window.removeEventListener("mousemove",fr),window.removeEventListener("touchmove",fr),window.removeEventListener("mouseup",qn),window.removeEventListener("touchend",qn),P.Z.cancel(nr)}}},[ht]),p.useEffect(function(){return Ee(),function(){clearTimeout(le.current)}},[v]),p.useImperativeHandle(Se,function(){return{delayHidden:Ee}});var Kn="".concat(I,"-scrollbar"),Mn={position:"absolute",visibility:Ke?null:"hidden"},In={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ae?(Mn.height=8,Mn.left=0,Mn.right=0,Mn.bottom=0,In.height="100%",In.width=L,dn?In.left=ne:In.right=ne):(Mn.width=8,Mn.top=0,Mn.bottom=0,dn?Mn.right=0:Mn.left=0,In.width="100%",In.height=L,In.top=ne),p.createElement("div",{ref:Ln,className:G()(Kn,(0,we.Z)((0,we.Z)((0,we.Z)({},"".concat(Kn,"-horizontal"),Ae),"".concat(Kn,"-vertical"),!Ae),"".concat(Kn,"-visible"),Ke)),style:(0,be.Z)((0,be.Z)({},Mn),re),onMouseDown:Nt,onMouseMove:Ee},p.createElement("div",{ref:zt,className:G()("".concat(Kn,"-thumb"),(0,we.Z)({},"".concat(Kn,"-thumb-moving"),ht)),style:(0,be.Z)((0,be.Z)({},In),Be),onMouseDown:Ft}))}),et=Qe,gt=20;function bt(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,I=He/Se*He;return isNaN(I)&&(I=0),I=Math.max(I,gt),Math.floor(I)}var Vt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Rt=[],te={overflowY:"auto",overflowAnchor:"none"};function Le(He,Se){var I=He.prefixCls,g=I===void 0?"rc-virtual-list":I,v=He.className,Q=He.height,b=He.itemHeight,w=He.fullHeight,D=w===void 0?!0:w,Ae=He.style,L=He.data,oe=He.children,re=He.itemKey,Be=He.virtual,Ce=He.direction,Ie=He.scrollWidth,Re=He.component,ht=Re===void 0?"div":Re,Ye=He.onScroll,nt=He.onVirtualScroll,At=He.onVisibleChange,Ut=He.innerProps,Et=He.extraRender,vt=He.styles,tn=He.showScrollBar,en=tn===void 0?"optional":tn,Pt=(0,d.Z)(He,Vt),dn=p.useCallback(function(ze){return typeof re=="function"?re(ze):ze==null?void 0:ze[re]},[re]),Ln=K(dn,null,null),zt=(0,W.Z)(Ln,4),cn=zt[0],qe=zt[1],Ke=zt[2],je=zt[3],le=!!(Be!==!1&&Q&&b),Ee=p.useMemo(function(){return Object.values(Ke.maps).reduce(function(ze,it){return ze+it},0)},[Ke.id,Ke.maps]),ve=le&&L&&(Math.max(b*L.length,Ee)>Q||!!Ie),Te=Ce==="rtl",ne=G()(g,(0,we.Z)({},"".concat(g,"-rtl"),Te),v),Nt=L||Rt,$t=(0,p.useRef)(),Ft=(0,p.useRef)(),vn=(0,p.useRef)(),tr=(0,p.useState)(0),Kn=(0,W.Z)(tr,2),Mn=Kn[0],In=Kn[1],nr=(0,p.useState)(0),fr=(0,W.Z)(nr,2),qn=fr[0],ur=fr[1],$n=(0,p.useState)(!1),Nn=(0,W.Z)($n,2),Ge=Nn[0],Ue=Nn[1],qt=function(){Ue(!0)},Mt=function(){Ue(!1)},an={getKey:dn};function An(ze){In(function(it){var ot;typeof ze=="function"?ot=ze(it):ot=ze;var yt=Bn(ot);return $t.current.scrollTop=yt,yt})}var yn=(0,p.useRef)({start:0,end:Nt.length}),gn=(0,p.useRef)(),Yt=X(Nt,dn),Tt=(0,W.Z)(Yt,1),Qt=Tt[0];gn.current=Qt;var ln=p.useMemo(function(){if(!le)return{scrollHeight:void 0,start:0,end:Nt.length-1,offset:void 0};if(!ve){var ze;return{scrollHeight:((ze=Ft.current)===null||ze===void 0?void 0:ze.offsetHeight)||0,start:0,end:Nt.length-1,offset:void 0}}for(var it=0,ot,yt,ft,Jt=Nt.length,on=0;on<Jt;on+=1){var En=Nt[on],kn=dn(En),Cn=Ke.get(kn),Rn=it+(Cn===void 0?b:Cn);Rn>=Mn&&ot===void 0&&(ot=on,yt=it),Rn>Mn+Q&&ft===void 0&&(ft=on),it=Rn}return ot===void 0&&(ot=0,yt=0,ft=Math.ceil(Q/b)),ft===void 0&&(ft=Nt.length-1),ft=Math.min(ft+1,Nt.length-1),{scrollHeight:it,start:ot,end:ft,offset:yt}},[ve,le,Mn,Nt,je,Q]),sn=ln.scrollHeight,wn=ln.start,Un=ln.end,un=ln.offset;yn.current.start=wn,yn.current.end=Un,p.useLayoutEffect(function(){var ze=Ke.getRecord();if(ze.size===1){var it=Array.from(ze)[0],ot=Nt[wn];if(ot){var yt=dn(ot);if(yt===it){var ft=Ke.get(it),Jt=ft-b;An(function(on){return on+Jt})}}}Ke.resetRecord()},[sn]);var rn=p.useState({width:0,height:Q}),Me=(0,W.Z)(rn,2),ct=Me[0],St=Me[1],wt=function(it){St({width:it.offsetWidth,height:it.offsetHeight})},Wt=(0,p.useRef)(),st=(0,p.useRef)(),Bt=p.useMemo(function(){return bt(ct.width,Ie)},[ct.width,Ie]),Ht=p.useMemo(function(){return bt(ct.height,sn)},[ct.height,sn]),nn=sn-Q,mn=(0,p.useRef)(nn);mn.current=nn;function Bn(ze){var it=ze;return Number.isNaN(mn.current)||(it=Math.min(it,mn.current)),it=Math.max(it,0),it}var Dn=Mn<=0,Ct=Mn>=nn,N=qn<=0,O=qn>=Ie,ce=de(Dn,Ct,N,O),xe=function(){return{x:Te?-qn:qn,y:Mn}},$e=(0,p.useRef)(xe()),Pe=(0,S.zX)(function(ze){if(nt){var it=(0,be.Z)((0,be.Z)({},xe()),ze);($e.current.x!==it.x||$e.current.y!==it.y)&&(nt(it),$e.current=it)}});function Xe(ze,it){var ot=ze;it?((0,m.flushSync)(function(){ur(ot)}),Pe()):An(ot)}function lt(ze){var it=ze.currentTarget.scrollTop;it!==Mn&&An(it),Ye==null||Ye(ze),Pe()}var Zt=function(it){var ot=it,yt=Ie?Ie-ct.width:0;return ot=Math.max(ot,0),ot=Math.min(ot,yt),ot},Kt=(0,S.zX)(function(ze,it){it?((0,m.flushSync)(function(){ur(function(ot){var yt=ot+(Te?-ze:ze);return Zt(yt)})}),Pe()):An(function(ot){var yt=ot+ze;return yt})}),Ot=ie(le,Dn,Ct,N,O,!!Ie,Kt),Gt=(0,W.Z)(Ot,2),pe=Gt[0],Ve=Gt[1];he(le,$t,function(ze,it,ot,yt){var ft=yt;return ce(ze,it,ot)?!1:!ft||!ft._virtualHandled?(ft&&(ft._virtualHandled=!0),pe({preventDefault:function(){},deltaX:ze?it:0,deltaY:ze?0:it}),!0):!1}),y(ve,$t,function(ze){An(function(it){return it+ze})}),(0,k.Z)(function(){function ze(ot){var yt=Dn&&ot.detail<0,ft=Ct&&ot.detail>0;le&&!yt&&!ft&&ot.preventDefault()}var it=$t.current;return it.addEventListener("wheel",pe,{passive:!1}),it.addEventListener("DOMMouseScroll",Ve,{passive:!0}),it.addEventListener("MozMousePixelScroll",ze,{passive:!1}),function(){it.removeEventListener("wheel",pe),it.removeEventListener("DOMMouseScroll",Ve),it.removeEventListener("MozMousePixelScroll",ze)}},[le,Dn,Ct]),(0,k.Z)(function(){if(Ie){var ze=Zt(qn);ur(ze),Pe({x:ze})}},[ct.width,Ie]);var Ze=function(){var it,ot;(it=Wt.current)===null||it===void 0||it.delayHidden(),(ot=st.current)===null||ot===void 0||ot.delayHidden()},ke=ue($t,Nt,Ke,b,dn,function(){return qe(!0)},An,Ze);p.useImperativeHandle(Se,function(){return{nativeElement:vn.current,getScrollInfo:xe,scrollTo:function(it){function ot(yt){return yt&&(0,me.Z)(yt)==="object"&&("left"in yt||"top"in yt)}ot(it)?(it.left!==void 0&&ur(Zt(it.left)),ke(it.top)):ke(it)}}}),(0,k.Z)(function(){if(At){var ze=Nt.slice(wn,Un+1);At(ze,Nt)}},[wn,Un,Nt]);var tt=q(Nt,dn,Ke,b),Je=Et==null?void 0:Et({start:wn,end:Un,virtual:ve,offsetX:qn,offsetY:un,rtl:Te,getSize:tt}),at=j(Nt,wn,Un,Ie,qn,cn,oe,an),ut=null;Q&&(ut=(0,be.Z)((0,we.Z)({},D?"height":"maxHeight",Q),te),le&&(ut.overflowY="hidden",Ie&&(ut.overflowX="hidden"),Ge&&(ut.pointerEvents="none")));var pt={};return Te&&(pt.dir="rtl"),p.createElement("div",(0,M.Z)({ref:vn,style:(0,be.Z)((0,be.Z)({},Ae),{},{position:"relative"}),className:ne},pt,Pt),p.createElement(A.Z,{onResize:wt},p.createElement(ht,{className:"".concat(g,"-holder"),style:ut,ref:$t,onScroll:lt,onMouseEnter:Ze},p.createElement(F,{prefixCls:g,height:sn,offsetX:qn,offsetY:un,scrollWidth:Ie,onInnerResize:qe,ref:Ft,innerProps:Ut,rtl:Te,extra:Je},at))),ve&&sn>Q&&p.createElement(et,{ref:Wt,prefixCls:g,scrollOffset:Mn,scrollRange:sn,rtl:Te,onScroll:Xe,onStartMove:qt,onStopMove:Mt,spinSize:Ht,containerSize:ct.height,style:vt==null?void 0:vt.verticalScrollBar,thumbStyle:vt==null?void 0:vt.verticalScrollBarThumb,showScrollBar:en}),ve&&Ie>ct.width&&p.createElement(et,{ref:st,prefixCls:g,scrollOffset:qn,scrollRange:Ie,rtl:Te,onScroll:Xe,onStartMove:qt,onStopMove:Mt,spinSize:Bt,containerSize:ct.width,horizontal:!0,style:vt==null?void 0:vt.horizontalScrollBar,thumbStyle:vt==null?void 0:vt.horizontalScrollBarThumb,showScrollBar:en}))}var mt=p.forwardRef(Le);mt.displayName="List";var Ne=mt,It=Ne},83145:function(Zn,Dt,x){"use strict";Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.CopyToClipboard=void 0;var M=be(x(59301)),me=be(x(25769));function be(H){return H&&H.__esModule?H:{default:H}}function we(H){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?we=function(P){return typeof P}:we=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},we(H)}function W(H,X){var P=Object.keys(H);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(H);X&&(R=R.filter(function(fe){return Object.getOwnPropertyDescriptor(H,fe).enumerable})),P.push.apply(P,R)}return P}function d(H){for(var X=1;X<arguments.length;X++){var P=arguments[X]!=null?arguments[X]:{};X%2?W(P,!0).forEach(function(R){j(H,R,P[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(P)):W(P).forEach(function(R){Object.defineProperty(H,R,Object.getOwnPropertyDescriptor(P,R))})}return H}function ye(H,X){if(H==null)return{};var P=G(H,X),R,fe;if(Object.getOwnPropertySymbols){var de=Object.getOwnPropertySymbols(H);for(fe=0;fe<de.length;fe++)R=de[fe],!(X.indexOf(R)>=0)&&Object.prototype.propertyIsEnumerable.call(H,R)&&(P[R]=H[R])}return P}function G(H,X){if(H==null)return{};var P={},R=Object.keys(H),fe,de;for(de=0;de<R.length;de++)fe=R[de],!(X.indexOf(fe)>=0)&&(P[fe]=H[fe]);return P}function A(H,X){if(!(H instanceof X))throw new TypeError("Cannot call a class as a function")}function S(H,X){for(var P=0;P<X.length;P++){var R=X[P];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(H,R.key,R)}}function k(H,X,P){return X&&S(H.prototype,X),P&&S(H,P),H}function p(H,X){return X&&(we(X)==="object"||typeof X=="function")?X:B(H)}function m(H){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)},m(H)}function B(H){if(H===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H}function F(H,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(X&&X.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),X&&V(H,X)}function V(H,X){return V=Object.setPrototypeOf||function(R,fe){return R.__proto__=fe,R},V(H,X)}function j(H,X,P){return X in H?Object.defineProperty(H,X,{value:P,enumerable:!0,configurable:!0,writable:!0}):H[X]=P,H}var se=function(H){F(X,H);function X(){var P,R;A(this,X);for(var fe=arguments.length,de=new Array(fe),ie=0;ie<fe;ie++)de[ie]=arguments[ie];return R=p(this,(P=m(X)).call.apply(P,[this].concat(de))),j(B(R),"onClick",function(q){var ge=R.props,z=ge.text,Fe=ge.onCopy,Z=ge.children,U=ge.options,K=M.default.Children.only(Z),ee=(0,me.default)(z,U);Fe&&Fe(z,ee),K&&K.props&&typeof K.props.onClick=="function"&&K.props.onClick(q)}),R}return k(X,[{key:"render",value:function(){var R=this.props,fe=R.text,de=R.onCopy,ie=R.options,q=R.children,ge=ye(R,["text","onCopy","options","children"]),z=M.default.Children.only(q);return M.default.cloneElement(z,d({},ge,{onClick:this.onClick}))}}]),X}(M.default.PureComponent);Dt.CopyToClipboard=se,j(se,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Zn,Dt,x){"use strict";var M=x(83145),me=M.CopyToClipboard;me.CopyToClipboard=me,Zn.exports=me},76374:function(Zn,Dt,x){"use strict";var M=function(){if(typeof Map!="undefined")return Map;function Z(U,K){var ee=-1;return U.some(function(he,ae){return he[0]===K?(ee=ae,!0):!1}),ee}return function(){function U(){this.__entries__=[]}return Object.defineProperty(U.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),U.prototype.get=function(K){var ee=Z(this.__entries__,K),he=this.__entries__[ee];return he&&he[1]},U.prototype.set=function(K,ee){var he=Z(this.__entries__,K);~he?this.__entries__[he][1]=ee:this.__entries__.push([K,ee])},U.prototype.delete=function(K){var ee=this.__entries__,he=Z(ee,K);~he&&ee.splice(he,1)},U.prototype.has=function(K){return!!~Z(this.__entries__,K)},U.prototype.clear=function(){this.__entries__.splice(0)},U.prototype.forEach=function(K,ee){ee===void 0&&(ee=null);for(var he=0,ae=this.__entries__;he<ae.length;he++){var _=ae[he];K.call(ee,_[1],_[0])}},U}()}(),me=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,be=function(){return typeof x.g!="undefined"&&x.g.Math===Math?x.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),we=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(be):function(Z){return setTimeout(function(){return Z(Date.now())},1e3/60)}}(),W=2;function d(Z,U){var K=!1,ee=!1,he=0;function ae(){K&&(K=!1,Z()),ee&&y()}function _(){we(ae)}function y(){var Y=Date.now();if(K){if(Y-he<W)return;ee=!0}else K=!0,ee=!1,setTimeout(_,U);he=Y}return y}var ye=20,G=["top","right","bottom","left","width","height","size","weight"],A=typeof MutationObserver!="undefined",S=function(){function Z(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=d(this.refresh.bind(this),ye)}return Z.prototype.addObserver=function(U){~this.observers_.indexOf(U)||this.observers_.push(U),this.connected_||this.connect_()},Z.prototype.removeObserver=function(U){var K=this.observers_,ee=K.indexOf(U);~ee&&K.splice(ee,1),!K.length&&this.connected_&&this.disconnect_()},Z.prototype.refresh=function(){var U=this.updateObservers_();U&&this.refresh()},Z.prototype.updateObservers_=function(){var U=this.observers_.filter(function(K){return K.gatherActive(),K.hasActive()});return U.forEach(function(K){return K.broadcastActive()}),U.length>0},Z.prototype.connect_=function(){!me||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),A?(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(U){var K=U.propertyName,ee=K===void 0?"":K,he=G.some(function(ae){return!!~ee.indexOf(ae)});he&&this.refresh()},Z.getInstance=function(){return this.instance_||(this.instance_=new Z),this.instance_},Z.instance_=null,Z}(),k=function(Z,U){for(var K=0,ee=Object.keys(U);K<ee.length;K++){var he=ee[K];Object.defineProperty(Z,he,{value:U[he],enumerable:!1,writable:!1,configurable:!0})}return Z},p=function(Z){var U=Z&&Z.ownerDocument&&Z.ownerDocument.defaultView;return U||be},m=fe(0,0,0,0);function B(Z){return parseFloat(Z)||0}function F(Z){for(var U=[],K=1;K<arguments.length;K++)U[K-1]=arguments[K];return U.reduce(function(ee,he){var ae=Z["border-"+he+"-width"];return ee+B(ae)},0)}function V(Z){for(var U=["top","right","bottom","left"],K={},ee=0,he=U;ee<he.length;ee++){var ae=he[ee],_=Z["padding-"+ae];K[ae]=B(_)}return K}function j(Z){var U=Z.getBBox();return fe(0,0,U.width,U.height)}function se(Z){var U=Z.clientWidth,K=Z.clientHeight;if(!U&&!K)return m;var ee=p(Z).getComputedStyle(Z),he=V(ee),ae=he.left+he.right,_=he.top+he.bottom,y=B(ee.width),Y=B(ee.height);if(ee.boxSizing==="border-box"&&(Math.round(y+ae)!==U&&(y-=F(ee,"left","right")+ae),Math.round(Y+_)!==K&&(Y-=F(ee,"top","bottom")+_)),!X(Z)){var ue=Math.round(y+ae)-U,Qe=Math.round(Y+_)-K;Math.abs(ue)!==1&&(y-=ue),Math.abs(Qe)!==1&&(Y-=Qe)}return fe(he.left,he.top,y,Y)}var H=function(){return typeof SVGGraphicsElement!="undefined"?function(Z){return Z instanceof p(Z).SVGGraphicsElement}:function(Z){return Z instanceof p(Z).SVGElement&&typeof Z.getBBox=="function"}}();function X(Z){return Z===p(Z).document.documentElement}function P(Z){return me?H(Z)?j(Z):se(Z):m}function R(Z){var U=Z.x,K=Z.y,ee=Z.width,he=Z.height,ae=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,_=Object.create(ae.prototype);return k(_,{x:U,y:K,width:ee,height:he,top:K,right:U+ee,bottom:he+K,left:U}),_}function fe(Z,U,K,ee){return{x:Z,y:U,width:K,height:ee}}var de=function(){function Z(U){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=fe(0,0,0,0),this.target=U}return Z.prototype.isActive=function(){var U=P(this.target);return this.contentRect_=U,U.width!==this.broadcastWidth||U.height!==this.broadcastHeight},Z.prototype.broadcastRect=function(){var U=this.contentRect_;return this.broadcastWidth=U.width,this.broadcastHeight=U.height,U},Z}(),ie=function(){function Z(U,K){var ee=R(K);k(this,{target:U,contentRect:ee})}return Z}(),q=function(){function Z(U,K,ee){if(this.activeObservations_=[],this.observations_=new M,typeof U!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=U,this.controller_=K,this.callbackCtx_=ee}return Z.prototype.observe=function(U){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(U instanceof p(U).Element))throw new TypeError('parameter 1 is not of type "Element".');var K=this.observations_;K.has(U)||(K.set(U,new de(U)),this.controller_.addObserver(this),this.controller_.refresh())}},Z.prototype.unobserve=function(U){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(U instanceof p(U).Element))throw new TypeError('parameter 1 is not of type "Element".');var K=this.observations_;K.has(U)&&(K.delete(U),K.size||this.controller_.removeObserver(this))}},Z.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Z.prototype.gatherActive=function(){var U=this;this.clearActive(),this.observations_.forEach(function(K){K.isActive()&&U.activeObservations_.push(K)})},Z.prototype.broadcastActive=function(){if(this.hasActive()){var U=this.callbackCtx_,K=this.activeObservations_.map(function(ee){return new ie(ee.target,ee.broadcastRect())});this.callback_.call(U,K,U),this.clearActive()}},Z.prototype.clearActive=function(){this.activeObservations_.splice(0)},Z.prototype.hasActive=function(){return this.activeObservations_.length>0},Z}(),ge=typeof WeakMap!="undefined"?new WeakMap:new M,z=function(){function Z(U){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 K=S.getInstance(),ee=new q(U,K,this);ge.set(this,ee)}return Z}();["observe","unobserve","disconnect"].forEach(function(Z){z.prototype[Z]=function(){var U;return(U=ge.get(this))[Z].apply(U,arguments)}});var Fe=function(){return typeof be.ResizeObserver!="undefined"?be.ResizeObserver:z}();Dt.Z=Fe},98040:function(Zn){Zn.exports=function(){var Dt=document.getSelection();if(!Dt.rangeCount)return function(){};for(var x=document.activeElement,M=[],me=0;me<Dt.rangeCount;me++)M.push(Dt.getRangeAt(me));switch(x.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":x.blur();break;default:x=null;break}return Dt.removeAllRanges(),function(){Dt.type==="Caret"&&Dt.removeAllRanges(),Dt.rangeCount||M.forEach(function(be){Dt.addRange(be)}),x&&x.focus()}}},93314:function(Zn){"use strict";Zn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},46284:function(Zn,Dt,x){"use strict";x.d(Dt,{ZP:function(){return c}});const M=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},me=Number.isSafeInteger||function(r){return typeof r=="number"&&Math.abs(r)<=be},be=Number.MAX_SAFE_INTEGER||9007199254740991;let we=function(r){return r.NETWORK_ERROR="networkError",r.MEDIA_ERROR="mediaError",r.KEY_SYSTEM_ERROR="keySystemError",r.MUX_ERROR="muxError",r.OTHER_ERROR="otherError",r}({}),W=function(r){return r.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",r.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",r.KEY_SYSTEM_NO_SESSION="keySystemNoSession",r.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",r.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",r.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",r.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",r.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",r.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",r.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",r.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",r.MANIFEST_LOAD_ERROR="manifestLoadError",r.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",r.MANIFEST_PARSING_ERROR="manifestParsingError",r.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",r.LEVEL_EMPTY_ERROR="levelEmptyError",r.LEVEL_LOAD_ERROR="levelLoadError",r.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",r.LEVEL_PARSING_ERROR="levelParsingError",r.LEVEL_SWITCH_ERROR="levelSwitchError",r.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",r.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",r.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",r.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",r.FRAG_LOAD_ERROR="fragLoadError",r.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",r.FRAG_DECRYPT_ERROR="fragDecryptError",r.FRAG_PARSING_ERROR="fragParsingError",r.FRAG_GAP="fragGap",r.REMUX_ALLOC_ERROR="remuxAllocError",r.KEY_LOAD_ERROR="keyLoadError",r.KEY_LOAD_TIMEOUT="keyLoadTimeOut",r.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",r.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",r.BUFFER_APPEND_ERROR="bufferAppendError",r.BUFFER_APPENDING_ERROR="bufferAppendingError",r.BUFFER_STALLED_ERROR="bufferStalledError",r.BUFFER_FULL_ERROR="bufferFullError",r.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",r.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",r.ASSET_LIST_LOAD_ERROR="assetListLoadError",r.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",r.ASSET_LIST_PARSING_ERROR="assetListParsingError",r.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",r.INTERNAL_EXCEPTION="internalException",r.INTERNAL_ABORTED="aborted",r.ATTACH_MEDIA_ERROR="attachMediaError",r.UNKNOWN="unknown",r}({}),d=function(r){return r.MEDIA_ATTACHING="hlsMediaAttaching",r.MEDIA_ATTACHED="hlsMediaAttached",r.MEDIA_DETACHING="hlsMediaDetaching",r.MEDIA_DETACHED="hlsMediaDetached",r.MEDIA_ENDED="hlsMediaEnded",r.STALL_RESOLVED="hlsStallResolved",r.BUFFER_RESET="hlsBufferReset",r.BUFFER_CODECS="hlsBufferCodecs",r.BUFFER_CREATED="hlsBufferCreated",r.BUFFER_APPENDING="hlsBufferAppending",r.BUFFER_APPENDED="hlsBufferAppended",r.BUFFER_EOS="hlsBufferEos",r.BUFFERED_TO_END="hlsBufferedToEnd",r.BUFFER_FLUSHING="hlsBufferFlushing",r.BUFFER_FLUSHED="hlsBufferFlushed",r.MANIFEST_LOADING="hlsManifestLoading",r.MANIFEST_LOADED="hlsManifestLoaded",r.MANIFEST_PARSED="hlsManifestParsed",r.LEVEL_SWITCHING="hlsLevelSwitching",r.LEVEL_SWITCHED="hlsLevelSwitched",r.LEVEL_LOADING="hlsLevelLoading",r.LEVEL_LOADED="hlsLevelLoaded",r.LEVEL_UPDATED="hlsLevelUpdated",r.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",r.LEVELS_UPDATED="hlsLevelsUpdated",r.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",r.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",r.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",r.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",r.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",r.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",r.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",r.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",r.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",r.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",r.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",r.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",r.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",r.CUES_PARSED="hlsCuesParsed",r.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",r.INIT_PTS_FOUND="hlsInitPtsFound",r.FRAG_LOADING="hlsFragLoading",r.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",r.FRAG_LOADED="hlsFragLoaded",r.FRAG_DECRYPTED="hlsFragDecrypted",r.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",r.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",r.FRAG_PARSING_METADATA="hlsFragParsingMetadata",r.FRAG_PARSED="hlsFragParsed",r.FRAG_BUFFERED="hlsFragBuffered",r.FRAG_CHANGED="hlsFragChanged",r.FPS_DROP="hlsFpsDrop",r.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",r.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",r.ERROR="hlsError",r.DESTROYING="hlsDestroying",r.KEY_LOADING="hlsKeyLoading",r.KEY_LOADED="hlsKeyLoaded",r.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",r.BACK_BUFFER_REACHED="hlsBackBufferReached",r.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",r.ASSET_LIST_LOADING="hlsAssetListLoading",r.ASSET_LIST_LOADED="hlsAssetListLoaded",r.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",r.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",r.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",r.INTERSTITIAL_STARTED="hlsInterstitialStarted",r.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",r.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",r.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",r.INTERSTITIAL_ENDED="hlsInterstitialEnded",r.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",r.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",r.EVENT_CUE_ENTER="hlsEventCueEnter",r}({});var ye={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},G={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class A{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class S{constructor(e,t,n,i=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new A(e),this.fast_=new A(t),this.defaultTTFB_=i,this.ttfb_=new A(e)}update(e,t){const{slow_:n,fast_:i,ttfb_:s}=this;n.halfLife!==e&&(this.slow_=new A(e,n.getEstimate(),n.getTotalWeight())),i.halfLife!==t&&(this.fast_=new A(t,i.getEstimate(),i.getTotalWeight())),s.halfLife!==e&&(this.ttfb_=new A(e,s.getEstimate(),s.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,i=e/1e3,s=n/i;this.fast_.sample(i,s),this.slow_.sample(i,s)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function k(r,e,t){return(e=V(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function p(){return p=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},p.apply(null,arguments)}function m(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function B(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?m(Object(t),!0).forEach(function(n){k(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function F(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function V(r){var e=F(r,"string");return typeof e=="symbol"?e:e+""}class j{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const n=`[${e}]:`;this.trace=se,this.debug=t.debug.bind(null,n),this.log=t.log.bind(null,n),this.warn=t.warn.bind(null,n),this.info=t.info.bind(null,n),this.error=t.error.bind(null,n)}}const se=function(){},H={trace:se,debug:se,log:se,warn:se,info:se,error:se};function X(){return p({},H)}function P(r,e){const t=self.console[r];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${r}] >`):se}function R(r,e,t){return e[r]?e[r].bind(e):P(r,t)}const fe=X();function de(r,e,t){const n=X();if(typeof console=="object"&&r===!0||typeof r=="object"){const i=["debug","log","info","warn","error"];i.forEach(s=>{n[s]=R(s,r,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.1`)}catch(s){return X()}i.forEach(s=>{fe[s]=R(s,r)})}else p(fe,n);return n}const ie=fe;function q(r=!0){return typeof self=="undefined"?void 0:(r||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function ge(r){return typeof self!="undefined"&&r===self.ManagedMediaSource}function z(r,e){const t=Object.keys(r),n=Object.keys(e),i=t.length,s=n.length;return!i||!s||i===s&&!t.some(a=>n.indexOf(a)===-1)}function Fe(r,e=!1){if(typeof TextDecoder!="undefined"){const l=new TextDecoder("utf-8").decode(r);if(e){const f=l.indexOf("\0");return f!==-1?l.substring(0,f):l}return l.replace(/\0/g,"")}const t=r.length;let n,i,s,a="",o=0;for(;o<t;){if(n=r[o++],n===0&&e)return a;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(n);break;case 12:case 13:i=r[o++],a+=String.fromCharCode((n&31)<<6|i&63);break;case 14:i=r[o++],s=r[o++],a+=String.fromCharCode((n&15)<<12|(i&63)<<6|(s&63)<<0);break}}return a}const Z={hexDump:function(r){let e="";for(let t=0;t<r.length;t++){let n=r[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}};function U(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var K={exports:{}},ee;function he(){return ee||(ee=1,function(r,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(u,l,f){if(f=f||{},u=u.trim(),l=l.trim(),!l){if(!f.alwaysNormalize)return u;var h=o.parseURL(u);if(!h)throw new Error("Error trying to parse base URL.");return h.path=o.normalizePath(h.path),o.buildURLFromParts(h)}var E=o.parseURL(l);if(!E)throw new Error("Error trying to parse relative URL.");if(E.scheme)return f.alwaysNormalize?(E.path=o.normalizePath(E.path),o.buildURLFromParts(E)):l;var C=o.parseURL(u);if(!C)throw new Error("Error trying to parse base URL.");if(!C.netLoc&&C.path&&C.path[0]!=="/"){var T=i.exec(C.path);C.netLoc=T[1],C.path=T[2]}C.netLoc&&!C.path&&(C.path="/");var J={scheme:C.scheme,netLoc:E.netLoc,path:null,params:E.params,query:E.query,fragment:E.fragment};if(!E.netLoc&&(J.netLoc=C.netLoc,E.path[0]!=="/"))if(!E.path)J.path=C.path,E.params||(J.params=C.params,E.query||(J.query=C.query));else{var $=C.path,_e=$.substring(0,$.lastIndexOf("/")+1)+E.path;J.path=o.normalizePath(_e)}return J.path===null&&(J.path=f.alwaysNormalize?o.normalizePath(E.path):E.path),o.buildURLFromParts(J)},parseURL:function(u){var l=n.exec(u);return l?{scheme:l[1]||"",netLoc:l[2]||"",path:l[3]||"",params:l[4]||"",query:l[5]||"",fragment:l[6]||""}:null},normalizePath:function(u){for(u=u.split("").reverse().join("").replace(s,"");u.length!==(u=u.replace(a,"")).length;);return u.split("").reverse().join("")},buildURLFromParts:function(u){return u.scheme+u.netLoc+u.path+u.params+u.query+u.fragment}};r.exports=o})()}(K)),K.exports}var ae=he();class _{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 Y{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,bt(this,"stats")}setByteRange(e,t){const n=e.split("@",2);let i;n.length===1?i=(t==null?void 0:t.byteRangeEndOffset)||0:i=parseInt(n[1]),this._byteRange=[i,parseInt(n[0])+i]}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 _),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=ae.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 ue(r){return r.sn!=="initSegment"}class Qe extends Y{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(M(e)&&M(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const n=Object.keys(this.levelkeys);if(n.length===1)return this._decryptdata=this.levelkeys[n[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=M(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),n=t.length;if(n>1||n===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(!M(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return ue(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,i,s,a=!1){const{elementaryStreams:o}=this,u=o[e];if(!u){o[e]={startPTS:t,endPTS:n,startDTS:i,endDTS:s,partial:a};return}u.startPTS=Math.min(u.startPTS,t),u.endPTS=Math.max(u.endPTS,n),u.startDTS=Math.min(u.startDTS,i),u.endDTS=Math.max(u.endDTS,s)}}class et extends Y{constructor(e,t,n,i,s){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=i;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 gt(r,e){const t=Object.getPrototypeOf(r);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||gt(t,e)}}function bt(r,e){const t=gt(r,e);t&&(t.enumerable=!0,Object.defineProperty(r,e,t))}const Vt=Math.pow(2,32)-1,Rt=[].push,te={video:1,audio:2,id3:3,text:4};function Le(r){return String.fromCharCode.apply(null,r)}function mt(r,e){const t=r[e]<<8|r[e+1];return t<0?65536+t:t}function Ne(r,e){const t=He(r,e);return t<0?4294967296+t:t}function It(r,e){let t=Ne(r,e);return t*=Math.pow(2,32),t+=Ne(r,e+4),t}function He(r,e){return r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3]}function Se(r,e,t){r[e]=t>>24,r[e+1]=t>>16&255,r[e+2]=t>>8&255,r[e+3]=t&255}function I(r){const e=r.byteLength;for(let t=0;t<e;){const n=Ne(r,t);if(n>8&&r[t+4]===109&&r[t+5]===111&&r[t+6]===111&&r[t+7]===102)return!0;t=n>1?t+n:e}return!1}function g(r,e){const t=[];if(!e.length)return t;const n=r.byteLength;for(let i=0;i<n;){const s=Ne(r,i),a=Le(r.subarray(i+4,i+8)),o=s>1?i+s:n;if(a===e[0])if(e.length===1)t.push(r.subarray(i+8,o));else{const u=g(r.subarray(i+8,o),e.slice(1));u.length&&Rt.apply(t,u)}i=o}return t}function v(r){const e=[],t=r[0];let n=8;const i=Ne(r,n);n+=4;let s=0,a=0;t===0?(s=Ne(r,n),a=Ne(r,n+4),n+=8):(s=It(r,n),a=It(r,n+8),n+=16),n+=2;let o=r.length+a;const u=mt(r,n);n+=2;for(let l=0;l<u;l++){let f=n;const h=Ne(r,f);f+=4;const E=h&2147483647;if((h&2147483648)>>>31===1)return ie.warn("SIDX has hierarchical references (not supported)"),null;const T=Ne(r,f);f+=4,e.push({referenceSize:E,subsegmentDuration:T,info:{duration:T/i,start:o,end:o+E-1}}),o+=E,f+=4,n=f}return{earliestPresentationTime:s,timescale:i,version:t,referencesCount:u,references:e}}function Q(r){const e=[],t=g(r,["moov","trak"]);for(let i=0;i<t.length;i++){const s=t[i],a=g(s,["tkhd"])[0];if(a){let o=a[0];const u=Ne(a,o===0?12:20),l=g(s,["mdia","mdhd"])[0];if(l){o=l[0];const f=Ne(l,o===0?12:20),h=g(s,["mdia","hdlr"])[0];if(h){const E=Le(h.subarray(8,12)),C={soun:y.AUDIO,vide:y.VIDEO}[E],T=g(s,["mdia","minf","stbl","stsd"])[0],J=b(T);C?(e[u]={timescale:f,type:C,stsd:J},e[C]=B({timescale:f,id:u},J)):e[u]={timescale:f,type:E,stsd:J}}}}}return g(r,["moov","mvex","trex"]).forEach(i=>{const s=Ne(i,4),a=e[s];a&&(a.default={duration:Ne(i,12),flags:Ne(i,20)})}),e}function b(r){const e=r.subarray(8),t=e.subarray(86),n=Le(e.subarray(4,8));let i=n,s;const a=n==="enca"||n==="encv";if(a){const l=g(e,[n])[0].subarray(n==="enca"?28:78);g(l,["sinf"]).forEach(h=>{const E=g(h,["schm"])[0];if(E){const C=Le(E.subarray(4,8));if(C==="cbcs"||C==="cenc"){const T=g(h,["frma"])[0];T&&(i=Le(T))}}})}const o=i;switch(i){case"avc1":case"avc2":case"avc3":case"avc4":{const u=g(t,["avcC"])[0];u&&u.length>3&&(i+="."+Ae(u[1])+Ae(u[2])+Ae(u[3]),s=w(o==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const u=g(e,[n])[0],l=g(u.subarray(28),["esds"])[0];if(l&&l.length>7){let f=4;if(l[f++]!==3)break;f=D(l,f),f+=2;const h=l[f++];if(h&128&&(f+=2),h&64&&(f+=l[f++]),l[f++]!==4)break;f=D(l,f);const E=l[f++];if(E===64)i+="."+Ae(E);else break;if(f+=12,l[f++]!==5)break;f=D(l,f);const C=l[f++];let T=(C&248)>>3;T===31&&(T+=1+((C&7)<<3)+((l[f]&224)>>5)),i+="."+T}break}case"hvc1":case"hev1":{const u=g(t,["hvcC"])[0];if(u&&u.length>12){const l=u[1],f=["","A","B","C"][l>>6],h=l&31,E=Ne(u,2),C=(l&32)>>5?"H":"L",T=u[12],J=u.subarray(6,12);i+="."+f+h,i+="."+E.toString(16).toUpperCase(),i+="."+C+T;let $="";for(let _e=J.length;_e--;){const Oe=J[_e];(Oe||$)&&($="."+Oe.toString(16).toUpperCase()+$)}i+=$}s=w(o=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{i=w(i,t)||i;break}case"vp09":{const u=g(t,["vpcC"])[0];if(u&&u.length>6){const l=u[4],f=u[5],h=u[6]>>4&15;i+="."+L(l)+"."+L(f)+"."+L(h)}break}case"av01":{const u=g(t,["av1C"])[0];if(u&&u.length>2){const l=u[1]>>>5,f=u[1]&31,h=u[2]>>>7?"H":"M",E=(u[2]&64)>>6,C=(u[2]&32)>>5,T=l===2&&E?C?12:10:E?10:8,J=(u[2]&16)>>4,$=(u[2]&8)>>3,_e=(u[2]&4)>>2,Oe=u[2]&3;i+="."+l+"."+L(f)+h+"."+L(T)+"."+J+"."+$+_e+Oe+"."+L(1)+"."+L(1)+"."+L(1)+"."+0,s=w("dav1",t)}break}}return{codec:i,encrypted:a,supplemental:s}}function w(r,e){const t=g(e,["dvvC"]),n=t.length?t[0]:g(e,["dvcC"])[0];if(n){const i=n[2]>>1&127,s=n[2]<<5&32|n[3]>>3&31;return r+"."+L(i)+"."+L(s)}}function D(r,e){const t=e+5;for(;r[e++]&128&&e<t;);return e}function Ae(r){return("0"+r.toString(16).toUpperCase()).slice(-2)}function L(r){return(r<10?"0":"")+r}function oe(r,e){if(!r||!e)return r;const t=e.keyId;return t&&e.isCommonEncryption&&g(r,["moov","trak"]).forEach(i=>{const a=g(i,["mdia","minf","stbl","stsd"])[0].subarray(8);let o=g(a,["enca"]);const u=o.length>0;u||(o=g(a,["encv"])),o.forEach(l=>{const f=u?l.subarray(28):l.subarray(78);g(f,["sinf"]).forEach(E=>{const C=re(E);if(C){const T=C.subarray(8,24);T.some(J=>J!==0)||(ie.log(`[eme] Patching keyId in 'enc${u?"a":"v"}>sinf>>tenc' box: ${Z.hexDump(T)} -> ${Z.hexDump(t)}`),C.set(t,8))}})})}),r}function re(r){const e=g(r,["schm"])[0];if(e){const t=Le(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return g(r,["schi","tenc"])[0]}return null}function Be(r,e){return g(e,["moof","traf"]).reduce((t,n)=>{const i=g(n,["tfdt"])[0],s=i[0],a=g(n,["tfhd"]).reduce((o,u)=>{const l=Ne(u,4),f=r[l];if(f){let h=Ne(i,4);if(s===1){if(h===Vt)return ie.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),o;h*=Vt+1,h+=Ne(i,8)}const E=f.timescale||9e4,C=h/E;if(M(C)&&(o===null||C<o))return C}return o},null);return a!==null&&M(a)&&(t===null||a<t)?a:t},null)}function Ce(r,e){let t=0,n=0,i=0;const s=g(r,["moof","traf"]);for(let a=0;a<s.length;a++){const o=s[a],u=g(o,["tfhd"])[0],l=Ne(u,4),f=e[l];if(!f)continue;const h=f.default,E=Ne(u,0)|(h==null?void 0:h.flags);let C=h==null?void 0:h.duration;E&8&&(E&2?C=Ne(u,12):C=Ne(u,8));const T=f.timescale||9e4,J=g(o,["trun"]);for(let $=0;$<J.length;$++){if(t=Ie(J[$]),!t&&C){const _e=Ne(J[$],4);t=C*_e}f.type===y.VIDEO?n+=t/T:f.type===y.AUDIO&&(i+=t/T)}}if(n===0&&i===0){let a=1/0,o=0,u=0;const l=g(r,["sidx"]);for(let f=0;f<l.length;f++){const h=v(l[f]);if(h!=null&&h.references){a=Math.min(a,h.earliestPresentationTime/h.timescale);const E=h.references.reduce((C,T)=>C+T.info.duration||0,0);o=Math.max(o,E+h.earliestPresentationTime/h.timescale),u=o-a}}if(u&&M(u))return u}return n||i}function Ie(r){const e=Ne(r,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let n=0;const i=Ne(r,4);for(let s=0;s<i;s++){if(e&256){const a=Ne(r,t);n+=a,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return n}function Re(r,e,t){g(e,["moof","traf"]).forEach(n=>{g(n,["tfhd"]).forEach(i=>{const s=Ne(i,4),a=r[s];if(!a)return;const o=a.timescale||9e4;g(n,["tfdt"]).forEach(u=>{const l=u[0],f=t*o;if(f){let h=Ne(u,4);if(l===0)h-=f,h=Math.max(h,0),Se(u,4,h);else{h*=Math.pow(2,32),h+=Ne(u,8),h-=f,h=Math.max(h,0);const E=Math.floor(h/(Vt+1)),C=Math.floor(h%(Vt+1));Se(u,4,E),Se(u,8,C)}}})})})}function ht(r){const e={valid:null,remainder:null},t=g(r,["moof"]);if(t.length<2)return e.remainder=r,e;const n=t[t.length-1];return e.valid=r.slice(0,n.byteOffset-8),e.remainder=r.slice(n.byteOffset-8),e}function Ye(r,e){const t=new Uint8Array(r.length+e.length);return t.set(r),t.set(e,r.length),t}function nt(r,e){const t=[],n=e.samples,i=e.timescale,s=e.id;let a=!1;return g(n,["moof"]).map(u=>{const l=u.byteOffset-8;g(u,["traf"]).map(h=>{const E=g(h,["tfdt"]).map(C=>{const T=C[0];let J=Ne(C,4);return T===1&&(J*=Math.pow(2,32),J+=Ne(C,8)),J/i})[0];return E!==void 0&&(r=E),g(h,["tfhd"]).map(C=>{const T=Ne(C,4),J=Ne(C,0)&16777215,$=(J&1)!==0,_e=(J&2)!==0,Oe=(J&8)!==0;let De=0;const rt=(J&16)!==0;let We=0;const Lt=(J&32)!==0;let dt=8;T===s&&($&&(dt+=8),_e&&(dt+=4),Oe&&(De=Ne(C,dt),dt+=4),rt&&(We=Ne(C,dt),dt+=4),Lt&&(dt+=4),e.type==="video"&&(a=At(e.codec)),g(h,["trun"]).map(_t=>{const jt=_t[0],xt=Ne(_t,0)&16777215,xn=(xt&1)!==0;let bn=0;const wr=(xt&4)!==0,mr=(xt&256)!==0;let ar=0;const Xn=(xt&512)!==0;let dr=0;const Ar=(xt&1024)!==0,Tn=(xt&2048)!==0;let Qn=0;const Br=Ne(_t,4);let yr=8;xn&&(bn=Ne(_t,yr),yr+=4),wr&&(yr+=4);let Tr=bn+l;for(let Lr=0;Lr<Br;Lr++){if(mr?(ar=Ne(_t,yr),yr+=4):ar=De,Xn?(dr=Ne(_t,yr),yr+=4):dr=We,Ar&&(yr+=4),Tn&&(jt===0?Qn=Ne(_t,yr):Qn=He(_t,yr),yr+=4),e.type===y.VIDEO){let Hr=0;for(;Hr<dr;){const Xr=Ne(n,Tr);if(Tr+=4,Ut(a,n[Tr])){const Mi=n.subarray(Tr,Tr+Xr);Et(Mi,a?2:1,r+Qn/i,t)}Tr+=Xr,Hr+=Xr+4}}r+=ar/i}}))})})}),t}function At(r){if(!r)return!1;const e=r.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function Ut(r,e){if(r){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Et(r,e,t,n){const i=vt(r);let s=0;s+=e;let a=0,o=0,u=0;for(;s<i.length;){a=0;do{if(s>=i.length)break;u=i[s++],a+=u}while(u===255);o=0;do{if(s>=i.length)break;u=i[s++],o+=u}while(u===255);const l=i.length-s;let f=s;if(o<l)s+=o;else if(o>l){ie.error(`Malformed SEI payload. ${o} is too small, only ${l} bytes left to parse.`);break}if(a===4){if(i[f++]===181){const E=mt(i,f);if(f+=2,E===49){const C=Ne(i,f);if(f+=4,C===1195456820){const T=i[f++];if(T===3){const J=i[f++],$=31&J,_e=64&J,Oe=_e?2+$*3:0,De=new Uint8Array(Oe);if(_e){De[0]=J;for(let rt=1;rt<Oe;rt++)De[rt]=i[f++]}n.push({type:T,payloadType:a,pts:t,bytes:De})}}}}}else if(a===5&&o>16){const h=[];for(let T=0;T<16;T++){const J=i[f++].toString(16);h.push(J.length==1?"0"+J:J),(T===3||T===5||T===7||T===9)&&h.push("-")}const E=o-16,C=new Uint8Array(E);for(let T=0;T<E;T++)C[T]=i[f++];n.push({payloadType:a,pts:t,uuid:h.join(""),userData:Fe(C),userDataBytes:C})}}}function vt(r){const e=r.byteLength,t=[];let n=1;for(;n<e-2;)r[n]===0&&r[n+1]===0&&r[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return r;const i=e-t.length,s=new Uint8Array(i);let a=0;for(n=0;n<i;a++,n++)a===t[0]&&(a++,t.shift()),s[n]=r[a];return s}function tn(r){const e=r[0];let t="",n="",i=0,s=0,a=0,o=0,u=0,l=0;if(e===0){for(;Le(r.subarray(l,l+1))!=="\0";)t+=Le(r.subarray(l,l+1)),l+=1;for(t+=Le(r.subarray(l,l+1)),l+=1;Le(r.subarray(l,l+1))!=="\0";)n+=Le(r.subarray(l,l+1)),l+=1;n+=Le(r.subarray(l,l+1)),l+=1,i=Ne(r,12),s=Ne(r,16),o=Ne(r,20),u=Ne(r,24),l=28}else if(e===1){l+=4,i=Ne(r,l),l+=4;const h=Ne(r,l);l+=4;const E=Ne(r,l);for(l+=4,a=nc(2,32)*h+E,me(a)||(a=Number.MAX_SAFE_INTEGER,ie.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=Ne(r,l),l+=4,u=Ne(r,l),l+=4;Le(r.subarray(l,l+1))!=="\0";)t+=Le(r.subarray(l,l+1)),l+=1;for(t+=Le(r.subarray(l,l+1)),l+=1;Le(r.subarray(l,l+1))!=="\0";)n+=Le(r.subarray(l,l+1)),l+=1;n+=Le(r.subarray(l,l+1)),l+=1}const f=r.subarray(l,r.byteLength);return{schemeIdUri:t,value:n,timeScale:i,presentationTime:a,presentationTimeDelta:s,eventDuration:o,id:u,payload:f}}function en(r,...e){const t=e.length;let n=8,i=t;for(;i--;)n+=e[i].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(r,4),i=0,n=8;i<t;i++)s.set(e[i],n),n+=e[i].byteLength;return s}function Pt(r,e,t){if(r.byteLength!==16)throw new RangeError("Invalid system id");let n,i;n=0,i=new Uint8Array;let s;n>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),en([112,115,115,104],new Uint8Array([n,0,0,0]),r,s,i,a,t||new Uint8Array)}function dn(r){const e=[];if(r instanceof ArrayBuffer){const t=r.byteLength;let n=0;for(;n+32<t;){const i=new DataView(r,n),s=Ln(i);e.push(s),n+=s.size}}return e}function Ln(r){const e=r.getUint32(0),t=r.byteOffset,n=r.byteLength;if(n<e)return{offset:t,size:n};if(r.getUint32(4)!==1886614376)return{offset:t,size:e};const s=r.getUint32(8)>>>24;if(s!==0&&s!==1)return{offset:t,size:e};const a=r.buffer,o=Z.hexDump(new Uint8Array(a,t+12,16)),u=r.getUint32(28);let l=null,f=null;if(s===0){if(e-32<u||u<22)return{offset:t,size:e};f=new Uint8Array(a,t+32,u)}else if(s===1){if(!u||n<t+32+u*16+16)return{offset:t,size:e};l=[];for(let h=0;h<u;h++)l.push(new Uint8Array(a,t+32+h*16,16))}return{version:s,systemId:o,kids:l,data:f,offset:t,size:e}}const zt=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),cn={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 qe(r,e){const t=cn[e];return!!t&&!!t[r.slice(0,4)]}function Ke(r,e,t=!0){return!r.split(",").some(n=>!je(n,e,t))}function je(r,e,t=!0){var n;const i=q(t);return(n=i==null?void 0:i.isTypeSupported(le(r,e)))!=null?n:!1}function le(r,e){return`${e}/mp4;codecs=${r}`}function Ee(r){if(r){const e=r.substring(0,4);return cn.video[e]}return 2}function ve(r){const e=zt();return r.split(",").reduce((t,n)=>{const s=e&&At(n)?9:cn.video[n];return s?(s*2+t)/(t?3:2):(cn.audio[n]+t)/(t?2:1)},0)}const Te={};function ne(r,e=!0){if(Te[r])return Te[r];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[r];for(let i=0;i<t.length;i++){var n;if(je(t[i],"audio",e))return Te[r]=t[i],t[i];if(t[i]==="mp3"&&(n=q(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return r}const Nt=/flac|opus|mp4a\.40\.34/i;function $t(r,e=!0){return r.replace(Nt,t=>ne(t.toLowerCase(),e))}function Ft(r,e){const t=[];if(r){const n=r.split(",");for(let i=0;i<n.length;i++)qe(n[i],"video")||t.push(n[i])}return e&&t.push(e),t.join(",")}function vn(r,e){if(r&&(r.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(r)!==-1))return r;if(e){const t=e.split(",");if(t.length>1){if(r){for(let n=t.length;n--;)if(t[n].substring(0,4)===r.substring(0,4))return t[n]}return t[0]}}return e||r}function tr(r){const e=r.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");if(n.length>2){let i=n.shift()+".";i+=parseInt(n.shift()).toString(16),i+=("000"+parseInt(n.shift()).toString(16)).slice(-4),e[t]=i}}return e.join(",")}function Kn(r){if(r.startsWith("av01.")){const e=r.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return r}function Mn(r){const e=q(r)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function In(r){return r.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const nr={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function fr(r,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:r}}const qn={};function ur(r,e,t,n,i,s){const a=r.audioCodec?r.audioGroups:null,o=s==null?void 0:s.audioCodec,u=s==null?void 0:s.channels,l=u?parseInt(u):o?1/0:2;let f=null;if(a!=null&&a.length)try{a.length===1&&a[0]?f=e.groups[a[0]].channels:f=a.reduce((h,E)=>{if(E){const C=e.groups[E];if(!C)throw new Error(`Audio track group ${E} not found`);Object.keys(C.channels).forEach(T=>{h[T]=(h[T]||0)+C.channels[T]})}return h},{2:0})}catch(h){return!0}return r.videoCodec!==void 0&&(r.width>1920&&r.height>1088||r.height>1920&&r.width>1088||r.frameRate>Math.max(n,30)||r.videoRange!=="SDR"&&r.videoRange!==t||r.bitrate>Math.max(i,8e6))||!!f&&M(l)&&Object.keys(f).some(h=>parseInt(h)>l)}function $n(r,e,t){const n=r.videoCodec,i=r.audioCodec;if(!n&&!i||!t)return Promise.resolve(nr);const s=[];if(n){const a={width:r.width,height:r.height,bitrate:Math.ceil(Math.max(r.bitrate*.9,r.averageBitrate)),framerate:r.frameRate||30},o=r.videoRange;o!=="SDR"&&(a.transferFunction=o.toLowerCase());const u=n.split(","),l=navigator.userAgent;if(u.some(f=>At(f))&&zt())return Promise.resolve(fr(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${l})`),s));s.push.apply(s,u.map(f=>({type:"media-source",video:B(B({},a),{},{contentType:le(Kn(f),"video")})})))}return i&&r.audioGroups&&r.audioGroups.forEach(a=>{var o;a&&((o=e.groups[a])==null||o.tracks.forEach(u=>{if(u.groupId===a){const l=u.channels||"",f=parseFloat(l);M(f)&&f>2&&s.push.apply(s,i.split(",").map(h=>({type:"media-source",audio:{contentType:le(h,"audio"),channels:""+f}})))}}))}),Promise.all(s.map(a=>{const o=Nn(a);return qn[o]||(qn[o]=t.decodingInfo(a))})).then(a=>({supported:!a.some(o=>!o.supported),configurations:s,decodingInfoResults:a})).catch(a=>({supported:!1,configurations:s,decodingInfoResults:[],error:a}))}function Nn(r){const{audio:e,video:t}=r,n=t||e;if(n){const i=In(n.contentType);if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${i}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${i}`}return""}const Ge=["NONE","TYPE-0","TYPE-1",null];function Ue(r){return Ge.indexOf(r)>-1}const qt=["SDR","PQ","HLG"];function Mt(r){return!!r&&qt.indexOf(r)>-1}var an={No:"",Yes:"YES",v2:"v2"};function An(r){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=r,i=n<e/2;return e&&i?t?an.v2:an.Yes:an.No}class yn{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class gn{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(n=>!!n).map(n=>n.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const n=(t=e.supplemental)==null?void 0:t.videoCodec;n&&n!==e.videoCodec&&(this.codecSet+=`,${n.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Yt(this._audioGroups,e)}hasSubtitleGroup(e){return Yt(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let n=this._audioGroups;n||(n=this._audioGroups=[]),n.indexOf(t)===-1&&n.push(t)}else if(e==="text"){let n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),n.indexOf(t)===-1&&n.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Yt(r,e){return!e||!r?!1:r.indexOf(e)!==-1}function Tt(){if(typeof matchMedia=="function"){const r=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(r.media!==e.media)return r.matches===!0}return!1}function Qt(r,e){let t=!1,n=[];if(r&&(t=r!=="SDR",n=[r]),e){n=e.allowedVideoRanges||qt.slice(0);const i=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:i&&Tt(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const ln=r=>{const e=new WeakSet;return(t,n)=>{if(r&&(n=r(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},sn=(r,e)=>JSON.stringify(r,ln(e));function wn(r,e,t,n,i){const s=Object.keys(r),a=n==null?void 0:n.channels,o=n==null?void 0:n.audioCodec,u=i==null?void 0:i.videoCodec,l=a&&parseInt(a)===2;let f=!1,h=!1,E=1/0,C=1/0,T=1/0,J=1/0,$=0,_e=[];const{preferHDR:Oe,allowedVideoRanges:De}=Qt(e,i);for(let _t=s.length;_t--;){const jt=r[s[_t]];f||(f=jt.channels[2]>0),E=Math.min(E,jt.minHeight),C=Math.min(C,jt.minFramerate),T=Math.min(T,jt.minBitrate),De.filter(xn=>jt.videoRanges[xn]>0).length>0&&(h=!0)}E=M(E)?E:0,C=M(C)?C:0;const rt=Math.max(1080,E),We=Math.max(30,C);T=M(T)?T:t,t=Math.max(T,t),h||(e=void 0);const Lt=s.length>1;return{codecSet:s.reduce((_t,jt)=>{const xt=r[jt];if(jt===_t)return _t;if(_e=h?De.filter(xn=>xt.videoRanges[xn]>0):[],Lt){if(xt.minBitrate>t)return Un(jt,`min bitrate of ${xt.minBitrate} > current estimate of ${t}`),_t;if(!xt.hasDefaultAudio)return Un(jt,"no renditions with default or auto-select sound found"),_t;if(o&&jt.indexOf(o.substring(0,4))%5!==0)return Un(jt,`audio codec preference "${o}" not found`),_t;if(a&&!l){if(!xt.channels[a])return Un(jt,`no renditions with ${a} channel sound found (channels options: ${Object.keys(xt.channels)})`),_t}else if((!o||l)&&f&&xt.channels[2]===0)return Un(jt,"no renditions with stereo sound found"),_t;if(xt.minHeight>rt)return Un(jt,`min resolution of ${xt.minHeight} > maximum of ${rt}`),_t;if(xt.minFramerate>We)return Un(jt,`min framerate of ${xt.minFramerate} > maximum of ${We}`),_t;if(!_e.some(xn=>xt.videoRanges[xn]>0))return Un(jt,`no variants with VIDEO-RANGE of ${sn(_e)} found`),_t;if(u&&jt.indexOf(u.substring(0,4))%5!==0)return Un(jt,`video codec preference "${u}" not found`),_t;if(xt.maxScore<$)return Un(jt,`max score of ${xt.maxScore} < selected max of ${$}`),_t}return _t&&(ve(jt)>=ve(_t)||xt.fragmentError>r[_t].fragmentError)?_t:(J=xt.minIndex,$=xt.maxScore,jt)},void 0),videoRanges:_e,preferHDR:Oe,minFramerate:C,minBitrate:T,minIndex:J}}function Un(r,e){ie.log(`[abr] start candidates with "${r}" ignored because ${e}`)}function un(r){return r.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const i=t.channels||"2";return n.channels[i]=(n.channels[i]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function rn(r,e,t,n){return r.slice(t,n+1).reduce((i,s,a)=>{if(!s.codecSet)return i;const o=s.audioGroups;let u=i[s.codecSet];u||(i[s.codecSet]=u={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:a,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!o,fragmentError:0}),u.minBitrate=Math.min(u.minBitrate,s.bitrate);const l=Math.min(s.height,s.width);return u.minHeight=Math.min(u.minHeight,l),u.minFramerate=Math.min(u.minFramerate,s.frameRate),u.minIndex=Math.min(u.minIndex,a),u.maxScore=Math.max(u.maxScore,s.score),u.fragmentError+=s.fragmentError,u.videoRanges[s.videoRange]=(u.videoRanges[s.videoRange]||0)+1,o&&o.forEach(f=>{if(!f)return;const h=e.groups[f];h&&(u.hasDefaultAudio=u.hasDefaultAudio||e.hasDefaultAudio?h.hasDefault:h.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(h.channels).forEach(E=>{u.channels[E]=(u.channels[E]||0)+h.channels[E]}))}),i},{})}function Me(r){if(!r)return r;const{lang:e,assocLang:t,characteristics:n,channels:i,audioCodec:s}=r;return{lang:e,assocLang:t,characteristics:n,channels:i,audioCodec:s}}function ct(r,e,t){if("attrs"in r){const n=e.indexOf(r);if(n!==-1)return n}for(let n=0;n<e.length;n++){const i=e[n];if(St(r,i,t))return n}return-1}function St(r,e,t){const{groupId:n,name:i,lang:s,assocLang:a,default:o}=r,u=r.forced;return(n===void 0||e.groupId===n)&&(i===void 0||e.name===i)&&(s===void 0||wt(s,e.lang))&&(s===void 0||e.assocLang===a)&&(o===void 0||e.default===o)&&(u===void 0||e.forced===u)&&(!("characteristics"in r)||Wt(r.characteristics||"",e.characteristics))&&(t===void 0||t(r,e))}function wt(r,e="--"){return r.length===e.length?r===e:r.startsWith(e)||e.startsWith(r)}function Wt(r,e=""){const t=r.split(","),n=e.split(",");return t.length===n.length&&!t.some(i=>n.indexOf(i)===-1)}function st(r,e){const{audioCodec:t,channels:n}=r;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function Bt(r,e,t,n,i){const s=e[n],o=e.reduce((E,C,T)=>{const J=C.uri;return(E[J]||(E[J]=[])).push(T),E},{})[s.uri];o.length>1&&(n=Math.max.apply(Math,o));const u=s.videoRange,l=s.frameRate,f=s.codecSet.substring(0,4),h=Ht(e,n,E=>{if(E.videoRange!==u||E.frameRate!==l||E.codecSet.substring(0,4)!==f)return!1;const C=E.audioGroups,T=t.filter(J=>!C||C.indexOf(J.groupId)!==-1);return ct(r,T,i)>-1});return h>-1?h:Ht(e,n,E=>{const C=E.audioGroups,T=t.filter(J=>!C||C.indexOf(J.groupId)!==-1);return ct(r,T,i)>-1})}function Ht(r,e,t){for(let n=e;n>-1;n--)if(t(r[n]))return n;for(let n=e+1;n<r.length;n++)if(t(r[n]))return n;return-1}function nn(r,e){var t;return!!r&&r!==((t=e.loadLevelObj)==null?void 0:t.uri)}class mn extends j{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 n;const{fragCurrent:i,partCurrent:s,hls:a}=this,{autoLevelEnabled:o,media:u}=a;if(!i||!u)return;const l=performance.now(),f=s?s.stats:i.stats,h=s?s.duration:i.duration,E=l-f.loading.start,C=a.minAutoLevel,T=i.level,J=this._nextAutoLevel;if(f.aborted||f.loaded&&f.loaded===f.total||T<=C){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const $=J>-1&&J!==T,_e=!!t||$;if(!_e&&(u.paused||!u.playbackRate||!u.readyState))return;const Oe=a.mainForwardBufferInfo;if(!_e&&Oe===null)return;const De=this.bwEstimator.getEstimateTTFB(),rt=Math.abs(u.playbackRate);if(E<=Math.max(De,1e3*(h/(rt*2))))return;const We=Oe?Oe.len/rt:0,Lt=f.loading.first?f.loading.first-f.loading.start:-1,dt=f.loaded&&Lt>-1,_t=this.getBwEstimate(),jt=a.levels,xt=jt[T],xn=Math.max(f.loaded,Math.round(h*(i.bitrate||xt.averageBitrate)/8));let bn=dt?E-Lt:E;bn<1&&dt&&(bn=Math.min(E,f.loaded*8/_t));const wr=dt?f.loaded*1e3/bn:0,mr=De/1e3,ar=wr?(xn-f.loaded)/wr:xn*8/_t+mr;if(ar<=We)return;const Xn=wr?wr*8:_t,dr=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,Ar=this.hls.config.abrBandWidthUpFactor;let Tn=Number.POSITIVE_INFINITY,Qn;for(Qn=T-1;Qn>C;Qn--){const Lr=jt[Qn].maxBitrate,Hr=!jt[Qn].details||dr;if(Tn=this.getTimeToLoadFrag(mr,Xn,h*Lr,Hr),Tn<Math.min(We,h+mr))break}if(Tn>=ar||Tn>h*10)return;dt?this.bwEstimator.sample(E-Math.min(De,Lt),f.loaded):this.bwEstimator.sampleTTFB(E);const Br=jt[Qn].maxBitrate;this.getBwEstimate()*Ar>Br&&this.resetEstimator(Br);const yr=this.findBestLevel(Br,C,Qn,0,We,1,1);yr>-1&&(Qn=yr),this.warn(`Fragment ${i.sn}${s?" part "+s.index:""} of level ${T} is loading too slowly;
Fragment duration: ${i.duration.toFixed(3)}
Time to underbuffer: ${We.toFixed(3)} s
Estimated load time for current fragment: ${ar.toFixed(3)} s
Estimated load time for down switch fragment: ${Tn.toFixed(3)} s
TTFB estimate: ${Lt|0} ms
Current BW estimate: ${M(_t)?_t|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${Qn} @ ${Br|0} bps`),a.nextLoadLevel=a.nextAutoLevel=Qn,this.clearTimer();const Tr=()=>{if(this.clearTimer(),this.fragCurrent===i&&this.hls.loadLevel===Qn&&Qn>0){const Lr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Qn>0?"and switching down":""}
Fragment duration: ${i.duration.toFixed(3)} s
Time to underbuffer: ${Lr.toFixed(3)} s`),i.abortRequests(),this.fragCurrent=this.partCurrent=null,Qn>C){let Hr=this.findBestLevel(this.hls.levels[C].bitrate,C,Qn,0,Lr,1,1);Hr===-1&&(Hr=C),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Hr,this.resetEstimator(this.hls.levels[Hr].bitrate)}}};$||ar>Tn*2?Tr():this.timer=self.setInterval(Tr,Tn*1e3),a.trigger(d.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:s,stats:f})},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 S(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.FRAG_LOADING,this.onFragLoading,this),e.on(d.FRAG_LOADED,this.onFragLoaded,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this),e.on(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(d.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.FRAG_LOADING,this.onFragLoading,this),e.off(d.FRAG_LOADED,this.onFragLoaded,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this),e.off(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(d.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(d.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 n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var i;this.fragCurrent=n,this.partCurrent=(i=t.part)!=null?i: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 n=t.frag,{fragCurrent:i,partCurrent:s}=this;if(n&&i&&n.sn===i.sn&&n.level===i.level){const a=performance.now(),o=s?s.stats:n.stats,u=a-o.loading.start,l=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&l>-1){const h=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(u-Math.min(h,l),o.loaded)}else this.bwEstimator.sampleTTFB(u)}break}}}getTimeToLoadFrag(e,t,n,i){const s=e+n/t,a=i?e+this.lastLevelLoadSec:0;return s+a}onLevelLoaded(e,t){const n=this.hls.config,{loading:i}=t.stats,s=i.end-i.first;M(s)&&(this.lastLevelLoadSec=s/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const i=n?n.stats:t.stats;if(t.type===G.MAIN&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const s=n?n.duration:t.duration,a=this.hls.levels[t.level],o=(a.loaded?a.loaded.bytes:0)+i.loaded,u=(a.loaded?a.loaded.duration:0)+s;a.loaded={bytes:o,duration:u},a.realBitrate=Math.round(8*o/u)}if(t.bitrateTest){const s={stats:i,frag:t,part:n,id:t.type};this.onFragBuffered(d.FRAG_BUFFERED,s),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:i}=t,s=i!=null&&i.stats.loaded?i.stats:n.stats;if(s.aborted||this.ignoreFragment(n))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(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==G.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),i=this.hls.config.maxStarvationDelay,s=this.findBestLevel(n,t,e,0,i,1,1);if(s>-1)return s;const a=this.hls.firstLevel,o=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 ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,n=this.bwEstimator.canEstimate(),i=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!i||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const s=n&&i?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:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:i,config:s,minAutoLevel:a}=n,o=t?t.duration:e?e.duration:0,u=this.getBwEstimate(),l=this.getStarvationDelay();let f=s.abrBandWidthFactor,h=s.abrBandWidthUpFactor;if(l){const $=this.findBestLevel(u,a,i,l,0,f,h);if($>=0)return this.rebufferNotice=-1,$}let E=o?Math.min(o,s.maxStarvationDelay):s.maxStarvationDelay;if(!l){const $=this.bitrateTestDelay;$&&(E=(o?Math.min(o,s.maxLoadingDelay):s.maxLoadingDelay)-$,this.info(`bitrate test took ${Math.round(1e3*$)}ms, set first fragment max fetchDuration to ${Math.round(1e3*E)} ms`),f=h=1)}const C=this.findBestLevel(u,a,i,l,E,f,h);if(this.rebufferNotice!==C&&(this.rebufferNotice=C,this.info(`${l?"rebuffering expected":"buffer is empty"}, optimal quality level ${C}`)),C>-1)return C;const T=n.levels[a],J=n.loadLevelObj;return J&&(T==null?void 0:T.bitrate)<J.bitrate?a:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,i=e.mainForwardBufferInfo;return(i?i.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,i,s,a,o){var u;const l=i+s,f=this.lastLoadedFragLevel,h=f===-1?this.hls.firstLevel:f,{fragCurrent:E,partCurrent:C}=this,{levels:T,allAudioTracks:J,loadLevel:$,config:_e}=this.hls;if(T.length===1)return 0;const Oe=T[h],De=!!((u=this.hls.latestLevelDetails)!=null&&u.live),rt=$===-1||f===-1;let We,Lt="SDR",dt=(Oe==null?void 0:Oe.frameRate)||0;const{audioPreference:_t,videoPreference:jt}=_e,xt=this.audioTracksByGroup||(this.audioTracksByGroup=un(J));let xn=-1;if(rt){if(this.firstSelection!==-1)return this.firstSelection;const Xn=this.codecTiers||(this.codecTiers=rn(T,xt,t,n)),dr=wn(Xn,Lt,e,_t,jt),{codecSet:Ar,videoRanges:Tn,minFramerate:Qn,minBitrate:Br,minIndex:yr,preferHDR:Tr}=dr;xn=yr,We=Ar,Lt=Tr?Tn[Tn.length-1]:Tn[0],dt=Qn,e=Math.max(e,Br),this.log(`picked start tier ${sn(dr)}`)}else We=Oe==null?void 0:Oe.codecSet,Lt=Oe==null?void 0:Oe.videoRange;const bn=C?C.duration:E?E.duration:0,wr=this.bwEstimator.getEstimateTTFB()/1e3,mr=[];for(let Xn=n;Xn>=t;Xn--){var ar;const dr=T[Xn],Ar=Xn>h;if(!dr)continue;if(_e.useMediaCapabilities&&!dr.supportedResult&&!dr.supportedPromise){const Hr=navigator.mediaCapabilities;typeof(Hr==null?void 0:Hr.decodingInfo)=="function"&&(ur(dr,xt,Lt,dt,e,_t)||At(dr.videoCodec))?(dr.supportedPromise=$n(dr,xt,Hr),dr.supportedPromise.then(Xr=>{if(!this.hls)return;dr.supportedResult=Xr;const Mi=this.hls.levels,zi=Mi.indexOf(dr);Xr.error?this.warn(`MediaCapabilities decodingInfo error: "${Xr.error}" for level ${zi} ${sn(Xr)}`):Xr.supported||(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${zi} ${sn(Xr)}`),zi>-1&&Mi.length>1&&(this.log(`Removing unsupported level ${zi}`),this.hls.removeLevel(zi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))})):dr.supportedResult=nr}if((We&&dr.codecSet!==We||Lt&&dr.videoRange!==Lt||Ar&&dt>dr.frameRate||!Ar&&dt>0&&dt<dr.frameRate||dr.supportedResult&&!((ar=dr.supportedResult.decodingInfoResults)!=null&&ar[0].smooth))&&(!rt||Xn!==xn)){mr.push(Xn);continue}const Tn=dr.details,Qn=(C?Tn==null?void 0:Tn.partTarget:Tn==null?void 0:Tn.averagetargetduration)||bn;let Br;Ar?Br=o*e:Br=a*e;const yr=bn&&i>=bn*2&&s===0?dr.averageBitrate:dr.maxBitrate,Tr=this.getTimeToLoadFrag(wr,Br,yr*Qn,Tn===void 0);if(Br>=yr&&(Xn===f||dr.loadError===0&&dr.fragmentError===0)&&(Tr<=wr||!M(Tr)||De&&!this.bitrateTestDelay||Tr<l)){const Hr=this.forcedAutoLevel;return Xn!==$&&(Hr===-1||Hr!==$)&&(mr.length&&this.trace(`Skipped level(s) ${mr.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${T[mr[0]].codecs}" ${T[mr[0]].videoRange}; not compatible with "${We}" ${Lt}`),this.info(`switch candidate:${h}->${Xn} adjustedbw(${Math.round(Br)})-bitrate=${Math.round(Br-yr)} ttfb:${wr.toFixed(1)} avgDuration:${Qn.toFixed(1)} maxFetchDuration:${l.toFixed(1)} fetchDuration:${Tr.toFixed(1)} firstSelection:${rt} codecSet:${dr.codecSet} videoRange:${dr.videoRange} hls.loadLevel:${$}`)),rt&&(this.firstSelection=Xn),Xn}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}}const Bn={search:function(r,e){let t=0,n=r.length-1,i=null,s=null;for(;t<=n;){i=(t+n)/2|0,s=r[i];const a=e(s);if(a>0)t=i+1;else if(a<0)n=i-1;else return s}return null}};function Dn(r,e,t){if(e===null||!Array.isArray(r)||!r.length||!M(e))return null;const n=r[0].programDateTime;if(e<(n||0))return null;const i=r[r.length-1].endProgramDateTime;if(e>=(i||0))return null;t=t||0;for(let s=0;s<r.length;++s){const a=r[s];if(ce(e,t,a))return a}return null}function Ct(r,e,t=0,n=0,i=.005){let s=null;if(r){s=e[1+r.sn-e[0].sn]||null;const o=r.endDTS-t;o>0&&o<15e-7&&(t+=15e-7),s&&r.level!==s.level&&s.end<=r.end&&(s=e[2+r.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(s=e[0]);if(s&&((!r||r.level===s.level)&&O(t,n,s)===0||N(s,r,Math.min(i,n))))return s;const a=Bn.search(e,O.bind(null,t,n));return a&&(a!==r||!s)?a:s}function N(r,e,t){if(e&&e.start===0&&e.level<r.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((i,s)=>(s[0]==="INF"&&(i+=parseFloat(s[1])),i),t);return r.start<=n}return!1}function O(r=0,e=0,t){if(t.start<=r&&t.start+t.duration>r)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=r?1:t.start-n>r&&t.start?-1:0}function ce(r,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>r}function xe(r,e){return Bn.search(r,t=>t.cc<e?1:t.cc>e?-1:0)}function $e(r,e,t){if(r&&r.startCC<=e&&r.endCC>=e){const n=t.start,i=t.end;let s=r.fragments;if(!t.relurl){const{fragmentHint:a}=r;a&&(s=s.concat(a))}return Bn.search(s,a=>a.cc<e||a.end<=n?1:a.cc>e||a.start>=i?-1:0)}return null}function Pe(r){switch(r.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 Xe(r,e){const t=Pe(e);return r.default[`${t?"timeout":"error"}Retry`]}function lt(r,e){const t=r.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*r.retryDelayMs,r.maxRetryDelayMs)}function Zt(r){return B(B({},r),{errorRetry:null,timeoutRetry:null})}function Kt(r,e,t,n){if(!r)return!1;const i=n==null?void 0:n.code,s=e<r.maxNumRetry&&(Ot(i)||!!t);return r.shouldRetry?r.shouldRetry(r,e,t,n,s):s}function Ot(r){return r===0&&navigator.onLine===!1||!!r&&(r<400||r>499)}var Gt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},pe={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Ve extends j{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(d.ERROR,this.onError,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(d.ERROR,this.onError,this),e.off(d.ERROR,this.onErrorOut,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.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)===G.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const i=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((n=t.frag)!=null&&n.gap){t.errorAction=Ze();return}case W.FRAG_GAP:case W.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Gt.SendAlternateToPenaltyBox;return}case W.LEVEL_EMPTY_ERROR:case W.LEVEL_PARSING_ERROR:{var a,o;const l=t.parent===G.MAIN?t.level:i.loadLevel;t.details===W.LEVEL_EMPTY_ERROR&&((a=t.context)!=null&&(o=a.levelDetails)!=null&&o.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,l):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,l))}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 l=i.loadLevelObj;if(l&&(s.type===ye.AUDIO_TRACK&&l.hasAudioGroup(s.groupId)||s.type===ye.SUBTITLE_TRACK&&l.hasSubtitleGroup(s.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.loadLevel),t.errorAction.action=Gt.SendAlternateToPenaltyBox,t.errorAction.flags=pe.MoveAllAlternatesMatchingHost;return}}return;case W.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const l=i.loadLevelObj,f=l==null?void 0:l.attrs["HDCP-LEVEL"];f?t.errorAction={action:Gt.SendAlternateToPenaltyBox,flags:pe.MoveAllAlternatesMatchingHDCP,hdcpLevel:f}:this.keySystemError(t)}return;case W.BUFFER_ADD_CODEC_ERROR:case W.REMUX_ALLOC_ERROR:case W.BUFFER_APPEND_ERROR:if(!t.errorAction){var u;t.errorAction=this.getLevelSwitchAction(t,(u=t.level)!=null?u:i.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=Ze();return}t.type===we.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 n=this.hls,i=Xe(n.config.playlistLoadPolicy,e),s=this.playlistError++;if(Kt(i,s,Pe(e),e.response))return{action:Gt.RetryRequest,flags:pe.None,retryConfig:i,retryCount:s};const o=this.getLevelSwitchAction(e,t);return i&&(o.retryConfig=i,o.retryCount=s),o}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),i=t.levels[n],{fragLoadPolicy:s,keyLoadPolicy:a}=t.config,o=Xe(e.details.startsWith("key")?a:s,e),u=t.levels.reduce((f,h)=>f+h.fragmentError,0);if(i&&(e.details!==W.FRAG_GAP&&i.fragmentError++,Kt(o,u,Pe(e),e.response)))return{action:Gt.RetryRequest,flags:pe.None,retryConfig:o,retryCount:u};const l=this.getLevelSwitchAction(e,n);return o&&(l.retryConfig=o,l.retryCount=u),l}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const i=this.hls.levels[t];if(i){var s,a;const l=e.details;i.loadError++,l===W.BUFFER_APPEND_ERROR&&i.fragmentError++;let f=-1;const{levels:h,loadLevel:E,minAutoLevel:C,maxAutoLevel:T}=n;n.autoLevelEnabled||(n.loadLevel=-1);const J=(s=e.frag)==null?void 0:s.type,_e=(J===G.AUDIO&&l===W.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(l===W.BUFFER_ADD_CODEC_ERROR||l===W.BUFFER_APPEND_ERROR))&&h.some(({audioCodec:Lt})=>i.audioCodec!==Lt),De=e.sourceBufferName==="video"&&(l===W.BUFFER_ADD_CODEC_ERROR||l===W.BUFFER_APPEND_ERROR)&&h.some(({codecSet:Lt,audioCodec:dt})=>i.codecSet!==Lt&&i.audioCodec===dt),{type:rt,groupId:We}=(a=e.context)!=null?a:{};for(let Lt=h.length;Lt--;){const dt=(Lt+E)%h.length;if(dt!==E&&dt>=C&&dt<=T&&h[dt].loadError===0){var o,u;const _t=h[dt];if(l===W.FRAG_GAP&&J===G.MAIN&&e.frag){const jt=h[dt].details;if(jt){const xt=Ct(e.frag,jt.fragments,e.frag.start);if(xt!=null&&xt.gap)continue}}else{if(rt===ye.AUDIO_TRACK&&_t.hasAudioGroup(We)||rt===ye.SUBTITLE_TRACK&&_t.hasSubtitleGroup(We))continue;if(J===G.AUDIO&&(o=i.audioGroups)!=null&&o.some(jt=>_t.hasAudioGroup(jt))||J===G.SUBTITLE&&(u=i.subtitleGroups)!=null&&u.some(jt=>_t.hasSubtitleGroup(jt))||_e&&i.audioCodec===_t.audioCodec||!_e&&i.audioCodec!==_t.audioCodec||De&&i.codecSet===_t.codecSet)continue}f=dt;break}}if(f>-1&&n.loadLevel!==f)return e.levelRetry=!0,this.playlistError=0,{action:Gt.SendAlternateToPenaltyBox,flags:pe.None,nextAutoLevel:f}}return{action:Gt.SendAlternateToPenaltyBox,flags:pe.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case Gt.DoNothing:break;case Gt.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 Gt.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:i,hdcpLevel:s,nextAutoLevel:a}=n;switch(i){case pe.None:this.switchLevel(e,a);break;case pe.MoveAllAlternatesMatchingHDCP:s&&(t.maxHdcpLevel=Ge[Ge.indexOf(s)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}n.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 n=In(e.mimeType),i=this.hls.levels;for(let s=i.length;s--;)i[s][`${e.sourceBufferName}Codec`]===n&&this.hls.removeLevel(s)}}}function Ze(r){const e={action:Gt.DoNothing,flags:pe.None};return r&&(e.resolved=!0),e}var ke={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class tt{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(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.BUFFER_APPENDED,this.onBufferAppended,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this),e.on(d.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.BUFFER_APPENDED,this.onBufferAppended,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this),e.off(d.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let i=n.length;i--;){const s=n[i];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,n){const{fragments:i}=this,s=Object.keys(i);for(let a=s.length;a--;){const o=i[s[a]];if((o==null?void 0:o.body.type)===t&&(!n||o.buffered)){const u=o.body;if(u.start<=e&&e<=u.end)return u}}return null}detectEvictedFragments(e,t,n,i,s){this.timeRanges&&(this.timeRanges[e]=t);const a=(i==null?void 0:i.fragment.sn)||-1;Object.keys(this.fragments).forEach(o=>{const u=this.fragments[o];if(!u||a>=u.body.sn)return;if(!u.buffered&&(!u.loaded||s)){u.body.type===n&&this.removeFragment(u.body);return}const l=u.range[e];if(l){if(l.time.length===0){this.removeFragment(u.body);return}l.time.some(f=>{const h=!this.isTimeBuffered(f.startPTS,f.endPTS,t);return h&&this.removeFragment(u.body),h})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,i=at(n),s=this.fragments[i];if(!s||s.buffered&&n.gap)return;const a=!n.relurl;Object.keys(t).forEach(o=>{const u=n.elementaryStreams[o];if(!u)return;const l=t[o],f=a||u.partial===!0;s.range[o]=this.getBufferedTimes(n,e.part,f,l)}),s.loaded=null,Object.keys(s.range).length?(s.buffered=!0,(s.body.endList=n.endList||s.body.endList)&&(this.endListFragments[s.body.type]=s),Je(s)||this.removeParts(n.sn-1,n.type)):this.removeFragment(s.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=n.filter(i=>i.fragment.sn>=e))}fragBuffered(e,t){const n=at(e);let i=this.fragments[n];!i&&t&&(i=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),i&&(i.loaded=null,i.buffered=!0)}getBufferedTimes(e,t,n,i){const s={time:[],partial:n},a=e.start,o=e.end,u=e.minEndPTS||o,l=e.maxStartPTS||a;for(let f=0;f<i.length;f++){const h=i.start(f)-this.bufferPadding,E=i.end(f)+this.bufferPadding;if(l>=h&&u<=E){s.time.push({startPTS:Math.max(a,i.start(f)),endPTS:Math.min(o,i.end(f))});break}else if(a<E&&o>h){const C=Math.max(a,i.start(f)),T=Math.min(o,i.end(f));T>C&&(s.partial=!0,s.time.push({startPTS:C,endPTS:T}))}else if(o<=h)break}return s}getPartialFragment(e){let t=null,n,i,s,a=0;const{bufferPadding:o,fragments:u}=this;return Object.keys(u).forEach(l=>{const f=u[l];f&&Je(f)&&(i=f.body.start-o,s=f.body.end+o,e>=i&&e<=s&&(n=Math.min(e-i,s-e),a<=n&&(t=f.body,a=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Je(t))}getState(e){const t=at(e),n=this.fragments[t];return n?n.buffered?Je(n)?ke.PARTIAL:ke.OK:ke.APPENDING:ke.NOT_LOADED}isTimeBuffered(e,t,n){let i,s;for(let a=0;a<n.length;a++){if(i=n.start(a)-this.bufferPadding,s=n.end(a)+this.bufferPadding,e>=i&&t<=s)return!0;if(t<=i)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,i=t.part?null:t,s=at(n);this.fragments[s]={body:n,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:i,timeRanges:s,type:a}=t;if(n.sn==="initSegment")return;const o=n.type;if(i){let l=this.activePartLists[o];l||(this.activePartLists[o]=l=[]),l.push(i)}this.timeRanges=s;const u=s[a];this.detectEvictedFragments(a,u,o,i)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=at(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let i=n.length;i--;){const s=t[n[i]];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,n,i,s){i&&!this.hasGaps||Object.keys(this.fragments).forEach(a=>{const o=this.fragments[a];if(!o)return;const u=o.body;u.type!==n||i&&!u.gap||u.start<t&&u.end>e&&(o.buffered||s)&&this.removeFragment(u)})}removeFragment(e){const t=at(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const i=e.sn;this.activePartLists[e.type]=n.filter(s=>s.fragment.sn!==i)}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 n=(e=this.hls)==null||(t=e.latestLevelDetails)==null?void 0:t.partList;n&&n.forEach(i=>i.clearElementaryStreamInfo())}}function Je(r){var e,t,n;return r.buffered&&(r.body.gap||((e=r.range.video)==null?void 0:e.partial)||((t=r.range.audio)==null?void 0:t.partial)||((n=r.range.audiovideo)==null?void 0:n.partial))}function at(r){return`${r.type}_${r.level}_${r.sn}`}var ut={cbc:0,ctr:1};class pt{constructor(e,t,n){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=n}decrypt(e,t){switch(this.aesMode){case ut.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case ut.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 ze(r){const e=r.byteLength,t=e&&new DataView(r.buffer).getUint8(e-1);return t?r.slice(0,e-t):r}class it{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let i=0;i<4;i++)n[i]=t.getUint32(i*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,i=n[0],s=n[1],a=n[2],o=n[3],u=this.invSubMix,l=u[0],f=u[1],h=u[2],E=u[3],C=new Uint32Array(256);let T=0,J=0,$=0;for($=0;$<256;$++)$<128?C[$]=$<<1:C[$]=$<<1^283;for($=0;$<256;$++){let _e=J^J<<1^J<<2^J<<3^J<<4;_e=_e>>>8^_e&255^99,e[T]=_e,t[_e]=T;const Oe=C[T],De=C[Oe],rt=C[De];let We=C[_e]*257^_e*16843008;i[T]=We<<24|We>>>8,s[T]=We<<16|We>>>16,a[T]=We<<8|We>>>24,o[T]=We,We=rt*16843009^De*65537^Oe*257^T*16843008,l[_e]=We<<24|We>>>8,f[_e]=We<<16|We>>>16,h[_e]=We<<8|We>>>24,E[_e]=We,T?(T=Oe^C[C[C[rt^Oe]]],J^=C[C[J]]):T=J=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,i=0;for(;i<t.length&&n;)n=t[i]===this.key[i],i++;if(n)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 o,u;const l=this.keySchedule=new Uint32Array(a),f=this.invKeySchedule=new Uint32Array(a),h=this.sBox,E=this.rcon,C=this.invSubMix,T=C[0],J=C[1],$=C[2],_e=C[3];let Oe,De;for(o=0;o<a;o++){if(o<s){Oe=l[o]=t[o];continue}De=Oe,o%s===0?(De=De<<8|De>>>24,De=h[De>>>24]<<24|h[De>>>16&255]<<16|h[De>>>8&255]<<8|h[De&255],De^=E[o/s|0]<<24):s>6&&o%s===4&&(De=h[De>>>24]<<24|h[De>>>16&255]<<16|h[De>>>8&255]<<8|h[De&255]),l[o]=Oe=(l[o-s]^De)>>>0}for(u=0;u<a;u++)o=a-u,u&3?De=l[o]:De=l[o-4],u<4||o<=4?f[u]=De:f[u]=T[h[De>>>24]]^J[h[De>>>16&255]]^$[h[De>>>8&255]]^_e[h[De&255]],f[u]=f[u]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const i=this.keySize+6,s=this.invKeySchedule,a=this.invSBox,o=this.invSubMix,u=o[0],l=o[1],f=o[2],h=o[3],E=this.uint8ArrayToUint32Array_(n);let C=E[0],T=E[1],J=E[2],$=E[3];const _e=new Int32Array(e),Oe=new Int32Array(_e.length);let De,rt,We,Lt,dt,_t,jt,xt,xn,bn,wr,mr,ar,Xn;const dr=this.networkToHostOrderSwap;for(;t<_e.length;){for(xn=dr(_e[t]),bn=dr(_e[t+1]),wr=dr(_e[t+2]),mr=dr(_e[t+3]),dt=xn^s[0],_t=mr^s[1],jt=wr^s[2],xt=bn^s[3],ar=4,Xn=1;Xn<i;Xn++)De=u[dt>>>24]^l[_t>>16&255]^f[jt>>8&255]^h[xt&255]^s[ar],rt=u[_t>>>24]^l[jt>>16&255]^f[xt>>8&255]^h[dt&255]^s[ar+1],We=u[jt>>>24]^l[xt>>16&255]^f[dt>>8&255]^h[_t&255]^s[ar+2],Lt=u[xt>>>24]^l[dt>>16&255]^f[_t>>8&255]^h[jt&255]^s[ar+3],dt=De,_t=rt,jt=We,xt=Lt,ar=ar+4;De=a[dt>>>24]<<24^a[_t>>16&255]<<16^a[jt>>8&255]<<8^a[xt&255]^s[ar],rt=a[_t>>>24]<<24^a[jt>>16&255]<<16^a[xt>>8&255]<<8^a[dt&255]^s[ar+1],We=a[jt>>>24]<<24^a[xt>>16&255]<<16^a[dt>>8&255]<<8^a[_t&255]^s[ar+2],Lt=a[xt>>>24]<<24^a[dt>>16&255]<<16^a[_t>>8&255]<<8^a[jt&255]^s[ar+3],Oe[t]=dr(De^C),Oe[t+1]=dr(Lt^T),Oe[t+2]=dr(We^J),Oe[t+3]=dr(rt^$),C=xn,T=bn,J=wr,$=mr,t=t+4}return Oe.buffer}}class ot{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=yt(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function yt(r){switch(r){case ut.cbc:return"AES-CBC";case ut.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${r}`)}}const ft=16;class Jt{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(n){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?ze(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,i){return this.useSoftware?new Promise((s,a)=>{const o=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(o,t,n,i);const u=this.flush();u?s(u.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,i)}softwareDecrypt(e,t,n,i){const{currentIV:s,currentResult:a,remainderData:o}=this;if(i!==ut.cbc||t.byteLength!==16)return ie.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),o&&(e=Ye(o,e),this.remainderData=null);const u=this.getValidChunk(e);if(!u.length)return null;s&&(n=s);let l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new it),l.expandKey(t);const f=a;return this.currentResult=l.decrypt(u.buffer,0,n),this.currentIV=u.slice(-16).buffer,f||null}webCryptoDecrypt(e,t,n,i){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n,i));this.key=t,this.fastAesKey=new ot(this.subtle,t,i)}return this.fastAesKey.expandKey().then(s=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new pt(this.subtle,new Uint8Array(n),i).decrypt(e.buffer,s)):Promise.reject(new Error("web crypto not initialized"))).catch(s=>(ie.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,n,i)))}onWebCryptoError(e,t,n,i){const s=this.enableSoftwareAES;if(s){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,i);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 n=e.length-e.length%ft;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(ie.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const on=Math.pow(2,17);class En{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new Pn({type:we.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const i=this.config,s=i.fLoader,a=i.loader;return new Promise((o,u)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(T=>T[0]==="GAP")){u(Cn(e));return}else e.gap=!1;const l=this.loader=s?new s(i):new a(i),f=kn(e);e.loader=l;const h=Zt(i.fragLoadPolicy.default),E={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:on};e.stats=l.stats;const C={onSuccess:(T,J,$,_e)=>{this.resetLoader(e,l);let Oe=T.data;$.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Oe.slice(0,16)),Oe=Oe.slice(16)),o({frag:e,part:null,payload:Oe,networkDetails:_e})},onError:(T,J,$,_e)=>{this.resetLoader(e,l),u(new Pn({type:we.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:B({url:n,data:void 0},T),error:new Error(`HTTP Error ${T.code} ${T.text}`),networkDetails:$,stats:_e}))},onAbort:(T,J,$)=>{this.resetLoader(e,l),u(new Pn({type:we.NETWORK_ERROR,details:W.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:$,stats:T}))},onTimeout:(T,J,$)=>{this.resetLoader(e,l),u(new Pn({type:we.NETWORK_ERROR,details:W.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${E.timeout}ms`),networkDetails:$,stats:T}))}};t&&(C.onProgress=(T,J,$,_e)=>t({frag:e,part:null,payload:$,networkDetails:_e})),l.load(f,E,C)})}loadPart(e,t,n){this.abort();const i=this.config,s=i.fLoader,a=i.loader;return new Promise((o,u)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){u(Cn(e,t));return}const l=this.loader=s?new s(i):new a(i),f=kn(e,t);e.loader=l;const h=Zt(i.fragLoadPolicy.default),E={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:on};t.stats=l.stats,l.load(f,E,{onSuccess:(C,T,J,$)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const _e={frag:e,part:t,payload:C.data,networkDetails:$};n(_e),o(_e)},onError:(C,T,J,$)=>{this.resetLoader(e,l),u(new Pn({type:we.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:B({url:f.url,data:void 0},C),error:new Error(`HTTP Error ${C.code} ${C.text}`),networkDetails:J,stats:$}))},onAbort:(C,T,J)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),u(new Pn({type:we.NETWORK_ERROR,details:W.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:J,stats:C}))},onTimeout:(C,T,J)=>{this.resetLoader(e,l),u(new Pn({type:we.NETWORK_ERROR,details:W.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${E.timeout}ms`),networkDetails:J,stats:C}))}})})}updateStatsFromPart(e,t){const n=e.stats,i=t.stats,s=i.total;if(n.loaded+=i.loaded,s){const u=Math.round(e.duration/t.duration),l=Math.min(Math.round(n.loaded/s),u),h=(u-l)*Math.round(n.loaded/l);n.total=n.loaded+h}else n.total=Math.max(n.loaded,n.total);const a=n.loading,o=i.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function kn(r,e=null){const t=e||r,n={frag:r,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},i=t.byteRangeStartOffset,s=t.byteRangeEndOffset;if(M(i)&&M(s)){var a;let o=i,u=s;if(r.sn==="initSegment"&&Rn((a=r.decryptdata)==null?void 0:a.method)){const l=s-i;l%16&&(u=s+(16-l%16)),i!==0&&(n.resetIV=!0,o=i-16)}n.rangeStart=o,n.rangeEnd=u}return n}function Cn(r,e){const t=new Error(`GAP ${r.gap?"tag":"attribute"} found`),n={type:we.MEDIA_ERROR,details:W.FRAG_GAP,fatal:!1,frag:r,error:t,networkDetails:null};return e&&(n.part=e),(e||r).stats.aborted=!0,new Pn(n)}function Rn(r){return r==="AES-128"||r==="AES-256"}class Pn extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class _n extends j{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 Wn{constructor(e,t,n,i=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=Hn(),this.buffering={audio:Hn(),video:Hn(),audiovideo:Hn()},this.level=e,this.sn=t,this.id=n,this.size=i,this.part=s,this.partial=a}}function Hn(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Jn={length:0,start:()=>0,end:()=>0};class pn{static isBuffered(e,t){if(e){const n=pn.getBuffered(e);for(let i=n.length;i--;)if(t>=n.start(i)&&t<=n.end(i))return!0}return!1}static bufferedRanges(e){if(e){const t=pn.getBuffered(e);return pn.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}static bufferInfo(e,t,n){if(e){const i=pn.bufferedRanges(e);if(i.length)return pn.bufferedInfo(i,t,n)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.length>1&&e.sort((f,h)=>f.start-h.start||h.end-f.end);let i=-1,s=[];if(n)for(let f=0;f<e.length;f++){t>=e[f].start&&t<=e[f].end&&(i=f);const h=s.length;if(h){const E=s[h-1].end;e[f].start-E<n?e[f].end>E&&(s[h-1].end=e[f].end):s.push(e[f])}else s.push(e[f])}else s=e;let a=0,o,u=t,l=t;for(let f=0;f<s.length;f++){const h=s[f].start,E=s[f].end;if(i===-1&&t>=h&&t<=E&&(i=f),t+n>=h&&t<E)u=h,l=E,a=l-t;else if(t+n<h){o=h;break}}return{len:a,start:u||0,end:l||0,nextStart:o,buffered:e,bufferedIndex:i}}static getBuffered(e){try{return e.buffered||Jn}catch(t){return ie.log("failed to get media.buffered",t),Jn}}}const rr=/\{\$([a-zA-Z0-9-_]+)\}/g;function hr(r){return rr.test(r)}function zn(r,e){if(r.variableList!==null||r.hasVariableRefs){const t=r.variableList;return e.replace(rr,n=>{const i=n.substring(2,n.length-1),s=t==null?void 0:t[i];return s===void 0?(r.playlistParsingError||(r.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)),n):s})}return e}function Vn(r,e,t){let n=r.variableList;n||(r.variableList=n={});let i,s;if("QUERYPARAM"in e){i=e.QUERYPARAM;try{const a=new self.URL(t).searchParams;if(a.has(i))s=a.get(i);else throw new Error(`"${i}" does not match any query parameter in URI: "${t}"`)}catch(a){r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${a.message}`))}}else i=e.NAME,s=e.VALUE;i in n?r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)):n[i]=s||""}function jn(r,e,t){const n=e.IMPORT;if(t&&n in t){let i=r.variableList;i||(r.variableList=i={}),i[n]=t[n]}else r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const Fn=/^(\d+)x(\d+)$/,Yn=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Sn{constructor(e,t){typeof e=="string"&&(e=Sn.parseAttrList(e,t)),p(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let i=0;i<t.length/2;i++)n[i]=parseInt(t.slice(i*2,i*2+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((i,s)=>(i[s.toLowerCase()]=!0,i),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=Fn.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const i={},s='"';for(Yn.lastIndex=0;(n=Yn.exec(e))!==null;){const a=n[1].trim();let o=n[2];const u=o.indexOf(s)===0&&o.lastIndexOf(s)===o.length-1;let l=!1;if(u)o=o.slice(1,-1);else switch(a){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":l=!0}if(t&&(u||l))o=zn(t,o);else if(!l&&!u)switch(a){case"CLOSED-CAPTIONS":if(o==="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":ie.warn(`${e}: attribute ${a} is missing quotes`)}i[a]=o}return i}}const vr="com.apple.hls.interstitial";function lr(r){return r!=="ID"&&r!=="CLASS"&&r!=="CUE"&&r!=="START-DATE"&&r!=="DURATION"&&r!=="END-DATE"&&r!=="END-ON-NEXT"}function pr(r){return r==="SCTE35-OUT"||r==="SCTE35-IN"||r==="SCTE35-CMD"}class Ir{constructor(e,t,n=0){var i;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=(i=t==null?void 0:t.tagOrder)!=null?i:n,t){const s=t.attr;for(const a in s)if(Object.prototype.hasOwnProperty.call(e,a)&&e[a]!==s[a]){ie.warn(`DATERANGE tag attribute: "${a}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=a;break}e=p(new Sn({}),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"]);M(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?(ie.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(M(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===vr}get isValid(){return!!this.id&&!this._badValueForSameId&&M(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 zr=10;class ni{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}get hasProgramDateTime(){return this.fragments.length?M(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||zr}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 n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function jr(r){return r==="AES-128"||r==="AES-256"||r==="AES-256-CTR"}function Jr(r){switch(r){case"AES-128":case"AES-256":return ut.cbc;case"AES-256-CTR":return ut.ctr;default:throw new Error(`invalid full segment method ${r}`)}}function Yr(r){return Uint8Array.from(atob(r),e=>e.charCodeAt(0))}function cr(r){return Uint8Array.from(unescape(encodeURIComponent(r)),e=>e.charCodeAt(0))}function Fr(r){const e=cr(r).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Pr(r){const e=function(n,i,s){const a=n[i];n[i]=n[s],n[s]=a};e(r,0,3),e(r,1,2),e(r,4,5),e(r,6,7)}function er(r){const e=r.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),i=n[n.length-1].split(",");if(i.length===2){const s=i[0]==="base64",a=i[1];s?(n.splice(-1,1),t=Yr(a)):t=Fr(a)}}return t}const On=typeof self!="undefined"?self:void 0;var fn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Gn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Er(r){switch(r){case Gn.FAIRPLAY:return fn.FAIRPLAY;case Gn.PLAYREADY:return fn.PLAYREADY;case Gn.WIDEVINE:return fn.WIDEVINE;case Gn.CLEARKEY:return fn.CLEARKEY}}var Sr={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function ii(r){if(r===Sr.WIDEVINE)return fn.WIDEVINE;if(r===Sr.PLAYREADY)return fn.PLAYREADY;if(r===Sr.CENC||r===Sr.CLEARKEY)return fn.CLEARKEY}function $r(r){switch(r){case fn.FAIRPLAY:return Gn.FAIRPLAY;case fn.PLAYREADY:return Gn.PLAYREADY;case fn.WIDEVINE:return Gn.WIDEVINE;case fn.CLEARKEY:return Gn.CLEARKEY}}function Zr(r){const{drmSystems:e,widevineLicenseUrl:t}=r,n=e?[fn.FAIRPLAY,fn.WIDEVINE,fn.PLAYREADY,fn.CLEARKEY].filter(i=>!!e[i]):[];return!n[fn.WIDEVINE]&&t&&n.push(fn.WIDEVINE),n}const hn=function(r){return On!=null&&(r=On.navigator)!=null&&r.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function sr(r,e,t,n){let i;switch(r){case fn.FAIRPLAY:i=["cenc","sinf"];break;case fn.WIDEVINE:case fn.PLAYREADY:i=["cenc"];break;case fn.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${r}`)}return Cr(i,e,t,n)}function Cr(r,e,t,n){return[{initDataTypes:r,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(s=>({contentType:`audio/mp4; codecs=${s}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(s=>({contentType:`video/mp4; codecs=${s}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function _r(r){var e;return r.sessionType==="persistent-license"||!!((e=r.sessionTypes)!=null&&e.some(t=>t==="persistent-license"))}function br(r){const e=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),a=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(a){const o=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(o){const u=Yr(o).subarray(0,16);return Pr(u),u}}return null}let Vr={};class Ur{static clearKeyUriToKeyIdMap(){Vr={}}constructor(e,t,n,i=[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=n,this.keyFormatVersions=i,this.iv=s,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!jr(e)}isSupported(){if(this.method){if(jr(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case Gn.FAIRPLAY:case Gn.WIDEVINE:case Gn.PLAYREADY:case Gn.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(jr(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(ie.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=si(e);return new Ur(this.method,this.uri,"identity",this.keyFormatVersions,n)}const t=er(this.uri);if(t)switch(this.keyFormat){case Gn.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case Gn.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Pt(n,null,t),this.keyId=br(t);break}default:{let n=t.subarray(0,16);if(n.length!==16){const i=new Uint8Array(16);i.set(n,16-n.length),n=i}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){let n=Vr[this.uri];if(!n){const i=Object.keys(Vr).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,i),Vr[this.uri]=n}this.keyId=n}return this}}function si(r){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=r>>8*(15-t)&255;return e}const Or=/#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,ji=/#EXT-X-MEDIA:(.*)/g,xr=/^#EXT(?:INF|-X-TARGETDURATION):/m,Ni=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Si=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 hi{static findGroup(e,t){for(let n=0;n<e.length;n++){const i=e[n];if(i.id===t)return i}}static resolve(e,t){return ae.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return xr.test(e)}static parseMasterPlaylist(e,t){const n=hr(e),i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},s=[];Or.lastIndex=0;let a;for(;(a=Or.exec(e))!=null;)if(a[1]){var o;const l=new Sn(a[1],i),f=zn(i,a[2]),h={attrs:l,bitrate:l.decimalInteger("BANDWIDTH")||l.decimalInteger("AVERAGE-BANDWIDTH"),name:l.NAME,url:hi.resolve(f,t)},E=l.decimalResolution("RESOLUTION");E&&(h.width=E.width,h.height=E.height),wi(l.CODECS,h);const C=l["SUPPLEMENTAL-CODECS"];C&&(h.supplemental={},wi(C,h.supplemental)),(o=h.unknownCodecs)!=null&&o.length||s.push(h),i.levels.push(h)}else if(a[3]){const l=a[3],f=a[4];switch(l){case"SESSION-DATA":{const h=new Sn(f,i),E=h["DATA-ID"];E&&(i.sessionData===null&&(i.sessionData={}),i.sessionData[E]=h);break}case"SESSION-KEY":{const h=Ui(f,t,i);h.encrypted&&h.isSupported()?(i.sessionKeys===null&&(i.sessionKeys=[]),i.sessionKeys.push(h)):ie.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${f}"`);break}case"DEFINE":{{const h=new Sn(f,i);Vn(i,h,t)}break}case"CONTENT-STEERING":{const h=new Sn(f,i);i.contentSteering={uri:hi.resolve(h["SERVER-URI"],t),pathwayId:h["PATHWAY-ID"]||"."};break}case"START":{i.startTimeOffset=Xi(f);break}}}const u=s.length>0&&s.length<i.levels.length;return i.levels=u?s:i.levels,i.levels.length===0&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,t,n){let i;const s={},a=n.levels,o={AUDIO:a.map(l=>({id:l.attrs.AUDIO,audioCodec:l.audioCodec})),SUBTITLES:a.map(l=>({id:l.attrs.SUBTITLES,textCodec:l.textCodec})),"CLOSED-CAPTIONS":[]};let u=0;for(ji.lastIndex=0;(i=ji.exec(e))!==null;){const l=new Sn(i[1],n),f=l.TYPE;if(f){const h=o[f],E=s[f]||[];s[f]=E;const C=l.LANGUAGE,T=l["ASSOC-LANGUAGE"],J=l.CHANNELS,$=l.CHARACTERISTICS,_e=l["INSTREAM-ID"],Oe={attrs:l,bitrate:0,id:u++,groupId:l["GROUP-ID"]||"",name:l.NAME||C||"",type:f,default:l.bool("DEFAULT"),autoselect:l.bool("AUTOSELECT"),forced:l.bool("FORCED"),lang:C,url:l.URI?hi.resolve(l.URI,t):""};if(T&&(Oe.assocLang=T),J&&(Oe.channels=J),$&&(Oe.characteristics=$),_e&&(Oe.instreamId=_e),h!=null&&h.length){const De=hi.findGroup(h,Oe.groupId)||h[0];ki(Oe,De,"audioCodec"),ki(Oe,De,"textCodec")}E.push(Oe)}}return s}static parseLevelPlaylist(e,t,n,i,s,a){var o;const u={url:t},l=new ni(t),f=l.fragments,h=[];let E=null,C=0,T=0,J=0,$=0,_e=0,Oe=null,De=new Qe(i,u),rt,We,Lt,dt=-1,_t=!1,jt=null,xt;if(Ni.lastIndex=0,l.m3u8=e,l.hasVariableRefs=hr(e),((o=Ni.exec(e))==null?void 0:o[0])!=="#EXTM3U")return l.playlistParsingError=new Error("Missing format identifier #EXTM3U"),l;for(;(rt=Ni.exec(e))!==null;){_t&&(_t=!1,De=new Qe(i,u),De.playlistOffset=J,De.start=J,De.sn=C,De.cc=$,_e&&(De.bitrate=_e),De.level=n,E&&(De.initSegment=E,E.rawProgramDateTime&&(De.rawProgramDateTime=E.rawProgramDateTime,E.rawProgramDateTime=null),jt&&(De.setByteRange(jt),jt=null)));const mr=rt[1];if(mr){De.duration=parseFloat(mr);const ar=(" "+rt[2]).slice(1);De.title=ar||null,De.tagList.push(ar?["INF",mr,ar]:["INF",mr])}else if(rt[3]){if(M(De.duration)){De.playlistOffset=J,De.start=J,Lt&&Ti(De,Lt,l),De.sn=C,De.level=n,De.cc=$,f.push(De);const ar=(" "+rt[3]).slice(1);De.relurl=zn(l,ar),Ji(De,Oe,h),Oe=De,J+=De.duration,C++,T=0,_t=!0}}else{if(rt=rt[0].match(Si),!rt){ie.warn("No matches on slow regex match for level playlist!");continue}for(We=1;We<rt.length&&rt[We]===void 0;We++);const ar=(" "+rt[We]).slice(1),Xn=(" "+rt[We+1]).slice(1),dr=rt[We+2]?(" "+rt[We+2]).slice(1):null;switch(ar){case"BYTERANGE":Oe?De.setByteRange(Xn,Oe):De.setByteRange(Xn);break;case"PROGRAM-DATE-TIME":De.rawProgramDateTime=Xn,De.tagList.push(["PROGRAM-DATE-TIME",Xn]),dt===-1&&(dt=f.length);break;case"PLAYLIST-TYPE":l.type&&ui(l,ar,rt),l.type=Xn.toUpperCase();break;case"MEDIA-SEQUENCE":l.startSN!==0?ui(l,ar,rt):f.length>0&&oi(l,ar,rt),C=l.startSN=parseInt(Xn);break;case"SKIP":{l.skippedSegments&&ui(l,ar,rt);const Ar=new Sn(Xn,l),Tn=Ar.decimalInteger("SKIPPED-SEGMENTS");if(M(Tn)){l.skippedSegments+=Tn;for(let Br=Tn;Br--;)f.push(null);C+=Tn}const Qn=Ar.enumeratedString("RECENTLY-REMOVED-DATERANGES");Qn&&(l.recentlyRemovedDateranges=(l.recentlyRemovedDateranges||[]).concat(Qn.split(" ")));break}case"TARGETDURATION":l.targetduration!==0&&ui(l,ar,rt),l.targetduration=Math.max(parseInt(Xn),1);break;case"VERSION":l.version!==null&&ui(l,ar,rt),l.version=parseInt(Xn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":l.live||ui(l,ar,rt),l.live=!1;break;case"#":(Xn||dr)&&De.tagList.push(dr?[Xn,dr]:[Xn]);break;case"DISCONTINUITY":$++,De.tagList.push(["DIS"]);break;case"GAP":De.gap=!0,De.tagList.push([ar]);break;case"BITRATE":De.tagList.push([ar,Xn]),_e=parseInt(Xn)*1e3,M(_e)?De.bitrate=_e:_e=0;break;case"DATERANGE":{const Ar=new Sn(Xn,l),Tn=new Ir(Ar,l.dateRanges[Ar.ID],l.dateRangeTagCount);l.dateRangeTagCount++,Tn.isValid||l.skippedSegments?l.dateRanges[Tn.id]=Tn:ie.warn(`Ignoring invalid DATERANGE tag: "${Xn}"`),De.tagList.push(["EXT-X-DATERANGE",Xn]);break}case"DEFINE":{{const Ar=new Sn(Xn,l);"IMPORT"in Ar?jn(l,Ar,a):Vn(l,Ar,t)}break}case"DISCONTINUITY-SEQUENCE":l.startCC!==0?ui(l,ar,rt):f.length>0&&oi(l,ar,rt),l.startCC=$=parseInt(Xn);break;case"KEY":{const Ar=Ui(Xn,t,l);if(Ar.isSupported()){if(Ar.method==="NONE"){Lt=void 0;break}Lt||(Lt={}),Lt[Ar.keyFormat]&&(Lt=p({},Lt)),Lt[Ar.keyFormat]=Ar}else ie.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Xn}"`);break}case"START":l.startTimeOffset=Xi(Xn);break;case"MAP":{const Ar=new Sn(Xn,l);if(De.duration){const Tn=new Qe(i,u);fi(Tn,Ar,n,Lt),E=Tn,De.initSegment=E,E.rawProgramDateTime&&!De.rawProgramDateTime&&(De.rawProgramDateTime=E.rawProgramDateTime)}else{const Tn=De.byteRangeEndOffset;if(Tn){const Qn=De.byteRangeStartOffset;jt=`${Tn-Qn}@${Qn}`}else jt=null;fi(De,Ar,n,Lt),E=De,_t=!0}E.cc=$;break}case"SERVER-CONTROL":{xt&&ui(l,ar,rt),xt=new Sn(Xn),l.canBlockReload=xt.bool("CAN-BLOCK-RELOAD"),l.canSkipUntil=xt.optionalFloat("CAN-SKIP-UNTIL",0),l.canSkipDateRanges=l.canSkipUntil>0&&xt.bool("CAN-SKIP-DATERANGES"),l.partHoldBack=xt.optionalFloat("PART-HOLD-BACK",0),l.holdBack=xt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{l.partTarget&&ui(l,ar,rt);const Ar=new Sn(Xn);l.partTarget=Ar.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Ar=l.partList;Ar||(Ar=l.partList=[]);const Tn=T>0?Ar[Ar.length-1]:void 0,Qn=T++,Br=new Sn(Xn,l),yr=new et(Br,De,u,Qn,Tn);Ar.push(yr),De.duration+=yr.duration;break}case"PRELOAD-HINT":{const Ar=new Sn(Xn,l);l.preloadHint=Ar;break}case"RENDITION-REPORT":{const Ar=new Sn(Xn,l);l.renditionReports=l.renditionReports||[],l.renditionReports.push(Ar);break}default:ie.warn(`line parsed but not handled: ${rt}`);break}}}Oe&&!Oe.relurl?(f.pop(),J-=Oe.duration,l.partList&&(l.fragmentHint=Oe)):l.partList&&(Ji(De,Oe,h),De.cc=$,l.fragmentHint=De,Lt&&Ti(De,Lt,l)),l.targetduration||(l.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const xn=f.length,bn=f[0],wr=f[xn-1];if(J+=l.skippedSegments*l.targetduration,J>0&&xn&&wr){l.averagetargetduration=J/xn;const mr=wr.sn;l.endSN=mr!=="initSegment"?mr:0,l.live||(wr.endList=!0),bn&&l.startCC===void 0&&(l.startCC=bn.cc),dt>0&&(Hi(f,dt),bn&&h.unshift(bn))}else l.endSN=0,l.startCC=0;return l.fragmentHint&&(J+=l.fragmentHint.duration),l.totalduration=J,h.length&&l.dateRangeTagCount&&bn&&Mr(h,l),l.endCC=$,l}}function Mr(r,e){const t=r.length,n=r[t-1],i=e.live?1/0:e.totalduration,s=Object.keys(e.dateRanges);for(let a=s.length;a--;){const o=e.dateRanges[s[a]],u=o.startDate.getTime();o.tagAnchor=n.ref;for(let l=t;l--;){const f=Yi(e,u,r,l,i);if(f!==-1){o.tagAnchor=e.fragments[f].ref;break}}}}function Yi(r,e,t,n,i){const s=t[n];if(s){const o=s.programDateTime;if(e>=o||n===0){var a;const u=(((a=t[n+1])==null?void 0:a.start)||i)-s.start;if(e<=o+u*1e3){const l=t[n].sn-r.startSN,f=r.fragments;if(f.length>t.length){const E=(t[n+1]||f[f.length-1]).sn-r.startSN;for(let C=E;C>l;C--){const T=f[C].programDateTime;if(e>=T&&e<T+f[C].duration*1e3)return C}}return l}}}return-1}function Ui(r,e,t){var n,i;const s=new Sn(r,t),a=(n=s.METHOD)!=null?n:"",o=s.URI,u=s.hexadecimalInteger("IV"),l=s.KEYFORMATVERSIONS,f=(i=s.KEYFORMAT)!=null?i:"identity";o&&s.IV&&!u&&ie.error(`Invalid IV: ${s.IV}`);const h=o?hi.resolve(o,e):"",E=(l||"1").split("/").map(Number).filter(Number.isFinite);return new Ur(a,h,f,E,u)}function Xi(r){const t=new Sn(r).decimalFloatingPoint("TIME-OFFSET");return M(t)?t:null}function wi(r,e){let t=(r||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const i=t.filter(s=>qe(s,n));i.length&&(e[`${n}Codec`]=i.map(s=>s.split("/")[0]).join(","),t=t.filter(s=>i.indexOf(s)===-1))}),e.unknownCodecs=t}function ki(r,e,t){const n=e[t];n&&(r[t]=n)}function Hi(r,e){let t=r[e];for(let n=e;n--;){const i=r[n];if(!i)return;i.programDateTime=t.programDateTime-i.duration*1e3,t=i}}function Ji(r,e,t){r.rawProgramDateTime?t.push(r):e!=null&&e.programDateTime&&(r.programDateTime=e.endProgramDateTime)}function fi(r,e,t,n){r.relurl=e.URI,e.BYTERANGE&&r.setByteRange(e.BYTERANGE),r.level=t,r.sn="initSegment",n&&(r.levelkeys=n),r.initSegment=null}function Ti(r,e,t){r.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(i=>e[i].isCommonEncryption)&&n.push(r)}function ui(r,e,t){r.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function oi(r,e,t){r.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function _i(r,e){const t=e.startPTS;if(M(t)){let n=0,i;e.sn>r.sn?(n=t-r.start,i=r):(n=r.start-t,i=e),i.duration!==n&&i.setDuration(n)}else e.sn>r.sn?r.cc===e.cc&&r.minEndPTS?e.setStart(r.start+(r.minEndPTS-r.start)):e.setStart(r.start+r.duration):e.setStart(Math.max(r.start-e.duration,0))}function Ki(r,e,t,n,i,s){n-t<=0&&(ie.warn("Fragment should have a positive duration",e),n=t+e.duration,s=i+e.duration);let o=t,u=n;const l=e.startPTS,f=e.endPTS;if(M(l)){const $=Math.abs(l-t);M(e.deltaPTS)?e.deltaPTS=Math.max($,e.deltaPTS):e.deltaPTS=$,o=Math.max(t,l),t=Math.min(t,l),i=Math.min(i,e.startDTS),u=Math.min(n,f),n=Math.max(n,f),s=Math.max(s,e.endDTS)}const h=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=o,e.startDTS=i,e.endPTS=n,e.minEndPTS=u,e.endDTS=s;const E=e.sn;if(!r||E<r.startSN||E>r.endSN)return 0;let C;const T=E-r.startSN,J=r.fragments;for(J[T]=e,C=T;C>0;C--)_i(J[C],J[C-1]);for(C=T;C<J.length-1;C++)_i(J[C],J[C+1]);return r.fragmentHint&&_i(J[J.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,h}function Dr(r,e){if(r===e)return;let t=null;const n=r.fragments;for(let u=n.length-1;u>=0;u--){const l=n[u].initSegment;if(l){t=l;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;let i;ai(r,e,(u,l,f,h)=>{if(e.skippedSegments&&l.cc!==u.cc){const E=u.cc-l.cc;for(let C=f;C<h.length;C++)h[C].cc+=E}M(u.startPTS)&&M(u.endPTS)&&(l.setStart(l.startPTS=u.startPTS),l.startDTS=u.startDTS,l.maxStartPTS=u.maxStartPTS,l.endPTS=u.endPTS,l.endDTS=u.endDTS,l.minEndPTS=u.minEndPTS,l.setDuration(u.endPTS-u.startPTS),l.duration&&(i=l),e.PTSKnown=e.alignedSliding=!0),u.hasStreams&&(l.elementaryStreams=u.elementaryStreams),l.loader=u.loader,u.hasStats&&(l.stats=u.stats),u.initSegment&&(l.initSegment=u.initSegment,t=u.initSegment)});const s=e.fragments,a=e.fragmentHint?s.concat(e.fragmentHint):s;if(t&&a.forEach(u=>{var l;u&&(!u.initSegment||u.initSegment.relurl===((l=t)==null?void 0:l.relurl))&&(u.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=s.some(u=>!u),e.deltaUpdateFailed){ie.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let u=e.skippedSegments;u--;)s.shift();e.startSN=s[0].sn}else{e.endCC=s[s.length-1].cc,e.canSkipDateRanges&&(e.dateRanges=gr(r.dateRanges,e));const u=r.fragments.filter(l=>l.rawProgramDateTime);if(r.hasProgramDateTime&&!e.hasProgramDateTime)for(let l=1;l<a.length;l++)a[l].programDateTime===null&&Ji(a[l],a[l-1],u);Mr(u,e)}Kr(r.partList,e.partList,(u,l)=>{l.elementaryStreams=u.elementaryStreams,l.stats=u.stats}),i?Ki(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS):Qr(r,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=r.driftStartTime,e.driftStart=r.driftStart;const o=e.advancedDateTime;if(e.advanced&&o){const u=e.edge;e.driftStart||(e.driftStartTime=o,e.driftStart=u),e.driftEndTime=o,e.driftEnd=u}else e.driftEndTime=r.driftEndTime,e.driftEnd=r.driftEnd,e.advancedDateTime=r.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=r.requestScheduled)}function gr(r,e){const{dateRanges:t,recentlyRemovedDateranges:n}=e,i=p({},r);n&&n.forEach(o=>{delete i[o]});const a=Object.keys(i).length;return a&&Object.keys(t).forEach(o=>{const u=i[o],l=new Ir(t[o].attr,u);l.isValid?(i[o]=l,u||(l.tagOrder+=a)):ie.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${sn(t[o].attr)}"`)}),i}function Kr(r,e,t){if(r&&e){let n=0;for(let i=0,s=r.length;i<=s;i++){const a=r[i],o=e[i+n];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?t(a,o):n--}}}function ai(r,e,t){const n=e.skippedSegments,i=Math.max(r.startSN,e.startSN)-e.startSN,s=(r.fragmentHint?1:0)+(n?e.endSN:Math.min(r.endSN,e.endSN))-e.startSN,a=e.startSN-r.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,u=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments;for(let l=i;l<=s;l++){const f=u[a+l];let h=o[l];if(n&&!h&&f&&(h=e.fragments[l]=f),f&&h){if(t(f,h,l,o),f.url&&f.url!==h.url){e.playlistParsingError=Wr(`media sequence mismatch ${h.sn}:`,r,e,f,h);return}else if(f.cc!==h.cc){e.playlistParsingError=Wr(`discontinuity sequence mismatch (${f.cc}!=${h.cc})`,r,e,f,h);return}}}}function Wr(r,e,t,n,i){return new Error(`${r} ${i.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function Qr(r,e,t=!0){const n=e.startSN+e.skippedSegments-r.startSN,i=r.fragments,s=n>=0;let a=0;if(s&&n<i.length)a=i[n].start;else if(s&&e.startSN===r.endSN+1)a=r.fragmentEnd;else if(s&&t)a=r.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)a=r.fragmentStart;else return;Ai(e,a)}function Ai(r,e){if(e){const t=r.fragments;for(let n=r.skippedSegments;n<t.length;n++)t[n].addStart(e);r.fragmentHint&&r.fragmentHint.addStart(e)}}function yi(r,e=1/0){let t=1e3*r.targetduration;if(r.updated){const n=r.fragments;if(n.length&&t*4>e){const s=n[n.length-1].duration*1e3;s<t&&(t=s)}}else t/=2;return Math.round(t)}function pi(r,e,t){if(!r)return null;let n=r.fragments[e-r.startSN];return n||(n=r.fragmentHint,n&&n.sn===e)?n:e<r.startSN&&t&&t.sn===e?t:null}function Fi(r,e,t){return r?Di(r.partList,e,t):null}function Di(r,e,t){if(r)for(let n=r.length;n--;){const i=r[n];if(i.index===t&&i.fragment.sn===e)return i}return null}function qi(r){r.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(i=>{i.level=t,i.initSegment&&(i.initSegment.level=t)})})}function Nr(r,e){for(let n=0,i=r.length;n<i;n++){var t;if(((t=r[n])==null?void 0:t.cc)===e)return r[n]}return null}function ns(r,e){return!!(r&&e.startCC<r.endCC&&e.endCC>r.startCC)}function ws(r,e){if(r){const t=r.start+e;r.start=r.startPTS=t,r.endPTS=t+r.duration}}function us(r,e){const t=e.fragments;for(let n=0,i=t.length;n<i;n++)ws(t[n],r);e.fragmentHint&&ws(e.fragmentHint,r),e.alignedSliding=!0}function rs(r,e){r&&(Us(e,r),!e.alignedSliding&&r&&qr(e,r),!e.alignedSliding&&r&&!e.skippedSegments&&Qr(r,e,!1))}function Us(r,e){if(!ns(e,r))return;const t=Math.min(e.endCC,r.endCC),n=Nr(e.fragments,t),i=Nr(r.fragments,t);if(!n||!i)return;ie.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const s=n.start-i.start;us(s,r)}function qr(r,e){if(!r.hasProgramDateTime||!e.hasProgramDateTime)return;const t=r.fragments,n=e.fragments;if(!t.length||!n.length)return;let i,s;const a=Math.min(e.endCC,r.endCC);e.startCC<a&&r.startCC<a&&(i=Nr(n,a),s=Nr(t,a)),(!i||!s)&&(i=n[Math.floor(n.length/2)],s=Nr(t,i.cc)||t[Math.floor(t.length/2)]);const o=i.programDateTime,u=s.programDateTime;if(!o||!u)return;const l=(u-o)/1e3-(s.start-i.start);us(l,r)}const Gr={toString:function(r){let e="";const t=r.length;for(let n=0;n<t;n++)e+=`[${r.start(n).toFixed(3)}-${r.end(n).toFixed(3)}]`;return e}},Xt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class di extends _n{constructor(e,t,n,i,s){super(i,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Xt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:a,fragCurrent:o,media:u,mediaBuffer:l,state:f}=this,h=u?u.currentTime:0,E=pn.bufferInfo(l||u,h,a.maxBufferHole);if(this.log(`media seeking to ${M(h)?h.toFixed(3):h}, state: ${f}`),this.state===Xt.ENDED)this.resetLoadingState();else if(o){const C=a.maxFragLookUpTolerance,T=o.start-C,J=o.start+o.duration+C;if(!E.len||J<E.start||T>E.end){const $=h>J;(h<T||$)&&($&&o.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(u){this.fragmentTracker.removeFragmentsInRange(h,1/0,this.playlistType,!0);const C=this.lastCurrentTime;if(h>C&&(this.lastCurrentTime=h),!this.loadingParts){const T=Math.max(E.end,h),J=this.shouldLoadParts(this.getLevelDetails(),T);J&&(this.log(`LL-Part loading ON after seeking to ${h.toFixed(2)} with buffer @${T.toFixed(2)}`),this.loadingParts=J)}}!this.hls.hasEnoughToStart&&!E.len&&(this.log(`setting startPosition to ${h} because of seek before start`),this.nextLoadPosition=this.startPosition=h),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 En(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Jt(e.config)}registerListeners(){const{hls:e}=this;e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(d.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Xt.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Xt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,i=this.config.timelineOffset||0;if(n<=i)return!1;const s=e.nextStart;if(s&&s>i&&s<t.edge||this.media.currentTime<e.start)return!1;const o=t.partList;if(o!=null&&o.length){const l=o[o.length-1];return pn.isBuffered(this.media,l.start+l.duration/2)}const u=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(u)}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 n=this.media=this.mediaBuffer=t.media;n.removeEventListener("seeking",this.onMediaSeeking),n.removeEventListener("ended",this.onMediaEnded),n.addEventListener("seeking",this.onMediaSeeking),n.addEventListener("ended",this.onMediaEnded);const i=this.config;this.levels&&i.autoStartLoad&&this.state===Xt.STOPPED&&this.startLoad(i.startPosition)}onMediaDetaching(e,t){const n=!!t.transferMedia,i=this.media;if(i!==null){if(i.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),i.removeEventListener("seeking",this.onMediaSeeking),i.removeEventListener("ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=Xt.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const i=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,n,i).then(s=>{if(!s)return;const a=this.state,o=s.frag;if(this.fragContextChanged(o)){(a===Xt.FRAG_LOADING||!this.fragCurrent&&a===Xt.PARSING)&&(this.fragmentTracker.removeFragment(o),this.state=Xt.IDLE);return}"payload"in s&&(this.log(`Loaded ${o.type} sn: ${o.sn} of ${this.playlistLabel()} ${o.level}`),this.hls.trigger(d.FRAG_LOADED,s)),this._handleFragmentLoadComplete(s)}).catch(s=>{this.state===Xt.STOPPED||this.state===Xt.ERROR||(this.warn(`Frag error: ${(s==null?void 0:s.message)||s}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===ke.APPENDING){const s=e.type,a=this.getFwdBufferInfo(this.mediaBuffer,s),o=Math.max(e.duration,a?a.len:this.config.maxBufferLength),u=this.backtrackFragment;((u?e.sn-u.sn:0)===1||this.reduceMaxBufferLength(o,e.duration))&&n.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===ke.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const i={startOffset:e,endOffset:t,type:n};this.hls.trigger(d.BUFFER_FLUSHING,i)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const i=n==null?void 0:n.frag;if(!i||this.fragContextChanged(i)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:i}=this,{frag:s,payload:a}=n,o=s.decryptdata;if(a&&a.byteLength>0&&o!=null&&o.key&&o.iv&&jr(o.method)){const u=self.performance.now();return this.decrypter.decrypt(new Uint8Array(a),o.key.buffer,o.iv.buffer,Jr(o.method)).catch(l=>{throw i.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:s}),l}).then(l=>{const f=self.performance.now();return i.trigger(d.FRAG_DECRYPTED,{frag:s,payload:l,stats:{tstart:u,tdecrypt:f}}),n.payload=l,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Xt.STOPPED||this.state===Xt.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state!==Xt.STOPPED&&(this.state=Xt.IDLE),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?Gr.toString(pn.getBuffered(n)):"(detached)"})`),ue(e)){var i;if(e.type!==G.SUBTITLE){const a=e.elementaryStreams;if(!Object.keys(a).some(o=>!!a[o])){this.state=Xt.IDLE;return}}const s=(i=this.levels)==null?void 0:i[e.level];s!=null&&s.fragmentError&&(this.log(`Resetting level fragment error count of ${s.fragmentError} on frag buffered`),s.fragmentError=0)}this.state=Xt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:i,partsLoaded:s}=e,a=!s||s.length===0||s.some(u=>!u),o=new Wn(n.level,n.sn,n.stats.chunkCount+1,0,i?i.index:-1,!a);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,i){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 o=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=Xt.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then(h=>{if(!this.fragContextChanged(h.frag))return this.hls.trigger(d.KEY_LOADED,h),this.state===Xt.KEY_LOADING&&(this.state=Xt.IDLE),h}),this.hls.trigger(d.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&a.encryptedFragments.length&&this.keyLoader.loadClear(e,a.encryptedFragments);const u=this.fragPrevious;if(ue(e)&&(!u||e.sn!==u.sn)){const h=this.shouldLoadParts(t.details,e.end);h!==this.loadingParts&&(this.log(`LL-Part loading ${h?"ON":"OFF"} loading sn ${u==null?void 0:u.sn}->${e.sn}`),this.loadingParts=h)}if(n=Math.max(e.start,n||0),this.loadingParts&&ue(e)){const h=a.partList;if(h&&i){n>e.end&&a.fragmentHint&&(e=a.fragmentHint);const E=this.getNextPart(h,e,n);if(E>-1){const C=h[E];e=this.fragCurrent=C.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${C.index} (${E}/${h.length-1}) of ${this.fragInfo(e,!1,C)}) cc: ${e.cc} [${a.startSN}-${a.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=C.start+C.duration,this.state=Xt.FRAG_LOADING;let T;return o?T=o.then(J=>!J||this.fragContextChanged(J.frag)?null:this.doFragPartsLoad(e,C,t,i)).catch(J=>this.handleFragLoadError(J)):T=this.doFragPartsLoad(e,C,t,i).catch(J=>this.handleFragLoadError(J)),this.hls.trigger(d.FRAG_LOADING,{frag:e,part:C,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):T}else if(!e.url||this.loadedEndOfParts(h,n))return Promise.resolve(null)}}if(ue(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${n.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(n.toFixed(3))}`),M(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Xt.FRAG_LOADING;const l=this.config.progressive;let f;return l&&o?f=o.then(h=>!h||this.fragContextChanged(h==null?void 0:h.frag)?null:this.fragmentLoader.load(e,i)).catch(h=>this.handleFragLoadError(h)):f=Promise.all([this.fragmentLoader.load(e,l?i:void 0),o]).then(([h])=>(!l&&h&&i&&i(h),h)).catch(h=>this.handleFragLoadError(h)),this.hls.trigger(d.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):f}doFragPartsLoad(e,t,n,i){return new Promise((s,a)=>{var o;const u=[],l=(o=n.details)==null?void 0:o.partList,f=h=>{this.fragmentLoader.loadPart(e,h,i).then(E=>{u[h.index]=E;const C=E.part;this.hls.trigger(d.FRAG_LOADED,E);const T=Fi(n.details,e.sn,h.index+1)||Di(l,e.sn,h.index+1);if(T)f(T);else return s({frag:e,part:C,partsLoaded:u})}).catch(a)};f(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(d.ERROR,t)}else this.hls.trigger(d.ERROR,{type:we.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!==Xt.PARSING){!this.fragCurrent&&this.state!==Xt.STOPPED&&this.state!==Xt.ERROR&&(this.state=Xt.IDLE);return}const{frag:n,part:i,level:s}=t,a=self.performance.now();n.stats.parsing.end=a,i&&(i.stats.parsing.end=a);const o=this.getLevelDetails(),l=o&&n.sn>o.endSN||this.shouldLoadParts(o,n.end);l!==this.loadingParts&&(this.log(`LL-Part loading ${l?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=l),this.updateLevelTiming(n,i,s,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e!=null&&e.partList){var n;const s=e.partList[0],a=s.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=a){var i;if((this.hls.hasEnoughToStart?((i=this.media)==null?void 0:i.currentTime)||this.lastCurrentTime:this.getLoadPosition())>s.start-s.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:i,sn:s,part:a}=e;if(!(t!=null&&t[i]))return this.warn(`Levels object was unset while buffering fragment ${s} of ${this.playlistLabel()} ${i}. The current chunk will not be buffered.`),null;const o=t[i],u=o.details,l=a>-1?Fi(u,s,a):null,f=l?l.fragment:pi(u,s,n);return f?(n&&n!==f&&(f.stats=n.stats),{frag:f,part:l,level:o}):null}bufferFragmentData(e,t,n,i,s){var a;if(!e||this.state!==Xt.PARSING)return;const{data1:o,data2:u}=e;let l=o;if(o&&u&&(l=Ye(o,u)),!((a=l)!=null&&a.length))return;const f={type:e.type,frag:t,part:n,chunkMeta:i,parent:t.type,data:l};if(this.hls.trigger(d.BUFFER_APPENDING,f),e.dropped&&e.independent&&!n){if(s)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!pn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,i=pn.bufferInfo(t,n,0),s=e.duration,a=Math.min(this.config.maxFragLookUpTolerance*2,s*.25),o=Math.max(Math.min(e.start-a,i.end-a),n+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){var n;const i=this.getLoadPosition();if(!M(i))return null;const a=this.lastCurrentTime>i||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,i,t,a)}getFwdBufferInfoAtPos(e,t,n,i){const s=pn.bufferInfo(e,t,i);if(s.len===0&&s.nextStart!==void 0){const a=this.fragmentTracker.getBufferedFrag(t,n);if(a&&(s.nextStart<=a.end||a.gap)){const o=Math.max(Math.min(s.nextStart,a.end)-t,i);return pn.bufferInfo(e,t,o)}}return s}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,i=Math.max(Math.min(e-t,n.maxBufferLength),t),s=Math.max(e-t*3,n.maxMaxBufferLength/2,i);return s>=i?(n.maxMaxBufferLength=s,this.warn(`Reduce max buffer length to ${s}s`),!0):!1}getAppendedFrag(e,t=G.MAIN){var n;const i=(n=this.fragmentTracker)==null?void 0:n.getAppendedFrag(e,t);return i&&"fragment"in i?i.fragment:i}getNextFragment(e,t){const n=t.fragments,i=n.length;if(!i)return null;const{config:s}=this,a=n[0].start,o=s.lowLatencyMode&&!!t.partList;let u=null;if(t.live){const h=s.initialLiveManifestSize;if(i<h)return this.warn(`Not enough fragments to start playback (have: ${i}, need: ${h})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<a){var l;o&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),u=this.getInitialLiveFragment(t,n);const E=this.hls.startPosition,C=this.hls.liveSyncPosition,T=u?(E!==-1&&E>=a?E:C)||u.start:e;this.log(`Setting startPosition to ${T} to match start frag at live edge. mainStart: ${E} liveSyncPosition: ${C} frag.start: ${(l=u)==null?void 0:l.start}`),this.startPosition=this.nextLoadPosition=T}}else e<=a&&(u=n[0]);if(!u){const h=this.loadingParts?t.partEnd:t.fragmentEnd;u=this.getFragmentAtPosition(e,h,t)}let f=this.filterReplacedPrimary(u,t);if(!f&&u){const h=u.sn-t.startSN;f=this.filterReplacedPrimary(n[h+1]||null,t)}return this.mapToInitFragWhenRequired(f)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===ke.OK||n===ke.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,i,s){let a=null;if(e.gap&&(a=this.getNextFragment(this.nextLoadPosition,t),a&&!a.gap&&n.nextStart)){const o=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,i,0);if(o!==null&&n.len+o.len>=s){const u=a.sn;return this.loopSn!==u&&(this.log(`buffer full after gaps in "${i}" playlist starting at sn: ${u}`),this.loopSn=u),null}}return this.loopSn=void 0,a}get primaryPrefetch(){if(ci(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(ci(this.hls.config)&&e.type!==G.SUBTITLE){const n=this.hls.interstitialsManager,i=n==null?void 0:n.bufferingItem;if(i){const a=i.event;if(a){if(a.appendInPlace||Math.abs(e.start-i.start)>1||i.start===0)return null}else if(e.end<=i.start&&(t==null?void 0:t.live)===!1||e.start>i.end&&i.nextEvent&&(i.nextEvent.appendInPlace||e.start-i.end>1))return null}const s=n==null?void 0:n.playerQueue;if(s)for(let a=s.length;a--;){const o=s[a].interstitial;if(o.appendInPlace&&e.start>=o.startTime&&e.end<=o.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,n){let i=-1,s=!1,a=!0;for(let o=0,u=e.length;o<u;o++){const l=e[o];if(a=a&&!l.independent,i>-1&&n<l.start)break;const f=l.loaded;f?i=-1:(s||l.independent||a)&&l.fragment===t&&(i=o),s=f}return i}loadedEndOfParts(e,t){const n=e[e.length-1];return n&&t>n.start&&n.loaded}getInitialLiveFragment(e,t){const n=this.fragPrevious;let i=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),i=Dn(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){const s=n.sn+1;if(s>=e.startSN&&s<=e.endSN){const a=t[s-e.startSN];n.cc===a.cc&&(i=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${i.sn}`))}i||(i=xe(t,n.cc),i&&this.log(`Live playlist, switching playlist, load frag with same CC: ${i.sn}`))}}else{const s=this.hls.liveSyncPosition;s!==null&&(i=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return i}getFragmentAtPosition(e,t,n){const{config:i}=this;let{fragPrevious:s}=this,{fragments:a,endSN:o}=n;const{fragmentHint:u}=n,{maxFragLookUpTolerance:l}=i,f=n.partList,h=!!(this.loadingParts&&f!=null&&f.length&&u);h&&u&&!this.bitrateTest&&f[f.length-1].fragment.sn===u.sn&&(a=a.concat(u),o=u.sn);let E;if(e<t){var C;const J=e<this.lastCurrentTime||e>t-l||(C=this.media)!=null&&C.paused||!this.startFragRequested?0:l;E=Ct(s,a,e,J)}else E=a[a.length-1];if(E){const T=E.sn-n.startSN,J=this.fragmentTracker.getState(E);if((J===ke.OK||J===ke.PARTIAL&&E.gap)&&(s=E),s&&E.sn===s.sn&&(!h||f[0].fragment.sn>E.sn||!n.live&&!h)&&s&&E.level===s.level){const _e=a[T+1];E.sn<o&&this.fragmentTracker.getState(_e)!==ke.OK?E=_e:E=null}}return E}alignPlaylists(e,t,n){const i=e.fragments.length;if(!i)return this.warn("No fragments in live playlist"),0;const s=e.fragmentStart,a=!t,o=e.alignedSliding&&M(s);if(a||!o&&!s){rs(n,e);const u=e.fragmentStart;return this.log(`Live playlist sliding: ${u.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${i}`),u}return s}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const i=this.timelineOffset;if(n===-1){const s=this.startTimeOffset!==null,a=s?this.startTimeOffset:e.startTimeOffset;a!==null&&M(a)?(n=t+a,a<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${a} found in ${s?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+i}this.nextLoadPosition=n+i}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&ue(e)&&e.stats.aborted&&(this.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!==Xt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Xt.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const T=this.getCurrentContext(t.chunkMeta);T&&(t.frag=T.frag)}const n=t.frag;if(!n||n.type!==e||!this.levels)return;if(this.fragContextChanged(n)){var i;this.warn(`Frag load error must match current frag to retry ${n.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const s=t.details===W.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(n,!0);const a=t.errorAction,{action:o,flags:u,retryCount:l=0,retryConfig:f}=a||{},h=!!a&&!!f,E=h&&o===Gt.RetryRequest,C=h&&!a.resolved&&u===pe.MoveAllAlternatesMatchingHost;if(!E&&C&&ue(n)&&!n.endList)this.resetFragmentErrors(e),this.treatAsGap(n),a.resolved=!0;else if((E||C)&&l<f.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);const T=lt(f,l);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${l+1}/${f.maxNumRetry} in ${T}ms`),a.resolved=!0,this.retryDate=self.performance.now()+T,this.state=Xt.FRAG_LOADING_WAITING_RETRY}else if(f&&a)if(this.resetFragmentErrors(e),l<f.maxNumRetry)!s&&o!==Gt.RemoveAlternatePermanently&&(a.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${l})`);return}else o===Gt.SendAlternateToPenaltyBox?this.state=Xt.WAITING_LEVEL:this.state=Xt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===Xt.PARSING||this.state===Xt.PARSED){const t=e.frag,n=e.parent,i=this.getFwdBufferInfo(this.mediaBuffer,n),s=i&&i.len>.5;s&&this.reduceMaxBufferLength(i.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 ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),a}return!1}resetFragmentErrors(e){e===G.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Xt.STOPPED&&(this.state=Xt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const i=pn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,i,n),this.state===Xt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Xt.STOPPED&&(this.state=Xt.IDLE)}resetStartWhenNotLoaded(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,n,i){const s=n.details;if(!s){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((u,l)=>{const f=e.elementaryStreams[l];if(f){const h=f.endPTS-f.startPTS;if(h<=0)return this.warn(`Could not parse fragment ${e.sn} ${l} duration reliably (${h})`),u||!1;const E=i?0:Ki(s,e,f.startPTS,f.endPTS,f.startDTS,f.endDTS);return this.hls.trigger(d.LEVEL_PTS_UPDATED,{details:s,level:n,drift:E,type:l,frag:e,start:f.startPTS,end:f.endPTS}),!0}return u},!1)){var o;if(n.fragmentError===0&&this.treatAsGap(e,n),((o=this.transmuxer)==null?void 0:o.error)===null){const u=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(u.message),this.hls.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,error:u,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Xt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(d.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===G.MAIN?"level":"track"}fragInfo(e,t=!0,n){var i,s;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((i=t&&!n?e.startPTS:(n||e).start)!=null?i:NaN).toFixed(3)}-${((s=t&&!n?e.endPTS:(n||e).end)!=null?s:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(this.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 ci(r){return!!r.interstitialsController&&r.enableInterstitialPlayback!==!1}class Ii{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;if(e.length)e.length===1?n=e[0]:n=Bs(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function Bs(r,e){const t=new Uint8Array(e);let n=0;for(let i=0;i<r.length;i++){const s=r[i];t.set(s,n),n+=s.length}return t}var cs={exports:{}},ks;function is(){return ks||(ks=1,function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function i(u,l,f){this.fn=u,this.context=l,this.once=f||!1}function s(u,l,f,h,E){if(typeof f!="function")throw new TypeError("The listener must be a function");var C=new i(f,h||u,E),T=t?t+l:l;return u._events[T]?u._events[T].fn?u._events[T]=[u._events[T],C]:u._events[T].push(C):(u._events[T]=C,u._eventsCount++),u}function a(u,l){--u._eventsCount===0?u._events=new n:delete u._events[l]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var l=[],f,h;if(this._eventsCount===0)return l;for(h in f=this._events)e.call(f,h)&&l.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(f)):l},o.prototype.listeners=function(l){var f=t?t+l:l,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var E=0,C=h.length,T=new Array(C);E<C;E++)T[E]=h[E].fn;return T},o.prototype.listenerCount=function(l){var f=t?t+l:l,h=this._events[f];return h?h.fn?1:h.length:0},o.prototype.emit=function(l,f,h,E,C,T){var J=t?t+l:l;if(!this._events[J])return!1;var $=this._events[J],_e=arguments.length,Oe,De;if($.fn){switch($.once&&this.removeListener(l,$.fn,void 0,!0),_e){case 1:return $.fn.call($.context),!0;case 2:return $.fn.call($.context,f),!0;case 3:return $.fn.call($.context,f,h),!0;case 4:return $.fn.call($.context,f,h,E),!0;case 5:return $.fn.call($.context,f,h,E,C),!0;case 6:return $.fn.call($.context,f,h,E,C,T),!0}for(De=1,Oe=new Array(_e-1);De<_e;De++)Oe[De-1]=arguments[De];$.fn.apply($.context,Oe)}else{var rt=$.length,We;for(De=0;De<rt;De++)switch($[De].once&&this.removeListener(l,$[De].fn,void 0,!0),_e){case 1:$[De].fn.call($[De].context);break;case 2:$[De].fn.call($[De].context,f);break;case 3:$[De].fn.call($[De].context,f,h);break;case 4:$[De].fn.call($[De].context,f,h,E);break;default:if(!Oe)for(We=1,Oe=new Array(_e-1);We<_e;We++)Oe[We-1]=arguments[We];$[De].fn.apply($[De].context,Oe)}}return!0},o.prototype.on=function(l,f,h){return s(this,l,f,h,!1)},o.prototype.once=function(l,f,h){return s(this,l,f,h,!0)},o.prototype.removeListener=function(l,f,h,E){var C=t?t+l:l;if(!this._events[C])return this;if(!f)return a(this,C),this;var T=this._events[C];if(T.fn)T.fn===f&&(!E||T.once)&&(!h||T.context===h)&&a(this,C);else{for(var J=0,$=[],_e=T.length;J<_e;J++)(T[J].fn!==f||E&&!T[J].once||h&&T[J].context!==h)&&$.push(T[J]);$.length?this._events[C]=$.length===1?$[0]:$:a(this,C)}return this},o.prototype.removeAllListeners=function(l){var f;return l?(f=t?t+l:l,this._events[f]&&a(this,f)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,r.exports=o}(cs)),cs.exports}var fs=is(),ss=U(fs);const Ri="1.6.1",ds={};function Ia(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Fa(){const r=ds[Ri];if(r)return r.clientCount++,r;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),i={worker:new self.Worker(t),objectURL:t,clientCount:1};return ds[Ri]=i,i}function Da(r){const e=ds[r];if(e)return e.clientCount++,e;const t=new self.URL(r,self.location.href).href,i={worker:new self.Worker(t),scriptURL:t,clientCount:1};return ds[r]=i,i}function uo(r){const e=ds[r||Ri];if(e&&e.clientCount--===1){const{worker:n,objectURL:i}=e;delete ds[r||Ri],i&&self.URL.revokeObjectURL(i),n.terminate()}}function Ra(r,e){return e+10<=r.length&&r[e]===51&&r[e+1]===68&&r[e+2]===73&&r[e+3]<255&&r[e+4]<255&&r[e+6]<128&&r[e+7]<128&&r[e+8]<128&&r[e+9]<128}function la(r,e){return e+10<=r.length&&r[e]===73&&r[e+1]===68&&r[e+2]===51&&r[e+3]<255&&r[e+4]<255&&r[e+6]<128&&r[e+7]<128&&r[e+8]<128&&r[e+9]<128}function Gi(r,e){let t=0;return t=(r[e]&127)<<21,t|=(r[e+1]&127)<<14,t|=(r[e+2]&127)<<7,t|=r[e+3]&127,t}function as(r,e){const t=e;let n=0;for(;la(r,e);){n+=10;const i=Gi(r,e+6);n+=i,Ra(r,e+10)&&(n+=10),e+=n}if(n>0)return r.subarray(t,t+n)}function ua(r,e,t,n){const i=[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 C=new Error(`invalid ADTS sampling index:${a}`);r.emit(d.ERROR,d.ERROR,{type:we.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!0,error:C,reason:C.message});return}const o=(s>>6&3)+1,u=e[t+3]>>6&3|(s&1)<<2,l="mp4a.40."+o,f=i[a];let h=a;(o===5||o===29)&&(h-=3);const E=[o<<3|(h&14)>>1,(h&1)<<7|u<<3];return ie.log(`manifest codec:${n}, parsed codec:${l}, channels:${u}, rate:${f} (ADTS object type:${o} sampling index:${a})`),{config:E,samplerate:f,channelCount:u,codec:l,parsedCodec:l,manifestCodec:n}}function hs(r,e){return r[e]===255&&(r[e+1]&246)===240}function ca(r,e){return r[e+1]&1?7:9}function Ws(r,e){return(r[e+3]&3)<<11|r[e+4]<<3|(r[e+5]&224)>>>5}function La(r,e){return e+5<r.length}function Ps(r,e){return e+1<r.length&&hs(r,e)}function zs(r,e){return La(r,e)&&hs(r,e)&&Ws(r,e)<=r.length-e}function Ua(r,e){if(Ps(r,e)){const t=ca(r,e);if(e+t>=r.length)return!1;const n=Ws(r,e);if(n<=t)return!1;const i=e+n;return i===r.length||Ps(r,i)}return!1}function js(r,e,t,n,i){if(!r.samplerate){const s=ua(e,t,n,i);if(!s)return;p(r,s)}}function fa(r){return 1024*9e4/r}function da(r,e){const t=ca(r,e);if(e+t<=r.length){const n=Ws(r,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function Cs(r,e,t,n,i){const s=fa(r.samplerate),a=n+i*s,o=da(e,t);let u;if(o){const{frameLength:h,headerLength:E}=o,C=E+h,T=Math.max(0,t+C-e.length);T?(u=new Uint8Array(C-E),u.set(e.subarray(t+E,e.length),0)):u=e.subarray(t+E,t+C);const J={unit:u,pts:a};return T||r.samples.push(J),{sample:J,length:C,missing:T}}const l=e.length-t;return u=new Uint8Array(l),u.set(e.subarray(t,e.length),0),{sample:{unit:u,pts:a},length:l,missing:-1}}function co(r,e){return la(r,e)&&Gi(r,e+6)+10<=r.length-e}function Rr(r){if(r.size<2)return;const e=Fe(r.data,!0),t=new Uint8Array(r.data.subarray(e.length+1));return{key:r.type,info:e,data:t.buffer}}function kr(r){if(r.size<2)return;if(r.type==="TXXX"){let t=1;const n=Fe(r.data.subarray(t),!0);t+=n.length+1;const i=Fe(r.data.subarray(t));return{key:r.type,info:n,data:i}}const e=Fe(r.data.subarray(1));return{key:r.type,info:"",data:e}}function mi(r){if(r.type==="WXXX"){if(r.size<2)return;let t=1;const n=Fe(r.data.subarray(t),!0);t+=n.length+1;const i=Fe(r.data.subarray(t));return{key:r.type,info:n,data:i}}const e=Fe(r.data);return{key:r.type,info:"",data:e}}function Bi(r){return btoa(String.fromCharCode(...r))}function gi(r,e){if(r<0)return-gi(-r,e);const t=Math.pow(10,e);if(Math.abs(r*t%1-.5)<Number.EPSILON){const i=Math.floor(r*t);return(i%2===0?i:i+1)/t}else return Math.round(r*t)/t}function bs(r,e){const t=new URL(r),n=new URL(e);if(t.origin!==n.origin)return r;const i=t.pathname.split("/").slice(1),s=n.pathname.split("/").slice(1,-1);for(;i[0]===s[0];)i.shift(),s.shift();for(;s.length;)s.shift(),i.unshift("..");return i.join("/")}function gs(){try{return crypto.randomUUID()}catch(r){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,i=>{const s=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(i=="x"?s:s&3|8).toString(16)})}}}function ps(r){return r instanceof ArrayBuffer?r:r.byteOffset==0&&r.byteLength==r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer}function ms(r,e=0,t=1/0){return ha(r,e,t,Uint8Array)}function ha(r,e,t,n){const i=gl(r);let s=1;"BYTES_PER_ELEMENT"in n&&(s=n.BYTES_PER_ELEMENT);const a=pl(r)?r.byteOffset:0,o=(a+r.byteLength)/s,u=(a+e)/s,l=Math.floor(Math.max(0,Math.min(u,o))),f=Math.floor(Math.min(l+Math.max(t,0),o));return new n(i,l,f-l)}function gl(r){return r instanceof ArrayBuffer?r:r.buffer}function pl(r){return r&&r.buffer instanceof ArrayBuffer&&r.byteLength!==void 0&&r.byteOffset!==void 0}function ml(r){const e={key:r.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(r.size<2)return;if(r.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=r.data.subarray(1).indexOf(0);if(n===-1)return;const i=Fe(ms(r.data,1,n)),s=r.data[2+n],a=r.data.subarray(3+n).indexOf(0);if(a===-1)return;const o=Fe(ms(r.data,3+n,a));let u;return i==="-->"?u=Fe(ms(r.data,4+n+a)):u=ps(r.data.subarray(4+n+a)),e.mimeType=i,e.pictureType=s,e.description=o,e.data=u,e}function vl(r){return r.type==="PRIV"?Rr(r):r.type[0]==="W"?mi(r):r.type==="APIC"?ml(r):kr(r)}function ka(r){const e=String.fromCharCode(r[0],r[1],r[2],r[3]),t=Gi(r,4),n=10;return{type:e,size:t,data:r.subarray(n,n+t)}}const Pa=10,_l=10;function fo(r){let e=0;const t=[];for(;la(r,e);){const n=Gi(r,e+6);r[e+5]>>6&1&&(e+=Pa),e+=Pa;const i=e+n;for(;e+_l<i;){const s=ka(r.subarray(e)),a=vl(s);a&&t.push(a),e+=s.size+Pa}Ra(r,e)&&(e+=Pa)}return t}function aA(r){return r&&r.key==="PRIV"&&r.info==="com.apple.streaming.transportStreamTimestamp"}function yl(r){if(r.data.byteLength===8){const e=new Uint8Array(r.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function ga(r){const e=fo(r);for(let t=0;t<e.length;t++){const n=e[t];if(aA(n))return yl(n)}}let bi=function(r){return r.audioId3="org.id3",r.dateRange="com.apple.quicktime.HLS",r.emsg="https://aomedia.org/emsg/ID3",r.misbklv="urn:misb:KLV:bin:1910.1",r}({});function os(r="",e=9e4){return{type:r,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class ho{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,i){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=Ye(this.cachedData,e),this.cachedData=null);let n=as(e,0),i=n?n.length:0,s;const a=this._audioTrack,o=this._id3Track,u=n?ga(n):void 0,l=e.length;for((this.basePTS===null||this.frameIndex===0&&M(u))&&(this.basePTS=El(u,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:bi.audioId3,duration:Number.POSITIVE_INFINITY});i<l;){if(this.canParse(e,i)){const f=this.appendFrame(a,e,i);f?(this.frameIndex++,this.lastPTS=f.sample.pts,i+=f.length,s=i):i=l}else co(e,i)?(n=as(e,i),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:bi.audioId3,duration:Number.POSITIVE_INFINITY}),i+=n.length,s=i):i++;if(i===l&&s!==l){const f=e.slice(s);this.cachedData?this.cachedData=Ye(this.cachedData,f):this.cachedData=f}}return{audioTrack:a,videoTrack:os(),id3Track:o,textTrack:os()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:os(),id3Track:this._id3Track,textTrack:os()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const El=(r,e,t)=>{if(M(r))return r*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let Oa=null;const wl=[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],Bl=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Qa=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Cl=[0,1,1,4];function oA(r,e,t,n,i){if(t+24>e.length)return;const s=AA(e,t);if(s&&t+s.frameLength<=e.length){const a=s.samplesPerFrame*9e4/s.sampleRate,o=n+i*a,u={unit:e.subarray(t,t+s.frameLength),pts:o,dts:o};return r.config=[],r.channelCount=s.channelCount,r.samplerate=s.sampleRate,r.samples.push(u),{sample:u,length:s.frameLength,missing:0}}}function AA(r,e){const t=r[e+1]>>3&3,n=r[e+1]>>1&3,i=r[e+2]>>4&15,s=r[e+2]>>2&3;if(t!==1&&i!==0&&i!==15&&s!==3){const a=r[e+2]>>1&1,o=r[e+3]>>6,u=t===3?3-n:n===3?3:4,l=wl[u*14+i-1]*1e3,h=Bl[(t===3?0:t===2?1:2)*3+s],E=o===3?1:2,C=Qa[t][n],T=Cl[n],J=C*8*T,$=Math.floor(C*l/h+a)*T;if(Oa===null){const De=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Oa=De?parseInt(De[1]):0}return!!Oa&&Oa<=87&&n===2&&l>=224e3&&o===0&&(r[e+3]=r[e+3]|128),{sampleRate:h,channelCount:E,frameLength:$,samplesPerFrame:J}}}function go(r,e){return r[e]===255&&(r[e+1]&224)===224&&(r[e+1]&6)!==0}function lA(r,e){return e+1<r.length&&go(r,e)}function bl(r,e){return go(r,e)&&4<=r.length-e}function uA(r,e){if(e+1<r.length&&go(r,e)){const n=AA(r,e);let i=4;n!=null&&n.frameLength&&(i=n.frameLength);const s=e+i;return s===r.length||lA(r,s)}return!1}class xl extends ho{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,i){super.resetInitSegment(e,t,n,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const n=as(e,0);let i=(n==null?void 0:n.length)||0;if(uA(e,i))return!1;for(let s=e.length;i<s;i++)if(Ua(e,i))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return zs(e,t)}appendFrame(e,t,n){js(e,this.observer,t,n,e.manifestCodec);const i=Cs(e,t,n,this.basePTS,this.frameIndex);if(i&&i.missing===0)return i}}const cA=(r,e)=>{let t=0,n=5;e+=n;const i=new Uint32Array(1),s=new Uint32Array(1),a=new Uint8Array(1);for(;n>0;){a[0]=r[e];const o=Math.min(n,8),u=8-o;s[0]=4278190080>>>24+u<<u,i[0]=(a[0]&s[0])>>u,t=t?t<<o|i[0]:i[0],e+=1,n-=o}return t};class Sl extends ho{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,i){super.resetInitSegment(e,t,n,i),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const i=fA(e,t,n,this.basePTS,this.frameIndex);if(i!==-1)return{sample:e.samples[e.samples.length-1],length:i,missing:0}}static probe(e){if(!e)return!1;const t=as(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&ga(t)!==void 0&&cA(e,n)<16}}function fA(r,e,t,n,i){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 o=[48e3,44100,32e3][s],u=e[t+4]&63,f=[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][u*3+s]*2;if(t+f>e.length)return-1;const h=e[t+6]>>5;let E=0;h===2?E+=2:(h&1&&h!==1&&(E+=2),h&4&&(E+=2));const C=(e[t+6]<<8|e[t+7])>>12-E&1,J=[2,1,2,3,3,4,4,5][h]+C,$=e[t+5]>>3,_e=e[t+5]&7,Oe=new Uint8Array([s<<6|$<<1|_e>>2,(_e&3)<<6|h<<3|C<<2|u>>4,u<<4&224]),De=1536/o*9e4,rt=n+i*De,We=e.subarray(t,t+f);return r.config=Oe,r.channelCount=J,r.samplerate=o,r.samples.push({unit:We,pts:rt}),f}class Tl extends ho{resetInitSegment(e,t,n,i){super.resetInitSegment(e,t,n,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=as(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&ga(t)!==void 0&&cA(e,n)<=16)return!1;for(let i=e.length;n<i;n++)if(uA(e,n))return ie.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return bl(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return oA(e,t,n,this.basePTS,this.frameIndex)}}const dA=/\/emsg[-/]ID3/i;class Il{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,i){const s=this.videoTrack=os("video",1),a=this.audioTrack=os("audio",1),o=this.txtTrack=os("text",1);if(this.id3Track=os("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const u=Q(e);if(u.video){const{id:l,timescale:f,codec:h,supplemental:E}=u.video;s.id=l,s.timescale=o.timescale=f,s.codec=h,s.supplemental=E}if(u.audio){const{id:l,timescale:f,codec:h}=u.audio;a.id=l,a.timescale=f,a.codec=h}o.id=te.text,s.sampleDuration=0,s.duration=a.duration=i}resetContiguity(){this.remainderData=null}static probe(e){return I(e)}demux(e,t){this.timeOffset=t;let n=e;const i=this.videoTrack,s=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=Ye(this.remainderData,e));const o=ht(n);this.remainderData=o.remainder,i.samples=o.valid||new Uint8Array}else i.samples=n;const a=this.extractID3Track(i,t);return s.samples=nt(t,i),{videoTrack:i,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const i=this.extractID3Track(t,this.timeOffset);return n.samples=nt(e,t),{videoTrack:t,audioTrack:os(),id3Track:i,textTrack:os()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const i=g(e.samples,["emsg"]);i&&i.forEach(s=>{const a=tn(s);if(dA.test(a.schemeIdUri)){const o=hA(a,t);let u=a.eventDuration===4294967295?Number.POSITIVE_INFINITY:a.eventDuration/a.timeScale;u<=.001&&(u=Number.POSITIVE_INFINITY);const l=a.payload;n.samples.push({data:l,len:l.byteLength,dts:o,pts:o,type:bi.emsg,duration:u})}else if(this.config.enableEmsgKLVMetadata&&a.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const o=hA(a,t);n.samples.push({data:a.payload,len:a.payload.byteLength,dts:o,pts:o,type:bi.misbklv,duration:Number.POSITIVE_INFINITY})}})}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function hA(r,e){return M(r.presentationTime)?r.presentationTime/r.timeScale:e+r.presentationTimeDelta/r.timeScale}class Fl{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Jt(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,ut.cbc)}decryptAacSample(e,t,n){const i=e[t].unit;if(i.length<=16)return;const s=i.subarray(16,i.length-i.length%16),a=s.buffer.slice(s.byteOffset,s.byteOffset+s.length);this.decryptBuffer(a).then(o=>{const u=new Uint8Array(o);i.set(u,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)})}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let i=0;for(let s=32;s<e.length-16;s+=160,i+=16)n.set(e.subarray(s,s+16),i);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let i=0;for(let s=32;s<e.length-16;s+=160,i+=16)e.set(n.subarray(i,i+16),s);return e}decryptAvcSample(e,t,n,i,s){const a=vt(s.data),o=this.getAvcEncryptedData(a);this.decryptBuffer(o.buffer).then(u=>{s.data=this.getAvcDecryptedUnit(a,u),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,i)})}decryptAvcSamples(e,t,n,i){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){i();return}const s=e[t].units;for(;!(n>=s.length);n++){const a=s[n];if(!(a.data.length<=48||a.type!==1&&a.type!==5)&&(this.decryptAvcSample(e,t,n,i,a),!this.decrypter.isSync()))return}}}}class Ys{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,i;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const s=n.units;i=s[s.length-1]}return i}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,i=n.length;if(i){const s=n[i-1];e.pts=s.pts,e.dts=s.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const i=t.byteLength;let s=e.naluState||0;const a=s,o=[];let u=0,l,f,h,E=-1,C=0;for(s===-1&&(E=0,C=this.getNALuType(t,0),s=0,u=1);u<i;){if(l=t[u++],!s){s=l?0:1;continue}if(s===1){s=l?0:2;continue}if(!l)s=3;else if(l===1){if(f=u-s-1,E>=0){const T={data:t.subarray(E,f),type:C};o.push(T)}else{const T=this.getLastNalUnit(e.samples);T&&(a&&u<=4-a&&T.state&&(T.data=T.data.subarray(0,T.data.byteLength-a)),f>0&&(T.data=Ye(T.data,t.subarray(0,f)),T.state=0))}u<i?(h=this.getNALuType(t,u),E=u,C=h,s=0):s=-1}else s=0}if(E>=0&&s>=0){const T={data:t.subarray(E,i),type:C,state:s};o.push(T)}if(o.length===0){const T=this.getLastNalUnit(e.samples);T&&(T.data=Ye(T.data,t))}return e.naluState=s,o}}class pa{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,i=new Uint8Array(4),s=Math.min(4,t);if(s===0)throw new Error("no bytes available");i.set(e.subarray(n,n+s)),this.word=new DataView(i.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 n=this.word>>>32-t;if(e>32&&ie.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class gA extends Ys{parsePES(e,t,n,i){const s=this.parseNALu(e,n.data,i);let a=this.VideoSample,o,u=!1;n.data=null,a&&s.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.forEach(l=>{var f,h;switch(l.type){case 1:{let J=!1;o=!0;const $=l.data;if(u&&$.length>4){const _e=this.readSliceType($);(_e===2||_e===4||_e===7||_e===9)&&(J=!0)}if(J){var E;(E=a)!=null&&E.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.frame=!0,a.key=J;break}case 5:o=!0,(f=a)!=null&&f.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 6:{o=!0,Et(l.data,1,n.pts,t.samples);break}case 7:{var C,T;o=!0,u=!0;const J=l.data,$=this.readSPS(J);if(!e.sps||e.width!==$.width||e.height!==$.height||((C=e.pixelRatio)==null?void 0:C[0])!==$.pixelRatio[0]||((T=e.pixelRatio)==null?void 0:T[1])!==$.pixelRatio[1]){e.width=$.width,e.height=$.height,e.pixelRatio=$.pixelRatio,e.sps=[J];const _e=J.subarray(1,4);let Oe="avc1.";for(let De=0;De<3;De++){let rt=_e[De].toString(16);rt.length<2&&(rt="0"+rt),Oe+=rt}e.codec=Oe}break}case 8:o=!0,e.pps=[l.data];break;case 9:o=!0,e.audFound=!0,(h=a)!=null&&h.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:o=!0;break;default:o=!1;break}a&&o&&a.units.push(l)}),i&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new pa(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,i=8,s;for(let a=0;a<e;a++)i!==0&&(s=t.readEG(),i=(n+s+256)%256),n=i===0?n:i}readSPS(e){const t=new pa(e);let n=0,i=0,s=0,a=0,o,u,l;const f=t.readUByte.bind(t),h=t.readBits.bind(t),E=t.readUEG.bind(t),C=t.readBoolean.bind(t),T=t.skipBits.bind(t),J=t.skipEG.bind(t),$=t.skipUEG.bind(t),_e=this.skipScalingList.bind(this);f();const Oe=f();if(h(5),T(3),f(),$(),Oe===100||Oe===110||Oe===122||Oe===244||Oe===44||Oe===83||Oe===86||Oe===118||Oe===128){const _t=E();if(_t===3&&T(1),$(),$(),T(1),C())for(u=_t!==3?8:12,l=0;l<u;l++)C()&&(l<6?_e(16,t):_e(64,t))}$();const De=E();if(De===0)E();else if(De===1)for(T(1),J(),J(),o=E(),l=0;l<o;l++)J();$(),T(1);const rt=E(),We=E(),Lt=h(1);Lt===0&&T(1),T(1),C()&&(n=E(),i=E(),s=E(),a=E());let dt=[1,1];if(C()&&C())switch(f()){case 1:dt=[1,1];break;case 2:dt=[12,11];break;case 3:dt=[10,11];break;case 4:dt=[16,11];break;case 5:dt=[40,33];break;case 6:dt=[24,11];break;case 7:dt=[20,11];break;case 8:dt=[32,11];break;case 9:dt=[80,33];break;case 10:dt=[18,11];break;case 11:dt=[15,11];break;case 12:dt=[64,33];break;case 13:dt=[160,99];break;case 14:dt=[4,3];break;case 15:dt=[3,2];break;case 16:dt=[2,1];break;case 255:{dt=[f()<<8|f(),f()<<8|f()];break}}return{width:Math.ceil((rt+1)*16-n*2-i*2),height:(2-Lt)*(We+1)*16-(Lt?2:4)*(s+a),pixelRatio:dt}}}class po extends Ys{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,i){const s=this.parseNALu(e,n.data,i);let a=this.VideoSample,o,u=!1;n.data=null,a&&s.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.forEach(l=>{var f,h;switch(l.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,n.pts,n.dts)),a.frame=!0,o=!0;break;case 16:case 17:case 18:case 21:if(o=!0,u){var E;(E=a)!=null&&E.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 19:case 20:o=!0,(f=a)!=null&&f.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 39:o=!0,Et(l.data,2,n.pts,t.samples);break;case 32:o=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=p(e.params,this.readVPS(l.data)),this.initVPS=l.data),e.vps=[l.data];break;case 33:if(o=!0,u=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],l.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const C=this.readSPS(l.data);e.width=C.width,e.height=C.height,e.pixelRatio=C.pixelRatio,e.codec=C.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const T in C.params)e.params[T]=C.params[T]}this.pushParameterSet(e.sps,l.data,e.vps),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0;break;case 34:if(o=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const C=this.readPPS(l.data);for(const T in C)e.params[T]=C[T]}this.pushParameterSet(e.pps,l.data,e.vps)}break;case 35:o=!0,e.audFound=!0,(h=a)!=null&&h.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:o=!1;break}a&&o&&a.units.push(l)}),i&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let i=0;i<e.byteLength;i++)i>=2&&e[i]===3&&e[i-1]===0&&e[i-2]===0||(t[n]=e[i],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new pa(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const n=t.readBits(3),i=t.readBoolean();return{numTemporalLayers:n+1,temporalIdNested:i}}readSPS(e){const t=new pa(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const i=t.readBits(2),s=t.readBoolean(),a=t.readBits(5),o=t.readUByte(),u=t.readUByte(),l=t.readUByte(),f=t.readUByte(),h=t.readUByte(),E=t.readUByte(),C=t.readUByte(),T=t.readUByte(),J=t.readUByte(),$=t.readUByte(),_e=t.readUByte(),Oe=[],De=[];for(let ti=0;ti<n;ti++)Oe.push(t.readBoolean()),De.push(t.readBoolean());if(n>0)for(let ti=n;ti<8;ti++)t.readBits(2);for(let ti=0;ti<n;ti++)Oe[ti]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),De[ti]&&t.readUByte();t.readUEG();const rt=t.readUEG();rt==3&&t.skipBits(1);const We=t.readUEG(),Lt=t.readUEG(),dt=t.readBoolean();let _t=0,jt=0,xt=0,xn=0;dt&&(_t+=t.readUEG(),jt+=t.readUEG(),xt+=t.readUEG(),xn+=t.readUEG());const bn=t.readUEG(),wr=t.readUEG(),mr=t.readUEG(),ar=t.readBoolean();for(let ti=ar?0:n;ti<=n;ti++)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 Li=0;Li<4;Li++)for(let ls=0;ls<(Li===3?2:6);ls++)if(!t.readBoolean())t.readUEG();else{const Es=Math.min(64,1<<4+(Li<<1));Li>1&&t.readEG();for(let lo=0;lo<Es;lo++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const Ar=t.readUEG();let Tn=0;for(let ti=0;ti<Ar;ti++){let Li=!1;if(ti!==0&&(Li=t.readBoolean()),Li){ti===Ar&&t.readUEG(),t.readBoolean(),t.readUEG();let ls=0;for(let Sa=0;Sa<=Tn;Sa++){const Es=t.readBoolean();let lo=!1;Es||(lo=t.readBoolean()),(Es||lo)&&ls++}Tn=ls}else{const ls=t.readUEG(),Sa=t.readUEG();Tn=ls+Sa;for(let Es=0;Es<ls;Es++)t.readUEG(),t.readBoolean();for(let Es=0;Es<Sa;Es++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const ti=t.readUEG();for(let Li=0;Li<ti;Li++){for(let ls=0;ls<mr+4;ls++)t.readBits(1);t.readBits(1)}}let Br=0,yr=1,Tr=1,Lr=!0,Hr=1,Xr=0;t.readBoolean(),t.readBoolean();let Mi=!1;if(t.readBoolean()){if(t.readBoolean()){const Ta=t.readUByte(),Xu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],hl=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Ta>0&&Ta<16?(yr=Xu[Ta-1],Tr=hl[Ta-1]):Ta===255&&(yr=t.readBits(16),Tr=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(),Mi=t.readBoolean(),Mi&&(_t+=t.readUEG(),jt+=t.readUEG(),xt+=t.readUEG(),xn+=t.readUEG()),t.readBoolean()&&(Hr=t.readBits(32),Xr=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const hl=t.readBoolean(),Ju=t.readBoolean();let iA=!1;(hl||Ju)&&(iA=t.readBoolean(),iA&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),iA&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let qu=0;qu<=n;qu++){Lr=t.readBoolean();const oc=Lr||t.readBoolean();let ec=!1;oc?t.readEG():ec=t.readBoolean();const tc=ec?1:t.readUEG()+1;if(hl)for(let sA=0;sA<tc;sA++)t.readUEG(),t.readUEG(),iA&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(Ju)for(let sA=0;sA<tc;sA++)t.readUEG(),t.readUEG(),iA&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Br=t.readUEG())}let Aa=We,Yu=Lt;if(dt||Mi){let ti=1,Li=1;rt===1?ti=Li=2:rt==2&&(ti=2),Aa=We-ti*jt-ti*_t,Yu=Lt-Li*xn-Li*xt}const sc=i?["A","B","C"][i]:"",ac=o<<24|u<<16|l<<8|f;let Wu=0;for(let ti=0;ti<32;ti++)Wu=(Wu|(ac>>ti&1)<<31-ti)>>>0;let zu=Wu.toString(16);return a===1&&zu==="2"&&(zu="6"),{codecString:`hvc1.${sc}${a}.${zu}.${s?"H":"L"}${_e}.B0`,params:{general_tier_flag:s,general_profile_idc:a,general_profile_space:i,general_profile_compatibility_flags:[o,u,l,f],general_constraint_indicator_flags:[h,E,C,T,J,$],general_level_idc:_e,bit_depth:bn+8,bit_depth_luma_minus8:bn,bit_depth_chroma_minus8:wr,min_spatial_segmentation_idc:Br,chroma_format_idc:rt,frame_rate:{fixed:Lr,fps:Xr/Hr}},width:Aa,height:Yu,pixelRatio:[yr,Tr]}}readPPS(e){const t=new pa(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 i=t.readBoolean(),s=t.readBoolean();let a=1;return s&&i?a=0:s?a=3:i&&(a=2),{parallelismType:a}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const Ei=188;class xs{constructor(e,t,n,i){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=i,this.videoParser=null}static probe(e,t){const n=xs.syncOffset(e);return n>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`),n!==-1}static syncOffset(e){const t=e.length;let n=Math.min(Ei*5,t-Ei)+1,i=0;for(;i<n;){let s=!1,a=-1,o=0;for(let u=i;u<t;u+=Ei)if(e[u]===71&&(t-u===Ei||e[u+Ei]===71)){if(o++,a===-1&&(a=u,a!==0&&(n=Math.min(a+Ei*99,e.length-Ei)+1)),s||(s=mo(e,u)===0),s&&o>1&&(a===0&&o>2||u+Ei>n))return a}else{if(o)return-1;break}i++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:te[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,n,i){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=xs.createTrack("video"),this._videoTrack.duration=i,this._audioTrack=xs.createTrack("audio",i),this._id3Track=xs.createTrack("id3"),this._txtTrack=xs.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,i=!1){n||(this.sampleAes=null);let s;const a=this._videoTrack,o=this._audioTrack,u=this._id3Track,l=this._txtTrack;let f=a.pid,h=a.pesData,E=o.pid,C=u.pid,T=o.pesData,J=u.pesData,$=null,_e=this.pmtParsed,Oe=this._pmtId,De=e.length;if(this.remainderData&&(e=Ye(this.remainderData,e),De=e.length,this.remainderData=null),De<Ei&&!i)return this.remainderData=e,{audioTrack:o,videoTrack:a,id3Track:u,textTrack:l};const rt=Math.max(0,xs.syncOffset(e));De-=(De-rt)%Ei,De<e.byteLength&&!i&&(this.remainderData=new Uint8Array(e.buffer,De,e.buffer.byteLength-De));let We=0;for(let dt=rt;dt<De;dt+=Ei)if(e[dt]===71){const _t=!!(e[dt+1]&64),jt=mo(e,dt),xt=(e[dt+3]&48)>>4;let xn;if(xt>1){if(xn=dt+5+e[dt+4],xn===dt+Ei)continue}else xn=dt+4;switch(jt){case f:if(_t){if(h&&(s=Xs(h,this.logger))){if(this.videoParser===null)switch(a.segmentCodec){case"avc":this.videoParser=new gA;break;case"hevc":this.videoParser=new po;break}this.videoParser!==null&&this.videoParser.parsePES(a,l,s,!1)}h={data:[],size:0}}h&&(h.data.push(e.subarray(xn,dt+Ei)),h.size+=dt+Ei-xn);break;case E:if(_t){if(T&&(s=Xs(T,this.logger)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,s);break;case"mp3":this.parseMPEGPES(o,s);break;case"ac3":this.parseAC3PES(o,s);break}T={data:[],size:0}}T&&(T.data.push(e.subarray(xn,dt+Ei)),T.size+=dt+Ei-xn);break;case C:_t&&(J&&(s=Xs(J,this.logger))&&this.parseID3PES(u,s),J={data:[],size:0}),J&&(J.data.push(e.subarray(xn,dt+Ei)),J.size+=dt+Ei-xn);break;case 0:_t&&(xn+=e[xn]+1),Oe=this._pmtId=Dl(e,xn);break;case Oe:{_t&&(xn+=e[xn]+1);const bn=Rl(e,xn,this.typeSupported,n,this.observer,this.logger);f=bn.videoPid,f>0&&(a.pid=f,a.segmentCodec=bn.segmentVideoCodec),E=bn.audioPid,E>0&&(o.pid=E,o.segmentCodec=bn.segmentAudioCodec),C=bn.id3Pid,C>0&&(u.pid=C),$!==null&&!_e&&(this.logger.warn(`MPEG-TS PMT found at ${dt} after unknown PID '${$}'. Backtracking to sync byte @${rt} to parse all TS packets.`),$=null,dt=rt-188),_e=this.pmtParsed=!0;break}case 17:case 8191:break;default:$=jt;break}}else We++;We>0&&vo(this.observer,new Error(`Found ${We} TS packet/s that do not start with 0x47`),void 0,this.logger),a.pesData=h,o.pesData=T,u.pesData=J;const Lt={audioTrack:o,videoTrack:a,id3Track:u,textTrack:l};return i&&this.extractRemainingSamples(Lt),Lt}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:i,textTrack:s}=e,a=n.pesData,o=t.pesData,u=i.pesData;let l;if(a&&(l=Xs(a,this.logger))){if(this.videoParser===null)switch(n.segmentCodec){case"avc":this.videoParser=new gA;break;case"hevc":this.videoParser=new po;break}this.videoParser!==null&&(this.videoParser.parsePES(n,s,l,!0),n.pesData=null)}else n.pesData=a;if(o&&(l=Xs(o,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l);break;case"ac3":this.parseAC3PES(t,l);break}t.pesData=null}else o!=null&&o.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;u&&(l=Xs(u,this.logger))?(this.parseID3PES(i,l),i.pesData=null):i.pesData=u}demuxSampleAes(e,t,n){const i=this.demux(e,n,!0,!this.config.progressive),s=this.sampleAes=new Fl(this.observer,this.config,t);return this.decrypt(i,s)}decrypt(e,t){return new Promise(n=>{const{audioTrack:i,videoTrack:s}=e;i.samples&&i.segmentCodec==="aac"?t.decryptAacSamples(i.samples,0,()=>{s.samples?t.decryptAvcSamples(s.samples,0,0,()=>{n(e)}):n(e)}):s.samples&&t.decryptAvcSamples(s.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const i=this.aacOverFlow;let s=t.data;if(i){this.aacOverFlow=null;const h=i.missing,E=i.sample.unit.byteLength;if(h===-1)s=Ye(i.sample.unit,s);else{const C=E-h;i.sample.unit.set(s.subarray(0,h),C),e.samples.push(i.sample),n=i.missing}}let a,o;for(a=n,o=s.length;a<o-1&&!Ps(s,a);a++);if(a!==n){let h;const E=a<o-1;if(E?h=`AAC PES did not start with ADTS header,offset:${a}`:h="No ADTS header found in AAC PES",vo(this.observer,new Error(h),E,this.logger),!E)return}js(e,this.observer,s,a,this.audioCodec);let u;if(t.pts!==void 0)u=t.pts;else if(i){const h=fa(e.samplerate);u=i.sample.pts+h}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let l=0,f;for(;a<o;)if(f=Cs(e,s,a,u,l),a+=f.length,f.missing){this.aacOverFlow=f;break}else for(l++;a<o-1&&!Ps(s,a);a++);}parseMPEGPES(e,t){const n=t.data,i=n.length;let s=0,a=0;const o=t.pts;if(o===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;a<i;)if(lA(n,a)){const u=oA(e,n,a,o,s);if(u)a+=u.length,s++;else break}else a++}parseAC3PES(e,t){{const n=t.data,i=t.pts;if(i===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const s=n.length;let a=0,o=0,u;for(;o<s&&(u=fA(e,n,o,i,a++))>0;)o+=u}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=p({},t,{type:this._videoTrack?bi.emsg:bi.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function mo(r,e){return((r[e+1]&31)<<8)+r[e+2]}function Dl(r,e){return(r[e+10]&31)<<8|r[e+11]}function Rl(r,e,t,n,i,s){const a={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=(r[e+1]&15)<<8|r[e+2],u=e+3+o-4,l=(r[e+10]&15)<<8|r[e+11];for(e+=12+l;e<u;){const f=mo(r,e),h=(r[e+3]&15)<<8|r[e+4];switch(r[e]){case 207:if(!n){_o("ADTS AAC",s);break}case 15:a.audioPid===-1&&(a.audioPid=f);break;case 21:a.id3Pid===-1&&(a.id3Pid=f);break;case 219:if(!n){_o("H.264",s);break}case 27:a.videoPid===-1&&(a.videoPid=f);break;case 3:case 4:!t.mpeg&&!t.mp3?s.log("MPEG audio found, not supported in this browser"):a.audioPid===-1&&(a.audioPid=f,a.segmentAudioCodec="mp3");break;case 193:if(!n){_o("AC-3",s);break}case 129:t.ac3?a.audioPid===-1&&(a.audioPid=f,a.segmentAudioCodec="ac3"):s.log("AC-3 audio found, not supported in this browser");break;case 6:if(a.audioPid===-1&&h>0){let E=e+5,C=h;for(;C>2;){switch(r[E]){case 106:t.ac3!==!0?s.log("AC-3 audio found, not supported in this browser for now"):(a.audioPid=f,a.segmentAudioCodec="ac3");break}const J=r[E+1]+2;E+=J,C-=J}}break;case 194:case 135:return vo(i,new Error("Unsupported EC-3 in M2TS found"),void 0,s),a;case 36:a.videoPid===-1&&(a.videoPid=f,a.segmentVideoCodec="hevc",s.log("HEVC in M2TS found"));break}e+=h+5}return a}function vo(r,e,t,n){n.warn(`parsing error: ${e.message}`),r.emit(d.ERROR,d.ERROR,{type:we.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function _o(r,e){e.log(`${r} with AES-128-CBC encryption found in unencrypted stream`)}function Xs(r,e){let t=0,n,i,s,a,o;const u=r.data;if(!r||r.size===0)return null;for(;u[0].length<19&&u.length>1;)u[0]=Ye(u[0],u[1]),u.splice(1,1);if(n=u[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(i=(n[4]<<8)+n[5],i&&i>r.size-6)return null;const f=n[7];f&192&&(a=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,f&64?(o=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,a-o>60*9e4&&(e.warn(`${Math.round((a-o)/9e4)}s delta between PTS and DTS, align them`),a=o)):o=a),s=n[8];let h=s+9;if(r.size<=h)return null;r.size-=h;const E=new Uint8Array(r.size);for(let C=0,T=u.length;C<T;C++){n=u[C];let J=n.byteLength;if(h)if(h>J){h-=J;continue}else n=n.subarray(h),J-=h,h=0;E.set(n,t),t+=J}return i&&(i-=s+3),{data:E,pts:a,dts:o,len:i}}return null}class vi{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 Ss=Math.pow(2,32)-1;class kt{static init(){kt.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 kt.types)kt.types.hasOwnProperty(e)&&(kt.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);kt.HDLR_TYPES={video:t,audio:n};const i=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]);kt.STTS=kt.STSC=kt.STCO=s,kt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),kt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),kt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),kt.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);kt.FTYP=kt.box(kt.types.ftyp,a,u,a,o),kt.DINF=kt.box(kt.types.dinf,kt.box(kt.types.dref,i))}static box(e,...t){let n=8,i=t.length;const s=i;for(;i--;)n+=t[i].byteLength;const a=new Uint8Array(n);for(a[0]=n>>24&255,a[1]=n>>16&255,a[2]=n>>8&255,a[3]=n&255,a.set(e,4),i=0,n=8;i<s;i++)a.set(t[i],n),n+=t[i].byteLength;return a}static hdlr(e){return kt.box(kt.types.hdlr,kt.HDLR_TYPES[e])}static mdat(e){return kt.box(kt.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(Ss+1)),i=Math.floor(t%(Ss+1));return kt.box(kt.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))}static mdia(e){return kt.box(kt.types.mdia,kt.mdhd(e.timescale||0,e.duration||0),kt.hdlr(e.type),kt.minf(e))}static mfhd(e){return kt.box(kt.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"?kt.box(kt.types.minf,kt.box(kt.types.smhd,kt.SMHD),kt.DINF,kt.stbl(e)):kt.box(kt.types.minf,kt.box(kt.types.vmhd,kt.VMHD),kt.DINF,kt.stbl(e))}static moof(e,t,n){return kt.box(kt.types.moof,kt.mfhd(e),kt.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=kt.trak(e[t]);return kt.box.apply(null,[kt.types.moov,kt.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(kt.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=kt.trex(e[t]);return kt.box.apply(null,[kt.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(Ss+1)),i=Math.floor(t%(Ss+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,n>>24,n>>16&255,n>>8&255,n&255,i>>24,i>>16&255,i>>8&255,i&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 kt.box(kt.types.mvhd,s)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let i,s;for(i=0;i<t.length;i++)s=t[i].flags,n[i+4]=s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy;return kt.box(kt.types.sdtp,n)}static stbl(e){return kt.box(kt.types.stbl,kt.stsd(e),kt.box(kt.types.stts,kt.STTS),kt.box(kt.types.stsc,kt.STSC),kt.box(kt.types.stsz,kt.STSZ),kt.box(kt.types.stco,kt.STCO))}static avc1(e){let t=[],n=[],i,s,a;for(i=0;i<e.sps.length;i++)s=e.sps[i],a=s.byteLength,t.push(a>>>8&255),t.push(a&255),t=t.concat(Array.prototype.slice.call(s));for(i=0;i<e.pps.length;i++)s=e.pps[i],a=s.byteLength,n.push(a>>>8&255),n.push(a&255),n=n.concat(Array.prototype.slice.call(s));const o=kt.box(kt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),u=e.width,l=e.height,f=e.pixelRatio[0],h=e.pixelRatio[1];return kt.box(kt.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,u>>8&255,u&255,l>>8&255,l&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,kt.box(kt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),kt.box(kt.types.pasp,new Uint8Array([f>>24,f>>16&255,f>>8&255,f&255,h>>24,h>>16&255,h>>8&255,h&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 kt.box(kt.types.mp4a,kt.audioStsd(e),kt.box(kt.types.esds,kt.esds(e)))}static mp3(e){return kt.box(kt.types[".mp3"],kt.audioStsd(e))}static ac3(e){return kt.box(kt.types["ac-3"],kt.audioStsd(e),kt.box(kt.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return kt.box(kt.types.stsd,kt.STSD,kt.mp4a(e));if(t==="ac3"&&e.config)return kt.box(kt.types.stsd,kt.STSD,kt.ac3(e));if(t==="mp3"&&e.codec==="mp3")return kt.box(kt.types.stsd,kt.STSD,kt.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return kt.box(kt.types.stsd,kt.STSD,kt.avc1(e));if(t==="hevc"&&e.vps)return kt.box(kt.types.stsd,kt.STSD,kt.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),i=e.width||0,s=e.height||0,a=Math.floor(n/(Ss+1)),o=Math.floor(n%(Ss+1));return kt.box(kt.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,o>>24,o>>16&255,o>>8&255,o&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,i>>8&255,i&255,0,0,s>>8&255,s&255,0,0]))}static traf(e,t){const n=kt.sdtp(e),i=e.id,s=Math.floor(t/(Ss+1)),a=Math.floor(t%(Ss+1));return kt.box(kt.types.traf,kt.box(kt.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),kt.box(kt.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])),kt.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,kt.box(kt.types.trak,kt.tkhd(e),kt.mdia(e))}static trex(e){const t=e.id;return kt.box(kt.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],i=n.length,s=12+16*i,a=new Uint8Array(s);let o,u,l,f,h,E;for(t+=8+s,a.set([e.type==="video"?1:0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),o=0;o<i;o++)u=n[o],l=u.duration,f=u.size,h=u.flags,E=u.cts,a.set([l>>>24&255,l>>>16&255,l>>>8&255,l&255,f>>>24&255,f>>>16&255,f>>>8&255,f&255,h.isLeading<<2|h.dependsOn,h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|h.isNonSync,h.degradPrio&61440,h.degradPrio&15,E>>>24&255,E>>>16&255,E>>>8&255,E&255],12+16*o);return kt.box(kt.types.trun,a)}static initSegment(e){kt.types||kt.init();const t=kt.moov(e);return Ye(kt.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],i=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),i-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let a=s.length;for(let T=0;T<n.length;T+=1){a+=3;for(let J=0;J<n[T].length;J+=1)a+=2+n[T][J].length}const o=new Uint8Array(a);o.set(s,0),a=s.length;const u=n.length-1;for(let T=0;T<n.length;T+=1){o.set(new Uint8Array([32+T|(T===u?128:0),0,n[T].length]),a),a+=3;for(let J=0;J<n[T].length;J+=1)o.set(new Uint8Array([n[T][J].length>>8,n[T][J].length&255]),a),a+=2,o.set(n[T][J],a),a+=n[T][J].length}const l=kt.box(kt.types.hvcC,o),f=e.width,h=e.height,E=e.pixelRatio[0],C=e.pixelRatio[1];return kt.box(kt.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,f>>8&255,f&255,h>>8&255,h&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,kt.box(kt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),kt.box(kt.types.pasp,new Uint8Array([E>>24,E>>16&255,E>>8&255,E&255,C>>24,C>>16&255,C>>8&255,C&255])))}}kt.types=void 0,kt.HDLR_TYPES=void 0,kt.STTS=void 0,kt.STSC=void 0,kt.STCO=void 0,kt.STSZ=void 0,kt.VMHD=void 0,kt.SMHD=void 0,kt.STSD=void 0,kt.FTYP=void 0,kt.DINF=void 0;const pA=9e4;function yo(r,e,t=1,n=!1){const i=r*e*t;return n?Math.round(i):i}function Ll(r,e,t=1,n=!1){return yo(r,e,1/t,n)}function Js(r,e=!1){return yo(r,1e3,1/pA,e)}function Ul(r,e=1){return yo(r,pA,1/e)}const kl=10*1e3,Pl=1024,Ol=1152,Ql=1536;let qs=null,Ma=null;function or(r,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:r?2:1,isNonSync:r?0:1}}}class Na{constructor(e,t,n,i){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=n,this.logger=i,this.ISGenerated=!1,qs===null){const a=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);qs=a?parseInt(a[1]):0}if(Ma===null){const s=navigator.userAgent.match(/Safari\/(\d+)/i);Ma=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 n=e[0].pts,i=e.reduce((s,a)=>{let o=a.pts,u=o-s;return u<-4294967296&&(t=!0,o=$i(o,n),u=o-s),u>0?s:o},n);return t&&this.logger.debug("PTS rollover detected"),i}remux(e,t,n,i,s,a,o,u){let l,f,h,E,C,T,J=s,$=s;const _e=e.pid>-1,Oe=t.pid>-1,De=t.samples.length,rt=e.samples.length>0,We=o&&De>0||De>1;if((!_e||rt)&&(!Oe||We)||this.ISGenerated||o){if(this.ISGenerated){var dt,_t,jt,xt;const mr=this.videoTrackConfig;(mr&&(t.width!==mr.width||t.height!==mr.height||((dt=t.pixelRatio)==null?void 0:dt[0])!==((_t=mr.pixelRatio)==null?void 0:_t[0])||((jt=t.pixelRatio)==null?void 0:jt[1])!==((xt=mr.pixelRatio)==null?void 0:xt[1]))||!mr&&We||this.nextAudioPts===null&&rt)&&this.resetInitSegment()}this.ISGenerated||(h=this.generateIS(e,t,s,a));const xn=this.isVideoContiguous;let bn=-1,wr;if(We&&(bn=Eo(t.samples),!xn&&this.config.forceKeyFrameOnDiscontinuity))if(T=!0,bn>0){this.logger.warn(`[mp4-remuxer]: Dropped ${bn} out of ${De} video samples due to a missing keyframe`);const mr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(bn),t.dropped+=bn,$+=(t.samples[0].pts-mr)/t.inputTimeScale,wr=$}else bn===-1&&(this.logger.warn(`[mp4-remuxer]: No keyframe found out of ${De} video samples`),T=!1);if(this.ISGenerated){if(rt&&We){const mr=this.getVideoStartPts(t.samples),Xn=($i(e.samples[0].pts,mr)-mr)/t.inputTimeScale;J+=Math.max(0,Xn),$+=Math.max(0,-Xn)}if(rt){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),h=this.generateIS(e,t,s,a)),f=this.remuxAudio(e,J,this.isAudioContiguous,a,Oe||We||u===G.AUDIO?$:void 0),We){const mr=f?f.endPTS-f.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),h=this.generateIS(e,t,s,a)),l=this.remuxVideo(t,$,xn,mr)}}else We&&(l=this.remuxVideo(t,$,xn,0));l&&(l.firstKeyFrame=bn,l.independent=bn!==-1,l.firstKeyFramePTS=wr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(C=es(n,s,this._initPTS,this._initDTS)),i.samples.length&&(E=mA(i,s,this._initPTS))),{audio:f,video:l,initSegment:h,independent:T,text:E,id3:C}}generateIS(e,t,n,i){const s=e.samples,a=t.samples,o=this.typeSupported,u={},l=this._initPTS;let f=!l||i,h="audio/mp4",E,C,T;if(f&&(E=C=1/0),e.config&&s.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(h="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}u.audio={id:"audio",container:h,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):kt.initSegment([e]),metadata:{channelCount:e.channelCount}},f&&(T=e.inputTimeScale,!l||T!==l.timescale?E=C=s[0].pts-Math.round(T*n):f=!1)}if(t.sps&&t.pps&&a.length){if(t.timescale=t.inputTimeScale,u.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:kt.initSegment([t]),metadata:{width:t.width,height:t.height}},f)if(T=t.inputTimeScale,!l||T!==l.timescale){const J=this.getVideoStartPts(a),$=Math.round(T*n);C=Math.min(C,$i(a[0].dts,J)-$),E=Math.min(E,J-$)}else f=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(u).length)return this.ISGenerated=!0,f?(this._initPTS={baseTime:E,timescale:T},this._initDTS={baseTime:C,timescale:T}):E=T=void 0,{tracks:u,initPTS:E,timescale:T}}remuxVideo(e,t,n,i){const s=e.inputTimeScale,a=e.samples,o=[],u=a.length,l=this._initPTS;let f=this.nextAvcDts,h=8,E=this.videoSampleDuration,C,T,J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY,_e=!1;if(!n||f===null){const Tn=t*s,Qn=a[0].pts-$i(a[0].dts,a[0].pts);qs&&f!==null&&Math.abs(Tn-Qn-f)<15e3?n=!0:f=Tn-Qn}const Oe=l.baseTime*s/l.timescale;for(let Tn=0;Tn<u;Tn++){const Qn=a[Tn];Qn.pts=$i(Qn.pts-Oe,f),Qn.dts=$i(Qn.dts-Oe,f),Qn.dts<a[Tn>0?Tn-1:Tn].dts&&(_e=!0)}_e&&a.sort(function(Tn,Qn){const Br=Tn.dts-Qn.dts,yr=Tn.pts-Qn.pts;return Br||yr}),C=a[0].dts,T=a[a.length-1].dts;const De=T-C,rt=De?Math.round(De/(u-1)):E||e.inputTimeScale/30;if(n){const Tn=C-f,Qn=Tn>rt,Br=Tn<-1;if((Qn||Br)&&(Qn?this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Js(Tn,!0)} ms (${Tn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Js(-Tn,!0)} ms (${Tn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Br||f>=a[0].pts||qs)){C=f;const yr=a[0].pts-Tn;if(Qn)a[0].dts=C,a[0].pts=yr;else{let Tr=!0;for(let Lr=0;Lr<a.length&&!(a[Lr].dts>yr&&Tr);Lr++){const Hr=a[Lr].pts;if(a[Lr].dts-=Tn,a[Lr].pts-=Tn,Lr<a.length-1){const Xr=a[Lr+1].pts,Mi=a[Lr].pts,zi=Xr<=Mi,Aa=Xr<=Hr;Tr=zi==Aa}}}this.logger.log(`Video: Initial PTS/DTS adjusted: ${Js(yr,!0)}/${Js(C,!0)}, delta: ${Js(Tn,!0)} ms`)}}C=Math.max(0,C);let We=0,Lt=0,dt=C;for(let Tn=0;Tn<u;Tn++){const Qn=a[Tn],Br=Qn.units,yr=Br.length;let Tr=0;for(let Lr=0;Lr<yr;Lr++)Tr+=Br[Lr].data.length;Lt+=Tr,We+=yr,Qn.length=Tr,Qn.dts<dt?(Qn.dts=dt,dt+=rt/4|0||1):dt=Qn.dts,J=Math.min(Qn.pts,J),$=Math.max(Qn.pts,$)}T=a[u-1].dts;const _t=Lt+4*We+8;let jt;try{jt=new Uint8Array(_t)}catch(Tn){this.observer.emit(d.ERROR,d.ERROR,{type:we.MUX_ERROR,details:W.REMUX_ALLOC_ERROR,fatal:!1,error:Tn,bytes:_t,reason:`fail allocating video mdat ${_t}`});return}const xt=new DataView(jt.buffer);xt.setUint32(0,_t),jt.set(kt.types.mdat,4);let xn=!1,bn=Number.POSITIVE_INFINITY,wr=Number.POSITIVE_INFINITY,mr=Number.NEGATIVE_INFINITY,ar=Number.NEGATIVE_INFINITY;for(let Tn=0;Tn<u;Tn++){const Qn=a[Tn],Br=Qn.units;let yr=0;for(let Hr=0,Xr=Br.length;Hr<Xr;Hr++){const Mi=Br[Hr],zi=Mi.data,Aa=Mi.data.byteLength;xt.setUint32(h,Aa),h+=4,jt.set(zi,h),h+=Aa,yr+=4+Aa}let Tr;if(Tn<u-1)E=a[Tn+1].dts-Qn.dts,Tr=a[Tn+1].pts-Qn.pts;else{const Hr=this.config,Xr=Tn>0?Qn.dts-a[Tn-1].dts:rt;if(Tr=Tn>0?Qn.pts-a[Tn-1].pts:rt,Hr.stretchShortVideoTrack&&this.nextAudioPts!==null){const Mi=Math.floor(Hr.maxBufferHole*s),zi=(i?J+i*s:this.nextAudioPts)-Qn.pts;zi>Mi?(E=zi-Xr,E<0?E=Xr:xn=!0,this.logger.log(`[mp4-remuxer]: It is approximately ${zi/90} ms to the next segment; using duration ${E/90} ms for the last video frame.`)):E=Xr}else E=Xr}const Lr=Math.round(Qn.pts-Qn.dts);bn=Math.min(bn,E),mr=Math.max(mr,E),wr=Math.min(wr,Tr),ar=Math.max(ar,Tr),o.push(or(Qn.key,E,yr,Lr))}if(o.length){if(qs){if(qs<70){const Tn=o[0].flags;Tn.dependsOn=2,Tn.isNonSync=0}}else if(Ma&&ar-wr<mr-bn&&rt/mr<.025&&o[0].cts===0){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Tn=C;for(let Qn=0,Br=o.length;Qn<Br;Qn++){const yr=Tn+o[Qn].duration,Tr=Tn+o[Qn].cts;if(Qn<Br-1){const Lr=yr+o[Qn+1].cts;o[Qn].duration=Lr-Tr}else o[Qn].duration=Qn?o[Qn-1].duration:rt;o[Qn].cts=0,Tn=yr}}}E=xn||!E?rt:E,this.nextAvcDts=f=T+E,this.videoSampleDuration=E,this.isVideoContiguous=!0;const Ar={data1:kt.moof(e.sequenceNumber++,C,p(e,{samples:o})),data2:jt,startPTS:J/s,endPTS:($+E)/s,startDTS:C/s,endDTS:f/s,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Ar}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Ol;case"ac3":return Ql;default:return Pl}}remuxAudio(e,t,n,i,s){const a=e.inputTimeScale,o=e.samplerate?e.samplerate:a,u=a/o,l=this.getSamplesPerFrame(e),f=l*u,h=this._initPTS,E=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,C=[],T=s!==void 0;let J=e.samples,$=E?0:8,_e=this.nextAudioPts||-1;const Oe=t*a,De=h.baseTime*a/h.timescale;if(this.isAudioContiguous=n=n||J.length&&_e>0&&(i&&Math.abs(Oe-_e)<9e3||Math.abs($i(J[0].pts-De,Oe)-_e)<20*f),J.forEach(function(Xn){Xn.pts=$i(Xn.pts-De,Oe)}),!n||_e<0){if(J=J.filter(Xn=>Xn.pts>=0),!J.length)return;s===0?_e=0:i&&!T?_e=Math.max(0,Oe):_e=J[0].pts}if(e.segmentCodec==="aac"){const Xn=this.config.maxAudioFramesDrift;for(let dr=0,Ar=_e;dr<J.length;dr++){const Tn=J[dr],Qn=Tn.pts,Br=Qn-Ar,yr=Math.abs(1e3*Br/a);if(Br<=-Xn*f&&T)dr===0&&(this.logger.warn(`Audio frame @ ${(Qn/a).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Br/a)} ms.`),this.nextAudioPts=_e=Ar=Qn);else if(Br>=Xn*f&&yr<kl&&T){let Tr=Math.round(Br/f);Ar=Qn-Tr*f,Ar<0&&(Tr--,Ar+=f),dr===0&&(this.nextAudioPts=_e=Ar),this.logger.warn(`[mp4-remuxer]: Injecting ${Tr} audio frame @ ${(Ar/a).toFixed(3)}s due to ${Math.round(1e3*Br/a)} ms gap.`);for(let Lr=0;Lr<Tr;Lr++){const Hr=Math.max(Ar,0);let Xr=vi.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Xr||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Xr=Tn.unit.subarray()),J.splice(dr,0,{unit:Xr,pts:Hr}),Ar+=f,dr++}}Tn.pts=Ar,Ar+=f}}let rt=null,We=null,Lt,dt=0,_t=J.length;for(;_t--;)dt+=J[_t].unit.byteLength;for(let Xn=0,dr=J.length;Xn<dr;Xn++){const Ar=J[Xn],Tn=Ar.unit;let Qn=Ar.pts;if(We!==null){const yr=C[Xn-1];yr.duration=Math.round((Qn-We)/u)}else if(n&&e.segmentCodec==="aac"&&(Qn=_e),rt=Qn,dt>0){dt+=$;try{Lt=new Uint8Array(dt)}catch(yr){this.observer.emit(d.ERROR,d.ERROR,{type:we.MUX_ERROR,details:W.REMUX_ALLOC_ERROR,fatal:!1,error:yr,bytes:dt,reason:`fail allocating audio mdat ${dt}`});return}E||(new DataView(Lt.buffer).setUint32(0,dt),Lt.set(kt.types.mdat,4))}else return;Lt.set(Tn,$);const Br=Tn.byteLength;$+=Br,C.push(or(!0,l,Br,0)),We=Qn}const jt=C.length;if(!jt)return;const xt=C[C.length-1];this.nextAudioPts=_e=We+u*xt.duration;const xn=E?new Uint8Array(0):kt.moof(e.sequenceNumber++,rt/u,p({},e,{samples:C}));e.samples=[];const bn=rt/a,wr=_e/a,ar={data1:xn,data2:Lt,startPTS:bn,endPTS:wr,startDTS:bn,endDTS:wr,type:"audio",hasAudio:!0,hasVideo:!1,nb:jt};return this.isAudioContiguous=!0,ar}}function $i(r,e){let t;if(e===null)return r;for(e<r?t=-8589934592:t=8589934592;Math.abs(r-e)>4294967296;)r+=t;return r}function Eo(r){for(let e=0;e<r.length;e++)if(r[e].key)return e;return-1}function es(r,e,t,n){const i=r.samples.length;if(!i)return;const s=r.inputTimeScale;for(let o=0;o<i;o++){const u=r.samples[o];u.pts=$i(u.pts-t.baseTime*s/t.timescale,e*s)/s,u.dts=$i(u.dts-n.baseTime*s/n.timescale,e*s)/s}const a=r.samples;return r.samples=[],{samples:a}}function mA(r,e,t){const n=r.samples.length;if(!n)return;const i=r.inputTimeScale;for(let a=0;a<n;a++){const o=r.samples[a];o.pts=$i(o.pts-t.baseTime*i/t.timescale,e*i)/i}r.samples.sort((a,o)=>a.pts-o.pts);const s=r.samples;return r.samples=[],{samples:s}}class vA{constructor(e,t,n,i){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=i}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,n,i){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(oe(e,i)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:n}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const i=this.initData=Q(e);i.audio&&(t=va(i.audio,y.AUDIO)),i.video&&(n=va(i.video,y.VIDEO));const s={};i.audio&&i.video?s.audiovideo={container:"video/mp4",codec:t+","+n,supplemental:i.video.supplemental,initSegment:e,id:"main"}:i.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:i.video?s.video={container:"video/mp4",codec:n,supplemental:i.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,n,i,s,a){var o,u;let{initPTS:l,lastEndTime:f}=this;const h={audio:void 0,video:void 0,text:i,id3:n,initSegment:void 0};M(f)||(f=this.lastEndTime=s||0);const E=t.samples;if(!(E!=null&&E.length))return h;const C={initPTS:void 0,timescale:1};let T=this.initData;if((o=T)!=null&&o.length||(this.generateInitSegment(E),T=this.initData),!((u=T)!=null&&u.length))return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(C.tracks=this.initTracks,this.emitInitSegment=!1);const J=Ce(E,T),$=Be(T,E),_e=$===null?s:$;(a||!l)&&(ma(l,_e,s,J)||C.timescale!==l.timescale)&&(C.initPTS=_e-s,l&&l.timescale===1&&this.logger.warn(`Adjusting initPTS @${s} from ${l.baseTime/l.timescale} to ${C.initPTS}`),this.initPTS=l={baseTime:C.initPTS,timescale:1});const Oe=e?_e-l.baseTime/l.timescale:f,De=Oe+J;Re(T,E,l.baseTime/l.timescale),J>0?this.lastEndTime=De:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const rt=!!T.audio,We=!!T.video;let Lt="";rt&&(Lt+="audio"),We&&(Lt+="video");const dt={data1:E,startPTS:Oe,startDTS:Oe,endPTS:De,endDTS:De,type:Lt,hasAudio:rt,hasVideo:We,nb:1,dropped:0};return h.audio=dt.type==="audio"?dt:void 0,h.video=dt.type!=="audio"?dt:void 0,h.initSegment=C,h.id3=es(n,s,l,l),i.samples.length&&(h.text=mA(i,s,l)),h}}function ma(r,e,t,n){if(r===null)return!0;const i=Math.max(n,1),s=e-r.baseTime/r.timescale;return Math.abs(s-t)>i}function va(r,e){const t=r==null?void 0:r.codec;return t&&t.length>4?t:e===y.AUDIO?t==="ec-3"||t==="ac-3"||t==="alac"?t:t==="fLaC"||t==="Opus"?$t(t,!1):(ie.warn(`Unhandled audio codec "${t}" in mp4 MAP`),t||"mp4a"):(ie.warn(`Unhandled video codec "${t}" in mp4 MAP`),t||"avc1")}let vs;try{vs=self.performance.now.bind(self.performance)}catch(r){vs=Date.now}const Ha=[{demux:Il,remux:vA},{demux:xs,remux:Na},{demux:xl,remux:Na},{demux:Tl,remux:Na}];Ha.splice(2,0,{demux:Sl,remux:Na});class _A{constructor(e,t,n,i,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=n,this.id=s,this.logger=a}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,i){const s=n.transmuxing;s.executeStart=vs();let a=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:u}=this;i&&(this.currentTransmuxState=i);const{contiguous:l,discontinuity:f,trackSwitch:h,accurateTimeOffset:E,timeOffset:C,initSegmentChange:T}=i||o,{audioCodec:J,videoCodec:$,defaultInitPts:_e,duration:Oe,initSegmentData:De}=u,rt=Os(a,t);if(rt&&jr(rt.method)){const _t=this.getDecrypter(),jt=Jr(rt.method);if(_t.isSync()){let xt=_t.softwareDecrypt(a,rt.key.buffer,rt.iv.buffer,jt);if(n.part>-1){const bn=_t.flush();xt=bn&&bn.buffer}if(!xt)return s.executeEnd=vs(),_a(n);a=new Uint8Array(xt)}else return this.asyncResult=!0,this.decryptionPromise=_t.webCryptoDecrypt(a,rt.key.buffer,rt.iv.buffer,jt).then(xt=>{const xn=this.push(xt,null,n);return this.decryptionPromise=null,xn}),this.decryptionPromise}const We=this.needsProbing(f,h);if(We){const _t=this.configureTransmuxer(a);if(_t)return this.logger.warn(`[transmuxer] ${_t.message}`),this.observer.emit(d.ERROR,d.ERROR,{type:we.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,error:_t,reason:_t.message}),s.executeEnd=vs(),_a(n)}(f||h||T||We)&&this.resetInitSegment(De,J,$,Oe,t),(f||T||We)&&this.resetInitialTimestamp(_e),l||this.resetContiguity();const Lt=this.transmux(a,rt,C,E,n);this.asyncResult=Qs(Lt);const dt=this.currentTransmuxState;return dt.contiguous=!0,dt.discontinuity=!1,dt.trackSwitch=!1,s.executeEnd=vs(),Lt}flush(e){const t=e.transmuxing;t.executeStart=vs();const{decrypter:n,currentTransmuxState:i,decryptionPromise:s}=this;if(s)return this.asyncResult=!0,s.then(()=>this.flush(e));const a=[],{timeOffset:o}=i;if(n){const h=n.flush();h&&a.push(this.push(h.buffer,null,e))}const{demuxer:u,remuxer:l}=this;if(!u||!l){t.executeEnd=vs();const h=[_a(e)];return this.asyncResult?Promise.resolve(h):h}const f=u.flush(o);return Qs(f)?(this.asyncResult=!0,f.then(h=>(this.flushRemux(a,h,e),a))):(this.flushRemux(a,f,e),this.asyncResult?Promise.resolve(a):a)}flushRemux(e,t,n){const{audioTrack:i,videoTrack:s,id3Track:a,textTrack:o}=t,{accurateTimeOffset:u,timeOffset:l}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===G.MAIN?"level":"track"} ${n.level}`);const f=this.remuxer.remux(i,s,a,o,l,u,!0,this.id);e.push({remuxResult:f,chunkMeta:n}),n.transmuxing.executeEnd=vs()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,i,s){const{demuxer:a,remuxer:o}=this;!a||!o||(a.resetInitSegment(e,t,n,i),o.resetInitSegment(e,t,n,s))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,i,s){let a;return t&&t.method==="SAMPLE-AES"?a=this.transmuxSampleAes(e,t,n,i,s):a=this.transmuxUnencrypted(e,n,i,s),a}transmuxUnencrypted(e,t,n,i){const{audioTrack:s,videoTrack:a,id3Track:o,textTrack:u}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(s,a,o,u,t,n,!1,this.id),chunkMeta:i}}transmuxSampleAes(e,t,n,i,s){return this.demuxer.demuxSampleAes(e,t,n).then(a=>({remuxResult:this.remuxer.remux(a.audioTrack,a.videoTrack,a.id3Track,a.textTrack,n,i,!1,this.id),chunkMeta:s}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:i}=this;let s;for(let h=0,E=Ha.length;h<E;h++){var a;if((a=Ha[h].demux)!=null&&a.probe(e,this.logger)){s=Ha[h];break}}if(!s)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,u=this.remuxer,l=s.remux,f=s.demux;(!u||!(u instanceof l))&&(this.remuxer=new l(n,t,i,this.logger)),(!o||!(o instanceof f))&&(this.demuxer=new f(n,t,i,this.logger),this.probe=f.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Jt(this.config)),e}}function Os(r,e){let t=null;return r.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const _a=r=>({remuxResult:{},chunkMeta:r});function Qs(r){return"then"in r&&r.then instanceof Function}class Ml{constructor(e,t,n,i,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=n,this.duration=i,this.defaultInitPts=s||null}}class yA{constructor(e,t,n,i,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=n,this.trackSwitch=i,this.timeOffset=s,this.initSegmentChange=a}}let EA=0;class Ka{constructor(e,t,n,i){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=EA++,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=u=>{const l=u.data,f=this.hls;if(!(!f||!(l!=null&&l.event)||l.instanceNo!==this.instanceNo))switch(l.event){case"init":{var h;const E=(h=this.workerContext)==null?void 0:h.objectURL;E&&self.URL.revokeObjectURL(E);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}case"workerLog":{f.logger[l.data.logType]&&f.logger[l.data.logType](l.data.message);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.part=this.part,l.data.id=this.id,f.trigger(l.event,l.data);break}}},this.onWorkerError=u=>{if(!this.hls)return;const l=new Error(`${u.message} (${u.filename}:${u.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(d.ERROR,{type:we.OTHER_ERROR,details:W.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:l})};const s=e.config;this.hls=e,this.id=t,this.useWorker=!!s.enableWorker,this.onTransmuxComplete=n,this.onFlush=i;const a=(u,l)=>{l=l||{},l.frag=this.frag||void 0,u===d.ERROR&&(l=l,l.parent=this.id,l.part=this.part,this.error=l.error),this.hls.trigger(u,l)};this.observer=new ss,this.observer.on(d.FRAG_DECRYPTED,a),this.observer.on(d.ERROR,a);const o=Mn(s.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const u=this.hls.logger;if(s.workerPath||Ia()){try{s.workerPath?(u.log(`loading Web Worker ${s.workerPath} for "${t}"`),this.workerContext=Da(s.workerPath)):(u.log(`injecting Web Worker for "${t}"`),this.workerContext=Fa());const{worker:f}=this.workerContext;f.addEventListener("message",this.onWorkerMessage),f.addEventListener("error",this.onWorkerError),f.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:o,id:t,config:sn(s)})}catch(f){u.warn(`Error setting up "${t}" Web Worker, fallback to inline`,f),this.terminateWorker(),this.error=null,this.transmuxer=new _A(this.observer,o,s,"",t,e.logger)}return}}this.transmuxer=new _A(this.observer,o,s,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=EA++;const t=this.hls.config,n=Mn(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:sn(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),uo(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,n,i,s,a,o,u,l,f){var h,E;l.transmuxing.start=self.performance.now();const{instanceNo:C,transmuxer:T}=this,J=a?a.start:s.start,$=s.decryptdata,_e=this.frag,Oe=!(_e&&s.cc===_e.cc),De=!(_e&&l.level===_e.level),rt=_e?l.sn-_e.sn:-1,We=this.part?l.part-this.part.index:-1,Lt=rt===0&&l.id>1&&l.id===(_e==null?void 0:_e.stats.chunkCount),dt=!De&&(rt===1||rt===0&&(We===1||Lt&&We<=0)),_t=self.performance.now();(De||rt||s.stats.parsing.start===0)&&(s.stats.parsing.start=_t),a&&(We||!dt)&&(a.stats.parsing.start=_t);const jt=!(_e&&((h=s.initSegment)==null?void 0:h.url)===((E=_e.initSegment)==null?void 0:E.url)),xt=new yA(Oe,dt,u,De,J,jt);if(!dt||Oe||jt){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${s.type} sn: ${l.sn}${l.part>-1?" part: "+l.part:""} ${this.id===G.MAIN?"level":"track"}: ${l.level} id: ${l.id}
discontinuity: ${Oe}
trackSwitch: ${De}
contiguous: ${dt}
accurateTimeOffset: ${u}
timeOffset: ${J}
initSegmentChange: ${jt}`);const xn=new Ml(n,i,t,o,f);this.configureTransmuxer(xn)}if(this.frag=s,this.part=a,this.workerContext)this.workerContext.worker.postMessage({instanceNo:C,cmd:"demux",data:e,decryptdata:$,chunkMeta:l,state:xt},e instanceof ArrayBuffer?[e]:[]);else if(T){const xn=T.push(e,$,l,xt);Qs(xn)?xn.then(bn=>{this.handleTransmuxComplete(bn)}).catch(bn=>{this.transmuxerError(bn,l,"transmuxer-interface push error")}):this.handleTransmuxComplete(xn)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:n}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(n){const i=n.flush(e);Qs(i)?i.then(s=>{this.handleFlushResult(s,e)}).catch(s=>{this.transmuxerError(s,e,"transmuxer-interface flush error")}):this.handleFlushResult(i,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(d.ERROR,{type:we.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:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:n}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):n&&n.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const wA=100;class Nl extends di{constructor(e,t,n){super(e,t,n,"audio-stream-controller",G.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(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(d.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(d.BUFFER_RESET,this.onBufferReset,this),e.on(d.BUFFER_CREATED,this.onBufferCreated,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(d.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(d.FRAG_LOADING,this.onFragLoading,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(d.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(d.BUFFER_RESET,this.onBufferReset,this),e.off(d.BUFFER_CREATED,this.onBufferCreated,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(d.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(d.FRAG_LOADING,this.onFragLoading,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:i,timescale:s}){if(n===G.MAIN){const a=t.cc,o=this.fragCurrent;if(this.initPTS[a]={baseTime:i,timescale:s},this.log(`InitPTS for cc: ${a} found from main: ${i}/${s}`),this.mainAnchor=t,this.state===Xt.WAITING_INIT_PTS){const u=this.waitingData;(!u&&!this.loadingParts||u&&u.frag.cc!==a)&&(this.nextLoadPosition=this.findSyncFrag(t).start),this.tick()}else!this.hls.hasEnoughToStart&&o&&o.cc!==a?(this.startFragRequested=!1,this.nextLoadPosition=this.findSyncFrag(t).start,o.abortRequests(),this.resetLoadingState()):this.state===Xt.IDLE&&this.tick()}}findSyncFrag(e){const t=this.getLevelDetails(),n=e.cc;return $e(t,n,e)||t&&xe(t.fragments,n)||e}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Xt.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(wA),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=Xt.IDLE):this.state=Xt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Xt.IDLE:this.doTickIdle();break;case Xt.WAITING_TRACK:{const{levels:t,trackId:n}=this,i=t==null?void 0:t[n],s=i==null?void 0:i.details;if(s&&!this.waitForLive(i)){if(this.waitForCdnTuneIn(s))break;this.state=Xt.WAITING_INIT_PTS}break}case Xt.FRAG_LOADING_WAITING_RETRY:{var e;const t=performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:i,trackId:s}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((i==null?void 0:i[s])||null),this.state=Xt.IDLE}break}case Xt.WAITING_INIT_PTS:{const t=this.waitingData;if(t){const{frag:n,part:i,cache:s,complete:a}=t,o=this.mainAnchor;if(this.initPTS[n.cc]!==void 0){this.waitingData=null,this.state=Xt.FRAG_LOADING;const u=s.flush().buffer,l={frag:n,part:i,payload:u,networkDetails:null};this._handleFragmentLoadProgress(l),a&&super._handleFragmentLoadComplete(l)}else o&&o.cc!==t.frag.cc&&(this.log(`Waiting fragment cc (${n.cc}) cancelled because video is at cc ${o.cc}`),this.nextLoadPosition=this.findSyncFrag(o).start,this.clearWaitingFragment())}else this.state=Xt.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!==Xt.STOPPED&&(this.state=Xt.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:n,media:i,trackId:s}=this,a=t.config;if(!this.buffering||!i&&!this.primaryPrefetch&&(this.startFragRequested||!a.startFragPrefetch)||!(n!=null&&n[s]))return;const o=n[s],u=o.details;if(!u||this.waitForLive(o)||this.waitForCdnTuneIn(u)){this.state=Xt.WAITING_TRACK,this.startFragRequested=!1;return}const l=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&l&&(this.bufferFlushed=!1,this.afterBufferFlushed(l,y.AUDIO,G.AUDIO));const f=this.getFwdBufferInfo(l,G.AUDIO);if(f===null)return;if(!this.switchingTrack&&this._streamEnded(f,u)){t.trigger(d.BUFFER_EOS,{type:"audio"}),this.state=Xt.ENDED;return}const h=f.len,E=t.maxBufferLength,C=u.fragments,T=C[0].start,J=this.getLoadPosition(),$=this.flushing?J:f.end;if(this.switchingTrack&&i){const De=J;u.PTSKnown&&De<T&&(f.end>T||f.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=T+.05)}if(h>=E&&!this.switchingTrack&&$<C[C.length-1].start)return;let _e=this.getNextFragment($,u);if(_e&&this.isLoopLoading(_e,$)&&(_e=this.getNextFragmentLoopLoading(_e,u,f,G.MAIN,E)),!_e){this.bufferFlushed=!0;return}let Oe=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&Oe&&ue(_e)&&!_e.endList&&(!u.live||!this.loadingParts&&$<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(Oe)===ke.OK&&(this.mainFragLoading=Oe=null),Oe&&ue(Oe))){if(_e.start>Oe.end){const rt=this.fragmentTracker.getFragAtPos($,G.MAIN);rt&&rt.end>Oe.end&&(Oe=rt,this.mainFragLoading={frag:rt,targetBufferTime:null})}if(_e.start>Oe.end)return}this.loadFragment(_e,o,$)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new gn(n))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:i}=this;i&&(i.abortRequests(),this.removeUnbufferedFrags(i.start)),this.resetLoadingState(),n?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==Xt.STOPPED&&(this.setInterval(wA),this.state=Xt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(d.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:i}=this,{details:s,id:a,groupId:o,track:u}=t;if(!i){this.warn(`Audio tracks reset while loading track ${a} "${u.name}" of "${o}"`);return}const l=this.mainDetails;if(!l||s.endCC>l.endCC||l.expired){this.cachedTrackLoadedData=t,this.state!==Xt.STOPPED&&(this.state=Xt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${a} "${u.name}" of "${o}" loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`);const f=i[a];let h=0;if(s.live||(n=f.details)!=null&&n.live){if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;if(f.details){var E;h=this.alignPlaylists(s,f.details,(E=this.levelLastLoaded)==null?void 0:E.details)}s.alignedSliding||(Us(s,l),s.alignedSliding||qr(s,l),h=s.fragmentStart)}f.details=s,this.levelLastLoaded=f,this.startFragRequested||this.setStartPosition(l,h),this.hls.trigger(d.AUDIO_TRACK_UPDATED,{details:s,id:a,groupId:t.groupId}),this.state===Xt.WAITING_TRACK&&!this.waitForCdnTuneIn(s)&&(this.state=Xt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:i,payload:s}=e,{config:a,trackId:o,levels:u}=this;if(!u){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=u[o];if(!l){this.warn("Audio track is undefined on fragment load progress");return}const f=l.details;if(!f){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const h=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let E=this.transmuxer;E||(E=this.transmuxer=new Ka(this.hls,G.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const C=this.initPTS[n.cc],T=(t=n.initSegment)==null?void 0:t.data;if(C!==void 0){const $=i?i.index:-1,_e=$!==-1,Oe=new Wn(n.level,n.sn,n.stats.chunkCount,s.byteLength,$,_e);E.push(s,T,h,"",n,i,f.totalduration,!1,Oe,C)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${f.startSN} ,${f.endSN}],track ${o}`);const{cache:J}=this.waitingData=this.waitingData||{frag:n,part:i,cache:new Ii,complete:!1};J.push(new Uint8Array(s)),this.state!==Xt.STOPPED&&(this.state=Xt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===G.MAIN&&ue(t.frag)&&(this.mainFragLoading=t,this.state===Xt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:i}=t;if(n.type!==G.AUDIO){!this.audioOnly&&n.type===G.MAIN&&!n.elementaryStreams.video&&!n.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${i?" p: "+i.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(ue(n)){this.fragPrevious=n;const s=this.switchingTrack;s&&(this.bufferedTrack=s,this.switchingTrack=null,this.hls.trigger(d.AUDIO_TRACK_SWITCHED,B({},s)))}this.fragBufferedComplete(n,i),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=Xt.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(G.AUDIO,t);break;case W.AUDIO_TRACK_LOAD_ERROR:case W.AUDIO_TRACK_LOAD_TIMEOUT:case W.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Xt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===ye.AUDIO_TRACK&&(this.state=Xt.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===Xt.ENDED&&(this.state=Xt.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,G.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:i}=this,{remuxResult:s,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:u,part:l,level:f}=o,{details:h}=f,{audio:E,text:C,id3:T,initSegment:J}=s;if(this.fragContextChanged(u)||!h){this.fragmentTracker.removeFragment(u);return}if(this.state=Xt.PARSING,this.switchingTrack&&E&&this.completeAudioSwitch(this.switchingTrack),J!=null&&J.tracks){const $=u.initSegment||u;this._bufferInitSegment(f,J.tracks,$,a),i.trigger(d.FRAG_PARSING_INIT_SEGMENT,{frag:$,id:n,tracks:J.tracks})}if(E){const{startPTS:$,endPTS:_e,startDTS:Oe,endDTS:De}=E;l&&(l.elementaryStreams[y.AUDIO]={startPTS:$,endPTS:_e,startDTS:Oe,endDTS:De}),u.setElementaryStreamInfo(y.AUDIO,$,_e,Oe,De),this.bufferFragmentData(E,u,l,a)}if(T!=null&&(t=T.samples)!=null&&t.length){const $=p({id:n,frag:u,details:h},T);i.trigger(d.FRAG_PARSING_METADATA,$)}if(C){const $=p({id:n,frag:u,details:h},C);i.trigger(d.FRAG_PARSING_USERDATA,$)}}_bufferInitSegment(e,t,n,i){if(this.state!==Xt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const s=t.audio;s.id=G.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(d.BUFFER_CODECS,t);const o=s.initSegment;if(o!=null&&o.byteLength){const u={type:"audio",frag:n,part:null,chunkMeta:i,parent:n.type,data:o};this.hls.trigger(d.BUFFER_APPENDING,u)}this.tickImmediate()}loadFragment(e,t,n){const i=this.fragmentTracker.getState(e);if(this.switchingTrack||i===ke.NOT_LOADED||i===ke.PARTIAL){var s;if(!ue(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=Xt.WAITING_INIT_PTS;const a=this.mainDetails;a&&a.fragmentStart!==t.details.fragmentStart&&qr(t.details,a)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:i,characteristics:s,audioCodec:a,channels:o}=this.bufferedTrack;St({name:t,lang:n,assocLang:i,characteristics:s,audioCodec:a,channels:o},e,st)||(nn(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(d.AUDIO_TRACK_SWITCHED,B({},e))}}class wo extends j{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const i=t==null?void 0:t.renditionReports;if(i){let s=-1;for(let a=0;a<i.length;a++){const o=i[a];let u;try{u=new self.URL(o.URI,t.url).href}catch(l){this.warn(`Could not construct new URL for Rendition Report: ${l}`),u=o.URI||""}if(u===e){s=a;break}else u===e.substring(0,u.length)&&(s=a)}if(s!==-1){const a=i[s],o=parseInt(a["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let u=parseInt(a["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const f=Math.min(t.age-t.partTarget,t.targetduration);u>=0&&f>t.partTarget&&(u+=1)}const l=n&&An(n);return new yn(o,u>=0?u:void 0,l)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:i,stats:s}=t,a=self.performance.now(),o=s.loading.first?Math.max(0,a-s.loading.first):0;i.advancedDateTime=Date.now()-o;const u=this.hls.config.timelineOffset;if(u!==i.appliedTimelineOffset){const f=Math.max(u||0,0);i.appliedTimelineOffset=f,i.fragments.forEach(h=>{h.start=h.playlistOffset+f})}if(i.live||n!=null&&n.live){const f="levelInfo"in t?t.levelInfo:t.track;if(i.reloaded(n),n&&i.fragments.length>0){Dr(n,i);const Oe=i.playlistParsingError;if(Oe){this.warn(Oe);const De=this.hls;if(!De.config.ignorePlaylistParsingErrors){var l;const{networkDetails:rt}=t;De.trigger(d.ERROR,{type:we.NETWORK_ERROR,details:W.LEVEL_PARSING_ERROR,fatal:!1,url:i.url,error:Oe,reason:Oe.message,level:t.level||void 0,parent:(l=i.fragments[0])==null?void 0:l.type,networkDetails:rt,stats:s});return}i.playlistParsingError=null}}i.requestScheduled===-1&&(i.requestScheduled=s.loading.start);const h=this.hls.mainForwardBufferInfo,E=h?h.end-h.len:0,C=(i.edge-E)*1e3,T=yi(i,C);if(i.requestScheduled+T<a?i.requestScheduled=a:i.requestScheduled+=T,this.log(`live playlist ${e} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),!this.canLoad||!i.live)return;let J,$,_e;if(i.canBlockReload&&i.endSN&&i.advanced){const Oe=this.hls.config.lowLatencyMode,De=i.lastPartSn,rt=i.endSN,We=i.lastPartIndex,Lt=We!==-1,dt=De===rt;Lt?dt?($=rt+1,_e=Oe?0:We):($=De,_e=Oe?We+1:i.maxPartIndex):$=rt+1;const _t=i.age,jt=_t+i.ageHeader;let xt=Math.min(jt-i.partTarget,i.targetduration*1.5);if(xt>0){if(jt>i.targetduration*3)this.log(`Playlist last advanced ${_t.toFixed(2)}s ago. Omitting segment and part directives.`),$=void 0,_e=void 0;else if(n!=null&&n.tuneInGoal&&jt-i.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${xt} with playlist age: ${i.age}`),xt=0;else{const xn=Math.floor(xt/i.targetduration);if($+=xn,_e!==void 0){const bn=Math.round(xt%i.targetduration/i.partTarget);_e+=bn}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${_t.toFixed(2)}s goal: ${xt} skip sn ${xn} to part ${_e}`)}i.tuneInGoal=xt}if(J=this.getDeliveryDirectives(i,t.deliveryDirectives,$,_e),Oe||!dt){i.requestScheduled=a,this.loadingPlaylist(f,J);return}}else(i.canBlockReload||i.canSkipUntil)&&(J=this.getDeliveryDirectives(i,t.deliveryDirectives,$,_e));J&&$!==void 0&&i.canBlockReload&&(i.requestScheduled=s.loading.first+Math.max(T-o*2,T/2)),this.scheduleLoading(f,J,i)}else this.clearTimer()}scheduleLoading(e,t,n){const i=n||e.details;if(!i){this.loadingPlaylist(e,t);return}const s=self.performance.now(),a=i.requestScheduled;if(s>=a){this.loadingPlaylist(e,t);return}const o=a-s;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(o)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),o)}getDeliveryDirectives(e,t,n,i){let s=An(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,i=t.part,s=an.No),new yn(n,i,s)}checkRetry(e){const t=e.details,n=Pe(e),i=e.errorAction,{action:s,retryCount:a=0,retryConfig:o}=i||{},u=!!i&&!!o&&(s===Gt.RetryRequest||!i.resolved&&s===Gt.SendAlternateToPenaltyBox);if(u){var l;if(a>=o.maxNumRetry)return!1;if(n&&(l=e.context)!=null&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const f=lt(o,a);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),f),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" in ${f}ms`)}e.levelRetry=!0,i.resolved=!0}return u}}function BA(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(!ya(r[t].attrs,e[t].attrs))return!1;return!0}function ya(r,e,t){const n=r["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(i=>r[i]!==e[i])}function Bo(r,e){return e.label.toLowerCase()===r.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(r.lang||"").toLowerCase())}class Hl extends wo{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(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.LEVEL_LOADING,this.onLevelLoading,this),e.on(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(d.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.LEVEL_LOADING,this.onLevelLoading,this),e.off(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(d.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(d.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:i,details:s}=t,a=this.tracksInGroup[n];if(!a||a.groupId!==i){this.warn(`Audio track with id:${n} and group:${i} not found in active group ${a==null?void 0:a.groupId}`);return}const o=a.details;a.details=t.details,this.log(`Audio track ${n} "${a.name}" lang:${a.lang} group:${i} loaded [${s.startSN}-${s.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,i=this.groupIds;let s=this.currentTrack;if(!n||(i==null?void 0:i.length)!==(n==null?void 0:n.length)||n!=null&&n.some(o=>(i==null?void 0:i.indexOf(o))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const o=this.tracks.filter(E=>!n||n.indexOf(E.groupId)!==-1);if(o.length)this.selectDefaultTrack&&!o.some(E=>E.default)&&(this.selectDefaultTrack=!1),o.forEach((E,C)=>{E.id=C});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=o;const u=this.hls.config.audioPreference;if(!s&&u){const E=ct(u,o,st);if(E>-1)s=o[E];else{const C=ct(u,this.tracks);s=this.tracks[C]}}let l=this.findTrackId(s);l===-1&&s&&(l=this.findTrackId(null));const f={audioTracks:o};this.log(`Updating audio tracks, ${o.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(d.AUDIO_TRACKS_UPDATED,f);const h=this.trackId;if(l!==-1&&h===-1)this.setAudioTrack(l);else if(o.length&&h===-1){var a;const E=new Error(`No audio track selected for current audio group-ID(s): ${(a=this.groupIds)==null?void 0:a.join(",")} track count: ${o.length}`);this.warn(E.message),this.hls.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:E})}}}onError(e,t){t.fatal||!t.context||t.context.type===ye.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const i=this.currentTrack;if(i&&St(e,i,st))return i;const s=ct(e,this.tracksInGroup,st);if(s>-1){const a=this.tracksInGroup[s];return this.setAudioTrack(s),a}else if(i){let a=t.loadLevel;a===-1&&(a=t.firstAutoLevel);const o=Bt(e,t.levels,n,a,st);if(o===-1)return null;t.nextLoadLevel=o}if(e.channels||e.audioCodec){const a=ct(e,n);if(a>-1)return n[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 n=this.currentTrack,i=t[e],s=i.details&&!i.details.live;if(e===this.trackId&&i===n&&s||(this.log(`Switching to audio-track ${e} "${i.name}" lang:${i.lang} group:${i.groupId} channels:${i.channels}`),this.trackId=e,this.currentTrack=i,this.hls.trigger(d.AUDIO_TRACK_SWITCHING,B({},i)),s))return;const a=this.switchParams(i.url,n==null?void 0:n.details,i.details);this.loadPlaylist(a)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const i=t[n];if(!(this.selectDefaultTrack&&!i.default)&&(!e||St(e,i,st)))return n}if(e){const{name:n,lang:i,assocLang:s,characteristics:a,audioCodec:o,channels:u}=e;for(let l=0;l<t.length;l++){const f=t[l];if(St({name:n,lang:i,assocLang:s,characteristics:a,audioCodec:o,channels:u},f,st))return l}for(let l=0;l<t.length;l++){const f=t[l];if(ya(e.attrs,f.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return l}for(let l=0;l<t.length;l++){const f=t[l];if(ya(e.attrs,f.attrs,["LANGUAGE"]))return l}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&nn(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,i=e.groupId,s=this.getUrlWithDirectives(e.url,t),a=e.details,o=a==null?void 0:a.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${i}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${o&&a.live?" age "+o.toFixed(1)+(a.type?" "+a.type||0:""):""} ${s}`),this.hls.trigger(d.AUDIO_TRACK_LOADING,{url:s,id:n,groupId:i,deliveryDirectives:t||null,track:e})}}class Kl{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(this.queues===null||this.tracks===null)return;const i=this.queues[t];i.push(e),i.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const i=t[0];try{i.execute()}catch(s){var n;if(i.onError(s),this.queues===null||this.tracks===null)return;const a=(n=this.tracks[e])==null?void 0:n.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,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],i=n==null?void 0:n.buffer;return i?`SourceBuffer${i.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.label).join(", "))||""}}const Co=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,CA="HlsJsTrackRemovedError";class Gl extends Error{constructor(e){super(e),this.name=CA}}class $l extends j{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var i;this.hls&&((i=this.mediaSource)==null?void 0:i.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:i,mediaSource:s}=this;n&&this.log("Media source opened"),!(!i||!s)&&(s.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(d.MEDIA_ATTACHED,{media:i,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:n,_objectUrl:i}=this;n!==i&&this.error(`Media element src was set while attaching MediaSource (${i} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=ge(q(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(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.BUFFER_RESET,this.onBufferReset,this),e.on(d.BUFFER_APPENDING,this.onBufferAppending,this),e.on(d.BUFFER_CODECS,this.onBufferCodecs,this),e.on(d.BUFFER_EOS,this.onBufferEos,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(d.FRAG_PARSED,this.onFragParsed,this),e.on(d.FRAG_CHANGED,this.onFragChanged,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.BUFFER_RESET,this.onBufferReset,this),e.off(d.BUFFER_APPENDING,this.onBufferAppending,this),e.off(d.BUFFER_CODECS,this.onBufferCodecs,this),e.off(d.BUFFER_EOS,this.onBufferEos,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(d.FRAG_PARSED,this.onFragParsed,this),e.off(d.FRAG_CHANGED,this.onFragChanged,this),e.off(d.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};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 i=this.transferData;return!this.sourceBufferCount&&i&&i.mediaSource===t?p(n,i.tracks):this.sourceBuffers.forEach(s=>{const[a]=s;a&&(n[a]=p({},this.tracks[a]),this.removeBuffer(a)),s[0]=s[1]=null}),{media:e,mediaSource:t,tracks:n}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let i=2;(t.audio&&!t.video||!t.altAudio)&&(i=1),this.bufferCodecEventsTotal=i,this.log(`${i} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&i&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media,i=q(this.appendSource);if(this.transferData=this.overrides=void 0,n&&i){const s=!!t.mediaSource;(s||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const a=this.mediaSource=t.mediaSource||new i;if(this.assignMediaSource(a),s)this._objectUrl=n.src,this.attachTransferred();else{const o=this._objectUrl=self.URL.createObjectURL(a);if(this.appendSource)try{n.removeAttribute("src");const u=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||u&&a instanceof u,bo(n),Zl(n,o),n.load()}catch(u){n.src=o}else n.src=o}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,i=t.tracks,s=i?Object.keys(i):null,a=s?s.length:0,o=()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()};if(i&&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: ${sn(n,(u,l)=>u==="initSegment"?void 0:l)};
transfer tracks: ${sn(i,(u,l)=>u==="initSegment"?void 0:l)}}`),!z(i,n)){t.mediaSource=null,t.tracks=void 0;const u=e.currentTime,l=this.details,f=Math.max(u,(l==null?void 0:l.fragments[0].start)||0);if(f-u>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${u} -> ${f}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(i)}"->"${Object.keys(n)}") start time: ${f} currentTime: ${u}`),this.onMediaDetaching(d.MEDIA_DETACHING,{}),this.onMediaAttaching(d.MEDIA_ATTACHING,t),e.currentTime=f;return}this.transferData=void 0,s.forEach(u=>{const l=u,f=i[l];if(f){const h=f.buffer;if(h){const E=this.fragmentTracker,C=f.id;if(E.hasFragments(C)||E.hasParts(C)){const $=pn.getBuffered(h);E.detectEvictedFragments(l,$,C,null,!0)}const T=ea(l),J=[l,h];this.sourceBuffers[T]=J,h.updating&&this.operationQueue&&this.operationQueue.prependBlocker(l),this.trackSourceBuffer(l,f)}}}),o(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),o()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:i,mediaSource:s,_objectUrl:a}=this;if(s){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([o])=>{o&&this.removeBuffer(o)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const o=s.readyState==="open";try{const u=s.sourceBuffers;for(let l=u.length;l--;)o&&u[l].abort(),s.removeSourceBuffer(u[l]);o&&s.endOfStream()}catch(u){this.warn(`onMediaDetaching: ${u.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}i&&(i.removeEventListener("emptied",this._onMediaEmptied),n||(a&&self.URL.revokeObjectURL(a),this.mediaSrc===a?(i.removeAttribute("src"),this.appendSource&&bo(i),i.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(d.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var i;(i=this.mediaSource)!=null&&i.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(s){this.warn(`onBufferReset ${e}`,s)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[ea(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Kl(this.tracks)}onBufferCodecs(e,t){const n=this.tracks,i=Object.keys(t);this.log(`BUFFER_CODECS: "${i}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),a=!s&&this.sourceBufferCount&&this.media&&i.some(o=>!n[o]);if(s||a){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${i}" SourceBuffers`);return}i.forEach(o=>{var u,l,f;const h=t[o],{id:E,codec:C,levelCodec:T,container:J,metadata:$,supplemental:_e}=h;let Oe=n[o];const De=(u=this.transferData)==null||(l=u.tracks)==null?void 0:l[o],rt=De!=null&&De.buffer?De:Oe,We=(rt==null?void 0:rt.pendingCodec)||(rt==null?void 0:rt.codec),Lt=rt==null?void 0:rt.levelCodec;Oe||(Oe=n[o]={buffer:void 0,listeners:[],codec:C,supplemental:_e,container:J,levelCodec:T,metadata:$,id:E});const dt=vn(We,Lt),_t=dt==null?void 0:dt.replace(Co,"$1");let jt=vn(C,T);const xt=(f=jt)==null?void 0:f.replace(Co,"$1");jt&&dt&&_t!==xt&&(o.slice(0,5)==="audio"&&(jt=$t(jt,this.appendSource)),this.log(`switching codec ${We} to ${jt}`),jt!==(Oe.pendingCodec||Oe.codec)&&(Oe.pendingCodec=jt),Oe.container=J,this.appendChangeType(o,J,jt))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const i=`${t};codecs=${n}`,s={label:`change-type=${i}`,execute:()=>{const a=this.tracks[e];if(a){const o=a.buffer;o!=null&&o.changeType&&(this.log(`changing ${e} sourceBuffer type to ${i}`),o.changeType(i),a.codec=n,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 n=e.start,i=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,G.MAIN))==null?void 0:t.gap)===!0)return;const a={label:"block-audio",execute:()=>{var o;const u=this.tracks.video;(this.lastVideoAppendEnd>i||u!=null&&u.buffer&&pn.isBuffered(u.buffer,i)||((o=this.fragmentTracker.getAppendedFrag(i,G.MAIN))==null?void 0:o.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:o=>{this.warn("Error executing block-audio operation",o)}};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:n}=this,{data:i,type:s,parent:a,frag:o,part:u,chunkMeta:l}=t,f=l.buffering[s],h=o.sn,E=self.performance.now();f.start=E;const C=o.stats.buffering,T=u?u.stats.buffering:null;C.start===0&&(C.start=E),T&&T.start===0&&(T.start=E);const J=n.audio;let $=!1;s==="audio"&&(J==null?void 0:J.container)==="audio/mpeg"&&($=!this.lastMpegAudioChunk||l.id===1||this.lastMpegAudioChunk.sn!==l.sn,this.lastMpegAudioChunk=l);const _e=this.tracks.video,Oe=_e==null?void 0:_e.buffer;if(Oe&&h!=="initSegment"){const We=u||o,Lt=this.blockedAudioAppend;if(s==="audio"&&a!=="main"&&!this.blockedAudioAppend){const _t=We.start+We.duration*.05,jt=Oe.buffered,xt=this.currentOp("video");!jt.length&&!xt?this.blockAudio(We):!xt&&!pn.isBuffered(Oe,_t)&&this.lastVideoAppendEnd<_t&&this.blockAudio(We)}else if(s==="video"){const dt=We.end;if(Lt){const _t=Lt.frag.start;(dt>_t||dt<this.lastVideoAppendEnd||pn.isBuffered(Oe,_t))&&this.unblockAudio()}this.lastVideoAppendEnd=dt}}const De=(u||o).start,rt={label:`append-${s}`,execute:()=>{if(f.executeStart=self.performance.now(),$){const We=this.tracks[s];if(We){const Lt=We.buffer;if(Lt){const dt=De-Lt.timestampOffset;Math.abs(dt)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${De} (delta: ${dt}) sn: ${h})`),Lt.timestampOffset=De)}}}this.appendExecutor(i,s)},onStart:()=>{},onComplete:()=>{const We=self.performance.now();f.executeEnd=f.end=We,C.first===0&&(C.first=We),T&&T.first===0&&(T.first=We);const Lt={};this.sourceBuffers.forEach(([dt,_t])=>{dt&&(Lt[dt]=pn.getBuffered(_t))}),this.appendErrors[s]=0,s==="audio"||s==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(d.BUFFER_APPENDED,{type:s,frag:o,part:u,chunkMeta:l,parent:o.type,timeRanges:Lt})},onError:We=>{var Lt;const dt={type:we.MEDIA_ERROR,parent:o.type,details:W.BUFFER_APPEND_ERROR,sourceBufferName:s,frag:o,part:u,chunkMeta:l,error:We,err:We,fatal:!1},_t=(Lt=this.media)==null?void 0:Lt.error;if(We.code===DOMException.QUOTA_EXCEEDED_ERR)dt.details=W.BUFFER_FULL_ERROR;else if(We.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!_t)dt.errorAction=Ze(!0);else if(We.name===CA&&this.sourceBufferCount===0)dt.errorAction=Ze(!0);else{const jt=++this.appendErrors[s];this.warn(`Failed ${jt}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${s}" sourceBuffer (${_t||"no media error"})`),(jt>=this.hls.config.appendErrorMaxRetry||_t)&&(dt.fatal=!0)}this.hls.trigger(d.ERROR,dt)}};this.append(rt,s,this.isPending(this.tracks[s]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(d.BUFFER_FLUSHED,{type:e})},onError:i=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,i)}}}onBufferFlushing(e,t){const{type:n,startOffset:i,endOffset:s}=t;n?this.append(this.getFlushOp(n,i,s),n):this.sourceBuffers.forEach(([a])=>{a&&this.append(this.getFlushOp(a,i,s),a)})}onFragParsed(e,t){const{frag:n,part:i}=t,s=[],a=i?i.elementaryStreams:n.elementaryStreams;a[y.AUDIOVIDEO]?s.push("audiovideo"):(a[y.AUDIO]&&s.push("audio"),a[y.VIDEO]&&s.push("video"));const o=()=>{const u=self.performance.now();n.stats.buffering.end=u,i&&(i.stats.buffering.end=u);const l=i?i.stats:n.stats;this.hls.trigger(d.FRAG_BUFFERED,{frag:n,part:i,stats:l,id:n.type})};s.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(o,s).catch(u=>{this.warn(`Fragment buffered callback ${u}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{var t,n;return e&&(!((t=this.tracks[e])!=null&&t.ended)||((n=this.tracks[e])==null?void 0:n.ending))})}onBufferEos(e,t){var n;this.sourceBuffers.forEach(([a])=>{if(a){const o=this.tracks[a];(!t.type||t.type===a)&&(o.ending=!0,o.ended||(o.ended=!0,this.log(`${a} buffer reached EOS`)))}});const i=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([a])=>{var o;return a&&!((o=this.tracks[a])!=null&&o.ended)})&&(i?(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(d.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(d.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 n;const i=(n=t.errorAction)==null?void 0:n.nextAutoLevel;M(i)&&i!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const i=e.config,s=n.currentTime,a=t.levelTargetDuration,o=t.live&&i.liveBackBufferLength!==null?i.liveBackBufferLength:i.backBufferLength;if(M(o)&&o>=0){const u=Math.max(o,a),l=Math.floor(s/a)*a-u;this.flushBackBuffer(s,a,l)}if(M(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){const u=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),l=Math.max(u,a),f=Math.floor(s/a)*a+l;this.flushFrontBuffer(s,a,f)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([i,s])=>{if(s){const o=pn.getBuffered(s);if(o.length>0&&n>o.start(0)){var a;this.hls.trigger(d.BACK_BUFFER_REACHED,{bufferEnd:n});const u=this.tracks[i];if((a=this.details)!=null&&a.live)this.hls.trigger(d.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(u!=null&&u.ended){this.log(`Cannot flush ${i} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(d.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:i})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([i,s])=>{if(s){const a=pn.getBuffered(s),o=a.length;if(o<2)return;const u=a.start(o-1),l=a.end(o-1);if(n>u||e>=u&&e<=l)return;this.hls.trigger(d.BUFFER_FLUSHING,{startOffset:u,endOffset:1/0,type:i})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const i=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&t.live&&n.setLiveSeekableRange){const l=Math.max(0,t.fragmentStart),f=Math.max(l,i);return{duration:1/0,start:l,end:f}}return{duration:1/0}}const s=(e=this.overrides)==null?void 0:e.duration;if(s)return M(s)?{duration:s}:null;const a=this.media.duration,o=M(n.duration)?n.duration:0;return i>o&&i>a||!M(a)?{duration:i}:null}updateMediaSource({duration:e,start:t,end:n}){const i=this.mediaSource;!this.media||!i||i.readyState!=="open"||(i.duration!==e&&(M(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),i.duration=e),t!==void 0&&n!==void 0&&(this.log(`MediaSource duration is set to ${i.duration}. Setting seekable range to ${t}-${n}.`),i.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${sn(n)}`),this.tracksReady){var i;const s=(i=this.transferData)==null?void 0:i.tracks;s&&Object.keys(s).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const i=this.tracks[t];e[t]={buffer:n,container:i.container,codec:i.codec,supplemental:i.supplemental,levelCodec:i.levelCodec,id:i.id,metadata:i.metadata}}}),this.hls.trigger(d.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(d.ERROR,{type:we.MEDIA_ERROR,details:W.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const s in e){const a=s,o=e[a];if(this.isPending(o)){const u=this.getTrackCodec(o,a),l=`${o.container};codecs=${u}`;o.codec=u,this.log(`creating sourceBuffer(${l})${this.currentOp(a)?" Queued":""} ${sn(o)}`);try{const f=n.addSourceBuffer(l),h=ea(a),E=[a,f];t[h]=E,o.buffer=f}catch(f){var i;this.error(`error while trying to add sourceBuffer: ${f.message}`),this.shiftAndExecuteNext(a),(i=this.operationQueue)==null||i.removeBlockers(),delete this.tracks[a],this.hls.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:f,sourceBufferName:a,mimeType:l,parent:o.id});return}this.trackSourceBuffer(a,o)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let i=e.codec;n&&(t==="video"||t==="audiovideo")&&Ke(n,"video")&&(i=Ft(i,n));const s=vn(i,e.levelCodec);return s?t.slice(0,5)==="audio"?$t(s,this.appendSource):s:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const i=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:i,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 o=a.removedRanges;o!=null&&o.length&&this.hls.trigger(d.BUFFER_FLUSHED,{type:s})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const i=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${i}`,t),this.hls.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:i,fatal:!1});const s=this.currentOp(e);s&&s.onError(i)}removeExecutor(e,t,n){const{media:i,mediaSource:s}=this,a=this.tracks[e],o=a==null?void 0:a.buffer;if(!i||!s||!o){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const u=M(i.duration)?i.duration:1/0,l=M(s.duration)?s.duration:1/0,f=Math.max(0,t),h=Math.min(n,u,l);h>f&&(!a.ending||a.ended)?(a.ended=!1,this.log(`Removing [${f},${h}] from the ${e} SourceBuffer`),o.remove(f,h)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],i=n==null?void 0:n.buffer;if(!i)throw new Gl(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,i.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,i=t.map(a=>this.appendBlocker(a));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(i).then(a=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const i=(n=this.tracks[t])==null?void 0:n.buffer;!i||i.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,n){const i=this.tracks[e];if(!i)return;const s=i.buffer;if(!s)return;const a=n.bind(this,e);i.listeners.push({event:t,listener:a}),s.addEventListener(t,a)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(i=>{n.removeEventListener(i.event,i.listener)}),t.listeners.length=0)}}function bo(r){const e=r.querySelectorAll("source");[].slice.call(e).forEach(t=>{r.removeChild(t)})}function Zl(r,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,r.appendChild(t)}function ea(r){return r==="audio"?1:0}class xo{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(d.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(d.BUFFER_CODECS,this.onBufferCodecs,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(d.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(d.BUFFER_CODECS,this.onBufferCodecs,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&M(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((i,s)=>this.isLevelAllowed(i)&&s<=e);return this.clientRect=null,xo.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const i=(o,u)=>u?o.width!==u.width||o.height!==u.height:!0;let s=e.length-1;const a=Math.max(t,n);for(let o=0;o<e.length;o+=1){const u=e[o];if((u.width>=a||u.height>=a)&&i(u,e[o+1])){s=o;break}}return s}}const xi={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},xA={HLS:"h"},ta={OBJECT:"CMCD-Object",REQUEST:"CMCD-Request",SESSION:"CMCD-Session",STATUS:"CMCD-Status"},IA={[ta.OBJECT]:["br","d","ot","tb"],[ta.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[ta.SESSION]:["cid","pr","sf","sid","st","v"],[ta.STATUS]:["bs","rtp"]};class Ms{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof Ms?n:new Ms(n))),this.value=e,this.params=t}}const FA="Dict";function So(r){return Array.isArray(r)?JSON.stringify(r):r instanceof Map?"Map{}":r instanceof Set?"Set{}":typeof r=="object"?JSON.stringify(r):String(r)}function zl(r,e,t,n){return new Error(`failed to ${r} "${So(e)}" as ${t}`,{cause:n})}function As(r,e,t){return zl("serialize",r,e,t)}class DA{constructor(e){this.description=e}}const Pi="Bare Item",To="Boolean";function jl(r){if(typeof r!="boolean")throw As(r,To);return r?"?1":"?0"}const Yl="Byte Sequence";function Xl(r){if(ArrayBuffer.isView(r)===!1)throw As(r,Yl);return`:${Bi(r)}:`}const Jl="Integer";function ql(r){return r<-999999999999999||999999999999999<r}function RA(r){if(ql(r))throw As(r,Jl);return r.toString()}function eu(r){return`@${RA(r.getTime()/1e3)}`}const tu="Decimal";function nu(r){const e=gi(r,3);if(Math.floor(Math.abs(e)).toString().length>12)throw As(r,tu);const t=e.toString();return t.includes(".")?t:`${t}.0`}const LA="String",ru=/[\x00-\x1f\x7f]+/;function Io(r){if(ru.test(r))throw As(r,LA);return`"${r.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function UA(r){return r.description||r.toString().slice(7,-1)}const Ci="Token";function na(r){const e=UA(r);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw As(e,Ci);return e}function Fo(r){switch(typeof r){case"number":if(!M(r))throw As(r,Pi);return Number.isInteger(r)?RA(r):nu(r);case"string":return Io(r);case"symbol":return na(r);case"boolean":return jl(r);case"object":if(r instanceof Date)return eu(r);if(r instanceof Uint8Array)return Xl(r);if(r instanceof DA)return na(r);default:throw As(r,Pi)}}const iu="Key";function Ga(r){if(/^[a-z*][a-z0-9\-_.*]*$/.test(r)===!1)throw As(r,iu);return r}function Ea(r){return r==null?"":Object.entries(r).map(([e,t])=>t===!0?`;${Ga(e)}`:`;${Ga(e)}=${Fo(t)}`).join("")}function kA(r){return r instanceof Ms?`${Fo(r.value)}${Ea(r.params)}`:Fo(r)}function su(r){return`(${r.value.map(kA).join(" ")})${Ea(r.params)}`}function au(r,e={whitespace:!0}){if(typeof r!="object")throw As(r,FA);const t=r instanceof Map?r.entries():Object.entries(r),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([i,s])=>{s instanceof Ms||(s=new Ms(s));let a=Ga(i);return s.value===!0?a+=Ea(s.params):(a+="=",Array.isArray(s.value)?a+=su(s):a+=kA(s)),a}).join(`,${n}`)}function ou(r,e){return au(r,e)}function Au(r){return r==="ot"||r==="sf"||r==="st"}function lu(r){return typeof r=="number"?M(r):r!=null&&r!==""&&r!==!1}const $a=r=>Math.round(r),uu=(r,e)=>(e!=null&&e.baseUrl&&(r=bs(r,e.baseUrl)),encodeURIComponent(r)),wa=r=>$a(r/100)*100,PA={br:$a,d:$a,bl:wa,dl:wa,mtp:wa,nor:uu,rtp:wa,tb:$a};function OA(r,e){const t={};if(r==null||typeof r!="object")return t;const n=Object.keys(r).sort(),i=p({},PA,e==null?void 0:e.formatters),s=e==null?void 0:e.filter;return n.forEach(a=>{if(s!=null&&s(a))return;let o=r[a];const u=i[a];u&&(o=u(o,e)),!(a==="v"&&o===1)&&(a=="pr"&&o===1||lu(o)&&(Au(a)&&typeof o=="string"&&(o=new DA(o)),t[a]=o))}),t}function Do(r,e={}){return r?ou(OA(r,e),p({whitespace:!1},e)):""}function Ro(r,e={}){const t={};if(!r)return t;const n=Object.entries(r),i=Object.entries(IA).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),s=n.reduce((a,o)=>{var u,l;const[f,h]=o,E=((u=i.find(C=>C[1].includes(f)))===null||u===void 0?void 0:u[0])||ta.REQUEST;return(l=a[E])!==null&&l!==void 0||(a[E]={}),a[E][f]=h,a},{});return Object.entries(s).reduce((a,[o,u])=>(a[o]=Do(u,e),a),t)}function cu(r,e,t){return p(r,Ro(e,t))}const fu="CMCD";function du(r,e={}){if(!r)return"";const t=Do(r,e);return`${fu}=${encodeURIComponent(t)}`}const QA=/CMCD=[^&#]+/;function Za(r,e,t){const n=du(e,t);if(!n)return r;if(QA.test(r))return r.replace(QA,n);const i=r.includes("?")?"&":"?";return`${r}${i}${n}`}class Va{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=i=>{try{this.apply(i,{ot:xi.MANIFEST,su:!this.initialized})}catch(s){this.hls.logger.warn("Could not generate manifest CMCD data.",s)}},this.applyFragmentData=i=>{try{const{frag:s,part:a}=i,o=this.hls.levels[s.level],u=this.getObjectType(s),l={d:(a||s).duration*1e3,ot:u};(u===xi.VIDEO||u===xi.AUDIO||u==xi.MUXED)&&(l.br=o.bitrate/1e3,l.tb=this.getTopBandwidth(u)/1e3,l.bl=this.getBufferLength(u));const f=a?this.getNextPart(a):this.getNextFrag(s);f!=null&&f.url&&f.url!==s.url&&(l.nor=f.url),this.apply(i,l)}catch(s){this.hls.logger.warn("Could not generate segment CMCD data.",s)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHED,this.onMediaDetached,this),e.on(d.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHED,this.onMediaDetached,this),e.off(d.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,i;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(i=t.tracks.video)==null?void 0:i.buffer}createData(){var e;return{v:1,sf:xA.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){p(t,this.createData());const n=t.ot===xi.INIT||t.ot===xi.VIDEO||t.ot===xi.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:i}=this;i&&(t=Object.keys(t).reduce((a,o)=>(i.includes(o)&&(a[o]=t[o]),a),{}));const s={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),cu(e.headers,t,s)):e.url=Za(e.url,t,s)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const i=e.sn-n.startSN;return n.fragments[i+1]}}getNextPart(e){var t,n;const{index:i,fragment:s}=e,a=(t=this.hls.levels[s.level])==null||(n=t.details)==null?void 0:n.partList;if(a){const{sn:o}=s;for(let u=a.length-1;u>=0;u--){const l=a[u];if(l.index===i&&l.fragment.sn===o)return a[u+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return xi.TIMED_TEXT;if(e.sn==="initSegment")return xi.INIT;if(t==="audio")return xi.AUDIO;if(t==="main")return this.hls.audioTracks.length?xi.VIDEO:xi.MUXED}getTopBandwidth(e){let t=0,n;const i=this.hls;if(e===xi.AUDIO)n=i.audioTracks;else{const s=i.maxAutoLevel,a=s>-1?s+1:i.levels.length;n=i.levels.slice(0,a)}for(const s of n)s.bitrate>t&&(t=s.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===xi.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:pn.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new n(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,a,o){t(s),this.loader.load(s,a,o)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new n(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,a,o){t(s),this.loader.load(s,a,o)}}}}const hu=3e5;class MA extends j{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(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===Gt.SendAlternateToPenaltyBox&&n.flags===pe.MoveAllAlternatesMatchingHost){const i=this.levels;let s=this._pathwayPriority,a=this.pathwayId;if(t.context){const{groupId:o,pathwayId:u,type:l}=t.context;o&&i?a=this.getPathwayForGroupId(o,l,a):u&&(a=u)}a in this.penalizedPathways||(this.penalizedPathways[a]=performance.now()),!s&&i&&(s=this.pathways()),s&&s.length>1&&(this.updatePathwayPriority(s),n.resolved=this.pathwayId!==a),n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${a} levels: ${i&&i.length} priorities: ${sn(s)} penalized: ${sn(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const n=this.penalizedPathways,i=performance.now();Object.keys(n).forEach(s=>{i-n[s]>hu&&delete n[s]});for(let s=0;s<e.length;s++){const a=e[s];if(a in n)continue;if(a===this.pathwayId)return;const o=this.hls.nextLoadLevel,u=this.hls.levels[o];if(t=this.getLevelsForPathway(a),t.length>0){this.log(`Setting Pathway to "${a}"`),this.pathwayId=a,qi(t),this.hls.trigger(d.LEVELS_UPDATED,{levels:t});const l=this.hls.levels[o];u&&l&&this.levels&&(l.attrs["STABLE-VARIANT-ID"]!==u.attrs["STABLE-VARIANT-ID"]&&l.bitrate!==u.bitrate&&this.log(`Unstable Pathways change from bitrate ${u.bitrate} to ${l.bitrate}`),this.hls.nextLoadLevel=o);break}}}getPathwayForGroupId(e,t,n){const i=this.getLevelsForPathway(n).concat(this.levels||[]);for(let s=0;s<i.length;s++)if(t===ye.AUDIO_TRACK&&i[s].hasAudioGroup(e)||t===ye.SUBTITLE_TRACK&&i[s].hasSubtitleGroup(e))return i[s].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},i={};e.forEach(s=>{const{ID:a,"BASE-ID":o,"URI-REPLACEMENT":u}=s;if(t.some(f=>f.pathwayId===a))return;const l=this.getLevelsForPathway(o).map(f=>{const h=new Sn(f.attrs);h["PATHWAY-ID"]=a;const E=h.AUDIO&&`${h.AUDIO}_clone_${a}`,C=h.SUBTITLES&&`${h.SUBTITLES}_clone_${a}`;E&&(n[h.AUDIO]=E,h.AUDIO=E),C&&(i[h.SUBTITLES]=C,h.SUBTITLES=C);const T=Lo(f.uri,h["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",u),J=new gn({attrs:h,audioCodec:f.audioCodec,bitrate:f.bitrate,height:f.height,name:f.name,url:T,videoCodec:f.videoCodec,width:f.width});if(f.audioGroups)for(let $=1;$<f.audioGroups.length;$++)J.addGroupId("audio",`${f.audioGroups[$]}_clone_${a}`);if(f.subtitleGroups)for(let $=1;$<f.subtitleGroups.length;$++)J.addGroupId("text",`${f.subtitleGroups[$]}_clone_${a}`);return J});t.push(...l),Wa(this.audioTracks,n,u,a),Wa(this.subtitleTracks,i,u,a)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let i;try{i=new self.URL(e)}catch(f){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(i.protocol!=="data:"){const f=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+f)}const s={responseType:"json",url:i.href},a=t.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},u={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},l={onSuccess:(f,h,E,C)=>{this.log(`Loaded steering manifest: "${i}"`);const T=f.data;if((T==null?void 0:T.VERSION)!==1){this.log(`Steering VERSION ${T.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=T.TTL;const{"RELOAD-URI":J,"PATHWAY-CLONES":$,"PATHWAY-PRIORITY":_e}=T;if(J)try{this.uri=new self.URL(J,i).href}catch(De){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${J}`);return}this.scheduleRefresh(this.uri||E.url),$&&this.clonePathways($);const Oe={steeringManifest:T,url:i.toString()};this.hls.trigger(d.STEERING_MANIFEST_LOADED,Oe),_e&&this.updatePathwayPriority(_e)},onError:(f,h,E,C)=>{if(this.log(`Error loading steering manifest: ${f.code} ${f.text} (${h.url})`),this.stopLoad(),f.code===410){this.enabled=!1,this.log(`Steering manifest ${h.url} no longer available`);return}let T=this.timeToLoad*1e3;if(f.code===429){const J=this.loader;if(typeof(J==null?void 0:J.getResponseHeader)=="function"){const $=J.getResponseHeader("Retry-After");$&&(T=parseFloat($)*1e3)}this.log(`Steering manifest ${h.url} rate limited`);return}this.scheduleRefresh(this.uri||h.url,T)},onTimeout:(f,h,E)=>{this.log(`Timeout loading steering manifest (${h.url})`),this.scheduleRefresh(this.uri||h.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(s,u,l)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const i=(n=this.hls)==null?void 0:n.media;if(i&&!i.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Wa(r,e,t,n){r&&Object.keys(e).forEach(i=>{const s=r.filter(a=>a.groupId===i).map(a=>{const o=p({},a);return o.details=void 0,o.attrs=new Sn(o.attrs),o.url=o.attrs.URI=Lo(a.url,a.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),o.groupId=o.attrs["GROUP-ID"]=e[i],o.attrs["PATHWAY-ID"]=n,o});r.push(...s)})}function Lo(r,e,t,n){const{HOST:i,PARAMS:s,[t]:a}=n;let o;e&&(o=a==null?void 0:a[e],o&&(r=o));const u=new self.URL(r);return i&&!o&&(u.host=i),s&&Object.keys(s).sort().forEach(l=>{l&&u.searchParams.set(l,s[l])}),u.href}class Ns extends j{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=Ns.CDMCleanupPromise?[Ns.CDMCleanupPromise]:[],this.onMediaEncrypted=t=>{const{initDataType:n,initData:i}=t,s=`"${t.type}" event: init data type: "${n}"`;if(this.debug(s),i!==null){if(!this.keyFormatPromise){let a=Object.keys(this.keySystemAccessPromises);a.length||(a=Zr(this.config));const o=a.map($r).filter(u=>!!u);this.keyFormatPromise=this.getKeyFormatPromise(o)}this.keyFormatPromise.then(a=>{const o=Er(a);let u,l;if(n==="sinf"){if(o!==fn.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${o}`);return}const T=Le(new Uint8Array(i));try{const J=Yr(JSON.parse(T).sinf),$=re(J);if(!$)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");u=new Uint8Array($.subarray(8,24)),l=fn.FAIRPLAY}catch(J){this.warn(`${s} Failed to parse sinf: ${J}`);return}}else{if(o!==fn.WIDEVINE&&o!==fn.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${o}`);return}const T=dn(i),J=T.filter(_e=>!!_e.systemId&&ii(_e.systemId)===o);J.length>1&&this.warn(`${s} Using first of ${J.length} pssh found for selected key-system ${o}`);const $=J[0];if(!$){T.length===0||T.some(_e=>!_e.systemId)?this.warn(`${s} contains incomplete or invalid pssh data`):this.log(`ignoring ${s} for ${T.map(_e=>ii(_e.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(l=ii($.systemId),$.version===0&&$.data)if(l===fn.WIDEVINE){const _e=$.data.length-22;u=new Uint8Array($.data.subarray(_e,_e+16))}else l===fn.PLAYREADY&&(u=br($.data))}if(!l||!u)return;const f=Z.hexDump(u),{keyIdToKeySessionPromise:h,mediaKeySessions:E}=this;let C=h[f];for(let T=0;T<E.length;T++){const J=E[T],$=J.decryptdata;if(!$.keyId)continue;const _e=Z.hexDump($.keyId);if(f===_e||$.uri.replace(/-/g,"").indexOf(f)!==-1){if(C=h[_e],$.pssh)break;delete h[_e],$.pssh=new Uint8Array(i),$.keyId=u,C=h[f]=C.then(()=>this.generateRequestWithPreferredKeySession(J,n,i,"encrypted-event-key-match")),C.catch(Oe=>this.handleError(Oe));break}}if(!C){if(l!==o){this.log(`Ignoring "${t.type}" event with ${l} init data for selected key-system ${o}`);return}C=h[f]=this.getKeySystemSelectionPromise([l]).then(({keySystem:T,mediaKeys:J})=>{var $;this.throwIfDestroyed();const _e=new Ur("ISO-23001-7",f,($=$r(T))!=null?$:"");return _e.pssh=new Uint8Array(i),_e.keyId=u,this.attemptSetMediaKeys(T,J).then(()=>{this.throwIfDestroyed();const Oe=this.createMediaKeySessionContext({decryptdata:_e,keySystem:T,mediaKeys:J});return this.generateRequestWithPreferredKeySession(Oe,n,i,"encrypted-event-no-match")})}),C.catch(T=>this.handleError(T))}})}},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(d.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(d.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(d.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(d.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(d.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(d.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(d.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,i=t[e];if(i)return i.licenseUrl;if(e===fn.WIDEVINE&&n)return n}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(a,o,u)=>!!a&&u.indexOf(a)===o,i=t.map(a=>a.audioCodec).filter(n),s=t.map(a=>a.videoCodec).filter(n);return i.length+s.length===0&&s.push("avc1.42e01e"),new Promise((a,o)=>{const u=l=>{const f=l.shift();this.getMediaKeysPromise(f,i,s).then(h=>a({keySystem:f,mediaKeys:h})).catch(h=>{l.length?u(l):h instanceof Oi?o(h):o(new Oi({type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_ACCESS,error:h,fatal:!0},h.message))})};u(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let i=`Configured requestMediaKeySystemAccess is not a function ${n}`;return hn===null&&self.location.protocol==="http:"&&(i=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(i))}return n(e,t)}getMediaKeysPromise(e,t,n){const i=sr(e,t,n,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: ${sn(i)}`),a=this.requestMediaKeySystemAccess(e,i);const o=this.keySystemAccessPromises[e]={keySystemAccess:a};return a.catch(u=>{this.log(`Failed to obtain access to key-system "${e}": ${u}`)}),a.then(u=>{this.log(`Access for key-system "${u.keySystem}" obtained`);const l=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),o.mediaKeys=u.createMediaKeys().then(f=>(this.log(`Media-keys created for "${e}"`),l.then(h=>h?this.setMediaKeysServerCertificate(f,e,h):f))),o.mediaKeys.catch(f=>{this.error(`Failed to create media-keys for "${e}"}: ${f}`)}),o.mediaKeys})}return a.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${Z.hexDump(e.keyId||[])}`);const i=n.createSession(),s={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(s),s}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),i=this.getKeyIdString(t),s="cenc";this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(n,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 n;const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${Z.hexDump(((n=e.decryptdata)==null?void 0:n.keyId)||[])}
} (data length: ${t&&t.byteLength})`),i.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,n)=>{const i=Zr(this.config),s=e.map(Er).filter(a=>!!a&&i.indexOf(a)!==-1);return this.getKeySystemSelectionPromise(s).then(({keySystem:a})=>{const o=$r(a);o?t(o):n(new Error(`Unable to find format for key-system "${a}"`))}).catch(n)})}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);let s=this.keyIdToKeySessionPromise[n];return s||(s=this.getKeySystemForKeyPromise(t).then(({keySystem:o,mediaKeys:u})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(o,u).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:o,mediaKeys:u,decryptdata:t}))))),(this.keyIdToKeySessionPromise[n]=s.then(o=>{const u="cenc",l=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(o,u,l,"playlist-key")})).catch(o=>this.handleError(o))),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Oi?this.hls.trigger(d.ERROR,e.data):this.hls.trigger(d.ERROR,{type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const i=Er(e.keyFormat),s=i?[i]:Zr(this.config);return this.attemptKeySystemAccess(s)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Zr(this.config)),e.length===0)throw new Oi({type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${sn({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(n).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(i),i.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(s=>n.indexOf(s)===-1)})}generateRequestWithPreferredKeySession(e,t,n,i){var s,a;const o=(s=this.config.drmSystems)==null||(a=s[e.keySystem])==null?void 0:a.generateRequest;if(o)try{const T=o.call(this.hls,t,n,e);if(!T)throw new Error("Invalid response from configured generateRequest filter");t=T.initDataType,n=T.initData?T.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(T){var u;if(this.warn(T.message),(u=this.hls)!=null&&u.config.debug)throw T}if(n===null)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${l} (init data type: ${t} length: ${n?n.byteLength:null})`);const f=new ss,h=e._onmessage=T=>{const J=e.mediaKeysSession;if(!J){f.emit("error",new Error("invalid state"));return}const{messageType:$,message:_e}=T;this.log(`"${$}" message event for session "${J.sessionId}" message size: ${_e.byteLength}`),$==="license-request"||$==="license-renewal"?this.renewLicense(e,_e).catch(Oe=>{f.eventNames().length?f.emit("error",Oe):this.handleError(Oe)}):$==="license-release"?e.keySystem===fn.FAIRPLAY&&(this.updateKeySession(e,cr("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${$}"`)},E=e._onkeystatuseschange=T=>{if(!e.mediaKeysSession){f.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const $=e.keyStatus;f.emit("keyStatus",$),$==="expired"&&(this.warn(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",h),e.mediaKeysSession.addEventListener("keystatuseschange",E);const C=new Promise((T,J)=>{f.on("error",J),f.on("keyStatus",$=>{$.startsWith("usable")?T():$==="output-restricted"?J(new Oi({type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):$==="internal-error"?J(new Oi({type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${$}"`)):$==="expired"?J(new Error("key expired while generating request")):this.warn(`unhandled key status change "${$}"`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{var T;this.log(`Request generated for key-session "${(T=e.mediaKeysSession)==null?void 0:T.sessionId}" keyId: ${l}`)}).catch(T=>{throw new Oi({type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_SESSION,error:T,fatal:!1},`Error generating key-session request: ${T}`)}).then(()=>C).catch(T=>{throw f.removeAllListeners(),this.removeSession(e),T}).then(()=>(f.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,n)=>{if(typeof n=="string"&&typeof t=="object"){const i=n;n=t,t=i}this.log(`key status change "${t}" for keyStatuses keyId: ${Z.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${Z.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,n=t.loader,i=new n(t),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching server certificate for "${e}"`),new Promise((a,o)=>{const u={responseType:"arraybuffer",url:s},l=t.certLoadPolicy.default,f={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:(E,C,T,J)=>{a(E.data)},onError:(E,C,T,J)=>{o(new Oi({type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:T,response:B({url:u.url,data:void 0},E)},`"${e}" certificate request failed (${s}). Status: ${E.code} (${E.text})`))},onTimeout:(E,C,T)=>{o(new Oi({type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:T,response:{url:u.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(E,C,T)=>{o(new Error("aborted"))}};i.load(u,f,h)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((i,s)=>{e.setServerCertificate(n).then(a=>{this.log(`setServerCertificate ${a?"success":"not supported by CDM"} (${n==null?void 0:n.byteLength}) on "${t}"`),i(e)}).catch(a=>{s(new Oi({type:we.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(n=>this.updateKeySession(e,new Uint8Array(n)).catch(i=>{throw new Oi({type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:i,fatal:!0},i.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const i=new DOMParser().parseFromString(n,"application/xml"),s=i.querySelectorAll("HttpHeader");if(s.length>0){let f;for(let h=0,E=s.length;h<E;h++){var a,o;f=s[h];const C=(a=f.querySelector("name"))==null?void 0:a.textContent,T=(o=f.querySelector("value"))==null?void 0:o.textContent;C&&T&&e.setRequestHeader(C,T)}}const u=i.querySelector("Challenge"),l=u==null?void 0:u.textContent;if(!l)throw new Error("Cannot find <Challenge> in key message");return cr(atob(l))}setupLicenseXHR(e,t,n,i){const s=this.config.licenseXhrSetup;return s?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return s.call(this.hls,e,t,n,i)}).catch(a=>{if(!n.decryptdata)throw a;return e.open("POST",t,!0),s.call(this.hls,e,t,n,i)}).then(a=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:a||i})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((i,s)=>{const a=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return s(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let u=o.response;this.log(`License received ${u instanceof ArrayBuffer?u.byteLength:u}`);const l=this.config.licenseResponseCallback;if(l)try{u=l.call(this.hls,o,a,e)}catch(f){this.error(f)}i(u)}else{const u=n.errorRetry,l=u?u.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||o.status>=400&&o.status<500)s(new Oi({type:we.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const f=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${f} attempts left`),this.requestLicense(e,t).then(i,s)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,a,e,t).then(({xhr:u,licenseChallenge:l})=>{e.keySystem==fn.PLAYREADY&&(l=this.unpackPlayReadyKeyMessage(u,l)),u.send(l)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,n.removeEventListener("encrypted",this.onMediaEncrypted),n.removeEventListener("waitingforkey",this.onWaitingForKey),n.addEventListener("encrypted",this.onMediaEncrypted),n.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 n=this.mediaKeySessions;this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Ur.clearKeyUriToKeyIdMap();const i=n.length;Ns.CDMCleanupPromise=Promise.all(n.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(d.ERROR,{type:we.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))).then(()=>{i&&(this.log("finished closing key sessions and clearing media keys"),n.length=0)}).catch(s=>{var a;this.log(`Could not close sessions and clear media keys: ${s}`),(a=this.hls)==null||a.trigger(d.ERROR,{type:we.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 n=t.reduce((i,s)=>(i.indexOf(s.keyFormat)===-1&&i.push(s.keyFormat),i),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n}=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),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);i>-1&&this.mediaKeySessions.splice(i,1);const{drmSystemOptions:s}=this.config;return(_r(s)?new Promise((o,u)=>{self.setTimeout(()=>u(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(o)}):Promise.resolve()).catch(o=>{var u;this.log(`Could not remove session: ${o}`),(u=this.hls)==null||u.trigger(d.ERROR,{type:we.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${o}`)})}).then(()=>t.close()).catch(o=>{var u;this.log(`Could not close session: ${o}`),(u=this.hls)==null||u.trigger(d.ERROR,{type:we.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${o}`)})})}}}Ns.CDMCleanupPromise=void 0;class Oi 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 gu{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(d.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(d.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(d.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const i=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=i,i&&typeof i.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const i=performance.now();if(t){if(this.lastTime){const s=i-this.lastTime,a=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,u=1e3*a/s,l=this.hls;if(l.trigger(d.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),u>0&&a>l.config.fpsDroppedMonitoringThreshold*o){let f=l.currentLevel;l.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+f),f>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=f)&&(f=f-1,l.trigger(d.FPS_DROP_LEVEL_CAPPING,{level:f,droppedLevel:l.currentLevel}),l.autoLevelCapping=f,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function Ba(r,e){let t;try{t=new Event("addtrack")}catch(n){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=r,e.dispatchEvent(t)}function Uo(r,e){const t=r.mode;if(t==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(e.id))try{if(r.addCue(e),!r.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){ie.debug(`[texttrack-utils]: ${n}`);try{const i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,r.addCue(i)}catch(i){ie.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${i}`)}}t==="disabled"&&(r.mode=t)}function Hs(r,e){const t=r.mode;if(t==="disabled"&&(r.mode="hidden"),r.cues)for(let n=r.cues.length;n--;)e&&r.cues[n].removeEventListener("enter",e),r.removeCue(r.cues[n]);t==="disabled"&&(r.mode=t)}function ko(r,e,t,n){const i=r.mode;if(i==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0){const s=NA(r.cues,e,t);for(let a=0;a<s.length;a++)(!n||n(s[a]))&&r.removeCue(s[a])}i==="disabled"&&(r.mode=i)}function pu(r,e){if(e<=r[0].startTime)return 0;const t=r.length-1;if(e>r[t].endTime)return-1;let n=0,i=t,s;for(;n<=i;)if(s=Math.floor((i+n)/2),e<r[s].startTime)i=s-1;else if(e>r[s].startTime&&n<t)n=s+1;else return s;return r[n].startTime-e<e-r[i].startTime?n:i}function NA(r,e,t){const n=[],i=pu(r,e);if(i>-1)for(let s=i,a=r.length;s<a;s++){const o=r[s];if(o.startTime>=e&&o.endTime<=t)n.push(o);else if(o.startTime>t)return n}return n}function _s(r){const e=[];for(let t=0;t<r.length;t++){const n=r[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(r[t])}return e}class Po extends wo{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const n=_s(this.media.textTracks);for(let s=0;s<n.length;s++)if(n[s].mode==="hidden")t=n[s];else if(n[s].mode==="showing"){t=n[s];break}const i=this.findTrackForTextTrack(t);this.subtitleTrack!==i&&this.setSubtitleTrack(i)},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(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.LEVEL_LOADING,this.onLevelLoading,this),e.on(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(d.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.LEVEL_LOADING,this.onLevelLoading,this),e.off(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(d.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(d.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const i=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,i)return;_s(n.textTracks).forEach(a=>{Hs(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:n,groupId:i,details:s}=t,a=this.tracksInGroup[n];if(!a||a.groupId!==i){this.warn(`Subtitle track with id:${n} and group:${i} not found in active group ${a==null?void 0:a.groupId}`);return}const o=a.details;a.details=t.details,this.log(`Subtitle track ${n} "${a.name}" lang:${a.lang} group:${i} loaded [${s.startSN}-${s.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,i=this.groupIds;let s=this.currentTrack;if(!n||(i==null?void 0:i.length)!==(n==null?void 0:n.length)||n!=null&&n.some(a=>(i==null?void 0:i.indexOf(a))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const a=this.tracks.filter(f=>!n||n.indexOf(f.groupId)!==-1);if(a.length)this.selectDefaultTrack&&!a.some(f=>f.default)&&(this.selectDefaultTrack=!1),a.forEach((f,h)=>{f.id=h});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=a;const o=this.hls.config.subtitlePreference;if(!s&&o){this.selectDefaultTrack=!1;const f=ct(o,a);if(f>-1)s=a[f];else{const h=ct(o,this.tracks);s=this.tracks[h]}}let u=this.findTrackId(s);u===-1&&s&&(u=this.findTrackId(null));const l={subtitleTracks:a};this.log(`Updating subtitle tracks, ${a.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(d.SUBTITLE_TRACKS_UPDATED,l),u!==-1&&this.trackId===-1&&this.setSubtitleTrack(u)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let i=0;i<t.length;i++){const s=t[i];if(!(n&&!s.default||!n&&!e)&&(!e||St(s,e)))return i}if(e){for(let i=0;i<t.length;i++){const s=t[i];if(ya(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<t.length;i++){const s=t[i];if(ya(e.attrs,s.attrs,["LANGUAGE"]))return i}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const i=t[n];if(Bo(i,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===ye.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&St(e,n))return n;const i=ct(e,this.tracksInGroup);if(i>-1){const s=this.tracksInGroup[i];return this.setSubtitleTrack(i),s}else{if(n)return null;{const s=ct(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 n=e.id,i=e.groupId,s=this.getUrlWithDirectives(e.url,t),a=e.details,o=a==null?void 0:a.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${i}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${o&&a.live?" age "+o.toFixed(1)+(a.type?" "+a.type||0:""):""} ${s}`),this.hls.trigger(d.SUBTITLE_TRACK_LOADING,{url:s,id:n,groupId:i,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=_s(e.textTracks),n=this.currentTrack;let i;if(n&&(i=t.filter(s=>Bo(n,s))[0],i||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(s=>{s.mode!=="disabled"&&s!==i&&(s.mode="disabled")}),i){const s=this.subtitleDisplay?"showing":"hidden";i.mode!==s&&(i.mode=s)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!M(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,i=t[e]||null;if(this.trackId=e,this.currentTrack=i,this.toggleTrackModes(),!i){this.hls.trigger(d.SUBTITLE_TRACK_SWITCH,{id:e});return}const s=!!i.details&&!i.details.live;if(e===this.trackId&&i===n&&s)return;this.log(`Switching to subtitle-track ${e}`+(i?` "${i.name}" lang:${i.lang} group:${i.groupId}`:""));const{id:a,groupId:o="",name:u,type:l,url:f}=i;this.hls.trigger(d.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:u,type:l,url:f});const h=this.switchParams(i.url,n==null?void 0:n.details,i.details);this.loadPlaylist(h)}}function Ts(r){let e=5381,t=r.length;for(;t;)e=e*33^r.charCodeAt(--t);return(e>>>0).toString()}const ra=.025;let za=function(r){return r[r.Point=0]="Point",r[r.Range=1]="Range",r}({});function mu(r,e,t){return`${r.identifier}-${t+1}-${Ts(e)}`}class vu{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 ja(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,n=ja(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=M(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 ja(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)<ra))}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"?za.Range:za.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 HA(this)}}function ja(r,e){return r-e.start<e.duration/2&&!(Math.abs(r-(e.start+e.duration))<ra)?e.start:e.start+e.duration}function Ya(r,e,t){const n=new self.URL(r,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function HA(r){return`["${r.identifier}" ${r.cue.pre?"<pre>":r.cue.post?"<post>":""}${r.timelineStart.toFixed(2)}-${r.resumeTime.toFixed(2)}]`}function Xa(r){const e=r.timelineStart,t=r.duration||0;return`["${r.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class Oo{constructor(e,t,n,i){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 l=this.interstitial.playoutLimit,f=this.currentTime;this.startOffset+f>=l&&this.hls.trigger(d.PLAYOUT_LIMIT_REACHED,{})};const s=this.hls=new e(t);this.interstitial=n,this.assetItem=i;let a=i.uri;try{a=Ya(a,s.sessionId).href}catch(u){}s.loadSource(a);const o=()=>{this.hasDetails=!0};s.once(d.LEVEL_LOADED,o),s.once(d.AUDIO_TRACK_LOADED,o),s.once(d.SUBTITLE_TRACK_LOADED,o),s.on(d.MEDIA_ATTACHING,(u,{media:l})=>{this.removeMediaListeners(),this.mediaAttached=l,this.interstitial.playoutLimit&&l.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 n=this.timelineOffset,i=pn.bufferInfo(e,n,0);return this.getAssetTime(i.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=pn.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 n=e-t;if(Math.abs(n)>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,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls.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,n){this.hls.on(e,t)}once(e,t,n){this.hls.once(e,t)}off(e,t,n){this.hls.off(e,t)}toString(){var e,t;return`HlsAssetPlayer: ${Xa(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${(t=this.interstitial)!=null&&t.appendInPlace?"append-in-place":""}`}}const Qo=.033;class KA extends j{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,i)=>e<=i.startOffset&&t>i.startOffset?(delete i.error,n+1):n,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const i=this.items;if(i)for(i[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(s=i[n])!=null&&s.event;){var s;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let i=0;i<n.length;i++){let s=n[i];if(t&&t!=="primary"&&(s=s[t]),e===s.start||e>s.start&&e<s.end)return i}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let i=e;i<=t&&n[i];i++){const s=n[i].event;if(s!=null&&s.restrictions.jump&&!s.appendInPlace)return i}return-1}findEventIndex(e){const t=this.items;if(t)for(let i=t.length;i--;){var n;if(((n=t[i].event)==null?void 0:n.identifier)===e)return i}return-1}findAssetIndex(e,t){const n=e.assetList,i=n.length;if(i>1)for(let s=0;s<i;s++){const a=n[s];if(!a.error){const o=a.timelineStart;if(t===o||t>o&&t<o+(a.duration||0))return s}}return 0}get assetIdAtEnd(){var e,t;const n=(e=this.items)==null||(t=e[this.length-1])==null?void 0:t.event;if(n){const i=n.assetList,s=i[i.length-1];if(s)return s.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:i}=n,s=this.events,a=this.parseDateRanges(i,{url:n.url},t),o=Object.keys(i),u=s?s.filter(l=>!o.includes(l.identifier)):[];a.length&&a.sort((l,f)=>{const h=l.cue.pre,E=l.cue.post,C=f.cue.pre,T=f.cue.post;if(h&&!C)return-1;if(C&&!h||E&&!T)return 1;if(T&&!E)return-1;if(!h&&!C&&!E&&!T){const J=l.startTime,$=f.startTime;if(J!==$)return J-$}return l.dateRange.tagOrder-f.dateRange.tagOrder}),this.events=a,u.forEach(l=>{this.removeEvent(l)}),this.updateSchedule(e,u)}updateSchedule(e,t=[]){const n=this.events||[];if(n.length||t.length||this.length<2){const i=this.items,s=this.parseSchedule(n,e);(t.length||(i==null?void 0:i.length)!==s.length||s.some((o,u)=>Math.abs(o.playout.start-i[u].playout.start)>.005||Math.abs(o.playout.end-i[u].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,n){const i=[],s=Object.keys(e);for(let a=0;a<s.length;a++){const o=s[a],u=e[o];if(u.isInterstitial){let l=this.eventMap[o];l?l.setDateRange(u):(l=new vu(u,t),this.eventMap[o]=l,n===!1&&(l.appendInPlace=n)),i.push(l)}}return i}parseSchedule(e,t){const n=[],i=t.main.details,s=i.live?1/0:i.edge;let a=0;if(e=e.filter(u=>!u.error&&!(u.cue.once&&u.hasPlayed)),e.length){this.resolveOffsets(e,t);let u=0,l=0;if(e.forEach((f,h)=>{const E=f.cue.pre,C=f.cue.post,T=e[h-1]||null,J=f.appendInPlace,$=C?s:f.startOffset,_e=f.duration,Oe=f.timelineOccupancy===za.Range?_e:0,De=f.resumptionOffset,rt=(T==null?void 0:T.startTime)===$,We=$+f.cumulativeDuration;let Lt=J?We+_e:$+De;if(E||!C&&$<=0){const _t=l;l+=Oe,f.timelineStart=We;const jt=a;a+=_e,n.push({event:f,start:We,end:Lt,playout:{start:jt,end:a},integrated:{start:_t,end:l}})}else if($<=s){if(!rt){const xt=$-u;if(xt>Qo){const xn=u,bn=l;l+=xt;const wr=a;a+=xt;const mr={previousEvent:e[h-1]||null,nextEvent:f,start:xn,end:xn+xt,playout:{start:wr,end:a},integrated:{start:bn,end:l}};n.push(mr)}else xt>0&&T&&(T.cumulativeDuration+=xt,n[n.length-1].end=$)}C&&(Lt=We),f.timelineStart=We;const _t=l;l+=Oe;const jt=a;a+=_e,n.push({event:f,start:We,end:Lt,playout:{start:jt,end:a},integrated:{start:_t,end:l}})}else return;const dt=f.resumeTime;C||dt>s?u=s:u=dt}),u<s){var o;const f=u,h=l,E=s-u;l+=E;const C=a;a+=E,n.push({previousEvent:((o=n[n.length-1])==null?void 0:o.event)||null,nextEvent:null,start:u,end:f+E,playout:{start:C,end:a},integrated:{start:h,end:l}})}this.setDurations(s,a,l)}else n.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 n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,i=n.live?1/0:n.edge;let s=0,a=-1;e.forEach((o,u)=>{const l=o.cue.pre,f=o.cue.post,h=l?0:f?i:o.startTime;this.updateAssetDurations(o),a===h?o.cumulativeDuration=s:(s=0,a=h),!f&&o.snapOptions.in&&(o.resumeAnchor=Ct(null,n.fragments,o.startOffset+o.resumptionOffset,0,0)||void 0),o.appendInPlace&&!o.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(o,t)||(o.appendInPlace=!1)),!o.appendInPlace&&u+1<e.length&&e[u+1].startTime-e[u].resumeTime<Qo&&(e[u+1].appendInPlace=!1,e[u+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${o}`));const C=M(o.resumeOffset)?o.resumeOffset:o.duration;s+=C})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,i=e.startTime+e.resumptionOffset;return Math.abs(n-i)>ra?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${i}`),!1):t?!Object.keys(t).some(a=>{const o=t[a].details,u=o.edge;if(n>=u)return this.log(`"${e.identifier}" resumption ${n} past ${a} playlist end ${u}`),!1;const l=Ct(null,o.fragments,n);if(!l)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${a} playlist (${o.fragStart}-${o.fragmentEnd})`),!0;const f=a==="audio"?.175:0;return Math.abs(l.start-n)<ra+f||Math.abs(l.end-n)<ra+f?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${a} fragment bounds (${l.start}-${l.end} sn: ${l.sn} cc: ${l.cc})`),!0)}):(this.log(`"${e.identifier}" resumption ${n} can not be aligned with media (none selected)`),!1)}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,i=!1,s=!1;e.assetList.forEach((a,o)=>{const u=t+n;a.startOffset=n,a.timelineStart=u,i||(i=a.duration===null),s||(s=!!a.error);const l=a.error?0:a.duration||0;n+=l}),i&&!s?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function Is(r){return`[${r.event?'"'+r.event.identifier+'"':"primary"}: ${r.start.toFixed(2)}-${r.end.toFixed(2)}]`}class Ja{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let i;try{i=Ya(n,this.hls.sessionId,e.baseUrl)}catch(E){const C=this.assignAssetListError(e,W.ASSET_LIST_LOAD_ERROR,E,n);this.hls.trigger(d.ERROR,C);return}t&&i.protocol!=="data:"&&i.searchParams.set("_HLS_start_offset",""+t);const s=this.hls.config,a=s.loader,o=new a(s),u={responseType:"json",url:i.href},l=s.interstitialAssetListLoadPolicy.default,f={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:(E,C,T,J)=>{const $=E.data,_e=$==null?void 0:$.ASSETS;if(!Array.isArray(_e)){const Oe=this.assignAssetListError(e,W.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),T.url,C,J);this.hls.trigger(d.ERROR,Oe);return}e.assetListResponse=$,this.hls.trigger(d.ASSET_LIST_LOADED,{event:e,assetListResponse:$,networkDetails:J})},onError:(E,C,T,J)=>{const $=this.assignAssetListError(e,W.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${E.code} ${E.text} (${C.url})`),C.url,J,T);this.hls.trigger(d.ERROR,$)},onTimeout:(E,C,T)=>{const J=this.assignAssetListError(e,W.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${C.url})`),C.url,E,T);this.hls.trigger(d.ERROR,J)}};return o.load(u,f,h),this.hls.trigger(d.ASSET_LIST_LOADING,{event:e}),o}assignAssetListError(e,t,n,i,s,a){return e.error=n,{type:we.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:i,error:n,networkDetails:a,stats:s}}}function Zi(r,e,t){ts(r,e,t),r.addEventListener(e,t)}function ts(r,e,t){r.removeEventListener(e,t)}function Mo(r){r==null||r.play().catch(()=>{})}class _u extends j{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;const i=n-this.timelinePos;if(Math.abs(i)<1/7056e5)return;const a=i<=-.01;this.timelinePos=n,this.bufferedPos=n;const o=this.playingItem;if(!o){this.checkBuffer();return}if(a&&this.schedule.resetErrorsInRange(n,n-i)&&this.updateSchedule(),this.checkBuffer(),a&&n<o.start||n>=o.end){var u;const E=this.schedule.findItemIndexAtTime(this.timelinePos);if(!this.isInterstitial(o)&&(u=this.media)!=null&&u.paused&&(this.shouldPlay=!1),!a){const C=this.findItemIndex(o);if(E>C){const T=this.schedule.findJumpRestrictedIndex(C+1,E);if(T>C){this.setSchedulePosition(T);return}}}this.setSchedulePosition(E);return}const l=this.playingAsset;if(!l){if(this.playingLastItem&&this.isInterstitial(o)){const E=o.event.assetList[0];E&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,E))}return}const f=l.timelineStart,h=l.duration||0;(a&&n<f||n>=f+h)&&this.setScheduleToAssetAtTime(n,l)},this.onTimeupdate=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;if(n>this.timelinePos)this.timelinePos=n,n>this.bufferedPos&&this.checkBuffer();else return;const i=this.playingItem;if(!i||this.playingLastItem)return;if(n>=i.end){this.timelinePos=i.end;const o=this.findItemIndex(i);this.setSchedulePosition(o+1)}const s=this.playingAsset;if(!s)return;const a=s.timelineStart+(s.duration||0);n>=a&&this.setScheduleToAssetAtTime(n,s)},this.onScheduleUpdate=(n,i)=>{const s=this.schedule,a=this.playingItem,o=s.events||[],u=s.items||[],l=s.durations,f=n.map(C=>C.identifier),h=!!(o.length||f.length);if(h&&this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o}
Schedule: ${u.map(C=>Is(C))}`),f.length&&this.log(`Removed events ${f}`),this.playerQueue.forEach(C=>{if(C.interstitial.appendInPlace){const T=C.assetItem.timelineStart,J=C.timelineOffset-T;if(J)try{C.timelineOffset=T}catch($){Math.abs(J)>ra&&this.warn(`${$} ("${C.assetId}" ${C.timelineOffset}->${T})`)}}}),a){const C=this.updateItem(a,this.timelinePos);this.itemsMatch(a,C)&&(this.playingItem=C,this.waitingItem=this.endedItem=null)}else this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const E=this.bufferingItem;if(E){const C=this.updateItem(E,this.bufferedPos);this.itemsMatch(E,C)?this.bufferingItem=C:E.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(E.event,null))}if(n.forEach(C=>{C.assetList.forEach(T=>{this.clearAssetPlayer(T.identifier,null)})}),h||i){if(this.hls.trigger(d.INTERSTITIALS_UPDATED,{events:o.slice(0),schedule:u.slice(0),durations:l,removedIds:f}),this.isInterstitial(a)&&f.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 Ja(e),this.schedule=new KA(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e.on(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(d.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(d.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(d.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(d.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(d.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(d.BUFFER_APPENDED,this.onBufferAppended,this),e.on(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(d.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(d.MEDIA_ENDED,this.onMediaEnded,this),e.on(d.ERROR,this.onError,this),e.on(d.DESTROYING,this.onDestroying,this)}unregisterListeners(){const e=this.hls;e&&(e.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(d.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(d.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(d.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(d.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(d.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(d.BUFFER_CODECS,this.onBufferCodecs,this),e.off(d.BUFFER_APPENDED,this.onBufferAppended,this),e.off(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(d.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(d.MEDIA_ENDED,this.onMediaEnded,this),e.off(d.ERROR,this.onError,this),e.off(d.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){ts(e,"play",this.onPlay),ts(e,"pause",this.onPause),ts(e,"seeking",this.onSeeking),ts(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Zi(n,"seeking",this.onSeeking),Zi(n,"timeupdate",this.onTimeupdate),Zi(n,"play",this.onPlay),Zi(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,i=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!i){this.clearScheduleState();const s=this.findItemIndex(n);this.setSchedulePosition(s)}}clearScheduleState(){this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,i=this.media;if(this.media=null,!n&&(i&&this.removeMediaListeners(i),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,n=h=>h&&e.getAssetPlayer(h.identifier),i=(h,E,C,T,J)=>{if(h){let $=h[E].start;const _e=h.event;if(_e){if(E==="playout"||_e.timelineOccupancy!==za.Point){const Oe=n(C);(Oe==null?void 0:Oe.interstitial)===_e&&($+=Oe.assetItem.startOffset+Oe[J])}}else{const Oe=T==="bufferedPos"?a():e[T];$+=Oe-h.start}return $}return 0},s=(h,E)=>{if(h!==0&&E!=="primary"&&e.schedule.length){var C;const T=e.schedule.findItemIndexAtTime(h),J=(C=e.schedule.items)==null?void 0:C[T];if(J){const $=J[E].start-J.start;return h+$}}return h},a=()=>{const h=e.bufferedPos;return h===Number.MAX_VALUE?o("primary"):Math.max(h,0)},o=h=>{var E;return(E=e.primaryDetails)!=null&&E.live?e.primaryDetails.edge:e.schedule.durations[h]},u=(h,E)=>{var C,T;const J=e.effectivePlayingItem;if(J!=null&&(C=J.event)!=null&&C.restrictions.skip)return;e.log(`seek to ${h} "${E}"`);const $=e.effectivePlayingItem,_e=e.schedule.findItemIndexAtTime(h,E),Oe=(T=e.schedule.items)==null?void 0:T[_e],De=e.getBufferingPlayer(),rt=De==null?void 0:De.interstitial,We=rt==null?void 0:rt.appendInPlace,Lt=$&&e.itemsMatch($,Oe);if($&&(We||Lt)){const _t=n(e.playingAsset),jt=(_t==null?void 0:_t.media)||e.primaryMedia;if(jt){const xt=E==="primary"?jt.currentTime:i($,E,e.playingAsset,"timelinePos","currentTime"),xn=h-xt,bn=(We?xt:jt.currentTime)+xn;if(bn>=0&&(!_t||We||bn<=_t.duration)){jt.currentTime=bn;return}}}if(Oe){let _t=h;if(E!=="primary"){const xt=Oe[E].start,xn=h-xt;_t=Oe.start+xn}const jt=!e.isInterstitial(Oe);if((!e.isInterstitial($)||$.event.appendInPlace)&&(jt||Oe.event.appendInPlace)){const xt=e.media||(We?De==null?void 0:De.media:null);xt&&(xt.currentTime=_t)}else if($){const xt=e.findItemIndex($);if(_e>xt){const bn=e.schedule.findJumpRestrictedIndex(xt+1,_e);if(bn>xt){e.setSchedulePosition(bn);return}}let xn=0;if(jt)e.timelinePos=_t,e.checkBuffer();else{var dt;const bn=Oe==null||(dt=Oe.event)==null?void 0:dt.assetList;if(bn){const wr=h-(Oe[E]||Oe).start;for(let mr=bn.length;mr--;){const ar=bn[mr];if(ar.duration&&wr>=ar.startOffset&&wr<ar.startOffset+ar.duration){xn=mr;break}}}}e.setSchedulePosition(_e,xn)}}},l=()=>{const h=e.effectivePlayingItem;if(e.isInterstitial(h))return h;const E=t();return e.isInterstitial(E)?E:null},f={get currentTime(){const h=l(),E=e.effectivePlayingItem;return E&&E===h?i(E,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-E.playout.start:0},set currentTime(h){const E=l(),C=e.effectivePlayingItem;C&&C===E&&u(h+C.playout.start,"playout")},get duration(){const h=l();return h?h.playout.end-h.playout.start:0},get assetPlayers(){var h;const E=(h=l())==null?void 0:h.event.assetList;return E?E.map(C=>e.getAssetPlayer(C.identifier)):[]},get playingIndex(){var h;const E=(h=l())==null?void 0:h.event;return E&&e.effectivePlayingAsset?E.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return l()}};this.manager={get events(){var h,E;return((h=e.schedule)==null||(E=h.events)==null?void 0:E.slice(0))||[]},get schedule(){var h,E;return((h=e.schedule)==null||(E=h.items)==null?void 0:E.slice(0))||[]},get interstitialPlayer(){return l()?f:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const h=t();return e.findItemIndex(h)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const h=e.effectivePlayingItem;return e.findItemIndex(h)},primary:{get bufferedEnd(){return a()},get currentTime(){const h=e.timelinePos;return h>0?h:0},set currentTime(h){u(h,"primary")},get duration(){return o("primary")},get seekableStart(){var h;return((h=e.primaryDetails)==null?void 0:h.fragmentStart)||0}},integrated:{get bufferedEnd(){return i(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return i(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(h){u(h,"integrated")},get duration(){return o("integrated")},get seekableStart(){var h;return s(((h=e.primaryDetails)==null?void 0:h.fragmentStart)||0,"integrated")}},skip:()=>{const h=e.effectivePlayingItem,E=h==null?void 0:h.event;if(E&&!E.restrictions.skip){const C=e.findItemIndex(h);if(E.appendInPlace){const T=h.playout.start+h.event.duration;u(T+.001,"playout")}else e.advanceAfterAssetEnded(E,C,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,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t,n;if(this.mediaSelection===null)return;const i=this.waitingItem||this.playingItem;if(this.isInterstitial(i)&&!i.event.appendInPlace)return;let s=this.media;!s&&(e=this.bufferingItem)!=null&&(t=e.event)!=null&&t.appendInPlace&&(s=this.primaryMedia);const a=(n=s)==null?void 0:n.currentTime;if(!(a===void 0||!M(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 n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,i=e.media;if(n&&i===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&i){this.detachedData={media:i};return}const s=e.transferMedia();this.log(`transfer MediaSource from ${e} ${sn(s)}`),this.detachedData=s}else t&&i&&(this.shouldPlay||(this.shouldPlay=!i.paused))}transferMediaTo(e,t){var n,i;if(e.media===t)return;let s=null;const a=this.hls,o=e!==a,u=o&&e.interstitial.appendInPlace,l=(n=this.detachedData)==null?void 0:n.mediaSource;let f;if(a.media)u&&(s=a.transferMedia(),this.detachedData=s),f="Primary";else if(l){const C=this.getBufferingPlayer();C?(s=C.transferMedia(),f=`${C}`):f="detached MediaSource"}else f="detached media";if(!s){if(l)s=this.detachedData,this.log(`using detachedData: MediaSource ${sn(s)}`);else if(!this.detachedData||a.media===t){const C=this.playerQueue;C.length>1&&C.forEach(T=>{if(o&&T.interstitial.appendInPlace!==u){const J=T.interstitial;this.clearInterstitial(T.interstitial,null),J.appendInPlace=!1,J.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${J}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const h=s&&"mediaSource"in s&&((i=s.mediaSource)==null?void 0:i.readyState)!=="closed",E=h&&s?s:t;if(this.log(`${h?"transfering MediaSource":"attaching media"} to ${o?e:"Primary"} from ${f}`),E===s){const C=o&&e.assetId===this.schedule.assetIdAtEnd;E.overrides={duration:this.schedule.duration,endOfStream:!o||C,cueRemoval:!o}}e.attachMedia(E)}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 n=this.timelinePos,i=this.effectivePlayingItem;if(n===-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,o=e.findItemIndexAtTime(a);this.setSchedulePosition(o)}}else if(i&&!this.playingItem){const s=e.findItemIndex(i);this.setSchedulePosition(s)}}advanceAfterAssetEnded(e,t,n){const i=n+1;if(!e.isAssetPastPlayoutLimit(i)&&!e.assetList[i].error)this.setSchedulePosition(t,i);else{const s=this.schedule.items;if(s){const a=t+1,o=s.length;if(a>=o){this.setSchedulePosition(-1);return}const u=e.resumeTime;this.timelinePos<u&&(this.timelinePos=u,this.checkBuffer()),this.setSchedulePosition(a)}}}setScheduleToAssetAtTime(e,t){const n=this.schedule,i=t.parentIdentifier,s=n.getEvent(i);if(s){const a=n.findEventIndex(i),o=n.findAssetIndex(s,e);this.setSchedulePosition(a,o)}}setSchedulePosition(e,t){const n=this.schedule.items;if(!n||this.playbackDisabled)return;this.log(`setSchedulePosition ${e}, ${t}`);const i=e>=0?n[e]:null,s=this.playingItem,a=this.playingLastItem;if(this.isInterstitial(s)){var o;const l=s.event,f=this.playingAsset,h=f==null?void 0:f.identifier,E=h?this.getAssetPlayer(h):null;if(E&&h&&(!this.eventItemsMatch(s,i)||t!==void 0&&h!==((o=l.assetList)==null?void 0:o[t].identifier))){var u;const C=l.findAssetIndex(f);this.log(`INTERSTITIAL_ASSET_ENDED ${C+1}/${l.assetList.length} ${Xa(f)}`),this.endedAsset=f,this.playingAsset=null,this.hls.trigger(d.INTERSTITIAL_ASSET_ENDED,{asset:f,assetListIndex:C,event:l,schedule:n.slice(0),scheduleIndex:e,player:E}),this.retreiveMediaSource(h,i),E.media&&!((u=this.detachedData)!=null&&u.mediaSource)&&E.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${l} ${Is(s)}`),l.hasPlayed=!0,this.hls.trigger(d.INTERSTITIAL_ENDED,{event:l,schedule:n.slice(0),scheduleIndex:e}),l.cue.once)){this.updateSchedule();const C=this.schedule.items;if(i&&C){const T=this.schedule.findItemIndex(i);this.advanceSchedule(T,C,t,s,a)}return}}this.advanceSchedule(e,n,t,s,a)}advanceSchedule(e,t,n,i,s){const a=e>=0?t[e]:null,o=this.primaryMedia,u=this.playerQueue;if(u.length&&u.forEach(l=>{const f=l.interstitial,h=this.schedule.findEventIndex(f.identifier);(h<e||h>e+1)&&this.clearInterstitial(f,a)}),this.isInterstitial(a)){this.timelinePos=Math.min(Math.max(this.timelinePos,a.start),a.end);const l=a.event;n===void 0&&(n=this.schedule.findAssetIndex(l,this.timelinePos));const f=this.waitingItem;this.assetsBuffered(a,o)||this.setBufferingItem(a);let h=this.preloadAssets(l,n);if(this.eventItemsMatch(a,f||i)||(this.waitingItem=a,this.log(`INTERSTITIAL_STARTED ${Is(a)} ${l.appendInPlace?"append in place":""}`),this.hls.trigger(d.INTERSTITIAL_STARTED,{event:l,schedule:t.slice(0),scheduleIndex:e})),!l.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${l}`);return}if(l.assetListLoader&&(l.assetListLoader.destroy(),l.assetListLoader=void 0),!o){this.log(`Waiting for attachMedia to start Interstitial ${l}`);return}this.waitingItem=this.endedItem=null,this.playingItem=a;const E=l.assetList[n];if(!E){const C=t[e+1],T=this.media;C&&T&&!this.isInterstitial(C)&&T.currentTime<C.start&&(T.currentTime=this.timelinePos=C.start),this.advanceAfterAssetEnded(l,e,n||0);return}if(h||(h=this.getAssetPlayer(E.identifier)),h===null||h.destroyed){const C=l.assetList.length;this.warn(`asset ${n+1}/${C} player destroyed ${l}`),h=this.createAssetPlayer(l,E,n)}if(!this.eventItemsMatch(a,this.bufferingItem)&&l.appendInPlace&&this.isAssetBuffered(E))return;this.startAssetPlayer(h,n,t,e,o),this.shouldPlay&&Mo(h.media)}else a!==null?(this.resumePrimary(a,e,i),this.shouldPlay&&Mo(this.hls.media)):s&&this.isInterstitial(i)&&(this.endedItem=null,this.playingItem=i,i.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,n){var i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${Is(e)}`),!((i=this.detachedData)!=null&&i.mediaSource)){let a=this.timelinePos;(a<e.start||a>=e.end)&&(a=this.getPrimaryResumption(e,t),this.timelinePos=a),this.attachPrimary(a,e)}if(!n)return;const s=this.schedule.items;s&&(this.log(`resumed ${Is(e)}`),this.hls.trigger(d.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const i=this.primaryDetails;if(t===0)return this.hls.startPosition;if(i&&(n<i.fragmentStart||n>i.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:pn.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const i=this.primaryMedia;if(!i)return;const s=this.hls;s.media?this.checkBuffer():(this.transferMediaTo(s,i),n&&this.startLoadingPrimaryAt(e,n)),n||(this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const i=this.hls;!i.loadingEnabled||!i.media||Math.abs((((n=i.mainForwardBufferInfo)==null?void 0:n.start)||i.media.currentTime)-e)>.5?i.startLoad(e,t):i.bufferingEnabled||i.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(d.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(d.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1)return;const n=this.hls.levels[t.level],i=B(B({},this.mediaSelection||this.altSelection),{},{main:n});this.mediaSelection=i,this.schedule.parseInterstitialDateRanges(i,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const n=this.hls.audioTracks[t.id],i=this.mediaSelection;if(!i){this.altSelection=B(B({},this.altSelection),{},{audio:n});return}const s=B(B({},i),{},{audio:n});this.mediaSelection=s}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],i=this.mediaSelection;if(!i){this.altSelection=B(B({},this.altSelection),{},{subtitles:n});return}const s=B(B({},i),{},{subtitles:n});this.mediaSelection=s}onAudioTrackSwitching(e,t){const n=Me(t);this.playerQueue.forEach(i=>i.hls.setAudioOption(t)||i.hls.setAudioOption(n))}onSubtitleTrackSwitch(e,t){const n=Me(t);this.playerQueue.forEach(i=>i.hls.setSubtitleOption(t)||t.id!==-1&&i.hls.setSubtitleOption(n))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const i=this.timelinePos;this.bufferedPos=i,this.checkBuffer()}}onBufferedToEnd(e){const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let i=0;i<t.length;i++){const s=t[i];if(s.cue.post){var n;const a=this.schedule.findEventIndex(s.identifier),o=(n=this.schedule.items)==null?void 0:n[a];this.isInterstitial(o)&&this.eventItemsMatch(o,this.bufferingItem)&&this.bufferedToItem(o,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){const n=this.schedule.items;if(e&&n){const i=this.findItemIndex(e,t);return n[i]||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 n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.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 n=pn.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=n.len<1),this.updateBufferedPos(n.end,t,e)}updateBufferedPos(e,t,n){const i=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,o=this.findItemIndex(a);let u=i.findItemIndexAtTime(e);if(this.bufferedPos<e){var l,f;const h=this.findItemIndex(s),E=Math.min(h+1,t.length-1),C=t[E];if((u===-1&&s&&e>=s.end||(l=C.event)!=null&&l.appendInPlace&&e+.01>=C.start)&&(u=E),E-o>1&&(s==null||(f=s.event)==null?void 0:f.appendInPlace)===!1)return;if(this.bufferedPos=e,u>h&&u>o)this.bufferedToItem(C);else{const T=this.primaryDetails;this.primaryLive&&T&&e>T.edge-T.targetduration&&C.start<T.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(C)&&this.preloadAssets(C.event,0)}}else n&&a&&!this.itemsMatch(a,s)&&(u===o?this.bufferedToItem(a):u===o+1&&this.bufferedToItem(t[u]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(i=>{const s=this.getAssetPlayer(i.identifier);return!(s!=null&&s.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(this.itemsMatch(e,t))this.bufferingItem!==e&&(this.bufferingItem=e);else{const{items:i,events:s}=n;if(!i||!s)return t;const a=this.isInterstitial(e),o=this.getBufferingPlayer();if(this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos)),!this.playbackDisabled){const u=o?o.remaining:t?t.end-this.timelinePos:0;this.log(`buffered to boundary ${Is(e)}`+(t?` (${u.toFixed(2)} remaining)`:"")),a?e.event.assetList.forEach(l=>{const f=this.getAssetPlayer(l.identifier);f&&f.resumeBuffering()}):(this.hls.resumeBuffering(),this.playerQueue.forEach(l=>l.pauseBuffering()))}this.hls.trigger(d.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:s.slice(0),schedule:i.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const i=this.detachedData;i?i.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,i=n.assetList.length===0&&!n.assetListLoader,s=n.cue.once;if(i||!s){const a=this.preloadAssets(n,t);if(a!=null&&a.interstitial.appendInPlace){const o=n.assetList[t],u=this.primaryMedia;o&&u&&this.bufferAssetPlayer(a,u)}}}preloadAssets(e,t){const n=e.assetUrl,i=e.assetList.length,s=i===0&&!e.assetListLoader,a=e.cue.once;if(s){const u=e.timelineStart;if(e.appendInPlace){var o;const E=this.playingItem;!this.isInterstitial(E)&&(E==null||(o=E.nextEvent)==null?void 0:o.identifier)===e.identifier&&this.flushFrontBuffer(u+.25)}let l,f=0;if(!this.playingItem&&this.primaryLive&&(f=this.hls.startPosition,f===-1&&(f=this.hls.liveSyncPosition||0)),f&&!(e.cue.pre||e.cue.post)){const E=f-u;E>0&&(l=Math.round(E*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:i} ${e}${l?` live-start: ${f} start-offset: ${l}`:""}`),n)return this.createAsset(e,0,0,u,e.duration,n);const h=this.assetListLoader.loadAssetList(e,l);h&&(e.assetListLoader=h)}else if(!a&&i){for(let u=t;u<i;u++){const l=e.assetList[u],f=this.getAssetPlayerQueueIndex(l.identifier);(f===-1||this.playerQueue[f].destroyed)&&!l.error&&this.createAssetPlayer(e,l,u)}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(i=>{this.hls.trigger(d.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:i})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,i,s,a){const o={parentIdentifier:e.identifier,identifier:mu(e,a,t),duration:s,startOffset:n,timelineStart:i,uri:a};return this.createAssetPlayer(e,o,t)}createAssetPlayer(e,t,n){this.log(`create HLSAssetPlayer for ${Xa(t)}`);const i=this.hls,s=i.userConfig;let a=s.videoPreference;const o=i.loadLevelObj||i.levels[i.currentLevel];(a||o)&&(a=p({},a),o.videoCodec&&(a.videoCodec=o.videoCodec),o.videoRange&&(a.allowedVideoRanges=[o.videoRange]));const u=i.audioTracks[i.audioTrack],l=i.subtitleTracks[i.subtitleTrack];let f=0;if(this.primaryLive||e.appendInPlace){const De=this.timelinePos-t.timelineStart;if(De>1){const rt=t.duration;rt&&De<rt&&(f=De)}}const h=t.identifier,E=B(B({},s),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:i.sessionId,assetPlayerId:h,abrEwmaDefaultEstimate:i.bandwidthEstimate,interstitialsController:void 0,startPosition:f,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:a,audioPreference:u||s.audioPreference,subtitlePreference:l||s.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(E.timelineOffset=t.timelineStart));const C=E.cmcd;C!=null&&C.sessionId&&C.contentId&&(E.cmcd=p({},C,{contentId:Ts(t.uri)})),this.getAssetPlayer(h)&&this.warn(`Duplicate date range identifier ${e} and asset ${h}`);const T=new Oo(this.HlsPlayerClass,E,e,t);this.playerQueue.push(T),e.assetList[n]=t;const J=De=>{if(De.live){const Lt=new Error(`Interstitials MUST be VOD assets ${e}`),dt={fatal:!0,type:we.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:Lt};this.handleAssetItemError(dt,e,this.schedule.findEventIndex(e.identifier),n,Lt.message);return}const rt=De.edge-De.fragmentStart,We=t.duration;(We===null||rt>We)&&(this.log(`Interstitial asset "${h}" duration change ${We} > ${rt}`),t.duration=rt,this.updateSchedule())};T.on(d.LEVEL_UPDATED,(De,{details:rt})=>J(rt)),T.on(d.LEVEL_PTS_UPDATED,(De,{details:rt})=>J(rt));const $=(De,rt)=>{const We=this.getAssetPlayer(h);if(We&&rt.tracks){We.off(d.BUFFER_CODECS,$),We.tracks=rt.tracks;const Lt=this.primaryMedia;this.bufferingAsset===We.assetItem&&Lt&&!We.media&&this.bufferAssetPlayer(We,Lt)}};T.on(d.BUFFER_CODECS,$);const _e=()=>{var De;const rt=this.getAssetPlayer(h);if(this.log(`buffered to end of asset ${rt}`),!rt)return;const We=this.schedule.findEventIndex(e.identifier),Lt=e.findAssetIndex(t),dt=Lt+1,_t=(De=this.schedule.items)==null?void 0:De[We];if(this.isInterstitial(_t))if(Lt!==-1&&!e.isAssetPastPlayoutLimit(dt)&&!e.assetList[dt].error)this.bufferedToItem(_t,dt);else{var jt;const xt=(jt=this.schedule.items)==null?void 0:jt[We+1];xt&&this.bufferedToItem(xt)}};T.on(d.BUFFERED_TO_END,_e);const Oe=De=>()=>{if(!this.getAssetPlayer(h))return;this.shouldPlay=!0;const We=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,We,De)};return T.once(d.MEDIA_ENDED,Oe(n)),T.once(d.PLAYOUT_LIMIT_REACHED,Oe(1/0)),T.on(d.ERROR,(De,rt)=>{const We=this.getAssetPlayer(h);if(rt.details===W.BUFFER_STALLED_ERROR){if(We!=null&&We.media){const Lt=We.currentTime,dt=We.duration-Lt;Lt&&e.appendInPlace&&dt/We.media.playbackRate<.5?(this.log(`Advancing buffer past end of asset ${h} ${e} at ${We.media.currentTime}`),_e()):(this.warn(`Stalled at ${Lt} of ${Lt+dt} in asset ${h} ${e}`),this.onTimeupdate(),this.checkBuffer(!0))}return}this.handleAssetItemError(rt,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${rt.error} ${e}`)}),T.on(d.DESTROYING,()=>{if(!this.getAssetPlayer(h))return;const rt=new Error(`Asset player destroyed unexpectedly ${h}`),We={fatal:!0,type:we.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:rt};this.handleAssetItemError(We,e,this.schedule.findEventIndex(e.identifier),n,rt.message)}),this.hls.trigger(d.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:T}),T}clearInterstitial(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)}),e.reset()}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){this.log(`clearAssetPlayer "${e}" toSegment: ${t&&Is(t)}`);const i=this.playerQueue[n];this.transferMediaFromPlayer(i,t),this.playerQueue.splice(n,1),i.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,i,s){const{interstitial:a,assetItem:o,assetId:u}=e,l=a.assetList.length,f=this.playingAsset;this.endedAsset=null,this.playingAsset=o,(!f||f.identifier!==u)&&(f&&(this.clearAssetPlayer(f.identifier,n[i]),delete f.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${l} ${e}`),this.hls.trigger(d.INTERSTITIAL_ASSET_STARTED,{asset:o,assetListIndex:t,event:a,schedule:n.slice(0),scheduleIndex:i,player:e})),this.bufferAssetPlayer(e,s)}bufferAssetPlayer(e,t){var n,i;const{interstitial:s,assetItem:a,assetId:o}=e,u=this.schedule.findEventIndex(s.identifier),l=(n=this.schedule.items)==null?void 0:n[u];if(!l)return;this.setBufferingItem(l),this.bufferingAsset=a;const f=this.getBufferingPlayer();if(f===e)return;const h=s.appendInPlace;if(h&&(f==null?void 0:f.interstitial.appendInPlace)===!1)return;const E=(f==null?void 0:f.tracks)||((i=this.detachedData)==null?void 0:i.tracks)||this.requiredTracks;if(h&&a!==this.playingAsset){if(!e.tracks)return;if(E&&!z(E,e.tracks)){const C=new Error(`Asset "${o}" SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(E)}')`),T={fatal:!0,type:we.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:C},J=s.findAssetIndex(a);this.handleAssetItemError(T,s,u,J,C.message);return}}this.transferMediaTo(e,t)}handleAssetItemError(e,t,n,i,s){if(e.details===W.BUFFER_STALLED_ERROR)return;const a=t.assetList[i]||null;let o=null;if(a){const h=this.getAssetPlayerQueueIndex(a.identifier);o=this.playerQueue[h]||null}const u=this.schedule.items,l=p({},e,{fatal:!1,errorAction:Ze(!0),asset:a,assetListIndex:i,event:t,schedule:u,scheduleIndex:n,player:o});if(this.warn(`Asset item error: ${e.error}`),this.hls.trigger(d.INTERSTITIAL_ASSET_ERROR,l),!e.fatal)return;const f=new Error(s);a&&(this.playingAsset!==a&&this.clearAssetPlayer(a.identifier,null),a.error=f),t.assetList.some(h=>!h.error)?t.appendInPlace&&(t.error=f):t.error=f,this.primaryFallback(t)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;if(this.updateSchedule(),n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${n?Is(n):"<none>"} error: ${e.error}`),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));let i=this.timelinePos;i===-1&&(i=this.hls.startPosition);const s=this.updateItem(n,i);if(this.itemsMatch(n,s))this.clearInterstitial(e,null);else{const a=this.schedule.findItemIndexAtTime(i);this.setSchedulePosition(a)}}else this.checkStart()}onAssetListLoaded(e,t){var n;const i=t.event,s=i.identifier,a=t.assetListResponse.ASSETS;if(!this.schedule.hasEvent(s))return;const o=i.timelineStart,u=i.duration;let l=0;a.forEach((T,J)=>{const $=parseFloat(T.DURATION);this.createAsset(i,J,l,o+l,$,T.URI),l+=$}),i.duration=l,this.log(`Loaded asset-list with duration: ${l} (was: ${u}) ${i}`);const f=this.waitingItem,h=(f==null?void 0:f.event.identifier)===s;this.updateSchedule();const E=(n=this.bufferingItem)==null?void 0:n.event;if(h){var C;const T=this.schedule.findEventIndex(s),J=(C=this.schedule.items)==null?void 0:C[T];if(J){if(!this.playingItem&&this.timelinePos>J.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==T){i.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${i}`),this.primaryFallback(i);return}this.setBufferingItem(J)}this.setSchedulePosition(T)}else if((E==null?void 0:E.identifier)===s&&E.appendInPlace){const T=i.assetList[0],J=this.getAssetPlayer(T.identifier),$=this.primaryMedia;T&&J&&$&&this.bufferAssetPlayer(J,$)}}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 n=t.interstitial;n&&this.primaryFallback(n);break}case W.BUFFER_STALLED_ERROR:{this.onTimeupdate(),this.checkBuffer(!0);break}}}}const No=500;class GA extends di{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",G.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(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(d.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(d.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(d.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(d.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(d.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(d.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Xt.IDLE,this.setInterval(No),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:i}=t;if(ue(n)&&(this.fragPrevious=n),this.state=Xt.IDLE,!i)return;const s=this.tracksBuffered[this.currentTrackId];if(!s)return;let a;const o=n.start;for(let l=0;l<s.length;l++)if(o>=s[l].start&&o<=s[l].end){a=s[l];break}const u=n.start+n.duration;a?a.end=u:(a={start:o,end:u},s.push(a)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:i}=t;if(n===0&&i!==Number.POSITIVE_INFINITY){const s=i-1;if(s<=0)return;t.endOffsetSubtitles=Math.max(0,s),this.tracksBuffered.forEach(a=>{for(let o=0;o<a.length;){if(a[o].end<=s){a.shift();continue}else if(a[o].start<s)a[o].start=s;else break;o++}}),this.fragmentTracker.removeFragmentsInRange(n,s,G.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===G.SUBTITLE&&(t.details===W.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Xt.STOPPED&&(this.state=Xt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&BA(this.levels,t)){this.levels=t.map(n=>new gn(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const i=new gn(n);return this.tracksBuffered[i.id]=[],i}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,G.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,!((n=this.levels)!=null&&n.length)||this.currentTrackId===-1){this.clearInterval();return}const i=this.levels[this.currentTrackId];i!=null&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.state!==Xt.STOPPED&&this.setInterval(No)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:i,levels:s}=this,{details:a,id:o}=t;if(!s){this.warn(`Subtitle tracks were reset while loading level ${o}`);return}const u=s[o];if(o>=s.length||!u)return;this.log(`Subtitle track ${o} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(a.live||(n=u.details)!=null&&n.live){const h=this.mainDetails;if(a.deltaUpdateFailed||!h)return;const E=h.fragments[0];if(!u.details)a.hasProgramDateTime&&h.hasProgramDateTime?(qr(a,h),l=a.fragmentStart):E&&(l=E.start,Ai(a,l));else{var f;l=this.alignPlaylists(a,u.details,(f=this.levelLastLoaded)==null?void 0:f.details),l===0&&E&&(l=E.start,Ai(a,l))}}u.details=a,this.levelLastLoaded=u,o===i&&(this.hls.trigger(d.SUBTITLE_TRACK_UPDATED,{details:a,id:o,groupId:t.groupId}),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===Xt.IDLE&&(Ct(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),u.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,i=t.decryptdata,s=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&i!=null&&i.key&&i.iv&&jr(i.method)){const a=performance.now();this.decrypter.decrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer,Jr(i.method)).catch(o=>{throw s.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:t}),o}).then(o=>{const u=performance.now();s.trigger(d.FRAG_DECRYPTED,{frag:t,payload:o,stats:{tstart:a,tdecrypt:u}})}).catch(o=>{this.warn(`${o.name}: ${o.message}`),this.state=Xt.IDLE})}}doTick(){if(!this.media){this.state=Xt.IDLE;return}if(this.state===Xt.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details||this.waitForLive(n))return;const{config:i}=this,s=this.getLoadPosition(),a=pn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],s,i.maxBufferHole),{end:o,len:u}=a,l=n.details,f=this.hls.maxBufferLength+l.levelTargetDuration;if(u>f)return;const h=l.fragments,E=h.length,C=l.edge;let T=null;const J=this.fragPrevious;if(o<C){const Oe=i.maxFragLookUpTolerance,De=o>C-Oe?0:Oe;T=Ct(J,h,Math.max(h[0].start,o),De),!T&&J&&J.start<h[0].start&&(T=h[0])}else T=h[E-1];if(T=this.filterReplacedPrimary(T,n.details),!T)return;const $=T.sn-l.startSN,_e=h[$-1];if(_e&&_e.cc===T.cc&&this.fragmentTracker.getState(_e)===ke.NOT_LOADED&&(T=_e),this.fragmentTracker.getState(T)===ke.NOT_LOADED){const Oe=this.mapToInitFragWhenRequired(T);Oe&&this.loadFragment(Oe,n,o)}}}loadFragment(e,t,n){ue(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new yu(this.tracksBuffered[this.currentTrackId]||[])}}class yu{constructor(e){this.buffered=void 0;const t=(n,i,s)=>{if(i=i>>>0,i>s-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${s})`);return e[i][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const Eu={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},Ks=r=>String.fromCharCode(Eu[r]||r),Vi=15,ri=100,Gs={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},ia={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Fs={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Ds={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ca=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class ys{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;ie.log(`${this.time} [${e}] ${n}`)}}}const Rs=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class Ho{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const i=t[n];e.hasOwnProperty(i)&&(this[i]=e[i])}}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 $A{constructor(){this.uchar=" ",this.penState=new Ho}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 Ko{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Ho,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<ri;t++)this.chars.push(new $A);this.logger=e}equals(e){for(let t=0;t<ri;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ri;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ri;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>ri&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ri)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Ks(e);if(this.pos>=ri){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<ri;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<ri;n++){const i=this.chars[n].uchar;i!==" "&&(t=!1),e.push(i)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class $s{constructor(e){this.rows=[],this.currRow=Vi-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Vi;t++)this.rows.push(new Ko(e));this.logger=e}reset(){for(let e=0;e<Vi;e++)this.rows[e].clear();this.currRow=Vi-1}equals(e){let t=!0;for(let n=0;n<Vi;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<Vi;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Vi;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 = "+sn(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let o=0;o<Vi;o++)this.rows[o].clear();const s=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){const o=a.rows[s].cueStartTime,u=this.logger.time;if(o!==null&&u!==null&&o<u)for(let l=0;l<this.nrRollUpRows;l++)this.rows[t-this.nrRollUpRows+l+1].copy(a.rows[s+l])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const s=e.indent,a=Math.max(s-1,0);n.setCursor(e.indent),e.color=n.chars[a].penState.foreground}const i={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(i)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+sn(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",i=-1;for(let s=0;s<Vi;s++){const a=this.rows[s].getTextString();a&&(i=s+1,e?t.push("Row "+i+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
`)),n}getTextAndFormat(){return this.rows}}class Go{constructor(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new $s(n),this.nonDisplayedMemory=new $s(n),this.lastOutputScreen=new $s(n),this.currRollUpRow=this.displayedMemory.rows[Vi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Vi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=i[n]}this.logger.log(2,"MIDROW: "+sn(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 $o{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Bu(),this.logger=void 0;const i=this.logger=new ys;this.channels=[null,new Go(e,t,i),new Go(e+1,n,i)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const i=t[n]&127,s=t[n+1]&127;let a=!1,o=null;if(i===0&&s===0)continue;this.logger.log(3,()=>"["+Rs([t[n],t[n+1]])+"] -> ("+Rs([i,s])+")");const u=this.cmdHistory;if(i>=16&&i<=31){if(wu(i,s,u)){Ls(null,null,u),this.logger.log(3,()=>"Repeated command ("+Rs([i,s])+") is dropped");continue}Ls(i,s,this.cmdHistory),a=this.parseCmd(i,s),a||(a=this.parseMidrow(i,s)),a||(a=this.parsePAC(i,s)),a||(a=this.parseBackgroundAttributes(i,s))}else Ls(null,null,u);if(!a&&(o=this.parseChars(i,s),o)){const f=this.currentChannel;f&&f>0?this.channels[f].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!a&&!o&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Rs([i,s])+" orig: "+Rs([t[n],t[n+1]]))}}parseCmd(e,t){const n=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,i=(e===23||e===31)&&t>=33&&t<=35;if(!(n||i))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 n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const i=this.channels[n];return i?(i.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+Rs([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const i=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,s=(e===16||e===24)&&t>=64&&t<=95;if(!(i||s))return!1;const a=e<=23?1:2;t>=64&&t<=95?n=a===1?Gs[e]:Fs[e]:n=a===1?ia[e]:Ds[e];const o=this.channels[a];return o?(o.setPAC(this.interpretPAC(n,t)),this.currentChannel=a,!0):!1}interpretPAC(e,t){let n;const i={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,i.underline=(n&1)===1,n<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(i.italics=!0,i.color="white"):i.indent=Math.floor((n-16)/2)*4,i}parseChars(e,t){let n,i=null,s=null;if(e>=25?(n=2,s=e-8):(n=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 '"+Ks(a)+"' in channel "+n),i=[a]}else e>=32&&e<=127&&(i=t===0?[e]:[e,t]);return i&&this.logger.log(3,()=>"Char codes = "+Rs(i).join(",")),i}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,i=(e===23||e===31)&&t>=45&&t<=47;if(!(n||i))return!1;let s;const a={};e===16||e===24?(s=Math.floor((t-32)/2),a.background=Ca[s],t%2===1&&(a.background=a.background+"_semi")):t===45?a.background="transparent":(a.foreground="black",t===47&&(a.underline=!0));const o=e<=23?1:2;return this.channels[o].setBkgData(a),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}Ls(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function Ls(r,e,t){t.a=r,t.b=e}function wu(r,e,t){return t.a===r&&t.b===e}function Bu(){return{a:null,b:null}}var Zo=function(){if(On!=null&&On.VTTCue)return self.VTTCue;const r=["","lr","rl"],e=["start","middle","end","left","right"];function t(o,u){if(typeof u!="string"||!Array.isArray(o))return!1;const l=u.toLowerCase();return~o.indexOf(l)?l:!1}function n(o){return t(r,o)}function i(o){return t(e,o)}function s(o,...u){let l=1;for(;l<arguments.length;l++){const f=arguments[l];for(const h in f)o[h]=f[h]}return o}function a(o,u,l){const f=this,h={enumerable:!0};f.hasBeenReset=!1;let E="",C=!1,T=o,J=u,$=l,_e=null,Oe="",De=!0,rt="auto",We="start",Lt=50,dt="middle",_t=50,jt="middle";Object.defineProperty(f,"id",s({},h,{get:function(){return E},set:function(xt){E=""+xt}})),Object.defineProperty(f,"pauseOnExit",s({},h,{get:function(){return C},set:function(xt){C=!!xt}})),Object.defineProperty(f,"startTime",s({},h,{get:function(){return T},set:function(xt){if(typeof xt!="number")throw new TypeError("Start time must be set to a number.");T=xt,this.hasBeenReset=!0}})),Object.defineProperty(f,"endTime",s({},h,{get:function(){return J},set:function(xt){if(typeof xt!="number")throw new TypeError("End time must be set to a number.");J=xt,this.hasBeenReset=!0}})),Object.defineProperty(f,"text",s({},h,{get:function(){return $},set:function(xt){$=""+xt,this.hasBeenReset=!0}})),Object.defineProperty(f,"region",s({},h,{get:function(){return _e},set:function(xt){_e=xt,this.hasBeenReset=!0}})),Object.defineProperty(f,"vertical",s({},h,{get:function(){return Oe},set:function(xt){const xn=n(xt);if(xn===!1)throw new SyntaxError("An invalid or illegal string was specified.");Oe=xn,this.hasBeenReset=!0}})),Object.defineProperty(f,"snapToLines",s({},h,{get:function(){return De},set:function(xt){De=!!xt,this.hasBeenReset=!0}})),Object.defineProperty(f,"line",s({},h,{get:function(){return rt},set:function(xt){if(typeof xt!="number"&&xt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");rt=xt,this.hasBeenReset=!0}})),Object.defineProperty(f,"lineAlign",s({},h,{get:function(){return We},set:function(xt){const xn=i(xt);if(!xn)throw new SyntaxError("An invalid or illegal string was specified.");We=xn,this.hasBeenReset=!0}})),Object.defineProperty(f,"position",s({},h,{get:function(){return Lt},set:function(xt){if(xt<0||xt>100)throw new Error("Position must be between 0 and 100.");Lt=xt,this.hasBeenReset=!0}})),Object.defineProperty(f,"positionAlign",s({},h,{get:function(){return dt},set:function(xt){const xn=i(xt);if(!xn)throw new SyntaxError("An invalid or illegal string was specified.");dt=xn,this.hasBeenReset=!0}})),Object.defineProperty(f,"size",s({},h,{get:function(){return _t},set:function(xt){if(xt<0||xt>100)throw new Error("Size must be between 0 and 100.");_t=xt,this.hasBeenReset=!0}})),Object.defineProperty(f,"align",s({},h,{get:function(){return jt},set:function(xt){const xn=i(xt);if(!xn)throw new SyntaxError("An invalid or illegal string was specified.");jt=xn,this.hasBeenReset=!0}})),f.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class Cu{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function ZA(r){function e(n,i,s,a){return(n|0)*3600+(i|0)*60+(s|0)+parseFloat(a||0)}const t=r.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 Vo{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let i=0;i<n.length;++i)if(t===n[i]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function VA(r,e,t,n){const i=n?r.split(n):[r];for(const s in i){if(typeof i[s]!="string")continue;const a=i[s].split(t);if(a.length!==2)continue;const o=a[0],u=a[1];e(o,u)}}const Wo=new Zo(0,0,""),qa=Wo.align==="middle"?"middle":"center";function bu(r,e,t){const n=r;function i(){const o=ZA(r);if(o===null)throw new Error("Malformed timestamp: "+n);return r=r.replace(/^[^\sa-zA-Z-]+/,""),o}function s(o,u){const l=new Vo;VA(o,function(E,C){let T;switch(E){case"region":for(let J=t.length-1;J>=0;J--)if(t[J].id===C){l.set(E,t[J].region);break}break;case"vertical":l.alt(E,C,["rl","lr"]);break;case"line":T=C.split(","),l.integer(E,T[0]),l.percent(E,T[0])&&l.set("snapToLines",!1),l.alt(E,T[0],["auto"]),T.length===2&&l.alt("lineAlign",T[1],["start",qa,"end"]);break;case"position":T=C.split(","),l.percent(E,T[0]),T.length===2&&l.alt("positionAlign",T[1],["start",qa,"end","line-left","line-right","auto"]);break;case"size":l.percent(E,C);break;case"align":l.alt(E,C,["start",qa,"end","left","right"]);break}},/:/,/\s/),u.region=l.get("region",null),u.vertical=l.get("vertical","");let f=l.get("line","auto");f==="auto"&&Wo.line===-1&&(f=-1),u.line=f,u.lineAlign=l.get("lineAlign","start"),u.snapToLines=l.get("snapToLines",!0),u.size=l.get("size",100),u.align=l.get("align",qa);let h=l.get("position","auto");h==="auto"&&Wo.position===50&&(h=u.align==="start"||u.align==="left"?0:u.align==="end"||u.align==="right"?100:50),u.position=h}function a(){r=r.replace(/^\s+/,"")}if(a(),e.startTime=i(),a(),r.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);r=r.slice(3),a(),e.endTime=i(),a(),s(r,e)}function WA(r){return r.replace(/<br(?: \/)?>/gi,`
`)}class zo{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Cu,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function n(){let s=t.buffer,a=0;for(s=WA(s);a<s.length&&s[a]!=="\r"&&s[a]!==`
`;)++a;const o=s.slice(0,a);return s[a]==="\r"&&++a,s[a]===`
`&&++a,t.buffer=s.slice(a),o}function i(s){VA(s,function(a,o){},/:/)}try{let s="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;s=n();const o=s.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[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=n(),t.state){case"HEADER":/:/.test(s)?i(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 Zo(0,0,""),t.state="CUE",s.indexOf("-->")===-1){t.cue.id=s;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{bu(s,t.cue,t.regionList)}catch(o){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const o=s.indexOf("-->")!==-1;if(!s||o&&(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 jo=/\r\n|\n\r|\n|\r/g,eo=function(e,t,n=0){return e.slice(n,n+t.length)===t},xu=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),i=parseInt(e.slice(-9,-7)),s=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!M(t)||!M(n)||!M(i)||!M(s))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*i,t+=60*60*1e3*s,t};function Yo(r,e,t){return Ts(r.toString())+Ts(e.toString())+Ts(t)}const zA=function(e,t,n){let i=e[t],s=e[i.prevCC];if(!s||!s.new&&i.new){e.ccOffset=e.presentationOffset=i.start,i.new=!1;return}for(;(a=s)!=null&&a.new;){var a;e.ccOffset+=i.start-s.start,i.new=!1,i=s,s=e[i.prevCC]}e.presentationOffset=n};function Su(r,e,t,n,i,s,a){const o=new zo,u=Fe(new Uint8Array(r)).trim().replace(jo,`
`).split(`
`),l=[],f=e?Ul(e.baseTime,e.timescale):0;let h="00:00.000",E=0,C=0,T,J=!0;o.oncue=function($){const _e=t[n];let Oe=t.ccOffset;const De=(E-f)/9e4;if(_e!=null&&_e.new&&(C!==void 0?Oe=t.ccOffset=_e.start:zA(t,n,De)),De){if(!e){T=new Error("Missing initPTS for VTT MPEGTS");return}Oe=De-t.presentationOffset}const rt=$.endTime-$.startTime,We=$i(($.startTime+Oe-C)*9e4,i*9e4)/9e4;$.startTime=Math.max(We,0),$.endTime=Math.max(We+rt,0);const Lt=$.text.trim();$.text=decodeURIComponent(encodeURIComponent(Lt)),$.id||($.id=Yo($.startTime,$.endTime,Lt)),$.endTime>0&&l.push($)},o.onparsingerror=function($){T=$},o.onflush=function(){if(T){a(T);return}s(l)},u.forEach($=>{if(J)if(eo($,"X-TIMESTAMP-MAP=")){J=!1,$.slice(16).split(",").forEach(_e=>{eo(_e,"LOCAL:")?h=_e.slice(6):eo(_e,"MPEGTS:")&&(E=parseInt(_e.slice(7)))});try{C=xu(h)/1e3}catch(_e){T=_e}return}else $===""&&(J=!1);o.parse($+`
`)}),o.flush()}const Xo="stpp.ttml.im1t",jA=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,YA=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Tu={left:"start",center:"center",right:"end",start:"start",end:"end"};function to(r,e,t,n){const i=g(new Uint8Array(r),["mdat"]);if(i.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const s=i.map(o=>Fe(o)),a=Ll(e.baseTime,1,e.timescale);try{s.forEach(o=>t(Iu(o,a)))}catch(o){n(o)}}function Iu(r,e){const i=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");const s={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(s).reduce((h,E)=>(h[E]=i.getAttribute(`ttp:${E}`)||s[E],h),{}),o=i.getAttribute("xml:space")!=="preserve",u=XA(ba(i,"styling","style")),l=XA(ba(i,"layout","region")),f=ba(i,"body","[begin]");return[].map.call(f,h=>{const E=ir(h,o);if(!E||!h.hasAttribute("begin"))return null;const C=Jo(h.getAttribute("begin"),a),T=Jo(h.getAttribute("dur"),a);let J=Jo(h.getAttribute("end"),a);if(C===null)throw Qi(h);if(J===null){if(T===null)throw Qi(h);J=C+T}const $=new Zo(C-e,J-e,E);$.id=Yo($.startTime,$.endTime,$.text);const _e=l[h.getAttribute("region")],Oe=u[h.getAttribute("style")],De=sa(_e,Oe,u),{textAlign:rt}=De;if(rt){const We=Tu[rt];We&&($.lineAlign=We),$.align=rt}return p($,De),$}).filter(h=>h!==null)}function ba(r,e,t){const n=r.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function XA(r){return r.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function ir(r,e){return[].slice.call(r.childNodes).reduce((t,n,i)=>{var s;return n.nodeName==="br"&&i?t+`
`:(s=n.childNodes)!=null&&s.length?ir(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function sa(r,e,t){const n="http://www.w3.org/ns/ttml#styling";let i=null;const s=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=r!=null&&r.hasAttribute("style")?r.getAttribute("style"):null;return a&&t.hasOwnProperty(a)&&(i=t[a]),s.reduce((o,u)=>{const l=aa(e,n,u)||aa(r,n,u)||aa(i,n,u);return l&&(o[u]=l),o},{})}function aa(r,e,t){return r&&r.hasAttributeNS(e,t)?r.getAttributeNS(e,t):null}function Qi(r){return new Error(`Could not parse ttml timestamp ${r}`)}function Jo(r,e){if(!r)return null;let t=ZA(r);return t===null&&(jA.test(r)?t=ei(r,e):YA.test(r)&&(t=li(r,e))),t}function ei(r,e){const t=jA.exec(r),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function li(r,e){const t=YA.exec(r),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class Zs{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class Fu{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=qA(),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(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(d.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(d.FRAG_LOADING,this.onFragLoading,this),e.on(d.FRAG_LOADED,this.onFragLoaded,this),e.on(d.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(d.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(d.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(d.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(d.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(d.FRAG_LOADING,this.onFragLoading,this),e.off(d.FRAG_LOADED,this.onFragLoaded,this),e.off(d.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(d.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(d.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(d.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new Zs(this,"textTrack1"),t=new Zs(this,"textTrack2"),n=new Zs(this,"textTrack3"),i=new Zs(this,"textTrack4");this.cea608Parser1=new $o(1,e,t),this.cea608Parser2=new $o(3,n,i)}addCues(e,t,n,i,s){let a=!1;for(let o=s.length;o--;){const u=s[o],l=no(u[0],u[1],t,n);if(l>=0&&(u[0]=Math.min(u[0],t),u[1]=Math.max(u[1],n),a=!0,l/(n-t)>.5))return}if(a||s.push([t,n]),this.config.renderTextTracksNatively){const o=this.captionsTracks[e];this.Cues.newCue(o,t,n,i)}else{const o=this.Cues.newCue(null,t,n,i);this.hls.trigger(d.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:i,timescale:s}){const{unparsedVttFrags:a}=this;n===G.MAIN&&(this.initPTS[t.cc]={baseTime:i,timescale:s}),a.length&&(this.unparsedVttFrags=[],a.forEach(o=>{this.onFragLoaded(d.FRAG_LOADED,o)}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let i=0;i<n.textTracks.length;i++){const s=n.textTracks[i];if(JA(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:n,media:i}=this,{label:s,languageCode:a}=t[e],o=this.getExistingTrack(s,a);if(o)n[e]=o,Hs(n[e]),Ba(n[e],i);else{const u=this.createTextTrack("captions",s,a);u&&(u[e]=!0,n[e]=u)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,i={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(d.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,t,n){const i=this.media;if(i)return i.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:i}=this;Object.keys(i).forEach(s=>{Hs(i[s]),delete i[s]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=qA(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let n=0;n<t.length;n++)Hs(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],i=n.some(s=>s.textCodec===Xo);if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(BA(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const a=this.media,o=a?_s(a.textTracks):null;if(this.tracks.forEach((u,l)=>{let f;if(o){let h=null;for(let E=0;E<o.length;E++)if(o[E]&&JA(o[E],u)){h=o[E],o[E]=null;break}h&&(f=h)}if(f)Hs(f);else{const h=xa(u);f=this.createTextTrack(h,u.name,u.lang),f&&(f.mode="disabled")}f&&this.textTracks.push(f)}),o!=null&&o.length){const u=o.filter(l=>l!==null).map(l=>l.label);u.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${u.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const a=this.tracks.map(o=>({label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}));this.hls.trigger(d.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:a})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const i=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!i)return;const s=`textTrack${i[1]}`,a=this.captionsProperties[s];a&&(a.label=n.name,n.lang&&(a.languageCode=n.lang),a.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===G.MAIN){var n,i;const{cea608Parser1:s,cea608Parser2:a,lastSn:o}=this,{cc:u,sn:l}=t.frag,f=(n=(i=t.part)==null?void 0:i.index)!=null?n:-1;s&&a&&(l!==o+1||l===o&&f!==this.lastPartIndex+1||u!==this.lastCc)&&(s.reset(),a.reset()),this.lastCc=u,this.lastSn=l,this.lastPartIndex=f}}onFragLoaded(e,t){const{frag:n,payload:i}=t;if(n.type===G.SUBTITLE)if(i.byteLength){const s=n.decryptdata,a="stats"in t;if(s==null||!s.encrypted||a){const o=this.tracks[n.level],u=this.vttCCs;u[n.cc]||(u[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),o&&o.textCodec===Xo?this._parseIMSC1(n,i):this._parseVTTs(t)}}else this.hls.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;to(t,this.initPTS[e.cc],i=>{this._appendCues(i,e.level),n.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},i=>{n.logger.log(`Failed to parse IMSC1: ${i}`),n.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:i})})}_parseVTTs(e){var t;const{frag:n,payload:i}=e,{initPTS:s,unparsedVttFrags:a}=this,o=s.length-1;if(!s[n.cc]&&o===-1){a.push(e);return}const u=this.hls,l=(t=n.initSegment)!=null&&t.data?Ye(n.initSegment.data,new Uint8Array(i)).buffer:i;Su(l,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,f=>{this._appendCues(f,n.level),u.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},f=>{const h=f.message==="Missing initPTS for VTT MPEGTS";h?a.push(e):this._fallbackToIMSC1(n,i),u.logger.log(`Failed to parse VTT cue: ${f}`),!(h&&o>n.cc)&&u.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:f})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||to(t,this.initPTS[e.cc],()=>{n.textCodec=Xo,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||i.mode==="disabled")return;e.forEach(s=>Uo(i,s))}else{const i=this.tracks[t];if(!i)return;const s=i.default?"default":"subtitles"+t;n.trigger(d.CUES_PARSED,{type:"subtitles",cues:e,track:s})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===G.SUBTITLE&&this.onFragLoaded(d.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:i}=t;if(!(n.type===G.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let s=0;s<i.length;s++){const a=i[s].bytes;if(a){this.cea608Parser1||this.initCea608Parsers();const o=this.extractCea608Data(a);this.cea608Parser1.addData(i[s].pts,o[0]),this.cea608Parser2.addData(i[s].pts,o[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:i,type:s}){const{media:a}=this;if(!(!a||a.currentTime<n)){if(!s||s==="video"){const{captionsTracks:o}=this;Object.keys(o).forEach(u=>ko(o[u],t,n))}if(this.config.renderTextTracksNatively&&t===0&&i!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(u=>ko(o[u],t,i))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let i=2;for(let s=0;s<n;s++){const a=e[i++],o=127&e[i++],u=127&e[i++];if(o===0&&u===0)continue;if((4&a)!==0){const f=3&a;(f===0||f===1)&&(t[f].push(o),t[f].push(u))}}return t}}function xa(r){return r.characteristics&&/transcribes-spoken-dialog/gi.test(r.characteristics)&&/describes-music-and-sound/gi.test(r.characteristics)?"captions":"subtitles"}function JA(r,e){return!!r&&r.kind===xa(e)&&Bo(e,r)}function no(r,e,t,n){return Math.min(e,n)-Math.max(r,t)}function qA(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const Du=/\s/,el={newCue(r,e,t,n){const i=[];let s,a,o,u,l;const f=self.VTTCue||self.TextTrackCue;for(let E=0;E<n.rows.length;E++)if(s=n.rows[E],o=!0,u=0,l="",!s.isEmpty()){var h;for(let J=0;J<s.chars.length;J++)Du.test(s.chars[J].uchar)&&o?u++:(l+=s.chars[J].uchar,o=!1);s.cueStartTime=e,e===t&&(t+=1e-4),u>=16?u--:u++;const C=WA(l.trim()),T=Yo(e,t,C);r!=null&&(h=r.cues)!=null&&h.getCueById(T)||(a=new f(e,t,C),a.id=T,a.line=E+1,a.align="left",a.position=10+Math.min(80,Math.floor(u*8/32)*10),i.push(a))}return r&&i.length&&(i.sort((E,C)=>E.line==="auto"||C.line==="auto"?0:E.line>8&&C.line>8?C.line-E.line:E.line-C.line),i.forEach(E=>Uo(r,E))),i}};function Ru(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(r){}return!1}const tl=/(\d+)-(\d+)\/(\d+)/;class nl{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||sl,this.controller=new self.AbortController,this.stats=new _}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const s=rl(e,this.controller.signal),a=e.responseType==="arraybuffer",o=a?"byteLength":"length",{maxTimeToFirstByteMs:u,maxLoadTimeMs:l}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,s),self.clearTimeout(this.requestTimeout),t.timeout=u&&M(u)?u:l,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(i,e,this.response))},t.timeout),(Qs(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(h=>{var E;this.response=this.loader=h;const C=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=l,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(i,e,this.response))},l-(C-i.loading.start)),!h.ok){const{status:J,statusText:$}=h;throw new Lu($||"fetch, bad network response",J,h)}i.loading.first=C,i.total=qo(h.headers)||i.total;const T=(E=this.callbacks)==null?void 0:E.onProgress;return T&&M(t.highWaterMark)?this.loadProgressively(h,i,e,t.highWaterMark,T):a?h.arrayBuffer():e.responseType==="json"?h.json():h.text()}).then(h=>{var E,C;const T=this.response;if(!T)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const J=h[o];J&&(i.loaded=i.total=J);const $={url:T.url,data:h,code:T.status},_e=(E=this.callbacks)==null?void 0:E.onProgress;_e&&!M(t.highWaterMark)&&_e(i,e,h,T),(C=this.callbacks)==null||C.onSuccess($,i,e,T)}).catch(h=>{var E;if(self.clearTimeout(this.requestTimeout),i.aborted)return;const C=h&&h.code||0,T=h?h.message:null;(E=this.callbacks)==null||E.onError({code:C,text:T},e,h?h.details:null,i)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,i=0,s){const a=new Ii,o=e.body.getReader(),u=()=>o.read().then(l=>{if(l.done)return a.dataLength&&s(t,n,a.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const f=l.value,h=f.length;return t.loaded+=h,h<i||a.dataLength?(a.push(f),a.dataLength>=i&&s(t,n,a.flush().buffer,e)):s(t,n,f.buffer,e),u()}).catch(()=>Promise.reject());return u()}}function rl(r,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(p({},r.headers))};return r.rangeEnd&&t.headers.set("Range","bytes="+r.rangeStart+"-"+String(r.rangeEnd-1)),t}function il(r){const e=tl.exec(r);if(e)return parseInt(e[2])-parseInt(e[1])+1}function qo(r){const e=r.get("Content-Range");if(e){const n=il(e);if(M(n))return n}const t=r.get("Content-Length");if(t)return parseInt(t)}function sl(r,e){return new self.Request(r.url,e)}class Lu extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const al=/^age:\s*[\d.]+\s*$/im;class ol{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 _,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const s=this.xhrSetup;s?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return s(n,t.url)}).catch(a=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),s(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(a=>{var o;(o=this.callbacks)==null||o.onError({code:n.status,text:a.message},t,n,i)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const i=t.headers,{maxTimeToFirstByteMs:s,maxLoadTimeMs:a}=n.loadPolicy;if(i)for(const o in i)e.setRequestHeader(o,i[o]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=s&&M(s)?s:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const i=t.readyState,s=this.config;if(!n.aborted&&i>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.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-(n.loading.first-n.loading.start)))),i===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const l=t.status,f=t.responseType==="text"?t.responseText:null;if(l>=200&&l<300){const T=f!=null?f:t.response;if(T!=null){var a,o;n.loading.end=Math.max(self.performance.now(),n.loading.first);const J=t.responseType==="arraybuffer"?T.byteLength:T.length;n.loaded=n.total=J,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const $=(a=this.callbacks)==null?void 0:a.onProgress;$&&$(n,e,T,t);const _e={url:t.responseURL,data:T,code:l};(o=this.callbacks)==null||o.onSuccess(_e,n,e,t);return}}const h=s.loadPolicy.errorRetry,E=n.retry,C={url:e.url,data:void 0,code:l};if(Kt(h,E,!1,C))this.retry(h);else{var u;ie.error(`${l} while loading ${e.url}`),(u=this.callbacks)==null||u.onError({code:l,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Kt(e,t,!0))this.retry(e);else{var n;ie.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=lt(e,n.retry),n.retry++,ie.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&al.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 Uu={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},ku=B(B({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:ol,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:mn,bufferController:$l,capLevelController:xo,errorController:Ve,fpsController:gu,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:hn,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:Uu},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},ro()),{},{subtitleStreamController:GA,subtitleTrackController:Po,timelineController:Fu,audioStreamController:Nl,audioTrackController:Hl,emeController:Ns,cmcdController:Va,contentSteeringController:MA,interstitialsController:_u});function ro(){return{cueHandler:el,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 Wi(r,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=io(r),i=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return i.forEach(a=>{const o=`${a==="level"?"playlist":a}LoadPolicy`,u=e[o]===void 0,l=[];s.forEach(f=>{const h=`${a}Loading${f}`,E=e[h];if(E!==void 0&&u){l.push(h);const C=n[o].default;switch(e[o]={default:C},f){case"TimeOut":C.maxLoadTimeMs=E,C.maxTimeToFirstByteMs=E;break;case"MaxRetry":C.errorRetry.maxNumRetry=E,C.timeoutRetry.maxNumRetry=E;break;case"RetryDelay":C.errorRetry.retryDelayMs=E,C.timeoutRetry.retryDelayMs=E;break;case"MaxRetryTimeout":C.errorRetry.maxRetryDelayMs=E,C.timeoutRetry.maxRetryDelayMs=E;break}}}),l.length&&t.warn(`hls.js config: "${l.join('", "')}" setting(s) are deprecated, use "${o}": ${sn(e[o])}`)}),B(B({},n),e)}function io(r){return r&&typeof r=="object"?Array.isArray(r)?r.map(io):Object.keys(r).reduce((e,t)=>(e[t]=io(r[t]),e),{}):r}function so(r,e){const t=r.loader;t!==nl&&t!==ol?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),r.progressive=!1):Ru()&&(r.loader=nl,r.progressive=!0,r.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const ao=2,Pu=.1,eA=.05,oa=100;class oo extends _n{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 n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(d.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.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(oa),this.mediaSource=t.mediaSource;const n=this.media=t.media;Zi(n,"playing",this.onMediaPlaying),Zi(n,"waiting",this.onMediaWaiting),Zi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(ts(n,"playing",this.onMediaPlaying),ts(n,"waiting",this.onMediaWaiting),ts(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,i;const s=(n=this.hls)==null?void 0:n.config;if(!s)return;const{media:a,stalled:o}=this;if(!a)return;const{seeking:u}=a,l=this.seeking&&!u,f=!this.seeking&&u,h=a.paused&&!u||a.ended||a.playbackRate===0;if(this.seeking=u,e!==t){t&&(this.ended=0),this.moved=!0,u||(this.nudgeRetry=0,s.nudgeOnVideoHole&&!h&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(f||l){l&&this.stallResolved(e);return}if(h){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&a.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(d.MEDIA_ENDED,{stalled:!1}));return}if(!pn.getBuffered(a).length){this.nudgeRetry=0;return}const E=pn.bufferInfo(a,e,0),C=E.nextStart||0,T=this.fragmentTracker;if(u&&T&&this.hls){const Lt=Al(this.hls.inFlightFragments,e),dt=E.len>ao,_t=!C||Lt||C-e>ao&&!T.getPartialFragment(e);if(dt||_t)return;this.moved=!1}const J=(i=this.hls)==null?void 0:i.latestLevelDetails;if(!this.moved&&this.stalled!==null&&T){if(!(E.len>0)&&!C)return;const dt=Math.max(C,E.start||0)-e,jt=!!(J!=null&&J.live)?J.targetduration*2:ao,xt=T.getPartialFragment(e);if(dt>0&&(dt<=jt||xt)){a.paused||this._trySkipBufferHole(xt);return}}const $=s.detectStallWithCurrentTimeMs,_e=self.performance.now(),Oe=this.waiting;if(o===null){Oe>0&&_e-Oe<$?this.stalled=Oe:this.stalled=_e;return}const De=_e-o;if(!u&&(De>=$||Oe)&&this.hls){var rt;if(((rt=this.mediaSource)==null?void 0:rt.readyState)==="ended"&&!(J!=null&&J.live)&&Math.abs(e-((J==null?void 0:J.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(d.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(E),!this.media||!this.hls)return}const We=pn.bufferInfo(a,e,s.maxBufferHole);this._tryFixBufferStall(We,De)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(d.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const i=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&i&&i.length>1&&e>i.end(0)){const s=pn.bufferedInfo(pn.timeRangesToArray(this.buffered.audio),e,0);if(s.len>1&&t>=s.start){const a=pn.timeRangesToArray(i),o=pn.bufferedInfo(a,t,0).bufferedIndex;if(o>-1&&o<a.length-1){const u=pn.bufferedInfo(a,e,0).bufferedIndex,l=a[o].end,f=a[o+1].start;if((u===-1||u>o)&&f-l<1&&e-l<2){const h=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${l} -> ${f} buffered index: ${u}`);this.warn(h.message),this.media.currentTime+=1e-6;const E=this.fragmentTracker.getPartialFragment(e)||void 0,C=pn.bufferInfo(this.media,e,0);this.hls.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:h,reason:h.message,frag:E,buffer:C.len,bufferInfo:C})}}}}}_tryFixBufferStall(e,t){var n,i;const{fragmentTracker:s,media:a}=this,o=(n=this.hls)==null?void 0:n.config;if(!a||!s||!o)return;const u=a.currentTime,l=(i=this.hls)==null?void 0:i.latestLevelDetails,f=s.getPartialFragment(u);if((f||l!=null&&l.live&&u<l.fragmentStart)&&(this._trySkipBufferHole(f)||!this.media))return;const h=e.buffered;(h&&h.length>1&&e.len>o.maxBufferHole||e.nextStart&&e.nextStart-u<o.maxBufferHole)&&(t>o.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}_reportStall(e){const{hls:t,media:n,stallReported:i,stalled:s}=this;if(!i&&s!==null&&n&&t){this.stallReported=!0;const a=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${sn(e)})`);this.warn(a.message),t.trigger(d.ERROR,{type:we.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:n,media:i}=this,s=(t=this.hls)==null?void 0:t.config;if(!i||!n||!s)return 0;const a=i.currentTime,o=pn.bufferInfo(i,a,0),u=a<o.start?o.start:o.nextStart;if(u&&this.hls){const f=o.len<=s.maxBufferHole,h=o.len>0&&o.len<1&&i.readyState<3,E=u-a;if(E>0&&(f||h)){if(E>s.maxBufferHole){let T=!1;if(a===0){const J=n.getAppendedFrag(0,G.MAIN);J&&u<J.end&&(T=!0)}if(!T){const J=e||n.getAppendedFrag(a,G.MAIN);if(J){var l;if(!((l=this.hls.loadLevelObj)!=null&&l.details)||Al(this.hls.inFlightFragments,u))return 0;let _e=!1,Oe=J.end;for(;Oe<u;){const De=n.getPartialFragment(Oe);if(De)Oe+=De.duration;else{_e=!0;break}}if(_e)return 0}}}const C=Math.max(u+eA,a+Pu);if(this.warn(`skipping hole, adjusting currentTime from ${a} to ${C}`),this.moved=!0,i.currentTime=C,!(e!=null&&e.gap)){const T=new Error(`fragment loaded with buffer holes, seeking from ${a} to ${C}`);this.hls.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:T,reason:T.message,frag:e||void 0,buffer:o.len,bufferInfo:o})}return C}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:i}=this,s=t==null?void 0:t.config;if(!n||!s)return 0;const a=n.currentTime;if(this.nudgeRetry++,i<s.nudgeMaxRetry){const o=a+(i+1)*s.nudgeOffset,u=new Error(`Nudging 'currentTime' from ${a} to ${o}`);this.warn(u.message),n.currentTime=o,t.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.BUFFER_NUDGE_ON_STALL,error:u,fatal:!1,buffer:e.len,bufferInfo:e})}else{const o=new Error(`Playhead still not moving while enough data buffered @${a} after ${s.nudgeMaxRetry} nudges`);this.error(o.message),t.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.BUFFER_STALLED_ERROR,error:o,fatal:!0,buffer:e.len,bufferInfo:e})}}}function Al(r,e){const t=Vs(r.main);if(t&&t.start<=e)return t;const n=Vs(r.audio);return n&&n.start<=e?n:null}function Vs(r){if(!r)return null;switch(r.state){case Xt.IDLE:case Xt.STOPPED:case Xt.ENDED:case Xt.ERROR:return null}return r.frag}const Ou=.25;function tA(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function nA(r,e,t,n,i){let s=new r(e,t,"");try{s.value=n,i&&(s.type=i)}catch(a){s=new r(e,t,sn(i?B({type:i},n):n))}return s}const Ao=(()=>{const r=tA();try{r&&new r(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function ll(r){return Uint8Array.from(r.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class Qu{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(d.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(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(d.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(d.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){const e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&Hs(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return Ba(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:i}}}=this;if(!n&&!i)return;const{samples:s}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=tA();if(a)for(let o=0;o<s.length;o++){const u=s[o].type;if(u===bi.emsg&&!n||!i)continue;const l=fo(s[o].data);if(l){const f=s[o].pts;let h=f+s[o].duration;h>Ao&&(h=Ao),h-f<=0&&(h=f+Ou);for(let C=0;C<l.length;C++){const T=l[C];if(!aA(T)){this.updateId3CueEnds(f,u);const J=nA(a,f,h,T,u);J&&this.id3Track.addCue(J)}}}}}updateId3CueEnds(e,t){var n;const i=(n=this.id3Track)==null?void 0:n.cues;if(i)for(let s=i.length;s--;){const a=i[s];a.type===t&&a.startTime<e&&a.endTime===Ao&&(a.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:i}){const{id3Track:s,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:u}}=a;if(s&&(o||u)){let l;i==="audio"?l=f=>f.type===bi.audioId3&&u:i==="video"?l=f=>f.type===bi.emsg&&o:l=f=>f.type===bi.audioId3&&u||f.type===bi.emsg&&o,ko(s,t,n,l)}}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:n}=this,{dateRanges:i}=e,s=Object.keys(i);let a=this.dateRangeCuesAppended;if(n&&t){var o;if((o=n.cues)!=null&&o.length){const f=Object.keys(a).filter(h=>!s.includes(h));for(let h=f.length;h--;){const E=f[h],C=a[E].cues;delete a[E],Object.keys(C).forEach(T=>{try{const J=C[T];J.removeEventListener("enter",this.onEventCueEnter),n.removeCue(J)}catch(J){}})}}else a=this.dateRangeCuesAppended={}}const u=e.fragments[e.fragments.length-1];if(s.length===0||!M(u==null?void 0:u.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const l=tA();for(let f=0;f<s.length;f++){const h=s[f],E=i[h],C=E.startTime,T=a[h],J=(T==null?void 0:T.cues)||{};let $=(T==null?void 0:T.durationKnown)||!1,_e=Ao;const{duration:Oe,endDate:De}=E;if(De&&Oe!==null)_e=C+Oe,$=!0;else if(E.endOnNext&&!$){const We=s.reduce((Lt,dt)=>{if(dt!==E.id){const _t=i[dt];if(_t.class===E.class&&_t.startDate>E.startDate&&(!Lt||E.startDate<Lt.startDate))return _t}return Lt},null);We&&(_e=We.startTime,$=!0)}const rt=Object.keys(E.attr);for(let We=0;We<rt.length;We++){const Lt=rt[We];if(!lr(Lt))continue;const dt=J[Lt];if(dt)$&&!T.durationKnown?dt.endTime=_e:Math.abs(dt.startTime-C)>.01&&(dt.startTime=C,dt.endTime=_e);else if(l){let _t=E.attr[Lt];pr(Lt)&&(_t=ll(_t));const xt=nA(l,C,_e,{key:Lt,data:_t},bi.dateRange);xt&&(xt.id=h,this.id3Track.addCue(xt),J[Lt]=xt,this.hls.config.interstitialsController&&(Lt==="X-ASSET-LIST"||Lt==="X-ASSET-URL")&&xt.addEventListener("enter",this.onEventCueEnter))}}a[h]={cues:J,dateRange:E,durationKnown:$}}}}class Mu{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const i=this.computeLatency();if(i===null)return;this._latency=i;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:a}=this.config;if(!s||a===1||!n.live)return;const o=this.targetLatency;if(o===null)return;const u=i-o,l=Math.min(this.maxLatency,o+n.targetduration);if(u<l&&u>.05&&this.forwardBufferLength>1){const h=Math.min(2,Math.max(1,a)),E=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20,C=Math.min(h,Math.max(1,E));this.changeMediaPlaybackRate(t,C)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:i}=e,{liveSyncDuration:s,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,u=this.hls.userConfig;let l=o&&n||t;(this._targetLatencyUpdated||u.liveSyncDuration||u.liveSyncDurationCount||l===0)&&(l=s!==void 0?s:a*i);const f=i;return l+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,f)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const n=this.levelDetails;if(n===null)return null;const i=n.edge,s=e-t-this.edgeStalled,a=i-n.totalduration,o=i-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,s),o)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(d.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(d.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===W.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(n=this.levelDetails)!=null&&n.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var n,i;e.playbackRate!==t&&((n=this.hls)==null||n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(i=this.targetLatency)==null?void 0:i.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 Nu extends wo{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(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this),e.on(d.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this),e.off(d.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,i=[],s={},a={};let o=!1,u=!1,l=!1;t.levels.forEach(f=>{var h;const E=f.attrs;let{audioCodec:C,videoCodec:T}=f;C&&(f.audioCodec=C=$t(C,n)||void 0),((h=T)==null?void 0:h.indexOf("avc1"))===0&&(T=f.videoCodec=tr(T));const{width:J,height:$,unknownCodecs:_e}=f;let Oe=_e?_e.length:0;if(_e)for(let xn=Oe;xn--;){const bn=_e[xn];this.isAudioSupported(bn)?(f.audioCodec=C=C?`${C},${bn}`:bn,Oe--,cn.audio[C.substring(0,4)]=2):this.isVideoSupported(bn)&&(f.videoCodec=T=T?`${T},${bn}`:bn,Oe--,cn.video[T.substring(0,4)]=2)}if(o||(o=!!(J&&$)),u||(u=!!T),l||(l=!!C),Oe||C&&!this.isAudioSupported(C)||T&&!this.isVideoSupported(T)){this.log(`Some or all CODECS not supported "${E.CODECS}"`);return}const{CODECS:De,"FRAME-RATE":rt,"HDCP-LEVEL":We,"PATHWAY-ID":Lt,RESOLUTION:dt,"VIDEO-RANGE":_t}=E,xt=`${`${Lt||"."}-`}${f.bitrate}-${dt}-${rt}-${De}-${_t}-${We}`;if(s[xt])if(s[xt].uri!==f.url&&!f.attrs["PATHWAY-ID"]){const xn=a[xt]+=1;f.attrs["PATHWAY-ID"]=new Array(xn+1).join(".");const bn=this.createLevel(f);s[xt]=bn,i.push(bn)}else s[xt].addGroupId("audio",E.AUDIO),s[xt].addGroupId("text",E.SUBTITLES);else{const xn=this.createLevel(f);s[xt]=xn,a[xt]=1,i.push(xn)}}),this.filterAndSortMediaOptions(i,t,o,u,l)}createLevel(e){const t=new gn(e),n=e.supplemental;if(n!=null&&n.videoCodec&&!this.isVideoSupported(n.videoCodec)){const i=new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);this.log(i.message),t.supportedResult=fr(i,[])}return t}isAudioSupported(e){return Ke(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Ke(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,i,s){let a=[],o=[],u=e;if((n||i)&&s&&(u=u.filter(({videoCodec:$,videoRange:_e,width:Oe,height:De})=>(!!$||!!(Oe&&De))&&Mt(_e))),u.length===0){Promise.resolve().then(()=>{if(this.hls){let $="no level with compatible codecs found in manifest",_e=$;t.levels.length&&(_e=`one or more CODECS in variant not supported: ${sn(t.levels.map(De=>De.attrs.CODECS).filter((De,rt,We)=>We.indexOf(De)===rt))}`,this.warn(_e),$+=` (${_e})`);const Oe=new Error($);this.hls.trigger(d.ERROR,{type:we.MEDIA_ERROR,details:W.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:Oe,reason:_e})}});return}t.audioTracks&&(a=t.audioTracks.filter($=>!$.audioCodec||this.isAudioSupported($.audioCodec)),ul(a)),t.subtitles&&(o=t.subtitles,ul(o));const l=u.slice(0);u.sort(($,_e)=>{if($.attrs["HDCP-LEVEL"]!==_e.attrs["HDCP-LEVEL"])return($.attrs["HDCP-LEVEL"]||"")>(_e.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&$.height!==_e.height)return $.height-_e.height;if($.frameRate!==_e.frameRate)return $.frameRate-_e.frameRate;if($.videoRange!==_e.videoRange)return qt.indexOf($.videoRange)-qt.indexOf(_e.videoRange);if($.videoCodec!==_e.videoCodec){const Oe=Ee($.videoCodec),De=Ee(_e.videoCodec);if(Oe!==De)return De-Oe}if($.uri===_e.uri&&$.codecSet!==_e.codecSet){const Oe=ve($.codecSet),De=ve(_e.codecSet);if(Oe!==De)return De-Oe}return $.averageBitrate!==_e.averageBitrate?$.averageBitrate-_e.averageBitrate:0});let f=l[0];if(this.steering&&(u=this.steering.filterParsedLevels(u),u.length!==l.length)){for(let $=0;$<l.length;$++)if(l[$].pathwayId===u[0].pathwayId){f=l[$];break}}this._levels=u;for(let $=0;$<u.length;$++)if(u[$]===f){var h;this._firstLevel=$;const _e=f.bitrate,Oe=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${u.length} level(s) found, first bitrate: ${_e}`),((h=this.hls.userConfig)==null?void 0:h.abrEwmaDefaultEstimate)===void 0){const De=Math.min(_e,this.hls.config.abrEwmaDefaultEstimateMax);De>Oe&&Oe===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=De)}break}const E=s&&!i,C=this.hls.config,T=!!(C.audioStreamController&&C.audioTrackController),J={levels:u,audioTracks:a,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:i,altAudio:T&&!E&&a.some($=>!!$.url)};this.hls.trigger(d.MANIFEST_PARSED,J)}get levels(){return this._levels.length===0?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const f=new Error("invalid level idx"),h=e<0;if(this.hls.trigger(d.ERROR,{type:we.OTHER_ERROR,details:W.LEVEL_SWITCH_ERROR,level:e,fatal:h,error:f,reason:f.message}),h)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,i=this.currentLevel,s=i?i.attrs["PATHWAY-ID"]:void 0,a=t[e],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,n===e&&i&&s===o)return;this.log(`Switching to level ${e} (${a.height?a.height+"p ":""}${a.videoRange?a.videoRange+" ":""}${a.codecSet?a.codecSet+" ":""}@${a.bitrate})${o?" with Pathway "+o:""} from level ${n}${s?" with Pathway "+s:""}`);const u={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(d.LEVEL_SWITCHING,u);const l=a.details;if(!l||l.live){const f=this.switchParams(a.uri,i==null?void 0:i.details,l);this.loadPlaylist(f)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),n=e.filter(i=>t.indexOf(i)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=n}}onError(e,t){t.fatal||!t.context||t.context.type===ye.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===G.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(s=>!!n[s]))return;const i=this._levels[t.level];i!=null&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var n;const{level:i,details:s}=t,a=t.levelInfo;if(!a){var o;this.warn(`Invalid level index ${i}`),(o=t.deliveryDirectives)!=null&&o.skip&&(s.deltaUpdateFailed=!0);return}if(a===this.currentLevel||t.withoutMultiVariant){a.fragmentError===0&&(a.loadError=0);let u=a.details;u===t.details&&u.advanced&&(u=void 0),this.playlistLoaded(i,t,u)}else(n=t.deliveryDirectives)!=null&&n.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 n=this.getUrlWithDirectives(e.uri,t),i=this.currentLevelIndex,s=e.attrs["PATHWAY-ID"],a=e.details,o=a==null?void 0:a.age;this.log(`Loading level index ${i}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${s?" Pathway "+s:""}${o&&a.live?" age "+o.toFixed(1)+(a.type?" "+a.type||0:""):""} ${n}`),this.hls.trigger(d.LEVEL_LOADING,{url:n,level:i,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const n=this._levels.filter((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(o=>o.level=-1)),!1));qi(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const i=n.length-1;this._firstLevel=Math.min(this._firstLevel,i),this._startLevel&&(this._startLevel=Math.min(this._startLevel,i)),this.hls.trigger(d.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(d.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function ul(r){const e={};r.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function cl(){return self.SourceBuffer||self.WebKitSourceBuffer}function fl(){if(!q())return!1;const e=cl();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Hu(){if(!fl())return!1;const r=q();return typeof(r==null?void 0:r.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>r.isTypeSupported(le(e,"video")))||["mp4a.40.2","fLaC"].some(e=>r.isTypeSupported(le(e,"audio"))))}function Ku(){var r;const e=cl();return typeof(e==null||(r=e.prototype)==null?void 0:r.changeType)=="function"}const Gu=100;class $u extends di{constructor(e,t,n){super(e,t,n,"stream-controller",G.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 i=this.media,s=i?i.currentTime:null;if(s===null||!M(s)||(this.log(`Media seeked to ${s.toFixed(3)}`),!this.getBufferedFrag(s)))return;const a=this.getFwdBufferInfoAtPos(i,s,G.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(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.LEVEL_LOADING,this.onLevelLoading,this),e.on(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(d.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(d.BUFFER_CREATED,this.onBufferCreated,this),e.on(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(d.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(d.BUFFER_CREATED,this.onBufferCreated,this),e.off(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:i}=this;if(this.stopLoad(),this.setInterval(Gu),this.level=-1,!this.startFragRequested){let s=i.startLevel;s===-1&&(i.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=i.firstAutoLevel),i.nextLoadLevel=s,this.level=i.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=Xt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Xt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Xt.WAITING_LEVEL:{const{levels:t,level:n}=this,i=t==null?void 0:t[n],s=i==null?void 0:i.details;if(s&&(!s.live||this.levelLastLoaded===i&&!this.waitForLive(i))){if(this.waitForCdnTuneIn(s))break;this.state=Xt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Xt.IDLE;break}break}case Xt.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:i,level:s}=this,a=i==null?void 0:i[s];this.resetStartWhenNotLoaded(a||null),this.state=Xt.IDLE}}break}this.state===Xt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:i}=this;if(t===null||!i&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const s=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[s]))return;const a=n[s],o=this.getMainFwdBufferInfo();if(o===null)return;const u=this.getLevelDetails();if(u&&this._streamEnded(o,u)){const J={};this.altAudio===2&&(J.type="video"),this.hls.trigger(d.BUFFER_EOS,J),this.state=Xt.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 l=a.details;if(!l||this.state===Xt.WAITING_LEVEL||this.waitForLive(a)){this.level=s,this.state=Xt.WAITING_LEVEL,this.startFragRequested=!1;return}const f=o.len,h=this.getMaxBufferLength(a.maxBitrate);if(f>=h)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const E=this.backtrackFragment?this.backtrackFragment.start:o.end;let C=this.getNextFragment(E,l);if(this.couldBacktrack&&!this.fragPrevious&&C&&ue(C)&&this.fragmentTracker.getState(C)!==ke.OK){var T;const $=((T=this.backtrackFragment)!=null?T:C).sn-l.startSN,_e=l.fragments[$-1];_e&&C.cc===_e.cc&&(C=_e,this.fragmentTracker.removeFragment(_e))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(C&&this.isLoopLoading(C,E)){if(!C.gap){const $=this.audioOnly&&!this.altAudio?y.AUDIO:y.VIDEO,_e=($===y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;_e&&this.afterBufferFlushed(_e,$,G.MAIN)}C=this.getNextFragmentLoopLoading(C,l,o,G.MAIN,h)}C&&(C.initSegment&&!C.initSegment.data&&!this.bitrateTest&&(C=C.initSegment),this.loadFragment(C,a,E))}loadFragment(e,t,n){const i=this.fragmentTracker.getState(e);i===ke.NOT_LOADED||i===ke.PARTIAL?ue(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,n):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,G.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const i=this.getAppendedFrag(t.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const s=this.getLevelDetails();if(s!=null&&s.live){const o=this.getMainFwdBufferInfo();if(!o||o.len<s.targetduration*2)return}if(!t.paused&&e){const o=this.hls.nextLoadLevel,u=e[o],l=this.fragLastKbps;l&&this.fragCurrent?n=this.fragCurrent.duration*u.maxBitrate/(1e3*l)+1:n=0}else n=0;const a=this.getBufferedFrag(t.currentTime+n);if(a){const o=this.followingBufferedFrag(a);if(o){this.abortCurrentFrag();const u=o.maxStartPTS?o.maxStartPTS:o.start,l=o.duration,f=Math.max(a.end,u+Math.min(Math.max(l-this.config.maxFragLookUpTolerance,l*(this.couldBacktrack?.5:.125)),l*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(f,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Xt.KEY_LOADING:case Xt.FRAG_LOADING:case Xt.FRAG_LOADING_WAITING_RETRY:case Xt.PARSING:case Xt.PARSED:this.state=Xt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;Zi(n,"playing",this.onMediaPlaying),Zi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(ts(n,"playing",this.onMediaPlaying),ts(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(d.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,i=!1;t.levels.forEach(s=>{const a=s.audioCodec;a&&(n=n||a.indexOf("mp4a.40.2")!==-1,i=i||a.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=n&&i&&!Ku(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==Xt.IDLE)return;const i=t.levelInfo;(!i.details||i.details.live&&(this.levelLastLoaded!==i||i.details.expired)||this.waitForCdnTuneIn(i.details))&&(this.state=Xt.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:i,startFragRequested:s}=this,a=t.level,o=t.details,u=o.totalduration;if(!i){this.warn(`Levels were reset while loading level ${a}`);return}this.log(`Level ${a} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${u}`);const l=t.levelInfo,f=this.fragCurrent;f&&(this.state===Xt.FRAG_LOADING||this.state===Xt.FRAG_LOADING_WAITING_RETRY)&&f.level!==t.level&&f.loader&&this.abortCurrentFrag();let h=0;if(o.live||(n=l.details)!=null&&n.live){var E;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;h=this.alignPlaylists(o,l.details,(E=this.levelLastLoaded)==null?void 0:E.details)}if(l.details=o,this.levelLastLoaded=l,s||this.setStartPosition(o,h),this.hls.trigger(d.LEVEL_UPDATED,{details:o,level:a}),this.state===Xt.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=Xt.IDLE}s&&o.live&&this.synchronizeToLiveEdge(o),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const i=this.hls.liveSyncPosition,s=this.getLoadPosition(),a=e.fragmentStart,o=e.edge,u=s>=a-t.maxFragLookUpTolerance&&s<=o;if(i!==null&&n.duration>i&&(s<i||!u)){const l=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!u&&n.readyState<4||s<o-l)&&(this._hasEnoughToStart||(this.nextLoadPosition=i),n.readyState&&(this.warn(`Playback: ${s.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${i.toFixed(3)}`),n.currentTime=i))}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:i,payload:s}=e,{levels:a}=this;if(!a){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const o=a[n.level];if(!o){this.warn(`Level ${n.level} not found on progress`);return}const u=o.details;if(!u){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const l=o.videoCodec,f=u.PTSKnown||!u.live,h=(t=n.initSegment)==null?void 0:t.data,E=this._getAudioCodec(o),C=this.transmuxer=this.transmuxer||new Ka(this.hls,G.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),T=i?i.index:-1,J=T!==-1,$=new Wn(n.level,n.sn,n.stats.chunkCount,s.byteLength,T,J),_e=this.initPTS[n.cc];C.push(s,h,E,l,n,i,u.totalduration,f,$,_e)}onAudioTrackSwitching(e,t){const n=this.hls,i=this.altAudio===2;if(nn(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const 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(i){this.fragmentTracker.removeAllFragments(),n.once(d.BUFFER_FLUSHED,()=>{var a;(a=this.hls)==null||a.trigger(d.AUDIO_TRACK_SWITCHED,t)}),n.trigger(d.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(d.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=nn(t.url,this.hls);if(n){const i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let i,s,a=!1;for(const o in n){const u=n[o];if(u.id==="main"){if(s=o,i=u,o==="video"){const l=n[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&i?(this.log(`Alternate track found, use ${s}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:i}=t,s=n.type===G.MAIN;if(s){if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${i?" p: "+i.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===Xt.PARSED&&(this.state=Xt.IDLE);return}const o=i?i.stats:n.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),ue(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,i)}const a=this.media;a&&(!this._hasEnoughToStart&&pn.getBuffered(a).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),s&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=Xt.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(G.MAIN,t);break;case W.LEVEL_LOAD_ERROR:case W.LEVEL_LOAD_TIMEOUT:case W.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Xt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===ye.LEVEL&&(this.state=Xt.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=Xt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==y.AUDIO||!this.altAudio){const n=(t===y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,G.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const i=this.timelineOffset;i&&n&&(n+=i);const s=this.getLevelDetails(),a=pn.getBuffered(e),o=a.length?a.start(0):0,u=o-n,l=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);u>0&&(u<l||this.loadingParts&&u<2*((s==null?void 0:s.partTarget)||0))&&(this.log(`adjusting start position by ${u} to match buffer start`),n+=u,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${o}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:i}=this,s=n==null?void 0:n.frag;if(!s||this.fragContextChanged(s))return;t.fragmentError=0,this.state=Xt.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(),i.trigger(d.FRAG_LOADED,n),s.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const n=this.playlistType,{hls:i}=this,{remuxResult:s,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:u,part:l,level:f}=o,{video:h,text:E,id3:C,initSegment:T}=s,{details:J}=f,$=this.altAudio?void 0:s.audio;if(this.fragContextChanged(u)){this.fragmentTracker.removeFragment(u);return}if(this.state=Xt.PARSING,T){if(T!=null&&T.tracks){const De=u.initSegment||u;this._bufferInitSegment(f,T.tracks,De,a),i.trigger(d.FRAG_PARSING_INIT_SEGMENT,{frag:De,id:n,tracks:T.tracks})}const _e=T.initPTS,Oe=T.timescale;M(_e)&&(this.initPTS[u.cc]={baseTime:_e,timescale:Oe},i.trigger(d.INIT_PTS_FOUND,{frag:u,id:n,initPTS:_e,timescale:Oe}))}if(h&&J){!$&&h.type==="audiovideo"&&this.logMuxedErr(u);const _e=J.fragments[u.sn-1-J.startSN],Oe=u.sn===J.startSN,De=!_e||u.cc>_e.cc;if(s.independent!==!1){const{startPTS:rt,endPTS:We,startDTS:Lt,endDTS:dt}=h;if(l)l.elementaryStreams[h.type]={startPTS:rt,endPTS:We,startDTS:Lt,endDTS:dt};else if(h.firstKeyFrame&&h.independent&&a.id===1&&!De&&(this.couldBacktrack=!0),h.dropped&&h.independent){const _t=this.getMainFwdBufferInfo(),jt=(_t?_t.end:this.getLoadPosition())+this.config.maxBufferHole,xt=h.firstKeyFramePTS?h.firstKeyFramePTS:rt;if(!Oe&&jt<xt-this.config.maxBufferHole&&!De){this.backtrack(u);return}else De&&(u.gap=!0);u.setElementaryStreamInfo(h.type,u.start,We,u.start,dt,!0)}else Oe&&rt-(J.appliedTimelineOffset||0)>ao&&(u.gap=!0);u.setElementaryStreamInfo(h.type,rt,We,Lt,dt),this.backtrackFragment&&(this.backtrackFragment=u),this.bufferFragmentData(h,u,l,a,Oe||De)}else if(Oe||De)u.gap=!0;else{this.backtrack(u);return}}if($){const{startPTS:_e,endPTS:Oe,startDTS:De,endDTS:rt}=$;l&&(l.elementaryStreams[y.AUDIO]={startPTS:_e,endPTS:Oe,startDTS:De,endDTS:rt}),u.setElementaryStreamInfo(y.AUDIO,_e,Oe,De,rt),this.bufferFragmentData($,u,l,a)}if(J&&C!=null&&(t=C.samples)!=null&&t.length){const _e={id:n,frag:u,details:J,samples:C.samples};i.trigger(d.FRAG_PARSING_METADATA,_e)}if(J&&E){const _e={id:n,frag:u,details:J,samples:E.samples};i.trigger(d.FRAG_PARSING_USERDATA,_e)}}logMuxedErr(e){this.warn(`${ue(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,i){if(this.state!==Xt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:s,video:a,audiovideo:o}=t;if(s){let l=vn(s.codec,e.audioCodec);l==="mp4a"&&(l="mp4a.40.5");const f=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){l&&(l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5");const h=s.metadata;h&&"channelCount"in h&&(h.channelCount||1)!==1&&f.indexOf("firefox")===-1&&(l="mp4a.40.5")}l&&l.indexOf("mp4a.40.5")!==-1&&f.indexOf("android")!==-1&&s.container!=="audio/mpeg"&&(l="mp4a.40.2",this.log(`Android: force audio codec to ${l}`)),e.audioCodec&&e.audioCodec!==l&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${l}"`),s.levelCodec=l,s.id=G.MAIN,this.log(`Init audio buffer, container:${s.container}, codecs[selected/level/parsed]=[${l||""}/${e.audioCodec||""}/${s.codec}]`),delete t.audiovideo}if(a){a.levelCodec=e.videoCodec,a.id=G.MAIN;const l=a.codec;if((l==null?void 0:l.length)===4)switch(l){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||""}/${l}]${a.codec!==l?" parsed-corrected="+a.codec:""}${a.supplemental?" supplemental="+a.supplemental:""}`),delete t.audiovideo}o&&(this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),delete t.video,delete t.audio);const u=Object.keys(t);if(u.length){if(this.hls.trigger(d.BUFFER_CODECS,t),!this.hls)return;u.forEach(l=>{const h=t[l].initSegment;h!=null&&h.byteLength&&this.hls.trigger(d.BUFFER_APPENDING,{type:l,data:h,frag:n,part:null,chunkMeta:i,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,G.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,n=e==null?void 0:e[t];return n?this.getMaxBufferLength(n.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Xt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(pn.isBuffered(e,n)?t=this.getAppendedFrag(n):pn.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const i=this.fragPlaying,s=t.level;(!i||t.sn!==i.sn||i.level!==s)&&(this.fragPlaying=t,this.hls.trigger(d.FRAG_CHANGED,{frag:t}),(!i||i.level!==s)&&this.hls.trigger(d.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 M(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(M(t)){const n=this.getLevelDetails(),i=this.currentFrag||(n?Ct(null,n.fragments,t):null);if(i){const s=i.programDateTime;if(s!==null){const a=s+(t-i.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 n in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[n].loader;if(i){var t;if(e&&e!==((t=i.context)==null?void 0:t.frag.type))return;i.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,n,i,s){return new Pn({type:we.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:s,error:n,networkDetails:i})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:n,cc:i}=e;for(let s=0;s<t.length;s++){const a=t[s];if(i<=a.cc&&(n==="initSegment"||a.sn==="initSegment"||n<a.sn)){this.emeController.selectKeySystemFormat(a).then(o=>{a.setKeyFormat(o)});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 n,i;t&&e.setKeyFormat(t);const s=e.decryptdata;if(!s){const l=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,l))}const a=s.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,W.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));let o=this.keyUriToKeyInfo[a];if((n=o)!=null&&n.decryptdata.key)return s.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});if((i=o)!=null&&i.keyLoadPromise){var u;switch((u=o.mediaKeySessionContext)==null?void 0:u.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then(l=>(s.key=l.keyInfo.decryptdata.key,{frag:e,keyInfo:o}))}}switch(o=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(o,e):this.loadKeyEME(o,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(o,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 n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const i=this.emeController.loadKey(n);if(i)return(e.keyLoadPromise=i.then(s=>(e.mediaKeySessionContext=s,n))).catch(s=>{throw e.keyLoadPromise=null,s})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,i=n.loader,s=new i(n);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise((a,o)=>{const u={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},l=n.keyLoadPolicy.default,f={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:(E,C,T,J)=>{const{frag:$,keyInfo:_e,url:Oe}=T;if(!$.decryptdata||_e!==this.keyUriToKeyInfo[Oe])return o(this.createKeyLoadError($,W.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),J));_e.decryptdata.key=$.decryptdata.key=new Uint8Array(E.data),$.keyLoader=null,_e.loader=null,a({frag:$,keyInfo:_e})},onError:(E,C,T,J)=>{this.resetLoader(C),o(this.createKeyLoadError(t,W.KEY_LOAD_ERROR,new Error(`HTTP Error ${E.code} loading key ${E.text}`),T,B({url:u.url,data:void 0},E)))},onTimeout:(E,C,T)=>{this.resetLoader(C),o(this.createKeyLoadError(t,W.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),T))},onAbort:(E,C,T)=>{this.resetLoader(C),o(this.createKeyLoadError(t,W.INTERNAL_ABORTED,new Error("key loading aborted"),T))}};s.load(u,f,h)})}resetLoader(e){const{frag:t,keyInfo:n,url:i}=e,s=n.loader;t.keyLoader===s&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[i],s&&s.destroy()}}function dl(r){const{type:e}=r;switch(e){case ye.AUDIO_TRACK:return G.AUDIO;case ye.SUBTITLE_TRACK:return G.SUBTITLE;default:return G.MAIN}}function rA(r,e){let t=r.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Vu{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(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.LEVEL_LOADING,this.onLevelLoading,this),e.on(d.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(d.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.LEVEL_LOADING,this.onLevelLoading,this),e.off(d.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(d.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,i=t.loader,s=n||i,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:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ye.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:i,pathwayId:s,url:a,deliveryDirectives:o,levelInfo:u}=t;this.load({id:n,level:i,pathwayId:s,responseType:"text",type:ye.LEVEL,url:a,deliveryDirectives:o,levelOrTrack:u})}onAudioTrackLoading(e,t){const{id:n,groupId:i,url:s,deliveryDirectives:a,track:o}=t;this.load({id:n,groupId:i,level:null,responseType:"text",type:ye.AUDIO_TRACK,url:s,deliveryDirectives:a,levelOrTrack:o})}onSubtitleTrackLoading(e,t){const{id:n,groupId:i,url:s,deliveryDirectives:a,track:o}=t;this.load({id:n,groupId:i,level:null,responseType:"text",type:ye.SUBTITLE_TRACK,url:s,deliveryDirectives:a,levelOrTrack:o})}onLevelsUpdated(e,t){const n=this.loaders[ye.LEVEL];if(n){const i=n.context;i&&!t.levels.some(s=>s===i.levelOrTrack)&&(n.abort(),delete this.loaders[ye.LEVEL])}}load(e){var t;const n=this.hls.config;let i=this.getInternalLoader(e);if(i){const l=this.hls.logger,f=i.context;if(f&&f.levelOrTrack===e.levelOrTrack&&(f.url===e.url||f.deliveryDirectives&&!e.deliveryDirectives)){f.url===e.url?l.log(`[playlist-loader]: ignore ${e.url} ongoing request`):l.log(`[playlist-loader]: ignore ${e.url} in favor of ${f.url}`);return}l.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),i.abort()}let s;if(e.type===ye.MANIFEST?s=n.manifestLoadPolicy.default:s=p({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),i=this.createInternalLoader(e),M((t=e.deliveryDirectives)==null?void 0:t.part)){let l;if(e.type===ye.LEVEL&&e.level!==null?l=this.hls.levels[e.level].details:e.type===ye.AUDIO_TRACK&&e.id!==null?l=this.hls.audioTracks[e.id].details:e.type===ye.SUBTITLE_TRACK&&e.id!==null&&(l=this.hls.subtitleTracks[e.id].details),l){const f=l.partTarget,h=l.targetduration;if(f&&h){const E=Math.max(f*3,h*.8)*1e3;s=p({},s,{maxTimeToFirstByteMs:Math.min(E,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(E,s.maxTimeToFirstByteMs)})}}}const a=s.errorRetry||s.timeoutRetry||{},o={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},u={onSuccess:(l,f,h,E)=>{const C=this.getInternalLoader(h);this.resetInternalLoader(h.type);const T=l.data;if(T.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(l,h,new Error("no EXTM3U delimiter"),E||null,f);return}f.parsing.start=performance.now(),hi.isMediaPlaylist(T)||h.type!==ye.MANIFEST?this.handleTrackOrLevelPlaylist(l,f,h,E||null,C):this.handleMasterPlaylist(l,f,h,E)},onError:(l,f,h,E)=>{this.handleNetworkError(f,h,!1,l,E)},onTimeout:(l,f,h)=>{this.handleNetworkError(f,h,!0,void 0,l)}};i.load(e,o,u)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,i){const s=this.hls,a=e.data,o=rA(e,n),u=hi.parseMasterPlaylist(a,o);if(u.playlistParsingError){this.handleManifestParsingError(e,n,u.playlistParsingError,i,t);return}const{contentSteering:l,levels:f,sessionData:h,sessionKeys:E,startTimeOffset:C,variableList:T}=u;this.variableList=T;const{AUDIO:J=[],SUBTITLES:$,"CLOSED-CAPTIONS":_e}=hi.parseMasterPlaylistMedia(a,o,u);J.length&&!J.some(De=>!De.url)&&f[0].audioCodec&&!f[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),J.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Sn({}),bitrate:0,url:""})),s.trigger(d.MANIFEST_LOADED,{levels:f,audioTracks:J,subtitles:$,captions:_e,contentSteering:l,url:o,stats:t,networkDetails:i,sessionData:h,sessionKeys:E,startTimeOffset:C,variableList:T})}handleTrackOrLevelPlaylist(e,t,n,i,s){const a=this.hls,{id:o,level:u,type:l}=n,f=rA(e,n),h=M(u)?u:M(o)?o:0,E=dl(n),C=hi.parseLevelPlaylist(e.data,f,h,E,0,this.variableList);if(l===ye.MANIFEST){const T={attrs:new Sn({}),bitrate:0,details:C,name:"",url:f};C.requestScheduled=t.loading.start+yi(C,0),a.trigger(d.MANIFEST_LOADED,{levels:[T],audioTracks:[],url:f,stats:t,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=C,this.handlePlaylistLoaded(C,e,t,n,i,s)}handleManifestParsingError(e,t,n,i,s){this.hls.trigger(d.ERROR,{type:we.NETWORK_ERROR,details:W.MANIFEST_PARSING_ERROR,fatal:t.type===ye.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:i,stats:s})}handleNetworkError(e,t,n=!1,i,s){let a=`A network ${n?"timeout":"error"+(i?" (status "+i.code+")":"")} occurred while loading ${e.type}`;e.type===ye.LEVEL?a+=`: ${e.level} id: ${e.id}`:(e.type===ye.AUDIO_TRACK||e.type===ye.SUBTITLE_TRACK)&&(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);this.hls.logger.warn(`[playlist-loader]: ${a}`);let u=W.UNKNOWN,l=!1;const f=this.getInternalLoader(e);switch(e.type){case ye.MANIFEST:u=n?W.MANIFEST_LOAD_TIMEOUT:W.MANIFEST_LOAD_ERROR,l=!0;break;case ye.LEVEL:u=n?W.LEVEL_LOAD_TIMEOUT:W.LEVEL_LOAD_ERROR,l=!1;break;case ye.AUDIO_TRACK:u=n?W.AUDIO_TRACK_LOAD_TIMEOUT:W.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case ye.SUBTITLE_TRACK:u=n?W.SUBTITLE_TRACK_LOAD_TIMEOUT:W.SUBTITLE_LOAD_ERROR,l=!1;break}f&&this.resetInternalLoader(e.type);const h={type:we.NETWORK_ERROR,details:u,fatal:l,url:e.url,loader:f,context:e,error:o,networkDetails:t,stats:s};if(i){const E=(t==null?void 0:t.url)||e.url;h.response=B({url:E,data:void 0},i)}this.hls.trigger(d.ERROR,h)}handlePlaylistLoaded(e,t,n,i,s,a){const o=this.hls,{type:u,level:l,id:f,groupId:h,deliveryDirectives:E}=i,C=rA(t,i),T=dl(i),J=typeof i.level=="number"&&T===G.MAIN?l:void 0;if(!e.fragments.length){const _e=e.playlistParsingError=new Error("No Segments found in Playlist");o.trigger(d.ERROR,{type:we.NETWORK_ERROR,details:W.LEVEL_EMPTY_ERROR,fatal:!1,url:C,error:_e,reason:_e.message,response:t,context:i,level:J,parent:T,networkDetails:s,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const $=e.playlistParsingError;if($){if(this.hls.logger.warn($),!o.config.ignorePlaylistParsingErrors){o.trigger(d.ERROR,{type:we.NETWORK_ERROR,details:W.LEVEL_PARSING_ERROR,fatal:!1,url:C,error:$,reason:$.message,response:t,context:i,level:J,parent:T,networkDetails:s,stats:n});return}e.playlistParsingError=null}switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),(!a.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),u){case ye.MANIFEST:case ye.LEVEL:o.trigger(d.LEVEL_LOADED,{details:e,levelInfo:i.levelOrTrack||o.levels[0],level:J||0,id:f||0,stats:n,networkDetails:s,deliveryDirectives:E,withoutMultiVariant:u===ye.MANIFEST});break;case ye.AUDIO_TRACK:o.trigger(d.AUDIO_TRACK_LOADED,{details:e,track:i.levelOrTrack,id:f||0,groupId:h||"",stats:n,networkDetails:s,deliveryDirectives:E});break;case ye.SUBTITLE_TRACK:o.trigger(d.SUBTITLE_TRACK_LOADED,{details:e,track:i.levelOrTrack,id:f||0,groupId:h||"",stats:n,networkDetails:s,deliveryDirectives:E});break}}}class c{static get version(){return Ri}static isMSESupported(){return fl()}static isSupported(){return Hu()}static getMediaSource(){return q()}static get Events(){return d}static get MetadataSchema(){return bi}static get ErrorTypes(){return we}static get ErrorDetails(){return W}static get DefaultConfig(){return c.defaultConfig?c.defaultConfig:ku}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 ss,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=de(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=Wi(c.DefaultConfig,e,t);this.userConfig=e,n.progressive&&so(n,t);const{abrController:i,bufferController:s,capLevelController:a,errorController:o,fpsController:u}=n,l=new o(this),f=this.abrController=new i(this),h=new tt(this),E=n.interstitialsController,C=E?this.interstitialsController=new E(this,c):null,T=this.bufferController=new s(this,h),J=this.capLevelController=new a(this),$=new u(this),_e=new Vu(this),Oe=n.contentSteeringController,De=Oe?new Oe(this):null,rt=this.levelController=new Nu(this,De),We=new Qu(this),Lt=new Zu(this.config),dt=this.streamController=new $u(this,h,Lt),_t=this.gapController=new oo(this,h);J.setStreamController(dt),$.setStreamController(dt);const jt=[_e,rt,dt];C&&jt.splice(1,0,C),De&&jt.splice(1,0,De),this.networkControllers=jt;const xt=[f,T,_t,J,$,We,h];this.audioTrackController=this.createController(n.audioTrackController,jt);const xn=n.audioStreamController;xn&&jt.push(this.audioStreamController=new xn(this,h,Lt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,jt);const bn=n.subtitleStreamController;bn&&jt.push(this.subtititleStreamController=new bn(this,h,Lt)),this.createController(n.timelineController,xt),Lt.emeController=this.emeController=this.createController(n.emeController,xt),this.cmcdController=this.createController(n.cmcdController,xt),this.latencyController=this.createController(Mu,xt),this.coreComponents=xt,jt.push(l);const wr=l.onErrorOut;typeof wr=="function"&&this.on(d.ERROR,wr,l),this.on(d.MANIFEST_LOADED,_e.onManifestLoaded,_e)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,i){this._emitter.off(e,t,n,i)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const i=e===d.ERROR;this.trigger(d.ERROR,{type:we.OTHER_ERROR,details:W.INTERNAL_EXCEPTION,fatal:i,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(d.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(d.ERROR,{type:we.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,n=t?e.media:e,i=t?e:{media:n};this._media=n,this.trigger(d.MEDIA_ATTACHING,i)}detachMedia(){this.logger.log("detachMedia"),this.trigger(d.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(d.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,i=this._url=ae.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${i}`),t&&n&&(n!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(d.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[G.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[G.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[G.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=gs()),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){Ue(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let i=0;i<n;i++)if(e[i].maxBitrate>=t)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let i;if(t===-1&&e!=null&&e.length?i=e.length-1:i=t,n)for(let s=i;s--;){const a=e[s].attrs["HDCP-LEVEL"];if(a&&a<=n)return s}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const n=un(t);return $n(e,n,navigator.mediaCapabilities)}}c.defaultConfig=void 0},16722:function(Zn,Dt,x){"use strict";x.d(Dt,{Z:function(){return G}});const M=A=>typeof A=="object"&&A!=null&&A.nodeType===1,me=(A,S)=>(!S||A!=="hidden")&&A!=="visible"&&A!=="clip",be=(A,S)=>{if(A.clientHeight<A.scrollHeight||A.clientWidth<A.scrollWidth){const k=getComputedStyle(A,null);return me(k.overflowY,S)||me(k.overflowX,S)||(p=>{const m=(B=>{if(!B.ownerDocument||!B.ownerDocument.defaultView)return null;try{return B.ownerDocument.defaultView.frameElement}catch(F){return null}})(p);return!!m&&(m.clientHeight<p.scrollHeight||m.clientWidth<p.scrollWidth)})(A)}return!1},we=(A,S,k,p,m,B,F,V)=>B<A&&F>S||B>A&&F<S?0:B<=A&&V<=k||F>=S&&V>=k?B-A-p:F>S&&V<k||B<A&&V>k?F-S+m:0,W=A=>{const S=A.parentElement;return S==null?A.getRootNode().host||null:S},d=(A,S)=>{var k,p,m,B;if(typeof document=="undefined")return[];const{scrollMode:F,block:V,inline:j,boundary:se,skipOverflowHiddenElements:H}=S,X=typeof se=="function"?se:et=>et!==se;if(!M(A))throw new TypeError("Invalid target");const P=document.scrollingElement||document.documentElement,R=[];let fe=A;for(;M(fe)&&X(fe);){if(fe=W(fe),fe===P){R.push(fe);break}fe!=null&&fe===document.body&&be(fe)&&!be(document.documentElement)||fe!=null&&be(fe,H)&&R.push(fe)}const de=(p=(k=window.visualViewport)==null?void 0:k.width)!=null?p:innerWidth,ie=(B=(m=window.visualViewport)==null?void 0:m.height)!=null?B:innerHeight,{scrollX:q,scrollY:ge}=window,{height:z,width:Fe,top:Z,right:U,bottom:K,left:ee}=A.getBoundingClientRect(),{top:he,right:ae,bottom:_,left:y}=(et=>{const gt=window.getComputedStyle(et);return{top:parseFloat(gt.scrollMarginTop)||0,right:parseFloat(gt.scrollMarginRight)||0,bottom:parseFloat(gt.scrollMarginBottom)||0,left:parseFloat(gt.scrollMarginLeft)||0}})(A);let Y=V==="start"||V==="nearest"?Z-he:V==="end"?K+_:Z+z/2-he+_,ue=j==="center"?ee+Fe/2-y+ae:j==="end"?U+ae:ee-y;const Qe=[];for(let et=0;et<R.length;et++){const gt=R[et],{height:bt,width:Vt,top:Rt,right:te,bottom:Le,left:mt}=gt.getBoundingClientRect();if(F==="if-needed"&&Z>=0&&ee>=0&&K<=ie&&U<=de&&(gt===P&&!be(gt)||Z>=Rt&&K<=Le&&ee>=mt&&U<=te))return Qe;const Ne=getComputedStyle(gt),It=parseInt(Ne.borderLeftWidth,10),He=parseInt(Ne.borderTopWidth,10),Se=parseInt(Ne.borderRightWidth,10),I=parseInt(Ne.borderBottomWidth,10);let g=0,v=0;const Q="offsetWidth"in gt?gt.offsetWidth-gt.clientWidth-It-Se:0,b="offsetHeight"in gt?gt.offsetHeight-gt.clientHeight-He-I:0,w="offsetWidth"in gt?gt.offsetWidth===0?0:Vt/gt.offsetWidth:0,D="offsetHeight"in gt?gt.offsetHeight===0?0:bt/gt.offsetHeight:0;if(P===gt)g=V==="start"?Y:V==="end"?Y-ie:V==="nearest"?we(ge,ge+ie,ie,He,I,ge+Y,ge+Y+z,z):Y-ie/2,v=j==="start"?ue:j==="center"?ue-de/2:j==="end"?ue-de:we(q,q+de,de,It,Se,q+ue,q+ue+Fe,Fe),g=Math.max(0,g+ge),v=Math.max(0,v+q);else{g=V==="start"?Y-Rt-He:V==="end"?Y-Le+I+b:V==="nearest"?we(Rt,Le,bt,He,I+b,Y,Y+z,z):Y-(Rt+bt/2)+b/2,v=j==="start"?ue-mt-It:j==="center"?ue-(mt+Vt/2)+Q/2:j==="end"?ue-te+Se+Q:we(mt,te,Vt,It,Se+Q,ue,ue+Fe,Fe);const{scrollLeft:Ae,scrollTop:L}=gt;g=D===0?0:Math.max(0,Math.min(L+g/D,gt.scrollHeight-bt/D+b)),v=w===0?0:Math.max(0,Math.min(Ae+v/w,gt.scrollWidth-Vt/w+Q)),Y+=L-g,ue+=Ae-v}Qe.push({el:gt,top:g,left:v})}return Qe},ye=A=>A===!1?{block:"end",inline:"nearest"}:(S=>S===Object(S)&&Object.keys(S).length!==0)(A)?A:{block:"start",inline:"nearest"};function G(A,S){if(!A.isConnected||!(m=>{let B=m;for(;B&&B.parentNode;){if(B.parentNode===document)return!0;B=B.parentNode instanceof ShadowRoot?B.parentNode.host:B.parentNode}return!1})(A))return;const k=(m=>{const B=window.getComputedStyle(m);return{top:parseFloat(B.scrollMarginTop)||0,right:parseFloat(B.scrollMarginRight)||0,bottom:parseFloat(B.scrollMarginBottom)||0,left:parseFloat(B.scrollMarginLeft)||0}})(A);if((m=>typeof m=="object"&&typeof m.behavior=="function")(S))return S.behavior(d(A,S));const p=typeof S=="boolean"||S==null?void 0:S.behavior;for(const{el:m,top:B,left:F}of d(A,ye(S))){const V=B-k.top+k.bottom,j=F-k.left+k.right;m.scroll({top:V,left:j,behavior:p})}}}}]);
}());